* , *::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: 240px;
    max-width: 100%;
    height: auto;
    max-height: 48px;
    display: block;
    object-fit: contain;
}

.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(470px, 520px) minmax(420px, 1fr);
    gap: 18px;
    align-items: stretch;
    justify-content: flex-start;
    max-width: 1180px;
}
.wba-license-key-card,
.wba-license-holder-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    padding: 18px;
    line-height: 1.5;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.wba-license-key-card {
    min-height: 164px;
}
.wba-license-holder-card {
    min-height: 164px;
}
.wba-license-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 7px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}
.wba-license-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 30px;
}
.wba-license-key {
    display: block;
    font-size: 17px;
    letter-spacing: .025em;
    color: #111827;
    line-height: 1.25;
    white-space: nowrap;
}
.wba-license-change-btn {
    min-width: 110px;
    height: 34px;
    padding: 6px 20px;
    color: #fff;
    font-weight: 700;
    flex: 0 0 auto;
    align-self: flex-start;
    margin-top: 18px;
}
.wba-license-meta-grid {
    display: grid;
    grid-template-columns: minmax(170px, 1.35fr) minmax(120px, 1fr) minmax(110px, 1fr);
    gap: 10px;
    margin-top: 4px;
}
.wba-license-meta-item {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 13px;
    padding: 12px;
    min-height: 78px;
}
.wba-license-meta-label {
    display: block;
    font-size: 10px;
    color: #6b7280;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .055em;
    margin-bottom: 8px;
}
.wba-license-badge,
.wba-license-update-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    border: 1px solid transparent;
    white-space: nowrap;
}
.wba-license-badge-premium {
    color: #7c2d12;
    background: #ffedd5;
    border-color: #fed7aa;
}
.wba-license-badge-plus {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #bfdbfe;
}
.wba-license-badge-basic {
    color: #065f46;
    background: #d1fae5;
    border-color: #a7f3d0;
}
.wba-license-badge-demo {
    color: #374151;
    background: #f3f4f6;
    border-color: #e5e7eb;
}
.wba-license-update-badge.is-enabled {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}
.wba-license-update-badge.is-disabled {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fecaca;
}
.wba-license-valid-until {
    display: inline-block;
    color: #111827;
    font-size: 14px;
}
.wba-license-holder-name {
    display: block;
    color: #111827;
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 7px;
}
.wba-license-holder-address {
    color: #111827;
    line-height: 1.6;
    max-width: 100%;
}
.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: 980px) {
    .wba-license-layout {
        grid-template-columns: minmax(360px, 1fr);
        max-width: 560px;
    }
    .wba-license-holder-card {
        max-width: 560px;
    }
}
@media (max-width: 760px) {
    .wba-license-layout {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .wba-license-card-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .wba-license-change-btn {
        align-self: flex-start;
        margin-top: 0;
    }
    .wba-license-key {
        white-space: normal;
    }
    .wba-license-meta-grid {
        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;
}

.inline-form { display: inline-block; margin: 0; }
.wba-license-refresh-form {
    display: inline-flex;
    margin-left: 18px;
    margin-top: 8px;
    vertical-align: middle;
}
.wba-license-refresh-btn {
    min-width: 118px;
    padding: 7px 18px;
    color: #ffffff !important;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}
.small-btn { padding: 6px 10px; font-size: 0.85rem; }

/* WBA 1.2.1: Kundenprofil - vollständiges Löschen */
.customer-delete-actions {
    align-items: center;
    flex-wrap: wrap;
}
.inline-delete-form {
    display: inline-flex;
    margin: 0;
}
.inline-delete-form .danger-btn {
    white-space: nowrap;
}

/* WBA 1.2.2: Kunden vollständig löschen - Bestätigungs-Popup */
.customer-delete-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.customer-delete-modal.is-open {
    display: flex;
}
.customer-delete-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
}
.customer-delete-modal-box {
    position: relative;
    width: min(520px, 100%);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    padding: 24px;
    z-index: 1;
}
.customer-delete-modal-box h3 {
    margin: 0 0 10px;
    color: #991b1b;
}
.customer-delete-modal-box p {
    margin: 0 0 12px;
}
.customer-delete-warning {
    font-weight: 700;
    color: #991b1b;
}
.customer-delete-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}
.customer-delete-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.customer-delete-modal .danger-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* WBA 1.2.16: Betriebssystem-Label und Lizenzinformationen-Schrift korrigiert */

.wba-system-section-row th {
    background: #f3f6fb;
    color: #1f2937;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .01em;
    padding-top: 16px;
    padding-bottom: 12px;
    border-top: 1px solid #dbe3ef;
}

.wba-resource-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 14px;
    max-width: 1180px;
}
.wba-resource-card {
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    background: #ffffff;
    padding: 15px 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.wba-resource-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .055em;
    margin-bottom: 8px;
}
.wba-resource-value {
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 8px;
}
.wba-resource-meta {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}
.wba-resource-bar {
    height: 9px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    margin: 8px 0 9px;
}
.wba-resource-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #16a34a, #2563eb);
    transition: width .25s ease;
}
.wba-resource-bar-cpu {
    position: relative;
    height: 11px;
}
.wba-resource-scale {
    display: flex;
    justify-content: space-between;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.2;
    margin-top: -3px;
    margin-bottom: 7px;
}
.wba-resource-timestamp {
    margin-top: 10px;
    font-size: 12px;
}
@media (max-width: 980px) {
    
.wba-system-section-row th {
    background: #f3f6fb;
    color: #1f2937;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .01em;
    padding-top: 16px;
    padding-bottom: 12px;
    border-top: 1px solid #dbe3ef;
}

.wba-resource-grid {
        grid-template-columns: 1fr;
    }
}

