/* ------------------------------------------------------------------ */
/* Variables                                                           */
/* ------------------------------------------------------------------ */

:root {
    --ink: #0f0f0f;
    --ink-soft: #2d2d2d;
    --ink-muted: #6b6b6b;
    --ink-faint: #a0a0a0;
    --paper: #f7f6f3;
    --paper-warm: #f0ede6;
    --paper-card: #ffffff;
    --accent: #1a472a;
    --accent-light: #e8f0eb;
    --accent-2: #c17f24;
    --accent-2-light: #fdf3e3;
    --danger: #c0392b;
    --danger-light: #fdecea;
    --success: #1a472a;
    --success-light: #e8f0eb;
    --success-border: #b9d4c2;
    --info: #4a6c9b;
    --info-light: #e9eef5;
    --violet: #6a5a9b;
    --violet-light: #efecf5;
    --rose: #b0567a;
    --rose-light: #f7e9ef;
    --border: #e4e1da;
    --border-soft: #eeebe4;

    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    --max-width: 1200px;
    --auth-width: 440px;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* ------------------------------------------------------------------ */
/* Reset                                                               */
/* ------------------------------------------------------------------ */

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ------------------------------------------------------------------ */
/* Navbar                                                              */
/* ------------------------------------------------------------------ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--ink);
}

.brand-icon {
    color: var(--accent);
    font-size: 1.3rem;
}

.brand-name { color: var(--ink); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a { color: var(--ink-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.nav-active { color: var(--accent); font-weight: 600; }

.nav-greeting { color: var(--ink-faint); }

.nav-cta {
    background: var(--ink) !important;
    color: var(--paper) !important;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--accent) !important; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------------ */
/* Flash messages                                                      */
/* ------------------------------------------------------------------ */

.flash-container {
    position: fixed;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 150;
    width: calc(100% - 2rem);
    max-width: var(--auth-width);
    pointer-events: none;
}

.flash {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 32px rgba(0,0,0,0.07);
    pointer-events: auto;
    transition: opacity 0.4s ease;
}

.flash-hide { opacity: 0; }

.flash-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.flash-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* ------------------------------------------------------------------ */
/* Main                                                                */
/* ------------------------------------------------------------------ */

.main-content { min-height: calc(100vh - 60px - 100px); }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero {
    padding: 4rem 2rem 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: 3.5rem;
}

.hero-text {
    max-width: 640px;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(26, 71, 42, 0.15);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.hero-title-green {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--ink-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

/* ------------------------------------------------------------------ */
/* Hero visual / mock dashboard                                        */
/* ------------------------------------------------------------------ */

.hero-visual {
    width: 100%;
}

.mock-dashboard {
    background: #eeecea;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem 1.5rem;
    width: 100%;
    box-shadow: 0 4px 32px rgba(0,0,0,0.07);
}

.mock-traffic-lights {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.tl {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.tl-red         { background: #ff5f56; }
.tl-yellow      { background: #ffbd2e; }
.tl-green-light { background: #27c93f; }

.mock-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mock-stat-tile {
    background: var(--paper-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
}

.mock-stat-label {
    font-size: 0.75rem;
    color: var(--ink-muted);
    font-weight: 500;
}

.mock-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.mock-stat-tag          { font-size: 0.75rem; font-weight: 500; }
.mock-tag-danger        { color: var(--danger); }
.mock-tag-accent        { color: var(--accent); }
.mock-tag-muted         { color: var(--ink-muted); }

.mock-cat-bars {
    background: var(--paper-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mock-cat-row-new {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    gap: 1rem;
}

.mock-cat-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-soft);
    text-align: right;
}

.mock-bar-track {
    height: 10px;
    background: #e4e2dd;
    border-radius: 999px;
    overflow: hidden;
}

.mock-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

.mock-bar-food   { background: #d4921e; }
.mock-bar-travel { background: #4a8cc9; }
.mock-bar-bills  { background: #7070b8; }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn-primary {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-primary:hover { background: var(--accent); }

.btn-ghost {
    display: inline-block;
    background: transparent;
    color: var(--ink-soft);
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s;
    text-decoration: none;
}

.btn-ghost:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.btn-ghost.btn-danger {
    color: var(--danger);
    border-color: var(--danger);
    font-family: var(--font-body);
    cursor: pointer;
}

.btn-ghost.btn-danger:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

/* ------------------------------------------------------------------ */
/* Features section                                                    */
/* ------------------------------------------------------------------ */

.features {
    background: var(--paper-warm);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 5rem 2rem;
}

.features-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--paper-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.feature-icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 700;
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.feature-body {
    font-size: 0.9rem;
    color: var(--ink-muted);
    line-height: 1.7;
}

/* ------------------------------------------------------------------ */
/* CTA section                                                         */
/* ------------------------------------------------------------------ */

.cta-section {
    padding: 6rem 2rem;
    text-align: center;
}

.cta-inner {
    max-width: 560px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--ink);
    margin-bottom: 1rem;
}

.cta-body {
    font-size: 1rem;
    color: var(--ink-muted);
    margin-bottom: 2rem;
}

/* ------------------------------------------------------------------ */
/* Auth pages                                                          */
/* ------------------------------------------------------------------ */

.auth-section {
    min-height: calc(100vh - 60px - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.auth-container {
    width: 100%;
    max-width: var(--auth-width);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--ink-muted);
}

.auth-card {
    background: var(--paper-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.auth-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid #f5c6c2;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.6rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--paper);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus { border-color: var(--accent); }

.form-input::placeholder { color: var(--ink-faint); }

.input-prefix-group { position: relative; }

.input-prefix {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.input-with-prefix { padding-left: 1.75rem; }

.category-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

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

.category-pill {
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.55;
    transition: opacity 0.15s, border-color 0.15s;
}

.category-pill:hover { opacity: 0.85; }

.category-radio:checked + .category-pill {
    opacity: 1;
    border-color: currentColor;
}

.category-radio:focus + .category-pill {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.date-quick-picks {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.date-quick-pick {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--ink-soft);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent);
    width: 1rem;
    height: 1rem;
}

.btn-submit {
    width: 100%;
    padding: 0.7rem;
    background: var(--ink);
    color: var(--paper);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.btn-submit:hover { background: var(--accent); }

.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: var(--ink-muted);
}

.auth-switch a {
    color: var(--accent);
    font-weight: 500;
}

.auth-switch a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.footer {
    background: var(--ink);
    color: var(--paper);
    padding: 2.5rem 2rem;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.footer .brand-icon { color: var(--accent-2); font-size: 1.5rem; }

.footer-name {
    font-weight: 600;
    font-size: 1rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--ink-faint);
}

/* ------------------------------------------------------------------ */
/* Video modal                                                         */
/* ------------------------------------------------------------------ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-box {
    background: #000;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 820px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.35); }

.modal-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.modal-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ------------------------------------------------------------------ */
/* Legal pages (Terms, Privacy)                                        */
/* ------------------------------------------------------------------ */

.legal-page {
    padding: 5rem 2rem 6rem;
}

.legal-inner {
    max-width: 720px;
    margin: 0 auto;
}

.legal-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.legal-meta {
    font-size: 0.85rem;
    color: var(--ink-faint);
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.legal-section p {
    font-size: 0.95rem;
    color: var(--ink-muted);
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-section ul li {
    font-size: 0.95rem;
    color: var(--ink-muted);
    line-height: 1.65;
    padding-left: 1.25rem;
    position: relative;
}

.legal-section ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--ink-faint);
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 900px) {
    .hero-visual { display: none; }
    .features-inner { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.5rem 1rem;
        background: var(--paper);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    }

    .nav-links.is-open { display: flex; }

    .nav-links > * {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 44px;
        padding: 0.6rem 0;
    }

    .nav-links > *:not(.nav-cta) { border-bottom: 1px solid var(--border-soft); }
    .nav-links > *:last-child { border-bottom: none; }

    .nav-links .nav-cta { justify-content: center; margin-top: 0.5rem; }

    .hero { padding: 3rem 1rem 2rem; }

    .hero-actions { flex-direction: column; align-items: stretch; width: 100%; }
    .hero-actions .btn-primary { width: 100%; text-align: center; }
    .cta-section .btn-primary { display: block; width: 100%; text-align: center; }
}

/* ------------------------------------------------------------------ */
/* Profile page                                                        */
/* ------------------------------------------------------------------ */

.profile-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--paper-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.profile-header-action {
    margin-left: auto;
    align-self: center;
}

.profile-avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--ink);
    margin-bottom: 0.25rem;
}

.profile-email {
    font-size: 0.9rem;
    color: var(--ink-muted);
}

.profile-meta {
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin-top: 0.3rem;
}

.profile-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 1rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.profile-stats .mock-stat-tile { padding: 1.25rem 1.5rem; }

.profile-filter-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filter-pill:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.filter-pill.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.filter-custom-range {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-soft);
}

.filter-date-group {
    margin-bottom: 0;
    min-width: 150px;
}

.filter-apply-btn {
    padding: 0.6rem 1.25rem;
}

.profile-card {
    background: var(--paper-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

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

.profile-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding: 0 0.75rem 0.75rem;
    border-bottom: 1px solid var(--border-soft);
}

.profile-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--border-soft);
    color: var(--ink-soft);
}

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

.profile-table td.amount-cell {
    text-align: right;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

.profile-table td.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.profile-table td.actions-cell .btn-ghost {
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
}

.profile-table td.actions-cell form {
    display: inline-block;
    margin-left: 0.5rem;
}

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

#recent-transactions { scroll-margin-top: 80px; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.pagination-btn {
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
}

.pagination-btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.profile-columns {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2.5rem;
    align-items: start;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
}

.category-badge-food          { background: var(--accent-2-light); color: var(--accent-2); }
.category-badge-transport     { background: var(--info-light); color: var(--info); }
.category-badge-bills         { background: var(--violet-light); color: var(--violet); }
.category-badge-health        { background: var(--danger-light); color: var(--danger); }
.category-badge-entertainment { background: var(--accent-light); color: var(--accent); }
.category-badge-shopping      { background: var(--rose-light); color: var(--rose); }
.category-badge-other         { background: var(--border-soft); color: var(--ink-muted); }

.profile-cat-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-cat-row {
    display: grid;
    grid-template-columns: 110px 1fr 70px;
    align-items: center;
    gap: 1rem;
}

.profile-cat-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-soft);
}

.profile-cat-amount {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    text-align: right;
}

.bar-food          { background: var(--accent-2); }
.bar-transport     { background: var(--info); }
.bar-bills         { background: var(--violet); }
.bar-health        { background: var(--danger); }
.bar-entertainment { background: var(--accent); }
.bar-shopping      { background: var(--rose); }
.bar-other         { background: var(--ink-faint); }

@media (max-width: 900px) {
    .profile-columns { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ */
/* Coming soon / analytics placeholder                                 */
/* ------------------------------------------------------------------ */

.coming-soon-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 1.5rem;
}

.coming-soon-card {
    background: var(--paper-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 32px rgba(0,0,0,0.07);
    max-width: 480px;
    width: 100%;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.75rem;
}

.coming-soon-icon {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-lg);
    background: var(--accent);
    color: var(--paper-card);
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: var(--paper-card);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
}

.coming-soon-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    color: var(--ink);
}

.coming-soon-body {
    font-size: 1rem;
    color: var(--ink-muted);
    line-height: 1.7;
    max-width: 22rem;
}

.coming-soon-dots {
    display: flex;
    gap: 0.5rem;
}

.coming-soon-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    animation: coming-soon-pulse 1.2s ease-in-out infinite;
}

.coming-soon-dot:nth-child(1) { animation-delay: 0s; }
.coming-soon-dot:nth-child(2) { animation-delay: 0.2s; }
.coming-soon-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes coming-soon-pulse {
    0%, 100% { background: var(--border); }
    30% { background: var(--accent); }
}

@media (prefers-reduced-motion: reduce) {
    .coming-soon-dot { animation: none; }
    .coming-soon-dot:nth-child(1) { background: var(--accent); }
}

.coming-soon-caption {
    font-size: 0.8rem;
    color: var(--ink-faint);
}

@media (max-width: 640px) {
    .profile-stats { grid-template-columns: 1fr; }
    .profile-header { flex-direction: column; text-align: center; }
    .profile-header-action { margin-left: 0; }
    .profile-cat-row { grid-template-columns: 90px 1fr 60px; gap: 0.6rem; }
    .filter-custom-range { flex-direction: column; align-items: stretch; }
    .filter-date-group { min-width: 0; }
    .coming-soon-card { padding: 2.5rem 1.75rem; }

    /* Transaction table: card-ify via data-label */
    .profile-table thead { display: none; }

    .profile-table,
    .profile-table tbody,
    .profile-table tr {
        display: block;
        width: 100%;
    }

    .profile-table tr {
        padding: 0.5rem 0 0.75rem;
        border-bottom: 1px solid var(--border-soft);
    }

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

    .profile-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.4rem 0;
        border-bottom: none;
    }

    .profile-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        color: var(--ink-faint);
    }

    .profile-table td.amount-cell { white-space: normal; }

    .profile-table td.actions-cell {
        display: block;
        text-align: left;
        white-space: normal;
    }

    .profile-table td.actions-cell::before {
        display: block;
        margin-bottom: 0.5rem;
    }

    /* Touch targets (~44px) */
    .filter-pill,
    .category-pill,
    .date-quick-pick,
    .btn-ghost,
    .pagination-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
