/* ===================================================
   E-Claim Design System v2
   Inter font · Deep navy + indigo accent · Premium UI
   =================================================== */

:root {
    /* Core palette */
    --c-navy:       #0f1f4b;
    --c-navy-mid:   #1a3278;
    --c-indigo:     #4f6ef7;
    --c-indigo-lt:  #eef1fe;
    --c-indigo-mid: #c7d0fb;

    /* Surfaces */
    --c-bg:         #f4f6fb;
    --c-surface:    #ffffff;
    --c-surface-2:  #f8fafc;

    /* Text */
    --c-text:       #0d1b3e;
    --c-muted:      #6b7a9a;
    --c-subtle:     #a0adc5;

    /* Borders */
    --c-border:     #e4e9f2;
    --c-border-lt:  #eff2f8;

    /* Semantic */
    --c-success:    #16a34a;
    --c-danger:     #dc2626;
    --c-warning:    #d97706;

    /* Focus ring */
    --c-ring:       rgba(79, 110, 247, 0.22);

    /* Sizing */
    --r-sm:  8px;
    --r-md:  12px;
    --r-lg:  16px;
    --r-xl:  20px;
    --r-2xl: 24px;

    /* Shadows */
    --shadow-xs:  0 1px 2px rgba(13, 27, 62, 0.05);
    --shadow-sm:  0 2px 8px rgba(13, 27, 62, 0.07);
    --shadow-md:  0 4px 20px rgba(13, 27, 62, 0.09);
    --shadow-lg:  0 12px 40px rgba(13, 27, 62, 0.13);

    /* Transitions */
    --t-fast:   0.12s ease;
    --t-normal: 0.2s ease;

    /* Legacy aliases (keep backward compat) */
    --app-primary:  var(--c-navy);
    --app-accent:   var(--c-indigo);
    --app-bg:       var(--c-bg);
    --app-surface:  var(--c-surface);
    --app-text:     var(--c-text);
    --app-muted:    var(--c-muted);
    --app-border:   var(--c-border);
    --app-ring:     var(--c-ring);
    --app-radius:   var(--r-lg);
}

/* ── Base ─────────────────────────────────────────── */

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

body.app-body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ───────────────────────────────────── */

.app-heading {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--c-text);
    line-height: 1.2;
}

.app-kicker {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-indigo);
    font-weight: 700;
}

.app-form-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-muted);
    font-weight: 600;
}

/* ── Public Navbar ────────────────────────────────── */

.app-navbar {
    background: var(--c-navy);
    border: none;
    box-shadow: 0 4px 24px rgba(15, 31, 75, 0.25);
}

.app-navbar .navbar-brand,
.app-navbar .nav-link,
.app-navbar .text-muted {
    color: rgba(255, 255, 255, 0.92);
}

.app-navbar .brand-title {
    font-weight: 600;
    letter-spacing: 0.01em;
    font-size: 0.95rem;
}

.app-navbar .btn-outline-secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

.app-navbar .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
}

.brand-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.app-inline-logo      { width: 48px; height: 48px; object-fit: contain; }
.app-inline-logo-lg   { width: 68px; height: 68px; }

.app-main { max-width: 1140px; }

/* ── Shell Layout ─────────────────────────────────── */

.app-shell-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 228px 1fr;
}

/* ── Sidebar ──────────────────────────────────────── */

.app-sidebar {
    background: var(--c-navy);
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.1rem 1rem 0.9rem;
    font-weight: 700;
    font-size: 0.92rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.01em;
    flex-shrink: 0;
}

.app-sidebar-brand:hover { color: rgba(255,255,255,0.85); }

.app-sidebar-brand .brand-logo {
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.app-sidebar-section-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 700;
    padding: 1rem 1rem 0.3rem;
}

.app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.5rem 0.65rem;
    flex: 1;
}

.app-sidebar-link {
    border-radius: var(--r-sm);
    padding: 0.55rem 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--t-fast), color var(--t-fast);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

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

.app-sidebar-link.is-active {
    background: rgba(79, 110, 247, 0.25);
    color: #fff;
    border: 1px solid rgba(79, 110, 247, 0.35);
}

.app-sidebar-link .nav-icon {
    font-size: 1rem;
    opacity: 0.8;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.app-sidebar-link.is-active .nav-icon { opacity: 1; }

.app-sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.app-sidebar-footer form button {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    border-radius: var(--r-sm);
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background var(--t-fast);
    cursor: pointer;
}

.app-sidebar-footer form button:hover {
    background: rgba(255,255,255,0.13);
    color: #fff;
}

.app-sidebar-user-info {
    padding: 0.6rem 0.75rem;
    margin: 0 0 0.5rem;
    border-radius: var(--r-sm);
    background: rgba(255,255,255,0.06);
}

.app-sidebar-user-info .user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    margin-bottom: 0.1rem;
}

