* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
    background:
        radial-gradient(900px 480px at 100% -8%, rgba(37, 99, 235, 0.07), transparent 60%),
        radial-gradient(760px 420px at -10% 108%, rgba(13, 148, 136, 0.06), transparent 58%),
        #f3f5fa;
    background-attachment: fixed;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

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

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr;
    transition: grid-template-columns 0.2s ease;
}

.app-shell.is-sidebar-hidden {
    grid-template-columns: 1fr;
}

.app-shell.is-sidebar-hidden .site-sidebar {
    display: none;
}

.app-topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #0b1220;
    color: #fff;
}

.app-shell.is-sidebar-hidden .app-topbar {
    display: flex;
}

.sidebar-show,
.sidebar-hide {
    width: auto;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    box-shadow: none;
}

.sidebar-hide {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.sidebar-hide:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.sidebar-show {
    background: #1d4ed8;
    color: #fff;
}

.sidebar-backdrop {
    display: none;
}

/* Sidebar */
.site-sidebar {
    background: linear-gradient(160deg, #0b1220 0%, #1e293b 55%, #1d4ed8 100%);
    color: #e2e8f0;
    padding: 28px 22px;
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.18);
}

.sidebar-inner {
    display: grid;
    gap: 26px;
    align-content: start;
    position: sticky;
    top: 0;
    min-height: calc(100vh - 56px);
}

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

.sidebar-brand h1 {
    font-size: 22px;
    margin: 0;
    color: #fff;
    letter-spacing: -0.01em;
}

.brand-eyebrow,
.section-tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #93c5fd;
    font-weight: 700;
}

.sidebar-brand p {
    color: #cbd5e1;
    font-size: 14px;
    margin: 0;
}

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

.main-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.main-nav a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: all 0.18s ease;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.main-nav a.active {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
}

.main-nav a.active::before {
    background: #1d4ed8;
    transform: scale(1.4);
}

