:root {
    --color-bg: #020617;
    --color-panel: rgba(15, 23, 42, 0.9);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-card: rgba(255, 255, 255, 0.05);
    --color-text: #e2e8f0;
    --color-muted: #94a3b8;
    --color-primary: #34d399;
    --color-primary-accent: #0ea5e9;
    --radius-large: 32px;
    --radius-regular: 18px;
    --transition: 200ms ease;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Roboto', 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.18), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.2), transparent 40%),
        radial-gradient(circle at 15% 80%, rgba(52, 211, 153, 0.15), transparent 50%);
    filter: blur(3px);
    z-index: -2;
}

body::after {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.96));
    z-index: -1;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: #6ee7b7;
}

.auth-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px 64px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-height: 100vh;
}

.auth-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
    flex: 1;
}

@media (min-width: 1024px) {
    .auth-main {
        flex-direction: row;
        align-items: center;
        gap: 80px;
    }
}

.hero {
    text-align: center;
}

@media (min-width: 1024px) {
    .hero {
        width: 50%;
        text-align: left;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.05);
    font-size: 11px;
    color: var(--color-primary);
}

.badge .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    margin: 24px 0 16px;
    line-height: 1.2;
}

.hero p {
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

.hero-stats {
    margin-top: 36px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.hero-stat-card {
    padding: 28px 32px;
    border-radius: 28px;
    border: 1px solid rgba(14, 165, 233, 0.35);
    background: rgba(2, 6, 23, 0.85);
    box-shadow: 0 25px 55px rgba(2, 6, 23, 0.65);
    display: flex;
    align-items: center;
    gap: 24px;
}

.hero-stat-card--accent {
    border-color: rgba(14, 165, 233, 0.35);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.9));
}

.hero-stat-info {
    max-width: 220px;
}

.hero-stat-label {
    font-size: 1.05rem;
    color: #f8fafc;
    margin: 0;
    font-weight: 600;
}

.hero-stat-desc {
    font-size: 0.82rem;
    color: rgba(148, 163, 184, 0.7);
    margin: 10px 0 0;
    line-height: 1.4;
}

.hero-stat-figure {
    margin-left: auto;
    font-size: clamp(3.8rem, 9vw, 6rem);
    font-weight: 700;
    color: rgba(248, 250, 252, 0.16);
    line-height: 1;
}

.auth-panel {
    width: 100%;
}

@media (min-width: 1024px) {
    .auth-panel {
        width: 50%;
    }
}

.auth-card {
    background: var(--color-panel);
    border-radius: var(--radius-large);
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid var(--color-border);
    box-shadow: 0 30px 100px rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(15px);
}

.card-intro {
    margin-bottom: 32px;
}

.overline {
    font-size: 11px;
    color: var(--color-muted);
    margin: 0;
}

.card-intro .overline {
    color: var(--color-primary);
}

.overline-small {
    font-size: 10px;
}

.card-intro h2 {
    margin: 12px 0 8px;
    font-size: 2rem;
}

.card-intro span.description {
    display: block;
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.description {
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.account-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.6);
    padding: 4px;
    gap: 6px;
    margin-bottom: 28px;
}