.app-sidebar-user-info .user-role {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* ── Top Bar ──────────────────────────────────────── */

.app-shell-main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    background: var(--c-bg);
}

.app-shell-topbar {
    height: 56px;
    border-bottom: 1px solid var(--c-border);
    background: var(--c-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: var(--shadow-xs);
}

.app-shell-home-link {
    font-size: 0.88rem;
    color: var(--c-muted);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--t-fast);
}

.app-shell-home-link:hover { color: var(--c-indigo); }

.app-shell-topbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-shell-user {
    font-size: 0.81rem;
    color: var(--c-muted);
    font-weight: 500;
}

.app-shell-content {
    padding: 1.25rem 1.5rem 2rem;
}

/* ── Cards ────────────────────────────────────────── */

.app-shell-card,
.app-claim-card,
.app-login-card {
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    background: var(--c-surface);
    border: 1px solid var(--c-border) !important;
}

.app-section-card {
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 1.25rem;
    background: var(--c-surface);
    transition: border-color var(--t-normal), box-shadow var(--t-normal);
    margin-bottom: 1.25rem;
}

.app-section-card:focus-within {
    border-color: var(--c-indigo-mid);
    box-shadow: 0 0 0 3px var(--c-ring);
}

.app-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--c-border-lt);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Stat Cards ───────────────────────────────────── */

.app-summary-grid .app-stat-card {
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: var(--c-surface);
    padding: 1rem 1.1rem 0.85rem;
    min-height: 88px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--t-normal), transform var(--t-normal);
}

.app-summary-grid .app-stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.app-summary-grid .app-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    background: var(--stat-accent, var(--c-indigo));
}

.app-summary-grid .col-md-3:nth-child(1) .app-stat-card { --stat-accent: #4f6ef7; }
.app-summary-grid .col-md-3:nth-child(2) .app-stat-card { --stat-accent: #f59e0b; }
.app-summary-grid .col-md-3:nth-child(3) .app-stat-card { --stat-accent: #3b82f6; }
.app-summary-grid .col-md-3:nth-child(4) .app-stat-card { --stat-accent: #10b981; }

.app-stat-card__label {
    color: var(--c-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.app-stat-card__value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.03em;
    line-height: 1;
}

/* ── Claim Header Card ────────────────────────────── */

.app-claim-header-card {
    background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-navy-mid) 100%) !important;
    border: none !important;
    box-shadow: var(--shadow-md) !important;
}

.app-claim-header-card .app-kicker  { color: rgba(255,255,255,0.55); }
.app-claim-header-card .app-heading { color: #fff; }
.app-claim-header-card .text-muted  { color: rgba(255,255,255,0.55) !important; }

/* ── Workflow Rail ────────────────────────────────── */

.app-workflow-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

.app-workflow-step {
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--r-md);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: all var(--t-normal);
    background: rgba(255,255,255,0.06);
}

.app-workflow-step__dot {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.app-workflow-step__label {
    font-size: 0.76rem;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
}

.app-workflow-step.is-completed {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.55);
}

.app-workflow-step.is-completed .app-workflow-step__dot {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
}

.app-workflow-step.is-current {
    background: rgba(79, 110, 247, 0.35);
    border-color: rgba(79, 110, 247, 0.6);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.2);
}

.app-workflow-step.is-current .app-workflow-step__dot {
    background: var(--c-indigo);
    border: none;
    color: #fff;
}

.app-workflow-step.is-future {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.3);
}

.app-workflow-step.is-future .app-workflow-step__dot {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.3);
}

/* ── Admin Toolbar ────────────────────────────────── */

.app-admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* ── Table ────────────────────────────────────────── */

.app-table-wrap {
    max-height: 62vh;
    overflow: auto;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.app-admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--c-surface-2);
}

.app-table thead th,
.app-admin-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--c-border);
    padding: 0.75rem 1rem;
}

.app-admin-table tbody tr {
    transition: background var(--t-fast);
}

.app-admin-table tbody tr:hover { background: var(--c-indigo-lt); }

