:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #1e40af;
    --primary-dark: #002b7f;
    --secondary: #334155;
    --danger: #ce1126;
    --warning: #f59e0b;
    --success: #16a34a;
    --gray: #64748b;
    --whatsapp: #128c7e;
    --romania-yellow: #fcd116;
    --shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    --sidebar-width: 250px;
}

.text-danger {
    color: var(--danger) !important;
}

.credit-limit-invalid {
    border-color: var(--danger) !important;
    outline-color: var(--danger);
}

.credits-summary-grid {
    align-items: stretch;
}

.credits-alert,
.credits-form-note {
    margin: 0 0 20px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.credits-alert strong {
    display: block;
    margin-bottom: 6px;
}

.credits-alert p {
    margin: 4px 0;
    color: var(--text);
}

.credits-alert a {
    font-weight: 800;
    color: #1d4ed8;
}

.credits-alert-danger {
    border-left: 5px solid var(--danger);
    background: #fff7f7;
}

.credits-alert-warning {
    border-left: 5px solid var(--warning);
    background: #fffbeb;
}

.credits-form-note {
    color: #1e3a8a;
    border-left: 5px solid #2563eb;
    background: #eff6ff;
    font-weight: 700;
}

.credits-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.credits-section-title p {
    margin: -8px 0 16px;
    color: var(--muted);
}

.credits-table {
    min-width: 940px;
}

.credits-consumption-table {
    min-width: 1180px;
}

.credits-row-warning {
    background: #fff7ed;
}

.credits-warning-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 24px;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #ffedd5;
    color: #9a3412;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    white-space: normal;
}

@media (max-width: 900px) {
    .credits-section-title {
        display: grid;
    }

    .credits-table-wrap {
        overflow: visible;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .credits-table,
    .credits-table thead,
    .credits-table tbody,
    .credits-table tr,
    .credits-table th,
    .credits-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .credits-table thead {
        display: none;
    }

    .credits-table tbody {
        display: grid;
        gap: 12px;
    }

    .credits-table tr {
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    }

    .credits-table td {
        display: grid;
        grid-template-columns: minmax(116px, 36%) minmax(0, 1fr);
        gap: 10px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--border);
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .credits-table td:last-child {
        border-bottom: 0;
    }

    .credits-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
        line-height: 1.35;
    }

    .credits-table .actions {
        display: grid;
    }

    .credits-table .panel-badge {
        width: fit-content;
        max-width: 100%;
        white-space: normal;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.app-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding: 22px 16px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, #0f2f72 100%);
    color: #fff;
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.16);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #fff;
    color: var(--primary-dark);
    font-size: 17px;
    font-weight: 900;
}

.sidebar-brand strong {
    display: block;
    font-size: 18px;
    line-height: 1.1;
}

.sidebar-brand small {
    display: block;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
}

.tricolor-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
}

.tricolor-strip span:nth-child(1) {
    background: #1e40af;
}

.tricolor-strip span:nth-child(2) {
    background: var(--romania-yellow);
}

.tricolor-strip span:nth-child(3) {
    background: var(--danger);
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 11px;
    border-radius: 8px;
    color: #dbeafe;
    font-weight: 800;
    line-height: 1.25;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: inset 4px 0 0 var(--romania-yellow);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.sidebar-footer {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-user-label,
.topbar-kicker {
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.sidebar-footer strong {
    color: #fff;
    font-size: 14px;
}

.sidebar-logout {
    display: inline-flex;
    justify-content: center;
    min-height: 36px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #fff;
    color: var(--primary-dark);
    font-weight: 900;
}

.app-main {
    min-width: 0;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
}

.app-topbar strong {
    display: block;
    margin-top: 3px;
    color: var(--text);
    font-size: 18px;
}

.app-topbar .topbar-kicker {
    color: var(--muted);
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--secondary);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.app-content {
    width: min(1480px, calc(100% - 48px));
    margin: 24px auto 34px;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
}

.auth-layout {
    display: grid;
    min-height: calc(100vh - 70px);
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(30, 64, 175, 0.10), rgba(252, 209, 22, 0.08)),
        var(--bg);
}

.footer {
    text-align: center;
    color: var(--muted);
    padding: 28px;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-heading h1,
.auth-panel h1 {
    margin: 0 0 6px;
    font-size: 30px;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
}

.heading-actions,
.actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-panel,
.section,
.subscription-form,
.details-grid {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-panel {
    max-width: 420px;
    margin: 60px auto;
    padding: 28px;
}

.section {
    padding: 22px;
}

.section-title h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.notification-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-notifications {
    margin-bottom: 24px;
}

.notification-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary);
    border-radius: 8px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 30px;
}

.stat-card.active {
    border-left-color: var(--success);
}

.stat-card.warning {
    border-left-color: var(--warning);
}

.stat-card.danger {
    border-left-color: var(--danger);
}

.stat-card.muted {
    border-left-color: var(--gray);
}

.stat-card.info {
    border-left-color: #2563eb;
}

.stat-card.revenue {
    border-left-color: #7c3aed;
}

.form {
    display: grid;
    gap: 16px;
}

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

label {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 11px 12px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(15, 118, 110, 0.2);
    border-color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    filter: brightness(0.97);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-secondary {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.btn-link-line {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}

.btn-link-line:hover {
    background: #d97706;
    border-color: #d97706;
    color: #fff;
    filter: none;
}

.btn-whatsapp {
    background: var(--whatsapp);
    border-color: var(--whatsapp);
    color: #fff;
}

.btn-disabled {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #64748b;
    cursor: not-allowed;
    filter: none;
}

.btn-small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
}

.filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(5, minmax(160px, 220px)) auto;
    gap: 10px;
    margin-bottom: 18px;
}

.payments-filters {
    grid-template-columns: minmax(180px, 1fr) repeat(5, minmax(130px, 180px)) auto;
}

.dashboard-payments {
    margin-bottom: 24px;
}

.dashboard-settlement {
    margin-bottom: 24px;
}

.dashboard-conclusion {
    margin-bottom: 24px;
}

.dashboard-quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.simple-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.decont-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.register-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.decont-filters {
    grid-template-columns: minmax(160px, 220px) repeat(2, minmax(140px, 180px)) auto;
}

.register-filters {
    grid-template-columns: minmax(160px, 220px) auto;
}

.client-compact-section {
    margin-bottom: 18px;
}

.compact-info-grid div {
    padding: 14px 16px;
}

.compact-stats {
    margin-bottom: 18px;
}

.settlement-message {
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-left: 5px solid #2563eb;
    border-radius: 6px;
    background: #eff6ff;
    color: #1e3a8a;
    font-weight: 700;
}

.cash-register {
    margin-bottom: 24px;
}

.period-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cash-register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.cash-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    background: #fff;
}

.cash-card h3 {
    margin: 0 0 14px;
    font-size: 20px;
}

.cash-card h4 {
    margin: 18px 0 10px;
    font-size: 16px;
}

.cash-card h5 {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--secondary);
}

.cash-summary {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary);
    border-radius: 6px;
    background: #f8fafc;
}

.cash-summary span {
    color: var(--muted);
    font-size: 14px;
}

.cash-summary strong {
    font-size: 18px;
}

.cash-report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.cash-report-header h1 {
    margin: 0 0 6px;
    font-size: 30px;
}

