:root {
    --bg: #f3f6fb;
    --bg-soft: #f8fbff;
    --surface: #ffffff;
    --surface-alt: #f7f9fd;
    --surface-strong: #eef4ff;
    --text: #12233f;
    --text-soft: #60718d;
    --text-faint: #8d9ab0;
    --line: #dce6f4;
    --line-strong: #c8d4e7;

    --navy-950: #0f1f3d;
    --navy-900: #13284d;
    --navy-800: #173462;
    --navy-700: #21457f;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-100: #dbeafe;
    --sky-100: #e0f2fe;
    --green-600: #16a34a;
    --green-100: #dcfce7;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --red-500: #ef4444;
    --red-100: #fee2e2;
    --violet-500: #8b5cf6;
    --violet-100: #ede9fe;
    --slate-100: #e2e8f0;

    --shadow-sm: 0 10px 30px rgba(15, 31, 61, 0.06);
    --shadow-md: 0 18px 48px rgba(15, 31, 61, 0.12);
    --shadow-lg: 0 28px 64px rgba(15, 31, 61, 0.16);

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;

    --sidebar-w: 292px;
    --content-pad: 28px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 26%),
        radial-gradient(circle at left 20%, rgba(22, 163, 74, 0.06), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #f1f5fb 100%);
    color: var(--text);
    font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blue-600);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    max-width: 100%;
}

.app-shell {
    min-height: 100vh;
}

.dashboard-view {
    --sidebar-w: 270px;
    --content-pad: 20px;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px 20px 22px;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 28%),
        linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
    color: #f8fbff;
    box-shadow: 18px 0 40px rgba(15, 31, 61, 0.18);
    z-index: 80;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-brand-mark {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(155, 181, 255, 0.2), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e7f0ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sidebar-brand-mark svg,
.sidebar-card-icon svg,
.nav-icon svg,
.chip-icon svg,
.topbar-user-avatar svg,
.sidebar-toggle svg {
    width: 22px;
    height: 22px;
    display: block;
}

.sidebar-brand-copy {
    min-width: 0;
}

.sidebar-brand-copy strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #f8fbff;
    line-height: 1.4;
}

.sidebar-brand-copy span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: rgba(231, 240, 255, 0.68);
}

.sidebar-section-label {
    font-size: 11px;
    color: rgba(231, 240, 255, 0.52);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding-inline: 8px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 16px;
    color: rgba(241, 245, 255, 0.82);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    transform: translateX(-2px);
}

.sidebar-nav-link.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(59, 130, 246, 0.88));
    color: #ffffff;
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.22);
}

.nav-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.nav-label {
    font-size: 14px;
    font-weight: 700;
}

.sidebar-contact-card {
    margin-top: auto;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-card-title {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(231, 240, 255, 0.6);
    margin-bottom: 10px;
}

.sidebar-card-name {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.6;
}

.sidebar-card-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    color: rgba(244, 248, 255, 0.84);
    font-size: 13px;
    line-height: 1.8;
}

.sidebar-card-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 3px;
    color: #b7cbff;
    flex: 0 0 auto;
}

.sidebar-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(231, 240, 255, 0.68);
    font-size: 12px;
    line-height: 1.8;
    padding-inline: 6px;
}

.sidebar-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #60a5fa;
    margin-top: 6px;
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.12);
    flex: 0 0 auto;
}

.sidebar-backdrop {
    display: none;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    margin: 22px 22px 0;
    padding: 18px 22px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(220, 230, 244, 0.9);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-view .app-sidebar {
    gap: 18px;
    padding: 24px 16px 18px;
}

.dashboard-view .sidebar-brand {
    gap: 12px;
}

.dashboard-view .sidebar-brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 16px;
}

.dashboard-view .sidebar-brand-copy strong {
    font-size: 18px;
}

.dashboard-view .sidebar-brand-copy span {
    font-size: 11px;
}

.dashboard-view .sidebar-nav {
    gap: 4px;
}

.dashboard-view .sidebar-nav-link {
    padding: 11px 12px;
    border-radius: 14px;
}

.dashboard-view .nav-label {
    font-size: 13px;
}

.dashboard-view .sidebar-contact-card {
    padding: 14px;
    border-radius: 18px;
}

.dashboard-view .sidebar-card-line {
    margin-top: 10px;
    font-size: 12px;
}