.app-admin-table td {
    vertical-align: middle;
    border-color: var(--c-border-lt);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

/* ── Status Badges ────────────────────────────────── */

.app-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.app-status-badge--submitted    { background: #f1f5f9; color: #475569; border-color: #dde4ed; }
.app-status-badge--review       { background: #eef1fe; color: #3730a3; border-color: #c7d0fb; }
.app-status-badge--investigating { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.app-status-badge--forwarded    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.app-status-badge--with-courier { background: #ecfeff; color: #155e75; border-color: #a5f3fc; }
.app-status-badge--approved     { background: #ecfdf3; color: #166534; border-color: #bbf7d0; }
.app-status-badge--rejected     { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.app-status-badge--paid         { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.app-status-badge--neutral      { background: #f8fafc; color: #475569; border-color: #e2e8f0; }

/* ── Chips ────────────────────────────────────────── */

.app-chip {
    border-radius: 999px;
    font-size: 0.68rem;
    padding: 0.18rem 0.55rem;
    font-weight: 700;
    border: 1px solid transparent;
    letter-spacing: 0.02em;
}

.app-chip--neutral { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.app-chip--success { background: #ecfdf3; color: #166534; border-color: #bbf7d0; }
.app-chip--info    { background: #eef1fe; color: #3730a3; border-color: #c7d0fb; }
.app-chip--danger  { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* ── Info Rows ────────────────────────────────────── */

.app-info-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.5rem;
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-sm);
    background: var(--c-surface-2);
    padding: 0.65rem 0.85rem;
}

.app-info-row strong {
    color: var(--c-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.app-info-row span {
    color: var(--c-text);
    word-break: break-word;
    font-size: 0.875rem;
}

/* ── Timeline ─────────────────────────────────────── */

.app-timeline {
    display: grid;
    gap: 0.6rem;
    border-left: 2px solid var(--c-border);
    padding-left: 1rem;
    position: relative;
}

.app-timeline-item {
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-md);
    padding: 0.75rem 0.9rem;
    transition: border-color var(--t-normal), box-shadow var(--t-normal), transform var(--t-normal);
    position: relative;
}

.app-timeline-item::before {
    content: '';
    position: absolute;
    left: -1.4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-indigo);
    border: 2px solid var(--c-surface);
    box-shadow: 0 0 0 1px var(--c-indigo-mid);
}

.app-timeline-item:hover {
    border-color: var(--c-indigo-mid);
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.app-timeline-meta {
    font-size: 0.75rem;
    color: var(--c-muted);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

/* ── Attachments ──────────────────────────────────── */

.app-attach-wrap { width: min(460px, 100%); }

/* ── Action Panel ─────────────────────────────────── */

.app-action-panel {
    position: sticky;
    top: 72px;
}

/* ── Buttons ──────────────────────────────────────── */

.btn {
    transition: transform var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast), border-color var(--t-fast);
    font-weight: 500;
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
    background: var(--c-indigo);
    border: none;
    font-weight: 600;
    min-height: 42px;
    padding-inline: 1.1rem;
    box-shadow: 0 4px 14px rgba(79, 110, 247, 0.3);
    color: #fff;
}

.btn-primary:hover {
    background: #3d5cec;
    box-shadow: 0 6px 20px rgba(79, 110, 247, 0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-primary:disabled {
    opacity: 0.65;
    transform: none;
}

.btn-outline-primary {
    color: var(--c-indigo);
    border-color: var(--c-indigo-mid);
}

.btn-outline-primary:hover {
    background: var(--c-indigo-lt);
    color: var(--c-indigo);
    border-color: var(--c-indigo);
}

.btn-purple {
    background: #7c3aed;
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-purple:hover {
    background: #6d28d9;
    color: #fff;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
}

.btn:focus-visible {
    box-shadow: 0 0 0 4px var(--c-ring);
    outline: none;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: var(--c-indigo-mid);
    box-shadow: 0 0 0 4px var(--c-ring);
}

/* ── Inputs ───────────────────────────────────────── */

.app-input {
    border-radius: var(--r-md);
    border: 1px solid #d4dce8;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    background: #fff;
    font-size: 0.9rem;
    transition: border-color var(--t-normal), box-shadow var(--t-normal);
}

textarea.app-input {
    min-height: 110px;
    padding-top: 0.75rem;
}

.app-readonly {
    background-color: var(--c-surface-2) !important;
    color: #475569;
    border-style: dashed !important;
}

/* ── Public Claim Form ────────────────────────────── */

.app-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1.75rem;
}

.app-step {
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 0.65rem 0.75rem;
    background: #fff;
    color: var(--c-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: all var(--t-normal);
    cursor: default;
}

.app-step span {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid #c8d4e0;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

.app-step label { font-weight: 500; }

.app-step.active {
    border-color: var(--c-indigo-mid);
    background: var(--c-indigo-lt);
    color: #3730a3;
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
}

.app-step.active span {
    border-color: var(--c-indigo);
    background: var(--c-indigo);
    color: #fff;
}

.app-step.done {
    border-color: #d1fae5;
    background: #f0fdf4;
    color: #16a34a;
}

.app-step.done span {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.app-ref-banner {
    border-radius: var(--r-md);
    padding: 1.1rem 1.25rem;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
}

.app-ref-banner__title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--c-muted);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.app-ref-banner__ref {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--c-navy);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.app-ref-banner__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #334155;
}

.app-trust-note {
    font-size: 0.84rem;
    color: #475569;
}

.app-submit-note {
    background: var(--c-indigo-lt);
    border: 1px solid var(--c-indigo-mid);
    border-radius: var(--r-sm);
    padding: 0.85rem 0.95rem;
    color: #3730a3;
    font-size: 0.875rem;
}

.app-item-cards { display: grid; gap: 0.65rem; }

.app-item-card {
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    background: #fff;
    padding: 0.9rem;
    animation: fadeIn .18s ease;
}

/* ── Login Page ───────────────────────────────────── */

.app-login-split {
    min-height: calc(100vh - 100px);
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(340px, 460px);
    gap: 1.25rem;
    align-items: stretch;
}

.app-login-visual {
    border-radius: var(--r-2xl);
    border: 1px solid rgba(79, 110, 247, 0.2);
    background: linear-gradient(145deg, var(--c-navy) 0%, var(--c-navy-mid) 55%, #1e4299 100%);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

.app-login-visual::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,110,247,0.35) 0%, transparent 70%);
    pointer-events: none;
}

.app-login-visual::after {
    content: '';
    position: absolute;
    bottom: -40px; left: 50%;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,110,247,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.app-login-visual .app-kicker { color: rgba(255,255,255,0.55); }
.app-login-visual .app-heading { color: #fff; font-size: 1.75rem; }
.app-login-visual .text-muted { color: rgba(255,255,255,0.55) !important; }

.app-login-visual-features {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.app-login-visual-features li {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.65);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-login-visual-features li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(79,110,247,0.4);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}

.app-login-form-wrap {
    display: flex;
    align-items: center;
}

.app-login-card {
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--c-border) !important;
    border-radius: var(--r-xl) !important;
    width: 100%;
}

/* ── Links / Tabs ─────────────────────────────────── */

.app-links-card { border: 1px solid var(--c-border) !important; }

.app-tabs-clean .nav-link {
    border-radius: var(--r-sm);
    font-weight: 600;
    color: var(--c-muted);
    font-size: 0.875rem;
    transition: background var(--t-fast), color var(--t-fast);
}

.app-tabs-clean .nav-link:hover {
    background: var(--c-indigo-lt);
    color: var(--c-indigo);
}

.app-tabs-clean .nav-link.active {
    background: var(--c-indigo);
    color: #fff;
}

.app-link-table-wrap {
    max-height: 68vh;
    overflow: auto;
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-md);
}

.app-link-table td { vertical-align: middle; }

/* Clickable table rows */
.app-table-clickable tbody tr.app-row-link:hover {
    background: var(--c-indigo-lt);
}

.app-table-clickable tbody tr.app-row-link:active {
    background: var(--c-indigo-mid);
}

.app-table-clickable tbody tr.app-row-link td:first-child {
    position: relative;
}

.app-table-clickable tbody tr.app-row-link td:first-child::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: transparent;
    border-radius: 0 2px 2px 0;
    transition: background var(--t-fast);
}

.app-table-clickable tbody tr.app-row-link:hover td:first-child::before {
    background: var(--c-indigo);
}

/* Icon-only action buttons */
.app-btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    color: var(--c-muted);
    border-radius: var(--r-sm);
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    font-size: 0.82rem;
    line-height: 1;
    text-decoration: none;
}

.app-btn-icon:hover {
    background: var(--c-indigo-lt);
    border-color: var(--c-indigo-mid);
    color: var(--c-indigo);
}

.app-btn-icon--danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* ── Empty State ──────────────────────────────────── */

.app-empty-state {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--c-muted);
}

.app-empty-state__icon {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.app-empty-state h3 {
    font-size: 1rem;
    margin: 0;
    color: var(--c-text);
    font-weight: 600;
}

.app-empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* ── AJAX Loader / Toast ──────────────────────────── */

.app-ajax-loader {
    position: sticky;
    top: 0.5rem;
    z-index: 30;
    margin-bottom: 0.75rem;
    margin-left: auto;
    width: fit-content;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--c-indigo-mid);
    background: var(--c-indigo-lt);
    color: #3730a3;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.app-ajax-toast {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1050;
    min-width: 200px;
    padding: 0.65rem 1rem;
    border-radius: var(--r-md);
    color: #fff;
    box-shadow: var(--shadow-lg);
    font-size: 0.855rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-ajax-toast.is-success { background: #16a34a; }
.app-ajax-toast.is-error   { background: #dc2626; }

/* ── Animations ───────────────────────────────────── */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes appMainEnter {
    from { opacity: 0.4; transform: translateY(5px); }
    to   { opacity: 1;   transform: translateY(0); }
}

.app-main-transition {
    position: relative;
    transition: opacity var(--t-normal), transform var(--t-normal);
}

.app-main-transition.is-leaving {
    opacity: 0.3;
    transform: translateY(3px);
}

.app-main-transition.is-entering {
    animation: appMainEnter 0.2s ease;
}

/* ── Pagination ───────────────────────────────────── */

.pagination .page-link {
    border-radius: var(--r-sm);
    border-color: var(--c-border);
    color: var(--c-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: var(--c-indigo);
    border-color: var(--c-indigo);
}

.pagination .page-link:hover {
    background: var(--c-indigo-lt);
    color: var(--c-indigo);
}

/* ── Alert overrides ──────────────────────────────── */

.alert {
    border-radius: var(--r-md);
    font-size: 0.875rem;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 992px) {
    .app-shell-layout {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.5rem;
        gap: 0;
    }

    .app-sidebar-brand {
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,0.08);
        padding: 0.5rem 0.75rem;
    }

    .app-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.3rem 0.4rem;
        gap: 0.15rem;
    }

    .app-sidebar-footer,
    .app-sidebar-user-info,
    .app-sidebar-section-label { display: none; }

    .app-action-panel { position: static; }

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

    .app-login-visual {
        min-height: 160px;
        border-radius: var(--r-lg);
    }

    .app-login-visual-features { display: none; }
}

@media (max-width: 768px) {
    .app-main { max-width: 100%; }

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

    .app-stepper { grid-template-columns: 1fr 1fr; }

    .app-shell-content { padding: 1rem; }

    /* Admin claims table — card layout on mobile */
    .app-admin-table thead { display: none; }
    .app-admin-table tbody tr {
        display: block;
        border: 1px solid var(--c-border-lt);
        border-radius: var(--r-md);
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        background: var(--c-surface);
    }
    .app-admin-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        border-bottom: 1px solid var(--c-border-lt);
        padding: 0.4rem 0.5rem;
        font-size: 0.82rem;
    }
    .app-admin-table td:last-child { border-bottom: none; }
    .app-admin-table td[data-label]::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.7rem;
        text-transform: uppercase;
        color: var(--c-muted);
        letter-spacing: 0.05em;
        flex-shrink: 0;
        margin-right: 0.75rem;
    }
}

/* ══════════════════════════════════════════════
   Claim Form (clf-*) — public-facing
   ══════════════════════════════════════════════ */

.clf-wrap {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* Progress bar */
.clf-progress-bar {
    height: 3px;
    background: var(--c-border);
    border-radius: 999px;
    margin: 1.5rem 0 1.75rem;
    overflow: hidden;
}
.clf-progress-fill {
    height: 100%;
    background: var(--c-indigo);
    border-radius: 999px;
    transition: width 0.35s ease;
}

/* Stepper */
.clf-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.75rem;
}
.clf-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}
.clf-step__num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--c-subtle);
    background: #fff;
    transition: all 0.2s ease;
}
.clf-step__label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--c-subtle);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color 0.2s ease;
}
.clf-step--active .clf-step__num {
    border-color: var(--c-indigo);
    background: var(--c-indigo);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(79,110,247,0.15);
}
.clf-step--active .clf-step__label { color: var(--c-indigo); }
.clf-step--done .clf-step__num {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}
.clf-step--done .clf-step__num::after { content: '✓'; font-size: 0.72rem; }
.clf-step--done .clf-step__num { font-size: 0; }
.clf-step--done .clf-step__label { color: #16a34a; }
.clf-step-line {
    flex: 1;
    height: 2px;
    background: var(--c-border);
    margin: 0 0.35rem;
    margin-bottom: 18px;
    transition: background 0.2s ease;
}

/* Card */
.clf-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Header */
.clf-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.75rem 2rem 1.5rem;
    border-bottom: 1px solid var(--c-border-lt);
}
.clf-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}
.clf-kicker {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--c-indigo);
    margin: 0 0 0.2rem;
}
.clf-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--c-text);
    letter-spacing: -0.025em;
    margin: 0;
    line-height: 1.2;
}

/* Ref banner */
.clf-ref-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--c-surface-2);
    border-bottom: 1px solid var(--c-border-lt);
}
.clf-ref-banner__label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--c-muted);
    font-weight: 700;
    margin-bottom: 0.2rem;
}
.clf-ref-banner__ref {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--c-navy);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.clf-ref-banner__meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--c-muted);
}
.clf-ref-banner__meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.clf-ref-banner__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

