* , *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f7;
    color: #111827;
}

a {
    text-decoration: none;
    color: inherit;
}

.app-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 58px;
    padding: 5px 24px;
    box-sizing: border-box;

    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.top-bar-title {
    font-weight: 600;
    font-size: 18px;
}

.link {
    font-size: 14px;
    border-radius: 999px;
    padding: 4px 10px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

.menu-bar {
    max-width: 1200px;
    margin: 16px auto 0;
    padding: 0 16px;
    display: flex;
    gap: 8px;
}

.menu-link {
    padding: 6px 14px;
    border-radius: 999px;
    background: #e5e7eb;
    font-size: 14px;
    color: #374151;
}

.menu-link.active {
    background: #111827;
    color: #ffffff;
}

.main-layout {
    flex: 1 0 auto;
    max-width: 1200px;
    margin: 14px auto 30px;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 12px 25px rgba(15,23,42,0.08);
}

h2 {
    margin: 0 0 14px 0;
    font-size: 18px;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

@media (max-width: 700px) {
    .grid-form {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

.label {
    font-size: 13px;
    margin-bottom: 4px;
    color: #4b5563;
}

.input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-size: 14px;
    outline: none;
}

.input:focus {
    border-color: #2563eb;
    background: #ffffff;
}

.textarea {
    min-height: 90px;
    resize: vertical;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
}

.primary-btn {
    background: #0071e3;
    color: #ffffff;
}

.secondary-btn {
    background: #e5e7eb;
}

.table-wrapper {
    margin-top: 8px;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th,
.table td {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.table th {
    background: #f3f4f6;
    font-weight: 600;
}

.table tr:nth-child(even) td {
    background: #fafafa;
}

.date-group-row td {
    background: #e5e7eb;
    font-weight: 600;
}

.action-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.action-cell .btn {
    width: 130px;
    text-align: center;
    padding: 8px 0;
    font-weight: 600;
    border-radius: 24px;
    color: #ffffff;
}

.edit-btn {
    background: #16a34a;
}

.edit-btn:hover {
    background: #15803d;
}

.danger-btn {
    background: #ef4444;
}

.danger-btn:hover {
    background: #dc2626;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top, #f5f5f7 0, #d1d5db 40%, #9ca3af 100%);
}

.login-container {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px 20px 18px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 16px 35px rgba(15,23,42,0.35);
}

.app-title {
    text-align: center;
    margin: 0 0 4px 0;
}

.subtitle {
    text-align: center;
    margin: 0 0 14px 0;
    font-size: 13px;
    color: #6b7280;
}

.alert {
    border-radius: 10px;
    padding: 6px 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.brand-logo {
    width: 180px;
    height: 144px;
    display: block;
}

.brand,
.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.brand,
.top-bar-left {
    height: 100%;
    min-height: 0;
    overflow: visible;
}

.icon-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:28px;
    height:28px;
    border-radius:8px;
    background:#f3f4f6;
    border:1px solid #d1d5db;
    font-size:16px;
    margin-right:6px;
}
.icon-link:hover{
    background:#e5e7eb;
}

/* Customer layout */
.customer-form {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 900px) {
    .customer-form {
        grid-template-columns: 1fr;
    }
}

.customer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px 16px;
}

.panel h3 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.customer-actions {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.readonly-box {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    font-size: 14px;
    min-height: 40px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.kv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.kv-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px;
    align-items: start;
}

@media (max-width: 500px) {
    .kv-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

.kv-key {
    font-size: 13px;
    color: #4b5563;
}

.kv-val {
    font-size: 14px;
    color: #111827;
    word-break: break-word;
}

.kv-row-full {
    grid-template-columns: 1fr;
}

.textarea-compact {
    min-height: 60px;
}


/* Pflichtfeld-Sternchen */
.req{color:#c00;font-weight:700;}

/* Termin: Neu / Bestand Umschalter */
.appointment-mode-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 16px 0;
    flex-wrap: wrap;
}

.mode-tab {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    transition: background 0.15s ease, transform 0.15s ease;
}

.mode-tab.active {
    background: #16a34a;
    border-color: #15803d;
}

.mode-tab.inactive {
    background: #ef4444;
    border-color: #dc2626;
}

.mode-tab:hover {
    transform: translateY(-1px);
}

.appointment-search-panel {
    margin-bottom: 16px;
}

.hint {
    font-size: 13px;
    color: #4b5563;
}

.customer-btn {
    background: #2563eb;
    color: #ffffff;
}

.customer-btn:hover {
    background: #1d4ed8;
}

/* Sichtbarer Kunden-Button in Termin-Aktionen */
.customer-btn,
.action-cell .customer-btn,
a.customer-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 130px !important;
    min-height: 34px !important;
    padding: 8px 0 !important;
    border-radius: 24px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.customer-btn:hover,
.action-cell .customer-btn:hover,
a.customer-btn:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 800px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

.dashboard-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
}

.dashboard-stat-number {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
}

.dashboard-stat-label {
    font-size: 14px;
    color: #4b5563;
}

.table-link {
    color: #2563eb;
    font-weight: 600;
}

.table-link:hover {
    text-decoration: underline;
}

.hint {
    font-size: 13px;
    color: #6b7280;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.permission-yes {
    color: #15803d;
    font-weight: 700;
}

.permission-no {
    color: #dc2626;
    font-weight: 700;
}

.today-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 700;
}

/* Dashboard pagination */
.dash-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.dash-page-link,
.dash-page-next,
.dash-page-ellipsis {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.dash-page-link,
.dash-page-next {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #111827;
    text-decoration: none;
}

.dash-page-link:hover,
.dash-page-next:hover {
    background: #e5e7eb;
}

.dash-page-link.active {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.dash-page-next {
    padding: 0 16px;
    background: #0071e3;
    border-color: #0071e3;
    color: #ffffff;
}

.dash-page-next:hover {
    background: #005bb5;
}

.dash-page-ellipsis {
    color: #6b7280;
    min-width: 20px;
    padding: 0 4px;
}





/* Footer */
.site-footer {
    width: 100%;
    max-width: 1200px;
    margin: 28px auto 0;
    padding: 18px 16px 22px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    border-top: 1px solid #e5e7eb;
    box-sizing: border-box;
}
.login-body .site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    margin: 0;
    background: rgba(255,255,255,0.75);
}


/* Dashboard: Vertragsverlängerung Icon-Aktionen */
.action-cell.renewal-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

.action-cell.renewal-actions form {
    display: inline-flex !important;
    margin: 0 !important;
    padding: 0 !important;
}

.renewal-icon-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    font-size: 17px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: 0 8px 16px rgba(15,23,42,0.12) !important;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease !important;
}

.renewal-icon-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 22px rgba(15,23,42,0.18) !important;
    opacity: .95 !important;
}

.renewal-icon-blue { background: #2563eb !important; }
.renewal-icon-green { background: #16a34a !important; }
.renewal-icon-red { background: #ef4444 !important; }
.renewal-icon-orange { background: #f97316 !important; }


/* Dashboard: Verlängerungsstatistik */
.renewal-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.renewal-stat-box {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px 16px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.renewal-stat-box.success { border-color: #bbf7d0; background: #f0fdf4; }
.renewal-stat-box.declined { border-color: #fecaca; background: #fef2f2; }
.renewal-stat-number { font-size: 26px; font-weight: 800; color: #111827; }
.renewal-stat-label { font-size: 13px; color: #4b5563; }
@media (max-width: 900px) {
    .renewal-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .renewal-stats-grid { grid-template-columns: 1fr; }
}

.renewal-actions { display:flex !important; flex-direction:row !important; gap:8px !important; align-items:center !important; justify-content:center !important; }
.renewal-actions form { margin:0 !important; padding:0 !important; display:inline-flex !important; }
.renewal-icon-blue { background:#2563eb !important; color:#fff !important; }
.renewal-icon-green { background:#16a34a !important; color:#fff !important; }
.renewal-icon-red { background:#ef4444 !important; color:#fff !important; }
.renewal-icon-orange { background:#f97316 !important; color:#fff !important; }


/* Einheitliche Pagination im Dashboard-Stil */
.pagination.customer-pagination,
.pagination.system-pagination {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-top: 18px !important;
}
.pagination.customer-pagination .page-link,
.pagination.customer-pagination .page-dots,
.pagination.system-pagination .page-link,
.pagination.system-pagination .page-dots {
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    border: 1px solid #d1d5db !important;
    background: #f3f4f6 !important;
    color: #111827 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}
.pagination.customer-pagination .page-link:hover,
.pagination.system-pagination .page-link:hover {
    background: #e5e7eb !important;
}
.pagination.customer-pagination .page-link.active,
.pagination.system-pagination .page-link.active {
    background: #111827 !important;
    border-color: #111827 !important;
    color: #ffffff !important;
}
.pagination.customer-pagination .page-link.next,
.pagination.system-pagination .page-link.next {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}
.pagination.customer-pagination .page-link.next:hover,
.pagination.system-pagination .page-link.next:hover {
    background: #1d4ed8 !important;
}
.pagination.customer-pagination .page-dots,
.pagination.system-pagination .page-dots {
    background: transparent !important;
    border-color: transparent !important;
    color: #6b7280 !important;
}

/* Statistik Kreisdiagramme */
.stats-donut-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
@media (max-width: 800px) {
    .stats-donut-grid {
        grid-template-columns: 1fr !important;
    }
}
.donut-panel {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}
.donut-wrap {
    display: flex !important;
    justify-content: center !important;
    margin: 12px 0 14px !important;
}
.donut-chart {
    --success: 0;
    --declined: 0;
    width: 180px !important;
    height: 180px !important;
    border-radius: 50% !important;
    background: conic-gradient(
        #16a34a 0 calc(var(--success) * 1%),
        #ef4444 calc(var(--success) * 1%) calc((var(--success) + var(--declined)) * 1%),
        #e5e7eb 0
    ) !important;
    display: grid !important;
    place-items: center !important;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,0.06) !important;
}
.donut-center {
    width: 112px !important;
    height: 112px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 8px 18px rgba(15,23,42,0.10) !important;
}
.donut-center strong {
    font-size: 34px !important;
    line-height: 1 !important;
    color: #111827 !important;
}
.donut-center span {
    margin-top: 4px !important;
    font-size: 13px !important;
    color: #6b7280 !important;
}
.donut-legend {
    justify-content: center !important;
}

/* Logs-Bereich: Logins + Blocklist nebeneinander */
.system-layout {
    max-width: 1200px !important;
    margin: 14px auto 30px !important;
    padding: 0 16px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: start !important;
}
.system-card {
    margin: 0 !important;
    width: 100% !important;
}
@media (max-width: 900px) {
    .system-layout {
        grid-template-columns: 1fr !important;
    }
}

/* Fix: Statistik Vertragsverlängerungen - Donut-Panels nebeneinander */
.stats-dashboard-grid.stats-donut-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch !important;
}

.stats-dashboard-grid.stats-donut-grid .stat-panel.donut-panel {
    width: 100% !important;
    min-width: 0 !important;
}

@media (max-width: 700px) {
    .stats-dashboard-grid.stats-donut-grid {
        grid-template-columns: 1fr !important;
    }
}


/* Dashboard: Geburtstags-Aktionen nutzen dieselben kleinen Icon-Buttons wie Vertragsverlängerungen. */
.action-cell.birthday-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
}
.action-cell.birthday-actions form {
    display: inline-flex !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* Statistik Vertragsverlängerungen: Hover-Wert mittig anzeigen und Gesamtzahl kurz ausblenden */
.donut-chart {
    position: relative !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}
.donut-chart:hover {
    transform: translateY(-2px) scale(1.03) !important;
    filter: saturate(1.08) !important;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,0.06), 0 14px 28px rgba(15,23,42,0.16) !important;
}
.donut-hover-zone {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    z-index: 4 !important;
    display: block !important;
    cursor: default !important;
}
.donut-hover-success {
    right: 0 !important;
    width: 50% !important;
    border-radius: 0 999px 999px 0 !important;
}
.donut-hover-declined {
    left: 0 !important;
    width: 50% !important;
    border-radius: 999px 0 0 999px !important;
}
.donut-tooltip {
    position: absolute !important;
    z-index: 5 !important;
    top: 50% !important;
    left: 50% !important;
    min-width: 74px !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-align: center !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%, -50%) scale(0.88) !important;
    transition: opacity 0.14s ease, transform 0.14s ease !important;
    box-shadow: 0 12px 24px rgba(15,23,42,0.28) !important;
}
.donut-hover-success:hover ~ .donut-tooltip-success,
.donut-hover-success:focus ~ .donut-tooltip-success,
.donut-hover-declined:hover ~ .donut-tooltip-declined,
.donut-hover-declined:focus ~ .donut-tooltip-declined {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}
.donut-tooltip-success {
    background: #16a34a !important;
}
.donut-tooltip-declined {
    background: #ef4444 !important;
}
.donut-center {
    transition: opacity 0.14s ease, transform 0.14s ease, filter 0.14s ease !important;
}
.donut-hover-success:hover ~ .donut-center,
.donut-hover-success:focus ~ .donut-center,
.donut-hover-declined:hover ~ .donut-center,
.donut-hover-declined:focus ~ .donut-center {
    opacity: 0 !important;
    transform: scale(0.88) !important;
    filter: blur(2px) !important;
}
.donut-legend {
    display: none !important;
}


/* Finaler Fix: Donut-Hover zeigt Wert mittig und blendet Gesamtwert sicher aus */
.donut-chart {
    position: relative !important;
    overflow: visible !important;
}
.donut-chart .donut-center {
    position: relative !important;
    z-index: 5 !important;
    pointer-events: none !important;
    transition: opacity 0.12s ease, transform 0.12s ease, filter 0.12s ease !important;
}
.donut-chart .donut-hover-zone {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 50% !important;
    z-index: 20 !important;
    display: block !important;
    cursor: default !important;
    background: transparent !important;
}
.donut-chart .donut-hover-success {
    right: 0 !important;
    left: auto !important;
    border-radius: 0 999px 999px 0 !important;
}
.donut-chart .donut-hover-declined {
    left: 0 !important;
    right: auto !important;
    border-radius: 999px 0 0 999px !important;
}
.donut-chart .donut-tooltip {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    z-index: 30 !important;
    width: 118px !important;
    min-height: 74px !important;
    padding: 9px 10px !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    color: #ffffff !important;
    text-align: center !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%, -50%) scale(0.92) !important;
    transition: opacity 0.12s ease, transform 0.12s ease !important;
    box-shadow: 0 12px 24px rgba(15,23,42,0.28) !important;
}
.donut-chart .donut-tooltip strong {
    display: block !important;
    font-size: 30px !important;
    line-height: 1 !important;
    color: #ffffff !important;
}
.donut-chart .donut-tooltip span {
    display: block !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}
.donut-chart .donut-tooltip-success {
    background: #16a34a !important;
}
.donut-chart .donut-tooltip-declined {
    background: #ef4444 !important;
}
.donut-chart .donut-hover-success:hover ~ .donut-tooltip-success,
.donut-chart .donut-hover-success:focus ~ .donut-tooltip-success,
.donut-chart .donut-hover-declined:hover ~ .donut-tooltip-declined,
.donut-chart .donut-hover-declined:focus ~ .donut-tooltip-declined {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}
.donut-chart .donut-hover-success:hover ~ .donut-center,
.donut-chart .donut-hover-success:focus ~ .donut-center,
.donut-chart .donut-hover-declined:hover ~ .donut-center,
.donut-chart .donut-hover-declined:focus ~ .donut-center {
    opacity: 0 !important;
    transform: scale(0.86) !important;
    filter: blur(2px) !important;
}

/* Fix: Beim Hover Gesamtzahl ausblenden und beide Werte mittig anzeigen */
.donut-chart:hover .donut-center,
.donut-chart:focus-within .donut-center {
    opacity: 0 !important;
    transform: scale(0.86) !important;
    filter: blur(2px) !important;
}

.donut-chart:hover .donut-tooltip,
.donut-chart:focus-within .donut-tooltip {
    opacity: 1 !important;
}

.donut-chart:hover .donut-tooltip-success,
.donut-chart:focus-within .donut-tooltip-success {
    transform: translate(-50%, -88%) scale(1) !important;
}

.donut-chart:hover .donut-tooltip-declined,
.donut-chart:focus-within .donut-tooltip-declined {
    transform: translate(-50%, 12%) scale(1) !important;
}

.donut-chart .donut-tooltip-success,
.donut-chart .donut-tooltip-declined {
    width: 116px !important;
    min-height: 56px !important;
    padding: 7px 9px !important;
}

.donut-chart .donut-tooltip-success strong,
.donut-chart .donut-tooltip-declined strong {
    font-size: 24px !important;
}

.donut-chart .donut-tooltip-success span,
.donut-chart .donut-tooltip-declined span {
    font-size: 11px !important;
}

/* Final: Donut-Hover mittig im weißen Kreis, Gesamtzahl ausblenden, beide Werte kompakt anzeigen */
.donut-chart .donut-center {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    z-index: 10 !important;
}
.donut-chart:hover .donut-center,
.donut-chart:focus-within .donut-center,
.donut-chart .donut-hover-success:hover ~ .donut-center,
.donut-chart .donut-hover-success:focus ~ .donut-center,
.donut-chart .donut-hover-declined:hover ~ .donut-center,
.donut-chart .donut-hover-declined:focus ~ .donut-center {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
}
.donut-chart .donut-center strong,
.donut-chart .donut-center span {
    transition: opacity 0.12s ease, transform 0.12s ease !important;
}
.donut-chart:hover .donut-center strong,
.donut-chart:hover .donut-center span,
.donut-chart:focus-within .donut-center strong,
.donut-chart:focus-within .donut-center span {
    opacity: 0 !important;
    transform: scale(0.92) !important;
}
.donut-chart .donut-tooltip {
    top: 50% !important;
    left: 50% !important;
    width: auto !important;
    min-width: 58px !important;
    max-width: 96px !important;
    min-height: 0 !important;
    height: 32px !important;
    padding: 0 9px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 40 !important;
    box-shadow: 0 8px 18px rgba(15,23,42,0.20) !important;
}
.donut-chart .donut-tooltip strong {
    display: inline-block !important;
    font-size: clamp(15px, 2.2vw, 20px) !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    max-width: 72px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.donut-chart .donut-tooltip span {
    display: none !important;
}
.donut-chart .donut-tooltip-success strong::before {
    content: '✓ ';
}
.donut-chart .donut-tooltip-declined strong::before {
    content: '✕ ';
}
.donut-chart:hover .donut-tooltip,
.donut-chart:focus-within .donut-tooltip {
    opacity: 1 !important;
}
.donut-chart:hover .donut-tooltip-success,
.donut-chart:focus-within .donut-tooltip-success,
.donut-chart .donut-hover-success:hover ~ .donut-tooltip-success,
.donut-chart .donut-hover-success:focus ~ .donut-tooltip-success {
    transform: translate(-50%, -112%) scale(1) !important;
}
.donut-chart:hover .donut-tooltip-declined,
.donut-chart:focus-within .donut-tooltip-declined,
.donut-chart .donut-hover-declined:hover ~ .donut-tooltip-declined,
.donut-chart .donut-hover-declined:focus ~ .donut-tooltip-declined {
    transform: translate(-50%, 12%) scale(1) !important;
}
@media (max-width: 700px) {
    .donut-chart .donut-tooltip strong {
        font-size: 18px !important;
    }
}


/* Einheitlicher Button-Hover: behält die Ursprungsfarbe bei und verstärkt sie nur leicht */
.btn,
button,
input[type="submit"],
input[type="button"],
.primary-btn,
.secondary-btn,
.edit-btn,
.danger-btn,
.icon-link,
.dash-page-link,
.dash-page-next,
.pagination.customer-pagination .page-link,
.pagination.system-pagination .page-link,
a[class*="btn"],
a[class*="button"] {
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease !important;
    will-change: transform, box-shadow, filter !important;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.primary-btn:hover,
.secondary-btn:hover,
.edit-btn:hover,
.danger-btn:hover,
.icon-link:hover,
.dash-page-link:hover,
.dash-page-next:hover,
.pagination.customer-pagination .page-link:hover,
.pagination.system-pagination .page-link:hover,
a[class*="btn"]:hover,
a[class*="button"]:hover {
    transform: translateY(-1px) scale(1.025) !important;
    filter: brightness(0.96) saturate(1.08) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16) !important;
}

.btn:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active,
.primary-btn:active,
.secondary-btn:active,
.edit-btn:active,
.danger-btn:active,
.icon-link:active,
.dash-page-link:active,
.dash-page-next:active,
.pagination.customer-pagination .page-link:active,
.pagination.system-pagination .page-link:active,
a[class*="btn"]:active,
a[class*="button"]:active {
    transform: translateY(0) scale(0.99) !important;
    filter: brightness(0.92) saturate(1.04) !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12) !important;
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    button,
    input[type="submit"],
    input[type="button"],
    .primary-btn,
    .secondary-btn,
    .edit-btn,
    .danger-btn,
    .icon-link,
    .dash-page-link,
    .dash-page-next,
    .pagination.customer-pagination .page-link,
    .pagination.system-pagination .page-link,
    a[class*="btn"],
    a[class*="button"] {
        transition: none !important;
    }
}

/* Oberer Aktionspunkt auf der Termine-Seite */
.section-top-action {
    display: flex;
    justify-content: flex-start;
    margin: -4px 0 14px;
}



.section-top-action{
    display:flex;
    align-items:center;
    gap:10px;
    margin:-4px 0 14px;
}

/* Termine: Buttons und aufklappbare Bereiche über den aktuellen Terminen */
.section-top-action {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    flex-wrap: wrap;
}

.appointment-inline-panel {
    display: block;
    overflow: hidden;
    opacity: 1;
    max-height: 7000px;
    margin: 0 0 14px;
    transform: translateY(0);
    transition: max-height .32s ease, opacity .22s ease, transform .22s ease, margin .22s ease;
}

.appointment-inline-panel.collapsed {
    max-height: 0 !important;
    opacity: 0;
    margin: 0 !important;
    transform: translateY(-6px);
    pointer-events: none;
}

.appointment-toggle-btn {
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.appointment-toggle-btn:hover,
.appointment-toggle-btn.active {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 8px 18px rgba(15,23,42,0.14);
}

/* Termine: Tab-Umschaltung */
.appointment-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    flex-wrap: wrap;
}

.appointment-tab-panel {
    overflow: hidden;
    opacity: 1;
    max-height: 7000px;
    margin: 0 0 14px;
    transform: translateY(0);
    transition: max-height .32s ease, opacity .22s ease, transform .22s ease, margin .22s ease;
}

.appointment-tab-panel.collapsed {
    max-height: 0 !important;
    opacity: 0;
    margin: 0 !important;
    transform: translateY(-6px);
    pointer-events: none;
}

.appointment-tab-panel.active {
    max-height: 7000px;
    opacity: 1;
}

.appointment-tab-btn {
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s ease, color .18s ease;
}

.appointment-tab-btn:hover,
.appointment-tab-btn.active {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 8px 18px rgba(15,23,42,0.14);
}
.user-chip{display:inline-flex;align-items:center;gap:.35rem;padding:.35rem .6rem;border-radius:999px;background:#f3f4f6;font-size:.9rem;color:#374151;margin-right:.75rem}

.orange-btn {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
}
.orange-btn:hover {
    background: #d97706;
    border-color: #d97706;
    color: #ffffff;
}
.ranking-table small {
    color: #4b5563;
    line-height: 1.35;
}


.user-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:999px;background:#f59e0b;color:#fff;font-weight:700;overflow:hidden;vertical-align:middle;flex:0 0 auto}
.user-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.avatar-small{width:32px;height:32px;font-size:.85rem}
.avatar-large{width:72px;height:72px;font-size:1.4rem}
.user-chip-link{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:inherit}
.employee-name-cell,.profile-heading{display:flex;align-items:center;gap:10px}
.profile-heading{gap:14px}

.status-badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 10px;font-size:.85rem;font-weight:600;background:#eef2f7;color:#334155}
.status-ok{background:#dcfce7;color:#166534}
.status-neutral{background:#f1f5f9;color:#475569}
.user-accounts-table .action-cell{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.user-accounts-table .action-cell form{display:inline-block;margin:0}

.ranking-user-link{font-weight:700;color:#111827;text-decoration:none}.ranking-user-link:hover{text-decoration:underline}
.renewal-icon-orange{background:#f59e0b!important;color:#fff!important;border-color:#f59e0b!important}


/* Mitarbeiter-Profil: bessere Lesbarkeit und Abstände */
.employee-profile-card .employee-profile-header{align-items:flex-start;margin-bottom:14px;}
.employee-profile-name{margin:6px 0 0;font-size:18px;font-weight:700;color:#111827;line-height:1.35;}
.profile-back-row{margin-top:18px;margin-bottom:22px;}
.employee-profile-message{margin-top:18px;margin-bottom:22px;}
.employee-profile-card .subsection-title{margin-top:24px;}

/* Benachrichtigungsglocke */
.notification-bell-wrap{position:relative;display:inline-flex;align-items:center;margin-right:.75rem}
.notification-bell{position:relative;width:38px;height:38px;border:0;border-radius:999px;background:#facc15;color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:3px;cursor:pointer;font-size:1rem;line-height:1;overflow:hidden;flex:0 0 38px}
.notification-bell .fa-bell{font-size:17px;color:#fff;line-height:1}
.notification-bell:hover,.notification-bell:focus{background:#eab308;color:#fff;outline:none}
.notification-count{display:inline-flex;align-items:center;justify-content:center;min-width:8px;color:#dc2626;background:transparent;font-size:.72rem;line-height:1;font-weight:800;text-align:center;margin-left:1px}
.notification-dropdown{display:none;position:absolute;right:0;top:46px;width:340px;max-width:calc(100vw - 24px);background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 18px 45px rgba(15,23,42,.18);z-index:1000;overflow:hidden}
.notification-bell-wrap:focus-within .notification-dropdown{display:block}
.notification-dropdown:hover{display:block}
.notification-dropdown-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:12px 14px;border-bottom:1px solid #e5e7eb;background:#f9fafb}
.notification-read-form{margin:0}
.link-button{border:0;background:none;color:#2563eb;cursor:pointer;font-size:.82rem;padding:0;text-decoration:none}
.link-button:hover{text-decoration:underline}
.notification-empty{padding:16px 14px;color:#6b7280;font-size:.9rem}
.notification-list{max-height:360px;overflow:auto}
.notification-item{display:block;padding:12px 14px;border-bottom:1px solid #f1f5f9;text-decoration:none;color:#111827}
.notification-item:last-child{border-bottom:0}
.notification-item:hover{background:#f8fafc}
.notification-item.unread{background:#eff6ff}
.notification-title{display:block;font-weight:700;font-size:.9rem;margin-bottom:3px}
.notification-message{display:block;font-size:.84rem;color:#374151;line-height:1.35}
.notification-date{display:block;margin-top:5px;font-size:.75rem;color:#6b7280}


.wba-company-info {
    margin: 12px 0 18px;
    padding: 16px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f9fafb;
    line-height: 1.55;
}

.wba-company-info p {
    margin: 0 0 8px;
}

.wba-company-info address {
    margin: 8px 0;
    font-style: normal;
}

.wba-company-info a {
    color: #2563eb;
    text-decoration: none;
}

.wba-company-info a:hover {
    text-decoration: underline;
}

.wba-change-list {
    margin: 12px 0 16px 20px;
    padding: 0;
}
.wba-change-list li {
    margin: 6px 0;
}

.wba-version-history {
    display: grid;
    gap: 12px;
}

.wba-version-entry {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
}

.wba-version-entry summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wba-current-version-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    background: #16a34a;
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.2;
}

.license-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}
.license-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}
.license-status-online .license-status-dot {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}
.license-status-offline .license-status-dot {
    background: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16);
}
.license-status-unknown .license-status-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}


.wba-license-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1.2fr);
    gap: 18px;
    align-items: stretch;
}
.wba-license-key-card,
.wba-license-holder-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    padding: 14px 16px;
    line-height: 1.5;
}
.wba-license-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.wba-license-key {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
    letter-spacing: .02em;
}
.wba-license-change-btn {
    min-width: 110px;
    color: #fff;
    font-weight: 700;
}
.wba-license-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
}
.wba-license-modal.is-open {
    display: block;
}
.wba-license-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
}
.wba-license-modal-box {
    position: relative;
    width: min(430px, calc(100vw - 32px));
    margin: 12vh auto 0;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    padding: 22px;
}
.wba-license-modal-box h3 {
    margin: 0 0 8px;
}
.wba-license-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: #e5e7eb;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.wba-license-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.wba-license-form label {
    font-weight: 700;
}
.wba-license-form input[type="text"] {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 15px;
}
.wba-license-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}
@media (max-width: 760px) {
    .wba-license-layout {
        grid-template-columns: 1fr;
    }
}

/* Profilbild-Upload mit Vorschau und Zuschneiden */
.avatar-upload-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.avatar-upload-preview {
    width: 76px;
    height: 76px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f9fafb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #6b7280;
    font-size: 12px;
    text-align: center;
    flex: 0 0 auto;
}
.avatar-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.avatar-upload-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.avatar-upload-actions .btn {
    min-width: 104px;
    color: #fff;
    font-weight: 700;
}
.avatar-delete-btn {
    background: #ef4444;
}
.avatar-crop-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10010;
}
.avatar-crop-modal.is-open {
    display: block;
}
.avatar-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
}
.avatar-crop-box {
    position: relative;
    width: min(460px, calc(100vw - 32px));
    margin: 6vh auto 0;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    padding: 22px;
}
.avatar-crop-box h3 {
    margin: 0 0 8px;
}
.avatar-crop-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: #e5e7eb;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.avatar-file-picker {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.avatar-file-button {
    background: #0d6efd;
    color: #ffffff;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 18px;
    min-width: 132px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}
.avatar-file-button:hover {
    background: #0b5ed7;
}
.avatar-file-name {
    color: #374151;
    font-size: 14px;
}
.avatar-crop-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.avatar-crop-area {
    margin: 16px auto 12px;
    width: 320px;
    max-width: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
}
.avatar-crop-area canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: move;
}
.avatar-crop-zoom-label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: #374151;
}
.avatar-crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}
.avatar-crop-actions .edit-btn {
    color: #fff;
    font-weight: 700;
}
@media (max-width: 520px) {
    .avatar-crop-box { margin-top: 3vh; padding: 18px; }
    .avatar-crop-actions { justify-content: stretch; }
    .avatar-crop-actions .btn { flex: 1; }
}

/* WBA Update-Verwaltung */
.wba-updates-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.wba-check-updates-form {
    margin-top: 4px;
}
.wba-update-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}
.wba-update-entry {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
}
.wba-update-main h3 {
    margin: 8px 0 6px;
}
.wba-new-version-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #0d6efd;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}
.wba-update-patchnotes h4 {
    margin: 0 0 8px;
}
.primary-btn {
    background: #0d6efd;
    color: #ffffff;
    font-weight: 700;
}
.primary-btn:hover {
    background: #0b5ed7;
}
@media (max-width: 760px) {
    .wba-update-entry {
        grid-template-columns: 1fr;
    }
}


.wba-backup-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.wba-backup-actions form {
    margin: 0;
}
.wba-backup-actions .btn {
    white-space: nowrap;
}

/* WBA Lizenzserver Ergänzungen */
.license-admin-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.75fr);gap:18px;align-items:start}.license-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}.license-kpi{border:1px solid rgba(15,23,42,.08);border-radius:18px;padding:14px;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.06)}.license-kpi span{display:block;color:#64748b;font-size:.85rem}.license-kpi strong{display:block;font-size:1.15rem;margin-top:4px}.license-status-active{color:#15803d;font-weight:700}.license-status-inactive{color:#b91c1c;font-weight:700}.code-box{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;background:#0f172a;color:#e2e8f0;border-radius:14px;padding:12px;white-space:pre-wrap;overflow:auto}.textarea-small{min-height:88px}.danger-note{border-left:4px solid #dc2626;background:#fef2f2;padding:12px;border-radius:12px}.api-url{word-break:break-all}.small-table td,.small-table th{font-size:.9rem}.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 10px;background:#eef2ff;color:#3730a3;font-weight:700;font-size:.8rem}@media(max-width:980px){.license-admin-grid,.license-kpi-grid{grid-template-columns:1fr}}
.password-field {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.password-field .input {
    flex: 1;
    min-width: 0;
}
.password-toggle {
    border: 1px solid rgba(37, 99, 235, .25);
    background: rgba(37, 99, 235, .08);
    color: #174ea6;
    border-radius: 10px;
    padding: 0 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.password-toggle:hover {
    background: rgba(37, 99, 235, .14);
}
@media (max-width: 560px) {
    .password-field {
        flex-direction: column;
    }
    .password-toggle {
        padding: 10px 14px;
    }
}

/* Lizenzserver v35 Layout */
.app-shell{min-height:100vh;display:grid;grid-template-columns:260px minmax(0,1fr);background:#f5f5f7}.sidebar{background:#fff;border-right:1px solid #e5e7eb;padding:18px 14px;display:flex;flex-direction:column;gap:20px}.sidebar .brand{display:flex;align-items:center;gap:10px;justify-content:center;text-align:left}.brand-icon{width:44px;height:44px;border-radius:14px;background:#111827;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}.sidebar .brand span{display:block;color:#64748b;font-size:.82rem;margin-top:2px}.menu{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%}.menu .menu-link{width:100%;max-width:210px;text-align:center}.main-content{padding:24px;min-width:0}.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}.topbar h1{margin:0;font-size:1.55rem}.card-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}.card-title-row h2{margin:0}.license-action-cell{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.license-action-cell form{margin:0}.danger-btn{background:#dc2626;color:#fff}.danger-btn:hover{background:#b91c1c}.modal-backdrop{position:fixed;inset:0;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(15,23,42,.56);z-index:9999}.modal-backdrop.is-open{display:flex}.modal-card{width:min(860px,100%);max-height:calc(100vh - 48px);overflow:auto;background:#fff;border-radius:20px;padding:20px;box-shadow:0 24px 60px rgba(15,23,42,.35)}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.modal-header h2{margin:0}.modal-close{border:0;background:#e5e7eb;border-radius:999px;width:34px;height:34px;font-size:24px;line-height:1;cursor:pointer}.license-key-row{display:flex;gap:10px;align-items:stretch}.license-key-row .input{flex:1;min-width:0}.license-key-row .btn{white-space:nowrap}.checkbox-row{display:flex;align-items:center;gap:8px}.form-grid label{font-weight:600;color:#374151}.form-grid label .input,.form-grid label textarea{margin-top:4px;font-weight:400;color:#111827}@media(max-width:820px){.app-shell{grid-template-columns:1fr}.sidebar{position:static;border-right:0;border-bottom:1px solid #e5e7eb}.menu{flex-direction:row;flex-wrap:wrap}.menu .menu-link{width:auto}.main-content{padding:16px}.license-key-row{flex-direction:column}.license-action-cell{flex-direction:column;align-items:stretch}.license-action-cell .btn{width:100%;text-align:center}}


.locked-input {
    background: #f3f4f6;
    color: #4b5563;
    cursor: not-allowed;
}
.form-hint {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

/* WBA Update-Server */
.update-upload-form .form-hint {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
}
.hash-cell {
    max-width: 360px;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
}
.delete-confirm-input {
    width: 95px;
    min-width: 95px;
    padding: 7px 10px;
}
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 600;
}
.muted {
    color: #6b7280;
    font-size: 13px;
}

/* WBA Lizenzserver 1.3.0 Fix 2: horizontales Kopfmenü wie in der Demo */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f5f7;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 50;

    width: 100%;
    background: #ffffff;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;

    padding: 12px 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: left;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.sidebar .brand span {
    display: block;
    color: #64748b;
    font-size: .82rem;
    margin-top: 2px;
}

.menu {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.menu .menu-link {
    width: auto;
    min-width: 112px;
    max-width: none;
    text-align: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 14px;
}

.menu .menu-link.active {
    background: #111827;
    color: #ffffff;
}

.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 16px 28px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.topbar h1 {
    margin: 0;
    font-size: 1.55rem;
}

@media (max-width: 820px) {
    .app-shell {
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        position: static;
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
        padding: 12px 12px 14px;
    }

    .menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .menu .menu-link {
        width: auto;
        min-width: 96px;
    }

    .main-content {
        padding: 16px;
    }
}


/* WBA 1.3.0 Fix 3: echtes Logo statt Text-Icon */
.license-brand-logo {
    width: 180px;
    height: auto;
    max-height: 54px;
    display: block;
    object-fit: contain;
}

.login-logo {
    width: 180px;
    height: auto;
    max-height: 54px;
    display: block;
    object-fit: contain;
    margin: 0 auto 14px;
}

.sidebar .brand {
    min-height: 54px;
}


/* WBA 1.3.0 Fix 4: neues transparentes Logo */
.brand-logo,
.license-brand-logo,
.login-logo {
    width: 180px;
    height: 36px;
    max-width: 180px;
    max-height: 36px;
    display: block;
    object-fit: contain;
}

.login-logo {
    margin: 0 auto 14px;
}

.login-container .app-title {
    margin-top: 0;
}


/* WBA 1.3.0 Fix 5: Update-Verwaltung bearbeiten/löschen */
.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.update-edit-form {
    display: grid;
    grid-template-columns: 110px 110px minmax(220px, 1fr);
    gap: 8px;
    min-width: 520px;
}

.update-edit-form label {
    font-size: 12px;
    color: #4b5563;
}

.update-edit-form .input {
    margin-top: 4px;
}

.update-edit-form label:nth-child(6) {
    grid-column: 1 / -1;
}

.update-notes-textarea {
    min-height: 88px;
    resize: vertical;
}

.update-edit-form .primary-btn {
    grid-column: 1 / -1;
    justify-self: start;
}

/* WBA 1.3.0 Fix 6: Update-Patchnotes und Sicherheitsabfragen */
.table .update-info-cell,
.table th.update-info-head {
    min-width: 620px;
}

.update-edit-form {
    grid-template-columns: 110px 110px minmax(260px, 1fr);
    min-width: 600px;
    align-items: start;
}

.update-edit-form .update-notes-label {
    grid-column: 1 / -1;
}

.update-edit-form label:nth-child(6) {
    grid-column: auto;
}

.update-notes-textarea {
    min-height: 180px;
    max-height: 360px;
    resize: vertical;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre-wrap;
}

.update-delete-form,
.update-toggle-form {
    display: block;
    margin-bottom: 8px !important;
}

.delete-confirm-input {
    display: none;
}