.dashboard-view .app-topbar {
    margin: 16px 16px 0;
    padding: 14px 18px;
    border-radius: 22px;
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.sidebar-toggle {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    color: var(--navy-800);
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

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

.topbar-kicker {
    display: block;
    color: var(--text-soft);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.topbar-copy strong {
    display: block;
    color: var(--text);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.4;
}

.topbar-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.chip-icon {
    width: 16px;
    height: 16px;
    color: var(--blue-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(22, 163, 74, 0.08));
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.topbar-user-avatar {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--navy-900);
    color: #ffffff;
    flex: 0 0 auto;
}

.topbar-user-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.topbar-user-copy strong {
    font-size: 13px;
    color: var(--text);
}

.topbar-user-copy span {
    font-size: 11px;
    color: var(--text-soft);
}

.topbar-logout {
    min-height: 42px;
}

.page-wrapper {
    width: min(100%, 1540px);
    margin-inline: auto;
    padding: 28px var(--content-pad) 38px;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 26px;
}

.page-header h1 {
    font-size: 33px;
    font-weight: 900;
    line-height: 1.3;
    color: var(--navy-950);
    letter-spacing: -0.02em;
}

.page-header .sub {
    display: block;
    font-size: 14px;
    color: var(--text-soft);
}

.page-header .sub a {
    color: var(--text-soft);
}

.page-header .sub a:hover {
    color: var(--blue-600);
}

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

.stat-card {
    container-type: inline-size;
    position: relative;
    overflow: hidden;
    min-height: 168px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
    border: 1px solid rgba(220, 230, 244, 0.92);
    box-shadow: var(--shadow-sm);
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 96px;
    height: 96px;
    border-radius: 0 0 100% 0;
    background: rgba(37, 99, 235, 0.06);
}

.stat-card.blue::after {
    background: rgba(37, 99, 235, 0.08);
}

.stat-card.green::after {
    background: rgba(22, 163, 74, 0.08);
}

.stat-card.orange::after,
.stat-card.amber::after {
    background: rgba(245, 158, 11, 0.09);
}

.stat-card.red::after {
    background: rgba(239, 68, 68, 0.09);
}

.stat-card .card-label {
    position: relative;
    z-index: 1;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.stat-card .card-value {
    position: relative;
    z-index: 1;
    font-size: clamp(14px, 10cqw, 34px);
    font-weight: 900;
    line-height: 1.15;
    color: var(--navy-950);
    word-break: break-all;
    overflow-wrap: anywhere;
}

.stat-card .card-sub {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    color: var(--text-soft);
    font-size: clamp(10px, 3cqw, 13px);
    line-height: 1.8;
    flex-wrap: wrap;
    gap: 2px 6px;
}

.stat-card.blue .card-value {
    color: var(--blue-600);
}

.stat-card.green .card-value {
    color: var(--green-600);
}

.stat-card.orange .card-value,
.stat-card.amber .card-value {
    color: #d97706;
}

.stat-card.red .card-value {
    color: var(--red-500);
}

.card-box {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(220, 230, 244, 0.92);
    border-radius: 26px;
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 22px;
}

.card-box-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--navy-950);
    margin-bottom: 18px;
}

.alert {
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
}

.alert-error {
    color: #b91c1c;
    background: #fff1f1;
    border-color: #fecaca;
}

.alert-success {
    color: #166534;
    background: #effcf4;
    border-color: #bbf7d0;
}

.alert-warning {
    color: #b45309;
    background: #fff9eb;
    border-color: #fde68a;
}

.alert-info {
    color: #1d4ed8;
    background: #eef5ff;
    border-color: #bfdbfe;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 11px 18px;
    border-radius: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    color: #ffffff;
}

.btn-secondary {
    color: var(--navy-900);
    background: linear-gradient(180deg, #ffffff, #f7f9fd);
    border-color: var(--line);
    box-shadow: 0 8px 20px rgba(15, 31, 61, 0.06);
}

.btn-secondary:hover {
    color: var(--navy-950);
    border-color: var(--line-strong);
}

.btn-success {
    color: #ffffff;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 16px 28px rgba(22, 163, 74, 0.2);
}

.btn-success:hover {
    color: #ffffff;
}

.btn-danger {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f87171);
    box-shadow: 0 16px 28px rgba(239, 68, 68, 0.18);
}

.btn-danger:hover {
    color: #ffffff;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 13px;
}

.btn-lg {
    min-height: 52px;
    padding: 13px 20px;
    font-size: 14px;
}

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

.form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--navy-950);
    font-size: 13px;
    font-weight: 800;
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fbfdff;
    color: var(--text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    direction: rtl;
}

.input-ltr {
    direction: ltr;
    text-align: left;
}

.form-control:hover {
    border-color: var(--line-strong);
}

.form-control:focus {
    border-color: var(--blue-500);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea.form-control {
    min-height: 112px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

.form-group small.text-muted {
    display: block;
    margin-top: 7px;
    font-size: 12px;
}

.form-hint {
    display: block;
    margin-top: 7px;
    color: var(--text-faint);
    font-size: 12px;
    line-height: 1.7;
}

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

table.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 640px;
}

table.data-table thead th {
    padding: 14px 15px;
    background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
    color: rgba(244, 248, 255, 0.9);
    font-size: 12px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
    border-bottom: 0;
}

table.data-table thead th:first-child {
    border-top-right-radius: 18px;
}

table.data-table thead th:last-child {
    border-top-left-radius: 18px;
}

table.data-table tbody td {
    padding: 14px 15px;
    border-bottom: 1px solid #edf2fa;
    color: var(--text);
    background: rgba(255, 255, 255, 0.78);
    vertical-align: middle;
}

table.data-table tbody tr:nth-child(even) td {
    background: rgba(248, 251, 255, 0.94);
}

table.data-table tbody tr:hover td {
    background: #f1f6ff;
}

table.data-table tfoot td {
    padding: 12px 15px;
    background: #f7faff;
    border-top: 1px solid var(--line);
    font-weight: 700;
}

.status-badge,
.role-badge,
.cat-badge,
.cur-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.status-pending {
    color: #b45309;
    background: var(--amber-100);
}

.status-sent {
    color: #1d4ed8;
    background: var(--blue-100);
}

.status-received {
    color: #0369a1;
    background: var(--sky-100);
}

.status-paid {
    color: #166534;
    background: var(--green-100);
}

.status-cancelled {
    color: #b91c1c;
    background: var(--red-100);
}

.status-active {
    color: #166534;
    background: var(--green-100);
}

.status-inactive {
    color: var(--text-soft);
    background: #e8eef8;
}

.status-badge.sm {
    min-height: 24px;
    padding: 3px 9px;
    font-size: 10px;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.18), transparent 30%),
        radial-gradient(circle at bottom left, rgba(22, 163, 74, 0.12), transparent 26%),
        linear-gradient(180deg, #eef5ff 0%, #f6f9ff 100%);
}

.login-shell {
    width: min(1200px, calc(100% - 28px));
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(390px, 470px);
    gap: 24px;
    align-items: stretch;
}

.login-showcase {
    position: relative;
    overflow: hidden;
    padding: 40px;
    border-radius: 34px;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.22), transparent 28%),
        linear-gradient(180deg, #0d1f3c 0%, #102447 50%, #173765 100%);
    box-shadow: var(--shadow-lg);
    color: #f8fbff;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: lk-fade-in .6s ease both;
}

.login-showcase::after {
    content: "";
    position: absolute;
    inset: auto auto -70px -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN VISUAL — lk-* classes
   All prefixed lk- to avoid conflicts with dashboard/module pages.
   ═══════════════════════════════════════════════════════════════ */

/* Brand mark */
.lk-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.lk-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lk-brand-icon svg {
    width: 20px;
    height: 20px;
    color: #93c5fd;
}

.lk-brand-name {
    font-size: 20px;
    font-weight: 900;
    color: #f0f6ff;
    letter-spacing: -0.02em;
}

/* Main visual wrapper */
.lk-visual {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 256px;
    z-index: 1;
}

/* Background radial glow (animated) */
.lk-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.2) 0%, transparent 68%);
    pointer-events: none;
    animation: lk-glow-breathe 7s ease-in-out infinite;
}

/* Transfer scene: [Card]—[Line]—[Hub]—[Line]—[Card] */
.lk-scene {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 3;
    gap: 0;
}

/* Currency glassmorphism cards */
.lk-card {
    padding: 14px 16px;
    border-radius: 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-width: 116px;
    text-align: center;
    flex-shrink: 0;
}