/* Error banner */
.clf-error-banner {
    margin: 0;
    padding: 0.75rem 2rem;
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.875rem;
}

/* Section */
.clf-section {
    padding: 1.75rem 2rem;
}
.clf-section-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}
.clf-section-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--c-indigo-lt);
    border: 1px solid var(--c-indigo-mid);
    color: var(--c-indigo);
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.clf-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text);
    margin: 0 0 0.15rem;
}
.clf-section-sub {
    font-size: 0.82rem;
    color: var(--c-muted);
    margin: 0;
}

.clf-divider {
    height: 1px;
    background: var(--c-border-lt);
    margin: 0 2rem;
}

/* Fields */
.clf-fields { display: flex; flex-direction: column; gap: 1rem; }
.clf-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.clf-field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.clf-field--full { grid-column: 1 / -1; }

.clf-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}
.clf-required { color: var(--c-danger); margin-left: 1px; }
.clf-hint {
    font-size: 0.75rem;
    color: var(--c-muted);
    margin: 0.3rem 0 0;
}
.clf-field-error {
    font-size: 0.78rem;
    color: var(--c-danger);
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.clf-input {
    display: block;
    width: 100%;
    border: 1.5px solid #d4dce8;
    border-radius: var(--r-md);
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    color: var(--c-text);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    min-height: 42px;
    -webkit-appearance: none;
}
.clf-input:focus {
    outline: none;
    border-color: var(--c-indigo);
    box-shadow: 0 0 0 3px var(--c-ring);
}
.clf-input.is-invalid { border-color: var(--c-danger); }
.clf-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }
.clf-input--readonly {
    background: var(--c-surface-2);
    color: var(--c-muted);
    border-style: dashed;
    cursor: default;
}
.clf-textarea { min-height: 100px; resize: vertical; }
.clf-input--sm { min-height: 36px; padding: 0.4rem 0.65rem; font-size: 0.85rem; }