.account-tab {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.65);
    background: transparent;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.account-tab.is-active {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(15, 118, 110, 0.4));
    color: #f8fafc;
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.client-create-card {
    border-radius: var(--radius-large);
    border: 1px solid var(--color-border);
    background: rgba(2, 6, 23, 0.75);
    box-shadow: 0 40px 80px rgba(2, 6, 23, 0.45);
    padding: clamp(24px, 4vw, 40px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.client-detail-card {
    border-radius: var(--radius-large);
    border: 1px solid var(--color-border);
    background: rgba(2, 6, 23, 0.75);
    box-shadow: 0 35px 70px rgba(2, 6, 23, 0.4);
    padding: clamp(24px, 4vw, 40px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.client-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 640px) {
    .client-detail-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.client-action-buttons {
    display: flex;
    gap: 12px;
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.action-icon svg,
.action-icon i {
    width: 20px;
    height: 20px;
    font-size: 18px;
    line-height: 1;
}

.action-icon--primary {
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(37, 99, 235, 0.2);
    color: #bfdbfe;
}

.action-icon--primary:hover {
    border-color: rgba(96, 165, 250, 0.8);
    background: rgba(37, 99, 235, 0.35);
}

.action-icon--danger {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.15);
    color: #fecaca;
}

.action-icon--danger:hover {
    border-color: rgba(248, 113, 113, 0.8);
    background: rgba(248, 113, 113, 0.3);
}

.action-icon--income {
    border-color: rgba(74, 222, 128, 0.8);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(22, 163, 74, 0.35));
    color: #bbf7d0;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1;
}

.action-icon--income:hover {
    border-color: rgba(74, 222, 128, 1);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.45), rgba(22, 163, 74, 0.45));
    color: #ecfccb;
}

.action-icon--report {
    border-color: rgba(129, 140, 248, 0.6);
    background: rgba(79, 70, 229, 0.2);
    color: #c7d2fe;
}

.action-icon--report:hover {
    border-color: rgba(129, 140, 248, 0.9);
    background: rgba(79, 70, 229, 0.35);
}

.action-icon[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    transform-origin: bottom center;
}

.action-icon[data-tooltip]:hover::after,
.action-icon[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, -2px);
}

.client-detail-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 900px) {
    .client-detail-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.detail-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-block {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.balance-text {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.balance-label {
    font-size: 0.8rem;
    color: var(--color-muted);
}

.balance-positive {
    color: #bbf7d0;
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(16, 185, 129, 0.15);
}

.balance-negative {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.6);
    background: rgba(248, 113, 113, 0.15);
}

.balance-neutral {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.text-success {
    color: #bbf7d0;
}

.text-danger {
    color: #fecaca;
}

.text-neutral {
    color: #ffffff;
}

.client-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 960px) {
    .client-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.detail-section {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-regular);
    padding: 18px;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-section h3 {
    margin: 0;
}

.detail-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-section ul li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    font-size: 0.9rem;
}

.detail-section ul li span {
    color: var(--color-muted);
}

.detail-section ul li strong {
    text-align: right;
}

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

.client-create-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 900px) {
    .client-create-head {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.client-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--color-muted);
}

@media (min-width: 480px) {
    .client-meta {
        flex-direction: row;
        gap: 18px;
    }
}

.client-tabs {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.8);
    padding: 6px;
    gap: 8px;
    flex-wrap: wrap;
}

.client-tab {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    text-transform: uppercase;
    font-size: 0.75rem;
    cursor: pointer;
    background: transparent;
    color: rgba(248, 250, 252, 0.6);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.client-tab.is-active {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(14, 165, 233, 0.25));
    color: #f8fafc;
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.15);
}

.client-tab-panels {
    width: 100%;
}

.client-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-section {
    border-radius: var(--radius-regular);
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(15, 23, 42, 0.6);
    padding: clamp(18px, 3vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #f8fafc;
}

.section-header p {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.representative-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.representative-list {
    width: 100%;
}

.representative-card {
    border-radius: var(--radius-regular);
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.55);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.representative-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.representative-remove {
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 999px;
    width: 34px;
    height: 34px;
    background: rgba(248, 113, 113, 0.15);
    color: #fecaca;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.representative-remove:hover {
    border-color: rgba(248, 113, 113, 0.7);
    background: rgba(248, 113, 113, 0.3);
}

.representative-add {
    align-self: flex-start;
}

.rep-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--color-muted);
}

.lawyer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.lawyer-chip {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.65);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    min-width: 180px;
}

.lawyer-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lawyer-chip span {
    font-weight: 600;
    color: #f8fafc;
}