.lk-card-a { animation: lk-float-a 4.2s ease-in-out infinite; }
.lk-card-b { animation: lk-float-b 4.2s ease-in-out infinite; animation-delay: 1.8s; }

.lk-card-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 7px;
}

.lk-card-cur {
    font-size: 10px;
    font-weight: 800;
    color: #93c5fd;
    letter-spacing: 0.1em;
}

.lk-card-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 7px rgba(74, 222, 128, 0.8);
}

.lk-card-amt {
    font-size: 16px;
    font-weight: 900;
    color: #f0f6ff;
    letter-spacing: -0.02em;
    line-height: 1;
}

.lk-card-lbl {
    margin-top: 6px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
}

/* Connector lines between cards and hub */
.lk-connector {
    width: 50px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.lk-con-track {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg,
        rgba(96, 165, 250, 0.12),
        rgba(96, 165, 250, 0.5),
        rgba(96, 165, 250, 0.12));
    border-radius: 1px;
    position: relative;
    overflow: hidden;
}

.lk-con-dot {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 10px #60a5fa, 0 0 20px rgba(96, 165, 250, 0.5);
    top: 50%;
    transform: translateY(-50%);
    animation: lk-dot-fwd 2.6s ease-in-out infinite;
}

.lk-dot-r {
    animation: lk-dot-rev 2.6s ease-in-out infinite;
    animation-delay: 1.3s;
}

/* Central transfer hub */
.lk-hub {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 4;
}

.lk-hub-pulse {
    position: absolute;
    inset: -13px;
    border-radius: 50%;
    border: 1.5px solid rgba(96, 165, 250, 0.4);
    animation: lk-pulse-ring 2.8s ease-in-out infinite;
}

.lk-hub-core {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(145deg, #1d4ed8, #3b82f6);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 0 0 8px rgba(59, 130, 246, 0.13),
        0 0 30px rgba(59, 130, 246, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lk-hub-core svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

/* Floating status badges */
.lk-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    z-index: 5;
    white-space: nowrap;
}

.lk-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lk-icon-paid { color: #4ade80; font-size: 13px; }

.lk-badge-paid {
    bottom: 12%;
    right: 4%;
    animation: lk-float-badge-1 4.5s ease-in-out infinite;
}

.lk-badge-secure {
    top: 12%;
    left: 4%;
    animation: lk-float-badge-2 4.5s ease-in-out infinite;
    animation-delay: 2.2s;
}

/* Tagline */
.lk-tagline {
    position: relative;
    z-index: 2;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    text-align: center;
    line-height: 1.6;
    margin: 0;
    flex-shrink: 0;
}

/* ── Keyframes ─────────────────────────────────────────────────── */
@keyframes lk-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lk-float-a {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

@keyframes lk-float-b {
    0%, 100% { transform: translateY(-10px); }
    50%      { transform: translateY(0); }
}

@keyframes lk-float-badge-1 {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes lk-float-badge-2 {
    0%, 100% { transform: translateY(-8px); }
    50%      { transform: translateY(0); }
}

@keyframes lk-dot-fwd {
    0%   { left: -9px;  opacity: 0; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { left: 100%;  opacity: 0; }
}

@keyframes lk-dot-rev {
    0%   { left: 100%; opacity: 0; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { left: -9px;  opacity: 0; }
}

@keyframes lk-pulse-ring {
    0%, 100% { transform: scale(1);    opacity: 0.7; }
    50%      { transform: scale(1.2);  opacity: 0.25; }
}

@keyframes lk-glow-breathe {
    0%, 100% { transform: scale(1);    opacity: 0.9; }
    50%      { transform: scale(1.18); opacity: 0.5; }
}

.login-panel {
    display: flex;
    align-items: center;
}

.login-card {
    width: 100%;
    padding: 36px 32px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(220, 230, 244, 0.95);
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo .office-name {
    font-size: 29px;
    font-weight: 900;
    color: var(--navy-950);
}

.login-logo .office-sub {
    display: block;
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 13px;
}

.login-session-actions {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.login-footer-note {
    margin-top: 16px;
    text-align: center;
    color: var(--text-faint);
    font-size: 12px;
}

.site-footer {
    margin-top: auto;
    padding: 10px var(--content-pad) 28px;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(220, 230, 244, 0.92);
    color: var(--text-soft);
    box-shadow: var(--shadow-sm);
}

.site-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.site-footer-brand strong {
    color: var(--navy-950);
    font-size: 14px;
}

.site-footer-brand span,
.site-footer-meta {
    font-size: 12px;
}

.site-footer-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.text-muted {
    color: var(--text-soft);
}

.text-center {
    text-align: center;
}

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

.text-right {
    text-align: right;
}

.text-sm {
    font-size: 12px;
}

.mt-1 {
    margin-top: 6px;
}

.mt-2 {
    margin-top: 14px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 6px;
}

.mb-2 {
    margin-bottom: 14px;
}

.mb-3 {
    margin-bottom: 24px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.gap-2 {
    gap: 10px;
}

.mono {
    font-family: "Cascadia Mono", "Consolas", "Courier New", monospace;
}

.divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 18px 0;
}

.empty-state {
    padding: 48px 20px;
    text-align: center;
    color: var(--text-soft);
}

.empty-state p {
    font-size: 15px;
    font-weight: 700;
}

.empty-state small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-faint);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 18px;
    margin-bottom: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(220, 230, 244, 0.92);
    box-shadow: var(--shadow-sm);
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: min(100%, 520px);
    flex-wrap: wrap;
}

.filter-form .form-control {
    flex: 1 1 180px;
    min-width: 0;
}

.summary-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    padding: 15px 4px 0;
    color: var(--text-soft);
    font-size: 13px;
}

.summary-bar strong {
    color: var(--navy-950);
}

.summary-bar .in-val {
    color: #166534;
    font-weight: 800;
}

.summary-bar .out-val {
    color: #b91c1c;
    font-weight: 800;
}

.cat-badge {
    background: #f1f5fb;
    border: 1px solid var(--line);
    color: var(--text);
}

.cur-badge.from {
    color: #1d4ed8;
    background: var(--blue-100);
}

.cur-badge.to {
    color: #166534;
    background: var(--green-100);
}

.rates-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.rate-card {
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfdff, #f4f8ff);
    border: 1px solid var(--line);
}

.rate-card .rc-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 10px;
}

.rate-card .rc-val {
    text-align: center;
    color: var(--blue-600);
    font-size: 22px;
    font-weight: 900;
}

.rate-card .rc-meta {
    margin-top: 8px;
    text-align: center;
    font-size: 11px;
    color: var(--text-faint);
}

.report-card {
    display: block;
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.96));
    border: 1px solid rgba(220, 230, 244, 0.92);
    box-shadow: var(--shadow-sm);
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.report-card::before {
    content: "";
    position: absolute;
    inset: auto -10% -45% auto;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.07);
}

.report-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.22);
    color: inherit;
}

.report-card .rc-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 24px;
    background: var(--surface-strong);
    margin-bottom: 14px;
}