/* Locked input */
.clf-input-locked { position: relative; }
.clf-lock-badge {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--c-muted);
    padding: 0.15rem 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    pointer-events: none;
}

/* Optional toggle */
.clf-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    background: var(--c-surface-2);
    color: var(--c-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.clf-toggle-btn:hover { border-color: var(--c-indigo-mid); color: var(--c-indigo); background: var(--c-indigo-lt); }
.clf-toggle-hint { color: var(--c-subtle); font-weight: 400; font-size: 0.75rem; }
.clf-toggle-icon { transition: transform 0.2s ease; flex-shrink: 0; }
.clf-toggle-btn--open .clf-toggle-icon { transform: rotate(180deg); }

.clf-optional-block {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-md);
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Items table */
.clf-items-table-wrap {
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 0.6rem;
}
.clf-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.clf-items-table thead th {
    background: var(--c-surface-2);
    color: var(--c-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--c-border);
    text-align: left;
}
.clf-item-row td {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--c-border-lt);
    vertical-align: middle;
}
.clf-item-row:last-child td { border-bottom: none; }
.clf-remove-row {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--c-muted);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    padding: 0;
}
.clf-remove-row:hover { background: #fef2f2; color: var(--c-danger); border-color: #fecaca; }
.clf-add-item-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1.5px dashed var(--c-indigo-mid);
    border-radius: var(--r-sm);
    background: var(--c-indigo-lt);
    color: var(--c-indigo);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    font-family: inherit;
}
.clf-add-item-btn:hover { background: #dde4fd; border-color: var(--c-indigo); }

/* Upload zone */
.clf-upload-zone {
    border: 2px dashed var(--c-border);
    border-radius: var(--r-md);
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
    background: var(--c-surface-2);
}
.clf-upload-zone:hover, .clf-upload-zone--over {
    border-color: var(--c-indigo);
    background: var(--c-indigo-lt);
}
.clf-upload-icon { color: var(--c-muted); margin-bottom: 0.5rem; }
.clf-upload-text { font-size: 0.875rem; color: var(--c-text); margin: 0 0 0.2rem; }
.clf-upload-link { color: var(--c-indigo); font-weight: 600; cursor: pointer; text-decoration: underline; }
.clf-upload-hint { font-size: 0.75rem; color: var(--c-muted); margin: 0; }
.clf-file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* ── Per-item receipt upload cell ── */
.clf-receipt-cell {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.clf-receipt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-sm);
    background: var(--c-surface);
    color: var(--c-muted);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.14s, background 0.14s, color 0.14s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.clf-receipt-btn:hover, .clf-receipt-btn:focus-visible {
    border-color: var(--c-indigo);
    background: var(--c-indigo-lt);
    color: var(--c-indigo);
    outline: none;
}
.clf-receipt-btn--camera {
    border-color: #d1fae5;
    background: #f0fdf4;
    color: #059669;
}
.clf-receipt-btn--camera:hover { border-color: #059669; background: #d1fae5; color: #065f46; }
.clf-receipt-btn--done {
    border-color: var(--c-indigo) !important;
    background: var(--c-indigo-lt) !important;
    color: var(--c-indigo) !important;
}
.clf-receipt-preview { display: flex; align-items: center; }
.clf-receipt-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--c-border-lt);
    display: block;
}
.clf-receipt-pdf-badge {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #dc2626;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 3px;
    padding: 2px 5px;
}