/* WBA 1.2.18: Lizenzinformationen nicht fett anzeigen */
.wba-system-subtitle {
    margin: 22px 0 12px;
    font-size: 18px;
    font-weight: 400;
    color: #0f172a;
    letter-spacing: 0;
    text-transform: none;
}

.wba-system-info-card > .table-wrapper + .wba-system-subtitle {
    padding-top: 2px;
}


/* Passwort-Anzeige im Login */
.password-field {
    position: relative;
    display: block;
    width: 100%;
}

.password-field .input {
    width: 100%;
    padding-right: 104px;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 28px;
    min-width: 86px;
    line-height: 1;
    white-space: nowrap;
    border: 0;
    border-radius: 999px;
    background: #159447;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 0 12px;
    cursor: pointer;
    box-sizing: border-box;
}

.password-toggle:hover {
    background: #0f7a39;
}


/* WBA 1.2.24 Logo/Favicon */
.top-bar-left .brand {
    min-width: 240px;
}

@media (max-width: 820px) {
    .brand-logo {
        width: 190px;
        max-height: 42px;
    }

    .top-bar-left .brand {
        min-width: 190px;
    }
}

/* WBA OS-Update- und Neustart-Funktionen */
.wba-os-update-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wba-os-update-status {
    line-height: 1.45;
}

.wba-os-update-details {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f9fafb;
    padding: 10px 12px;
}

.wba-os-update-details summary {
    cursor: pointer;
    font-weight: 700;
}

.wba-os-update-details ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

.wba-os-update-details li {
    margin-bottom: 5px;
    word-break: break-word;
}

.wba-os-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.wba-os-actions form {
    margin: 0;
}

.wba-os-hint {
    margin: 0;
    font-size: 12px;
}

.wba-os-output {
    margin: 10px 0 14px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #f8fafc;
    padding: 10px 12px;
}

.wba-os-output summary {
    cursor: pointer;
    font-weight: 700;
}

.wba-os-output pre {
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 10px 0 0;
    padding: 12px;
    border-radius: 12px;
    background: #111827;
    color: #e5e7eb;
    font-size: 12px;
}