.sidebar-note {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbeafe;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-note strong {
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Content area */
.app-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.main-content {
    padding: 32px 0 28px;
    flex: 1;
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.muted {
    color: #64748b;
    margin: 0;
}

/* Flash messages */
.flash {
    margin-bottom: 22px;
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.flash::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.flash-success {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.flash-success::before { background: #10b981; }

.flash-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.flash-error::before { background: #ef4444; }

/* Cards */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    border: 1px solid #e2e8f0;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.card-header .muted {
    font-size: 13px;
}

.card-header .muted a {
    color: #1d4ed8;
    font-weight: 600;
}

.card-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.card-header-title h3 {
    white-space: nowrap;
}

.card-header-title .action-button {
    width: auto;
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
    box-shadow: none;
}

.card-header-title .action-button .icon {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

/* Metrics */
.card-grid,
.content-grid {
    display: grid;
    gap: 18px;
    margin-top: 8px;
}

.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.content-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.metric {
    position: relative;
    padding: 22px;
}

.metric span {
    display: block;
    color: #64748b;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric strong {
    font-size: 28px;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.metric .metric-hint {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 12px;
}

/* Page toolbar (actions area) */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.page-toolbar .toolbar-info h2 {
    font-size: 20px;
    margin: 4px 0 0;
    color: #0f172a;
}

.page-toolbar .toolbar-info p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

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

/* Layout two columns: actions card + list */
.split-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    align-items: start;
}

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

.split-actions {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 14px;
}

/* Action buttons */
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 12px;
    background: #1d4ed8;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.18);
}

.action-button:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.24);
}

.action-button.secondary {
    background: #0f766e;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.2);
}

.action-button.secondary:hover {
    background: #115e59;
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.24);
}

.action-button.ghost {
    background: #fff;
    color: #1d4ed8;
    border-color: #cbd5e1;
    box-shadow: none;
}

.action-button.ghost:hover {
    background: #f1f5f9;
    color: #1e40af;
}

.action-button .icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
}

/* Modal Dialogs */
dialog.modal {
    padding: 0;
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
    width: min(640px, 90vw);
    max-height: 90vh;
    margin: auto;
}

dialog.modal::backdrop {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.close-button {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    width: auto;
    border-radius: 6px;
    transition: 0.2s;
}

.close-button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.system-modal {
    width: min(520px, 92vw);
}

.system-dialog-message {
    margin: 0;
    font-size: 15px;
    color: #334155;
    white-space: pre-line;
}

.system-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.system-dialog-actions .action-button {
    width: auto;
    min-width: 120px;
}

.action-button.danger,
button.danger {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.action-button.danger:hover,
button.danger:hover {
    background: #b91c1c;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.24);
}

/* Form */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 12px 16px;
    align-items: end;
}

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

.form-grid label {
    display: grid;
    gap: 4px;
    color: #334155;
    font-weight: 600;
    font-size: 13px;
}

input,
select,
button {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

button {
    background: #1d4ed8;
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    background: #1e40af;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

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

thead th {
    background: #f8fafc;
    color: #475569;
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}

tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #1f2937;
    vertical-align: middle;
}

.payments-table tbody td {
    vertical-align: top;
}

.payments-col-contract {
    min-width: 200px;
}

.payments-col-client {
    min-width: 160px;
}

.payments-col-team {
    min-width: 260px;
}

.payments-col-money {
    min-width: 110px;
    white-space: nowrap;
}

.payments-col-actions {
    min-width: 100px;
    white-space: nowrap;
}

.payment-team-list {
    display: grid;
    gap: 6px;
}

.payment-team-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.payment-team-name {
    font-weight: 600;
    color: #1f2937;
}

.payment-team-balance {
    color: #475569;
    font-size: 13px;
    white-space: nowrap;
}

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

.collaborators-table td:last-child,
.collaborators-table th:last-child {
    white-space: nowrap;
}

.collaborators-table {
    table-layout: fixed;
}

.collaborators-table thead th {
    vertical-align: middle;
}

.collaborators-head-text {
    text-align: left;
}

.collaborators-head-actions {
    text-align: center;
}

.collaborators-table tbody td {
    vertical-align: middle;
}

.collaborators-col-name,
.collaborators-col-text,
.collaborators-col-value {
    text-align: left;
}

.collaborators-col-access {
    text-align: left;
}

.collaborators-col-actions {
    text-align: center;
    vertical-align: middle;
}

.collaborator-meta {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.row-actions .action-button,
.row-actions form,
.row-actions form .action-button {
    width: auto;
}

.collaborator-history-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.history-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: grid;
    gap: 12px;
}

.history-panel h4 {
    margin: 0;
    font-size: 14px;
    color: #334155;
    min-height: 20px;
}

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

.history-contract-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
}

.history-contract-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.history-contract-metrics {
    display: grid;
    gap: 4px;
    font-size: 13px;
    color: #475569;
    min-width: 185px;
}

.mini-table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

@media (max-width: 960px) {
    .collaborator-history-grid {
        grid-template-columns: 1fr;
    }
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f8fafc;
}

/* Tags/pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e0f2fe;
    color: #075985;
}

.pill.success { background: #dcfce7; color: #166534; }
.pill.warning { background: #fef3c7; color: #92400e; }
.pill.muted   { background: #f1f5f9; color: #475569; }

/* Lists and steps */
.list,
.steps {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 10px;
    color: #334155;
}

.list li,
.steps li {
    line-height: 1.5;
}

/* Footer */
.site-footer {
    padding: 22px 0 28px;
    color: #64748b;
    font-size: 13px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.expense-overview {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    margin-bottom: 20px;
    align-items: stretch;
}

.expense-chart-card .card-header {
    margin-bottom: 8px;
}

.expense-bars {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    min-height: 180px;
    padding: 8px 4px 0;
}

.expense-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    height: 180px;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.expense-bar-col:hover {
    transform: none;
    background: transparent;
}

.expense-bar-col:hover .expense-bar-fill {
    background: #3b82f6;
}

.expense-bar-col.is-selected .expense-bar-fill,
.expense-bar-col.is-current .expense-bar-fill {
    background: #1d4ed8;
}

.expense-bar-col.is-selected .expense-bar-label,
.expense-bar-col.is-current .expense-bar-label {
    color: #1d4ed8;
    font-weight: 700;
}

.expense-bar-value {
    font-size: 10px;
    color: #475569;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.expense-bar-track {
    width: 100%;
    max-width: 28px;
    height: 132px;
    display: flex;
    align-items: flex-end;
    background: #f1f5f9;
    border-radius: 8px 8px 4px 4px;
    overflow: hidden;
}

.expense-bar-fill {
    width: 100%;
    min-height: 0;
    background: #93c5fd;
    border-radius: 8px 8px 4px 4px;
}

.expense-bar-label {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
}

.expenses-table {
    table-layout: fixed;
}

.expenses-table thead th,
.expenses-table tbody tr.expense-main-row td {
    white-space: nowrap;
    padding: 8px 10px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.expenses-table tbody tr.expense-details-row td {
    white-space: normal;
    overflow: visible;
}

.expenses-table .expense-name {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.expenses-table .expense-name strong,
.expenses-table .expense-name span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.expenses-table .expense-name strong {
    flex: 0 1 auto;
}

.expenses-table .expense-name span {
    flex: 1 1 auto;
}

.expenses-table .row-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
}

@media (max-width: 960px) {
    .expense-overview {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 960px) {
    .app-shell,
    .app-shell.is-sidebar-hidden {
        grid-template-columns: 1fr;
    }

    .app-topbar {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .site-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 86vw);
        z-index: 40;
        padding: 22px 18px;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        display: block;
        overflow-y: auto;
        box-shadow: 10px 0 30px rgba(15, 23, 42, 0.28);
    }

    .app-shell:not(.is-sidebar-hidden) .site-sidebar {
        transform: translateX(0);
        display: block;
    }

    .app-shell.is-sidebar-hidden .site-sidebar {
        display: block;
        transform: translateX(-105%);
    }

    .sidebar-inner {
        position: static;
        min-height: auto;
        gap: 18px;
    }

    .main-nav {
        grid-template-columns: 1fr;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 30;
        border: none;
        padding: 0;
        margin: 0;
        width: 100%;
        height: 100%;
    }

    .app-shell.is-sidebar-hidden .sidebar-backdrop,
    .sidebar-backdrop[hidden] {
        display: none;
    }

    body.has-sidebar-overlay {
        overflow: hidden;
    }

    .main-content {
        padding: 20px 0 24px;
    }

    .card-header-title {
        flex-wrap: wrap;
    }

    .expense-bars {
        overflow-x: auto;
        grid-template-columns: repeat(12, minmax(36px, 1fr));
    }
}

@media (max-width: 700px) {
    .container {
        width: min(100% - 24px, 100%);
    }

    .card,
    .page-toolbar {
        padding: 16px;
    }

    .metric strong {
        font-size: 22px;
    }

    .modal-header,
    .modal-body {
        padding: 16px;
    }

    dialog.modal {
        width: min(640px, 96vw);
    }

    .login-brand h1 {
        font-size: 24px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 6px;
    }

    .collaborators-table,
    .expenses-table {
        table-layout: auto;
    }
}

.login-body {
    min-height: 100vh;
    background: #060d1c;
    overflow-x: hidden;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    gap: 20px;
    z-index: 1;
}

.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(1100px 620px at 78% 8%, rgba(37, 99, 235, 0.32), transparent 62%),
        radial-gradient(900px 560px at 12% 88%, rgba(13, 148, 136, 0.22), transparent 60%),
        linear-gradient(155deg, #050b18 0%, #0b1730 48%, #101c3a 100%);
}

.login-bg-grid {
    position: absolute;
    inset: 42% -30% -18%;
    background-image:
        linear-gradient(rgba(147, 197, 253, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 197, 253, 0.22) 1px, transparent 1px);
    background-size: 72px 72px;
    transform: perspective(680px) rotateX(64deg);
    transform-origin: bottom center;
    mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.9) 55%, rgba(0, 0, 0, 0.35));
    -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.9) 55%, rgba(0, 0, 0, 0.35));
    animation: loginGridPan 24s linear infinite;
}

.login-bg-beam {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
    animation: loginBeam 22s ease-in-out infinite;
}

.login-bg-beam-a {
    width: 46vw;
    height: 46vw;
    top: -12vw;
    right: -8vw;
    background: rgba(59, 130, 246, 0.55);
}

.login-bg-beam-b {
    width: 38vw;
    height: 38vw;
    bottom: -14vw;
    left: -10vw;
    background: rgba(14, 165, 233, 0.4);
    animation-delay: -8s;
}

.login-bg-beam-c {
    width: 26vw;
    height: 26vw;
    top: 42%;
    left: 55%;
    background: rgba(99, 102, 241, 0.32);
    animation-delay: -15s;
}

.login-bg canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.login-bg-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 50% 45%, transparent 40%, rgba(2, 6, 20, 0.72) 100%);
}