/* Mobile: hide camera button on desktop via JS, but keep layout clean */
@media (hover: hover) and (pointer: fine) {
    .clf-receipt-btn--camera { display: none; }
}

/* ── Upload source buttons ── */
.clf-upload-sources {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}
.clf-src-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.85rem 0.5rem;
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.clf-src-btn:hover, .clf-src-btn:focus-visible {
    border-color: var(--c-indigo);
    background: var(--c-indigo-lt);
    color: var(--c-indigo);
    outline: none;
}
.clf-src-btn svg { flex-shrink: 0; }
.clf-src-btn--camera { border-color: #d1fae5; background: #f0fdf4; color: #059669; }
.clf-src-btn--camera:hover, .clf-src-btn--camera:focus-visible { border-color: #059669; background: #d1fae5; color: #065f46; }
.clf-src-btn--pdf    { border-color: #fee2e2; background: #fff5f5; color: #dc2626; }
.clf-src-btn--pdf:hover, .clf-src-btn--pdf:focus-visible { border-color: #dc2626; background: #fee2e2; color: #991b1b; }

/* Hidden real file inputs */
.clf-file-input-hidden { display: none; }

/* Compact drop zone (shown beneath source buttons) */
.clf-upload-zone--compact {
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.83rem;
    color: var(--c-muted);
}
.clf-upload-zone--compact .clf-upload-link { color: var(--c-indigo); font-weight: 600; cursor: pointer; }
.clf-upload-zone--compact .clf-upload-hint { font-size: 0.72rem; color: var(--c-muted); display: block; margin-top: 0.15rem; }
.clf-upload-zone--compact svg { flex-shrink: 0; color: var(--c-muted); }

/* Rich file list */
.clf-file-item--rich {
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
}
.clf-file-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--c-border-lt);
    flex-shrink: 0;
    display: block;
}
.clf-file-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--c-border-lt);
    background: var(--c-surface-2);
    flex-shrink: 0;
    color: var(--c-muted);
}
.clf-file-icon--pdf { background: #fff5f5; border-color: #fecaca; color: #dc2626; }
.clf-file-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.clf-file-name {
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--c-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.clf-file-size { font-size: 0.72rem; color: var(--c-muted); }
.clf-file-remove {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    padding: 0;
    transition: background 0.12s, color 0.12s;
    -webkit-tap-highlight-color: transparent;
}
.clf-file-remove:hover { background: #fee2e2; color: #dc2626; }
.clf-file-count {
    font-size: 0.75rem;
    color: var(--c-muted);
    margin: 0.3rem 0 0;
    text-align: right;
}

.clf-file-list { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.6rem; }
.clf-file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--c-text);
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-sm);
    padding: 0.4rem 0.65rem;
}
.clf-file-item svg { flex-shrink: 0; color: var(--c-muted); }
.clf-file-item span { margin-left: auto; color: var(--c-muted); font-size: 0.75rem; }

