/* ------------------------------------------------------------------
   Cheque Reminder — iOS-inspired glassmorphism, mobile-first.
   ------------------------------------------------------------------ */

:root {
    --ios-blue: #007AFF;
    --ios-blue-deep: #0056CC;
    --ios-green: #34C759;
    --ios-red: #FF3B30;
    --ios-orange: #FF9500;
    --ios-yellow: #FFCC00;
    --ios-gray: #8E8E93;
    --ios-gray6: #F2F2F7;
    --ios-gray5: #E5E5EA;
    --text-primary: #1C1C1E;
    --text-secondary: #636366;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-bg-strong: rgba(255, 255, 255, 0.74);
    --glass-border: rgba(255, 255, 255, 0.55);
    --glass-highlight: rgba(255, 255, 255, 0.9);
    /* Shadows tinted with the background's blue hue instead of flat black. */
    --shadow-color: 217, 55%, 45%;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    /* Three-tier elevation scale — each stacks a soft ambient shadow with a
       tighter, darker contact shadow so raised surfaces read as genuinely
       lifted off the page rather than just "blurred at the edge". */
    --elev-1: 0 1px 2px hsla(var(--shadow-color), 0.14), 0 3px 8px -3px hsla(var(--shadow-color), 0.16);
    --elev-2: 0 2px 4px hsla(var(--shadow-color), 0.14), 0 12px 26px -10px hsla(var(--shadow-color), 0.26);
    --elev-3: 0 4px 8px hsla(var(--shadow-color), 0.16), 0 26px 52px -16px hsla(var(--shadow-color), 0.34);
    /* Reusable bevel pair — a light rim on the top edge, a soft dark rim on
       the bottom — the pattern that makes a flat shape read as a raised,
       molded surface with a light source above it. */
    --bevel-top: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
    --bevel-bottom: 0 -1px 1px rgba(17, 24, 39, 0.08) inset;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: #EEF3FB;
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Ambient, slowly-drifting color blobs behind the frosted UI — gives the
   glassmorphism something with texture and color to actually refract,
   instead of a flat two-stop gradient. Fixed + pointer-events:none so it
   never interferes with layout or touch. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(38vmax 38vmax at 12% -6%, rgba(0, 122, 255, 0.22), transparent 60%),
        radial-gradient(42vmax 42vmax at 108% 18%, rgba(120, 100, 210, 0.11), transparent 60%),
        radial-gradient(46vmax 46vmax at 20% 108%, rgba(52, 130, 199, 0.1), transparent 60%),
        linear-gradient(180deg, #E4EEFC 0%, #EEF3FB 45%, #F4F6FA 100%);
    animation: driftBlobs 26s ease-in-out infinite alternate;
}

/* Fixed, subtle grain overlay so large flat surfaces don't look sterile. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 160px 160px;
}

@keyframes driftBlobs {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-1.5%, 1.5%, 0) scale(1.04); }
}

a { color: var(--ios-blue); text-decoration: none; transition: color 0.2s var(--ease-smooth); }
a:hover { color: var(--ios-blue-deep); }

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

@keyframes popIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

/* -------------------- App shell -------------------- */

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(12px, env(safe-area-inset-top)) 18px 12px;
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    backdrop-filter: blur(20px) saturate(1.6);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 8px 24px -12px hsla(var(--shadow-color), 0.25);
    animation: fadeUp 0.4s var(--ease-smooth) both;
}

.app-topbar h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.app-topbar .company-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.app-main {
    padding: 16px 16px calc(96px + var(--safe-bottom));
    max-width: 720px;
    margin: 0 auto;
    /* Lets descendant 3D tilts (stat cards, list rows) render with real
       perspective distortion instead of a flat skew. */
    perspective: 1200px;
}

/* -------------------- Glass cards -------------------- */

.glass-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    backdrop-filter: blur(24px) saturate(1.8);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    /* Outer tinted shadow + inset highlight/shade pair simulates a
       refracted glass edge rather than a flat bordered box. */
    box-shadow:
        0 1px 0 var(--glass-highlight) inset,
        0 -1px 0 rgba(31, 41, 55, 0.04) inset,
        0 10px 30px -10px hsla(var(--shadow-color), 0.22);
    padding: 18px;
    margin-bottom: 14px;
    transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-smooth), border-color 0.35s;
    animation: fadeUp 0.45s var(--ease-smooth) both;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.stat-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    backdrop-filter: blur(24px) saturate(1.8);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow:
        0 1px 0 var(--glass-highlight) inset,
        0 10px 28px -12px hsla(var(--shadow-color), 0.22);
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-smooth);
    animation: popIn 0.4s var(--ease-spring) both;
}