.cash-report-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.cash-report-panel {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.cash-period-panel {
    padding: 14px;
}

.cash-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cash-panel-heading span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.cash-panel-heading h2 {
    margin: 3px 0 0;
    font-size: 18px;
}

.cash-period-form {
    display: grid;
    grid-template-columns: minmax(170px, 210px) minmax(160px, 210px) minmax(110px, 140px) minmax(150px, 180px) minmax(150px, 180px) auto;
    gap: 10px;
    align-items: end;
}

.cash-period-form label {
    gap: 6px;
    color: var(--secondary);
    font-size: 13px;
}

.cash-period-form input,
.cash-period-form select {
    min-height: 40px;
    padding: 9px 10px;
}

.cash-main-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.cash-kpi {
    display: grid;
    gap: 8px;
    min-height: 116px;
    padding: 17px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    border-left: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.cash-kpi span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
}

.cash-kpi strong {
    align-self: end;
    font-size: 24px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.cash-income {
    border-top-color: #0f766e;
}

.cash-expense,
.cash-loss {
    border-top-color: #dc2626;
}

.cash-profit {
    border-top-color: var(--success);
}

.cash-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.cash-breakdown-list {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cash-breakdown-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fafc;
}

.cash-breakdown-list li:hover {
    background: #f1f5f9;
}

.cash-breakdown-list span {
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.35;
}

.cash-breakdown-list strong {
    white-space: nowrap;
}

.cash-transactions-wrap {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.cash-transactions-table {
    min-width: 1120px;
}

.cash-transactions-table th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.cash-transactions-table tbody tr:hover {
    background: #f8fafc;
}

.cash-transactions-table th,
.cash-transactions-table td {
    vertical-align: top;
}

.cash-transactions-table td:nth-child(3),
.cash-transactions-table td:nth-child(8) {
    white-space: normal;
    overflow-wrap: anywhere;
}

.amount-income,
.amount-expense {
    font-weight: 800;
    white-space: nowrap;
}

.amount-income {
    color: var(--success);
}

.amount-expense {
    color: var(--danger);
}

.cash-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: normal;
}

.cash-type-plata-abonament,
.cash-type-taxa-aplicatie {
    background: #ecfdf5;
    color: #047857;
}

.cash-type-cheltuiala-manuala,
.cash-type-credite-iptv,
.cash-type-cost-aplicatie {
    background: #fff7ed;
    color: #c2410c;
}

.cash-empty {
    padding: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
}

.method-totals {
    display: grid;
    gap: 12px;
}

.method-block {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.summary-list.compact li {
    padding: 8px 10px;
}

.latest-payments-title {
    margin-top: 24px;
}

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

.dashboard-columns h3 {
    margin: 0 0 12px;
    font-size: 17px;
}

.summary-list {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.summary-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fafc;
}

.explanation-list {
    display: grid;
    gap: 12px;
}

.explanation-card {
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary);
    border-radius: 8px;
    padding: 16px;
    background: #f8fafc;
}

.explanation-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.explanation-card p {
    margin: 0;
    line-height: 1.5;
    color: var(--secondary);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

th {
    background: #f8fafc;
    color: var(--secondary);
    font-size: 14px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.actions form,
.actions-row form {
    margin: 0;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.status-activ {
    background: var(--success);
}

.status-expira_curand {
    background: var(--warning);
}

.status-expirat {
    background: var(--danger);
}

.status-transformat_in_abonament {
    background: #2563eb;
}

.status-anulat {
    background: var(--gray);
}

.status-suspendat {
    background: var(--gray);
}

.status-inactiv,
.status-intrerupt {
    background: var(--gray);
}

.payment-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.payment-in_test {
    background: #2563eb;
}

.payment-paid {
    background: var(--success);
}

.payment-unpaid {
    background: var(--warning);
}

.payment-alert-cell {
    display: grid;
    gap: 8px;
    min-width: 150px;
}

.payment-alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    width: max-content;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.app-fee-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.app-fee-platit {
    background: var(--success);
}

.app-fee-neplatit {
    background: var(--warning);
    color: #422006;
}

.app-fee-disabled {
    background: var(--gray);
}

.app-fee-cell {
    min-width: 118px;
}

.alert-expired,
.alert-today {
    background: var(--danger);
}

.alert-soon {
    background: #f97316;
}

.alert-upcoming {
    background: var(--warning);
    color: #422006;
}

.alert-ok {
    background: var(--success);
}

.alert-disabled {
    background: var(--gray);
}

.days-left {
    font-weight: 800;
    white-space: nowrap;
}

.days-left-expired,
.days-left-today {
    color: var(--danger);
}

.days-left-soon {
    color: #c2410c;
}

.days-left-upcoming {
    color: #a16207;
}

.days-left-ok {
    color: var(--success);
}

.days-left-disabled {
    color: var(--gray);
}

.mac-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.mac-unique {
    background: var(--success);
}

.mac-duplicate {
    background: var(--danger);
}

.subscription-tabs {
    margin-bottom: 14px;
}

.notify-client-btn {
    justify-content: center;
    width: max-content;
    white-space: nowrap;
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.panel-tert {
    background: var(--danger);
}

.panel-propriu {
    background: #2563eb;
}

.route-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.route-direct {
    background: var(--success);
}

.route-horia {
    background: #7c3aed;
}

.route-manual {
    background: var(--secondary);
}

.inline-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.inline-filter input {
    min-height: 40px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    margin-bottom: 18px;
}

.details-grid div {
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.details-grid div:nth-child(odd) {
    border-right: 1px solid var(--border);
}

.details-grid span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 6px;
}

.details-grid strong {
    font-size: 17px;
}

.details-note {
    grid-column: 1 / -1;
}

.payment-info-section {
    margin-bottom: 18px;
}

.payment-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.payment-info-grid div {
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.payment-info-grid div:nth-child(odd) {
    border-right: 1px solid var(--border);
}

.payment-info-grid span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 6px;
}

.payment-info-grid strong {
    font-size: 17px;
}

.payment-warning {
    grid-column: 1 / -1;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-weight: 700;
}

.standalone-warning {
    margin-top: 14px;
    padding: 14px;
    border-radius: 6px;
}

.delete-impact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.delete-impact-grid article {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.delete-impact-grid span {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.delete-impact-grid strong {
    color: var(--text);
    font-size: 1.2rem;
}

.delete-warning {
    border: 1px solid #fecaca;
    background: #fff7f7;
    color: #7f1d1d;
}

.delete-confirm-form {
    margin-top: 18px;
    max-width: 720px;
}

.section-note {
    margin: 0 0 14px;
    color: var(--muted);
    font-weight: 600;
}

.investment-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.investment-kpi-grid article {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.investment-kpi-grid span,
.investment-calculation-table th {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.investment-kpi-grid strong {
    color: var(--text);
    font-size: 1.1rem;
}

.investment-calculation-table {
    margin-bottom: 18px;
}

.investment-calculation-table table {
    width: 100%;
}

.investment-calculation-table th,
.investment-calculation-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.form-wide {
    grid-column: 1 / -1;
}

.profit-withdrawal-form {
    margin: 16px 0 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.partner-profit-withdrawals-section .investment-kpi-grid {
    margin-bottom: 12px;
}

.decont-page-heading {
    gap: 18px;
    margin-bottom: 14px;
}

.decont-main-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.decont-main-actions .btn {
    white-space: nowrap;
}

.decont-filter-bar {
    align-items: end;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.decont-filter-bar label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.decont-filter-bar .btn {
    justify-self: start;
}

.decont-conclusion-card {
    position: sticky;
    top: 68px;
    z-index: 5;
    margin-bottom: 18px;
    border-color: #bfdbfe;
    box-shadow: 0 14px 38px rgba(37, 99, 235, 0.08);
}

.decont-conclusion-title {
    margin-bottom: 10px;
}

.decont-conclusion-title h2 {
    color: #1d4ed8;
}

.decont-conclusion-card .settlement-message {
    margin-bottom: 12px;
}

.decont-decision-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.decont-decision-grid article {
    display: grid;
    gap: 6px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.decont-decision-grid article.active {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.decont-decision-grid article.danger {
    border-color: #fecaca;
    background: #fff7f7;
}

.decont-decision-grid span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.decont-decision-grid strong {
    color: var(--text);
    font-size: 1.18rem;
}

.decont-accordion-list {
    display: grid;
    gap: 14px;
}

.decont-panel {
    padding: 0;
    overflow: hidden;
}

.decont-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
    list-style: none;
    background: #ffffff;
}

.decont-panel > summary::-webkit-details-marker {
    display: none;
}

.decont-panel > summary::after {
    content: "⌄";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 1rem;
}

.decont-panel[open] > summary {
    border-bottom: 1px solid var(--border);
}

.decont-panel[open] > summary::after {
    content: "⌃";
}

.decont-panel > :not(summary) {
    margin-left: 18px;
    margin-right: 18px;
}

.decont-panel > :last-child {
    margin-bottom: 18px;
}

.decont-card-group {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.decont-card-group h3 {
    margin: 0;
    color: var(--secondary);
    font-size: 0.92rem;
    font-weight: 900;
    text-transform: uppercase;
}

.decont-summary-grid {
    margin-bottom: 0;
}

.decont-summary-grid .stat-card {
    min-height: 104px;
}

.table-scroll {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.table-scroll table {
    margin: 0;
}

.table-scroll th {
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

.table-scroll th,
.table-scroll td {
    padding: 9px 10px;
    font-size: 0.82rem;
}

.table-scroll td:nth-child(4),
.table-scroll td:nth-child(5),
.table-scroll td:nth-child(6) {
    white-space: nowrap;
}

.decont-panel .section-title {
    margin-top: 16px;
}

.profit-withdrawal-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profit-withdrawal-form .form-actions {
    display: flex;
    justify-content: flex-start;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.checkbox-row input {
    width: auto;
    min-width: 18px;
    height: 18px;
}

.empty {
    margin: 0;
    color: var(--muted);
}

.log-cell {
    max-width: 280px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.flash-list {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.flash {
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 700;
}

.flash-success {
    color: #166534;
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.flash-danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.flash-warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.flash-info {
    color: #075985;
    background: #f0f9ff;
    border-color: #bae6fd;
}

.is-expired-test {
    background: #fff7ed;
}

.is-expired-test td {
    border-bottom-color: #fed7aa;
}

.quick-view-lines {
    display: grid;
    gap: 4px;
}

.quick-view-lines span {
    overflow-wrap: anywhere;
}

.subscription-form .actions-row {
    padding: 0 22px 22px;
}

@media (max-width: 1180px) {
    .cash-main-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cash-period-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .payments-filters,
    .dashboard-columns,
    .dashboard-quick-grid,
    .simple-stats-grid,
    .register-summary-grid,
    .decont-summary-grid,
    .decont-decision-grid,
    .decont-filters,
    .register-filters,
    .cash-period-form,
    .cash-main-grid,
    .cash-report-grid,
    .cash-register-grid {
        grid-template-columns: 1fr;
    }

    .notification-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .decont-conclusion-card {
        position: static;
    }

    .investment-kpi-grid,
    .profit-withdrawal-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar,
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        width: 100%;
    }

    .nav a {
        padding-left: 0;
    }

    .container {
        width: min(100% - 20px, 1180px);
        margin-top: 18px;
    }

    .stats-grid,
    .notification-stats,
    .form-grid,
    .payment-info-grid,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .notification-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .details-grid div:nth-child(odd) {
        border-right: 0;
    }

    .payment-info-grid div:nth-child(odd) {
        border-right: 0;
    }

    .page-heading h1,
    .auth-panel h1 {
        font-size: 25px;
    }

    .btn {
        width: 100%;
    }

    .actions,
    .actions-row,
    .heading-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .cash-report-header {
        flex-direction: column;
    }

    .cash-report-header h1 {
        font-size: 25px;
    }

    .cash-report-panel {
        padding: 14px;
    }

    .cash-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .cash-kpi {
        min-height: 92px;
    }

    .cash-kpi strong {
        font-size: 21px;
    }

    .cash-breakdown-list li {
        align-items: flex-start;
        flex-direction: column;
    }

    .cash-breakdown-list strong {
        white-space: normal;
    }

    .cash-transactions-wrap {
        border: 0;
        overflow: visible;
    }

    .cash-transactions-table {
        display: block;
        min-width: 0;
    }

    .cash-transactions-table thead {
        display: none;
    }

    .cash-transactions-table tbody,
    .cash-transactions-table tr,
    .cash-transactions-table td {
        display: block;
        width: 100%;
    }

    .cash-transactions-table tr {
        margin-bottom: 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }

    .cash-transactions-table td {
        display: grid;
        grid-template-columns: minmax(112px, 38%) minmax(0, 1fr);
        gap: 10px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--border);
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .cash-transactions-table td:last-child {
        border-bottom: 0;
    }

    .cash-transactions-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 800;
    }
}

/* Full width responsive layout */
body {
    overflow-x: hidden;
}

.topbar {
    padding: 14px clamp(12px, 2vw, 28px);
}

.nav {
    gap: 8px;
    justify-content: flex-end;
}

.nav a {
    padding: 8px 10px;
}

.container,
.page,
.table-card,
.table-responsive {
    width: 100%;
    max-width: none;
}

.container {
    margin: 0;
    padding: 24px clamp(12px, 2vw, 32px);
}

.section,
.subscription-form,
.auth-panel,
.details-grid {
    max-width: 100%;
}

.section {
    width: 100%;
    padding: clamp(14px, 1.4vw, 22px);
    overflow: hidden;
}

.stats-grid,
.dashboard-quick-grid,
.simple-stats-grid,
.decont-summary-grid,
.register-summary-grid,
.notification-stats {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
    min-width: 0;
    padding: clamp(14px, 1.2vw, 18px);
}

.stat-card strong {
    display: block;
    font-size: clamp(22px, 1.7vw, 30px);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.form-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.form-group-title {
    padding: 18px 22px 0;
    color: var(--secondary);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.evidence-grid {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.form-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.subscription-entry-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 18px;
    align-items: start;
}

.subscription-form-main {
    min-width: 0;
}

.subscription-live-summary {
    position: sticky;
    top: 18px;
    margin: 18px 18px 18px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.live-summary-heading {
    display: grid;
    gap: 3px;
    margin-bottom: 12px;
}

.live-summary-heading strong {
    color: var(--primary);
    font-size: 1rem;
}

.live-summary-heading span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.live-summary-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.live-summary-list div {
    display: grid;
    grid-template-columns: minmax(110px, 0.75fr) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.live-summary-list dt {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.live-summary-list dd {
    margin: 0;
    color: var(--text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.pre-save-check-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 22px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.pre-save-check-panel div {
    display: grid;
    gap: 5px;
}

.pre-save-check-panel strong {
    color: var(--primary);
    font-size: 0.9rem;
}

.pre-save-check-panel span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.devices-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.devices-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.devices-panel-heading div {
    display: grid;
    gap: 4px;
}

.devices-panel-heading strong {
    color: var(--primary);
}

.devices-panel-heading span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.device-rows {
    display: grid;
    gap: 10px;
}

.device-row {
    display: grid;
    grid-template-columns: minmax(82px, 0.55fr) minmax(155px, 1fr) minmax(130px, 0.85fr) minmax(165px, 1.05fr) minmax(150px, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    background: #ffffff;
}

.device-row label {
    min-width: 0;
}

.device-row-actions {
    display: grid;
    gap: 8px;
    align-items: center;
}

.device-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    padding: 14px;
}

.device-detail-card {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.device-detail-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.device-detail-card div span {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.device-detail-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.primary-device-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
}

.primary-device-label input {
    width: auto;
}

.form-grid > label:has(#application_id),
.form-grid > label:has(#app_name) {
    display: none;
}

.client-history-panel {
    margin: 12px 22px 0;
    padding: 14px;
    border: 1px solid #facc15;
    border-radius: 8px;
    background: #fffbeb;
    color: #422006;
}

.client-history-panel-danger {
    border-color: #ef4444;
    background: #fef2f2;
    color: #7f1d1d;
}

.client-history-panel-danger .client-history-heading strong {
    color: #b91c1c;
}

.client-history-panel[hidden] {
    display: none;
}

.client-history-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.client-history-heading strong {
    color: #1d4ed8;
}

.client-history-heading span,
.client-history-message {
    font-size: 0.92rem;
    font-weight: 700;
}

.client-history-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.client-history-item {
    display: grid;
    grid-template-columns: minmax(160px, 1.2fr) minmax(160px, 1.4fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(250, 204, 21, 0.55);
    border-radius: 8px;
    background: #ffffff;
}

.client-history-item-danger {
    border-color: #ef4444;
    background: #fff7f7;
}

.client-history-item div {
    display: grid;
    gap: 3px;
}

.client-history-source {
    width: fit-content;
    padding: 2px 7px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.client-history-item span {
    color: #64748b;
    font-size: 0.86rem;
}

.app-fee-form-grid {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.muted-field {
    opacity: 0.62;
}

.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    font-weight: 800;
}

.checkbox-label input {
    width: auto;
}

.filters {
    grid-template-columns: minmax(260px, 1fr) repeat(5, minmax(150px, 220px)) auto;
}

.payments-filters {
    grid-template-columns: minmax(220px, 1fr) repeat(5, minmax(120px, 170px)) auto;
}

.decont-filters {
    grid-template-columns: minmax(160px, 220px) repeat(2, minmax(140px, 180px)) auto;
}

.register-filters {
    grid-template-columns: minmax(160px, 220px) auto;
}

.iptv-test-filters {
    grid-template-columns: minmax(240px, 1fr) minmax(150px, 200px) minmax(150px, 200px) auto;
}

.iptv-test-form .form-grid {
    border-top: 1px solid var(--border);
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    table-layout: auto;
}

th,
td {
    max-width: 240px;
    padding: 9px 10px;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 13px;
    line-height: 1.25;
    white-space: normal;
}

td {
    font-size: 13px;
    line-height: 1.35;
}

.id-col {
    min-width: 48px;
    width: 48px;
    max-width: 64px;
    white-space: nowrap;
    text-align: center;
    overflow-wrap: normal;
    hyphens: none;
}

.actions {
    gap: 6px;
    min-width: 120px;
}

.btn-small {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
}

.payment-info-grid,
.details-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.log-cell {
    max-width: 360px;
}

.subscriptions-filters {
    grid-template-columns: minmax(280px, 1fr) minmax(150px, 190px) minmax(150px, 200px) minmax(190px, 240px) auto;
    align-items: start;
}

.advanced-filters {
    grid-column: 1 / -1;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.advanced-filters summary {
    cursor: pointer;
    padding: 10px 12px;
    color: var(--secondary);
    font-weight: 800;
}

.advanced-filters-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 260px));
    gap: 10px;
    padding: 0 12px 12px;
}

.subscriptions-table {
    min-width: 1320px;
}

.subscriptions-table th,
.subscriptions-table td {
    max-width: none;
    padding: 9px 9px;
    overflow-wrap: normal;
    hyphens: none;
}

.subscriptions-table th {
    white-space: nowrap;
}

.client-cell {
    min-width: 150px;
}

.client-cell strong {
    color: var(--secondary);
    font-size: 14px;
    line-height: 1.25;
}

.phone-cell {
    min-width: 112px;
    white-space: nowrap;
}

.subscriptions-table td:nth-child(4),
.subscriptions-table td:nth-child(5),
.subscriptions-table td:nth-child(7),
.subscriptions-table td:nth-child(8),
.subscriptions-table td:nth-child(10),
.subscriptions-table td:nth-child(12) {
    white-space: nowrap;
}

.subscription-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(64px, 1fr));
    min-width: 148px;
}

.subscription-actions form {
    grid-column: 1 / -1;
}

.subscription-actions .btn {
    justify-content: center;
    width: 100%;
}

.subscription-actions .btn-renew-subscription {
    grid-column: 1 / -1;
    white-space: nowrap;
}

.dashboard-heading {
    align-items: flex-start;
}

.dashboard-heading h1 {
    font-size: 34px;
}

.dashboard-main-grid,
.dashboard-group-grid,
.quick-actions-grid {
    display: grid;
    gap: 16px;
}

.dashboard-main-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 24px;
}

.dashboard-main-card {
    min-height: 126px;
    padding: 22px;
}

.dashboard-main-card strong {
    font-size: 28px;
    line-height: 1.2;
}

.quick-actions-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.quick-action-card {
    display: flex;
    min-height: 104px;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfdff;
    color: var(--secondary);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.quick-action-card span,
.settlement-panel span,
.dashboard-stat-group h3 {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.quick-action-card strong {
    color: var(--secondary);
    font-size: 18px;
}

.quick-action-button {
    width: 100%;
    border: 1px solid var(--border);
    text-align: left;
    cursor: pointer;
}

.quick-action-form {
    margin: 0;
}

.dashboard-actions-section,
.dashboard-app-fee-section,
.dashboard-settlement-card,
.dashboard-detail-section {
    margin-bottom: 24px;
}

.settlement-panel {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid #bfdbfe;
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    background: #eff6ff;
}

.settlement-panel strong {
    display: block;
    color: #1e3a8a;
    font-size: 18px;
    line-height: 1.45;
}

.dashboard-group-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-group-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-stat-group + .dashboard-stat-group {
    margin-top: 24px;
}

.dashboard-stat-group h3 {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.dashboard-month-filter {
    flex-wrap: wrap;
}

@media (min-width: 1400px) {
    .container {
        padding-left: 28px;
        padding-right: 28px;
    }

    th,
    td {
        padding: 9px 8px;
        font-size: 12.5px;
    }

    .actions {
        min-width: 108px;
    }
}

@media (min-width: 1800px) {
    th,
    td {
        padding: 10px 9px;
        font-size: 13px;
    }
}

@media (max-width: 1200px) {
    .dashboard-main-grid,
    .quick-actions-grid,
    .dashboard-group-grid,
    .dashboard-group-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .filters,
    .payments-filters,
    .decont-filters,
    .register-filters {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 900px;
    }

    .subscriptions-filters {
        grid-template-columns: 1fr;
    }

    .advanced-filters-grid {
        grid-template-columns: 1fr;
    }

    .subscriptions-table {
        min-width: 1240px;
    }

    th,
    td {
        padding: 8px;
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 12px 10px;
    }

    .nav {
        justify-content: flex-start;
        gap: 6px;
    }

    .nav a {
        padding: 8px 10px;
        background: #f8fafc;
    }

    .container {
        width: 100%;
        margin: 0;
        padding: 14px 10px;
    }

    .section {
        padding: 14px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .subscription-entry-layout,
    .pre-save-check-panel {
        grid-template-columns: 1fr;
    }

    .subscription-live-summary {
        position: static;
        margin: 14px;
    }

    .form-group-title {
        padding: 14px 14px 0;
    }

    .client-history-panel,
    .pre-save-check-panel {
        margin-left: 14px;
        margin-right: 14px;
    }

    .client-history-item {
        grid-template-columns: 1fr;
    }

    .devices-panel-heading {
        align-items: stretch;
        flex-direction: column;
    }

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

    .device-row-actions {
        align-items: stretch;
    }

    .btn {
        min-height: 44px;
    }

    table {
        min-width: 760px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card span {
        font-size: 13px;
    }

    .stat-card strong {
        font-size: 22px;
    }

    .dashboard-main-grid,
    .quick-actions-grid,
    .dashboard-group-grid,
    .dashboard-group-grid.compact {
        grid-template-columns: 1fr;
    }

    .dashboard-heading,
    .notification-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-main-card {
        min-height: auto;
    }
}

/* Modern sidebar layout polish */
.footer {
    display: none;
}

.page-heading {
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.page-heading h1 {
    color: var(--text);
    font-size: 32px;
    line-height: 1.15;
}

.auth-panel {
    position: relative;
    width: min(430px, 100%);
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.auth-panel::before {
    content: "";
    display: block;
    height: 5px;
    margin: -28px -28px 24px;
    background: linear-gradient(90deg, #1e40af 0 33.33%, var(--romania-yellow) 33.33% 66.66%, var(--danger) 66.66% 100%);
}

.auth-panel h1 {
    color: var(--primary-dark);
}

.auth-subtitle {
    margin: -2px 0 22px;
    color: var(--muted);
    font-weight: 700;
}

.btn {
    border-radius: 8px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-secondary {
    background: #334155;
    border-color: #334155;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.section,
.subscription-form,
.details-grid {
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.section-title h2 {
    color: var(--text);
    font-size: 20px;
}

.stat-card {
    border-radius: 8px;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-card strong {
    color: var(--text);
    line-height: 1.15;
}

.stat-card.info,
.stat-card.revenue {
    border-left-color: var(--primary);
}

.dashboard-main-grid {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
}

.dashboard-main-card {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.dashboard-profit-section {
    border-top: 4px solid var(--primary);
}

.dashboard-app-fee-section {
    border-top: 4px solid var(--romania-yellow);
}

.dashboard-settlement-card {
    border-top: 4px solid var(--danger);
}

.quick-action-card {
    border-radius: 8px;
    background: #fff;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.quick-action-card:hover {
    transform: translateY(-1px);
    border-color: #bfdbfe;
    box-shadow: 0 16px 32px rgba(30, 64, 175, 0.12);
}

.table-wrap {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

table {
    background: #fff;
}

th {
    background: #f1f5f9;
    color: #1e293b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

td {
    background: #fff;
}

tbody tr:hover td {
    background: #f8fafc;
}

.panel-propriu,
.route-direct {
    background: var(--primary);
}

.panel-tert,
.alert-expired,
.alert-today {
    background: var(--danger);
}

.alert-upcoming,
.payment-unpaid,
.app-fee-neplatit {
    background: var(--warning);
    color: #422006;
}

.status-intrerupt {
    background: #475569;
}

@media (max-width: 1180px) {
    :root {
        --sidebar-width: 220px;
    }

    .app-content {
        width: min(100% - 28px, 1480px);
    }

    .dashboard-main-grid,
    .quick-actions-grid,
    .dashboard-group-grid,
    .dashboard-group-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .app-layout {
        display: block;
    }

    .app-sidebar {
        position: relative;
        height: auto;
        max-height: none;
        border-radius: 0 0 14px 14px;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-footer {
        margin-top: 4px;
    }

    .app-topbar {
        position: relative;
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }

    .app-content {
        width: calc(100% - 20px);
        margin: 14px auto 24px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .dashboard-main-grid,
    .quick-actions-grid,
    .dashboard-group-grid,
    .dashboard-group-grid.compact,
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 2026 premium navigation refresh */
:root {
    --sidebar-width: 260px;
    --sidebar-bg: #ffffff;
    --sidebar-active: #eaf1ff;
    --sidebar-muted: #64748b;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(30, 64, 175, 0.06), transparent 34%),
        #f8fafc;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.app-layout {
    display: contents;
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    gap: 20px;
    padding: 22px 16px 18px;
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 46%, #f8fafc 100%);
    color: var(--text);
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.04);
}

.sidebar-head {
    display: grid;
    gap: 14px;
    padding: 2px 4px 6px;
}

.sidebar-brand {
    color: var(--text);
}

.brand-mark {
    width: 46px;
    height: 46px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    color: var(--primary);
    box-shadow: 0 10px 22px rgba(30, 64, 175, 0.12);
}

.sidebar-brand strong {
    color: var(--text);
    font-size: 16px;
    letter-spacing: 0;
}

.sidebar-brand small {
    color: var(--muted);
    font-size: 12px;
}

.tricolor-strip {
    height: 3px;
}

.sidebar-nav {
    display: grid;
    gap: 20px;
}

.nav-group {
    display: grid;
    gap: 7px;
}

.nav-group-label {
    padding: 0 12px;
    color: #0f172a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-group-note {
    display: block;
    margin: -3px 12px 6px;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.35;
}

.sidebar-nav a {
    position: relative;
    min-height: 48px;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.sidebar-nav a:hover {
    transform: translateX(1px);
    border-color: #dbeafe;
    background: #f8fbff;
    color: var(--primary);
}

.sidebar-nav a.active {
    border-color: #dbeafe;
    background: var(--sidebar-active);
    color: #1e40af;
    font-weight: 600;
    box-shadow: none;
}

.sidebar-nav a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    bottom: 11px;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--primary);
}

.sidebar-nav a.active::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 16px;
    width: 3px;
    height: 16px;
    border-radius: 999px;
    background: var(--warning);
}

.nav-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 0;
    background: transparent;
    color: currentColor;
    fill: currentColor;
}

.sidebar-footer {
    gap: 9px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.sidebar-user-label {
    color: #94a3b8;
}

.sidebar-footer strong {
    color: var(--text);
}

.sidebar-logout {
    align-items: center;
    gap: 8px;
    border: 1px solid #fee2e2;
    border-radius: 12px;
    background: #fff;
    color: var(--danger);
    box-shadow: 0 8px 18px rgba(206, 17, 38, 0.08);
}

.logout-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.app-main {
    background: transparent;
}

.app-topbar {
    min-height: 76px;
    padding: 16px 30px;
    background: rgba(248, 250, 252, 0.88);
}

.topbar-title {
    min-width: 0;
}

.app-topbar strong {
    font-size: 20px;
    font-weight: 900;
}

.topbar-user {
    border-color: #dbeafe;
    background: #fff;
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.mobile-menu-btn svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.sidebar-overlay {
    display: none;
}

.app-content {
    width: min(1520px, calc(100% - 42px));
}

.section,
.page-heading,
.subscription-form,
.details-grid,
.auth-panel {
    border-color: rgba(226, 232, 240, 0.72);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

.stat-card,
.quick-action-card,
.settlement-panel,
.table-wrap {
    border-color: rgba(226, 232, 240, 0.68);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.btn {
    border-radius: 11px;
}

.dashboard-main-grid,
.dashboard-group-grid,
.quick-actions-grid {
    gap: 18px;
}

.dashboard-main-card,
.dashboard-profit-section .stat-card,
.dashboard-app-fee-section .stat-card {
    border-color: transparent;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.dashboard-profit-section,
.dashboard-app-fee-section,
.dashboard-settlement-card,
.dashboard-detail-section {
    border-top: 0;
    background: rgba(255, 255, 255, 0.92);
}

.dashboard-profit-section .section-title,
.dashboard-app-fee-section .section-title,
.dashboard-settlement-card .section-title {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.68);
    margin-bottom: 16px;
}

.stat-card {
    border-left-width: 3px;
}

.audit-cell {
    min-width: 92px;
    white-space: nowrap;
}

.audit-cell span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
}

th,
td {
    padding: 8px 9px;
    font-size: 12.5px;
}

.subscriptions-table {
    min-width: 1080px;
}

.subscriptions-table th,
.subscriptions-table td {
    padding: 8px 7px;
    font-size: 12px;
}

.client-cell {
    min-width: 126px;
}

.phone-cell {
    min-width: 96px;
}

.payment-alert-cell {
    min-width: 126px;
}

.app-fee-cell {
    min-width: 96px;
}

.subscription-actions {
    min-width: 126px;
    grid-template-columns: repeat(2, minmax(56px, 1fr));
}

.payment-alert-badge,
.app-fee-badge,
.panel-badge,
.route-badge,
.status,
.payment-status,
.mac-status {
    min-height: 24px;
    padding: 4px 7px;
    border-radius: 8px;
    font-size: 11px;
}

@media (max-width: 1180px) {
    :root {
        --sidebar-width: 248px;
    }

    .subscriptions-table {
        min-width: 1060px;
    }
}

@media (max-width: 900px) {
    .app-shell {
        display: block;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: min(86vw, 310px);
        height: 100vh;
        overflow-y: auto;
        transform: translateX(-104%);
        transition: transform 0.2s ease;
        border-radius: 0 18px 18px 0;
        box-shadow: 20px 0 60px rgba(15, 23, 42, 0.22);
    }

    .app-shell.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        pointer-events: none;
        background: rgba(15, 23, 42, 0);
        transition: background 0.2s ease;
    }

    .app-shell.sidebar-open .sidebar-overlay {
        pointer-events: auto;
        background: rgba(15, 23, 42, 0.38);
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nav-group-note {
        font-size: 11px;
        line-height: 1.3;
    }

    .sidebar-nav a {
        min-height: 46px;
    }

    .app-topbar {
        position: sticky;
        top: 0;
        align-items: center;
        flex-direction: row;
        padding: 12px 14px;
    }

    .topbar-user {
        display: none;
    }

    .app-content {
        width: calc(100% - 20px);
        margin-top: 14px;
    }
}

@media (max-width: 640px) {
    .app-topbar strong {
        font-size: 17px;
    }

    .mobile-menu-btn {
        min-height: 38px;
        padding: 8px 10px;
    }

    .page-heading {
        padding: 16px;
    }

    .page-heading h1 {
        font-size: 25px;
    }

th,
td,
.subscriptions-table th,
.subscriptions-table td {
        font-size: 12px;
    }
}

.subscriptions-table-wrap {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
}

.compact-subscriptions-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.compact-subscriptions-table th,
.compact-subscriptions-table td {
    padding: 10px 9px;
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
}

.compact-subscriptions-table th {
    position: static;
    top: auto;
    z-index: auto;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    white-space: normal;
    line-height: 1.25;
    box-shadow: 0 1px 0 var(--border);
}

.compact-subscriptions-table th:nth-child(1) {
    width: 14%;
}

.compact-subscriptions-table th:nth-child(2) {
    width: 15%;
}

.compact-subscriptions-table th:nth-child(3) {
    width: 13%;
}

.compact-subscriptions-table th:nth-child(4) {
    width: 13%;
}

.compact-subscriptions-table th:nth-child(5) {
    width: 15%;
}

.compact-subscriptions-table th:nth-child(6) {
    width: 12%;
}

.compact-subscriptions-table th:nth-child(7) {
    width: 8%;
}

.compact-subscriptions-table th:nth-child(8) {
    width: 10%;
}

.compact-subscriptions-table .table-stack {
    display: grid;
    gap: 5px;
    align-content: start;
}

.compact-subscriptions-table .table-muted {
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
}

.phone-mac-cell strong,
.compact-subscriptions-table .client-cell strong,
.compact-subscriptions-table .app-panel-cell strong,
.compact-subscriptions-table .subscription-summary-cell strong,
.compact-subscriptions-table .payment-summary-cell strong {
    color: #0f172a;
    font-size: 12px;
    line-height: 1.3;
}

.phone-mac-cell .mac-line {
    color: #475569;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    line-height: 1.35;
    word-break: break-word;
}

.mac-mini {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.mac-mini-unique {
    background: #dcfce7;
    color: #166534;
}

.mac-mini-duplicate {
    background: #fee2e2;
    color: #991b1b;
}

.mac-mini-empty {
    background: #f1f5f9;
    color: #64748b;
}

.compact-subscriptions-table .payment-alert-badge,
.compact-subscriptions-table .payment-status,
.compact-subscriptions-table .status,
.compact-subscriptions-table .panel-badge,
.compact-subscriptions-table .app-fee-badge {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
}

.compact-subscriptions-table .days-left {
    width: fit-content;
    font-size: 11px;
    font-weight: 700;
}

.compact-subscriptions-table .notify-client-btn {
    width: fit-content;
    min-width: 0;
    padding: 6px 8px;
    font-size: 11px;
    white-space: normal;
}

.compact-subscriptions-table .credits-cell {
    color: #334155;
    font-weight: 700;
}

.compact-subscriptions-table .app-fee-compact {
    gap: 4px;
}

.compact-subscriptions-table .app-fee-compact strong {
    color: #0f172a;
    font-size: 12px;
    line-height: 1.3;
}

.compact-subscriptions-table .app-fee-compact .app-fee-badge {
    padding: 4px 7px;
    font-size: 10px;
    line-height: 1;
}

.compact-subscriptions-table .subscription-actions {
    display: block;
    min-width: 0;
}

.compact-subscriptions-table .subscription-actions form {
    margin: 0;
}

.compact-subscriptions-table .subscription-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 6px 7px;
    font-size: 11px;
    white-space: normal;
}

.compact-subscriptions-table .subscription-actions .btn-renew-subscription {
    white-space: nowrap;
}

.payment-method-admin-list {
    display: grid;
    gap: 10px;
}

.payment-methods-page {
    width: 100%;
    display: grid;
    gap: 18px;
}

.payment-methods-page .page-heading {
    margin-bottom: 0;
}

.payment-methods-page .section {
    margin: 0;
    padding: 18px;
}

.payment-method-add-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) minmax(160px, 0.8fr) auto;
    gap: 14px;
    align-items: end;
}

.payment-method-add-actions {
    display: flex;
    align-items: end;
}

.payment-method-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(190px, 1.2fr) minmax(130px, 0.7fr) minmax(140px, 0.75fr) minmax(130px, 0.75fr) minmax(220px, 1.35fr);
    gap: 10px;
    align-items: end;
}

.payment-method-filters label:first-child {
    font-weight: 700;
}

.payment-method-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    grid-column: 1 / -1;
}

.payment-method-admin-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
}

.payment-method-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
}

.payment-method-summary::-webkit-details-marker {
    display: none;
}

.payment-method-summary:hover {
    background: #f8fafc;
}

.payment-method-avatar {
    display: inline-flex;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #1d4ed8;
    font-weight: 800;
}

.payment-method-summary-main {
    display: grid;
    gap: 4px;
}

.payment-method-summary-main strong {
    font-size: 15px;
}

.payment-method-summary-main small,
.payment-method-summary-count {
    color: var(--muted);
    font-size: 12px;
}

.payment-method-chevron {
    font-size: 18px;
    color: var(--muted);
    transition: transform 0.15s ease;
}

.payment-method-accordion[open] .payment-method-chevron {
    transform: rotate(180deg);
}

.payment-method-expanded {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--border);
}

.payment-method-expanded-horizontal {
    align-items: stretch;
}

.payment-method-details-panel,
.payment-accounts-panel {
    padding: 14px;
}

.payment-method-details-panel {
    border-bottom: 1px solid var(--border);
    background: #fbfdff;
}

.payment-method-details-full,
.payment-accounts-full {
    width: 100%;
    min-width: 0;
}

.payment-method-details-panel h3,
.payment-accounts-panel h3 {
    margin: 0 0 10px;
    font-size: 14px;
}

.payment-method-compact-form {
    display: grid;
    gap: 10px;
}

.payment-method-horizontal-form {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    align-items: end;
}

.payment-method-wide-field {
    grid-column: span 2;
}

.payment-method-save-action,
.payment-method-status-actions {
    display: flex;
    align-items: end;
}

.payment-method-status-actions {
    margin-top: 10px;
}

.payment-method-admin-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 10px;
    align-items: end;
}

.payment-method-details-field {
    grid-column: span 2;
}

.payment-accounts-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.payment-accounts-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.payment-account-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    max-width: 100%;
}

.payment-account-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1120px;
    table-layout: fixed;
}

.payment-account-table th,
.payment-account-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    font-size: 12px;
}

.payment-account-table th {
    background: #f8fafc;
    text-align: left;
    font-weight: 700;
}

.payment-account-table th:nth-child(1),
.payment-account-table td:nth-child(1) {
    width: 78px;
}

.payment-account-table th:nth-child(2),
.payment-account-table td:nth-child(2) {
    width: 120px;
}

.payment-account-table th:nth-child(3),
.payment-account-table td:nth-child(3),
.payment-account-table th:nth-child(5),
.payment-account-table td:nth-child(5) {
    width: 210px;
}

.payment-account-table th:nth-child(4),
.payment-account-table td:nth-child(4) {
    width: 190px;
}

.payment-account-table th:nth-child(6),
.payment-account-table td:nth-child(6),
.payment-account-table th:nth-child(7),
.payment-account-table td:nth-child(7) {
    width: 90px;
}

.payment-account-table th:nth-child(8),
.payment-account-table td:nth-child(8) {
    width: 80px;
}

.payment-account-table th:nth-child(9),
.payment-account-table td:nth-child(9) {
    width: 140px;
}

.payment-account-table input,
.payment-account-table select,
.payment-account-table textarea {
    width: 100%;
    min-width: 90px;
    font-size: 12px;
}

.copy-field-group {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto;
    align-items: start;
    gap: 6px;
    min-width: 180px;
}

.copy-field-group input,
.copy-field-group textarea {
    min-width: 0;
}

.copy-field-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: #fff;
    color: #1d4ed8;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.copy-field-button:hover,
.copy-field-button:focus {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1e40af;
    outline: none;
}

.copy-field-status {
    grid-column: 1 / -1;
    min-height: 18px;
    line-height: 1;
}

.copy-success-message,
.copy-empty-message {
    display: none;
    width: fit-content;
    padding: 4px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}

.copy-status-success .copy-success-message {
    display: inline-flex;
    background: #bbf7d0;
    color: #166534;
}

.copy-status-empty .copy-empty-message {
    display: inline-flex;
    background: #fecaca;
    color: #991b1b;
}

.payment-account-row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 120px;
}

.payment-accounts-section h4 {
    margin: 0 0 10px;
    font-size: 14px;
}

.payment-account-list {
    display: grid;
    gap: 10px;
}

.payment-account-card,
.payment-account-add-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.payment-account-add-form {
    margin-top: 12px;
    background: #fff;
}

.payment-account-add-panel {
    margin-top: 12px;
    position: relative;
}

.payment-account-add-panel > summary {
    display: inline-flex;
    cursor: pointer;
    list-style: none;
}

.payment-account-add-panel > summary::-webkit-details-marker {
    display: none;
}

.payment-accounts-heading .payment-account-add-panel {
    margin-top: 0;
}

.payment-accounts-heading .payment-account-add-form {
    position: absolute;
    right: 0;
    z-index: 5;
    width: min(720px, 86vw);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.14);
}

.payment-account-add-form h4 {
    grid-column: 1 / -1;
}

.payment-account-actions {
    display: flex;
    align-items: end;
}

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

    .payment-method-filters {
        grid-template-columns: 1fr;
    }

    .payment-method-filter-actions {
        justify-content: stretch;
    }

    .payment-method-filter-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .payment-method-admin-row {
        grid-template-columns: 1fr;
    }

    .payment-method-summary {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .payment-method-summary-count {
        display: none;
    }

    .payment-method-expanded {
        grid-template-columns: 1fr;
    }

    .payment-method-details-panel {
        border-bottom: 1px solid var(--border);
    }

    .payment-method-horizontal-form {
        grid-template-columns: 1fr;
    }

    .payment-method-wide-field {
        grid-column: span 1;
    }

    .payment-accounts-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .payment-accounts-heading .payment-account-add-form {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .payment-method-details-field {
        grid-column: span 1;
    }

    .payment-account-card,
    .payment-account-add-form {
        grid-template-columns: 1fr;
    }

    .copy-field-group {
        grid-template-columns: minmax(0, 1fr) auto;
        min-width: 0;
    }
}

.user-name-badge {
    font-weight: 700;
}

.user-cristi {
    color: #1d4ed8;
}

.user-florentina {
    color: #dc2626;
}

.user-generic {
    color: #111827;
}

.selected-payment-owner-preview {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.payment-method-label {
    white-space: normal;
}

.subscription-action-menu {
    position: relative;
}

.subscription-action-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--secondary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    list-style: none;
}

.subscription-action-menu summary::-webkit-details-marker {
    display: none;
}

.subscription-action-menu[open] summary {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
}

.subscription-action-list {
    position: static;
    display: grid;
    gap: 6px;
    min-width: 0;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.modal-open {
    overflow: hidden;
}

.quick-view-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.quick-view-modal.is-open {
    display: flex;
}

.quick-view-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(4px);
}

.quick-view-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(900px, calc(100vw - 32px));
    max-height: min(86vh, 820px);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.26);
}

.quick-view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.quick-view-kicker {
    display: block;
    margin-bottom: 5px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quick-view-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.15;
}

.quick-view-header p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.quick-view-close {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #0f172a;
    cursor: pointer;
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
}

.quick-view-close:hover {
    background: #e2e8f0;
}

.quick-view-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    overflow: auto;
    padding: 18px 24px 22px;
    background: #f8fafc;
}

.quick-view-section {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 14px;
}

.quick-view-section h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.quick-view-section dl {
    display: grid;
    gap: 9px;
    margin: 0;
}

.quick-view-item {
    display: grid;
    grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.quick-view-item dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.quick-view-item dd {
    margin: 0;
    min-width: 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.quick-view-badge {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.quick-view-badge-activ,
.quick-view-badge-ok,
.quick-view-badge-paid,
.quick-view-badge-platit,
.quick-view-badge-unique {
    background: #dcfce7;
    color: #166534;
}

.quick-view-badge-expirat,
.quick-view-badge-expired,
.quick-view-badge-today,
.quick-view-badge-unpaid,
.quick-view-badge-neplatit,
.quick-view-badge-duplicate {
    background: #fee2e2;
    color: #991b1b;
}

.quick-view-badge-soon {
    background: #ffedd5;
    color: #9a3412;
}

.quick-view-badge-upcoming {
    background: #fef9c3;
    color: #854d0e;
}

.quick-view-badge-intrerupt,
.quick-view-badge-disabled {
    background: #e2e8f0;
    color: #475569;
}

.quick-view-loading,
.quick-view-error {
    grid-column: 1 / -1;
    margin: 0;
    color: #475569;
    font-weight: 700;
}

.quick-view-error {
    color: #991b1b;
}

.quick-view-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.quick-view-actions form {
    margin: 0;
}

.quick-view-actions .btn,
.quick-view-actions form .btn {
    min-height: 40px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .compact-subscriptions-table {
        display: block;
        min-width: 0 !important;
    }

    .subscriptions-table-wrap {
        max-height: none;
        overflow-x: visible;
        overflow-y: visible;
    }

    .compact-subscriptions-table thead {
        display: none;
    }

    .compact-subscriptions-table tbody {
        display: grid;
        gap: 14px;
    }

    .compact-subscriptions-table tr {
        display: grid;
        gap: 0;
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .compact-subscriptions-table td {
        display: grid;
        grid-template-columns: minmax(118px, 34%) minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        padding: 11px 12px;
        border-bottom: 1px solid var(--border);
    }

    .compact-subscriptions-table td:last-child {
        border-bottom: 0;
    }

    .compact-subscriptions-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
        line-height: 1.35;
    }

    .compact-subscriptions-table .subscription-actions {
        display: grid;
    }

    .subscription-action-menu summary {
        max-width: 220px;
    }

    .subscription-action-list {
        max-width: 220px;
    }

    .quick-view-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .quick-view-dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 18px 18px 12px 12px;
    }

    .quick-view-header {
        padding: 18px 18px 14px;
    }

    .quick-view-header h2 {
        font-size: 21px;
    }

    .quick-view-body {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .quick-view-item {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .quick-view-actions {
        display: grid;
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .quick-view-actions .btn,
    .quick-view-actions form .btn {
        width: 100%;
    }
}

/* Business control dashboard */
.dashboard-control {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-control-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.dashboard-breadcrumb {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 12px;
    border-radius: 9px;
    background: #fff7ed;
    color: #f97316;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-control-head h1 {
    margin: 10px 0 4px;
    color: #0f172a;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.05;
}

.dashboard-control-head p,
.chart-panel .section-title p {
    margin: 0;
    color: var(--muted);
    font-weight: 500;
}

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-hero span,
.priority-card span,
.financial-summary-grid span,
.secondary-kpi-list span {
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.dashboard-hero strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1;
}

.dashboard-hero p {
    margin: 10px 0 0;
    color: #f97316;
    font-size: 18px;
    font-weight: 800;
}

.dashboard-hero-bar {
    height: 40px;
    overflow: hidden;
    border-radius: 7px;
    background: linear-gradient(90deg, #27145a 0 2%, #f97316 2% 100%);
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.16);
}

.dashboard-hero-bar span {
    display: block;
    width: 68%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent);
}

.dashboard-period-filter {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.dashboard-period-filter label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-period-filter input {
    min-height: 40px;
    min-width: 130px;
}

.dashboard-priority-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.priority-card {
    min-height: 150px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.75);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.06);
}

.priority-card strong {
    display: block;
    margin: 12px 0 10px;
    color: #0f172a;
    font-size: clamp(32px, 3vw, 46px);
    line-height: 1;
}

.priority-card small {
    color: var(--muted);
    font-weight: 600;
}

.priority-blue {
    background: linear-gradient(150deg, #ffffff, #eff6ff);
}

.priority-orange {
    background: linear-gradient(150deg, #ffffff, #fff7ed);
}

.priority-green {
    background: linear-gradient(150deg, #ffffff, #ecfdf5);
}

.dashboard-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 24px;
    align-items: start;
}

.dashboard-left-column,
.dashboard-side-column {
    display: grid;
    gap: 24px;
}

.dashboard-panel {
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.75);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.055);
}

.chart-panel {
    min-height: 450px;
}

.finance-chart {
    margin-top: 16px;
}

.finance-chart svg {
    width: 100%;
    min-height: 300px;
    overflow: visible;
}

.chart-grid line {
    stroke: #e5e7eb;
    stroke-width: 1;
}

.chart-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 6;
}

.chart-income {
    stroke: #f97316;
}

.chart-expenses {
    stroke: #60a5fa;
}

.chart-profit {
    stroke: #7c3aed;
}

.chart-labels text {
    fill: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.chart-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.legend-income {
    background: #f97316;
}

.legend-expenses {
    background: #60a5fa;
}

.legend-profit {
    background: #7c3aed;
}

.financial-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.financial-summary-grid div,
.secondary-kpi-list div {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.financial-summary-grid strong,
.secondary-kpi-list strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.15;
}

.quick-action-orbs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.quick-action-orbs a,
.quick-action-orbs button {
    display: grid;
    justify-items: center;
    gap: 9px;
    width: 100%;
    min-height: 106px;
    padding: 14px 10px;
    border: 0;
    background: transparent;
    color: #120a3d;
    font: inherit;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.quick-action-orbs span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #fff;
    color: #f97316;
    font-size: 17px;
    font-weight: 900;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.075);
}

.quick-action-orbs form {
    margin: 0;
}

.secondary-kpi-list {
    display: grid;
    gap: 12px;
}

.compact-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

    .dashboard-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-control-head,
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-period-filter,
    .dashboard-period-filter label,
    .dashboard-period-filter .btn {
        width: 100%;
    }

    .dashboard-priority-grid,
    .dashboard-side-column,
    .financial-summary-grid,
    .compact-summary {
        grid-template-columns: 1fr;
    }

    .chart-line {
        stroke-width: 4;
    }
}

@media (max-width: 560px) {
    .dashboard-panel,
    .priority-card {
        padding: 18px;
        border-radius: 18px;
    }

    .quick-action-orbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .quick-action-orbs span {
        width: 58px;
        height: 58px;
    }
}

.form-inline-actions {
    display: flex;
    align-items: end;
    padding-top: 20px;
}

.iptv-test-whatsapp-btn .mobile-label {
    display: none;
}

.iptv-test-whatsapp-status {
    min-width: 175px;
}

.iptv-test-whatsapp-status strong,
.iptv-test-whatsapp-status .table-muted {
    display: block;
    margin-top: 4px;
}

.whatsapp-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.whatsapp-status-badge.is-sent {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
}

.whatsapp-status-badge.is-not-sent {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.iptv-test-whatsapp-actions {
    display: grid;
    gap: 6px;
    min-width: 155px;
}

.iptv-test-whatsapp-actions form,
.iptv-test-whatsapp-actions .btn {
    margin: 0;
}

@media (max-width: 760px) {
    .iptv-tests-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    .iptv-tests-table thead {
        display: none;
    }

    .iptv-tests-table,
    .iptv-tests-table tbody,
    .iptv-tests-table tr,
    .iptv-tests-table td {
        display: block;
        width: 100%;
    }

    .iptv-tests-table tr {
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
        overflow: hidden;
    }

    .iptv-tests-table td {
        display: grid;
        grid-template-columns: minmax(92px, 0.4fr) minmax(0, 1fr);
        gap: 10px;
        padding: 10px 12px;
        border-bottom: 1px solid #e2e8f0;
        overflow-wrap: anywhere;
    }

    .iptv-tests-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
    }

    .iptv-tests-table td:last-child {
        border-bottom: 0;
    }

    .iptv-tests-table .actions {
        grid-template-columns: 1fr;
    }

    .iptv-tests-table .actions::before {
        margin-bottom: 2px;
    }

    .iptv-tests-table .actions .btn,
    .iptv-tests-table .actions form,
    .iptv-tests-table .actions button {
        width: 100%;
    }

    .iptv-test-whatsapp-btn .desktop-label {
        display: none;
    }

    .iptv-test-whatsapp-btn .mobile-label {
        display: inline;
    }
}

/* Dashboard control panel */
.dashboard-control-panel {
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.75);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

.dashboard-control-panel .dashboard-control-head {
    align-items: center;
}

.dashboard-backup-action {
    display: grid;
    justify-items: end;
    gap: 6px;
    margin: 0;
}

.dashboard-backup-action small {
    max-width: 280px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.dashboard-control-panel h1 {
    margin: 0 0 6px;
    font-size: clamp(30px, 3vw, 42px);
}

.dashboard-primary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.control-card {
    min-height: 150px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.76);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.control-card span,
.metric-tile span,
.alert-list-card span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.control-card strong {
    display: block;
    margin: 12px 0 10px;
    color: #0f172a;
    font-size: clamp(32px, 3vw, 48px);
    line-height: 1;
}

.control-card small {
    color: #64748b;
    font-weight: 600;
}

.control-card-blue {
    border-left: 4px solid #2563eb;
    background: linear-gradient(150deg, #ffffff, #eff6ff);
}

.control-card-green {
    border-left: 4px solid #16a34a;
    background: linear-gradient(150deg, #ffffff, #ecfdf5);
}

.control-card-expense {
    border-left: 4px solid #f97316;
    background: linear-gradient(150deg, #ffffff, #fff7ed);
}

.control-card-neutral {
    border-left: 4px solid #64748b;
    background: linear-gradient(150deg, #ffffff, #f8fafc);
}

.control-card-alert {
    display: block;
    border-left: 4px solid #dc2626;
    background: linear-gradient(150deg, #ffffff, #fef2f2);
    text-decoration: none;
}

.dashboard-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.metric-tile {
    display: grid;
    gap: 8px;
    min-height: 96px;
    align-content: center;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 14px;
    background: #f8fafc;
}

.metric-tile strong {
    color: #0f172a;
    font-size: 24px;
    line-height: 1.1;
}

.metric-blue {
    border-left: 4px solid #2563eb;
}

.metric-green {
    border-left: 4px solid #16a34a;
}

.metric-yellow {
    border-left: 4px solid #f59e0b;
}

.metric-red {
    border-left: 4px solid #dc2626;
}

.metric-gray {
    border-left: 4px solid #64748b;
}

.dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-actions-grid a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
}

.dashboard-actions-grid a:hover,
.metric-tile:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.dashboard-alerts-panel {
    margin-bottom: 24px;
}

.dashboard-alert-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.alert-list-card {
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    background: #f8fafc;
}

.alert-list-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.alert-list-card ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.alert-list-card a {
    display: grid;
    gap: 3px;
    padding: 10px;
    border-radius: 10px;
    background: #fff;
}

.alert-list-card strong {
    color: #0f172a;
    font-size: 13px;
    overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
    .dashboard-primary-grid,
    .dashboard-alert-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-control-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dashboard-control-panel .dashboard-control-head {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-backup-action {
        justify-items: stretch;
        width: 100%;
    }

    .dashboard-backup-action small {
        max-width: none;
        text-align: left;
    }

    .dashboard-primary-grid,
    .dashboard-metric-grid,
    .dashboard-actions-grid,
    .dashboard-alert-grid {
        grid-template-columns: 1fr;
    }

    .control-card {
        min-height: auto;
        padding: 20px;
    }
}

/* Settings */
.settings-info-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
}

.settings-info-note strong {
    flex: 0 0 auto;
    font-weight: 900;
}

.settings-section {
    display: grid;
    gap: 16px;
}

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

.settings-inline-form,
.settings-result-panel {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.settings-summary-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 12px 0;
    padding: 0;
    list-style: none;
}

.settings-summary-list li {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.settings-summary-list span {
    color: #64748b;
    font-size: 0.85rem;
}

.settings-summary-list strong {
    color: #0f172a;
}

.settings-table-wrap {
    overflow-x: auto;
}

.settings-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.communication-templates-table {
    min-width: 1500px;
    table-layout: fixed;
}

.communication-templates-table th:nth-child(5),
.communication-templates-table td:nth-child(5) {
    width: 520px;
}

.communication-templates-table th:nth-child(6),
.communication-templates-table td:nth-child(6) {
    width: 230px;
}

.communication-save-actions,
.communication-save-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

#centru-comunicare-client .section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.communication-save-footer {
    position: sticky;
    bottom: 12px;
    z-index: 2;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
}

.communication-unsaved-indicator {
    padding: 6px 10px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 900;
}

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

.settings-table th {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.settings-table input,
.settings-table select,
.settings-table textarea,
.settings-profit-form input {
    width: 100%;
    min-width: 0;
}

.settings-table code {
    display: inline-block;
    max-width: 120px;
    overflow-wrap: anywhere;
    color: #475569;
    font-size: 12px;
}

.settings-template-payment-vars {
    display: block;
    margin-top: 6px;
}

.communication-message-cell,
.communication-delivery-cell {
    vertical-align: top;
}

.settings-text-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.settings-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 8px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #f8fafc;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.settings-editor-btn,
.settings-variable-pill {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #1f2a44;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.settings-editor-btn {
    padding: 7px 10px;
}

.settings-editor-btn:hover,
.settings-variable-pill:hover {
    border-color: #1d4ed8;
    color: #1d4ed8;
}

.settings-editor-variable-select {
    display: inline-flex;
    align-items: center;
    flex: 1 1 180px;
    gap: 6px;
    margin: 0;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    min-width: 0;
}

.settings-editor-variable-select select {
    width: 100%;
    min-width: 0;
    padding: 7px 30px 7px 10px;
    font-size: 12px;
}

.communication-message-editor textarea {
    min-height: 160px;
    resize: vertical;
    box-sizing: border-box;
}

.settings-editor-hint {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.settings-variable-details {
    max-width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.settings-variable-details summary {
    padding: 8px 10px;
    color: #475569;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.settings-variable-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
    padding: 0 10px 10px;
    box-sizing: border-box;
}

.settings-variable-pill {
    padding: 6px 9px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.settings-variable-pill-payment {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.settings-message-preview {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.settings-message-preview > span {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.settings-message-preview-body {
    min-height: 54px;
    padding: 10px;
    border-radius: 7px;
    background: #f8fafc;
    color: #1f2a44;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.settings-inline-warning {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #fed7aa;
    border-left: 4px solid #f97316;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.settings-inline-warning.is-hidden {
    display: none;
}

.communication-delivery-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.communication-delivery-settings select,
.communication-delivery-settings .settings-toggle {
    width: 100%;
    box-sizing: border-box;
}

.settings-status-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.settings-status-badge.status-active {
    background: #dcfce7;
    color: #166534;
}

.settings-status-badge.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.settings-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 96px;
    font-weight: 800;
}

.settings-toggle input {
    width: auto;
}

.settings-actions {
    display: grid;
    gap: 8px;
    min-width: 132px;
}

.settings-profit-section {
    max-width: 720px;
}

.settings-total-note {
    margin: 10px 0 0;
    color: #475569;
    font-weight: 700;
}

.settings-total-note strong {
    color: #166534;
}

.settings-total-note strong.settings-total-invalid {
    color: #b91c1c;
}

.backup-settings-section .section-title {
    align-items: flex-start;
}

.backup-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.backup-choice-card {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 18px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #fff;
}

.backup-choice-primary {
    border-color: #86efac;
    box-shadow: 0 10px 28px rgba(22, 163, 74, 0.08);
    background: #f0fdf4;
}

.backup-choice-card h3,
.backup-choice-card p,
.backup-choice-card small {
    margin: 0;
}

.backup-choice-card p,
.backup-choice-card small {
    color: #475569;
    font-weight: 700;
    line-height: 1.45;
}

.backup-create-form {
    display: grid;
    gap: 10px;
}

.backup-create-form label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.backup-create-form input {
    width: 100%;
}

.backup-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.backup-info-card {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.backup-info-card span {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.backup-info-card strong {
    color: #0f172a;
    font-size: 18px;
}

.backup-info-card p,
.backup-info-card small {
    margin: 0;
    color: #64748b;
    font-weight: 700;
    line-height: 1.4;
}

.backup-history-wrap {
    margin-top: 4px;
}

.backup-history-table td {
    vertical-align: top;
}

.backup-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.restore-verify-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 18px;
    align-items: end;
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #eff6ff;
}

.restore-verify-panel h3,
.backup-history-wrap h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 17px;
}

.restore-verify-panel p {
    margin: 0 0 8px;
    color: #475569;
    font-weight: 700;
    line-height: 1.45;
}

.restore-verify-panel strong {
    color: #9a3412;
    font-size: 13px;
}

.restore-verify-form {
    display: grid;
    gap: 10px;
}

.restore-verify-form label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.restore-verify-form input,
.restore-verify-form select {
    width: 100%;
}

.clean-reset-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #fecaca;
    border-left: 5px solid var(--danger);
    border-radius: 8px;
    background: #fff7f7;
}

.clean-reset-copy h3 {
    margin: 8px 0 6px;
    color: #0f172a;
}

.clean-reset-copy p {
    margin: 0 0 8px;
    color: #475569;
}

.clean-reset-copy strong {
    color: #991b1b;
}

.clean-reset-actions {
    display: grid;
    gap: 12px;
}

.clean-reset-actions form,
.clean-reset-form {
    display: grid;
    gap: 10px;
}

.clean-reset-status {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    background: #fff;
}

.clean-reset-status span,
.clean-reset-status small {
    color: #64748b;
}

.clean-reset-status strong {
    color: #991b1b;
}

.restore-report {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
}

.restore-report-valid {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.restore-report-partial {
    border-color: #fed7aa;
    background: #fff7ed;
}

.restore-report-invalid {
    border-color: #fecaca;
    background: #fef2f2;
}

.restore-report-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.restore-report-head h3 {
    margin: 0 0 4px;
    color: #0f172a;
}

.restore-report-head p {
    margin: 0;
    color: #475569;
    font-weight: 800;
}

.restore-report-head span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.restore-report-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.restore-report-grid div,
.restore-report-lists > div {
    min-width: 0;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
}

.restore-report-grid strong,
.restore-report-lists strong {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.restore-report-grid span,
.restore-report-lists p,
.restore-report-lists li {
    color: #0f172a;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.restore-report-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.restore-report-lists p,
.restore-report-lists ul {
    margin: 0;
}

.restore-report-lists ul {
    padding-left: 18px;
}

.alerts-heading {
    align-items: flex-start;
}

.alerts-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.alerts-summary-card,
.alert-section,
.alert-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.alerts-summary-card {
    padding: 18px;
    border-radius: 16px;
}

.alerts-summary-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.alerts-summary-card strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 34px;
    line-height: 1;
}

.alerts-filter {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(240px, 1fr) auto auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.alerts-filter label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.alert-section {
    margin-bottom: 20px;
    padding: 18px;
    border-radius: 18px;
}

.alert-section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.alert-section-head h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 20px;
}

.alert-section-head p {
    margin: 0;
    color: #64748b;
    font-weight: 600;
}

.alert-count {
    min-width: 42px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #0f172a;
    background: #f1f5f9;
    font-weight: 900;
    text-align: center;
}

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

.alert-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
}

.alert-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.alert-card-head h3 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 17px;
}

.alert-card-head p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    word-break: break-word;
}

.alert-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.alert-badge-critical {
    color: #991b1b;
    background: #fee2e2;
}

.alert-badge-warning {
    color: #9a3412;
    background: #ffedd5;
}

.alert-badge-attention {
    color: #854d0e;
    background: #fef3c7;
}

.alert-badge-info {
    color: #1d4ed8;
    background: #dbeafe;
}

.alert-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.alert-details div {
    min-width: 0;
}

.alert-details dt {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.alert-details dd {
    margin: 4px 0 0;
    color: #0f172a;
    font-weight: 800;
    word-break: break-word;
}

.alert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.alert-actions .btn {
    min-height: 36px;
}

.alert-actions form {
    margin: 0;
}

.alert-empty {
    margin: 0;
}

.alerts-all-clear {
    background: #f8fafc;
}

@media (max-width: 1100px) {
    .alerts-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .alert-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .alerts-filter,
    .alert-details {
        grid-template-columns: 1fr;
    }

    .alerts-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .alert-card-head,
    .alert-section-head {
        display: grid;
    }

    .alert-badge {
        width: max-content;
        max-width: 100%;
        white-space: normal;
    }

    .alert-actions .btn,
    .alert-actions form {
        flex: 1 1 150px;
    }

    .alert-actions form .btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .alerts-summary-grid {
        grid-template-columns: 1fr;
    }
}

.data-quality-heading {
    align-items: flex-start;
}

.data-quality-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.data-quality-summary-card,
.data-quality-section,
.data-quality-card,
.data-quality-note {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.data-quality-summary-card {
    padding: 14px;
}

.data-quality-summary-card span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.data-quality-summary-card strong {
    color: #0f172a;
    font-size: 1.65rem;
    line-height: 1;
}

.data-quality-filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

.data-quality-filter label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 700;
}

.data-quality-note {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 18px;
    color: #334155;
    background: #f8fafc;
}

.data-quality-section {
    padding: 18px;
    margin-bottom: 18px;
}

.data-quality-section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.data-quality-section-head h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 1.1rem;
}

.data-quality-section-head p {
    margin: 0;
    color: #64748b;
}

.data-quality-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 30px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 800;
}

.data-quality-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.data-quality-card {
    padding: 14px;
}

.data-quality-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.data-quality-card-head h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: #0f172a;
}

.data-quality-card-head p {
    margin: 0;
    color: #64748b;
    word-break: break-word;
}

.data-quality-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.data-quality-badge-critic {
    background: #fee2e2;
    color: #991b1b;
}

.data-quality-badge-avertizare {
    background: #fef3c7;
    color: #92400e;
}

.data-quality-badge-informativ {
    background: #e0f2fe;
    color: #075985;
}

.data-quality-details {
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
}

.data-quality-details div {
    display: grid;
    gap: 3px;
}

.data-quality-details dt {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.data-quality-details dd {
    margin: 0;
    color: #1f2937;
}

.data-quality-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.maintenance-section {
    border-color: #fde68a;
}

.maintenance-panel,
.recalculation-report {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 18px;
    align-items: start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 18px;
}

.maintenance-panel h3,
.recalculation-report h3 {
    margin: 0 0 6px;
    color: #0f172a;
}

.maintenance-panel p,
.recalculation-report p {
    margin: 0 0 8px;
    color: #475569;
}

.maintenance-panel strong {
    color: #92400e;
}

.maintenance-actions {
    display: grid;
    gap: 12px;
}

.maintenance-actions form {
    display: grid;
    gap: 10px;
}

.maintenance-confirm {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-weight: 700;
}

.recalculation-report {
    display: block;
    background: #fff;
}

.recalculation-report-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.recalculation-report-head > span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.78rem;
    font-weight: 800;
}

.recalculation-report-error .recalculation-report-head > span {
    background: #fee2e2;
    color: #991b1b;
}

.recalculation-report-preview .recalculation-report-head > span {
    background: #e0f2fe;
    color: #075985;
}

.recalculation-report-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.recalculation-report-grid div {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.recalculation-report-grid strong {
    color: #64748b;
    font-size: 0.78rem;
}

.recalculation-report-grid span {
    color: #0f172a;
    font-weight: 800;
}

.maintenance-error {
    margin-top: 12px !important;
    color: #991b1b !important;
}

.maintenance-warnings {
    margin-top: 12px;
    color: #334155;
}

.maintenance-warnings ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.auth-panel-wide {
    max-width: 860px;
}

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

.auth-grid h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.filters-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.checkbox-label input {
    width: auto !important;
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.actions-cell form {
    margin: 0;
}

.status-pill {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-weight: 800;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-muted {
    background: #e5e7eb;
    color: #374151;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-left: 6px;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.muted-row {
    color: #64748b;
    background: #f8fafc;
}

.muted-row td {
    text-decoration: none;
}

.auth-help {
    margin-top: 12px;
    color: #64748b;
    font-size: 0.9rem;
}

.auth-emergency-link {
    display: inline-flex;
    margin-top: 10px;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 700;
}

.muted-inline {
    display: inline-flex;
    margin-left: 6px;
    color: #991b1b;
    font-size: 0.78rem;
    font-weight: 800;
}

.data-table details pre {
    max-width: 520px;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 1100px) {
    .data-quality-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .data-quality-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .data-quality-summary,
    .data-quality-filter,
    .data-quality-grid {
        grid-template-columns: 1fr;
    }

    .data-quality-card-head,
    .data-quality-section-head,
    .data-quality-note {
        display: grid;
    }

    .data-quality-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .maintenance-panel,
    .recalculation-report-grid,
    .auth-grid,
    .form-grid,
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .recalculation-report-head {
        display: grid;
    }
}

@media (max-width: 760px) {
    .settings-action-grid {
        grid-template-columns: 1fr;
    }

    .settings-info-note {
        display: grid;
    }

    .backup-choice-grid,
    .backup-settings-grid {
        grid-template-columns: 1fr;
    }

    .restore-verify-panel,
    .clean-reset-panel,
    .restore-report-grid,
    .restore-report-lists {
        grid-template-columns: 1fr;
    }

    .restore-report-head {
        display: grid;
    }

    .settings-table-wrap {
        overflow: visible;
    }

    .settings-table,
    .settings-table thead,
    .settings-table tbody,
    .settings-table tr,
    .settings-table th,
    .settings-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .communication-templates-table {
        min-width: 0;
        table-layout: auto;
    }

    .communication-templates-table th:nth-child(5),
    .communication-templates-table td:nth-child(5),
    .communication-templates-table th:nth-child(6),
    .communication-templates-table td:nth-child(6) {
        width: 100%;
    }

    .settings-table thead {
        display: none;
    }

    .settings-table tr {
        margin-bottom: 14px;
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #fff;
    }

    .settings-table td {
        display: grid;
        gap: 6px;
        padding: 8px 0;
        border-bottom: 0;
    }

    .settings-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .settings-actions {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .settings-text-editor {
        min-width: 0;
    }

    .settings-editor-toolbar {
        align-items: stretch;
    }

    .settings-editor-btn,
    .settings-editor-variable-select,
    .settings-editor-variable-select select {
        width: 100%;
    }

    .settings-editor-variable-select {
        display: grid;
    }
}
.panel-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.panel-admin-card {
    border: 1px solid var(--border-color, #dfe5ec);
    border-radius: 14px;
    padding: 18px;
    background: #fff;
}

.panel-admin-card.is-inactive { background: #f6f7f9; opacity: .82; }
.panel-admin-card-head,
.panel-admin-actions,
.panel-reference-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-admin-card-head h3 { margin: 4px 0 0; }
.panel-code { color: #64748b; font-size: .78rem; font-weight: 800; letter-spacing: .06em; }
.panel-reference-summary { flex-wrap: wrap; margin: 14px 0; color: #526071; font-size: .85rem; }
.toggle-label { display: flex; flex-direction: row !important; align-items: center; gap: 8px; }
.panel-own { background: #dcfce7; color: #166534; }
.panel-third-party { background: #fef3c7; color: #92400e; }
.panel-other { background: #e0e7ff; color: #3730a3; }

/* Dashboard — centru de control */
.dashboard-cc-header,
.dashboard-cc-section {
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .05);
}

.dashboard-cc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #0f2742 0%, #123d68 62%, #176b87 100%);
    color: #fff;
}

.dashboard-cc-header h1 { margin: 2px 0 6px; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.dashboard-cc-header p { margin: 0; color: #d9ecf7; }
.dashboard-cc-eyebrow { margin: 0 0 4px !important; color: #587187; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dashboard-cc-header .dashboard-cc-eyebrow { color: #8dd7e8; }

.dashboard-cc-toolbar,
.dashboard-cc-month-form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-cc-month-form label { display: block; color: #d9ecf7; font-size: .76rem; font-weight: 700; }
.dashboard-cc-month-form input { display: block; margin-top: 4px; min-height: 40px; border: 1px solid rgba(255,255,255,.35); border-radius: 9px; padding: 7px 10px; background: #fff; color: #0f2742; }
.dashboard-cc-header .btn { min-height: 40px; border-color: rgba(255,255,255,.4); }

.dashboard-cc-section { padding: 20px; margin-bottom: 18px; }
.dashboard-cc-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dashboard-cc-section-head h2 { margin: 0; color: #142536; font-size: 1.22rem; }
.dashboard-cc-section-head > a { color: #176b87; font-weight: 750; }
.dashboard-cc-section-head > span { color: #64748b; font-size: .86rem; }

.dashboard-cc-attention { border-top: 4px solid #d97706; }
.dashboard-cc-attention-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 10px; }
.dashboard-cc-alert { display: flex; flex-direction: column; gap: 5px; min-height: 112px; padding: 14px; border: 1px solid #fed7aa; border-left: 5px solid #d97706; border-radius: 12px; background: #fffaf2; color: #563317; text-decoration: none; }
.dashboard-cc-alert strong { font-size: 1.35rem; color: #9a3412; }
.dashboard-cc-alert small { color: #7c5a3b; line-height: 1.35; }
.dashboard-cc-alert-critical { border-color: #fecaca; border-left-color: #dc2626; background: #fff7f7; }
.dashboard-cc-alert-critical strong { color: #b91c1c; }
.dashboard-cc-alert-medium { border-color: #bae6fd; border-left-color: #0284c7; background: #f5fbff; }
.dashboard-cc-alert-medium strong { color: #0369a1; }
.dashboard-cc-all-clear { display: flex; flex-direction: column; gap: 5px; padding: 18px; border-radius: 12px; background: #ecfdf5; color: #166534; }

.dashboard-cc-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dashboard-cc-kpi-grid-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Clienți / Retenție — analytics read-only */
.retention-header,
.retention-meta,
.retention-shortcuts,
.retention-kpis,
.retention-filters,
.retention-filter-actions,
.retention-cohort-grid { display: flex; gap: 12px; }
.retention-header { align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.retention-header h1 { margin: 2px 0 6px; }
.retention-header p { margin: 0; color: var(--text-muted, #64748b); }
.retention-meta { flex-wrap: wrap; justify-content: flex-end; }
.retention-meta span { border: 1px solid #dbe4ef; border-radius: 999px; background: #fff; padding: 7px 11px; color: #475569; font-size: .84rem; }
.retention-shortcuts { flex-wrap: wrap; margin-bottom: 18px; }
.retention-shortcuts a { padding: 8px 13px; border-radius: 999px; border: 1px solid #d8e1ec; background: #fff; color: #334155; text-decoration: none; font-weight: 700; font-size: .88rem; }
.retention-shortcuts a:hover,
.retention-shortcuts a.active { background: #123d6a; border-color: #123d6a; color: #fff; }
.retention-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.retention-kpis article { min-height: 104px; padding: 15px; border: 1px solid #dfe7f0; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(15, 23, 42, .04); }
.retention-kpis span,
.retention-kpis small { display: block; color: #64748b; }
.retention-kpis strong { display: block; margin: 6px 0 3px; font-size: 1.65rem; color: #15395d; }
.retention-kpis .is-warning { border-color: #f5c56f; background: #fffbeb; }
.retention-kpis .is-danger { border-color: #f2aaaa; background: #fff5f5; }
.retention-kpis .is-positive { border-color: #9ad7b0; background: #f2fff7; }
.retention-panel { margin-bottom: 18px; padding: 18px; border: 1px solid #dfe7f0; border-radius: 16px; background: #fff; }
.retention-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.retention-filters label { display: grid; gap: 5px; color: #475569; font-size: .84rem; font-weight: 700; }
.retention-filters input,
.retention-filters select { width: 100%; min-height: 40px; }
.retention-filter-actions { grid-column: 1 / -1; flex-wrap: wrap; }
.retention-period-help { margin: 12px 0 0; color: #64748b; font-size: .84rem; }
.retention-table-wrap { overflow-x: auto; }
.retention-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.retention-table th { padding: 10px; border-bottom: 2px solid #d9e3ee; color: #475569; text-align: left; white-space: nowrap; }
.retention-table td { padding: 11px 10px; border-bottom: 1px solid #edf1f6; vertical-align: top; }
.retention-table td small { display: block; margin-top: 3px; color: #64748b; }
.retention-warning { color: #b45309 !important; font-weight: 800; }
.retention-status { display: inline-block; padding: 5px 8px; border-radius: 999px; background: #e8eef5; color: #334155; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.retention-status-recurent_activ,
.retention-status-reactivat { background: #dcfce7; color: #166534; }
.retention-status-expirat_in_asteptare { background: #fef3c7; color: #92400e; }
.retention-status-renuntat,
.retention-status-anulat { background: #fee2e2; color: #991b1b; }
.retention-status-identitate_ambigua { background: #ffedd5; color: #9a3412; }
.retention-cohort-grid { align-items: flex-start; }
.retention-cohort-grid > * { flex: 1 1 0; min-width: 0; }
@media (max-width: 1100px) {
    .retention-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .retention-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .retention-cohort-grid { display: block; }
}
@media (max-width: 680px) {
    .retention-header { display: block; }
    .retention-meta { justify-content: flex-start; margin-top: 10px; }
    .retention-kpis,
    .retention-filters { grid-template-columns: 1fr; }
}
.dashboard-cc-kpi { display: flex; flex-direction: column; min-height: 126px; gap: 7px; padding: 16px; border: 1px solid #dce7ef; border-top: 4px solid #176b87; border-radius: 13px; background: #f8fbfd; color: #183044; text-decoration: none; }
.dashboard-cc-kpi span { color: #52677a; font-size: .84rem; font-weight: 700; }
.dashboard-cc-kpi strong { margin-top: auto; color: #123d68; font-size: clamp(1.22rem, 2vw, 1.65rem); }
.dashboard-cc-kpi small { color: #758697; font-size: .76rem; }
.dashboard-cc-kpi-warn { border-top-color: #d97706; }
.dashboard-cc-kpi-danger { border-top-color: #dc2626; }
.dashboard-cc-kpi-positive { border-top-color: #16a34a; }
.dashboard-cc-kpi:hover, .dashboard-cc-alert:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(15,23,42,.08); }

.dashboard-cc-panel-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dashboard-cc-panel-summary > div { padding: 12px 14px; border-radius: 11px; background: #f1f6fa; }
.dashboard-cc-panel-summary span { display: block; color: #607287; font-size: .78rem; }
.dashboard-cc-panel-summary strong { display: block; margin-top: 4px; color: #183044; }
.dashboard-cc-table-wrap { overflow-x: auto; }
.dashboard-cc-table { width: 100%; border-collapse: collapse; min-width: 690px; }
.dashboard-cc-table th, .dashboard-cc-table td { padding: 12px 10px; border-bottom: 1px solid #e6edf3; text-align: right; white-space: nowrap; }
.dashboard-cc-table th { color: #64748b; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.dashboard-cc-table th:first-child, .dashboard-cc-table td:first-child { text-align: left; }
.dashboard-cc-table td:first-child a { display: flex; flex-direction: column; color: #183044; text-decoration: none; }
.dashboard-cc-table td:first-child span { color: #718096; font-size: .8rem; }
.dashboard-cc-status { display: inline-flex; padding: 4px 9px; border-radius: 99px; font-size: .75rem; font-weight: 800; }
.dashboard-cc-status-ok { background: #dcfce7; color: #166534; }
.dashboard-cc-status-warning { background: #fef3c7; color: #92400e; }
.dashboard-cc-status-critical { background: #fee2e2; color: #991b1b; }

.dashboard-cc-financial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dashboard-cc-subpanel { padding: 16px; border: 1px solid #e1e9f0; border-radius: 13px; background: #fbfdff; }
.dashboard-cc-subpanel h3 { margin: 0 0 10px; color: #183044; font-size: 1rem; }
.dashboard-cc-subpanel dl { margin: 0; }
.dashboard-cc-subpanel dl div { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px dashed #dbe4ec; }
.dashboard-cc-subpanel dt { color: #64748b; }
.dashboard-cc-subpanel dd { margin: 0; color: #183044; font-weight: 800; text-align: right; }
.dashboard-cc-subpanel .dashboard-cc-total { margin-top: 4px; border-bottom: 0; color: #0f766e; }

.dashboard-cc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dashboard-cc-stat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.dashboard-cc-stat-list > a, .dashboard-cc-stat-list > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 10px; background: #f3f7fa; color: #30495d; text-decoration: none; }
.dashboard-cc-stat-list strong { color: #123d68; font-size: 1.08rem; }

.dashboard-cc-activity-list { display: grid; }
.dashboard-cc-activity-list > a { display: grid; grid-template-columns: minmax(135px, .65fr) minmax(220px, 2fr) minmax(150px, .8fr); align-items: center; gap: 12px; padding: 11px 5px; border-bottom: 1px solid #e8eef3; color: #263d50; text-decoration: none; }
.dashboard-cc-activity-type { color: #176b87; font-size: .78rem; font-weight: 800; }
.dashboard-cc-activity-list time { color: #718096; font-size: .78rem; text-align: right; }
.dashboard-cc-backup-note { margin: 14px 0 0; color: #64748b; font-size: .8rem; }

@media (max-width: 1050px) {
    .dashboard-cc-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-cc-financial-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-cc-financial-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .dashboard-cc-header, .dashboard-cc-section-head { align-items: stretch; flex-direction: column; }
    .dashboard-cc-toolbar, .dashboard-cc-month-form { align-items: stretch; }
    .dashboard-cc-month-form input, .dashboard-cc-month-form .btn, .dashboard-cc-toolbar > .btn { width: 100%; }
    .dashboard-cc-split, .dashboard-cc-financial-grid, .dashboard-cc-panel-summary { grid-template-columns: 1fr; }
    .dashboard-cc-financial-grid > :last-child { grid-column: auto; }
    .dashboard-cc-activity-list > a { grid-template-columns: 1fr; gap: 4px; }
    .dashboard-cc-activity-list time { text-align: left; }
    .dashboard-cc-table { min-width: 0; }
    .dashboard-cc-table thead { display: none; }
    .dashboard-cc-table tbody { display: grid; gap: 12px; }
    .dashboard-cc-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 13px; border: 1px solid #e1e9f0; border-radius: 12px; background: #fbfdff; }
    .dashboard-cc-table td, .dashboard-cc-table td:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px dashed #dbe4ec; text-align: right; white-space: normal; }
    .dashboard-cc-table td::before { content: attr(data-label); color: #64748b; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
    .dashboard-cc-table td:first-child { grid-column: 1 / -1; }
    .dashboard-cc-table td:first-child a { text-align: left; }
    .dashboard-cc-table td:last-child { border-bottom: 0; }
}

@media (max-width: 480px) {
    .dashboard-cc-header, .dashboard-cc-section { padding: 15px; border-radius: 13px; }
    .dashboard-cc-kpi-grid, .dashboard-cc-stat-list { grid-template-columns: 1fr; }
    .dashboard-cc-kpi { min-height: 105px; }
    .dashboard-cc-table tr { grid-template-columns: 1fr; }
    .dashboard-cc-table td, .dashboard-cc-table td:first-child { grid-column: 1; }
}
.panel-offers-table .compact-offer-form {
    min-width: 360px;
    margin: 0;
}

.cancellation-confirmation {
    max-width: 980px;
}

.cancellation-confirmation .table-wrapper {
    margin: 1rem 0;
}

/* Export tranzactii Money Flow V2 */
.cash-report-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cash-export-details {
    position: relative;
}

.cash-export-details > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.cash-export-details > summary::-webkit-details-marker {
    display: none;
}

.cash-export-popover {
    position: absolute;
    z-index: 40;
    top: calc(100% + 10px);
    right: 0;
    width: min(440px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid #dbe5ec;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}

.cash-export-popover h2 {
    margin: 0 0 6px;
    color: #183044;
    font-size: 1.08rem;
}

.cash-export-popover > p {
    margin: 0 0 14px;
    color: #64748b;
    font-size: .84rem;
    line-height: 1.45;
}

.cash-export-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.cash-export-form label {
    display: grid;
    gap: 5px;
    color: #42566a;
    font-size: .8rem;
    font-weight: 750;
}

.cash-export-form select,
.cash-export-form input {
    width: 100%;
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid #cbd8e3;
    border-radius: 9px;
    background: #fff;
    color: #183044;
}

.cash-export-form .btn {
    grid-column: 1 / -1;
}

.cash-export-unavailable {
    padding: 10px 12px;
    border-radius: 9px;
    background: #fff7ed;
    color: #9a3412 !important;
}

@media (max-width: 620px) {
    .cash-report-actions,
    .cash-report-actions > .btn,
    .cash-export-details,
    .cash-export-details > summary {
        width: 100%;
    }

    .cash-export-popover {
        position: static;
        width: 100%;
        margin-top: 10px;
        box-shadow: none;
    }

    .cash-export-form {
        grid-template-columns: 1fr;
    }
}