/* Wizard steps */
.clf-wizard-step--hidden { display: none !important; }

/* Wizard nav bar */
.clf-wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--c-border-lt);
    gap: 0.75rem;
}
.clf-wizard-nav--submit { border-top: none; padding-top: 0.5rem; }

/* Shared button base */
.clf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: var(--r-md);
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
    text-decoration: none;
}
.clf-btn--primary {
    background: var(--c-indigo);
    color: #fff;
    box-shadow: 0 3px 10px rgba(79,110,247,0.28);
}
.clf-btn--primary:hover { background: #3d5cec; box-shadow: 0 5px 16px rgba(79,110,247,0.4); transform: translateY(-1px); }
.clf-btn--ghost {
    background: transparent;
    color: var(--c-muted);
    border: 1px solid var(--c-border);
}
.clf-btn--ghost:hover { background: var(--c-surface-2); color: var(--c-text); }

/* Stepper — clickable done steps */
.clf-step--done { cursor: pointer; }
.clf-step--done:hover .clf-step__num { background: #15803d; }

/* Submit section */
.clf-section--submit { background: var(--c-surface-2); }
.clf-submit-block { display: flex; flex-direction: column; gap: 1rem; }
.clf-security-note {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: var(--c-indigo-lt);
    border: 1px solid var(--c-indigo-mid);
    border-radius: var(--r-md);
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    color: #3730a3;
    line-height: 1.5;
}
.clf-security-note svg { flex-shrink: 0; margin-top: 1px; }
.clf-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.clf-consent { font-size: 0.78rem; color: var(--c-muted); margin: 0; }
.clf-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--c-indigo);
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(79,110,247,0.35);
    transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
    font-family: inherit;
    white-space: nowrap;
}
.clf-submit-btn:hover { background: #3d5cec; box-shadow: 0 6px 20px rgba(79,110,247,0.45); transform: translateY(-1px); }
.clf-submit-btn:disabled { opacity: 0.65; transform: none; }

/* Declaration box */
.clf-declaration-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--r-md);
    padding: 1.25rem 1.5rem;
    font-size: 0.875rem;
    color: var(--c-text);
    line-height: 1.7;
}
.clf-declaration-box p { margin: 0 0 0.75rem; }
.clf-declaration-box p:last-child { margin-bottom: 0; }
.clf-declaration-heading {
    font-weight: 700;
    font-size: 0.95rem;
    color: #92400e;
    margin-bottom: 0.75rem !important;
    letter-spacing: 0.01em;
}
.clf-declaration-process { color: var(--c-muted); font-size: 0.82rem; }