.report-card .rc-title {
    position: relative;
    z-index: 1;
    font-size: 17px;
    font-weight: 800;
    color: var(--navy-950);
    margin-bottom: 10px;
}

.report-card .rc-desc {
    position: relative;
    z-index: 1;
    color: var(--text-soft);
    font-size: 13px;
}

.dir-in {
    color: #166534;
    font-weight: 800;
}

.dir-out {
    color: #b91c1c;
    font-weight: 800;
}

.row-in td {
    background: rgba(220, 252, 231, 0.4) !important;
}

.row-out td {
    background: rgba(254, 226, 226, 0.4) !important;
}

.row-in:hover td {
    background: rgba(220, 252, 231, 0.72) !important;
}

.row-out:hover td {
    background: rgba(254, 226, 226, 0.72) !important;
}

.form-card {
    max-width: 760px;
}

.req {
    color: var(--red-500);
    font-size: 12px;
}

.select-narrow {
    max-width: 220px;
}

.form-section {
    margin: 26px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.form-section:first-child {
    margin-top: 0;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.field-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.field-row .form-group {
    flex: 1 1 220px;
    margin-bottom: 0;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.mode-option {
    position: relative;
    display: block;
}

.mode-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.mode-option span {
    display: block;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff, #f7faff);
    color: var(--navy-900);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mode-option small {
    display: block;
    margin-top: 5px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
}

.mode-option input:checked + span {
    border-color: rgba(37, 99, 235, 0.28);
    background: linear-gradient(180deg, #eff6ff, #f6f9ff);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.mode-option input:disabled + span {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.inline-form-panel {
    margin-top: 12px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fbfdff, #f5f9ff);
}

.inline-form-panel[hidden] {
    display: none !important;
}

.field-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.field-grid-3 .form-group {
    margin-bottom: 0;
}

.cur-pair-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    margin-bottom: 16px;
}

.cur-pair-grid .pair-sep {
    padding-bottom: 10px;
    color: var(--text-faint);
    font-size: 20px;
}

.filter-meta {
    margin-bottom: 18px;
    color: var(--text-soft);
    font-size: 13px;
}

.filter-meta strong {
    color: var(--navy-950);
}

.role-admin {
    color: #6d28d9;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
}

.role-manager {
    color: #0369a1;
    background: #ecfeff;
    border: 1px solid #bae6fd;
}

.role-user {
    color: var(--text-soft);
    background: #f1f5fb;
    border: 1px solid var(--line);
}

.cat-rent {
    color: #475569;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.cat-salary {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.cat-utilities {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.cat-travel {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.cat-other {
    color: var(--text-soft);
    background: #f1f5fb;
    border-color: var(--line);
}

.dashboard-page {
    padding-top: 2px;
}

/* ─── Compact hero ─── */
.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.dashboard-hero-copy {
    max-width: 780px;
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue-600);
    font-size: 11px;
    font-weight: 800;
}

.dashboard-hero h1 {
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.25;
    color: var(--navy-950);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.dashboard-hero p {
    display: none;
}

.hero-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hero-pill {
    min-width: 130px;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(220, 230, 244, 0.92);
    box-shadow: var(--shadow-sm);
}

.hero-pill strong {
    display: block;
    color: var(--navy-950);
    font-size: 18px;
    font-weight: 900;
}

.hero-pill span {
    display: block;
    color: var(--text-soft);
    font-size: 11px;
    margin-top: 2px;
}

.dashboard-stats .stat-card {
    min-height: 90px;
    padding: 12px 14px;
}

.dashboard-stats .stat-card .card-value {
    font-size: clamp(20px, 2vw, 26px);
}

.dashboard-stats .stat-card .card-label {
    margin-bottom: 6px;
}

.dashboard-stats .stat-card .card-sub {
    margin-top: 6px;
    font-size: 12px;
}

.dashboard-page .cards-grid {
    gap: 12px;
}
.dashboard-page .balance-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    max-height: 210px;
    overflow-y: auto;
}
.dashboard-page .balance-card {
    padding: 8px 10px;
    border-radius: 14px;
}
.dashboard-page .balance-card-value {
    font-size: 16px;
    font-weight: 900;
    margin-top: 4px;
}
.dashboard-page .balance-card-meta {
    margin-top: 4px;
    font-size: 10px;
}
.dashboard-page .balance-card-meta strong {
    font-size: 11px;
}
.dashboard-page .balance-card-state {
    width: 24px;
    height: 24px;
    font-size: 12px;
}
.dashboard-page .balance-card-code {
    font-size: 13px;
}
.dashboard-page .balance-card-name {
    font-size: 10px;
}

.card-sub-stack {
    display: grid;
    gap: 6px;
}

.metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(220, 230, 244, 0.92);
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
}

.metric-pill strong {
    color: var(--navy-950);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(270px, 340px);
    gap: 14px;
    align-items: start;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head h2 {
    color: var(--navy-950);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.3;
}

.section-head p {
    margin-top: 5px;
    color: var(--text-soft);
    font-size: 13px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue-600);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

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

.balance-card {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(220, 230, 244, 0.92);
    background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%);
}

.balance-card.positive {
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.06);
}

.balance-card.negative {
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.06);
}

.balance-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.balance-card-code {
    font-size: 15px;
    font-weight: 900;
    color: var(--navy-950);
}

.balance-card-name {
    color: var(--text-soft);
    font-size: 11px;
}

.balance-card-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 900;
}

.balance-card.positive .balance-card-state {
    background: var(--green-100);
    color: #166534;
}

.balance-card.negative .balance-card-state {
    background: var(--red-100);
    color: #b91c1c;
}

.balance-card-value {
    margin-top: 10px;
    font-size: 22px;
    font-weight: 900;
    color: var(--navy-950);
    line-height: 1.2;
}

.balance-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-soft);
}

.balance-card-meta strong {
    display: block;
    font-size: 12px;
    color: var(--navy-950);
}