.lawyer-chip small {
    color: var(--color-muted);
}

.lawyer-chip.is-selected {
    border-color: rgba(52, 211, 153, 0.55);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
}

.lawyer-chip:focus-within {
    border-color: rgba(52, 211, 153, 0.4);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.lawyer-chip.is-selected span {
    color: #f0fff4;
}

.lawyer-chip.is-selected small {
    color: rgba(226, 232, 240, 0.8);
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.table-action:hover {
    border-color: rgba(52, 211, 153, 0.6);
    background: rgba(52, 211, 153, 0.18);
}

.table-action svg {
    width: 18px;
    height: 18px;
}

.table-action[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.table-action[data-tooltip] {
    position: relative;
}

.table-action[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.table-action[data-tooltip]:hover::after,
.table-action[data-tooltip]:focus-visible::after {
    opacity: 1;
}

.table-action--small {
    width: 32px;
    height: 32px;
}

.table-action--confirm {
    border-color: rgba(34, 197, 94, 0.8);
    background: rgba(16, 185, 129, 0.2);
    color: #bbf7d0;
}

.table-action--confirm:hover {
    border-color: rgba(34, 197, 94, 1);
    background: rgba(16, 185, 129, 0.35);
    color: #ecfccb;
}

.table-action--info {
    border-color: rgba(96, 165, 250, 0.7);
    background: rgba(59, 130, 246, 0.25);
    color: #dbeafe;
}

.table-action--info:hover {
    border-color: rgba(96, 165, 250, 1);
    background: rgba(59, 130, 246, 0.4);
    color: #eff6ff;
}

.year-filter {
    width: 180px;
    margin-bottom: 16px;
}

.year-filter label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 4px;
}

.finance-actions {
    display: flex;
    gap: 12px;
}

.read-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.read-grid span {
    display: block;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.read-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
}

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


.office-view {
    display: grid;
    gap: 20px;
}

.office-banner {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(16, 185, 129, 0.18));
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.office-banner__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.status-dot.status-success { background: #34d399; }
.status-dot.status-danger { background: #f87171; }
.status-dot.status-warning { background: #f59e0b; }

.office-banner__brand h2 {
    margin: 0;
}

.office-banner__brand p {
    margin: 4px 0 0;
    color: var(--color-muted);
}

.office-banner__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.office-banner__stats article {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(2, 6, 23, 0.4);
    padding: 14px;
}

.office-banner__stats small {
    color: var(--color-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
}

.office-banner__stats strong {
    display: block;
    margin-top: 6px;
    font-size: 1.1rem;
}

.office-banner__note {
    border-radius: 18px;
    border: 1px dashed rgba(248, 250, 252, 0.2);
    padding: 16px;
    background: rgba(15, 23, 42, 0.4);
}

.office-banner__note small {
    display: block;
    color: var(--color-muted);
    margin-bottom: 4px;
}

.office-banner__note p {
    margin: 0;
}

.office-panel {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.85);
    padding: 20px;
}

.office-panel header {
    margin-bottom: 12px;
}

.office-panel header span {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.info-table td:first-child {
    width: 35%;
}
.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td:first-child {
    width: 40%;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.info-table td:last-child {
    font-size: 0.95rem;
    color: #f8fafc;
    text-align: right;
}

.info-table tr + tr td {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
}

.info-table td {
    padding: 8px 0;
}

.income-repeater {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0 4px;
}

.income-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) 80px;
    gap: 10px;
    align-items: flex-end;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

@media (max-width: 640px) {
    .income-row {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

.income-row:last-child {
    border-bottom: none;
}

.income-row__file {
    grid-column: span 1;
}

.income-row__remove {
    display: flex;
    justify-content: flex-end;
}

.table-action--tiny {
    width: 28px;
    height: 28px;
}

.income-row__remove .table-action--tiny {
    margin-left: auto;
}

.income-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.file-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.file-pill input[type="file"] {
    display: none;
}

.file-pill__icon {
    font-size: 0.9rem;
}

.file-pill__text {
    color: rgba(248, 250, 252, 0.85);
}

.income-row__file .file-pill {
    width: 100%;
    justify-content: space-between;
    padding: 10px 14px;
    margin-top: 10px;
    background: var(--color-card);
}

.file-pill__text {
    color: rgba(248, 250, 252, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: calc(100% - 60px);
}

.modal--extra .modal__dialog {
    width: min(760px, 95vw);
}

.income-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.table-action--danger {
    border-color: rgba(248, 113, 113, 0.7);
    background: rgba(248, 113, 113, 0.2);
    color: #fecaca;
}

.table-action--danger:hover {
    border-color: rgba(248, 113, 113, 1);
    background: rgba(248, 113, 113, 0.35);
    color: #ffe4e6;
}

.finances-table tbody tr.finances-total-row td {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

@media (min-width: 640px) {
    .form-actions {
        flex-direction: row;
        justify-content: flex-end;
    }

    .form-actions .button-primary,
    .form-actions .button-secondary {
        width: auto;
        min-width: 220px;
    }
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.status-info {
    margin-bottom: 24px;
    padding: 14px 16px;
    border-radius: var(--radius-regular);
    border: 1px solid rgba(52, 211, 153, 0.2);
    background: rgba(16, 185, 129, 0.1);
    color: #bbf7d0;
    font-size: 0.9rem;
}

form .form-field {
    margin-bottom: 18px;
}

.form-field--compact .input-wrapper {
    padding: 0;
}

.form-field label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #f8fafc;
}

.form-hint {
    font-size: 11px;
    color: var(--color-muted);
}

.hint-link {
    font-size: 0.7rem;
    color: var(--color-primary);
}

.hint-link:hover {
    color: #6ee7b7;
}

.subtle-note {
    font-size: 11px;
    color: var(--color-muted);
}

.form-field .input-wrapper {
    margin-top: 10px;
    border-radius: var(--radius-regular);
    border: 1px solid var(--color-border);
    background: var(--color-card);
    transition: border-color var(--transition), box-shadow var(--transition);
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper.is-disabled {
    opacity: 0.65;
    pointer-events: none;
}

.form-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 12px 14px;
    color: var(--color-text);
    font-size: 0.9rem;
    flex: 1;
}

.form-input:disabled {
    color: rgba(248, 250, 252, 0.7);
}

.form-select {
    appearance: none;
    cursor: pointer;
    padding-right: 36px;
}

.form-select option {
    color: #0f172a;
}

.form-input::placeholder {
    color: rgba(148, 163, 184, 0.7);
}

.form-input:focus {
    outline: none;
}

.form-field.is-focused .input-wrapper,
.form-field.is-filled .input-wrapper {
    border-color: rgba(52, 211, 153, 0.6);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.with-toggle .form-input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(15, 23, 42, 0.65);
    color: rgba(248, 250, 252, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.password-toggle:hover {
    border-color: rgba(52, 211, 153, 0.35);
    color: #f8fafc;
    background: rgba(15, 118, 110, 0.3);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-toggle .icon-eye-off {
    display: none;
}

.password-toggle.is-visible .icon-eye {
    display: none;
}

.password-toggle.is-visible .icon-eye-off {
    display: block;
}

.corporate-fields {
    padding: 6px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.is-hidden {
    display: none;
}


.error-text {
    margin-top: 8px;
    color: #fb7185;
    font-size: 0.78rem;
}

.form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0 24px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--color-muted);
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.button-primary,
.button-secondary {
    width: 100%;
    border: none;
    border-radius: var(--radius-regular);
    cursor: pointer;
    padding: 16px 20px;
    font-size: 0.9rem;
    /*letter-spacing: 0.3em;*/
    font-weight: 600;
    transition: transform var(--transition), box-shadow var(--transition);
}

.button-compact {
    width: auto;
    min-width: 120px;
    padding: 10px 18px;
    font-size: 0.8rem;
    border-radius: 12px;
}

.button-primary {
    background: linear-gradient(135deg, #0f766e, #0d4e49);
    color: #f8fafc;
    box-shadow: 0 20px 40px rgba(15, 118, 110, 0.2);
}

.button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 25px 45px rgba(15, 118, 110, 0.25);
}

.button-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px dashed var(--color-border);
}

.button-danger {
    width: 100%;
    border: 1px solid rgba(248, 113, 113, 0.6);
    border-radius: var(--radius-regular);
    background: rgba(248, 113, 113, 0.15);
    color: #fecaca;
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.button-danger:hover {
    border-color: rgba(248, 113, 113, 0.85);
    background: rgba(248, 113, 113, 0.25);
    color: #fee2e2;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.inline-form button {
    margin: 0;
}

@media (min-width: 640px) {
    .client-action-buttons .button-secondary,
    .client-action-buttons .button-danger {
        width: auto;
        min-width: 150px;
    }
}

.modal__actions .button-danger,
.modal__actions .button-secondary {
    width: auto;
    min-width: 140px;
}

.modal__actions .button-compact {
    min-width: 110px;
}

.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 1024px) {
    .profile-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

.profile-info-card,
.profile-form-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    width: 100%;
}

.profile-info-card {
    text-align: center;
    max-width: 360px;
}

.profile-form-card {
    flex: 1;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    margin: 0 auto 16px;
    background: rgba(52, 211, 153, 0.15);
    color: #bbf7d0;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.profile-role {
    color: var(--color-muted);
    margin-top: -6px;
}

.profile-info-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-info-item {
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.profile-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.profile-info-item span {
    display: block;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.profile-info-item strong {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
}

.profile-form-card h2 {
    margin-bottom: 4px;
}

.profile-form-card .description {
    margin-bottom: 24px;
}

.profile-form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    align-items: flex-end;
}

@media (min-width: 640px) {
    .profile-form-actions {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
    }
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}


.form-section {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.72);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-section + .form-section {
    margin-top: 16px;
}

.form-section h3 {
    margin: 0;
    font-size: 1rem;
}

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

.password-rules {
    margin-top: 8px;
    padding: 16px;
    border-radius: var(--radius-regular);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.7);
    text-align: left;
}

.password-rules strong {
    display: block;
    margin-bottom: 10px;
}

.password-rules ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.password-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.password-rule::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.password-rule.is-valid {
    color: #bbf7d0;
}

.password-rule.is-valid::before {
    border-color: rgba(52, 211, 153, 0.8);
    background: rgba(52, 211, 153, 0.6);
}

.switch-text {
    text-align: center;
    margin-top: 14px;
    font-size: 0.95rem;
}

.forgot-link {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--color-muted);
    transition: color var(--transition);
}

.form-extras .forgot-link {
    margin-left: auto;
}

.forgot-link:hover {
    color: var(--color-primary);
}

.metrics-grid {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.metric-card {
    padding: 16px;
    border-radius: var(--radius-regular);
    border: 1px solid var(--color-border);
    background: var(--color-card);
    text-align: center;
}

.metric-card p {
    margin: 6px 0 0;
    font-size: 1rem;
}

.metric-card span {
    font-size: 11px;
    color: rgba(148, 163, 184, 0.7);
}

.security-note,
.benefits {
    margin-top: 26px;
    padding: 18px;
    border-radius: var(--radius-regular);
    border: 1px solid var(--color-border);
    background: rgba(15, 23, 42, 0.6);
    font-size: 0.9rem;
    color: var(--color-muted);
}

.security-note {
    margin-bottom: 28px;
}

.checkbox-modern {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--color-muted);
}

.checkbox-modern input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-box {
    width: 56px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(15, 23, 42, 0.8);
    position: relative;
    transition: border-color var(--transition), background var(--transition);
}

.checkbox-dot {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 22px;
    height: 22px;
    background: var(--color-card);
    border-radius: 50%;
    transition: transform var(--transition), background var(--transition);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.checkbox-modern input:checked + .checkbox-box {
    border-color: rgba(52, 211, 153, 0.7);
    background: rgba(15, 118, 110, 0.35);
}

.checkbox-modern input:checked + .checkbox-box .checkbox-dot {
    transform: translateX(26px);
    background: rgba(52, 211, 153, 0.9);
}

.security-note strong {
    color: var(--color-text);
    display: block;
    margin-bottom: 6px;
}

.benefits ul {
    padding-left: 18px;
    margin: 10px 0 0;
    line-height: 1.6;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-shell {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 24px 32px;
    display: flex;
    flex-direction: column;
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 700px) {
    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.button-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #f8fafc;
    cursor: pointer;
}

.button-ghost span {
    font-size: 1.1rem;
}

.welcome-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    border: 1px solid var(--color-border);
    border-radius: 32px;
    padding: 32px;
    background: rgba(15, 23, 42, 0.85);
    margin-bottom: 32px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.quick-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    text-decoration: none;
}

.welcome-chart {
    border-radius: 24px;
    padding: 24px;
    background: rgba(15, 118, 110, 0.15);
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    margin: 16px 0;
}

.chart-bars span {
    flex: 1;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(52, 211, 153, 0.7), rgba(6, 182, 212, 0.4));
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.insight-grid article ul li {
    display: flex;
    flex-direction: row;
    gap: 2px;
}

.insight-grid article ul li small {
    color: var(--color-muted);
}


.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-list li {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 8px 10px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.activity-list strong {
    display: block;
    font-size: 1rem;
    line-height: 2.3;
    font-weight: 600;
    color: #f8fafc;
}

.activity-list span {
    display: block;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--color-muted);
}

.activity-list small {
    color: var(--color-muted);
    font-size: 0.72rem;
    line-height: 1.2;
    align-self: flex-end;
}

.insight-grid article {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.insight-grid header h3 {
    margin: 0;
    font-size: 1rem;
}

.insight-grid ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-grid ul li {
    display: flex;
    flex-direction: column;
    color: rgba(148, 163, 184, 0.9);
}

.insight-grid ul strong {
    font-size: 1rem;
    color: #f8fafc;
}

/* Key-Value metric list for dashboard */
.kv-metrics {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kv-metrics li {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    padding: 6px 0;
}

.kv-metrics li span {
    font-size: 0.9rem;
    color: var(--color-muted);
    flex: 1;
    text-align: left;
}

.kv-metrics li strong {
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    min-width: 80px;
    text-align: right;
    white-space: nowrap;
}

.finance-chart {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.finance-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}
.finance-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.finance-legend .income::before,
.finance-legend .expense::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.finance-legend .income::before {
    background: #34d399;
}

.finance-legend .expense::before {
    background: #f97316;
}

.finance-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    height: 160px;
}

.finance-bars__group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    height: 100%;
}

.finance-bar {
    width: 24px;
    border-radius: 8px;
    min-height: 16px;
    position: relative;
}

.finance-bar.income {
    background: linear-gradient(180deg, #34d399, #10b981);
}

.finance-bar.expense {
    background: linear-gradient(180deg, #fb923c, #f97316);
}

.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 24px;
}

.dashboard-lead {
    max-width: 460px;
}

@media (min-width: 700px) {
    .dashboard-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.dashboard-header h1 {
    margin: 6px 0;
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.logout-form button {
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color var(--transition);
}

.logout-form button:hover {
    border-color: var(--color-primary);
}

.app-footer {
    margin-top: 32px;
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-muted);
}

.app-footer small {
    font-size: 0.85rem;
}

.dashboard-metrics {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.dashboard-tile {
    padding: 24px;
    border-radius: var(--radius-regular);
    background: var(--color-card);
    border: 1px solid var(--color-border);
}

.dashboard-tile span {
    font-size: 11px;
    color: rgba(148, 163, 184, 0.7);
}

.dashboard-tile strong {
    display: block;
    margin-top: 12px;
    font-size: 2.5rem;
}

@media (max-width: 720px) {
    .auth-card {
        border-radius: 28px;
    }

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

.site-footer {
    margin-top: auto;
    padding: 16px 20px 48px;
    text-align: center;
}

.site-footer img {
    width: 160px;
    height: auto;
    opacity: 0.8;
}

.two-factor-form .code-inputs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.two-factor-form .code-input {
    text-align: center;
    font-size: 1.4rem;
    padding: 16px 0;
    border-radius: var(--radius-regular);
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: #f8fafc;
}

.app-loader {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.app-loader.is-visible {
    display: flex;
}

.app-loader__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
}

.app-loader__content {
    position: relative;
    text-align: center;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.app-loader__icon {
    position: relative;
    width: 140px;
    height: 140px;
    display: grid;
    place-items: center;
}

.app-loader__icon img {
    width: 60px;
    height: 60px;
    z-index: 2;
}

.app-loader__ring {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(52, 211, 153, 0.4);
    width: 100%;
    height: 100%;
    animation: spin 3s linear infinite;
}

.app-loader__ring--inner {
    width: 90px;
    height: 90px;
    border-color: rgba(14, 165, 233, 0.5);
    animation-duration: 2s;
    animation-direction: reverse;
}

.app-loader__content p {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.65);
}

.app-header {
    position: sticky;
    top: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-radius: 0;
    border: 1px solid var(--color-border);
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(12px);
    margin: 0;
    z-index: 100;
}

.app-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header__brand img {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
}

.app-header__app {
    font-weight: 600;
    font-size: 1rem;
    color: #f8fafc;
}

.app-header__brand small {
    display: block;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.8);
}

.app-header__nav {
    display: flex;
    gap: 18px;
    font-size: 0.9rem;
}

.nav-item {
    position: relative;
}

.app-header__nav a {
    color: rgba(248, 250, 252, 0.7);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    transition: color var(--transition);
    display: inline-block;
}

.app-header__nav > .nav-item > a {
    position: relative;
}

.app-header__nav > .nav-item > a:hover,
.app-header__nav > .nav-item > a.is-active {
    color: #f8fafc;
}

.app-header__nav > .nav-item > a::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -6px;
    height: 3px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.9);
    opacity: 0;
    transition: opacity var(--transition);
}

.app-header__nav > .nav-item > a:hover::after,
.app-header__nav > .nav-item > a.is-active::after,
.app-header__nav > .nav-item.is-child-active > a::after {
    opacity: 1;
}

.nav-item.has-children {
    padding-bottom: 10px;
}

.nav-item.has-children:hover .nav-dropdown,
.nav-item.has-children:focus-within .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    margin-top: 6px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(2, 6, 23, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity var(--transition), transform var(--transition);
}

.nav-dropdown a {
    border-radius: 12px;
    padding: 8px 14px;
    color: rgba(248, 250, 252, 0.7);
    transition: color var(--transition), background var(--transition);
}

.nav-dropdown a:hover,
.nav-dropdown a.is-active {
    color: #f8fafc;
    background: rgba(52, 211, 153, 0.12);
}

.app-header__user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header__user-info strong {
    color: #f8fafc;
    font-size: 0.95rem;
}

.icon-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition);
}

.icon-button--danger {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.2);
    color: #fecaca;
}

.icon-button--danger:hover {
    border-color: rgba(248, 113, 113, 0.8);
    background: rgba(248, 113, 113, 0.35);
}

.icon-button:hover {
    border-color: rgba(52, 211, 153, 0.6);
    transform: translateY(-1px);
}

.icon-button svg {
    width: 22px;
    height: 22px;
}

.fa-icon {
    width: 20px;
    height: 20px;
}

.table-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.table-card__header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 700px) {
    .table-card__header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.table-card__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.table-search {
    flex: 1;
    min-width: 200px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    color: #f8fafc;
}

.app-table__wrapper {
    overflow-x: auto;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.app-table thead {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.8);
}

.app-table th,
.app-table td {
    padding: 18px 16px!important;
    text-align: left;
    border: none;
}

.app-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.status-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.status-success {
    background: rgba(52, 211, 153, 0.15);
    color: rgba(52, 211, 153, 1);
}

.status-warning {
    background: rgba(251, 191, 36, 0.15);
    color: rgba(251, 191, 36, 1);
}

.status-danger {
    background: rgba(248, 113, 113, 0.15);
    color: rgba(248, 113, 113, 1);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal.is-visible {
    display: flex;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(4px);
}

.modal__dialog {
    position: relative;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    width: min(360px, 90vw);
    text-align: center;
    color: #f8fafc;
    box-shadow: 0 25px 50px rgba(2, 6, 23, 0.6);
    z-index: 1;
}

.modal--wide .modal__dialog {
    width: min(520px, 95vw);
}

.modal--medium .modal__dialog {
    width: min(420px, 95vw);
}

.modal__actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}


@keyframes spin {
    from {
        transform: rotate(0);
    }
    to {
        transform: rotate(360deg);
    }
}
.app-table__wrapper .dataTables_filter {
    width: 100%;
    margin-bottom: 16px;
    text-align: right;
}

.app-table__wrapper .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.45);
    color: rgba(248, 250, 252, 0.85);
    font-weight: 500;
}

.app-table__wrapper .dataTables_filter label:focus-within {
    border-color: rgba(52, 211, 153, 0.6);
}

.app-table__wrapper .dataTables_filter input[type="search"] {
    appearance: none;
    border: none;
    background: transparent;
    padding: 4px 0;
    min-width: 180px;
    color: #f8fafc;
    font-weight: 600;
    font-size: 0.92rem;
    transition: color var(--transition);
    outline: none;
}

.app-table__wrapper .dataTables_filter input[type="search"]::placeholder {
    color: rgba(148, 163, 184, 0.8);
    font-weight: 500;
}

.app-table th,
.app-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

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

.dataTables_info,
.dataTables_paginate {
    margin-top: 14px !important;
}
.transaction-tabs {
    display: inline-flex;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 18px;
    background: rgba(2, 6, 23, 0.6);
}

.transaction-tab {
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    background: transparent;
    color: rgba(248, 250, 252, 0.7);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.transaction-tab.is-active {
    background: rgba(34, 197, 94, 0.2);
    color: #f8fafc;
}

.transaction-pane.is-hidden {
    display: none;
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 20px;
    border-radius: var(--radius-regular);
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #bbf7d0;
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 200;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.transaction-history {
    margin-top: 32px;
}
.finance-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    height: 160px;
}

.finance-bars__group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.finance-bar {
    width: 24px;
    border-radius: 999px;
    transition: height 250ms ease;
}

.finance-bar.income {
    background: linear-gradient(180deg, #34d399, #10b981);
}

.finance-bar.expense {
    background: linear-gradient(180deg, #fb923c, #f97316);
}
.finance-bar::after {
    content: attr(data-value);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -8px);
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
}

.finance-bar:hover::after {
    opacity: 1;
}
.tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin: 12px 0 16px;
}

.tab {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
    cursor: pointer;
    text-align: center;
}

.tab.is-active {
    border-color: rgba(52, 211, 153, 0.6);
    background: rgba(16, 185, 129, 0.18);
}

.avatar {
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    margin-right: 8px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-action i {
    font-size: 14px;
}