.stat-grid .stat-card:nth-child(1) { animation-delay: 0.02s; }
.stat-grid .stat-card:nth-child(2) { animation-delay: 0.08s; }
.stat-grid .stat-card:nth-child(3) { animation-delay: 0.14s; }
.stat-grid .stat-card:nth-child(4) { animation-delay: 0.2s; }

@media (hover: hover) {
    .glass-card:hover {
        transform: translateY(-2px);
        box-shadow:
            0 1px 0 var(--glass-highlight) inset,
            0 16px 36px -12px hsla(var(--shadow-color), 0.3);
    }
    /* The tilt is the "3D" signature move — small enough (3deg) to read as
       a physical card lifting toward the cursor, not a gimmick. */
    .stat-card:hover {
        transform: perspective(1200px) rotateX(3deg) translateY(-3px) scale(1.015);
        box-shadow:
            0 1px 0 var(--glass-highlight) inset,
            var(--elev-3);
    }
}

.stat-card .label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .value {
    font-size: 27px;
    font-weight: 750;
    margin-top: 4px;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/* -------------------- Status badges -------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    transition: transform 0.2s var(--ease-spring);
    /* Embossed "enamel pin" look — a bright top rim and a soft outer
       shadow in the badge's own color, instead of a flat colored fill. */
    box-shadow: var(--bevel-top), 0 3px 6px -2px currentColor;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.badge-pending { background: rgba(255, 149, 0, 0.15); color: #B36200; }
.badge-pending::before { animation: pulseDot 1.8s ease-in-out infinite; }
.badge-cleared { background: rgba(52, 199, 89, 0.15); color: #1F7A34; }
.badge-bounced { background: rgba(255, 59, 48, 0.15); color: #B0231A; }
.badge-cancelled { background: rgba(142, 142, 147, 0.18); color: #4B4B4E; }

.badge-license-trial { background: rgba(0, 122, 255, 0.15); color: #0056B3; }
.badge-license-active { background: rgba(52, 199, 89, 0.15); color: #1F7A34; }
.badge-license-expired { background: rgba(255, 59, 48, 0.15); color: #B0231A; }
.badge-license-suspended { background: rgba(142, 142, 147, 0.18); color: #4B4B4E; }

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.8); }
}

/* -------------------- Lists -------------------- */

.cheque-list { list-style: none; margin: 0; padding: 0; }

.cheque-item {
    display: block;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 10px;
    color: var(--text-primary);
    min-height: 44px;
    box-shadow: 0 1px 0 var(--glass-highlight) inset, 0 6px 18px -10px hsla(var(--shadow-color), 0.2);
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-smooth), background 0.25s;
    animation: fadeUp 0.4s var(--ease-smooth) both;
}

.cheque-list li { animation: fadeUp 0.4s var(--ease-smooth) both; }
.cheque-list li:nth-child(1) { animation-delay: 0.02s; }
.cheque-list li:nth-child(2) { animation-delay: 0.06s; }
.cheque-list li:nth-child(3) { animation-delay: 0.1s; }
.cheque-list li:nth-child(4) { animation-delay: 0.14s; }
.cheque-list li:nth-child(5) { animation-delay: 0.18s; }
.cheque-list li:nth-child(n+6) { animation-delay: 0.2s; }

a.cheque-item:active, .cheque-item:has(a:active) {
    transform: scale(0.98);
}

@media (hover: hover) {
    a.cheque-item:hover {
        transform: translateY(-1px);
        background: var(--glass-bg-strong);
        box-shadow: 0 1px 0 var(--glass-highlight) inset, 0 10px 24px -10px hsla(var(--shadow-color), 0.28);
    }
}

.cheque-item .row1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.cheque-item .party { font-weight: 600; font-size: 16px; }
.cheque-item .amount { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.cheque-item .meta { font-size: 13px; color: var(--text-secondary); }

/* -------------------- Buttons & forms -------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s var(--ease-spring), box-shadow 0.2s var(--ease-smooth), filter 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

/* Pressed-key feel: drop toward the surface and flatten its shadow,
   rather than just shrinking in place. */
.btn:active {
    transform: translateY(1px) scale(0.98);
    filter: brightness(0.97);
}

.btn-primary {
    background: linear-gradient(180deg, #2E9BFF 0%, var(--ios-blue) 55%, var(--ios-blue-deep) 100%);
    color: #fff;
    box-shadow: var(--bevel-top), 0 1px 0 rgba(0, 0, 0, 0.1) inset, 0 8px 20px -6px hsla(211, 100%, 50%, 0.55);
}
.btn-primary:active { box-shadow: 0 2px 6px -2px hsla(211, 100%, 50%, 0.5), 0 1px 3px rgba(0, 0, 0, 0.18) inset; }

.btn-danger {
    background: linear-gradient(180deg, #FF6B60 0%, var(--ios-red) 55%, #D6291F 100%);
    color: #fff;
    box-shadow: var(--bevel-top), 0 1px 0 rgba(0, 0, 0, 0.1) inset, 0 8px 20px -6px hsla(3, 100%, 59%, 0.5);
}
.btn-danger:active { box-shadow: 0 2px 6px -2px hsla(3, 100%, 59%, 0.45), 0 1px 3px rgba(0, 0, 0, 0.18) inset; }

.btn-secondary {
    background: linear-gradient(180deg, #FAFAFC 0%, var(--ios-gray5) 100%);
    color: var(--text-primary);
    box-shadow: var(--bevel-top), var(--bevel-bottom), 0 4px 10px -4px hsla(var(--shadow-color), 0.2);
}
.btn-secondary:active { box-shadow: var(--bevel-bottom), 0 1px 2px hsla(var(--shadow-color), 0.15) inset; }

.btn-block { width: 100%; }

@media (hover: hover) {
    .btn-primary:hover { filter: brightness(1.06); box-shadow: var(--bevel-top), 0 10px 26px -6px hsla(211, 100%, 50%, 0.62); transform: translateY(-1px); }
    .btn-danger:hover { filter: brightness(1.06); box-shadow: var(--bevel-top), 0 10px 26px -6px hsla(3, 100%, 59%, 0.58); transform: translateY(-1px); }
    .btn-secondary:hover { background: linear-gradient(180deg, #FFFFFF 0%, #E4E4E9 100%); transform: translateY(-1px); }
}

.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .filter-chip:focus-visible, .tab-item:focus-visible {
    outline: 2px solid var(--ios-blue);
    outline-offset: 2px;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    min-height: 44px;
    /* 16px prevents iOS Safari auto-zoom on focus */
    font-size: 16px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--ios-gray5);
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-primary);
    transition: border-color 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth), background 0.2s;
}

.form-control:hover { border-color: #C7C7CC; }

.form-control:focus {
    outline: none;
    border-color: var(--ios-blue);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.14);
}

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

.form-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.form-check input { width: 22px; height: 22px; accent-color: var(--ios-blue); }

.field-error { color: var(--ios-red); font-size: 13px; margin-top: 4px; animation: fadeUp 0.25s var(--ease-smooth) both; }

/* -------------------- Alerts -------------------- */

.alert {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
    animation: fadeUp 0.35s var(--ease-spring) both;
    border: 1px solid transparent;
}
.alert-success { background: rgba(52, 199, 89, 0.12); color: #1F7A34; border-color: rgba(52, 199, 89, 0.25); }
.alert-error { background: rgba(255, 59, 48, 0.12); color: #B0231A; border-color: rgba(255, 59, 48, 0.25); }
.alert-warning { background: rgba(255, 149, 0, 0.12); color: #9A5B00; border-color: rgba(255, 149, 0, 0.25); }

/* -------------------- Bottom tab bar -------------------- */

.tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    backdrop-filter: blur(24px) saturate(1.8);
    border-top: 1px solid var(--glass-border);
    padding-bottom: var(--safe-bottom);
    box-shadow: 0 -8px 24px -12px hsla(var(--shadow-color), 0.25);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    gap: 2px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    position: relative;
    transition: color 0.25s var(--ease-smooth);
    -webkit-tap-highlight-color: transparent;
}

.tab-item:active .icon { transform: scale(0.88); }

.tab-item.active { color: var(--ios-blue); }
.tab-item .icon {
    line-height: 1;
    transition: transform 0.25s var(--ease-spring);
    display: inline-block;
}
.tab-item .icon svg {
    width: 23px;
    height: 23px;
    display: block;
    /* A soft drop-shadow gives the line icon real presence instead of
       sitting perfectly flat against the glass — subtle, not a gimmick. */
    filter: drop-shadow(0 1px 1.5px rgba(28, 28, 30, 0.18));
    transition: filter 0.25s var(--ease-smooth);
}
.tab-item.active .icon svg {
    filter: drop-shadow(0 2px 5px hsla(211, 100%, 50%, 0.4));
}

.tab-item.active::before {
    content: '';
    position: absolute;
    top: 2px;
    width: 26px;
    height: 3px;
    border-radius: 999px;
    background: var(--ios-blue);
    animation: popIn 0.3s var(--ease-spring) both;
}

/* -------------------- Floating action button -------------------- */

.fab {
    position: fixed;
    right: 20px;
    bottom: calc(76px + var(--safe-bottom));
    z-index: 30;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(155deg, #4FADFF 0%, var(--ios-blue) 45%, var(--ios-blue-deep) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    /* Bright rim (light source above) + dark inner rim (defines the edge)
       + a soft ambient shadow and a tight contact shadow — a disc that
       genuinely reads as sitting proud of the page, not just blurred. */
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.5) inset,
        0 -3px 6px rgba(0, 40, 90, 0.35) inset,
        0 4px 8px hsla(211, 100%, 40%, 0.3),
        0 16px 32px -8px hsla(211, 100%, 50%, 0.55);
    border: none;
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-smooth);
    animation: popIn 0.5s 0.15s var(--ease-spring) both, fabPulse 3.2s 1s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
}

.fab svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(0, 30, 70, 0.3)); }

.fab:active {
    transform: scale(0.93) translateY(1px);
    box-shadow:
        0 -2px 5px rgba(0, 40, 90, 0.4) inset,
        0 2px 4px rgba(0, 40, 90, 0.3) inset,
        0 4px 10px hsla(211, 100%, 40%, 0.4);
}

@media (hover: hover) {
    .fab:hover {
        transform: translateY(-3px) scale(1.04);
        box-shadow:
            0 2px 0 rgba(255, 255, 255, 0.5) inset,
            0 -3px 6px rgba(0, 40, 90, 0.35) inset,
            0 6px 12px hsla(211, 100%, 40%, 0.32),
            0 20px 40px -8px hsla(211, 100%, 50%, 0.62);
    }
}

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 12px 28px -6px hsla(211, 100%, 50%, 0.55), 0 0 0 0 hsla(211, 100%, 50%, 0.35); }
    50% { box-shadow: 0 12px 28px -6px hsla(211, 100%, 50%, 0.55), 0 0 0 10px hsla(211, 100%, 50%, 0); }
}

/* -------------------- Auth (login) layout -------------------- */

.auth-wrap {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: blur(30px) saturate(1.8);
    backdrop-filter: blur(30px) saturate(1.8);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow:
        0 1px 0 var(--glass-highlight) inset,
        0 24px 60px -16px hsla(var(--shadow-color), 0.35);
    padding: 32px 24px;
    animation: popIn 0.5s var(--ease-spring) both;
}

.auth-card h1 {
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
    text-align: center;
    text-wrap: balance;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

/* -------------------- Misc -------------------- */

.page-title {
    font-size: 23px;
    font-weight: 750;
    letter-spacing: -0.015em;
    margin: 4px 0 16px;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    margin: 22px 0 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 16px;
}

.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.filter-chip {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.65);
    border: 1px solid var(--ios-gray5);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: transform 0.2s var(--ease-spring), background 0.2s, color 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.filter-chip:active { transform: scale(0.95); }
@media (hover: hover) {
    .filter-chip:hover { border-color: var(--ios-blue); color: var(--ios-blue); }
}
.filter-chip.active { background: var(--ios-blue); color: #fff; border-color: var(--ios-blue); box-shadow: 0 6px 16px -6px hsla(211, 100%, 50%, 0.5); }

table.simple-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.simple-table th, table.simple-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--ios-gray5); }
table.simple-table th { color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
table.simple-table td { font-variant-numeric: tabular-nums; }
table.simple-table tr { transition: background 0.2s; }
@media (hover: hover) {
    table.simple-table tr:hover { background: rgba(0, 122, 255, 0.05); }
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ------------------------------------------------------------------
   Cheque due-date calendar
   ------------------------------------------------------------------ */
.calendar-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar-nav .month-label { font-size: 17px; font-weight: 700; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.calendar-weekdays span { text-align: center; font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 18px; }

.calendar-day {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--bevel-top), var(--elev-1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 2px;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s var(--ease-spring), box-shadow 0.2s;
}
.calendar-day:active { transform: scale(0.94); }
.calendar-day.empty { background: transparent; border-color: transparent; box-shadow: none; }
.calendar-day .day-num { font-size: 13px; font-weight: 600; }
.calendar-day.today .day-num { color: var(--ios-blue); }
.calendar-day.selected { background: var(--ios-blue); border-color: var(--ios-blue); box-shadow: var(--elev-2); }
.calendar-day.selected .day-num { color: #fff; }
.calendar-day .day-dot { width: 5px; height: 5px; border-radius: 50%; }
.calendar-day .day-dot.pay { background: var(--ios-red); }
.calendar-day .day-dot.receive { background: var(--ios-green); }
.calendar-day.selected .day-dot { background: #fff; }
.calendar-day .day-count { font-size: 9px; font-weight: 600; color: var(--text-secondary); }
.calendar-day.selected .day-count { color: rgba(255,255,255,0.9); }

@media (min-width: 640px) {
    .app-main { padding-left: 24px; padding-right: 24px; }
}