.table-reference {
    font-family: "Cascadia Mono", "Consolas", "Courier New", monospace;
    font-size: 12px;
    font-weight: 700;
}

.compact-note {
    color: var(--text-soft);
    font-size: 12px;
}

.dashboard-side .card-box:last-child {
    margin-bottom: 0;
}

.office-panel {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 34%),
        linear-gradient(180deg, #112446 0%, #163765 100%);
    color: #f8fbff;
    border-color: rgba(255, 255, 255, 0.08);
}

.office-panel::after {
    content: "";
    position: absolute;
    inset: auto -20px -32px auto;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.office-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.office-brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.office-brand-copy strong {
    display: block;
    font-size: 20px;
    line-height: 1.4;
}

.office-brand-copy span {
    display: block;
    color: rgba(236, 243, 255, 0.72);
    font-size: 12px;
    margin-top: 3px;
}

.office-meta {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    color: rgba(244, 248, 255, 0.84);
    font-size: 13px;
}

.quick-actions {
    display: grid;
    gap: 10px;
}

.quick-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 13px;
    border-radius: 14px;
    background: #f7faff;
    border: 1px solid var(--line);
    color: var(--navy-900);
    font-size: 13px;
    font-weight: 800;
}

.quick-link span:last-child {
    color: var(--text-faint);
}

.summary-list {
    display: grid;
    gap: 12px;
    list-style: none;
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #edf2fa;
}

.summary-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.summary-item:first-child {
    padding-top: 0;
}

.summary-item-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.summary-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.summary-dot.pending {
    background: var(--amber-500);
}

.summary-dot.sent {
    background: var(--blue-500);
}

.summary-dot.received {
    background: #0ea5e9;
}

.summary-dot.paid {
    background: var(--green-600);
}

.summary-dot.cancelled {
    background: var(--red-500);
}

.summary-item strong {
    color: var(--navy-950);
    font-size: 14px;
}

.summary-count {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #f1f6ff;
    color: var(--navy-900);
    font-size: 13px;
    font-weight: 900;
}

.backup-page .dashboard-main,
.backup-page .dashboard-side,
.backup-page .card-box,
.backup-page .summary-item-main > div,
.backup-page .backup-file-copy {
    min-width: 0;
}

.backup-page .card-box {
    overflow: hidden;
}

.backup-page .summary-item {
    align-items: flex-start;
}

.backup-page .summary-item-main {
    flex: 1;
}

.backup-page .summary-item strong,
.backup-page .summary-item .compact-note {
    display: block;
    overflow-wrap: anywhere;
}

.backup-page .summary-count {
    flex: 0 0 auto;
    min-width: 54px;
    max-width: 112px;
    height: auto;
    min-height: 38px;
    padding: 10px 12px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    align-self: flex-start;
}

.backup-page .backup-inline-path {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.backup-page .backup-settings-form .form-group {
    margin-bottom: 16px;
}

.backup-toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--navy-950);
    font-size: 14px;
    font-weight: 800;
}

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

.backup-page .quick-actions form {
    margin: 0;
}

.backup-page .backup-history-table {
    min-width: 1180px;
    table-layout: fixed;
}

.backup-page .backup-date-cell,
.backup-page .backup-id-cell,
.backup-page .backup-size-cell {
    white-space: nowrap;
}

.backup-page .backup-file-cell,
.backup-page .backup-hash-cell,
.backup-page .backup-notes-cell,
.backup-page .backup-technical-note,
.backup-page .backup-file-name {
    overflow-wrap: anywhere;
}

.backup-page .backup-file-cell,
.backup-page .backup-hash-cell,
.backup-page .backup-file-name,
.backup-page .backup-technical-note {
    text-align: left;
}

.backup-page .backup-file-list {
    display: grid;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.backup-page .backup-file-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #edf2fa;
}

.backup-page .backup-file-item:first-child {
    padding-top: 0;
}

.backup-page .backup-file-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.backup-page .backup-file-name {
    display: block;
    color: var(--navy-950);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.65;
}

.backup-page .backup-technical-note {
    display: block;
}

.backup-page .backup-size-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 14px;
    background: #f1f6ff;
    color: var(--navy-900);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.currency-stack {
    display: grid;
    gap: 10px;
}

.currency-row {
    padding: 14px 16px;
    border-radius: 18px;
    background: #f7faff;
    border: 1px solid var(--line);
}

.currency-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.currency-row-head strong {
    color: var(--navy-950);
    font-size: 14px;
}

.currency-row-head span {
    color: var(--text-soft);
    font-size: 12px;
}

.currency-row-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-soft);
    font-size: 12px;
}

.currency-row-metrics strong {
    display: block;
    color: var(--navy-950);
    font-size: 15px;
}

.chart-empty {
    padding: 28px 18px;
    text-align: center;
    color: var(--text-soft);
    font-size: 13px;
    border: 1px dashed var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, #fbfdff, #f7faff);
}

.chart-shell {
    overflow: hidden;
}

.chart-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue-600);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chart-note {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.8;
}

.donut-layout {
    display: grid;
    grid-template-columns: minmax(170px, 195px) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.donut-ring {
    width: 170px;
    height: 170px;
    margin-inline: auto;
    border-radius: 50%;
    padding: 14px;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.donut-center {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(220, 230, 244, 0.86);
}

.donut-center strong {
    color: var(--navy-950);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
}

.donut-center span {
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.donut-legend {
    display: grid;
    gap: 12px;
}

.donut-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #edf2fa;
}

.donut-legend-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.donut-legend-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.donut-legend-main strong {
    display: block;
    color: var(--navy-950);
    font-size: 14px;
}

.donut-legend-main span {
    display: block;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.7;
}

.donut-legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.donut-legend-value {
    color: var(--navy-950);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.metric-bars {
    display: grid;
    gap: 14px;
}

.metric-bar-row {
    display: grid;
    gap: 8px;
}

.metric-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.metric-bar-head strong {
    color: var(--navy-950);
    font-size: 13px;
    font-weight: 800;
}

.metric-bar-head span {
    color: var(--navy-950);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.metric-bar-track {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #edf3fc;
}

.metric-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.16);
}

.metric-bar-meta {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.7;
}

.trend-chart-shell {
    display: grid;
    gap: 12px;
}

.trend-chart-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.trend-grid-line {
    stroke: #e6edf8;
    stroke-width: 1;
    stroke-dasharray: 6 8;
}

.trend-axis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(32px, 1fr));
    gap: 6px;
    color: var(--text-soft);
    font-size: 11px;
    text-align: center;
}