/* Checkbox */
.clf-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 1rem 1.25rem;
    background: var(--c-surface-2);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    transition: border-color 0.15s, background 0.15s;
}
.clf-checkbox-label:hover { border-color: var(--c-indigo-mid); background: var(--c-indigo-lt); }
.clf-checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--c-indigo);
    cursor: pointer;
}
.clf-checkbox-text { font-size: 0.875rem; color: var(--c-text); line-height: 1.55; }
.clf-checkbox--invalid { border-color: var(--c-danger) !important; background: #fef2f2 !important; }

/* Upload note */
.clf-upload-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--c-muted);
    line-height: 1.55;
    padding: 0.6rem 0.9rem;
    background: var(--c-surface-2);
    border-radius: var(--r-sm);
    border: 1px solid var(--c-border-lt);
}
.clf-upload-note svg { flex-shrink: 0; margin-top: 1px; color: var(--c-indigo); }

/* Responsive */
@media (max-width: 640px) {
    .clf-wrap { padding: 0 0 2rem; }
    .clf-header { padding: 1.25rem 1.25rem 1rem; }
    .clf-ref-banner { flex-direction: column; gap: 0.5rem; padding: 0.9rem 1.25rem; }
    .clf-section { padding: 1.25rem; }
    .clf-field-row, .clf-field-row--3 { grid-template-columns: 1fr; }
    .clf-stepper { gap: 0; }
    .clf-step__label { font-size: 0.6rem; }
    .clf-submit-row { flex-direction: column; align-items: stretch; }
    .clf-submit-btn { justify-content: center; }
    .clf-wizard-nav { flex-direction: column-reverse; align-items: stretch; }
    .clf-wizard-nav .clf-btn, .clf-wizard-nav .clf-submit-btn { justify-content: center; width: 100%; }
    .clf-items-table thead { display: none; }
    .clf-items-table, .clf-items-table tbody, .clf-item-row, .clf-item-row td { display: block; width: 100%; }
    .clf-item-row { border-bottom: 1px solid var(--c-border-lt); padding-bottom: 0.75rem; margin-bottom: 0.75rem; }
    .clf-item-row td { border: none !important; padding: 0.25rem 0; }
    .clf-item-row td:last-child { text-align: right; }
    .clf-declaration-box { padding: 1rem; }
    /* Upload sources: stack vertically, larger tap targets on mobile */
    .clf-upload-sources { grid-template-columns: 1fr; gap: 0.5rem; }
    .clf-src-btn { flex-direction: row; justify-content: flex-start; padding: 0.9rem 1rem; gap: 0.65rem; font-size: 0.88rem; }
    .clf-upload-zone--compact { flex-direction: column; gap: 0.3rem; text-align: center; padding: 0.75rem 1rem; }
    /* Receipt buttons on mobile: show camera, larger tap area */
    .clf-receipt-btn--camera { display: inline-flex !important; }
    .clf-receipt-btn { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Attachment thumbnail grid */
.clf-attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
}
.clf-thumb-btn {
    position: relative;
    aspect-ratio: 1;
    padding: 0;
    border: 1.5px solid var(--c-border-lt);
    border-radius: var(--r-sm);
    overflow: hidden;
    background: #f1f5f9;
    cursor: pointer;
    transition: border-color 0.15s;
}
.clf-thumb-btn:hover { border-color: var(--c-indigo); }
.clf-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30,40,80,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    border-radius: inherit;
}
.clf-thumb-btn:hover .clf-thumb-overlay { opacity: 1; }