@keyframes loginGridPan {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 720px, 0 0; }
}

@keyframes loginBeam {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.42; }
    50% { transform: translate(-4%, 6%) scale(1.14); opacity: 0.62; }
}

@media (prefers-reduced-motion: reduce) {
    .login-bg-grid,
    .login-bg-beam {
        animation: none;
    }
}

.login-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #e2e8f0;
    max-width: 460px;
}

.login-brand h1 {
    margin: 8px 0 6px;
    color: #fff;
    font-size: 30px;
    letter-spacing: -0.01em;
}

.login-brand p {
    margin: 0;
    color: #cbd5e1;
}

.login-main {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    padding: 30px 26px;
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(6px);
}

.login-card h2 {
    margin: 8px 0 8px;
    color: #0f172a;
}

.login-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.login-form label {
    display: grid;
    gap: 4px;
    color: #334155;
    font-weight: 600;
    font-size: 13px;
}

.login-shell .site-footer {
    position: relative;
    z-index: 1;
    color: #cbd5e1;
    width: min(420px, 100%);
}

.login-shell .footer-inner {
    border-top-color: rgba(226, 232, 240, 0.2);
    justify-content: center;
}

.sidebar-note .action-button.ghost {
    background: transparent;
    color: #e2e8f0;
    border-color: rgba(226, 232, 240, 0.35);
}

.sidebar-note .action-button.ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.dashboard-chart-card {
    margin-top: 18px;
    margin-bottom: 18px;
}

.dashboard-contracts-card {
    margin-top: 0;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.chart-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.dashboard-chart-wrap {
    overflow: hidden;
    max-height: 250px;
}

.dashboard-chart {
    display: block;
    width: 100%;
    height: 250px;
    max-height: 250px;
}

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

.chart-axis-label {
    fill: #94a3b8;
    font-size: 11px;
    font-family: inherit;
}