.trend-axis span.muted {
    color: #c2cddd;
}

.dashboard-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.9fr);
    gap: 12px;
    margin: 10px 0;
}

.dashboard-analytics-grid .card-box {
    margin-bottom: 0;
    padding: 12px 16px;
}

/* ─── Dashboard scoped compactness overrides ─── */
.dashboard-page .card-box {
    margin-bottom: 8px;
    padding: 14px 16px;
    border-radius: 20px;
}
.dashboard-page .dashboard-analytics-grid .card-box {
    margin-bottom: 0;
}
.dashboard-page .section-head {
    margin-bottom: 8px;
    gap: 10px;
}
.dashboard-page .section-head h2 {
    font-size: 15px;
}
.dashboard-page .section-head p {
    font-size: 11px;
    margin-top: 2px;
    line-height: 1.6;
}
.dashboard-page table.data-table thead th {
    padding: 8px 10px;
    font-size: 12px;
}
.dashboard-page table.data-table tbody td {
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.5;
}
.dashboard-page .trend-chart-svg {
    max-height: 112px;
}

/* Hide hero and decorative/low-priority sidebar blocks */
.dashboard-page .dashboard-hero {
    display: none;
}
.dashboard-page .office-panel {
    display: none;
}
.dashboard-page .metric-bars-card {
    display: none;
}

.dashboard-page .dashboard-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-page .dashboard-stats .stat-card {
    min-height: 78px;
    padding: 10px 12px;
    border-radius: 18px;
}

.dashboard-page .dashboard-stats .card-label {
    margin-bottom: 4px;
    font-size: 11px;
}

.dashboard-page .dashboard-stats .card-value {
    font-size: clamp(18px, 1.7vw, 24px);
    line-height: 1.15;
}

.dashboard-page .dashboard-stats .card-sub {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.45;
}

.dashboard-page .card-sub-stack {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.dashboard-page .metric-pill {
    padding: 4px 7px;
    border-radius: 10px;
    font-size: 10px;
    gap: 5px;
}

.dashboard-layout-stack {
    display: grid;
    gap: 10px;
}

.dashboard-main {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.dashboard-side {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
}

.dashboard-top-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.86fr) minmax(0, 1.5fr) minmax(220px, 0.86fr);
    grid-template-areas: "status trend actions";
    gap: 10px;
    align-items: start;
}

.dashboard-middle-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(290px, 0.98fr);
    gap: 10px;
    align-items: stretch;
}

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

.dashboard-middle-side {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    align-content: stretch;
    min-width: 0;
    height: 100%;
}

.dashboard-top-grid .dashboard-actions-card {
    grid-area: actions;
}

.dashboard-top-grid .dashboard-trend-card {
    grid-area: trend;
}

.dashboard-top-grid .dashboard-status-list-card {
    grid-area: status;
}

.dashboard-page .dashboard-layout-stack .card-box {
    margin-bottom: 0;
}

.dashboard-middle-side .dashboard-debts-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.dashboard-middle-side .dashboard-debts-card .summary-list {
    flex: 0 0 auto;
}

.dashboard-middle-side .dashboard-debt-currencies,
.dashboard-middle-side .dashboard-debts-card .empty-state {
    margin-top: auto;
}

.dashboard-page .chart-kicker {
    margin-bottom: 3px;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.dashboard-page .section-link {
    min-height: 34px;
    padding: 0 11px;
    font-size: 11px;
}

.dashboard-balance-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.balance-overview-pill {
    padding: 9px 10px;
    border-radius: 14px;
    border: 1px solid rgba(220, 230, 244, 0.92);
    background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%);
}

.balance-overview-pill span {
    display: block;
    color: var(--text-soft);
    font-size: 10px;
    margin-bottom: 3px;
}

.balance-overview-pill strong {
    display: block;
    color: var(--navy-950);
    font-size: 17px;
    font-weight: 900;
}

.dashboard-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.mini-stat {
    padding: 10px 11px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
}

.mini-stat-label {
    display: block;
    font-size: 10px;
    color: var(--text-soft);
    margin-bottom: 3px;
}

.mini-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
    color: var(--navy-950);
}

.mini-stat-note {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: var(--text-soft);
    line-height: 1.5;
}

.dashboard-trend-card .trend-chart-shell {
    gap: 8px;
}

.dashboard-trend-card .trend-axis {
    gap: 4px;
    font-size: 10px;
}

.dashboard-top-grid .dashboard-trend-card {
    min-height: 100%;
}

.dashboard-balance-card .balance-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
    max-height: 224px;
    overflow-y: auto;
}

.dashboard-balance-hero .balance-grid {
    grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
}

.dashboard-bottom-grid .dashboard-balance-card {
    padding: 16px 18px;
}

.dashboard-bottom-grid .dashboard-balance-card .balance-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    max-height: none;
    overflow: visible;
}

.dashboard-bottom-grid .dashboard-balance-card .balance-card {
    padding: 10px 12px;
}

.dashboard-bottom-grid .dashboard-balance-card .balance-card-value {
    font-size: 16px;
}

.dashboard-balance-card .balance-card {
    padding: 8px 10px;
    border-radius: 14px;
}

.dashboard-balance-card .balance-card-state {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 10px;
    font-size: 12px;
}

.dashboard-balance-card .balance-card-code {
    font-size: 12px;
}

.dashboard-balance-card .balance-card-name {
    font-size: 10px;
}

.dashboard-balance-card .balance-card-value {
    margin-top: 4px;
    font-size: 15px;
}

.dashboard-balance-card .balance-card-meta {
    margin-top: 4px;
    font-size: 10px;
}

.dashboard-balance-card .balance-card-meta strong {
    font-size: 11px;
}

.dashboard-status-card .donut-layout {
    grid-template-columns: minmax(130px, 146px) minmax(0, 1fr);
    gap: 10px;
}

.dashboard-status-card .donut-ring {
    width: 138px;
    height: 138px;
    padding: 12px;
}

.dashboard-status-card .donut-center strong {
    font-size: 18px;
}

.dashboard-status-card .donut-center span {
    font-size: 11px;
}

.dashboard-status-card .donut-legend {
    gap: 6px;
}

.dashboard-status-card .donut-legend-row {
    padding: 8px 0;
    gap: 10px;
}

.dashboard-status-card .donut-legend-main strong {
    font-size: 13px;
}

.dashboard-status-card .donut-legend-main span {
    font-size: 11px;
    line-height: 1.45;
}

/* Compact sidebar quick-actions: 2-column grid */
.dashboard-page .quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}
.dashboard-page .quick-actions .btn-primary {
    grid-column: 1 / -1;
}
.dashboard-page .quick-actions .btn-full {
    font-size: 12px;
    padding: 8px 10px;
    min-height: 40px;
}
.dashboard-page .quick-link {
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.dashboard-page .quick-link span:last-child {
    font-size: 13px;
}

/* Compact summary lists */
.dashboard-page .summary-list {
    gap: 0;
}
.dashboard-page .summary-item {
    padding: 7px 0;
}

.dashboard-page .summary-item strong {
    font-size: 13px;
}
.dashboard-page .summary-item .compact-note {
    display: none;
}
.dashboard-page .summary-count {
    min-width: 30px;
    height: 30px;
    font-size: 12px;
    border-radius: 10px;
}
.dashboard-page .card-box-title {
    margin-bottom: 12px;
    font-size: 13px;
}

.dashboard-page .dashboard-debt-currencies {
    margin-top: 10px;
    gap: 8px;
}

.dashboard-page .dashboard-debt-currencies .currency-row {
    padding: 10px 12px;
    border-radius: 14px;
}

.dashboard-page .dashboard-empty-inline {
    padding: 16px 10px 4px;
}

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

.report-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.report-hero-copy {
    max-width: 760px;
}

.report-hero-copy h1 {
    font-size: clamp(30px, 4vw, 44px);
    color: var(--navy-950);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.report-hero-copy p {
    margin-top: 10px;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.9;
}

.report-hero-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.report-meta-pill {
    min-width: 160px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(220, 230, 244, 0.92);
    box-shadow: var(--shadow-sm);
}

.report-meta-pill strong {
    display: block;
    color: var(--navy-950);
    font-size: 22px;
    font-weight: 900;
}

.report-meta-pill span {
    display: block;
    color: var(--text-soft);
    font-size: 12px;
    margin-top: 4px;
}

.report-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
    gap: 22px;
    align-items: start;
    margin-bottom: 24px;
}

.report-layout-grid .card-box {
    margin-bottom: 0;
}

.report-card-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.report-card .rc-sub {
    margin-top: 12px;
    color: var(--text-faint);
    font-size: 12px;
    line-height: 1.7;
}

.stat-card .chart-note {
    margin-top: 10px;
}

.table-card + .table-card {
    margin-top: 22px;
}

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

    .dashboard-top-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "trend trend"
            "actions status";
    }

    .dashboard-middle-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.95fr);
    }

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

@media (max-width: 1200px) {
    .sidebar-toggle {
        display: inline-flex;
    }

    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.24s ease;
    }

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

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 31, 61, 0.36);
        z-index: 70;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .dashboard-analytics-grid,
    .report-layout-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-top-grid,
    .dashboard-middle-grid {
        grid-template-columns: 1fr;
        grid-template-areas: none;
    }

    .dashboard-middle-side {
        grid-template-rows: auto;
        height: auto;
    }

    .dashboard-middle-side .dashboard-debts-card {
        min-height: 0;
    }
}

@media (max-width: 900px) {
    :root {
        --content-pad: 18px;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-showcase {
        padding: 28px 24px;
        gap: 18px;
    }

    .login-card {
        padding: 30px 22px;
    }

    .lk-visual { min-height: 200px; }
    .lk-card   { min-width: 100px; padding: 12px 13px; }
    .lk-card-amt { font-size: 14px; }
    .lk-connector { width: 36px; }
    .lk-hub-core  { width: 56px; height: 56px; }
    .lk-badge     { display: none; }
    .lk-tagline   { font-size: 12px; }

    .app-topbar {
        margin: 16px 16px 0;
        padding: 16px;
        border-radius: 22px;
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-meta {
        width: 100%;
        justify-content: flex-start;
    }

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

    .field-grid-3,
    .cur-pair-grid,
    .two-col-grid,
    .view-detail-grid {
        grid-template-columns: 1fr;
    }

    .cur-pair-grid .pair-sep {
        display: none;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    table.data-table {
        min-width: 560px;
    }

    .donut-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-page .dashboard-stats,
    .dashboard-mini-stats,
    .dashboard-page .quick-actions,
    .dashboard-status-card .donut-layout,
    .dashboard-balance-overview {
        grid-template-columns: 1fr;
    }

    .report-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .report-hero-meta {
        justify-content: flex-start;
    }
}

/* ===== View / Detail pages ===== */

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

.detail-table td {
    padding: 11px 0;
    vertical-align: top;
    line-height: 1.7;
}

.detail-table tr {
    border-bottom: 1px solid var(--line);
}

.detail-table tr:last-child {
    border-bottom: 0;
}

.dt-label {
    width: 155px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.dt-value {
    color: var(--text);
}

/* ── Eligibility checklist (void/delete pages) ── */
.checklist-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 4px;
    line-height: 1.6;
}
.checklist-row.chk-pass {
    background: rgba(22, 163, 74, 0.07);
    color: var(--text);
}
.checklist-row.chk-fail {
    background: rgba(239, 68, 68, 0.07);
    color: var(--text);
}
.chk-icon {
    font-size: 15px;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 1px;
}
.chk-pass .chk-icon { color: var(--green-600); }
.chk-fail .chk-icon { color: var(--red-500); }

.dt-amount {
    font-size: 20px;
    font-weight: 900;
    color: var(--blue-600);
    line-height: 1.3;
}

.dt-amount.dt-expense {
    color: var(--red-500);
}

.dt-amount .dt-cur {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-soft);
}

/* Two-column layout for view pages */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
    margin-bottom: 22px;
}

/* Asymmetric layout: narrow info card + wide content */
.view-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    margin-bottom: 22px;
}

/* Action buttons row for view pages */
.view-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Status history timeline */
.status-timeline {
    display: grid;
    gap: 0;
}

.timeline-entry {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.timeline-entry:first-child {
    padding-top: 0;
}

.timeline-entry:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.timeline-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.timeline-arrow {
    color: var(--text-faint);
    font-size: 12px;
}

.timeline-meta {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.7;
}

@media (max-width: 680px) {
    .topbar-chip {
        display: none;
    }

    .login-shell {
        width: min(100% - 18px, 100%);
        gap: 16px;
    }

    .topbar-user {
        width: 100%;
        justify-content: space-between;
    }

    .toolbar {
        padding: 14px;
    }

    .hero-pills,
    .dashboard-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-pill {
        min-width: 0;
    }

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

    .summary-item {
        gap: 10px;
    }

    .backup-page .quick-actions {
        grid-template-columns: 1fr;
    }

    .backup-page .backup-file-item {
        flex-direction: column;
        align-items: stretch;
    }

    .backup-page .backup-size-pill,
    .backup-page .summary-count {
        align-self: flex-start;
    }

    .donut-ring {
        width: 170px;
        height: 170px;
    }
}

/* ── Mobile (≤ 480px) ──────────────────────────────────────────── */
@media (max-width: 480px) {
    :root {
        --content-pad: 12px;
    }

    .app-topbar {
        margin: 8px 8px 0;
        padding: 10px 12px;
        border-radius: 16px;
        gap: 10px;
    }

    .topbar-copy strong {
        font-size: 14px;
    }

    .topbar-user-copy {
        display: none;
    }

    .topbar-logout {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Touch-friendly buttons */
    .btn:not(.btn-sm) {
        min-height: 42px;
        padding: 9px 14px;
    }

    /* Action button bar: wrap & stack */
    .view-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .view-actions .btn {
        flex: 1 1 auto;
        min-width: calc(50% - 4px);
        justify-content: center;
        text-align: center;
        font-size: 13px;
        padding: 9px 10px;
    }

    /* Page header */
    .page-header h1 {
        font-size: 20px;
    }

    /* Cards */
    .card-box {
        padding: 16px 14px;
        border-radius: 16px;
    }

    .card-box-title {
        font-size: 13px;
    }

    /* Stats: 2 per row on small phones */
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Forms: full-width actions */
    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

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

    /* Toolbar search row: stack */
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form .form-control,
    .filter-form select {
        width: 100% !important;
    }

    /* Tables: negative margin for full-bleed scroll */
    .table-wrap {
        margin-inline: -12px;
        padding-inline: 12px;
        border-radius: 0;
    }

    /* Summary bar */
    .summary-bar {
        padding: 12px 14px;
        font-size: 13px;
    }

    /* Detail table label column narrower */
    .dt-label {
        width: 110px;
        font-size: 11px;
    }

    /* Page wrapper top padding */
    .page-wrapper {
        padding-top: 18px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   BACKUP PAGE REDESIGN
   ═══════════════════════════════════════════════════════════════ */

/* Hero */
.backup-hero {
    background: linear-gradient(135deg, #111827 0%, #1e3a5f 100%);
    border-radius: 16px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.backup-hero-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}
.backup-hero-icon svg { width: 32px; height: 32px; }
.backup-hero-body { flex: 1; min-width: 180px; }
.backup-hero-body h1 { font-size: 20px; font-weight: 900; color: #fff; margin: 0 0 4px; }
.backup-hero-body p  { font-size: 13px; color: rgba(255,255,255,0.65); margin: 0; line-height: 1.7; }
.backup-hero-body small { font-size: 11px; color: rgba(255,255,255,0.38); display: block; margin-top: 3px; }
.btn-backup-create {
    flex-shrink: 0;
    background: #22c55e;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s;
    font-family: inherit;
}
.btn-backup-create:hover { background: #16a34a; }

/* Auto-backup status card */
.backup-auto-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.backup-auto-card-body { flex: 1; }
.backup-auto-card-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.backup-auto-meta { font-size: 12px; color: var(--text-soft); line-height: 2.2; }
.backup-auto-meta span { display: flex; align-items: center; gap: 7px; }
.backup-auto-meta span svg { width: 14px; height: 14px; flex-shrink: 0; }
.backup-auto-status-ok  { color: #16a34a; font-weight: 700; }
.backup-auto-status-off { color: #dc2626; font-weight: 700; }
.backup-auto-badge {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.backup-auto-badge.ok  { background: rgba(22,163,74,.12); color: #16a34a; }
.backup-auto-badge.off { background: rgba(220,38,38,.1);  color: #dc2626; }

/* Restore info box */
.backup-restore-info {
    background: rgba(99,102,241,.06);
    border: 1px solid rgba(99,102,241,.22);
    border-radius: 12px;
    padding: 13px 18px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--text);
}
.backup-restore-icon { font-size: 15px; color: #6366f1; flex-shrink: 0; margin-top: 2px; }
.backup-restore-title { font-weight: 700; color: #6366f1; display: block; margin-bottom: 3px; }

/* File list section */
.backup-files-section {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
}
.backup-files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    gap: 10px;
    flex-wrap: wrap;
}
.backup-files-header h2 { font-size: 14px; font-weight: 700; margin: 0; color: var(--text); }
.backup-tab-group { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-soft); }
.backup-tab-sep { color: var(--line); }
.backup-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
    transition: background .14s;
}
.backup-file-row:last-child { border-bottom: 0; }
.backup-file-row:hover { background: var(--bg-soft); }
.backup-file-sql-icon {
    width: 38px; height: 38px;
    background: rgba(22,163,74,.1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 900; letter-spacing: -.3px;
    color: #16a34a; flex-shrink: 0;
    font-family: monospace;
}
.backup-file-info { flex: 1; min-width: 0; }
.backup-file-name { font-size: 12.5px; font-weight: 700; font-family: monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.backup-file-meta { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.backup-type-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.backup-type-badge.auto   { background: rgba(22,163,74,.1); color: #16a34a; }
.backup-type-badge.manual { background: rgba(37,99,235,.1);  color: #2563eb; }
.backup-type-badge.system { background: rgba(107,114,128,.1); color: #6b7280; }
.backup-file-actions { display: flex; gap: 5px; flex-shrink: 0; }
.btn-bk-dl {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(22,163,74,.1);
    color: #16a34a;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; text-decoration: none;
    transition: background .15s;
    font-weight: 700;
}
.btn-bk-dl:hover { background: rgba(22,163,74,.22); }
.btn-bk-del {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(239,68,68,.08);
    color: #dc2626;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: background .15s;
}
.btn-bk-del:hover { background: rgba(239,68,68,.18); }
.backup-empty { padding: 32px 20px; text-align: center; color: var(--text-soft); font-size: 13px; }

/* Settings collapsible */
.backup-settings-block { margin-bottom: 20px; }
.backup-settings-block summary {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-soft);
    list-style: none;
    user-select: none;
}
.backup-settings-block summary::-webkit-details-marker { display: none; }
.backup-settings-block[open] summary { border-radius: 12px 12px 0 0; }
.backup-settings-block .card-box { border-radius: 0 0 12px 12px; margin-bottom: 0; }
