/* TRAXX Client Portal — Styles */

:root {
    /* Sound Bookkeepers brand — navy chrome, teal actions, gold highlight.
       Mirrors the navbar palette so the whole portal reads as one system. */
    --sb-navy:         #18244e;
    --sb-navy-2:       #1e2d62;
    --sb-teal:         #1a9e8f;
    --sb-gold:         #e8a020;

    /* Primary action color — a deeper teal than the navbar accent so white
       text on it clears WCAG AA. Used for buttons, links, focus, active. */
    --brand-primary:   #0f766e;
    --brand-secondary: #115e59;
    --brand-gradient:  linear-gradient(135deg, #0f766e 0%, #115e59 100%);
    --brand-light:     #ecfdf8;

    /* Aliases the dashboard's inline styles already reference via
       var(--name, fallback). Defining them here repaints those elements
       (view toggle, tabs, bubbles, thread/ticket accents, send buttons)
       onto the brand without touching any markup. */
    --primary:         #0f766e;
    --primary-weak:    rgba(15,118,110,0.10);
    --text-primary:    #1e293b;
    --bg-card:         #f8fafc;

    --text-dark:       #1e293b;
    --text-muted:      #64748b;
    --border-color:    #e2e8f0;
    --bg-light:        #f4f6f9;
    --white:           #ffffff;
    --success:         #16a34a;
    --danger:          #dc2626;
    --warning:         #f59e0b;

    --radius:          10px;
    --radius-sm:       8px;
    --shadow-sm:       0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.07);
    --shadow-md:       0 6px 18px rgba(16,24,40,0.09);
}

* { box-sizing: border-box; }

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

/* ── Navbar ─────────────────────────────── */
.portal-navbar {
    background: var(--brand-gradient);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.25);
}

.portal-navbar .brand {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-navbar .nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portal-navbar .nav-right a,
.portal-navbar .nav-right button {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.9rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.portal-navbar .nav-right a:hover,
.portal-navbar .nav-right button:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

/* Org Switcher */
.org-switcher {
    position: relative;
}

.org-switcher-btn {
    /* Solid dark background as a fallback — the rgba white on header
     * works when header is dark, but on pages where the header/surrounding
     * context is light the white text would disappear. Solid color ensures
     * contrast either way. */
    background: #0f766e !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: #ffffff !important;
    padding: 0.4rem 1rem !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}
.org-switcher-btn:hover {
    background: #4338ca !important;
}

.org-switcher-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.4rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 250px;
    z-index: 1000;
    overflow: hidden;
}
.org-switcher-dropdown.show { display: block; }

/* Regular org entries — dark text on white, subtle hover tint.
 * The selector is scoped under .portal-navbar .nav-right to beat the
 * navbar's `.portal-navbar .nav-right a { color: white }` rule that sets
 * white text on all links in the top bar. Equal-specificity selectors
 * without this scoping get beaten by the navbar rule despite !important. */
.portal-navbar .nav-right .org-switcher-dropdown a,
.portal-navbar .nav-right .org-switcher-dropdown a:link,
.portal-navbar .nav-right .org-switcher-dropdown a:visited,
.org-switcher-dropdown a,
.org-switcher-dropdown a:link,
.org-switcher-dropdown a:visited {
    display: block;
    padding: 0.7rem 1rem;
    color: #1e293b !important;
    background: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.portal-navbar .nav-right .org-switcher-dropdown a:hover,
.org-switcher-dropdown a:hover {
    background: #f1f5f9;
    color: #1e293b !important;
}

/* Currently-active org — visually distinct green tint with matching text */
.portal-navbar .nav-right .org-switcher-dropdown a.active,
.portal-navbar .nav-right .org-switcher-dropdown a.active:link,
.portal-navbar .nav-right .org-switcher-dropdown a.active:visited,
.org-switcher-dropdown a.active,
.org-switcher-dropdown a.active:link,
.org-switcher-dropdown a.active:visited {
    background: #d1fae5 !important;
    color: #065f46 !important;
    font-weight: 600;
}
.portal-navbar .nav-right .org-switcher-dropdown a.active:hover,
.org-switcher-dropdown a.active:hover {
    background: #a7f3d0 !important;
    color: #065f46 !important;
}

.org-switcher-dropdown a:last-child { border-bottom: none; }

/* ── Login Page ─────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-gradient);
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-card h1 {
    text-align: center;
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.login-card .logo-mark {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* ── Forms ──────────────────────────────── */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.btn {
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--brand-gradient);
    color: white;
    width: 100%;
}

.btn-primary:hover { opacity: 0.9; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.btn-outline:hover { background: var(--bg-light); }

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* ── Alert ──────────────────────────────── */
.alert {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.alert-danger { background: #fff5f5; color: #c53030; border: 1px solid #feb2b2; }
.alert-success { background: #f0fff4; color: #276749; border: 1px solid #9ae6b4; }
.alert-info { background: #ebf8ff; color: #2b6cb0; border: 1px solid #90cdf4; }

/* ── Dashboard Cards ────────────────────── */
.portal-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header .icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.card-header .icon.purple { background: #ede9fe; color: #7c3aed; }
.card-header .icon.blue { background: #dbeafe; color: #2563eb; }
.card-header .icon.green { background: #d1fae5; color: #059669; }
.card-header .icon.orange { background: #ffedd5; color: #ea580c; }

.card-body {
    padding: 1.2rem;
}

/* Links list inside cards */
.link-list { list-style: none; padding: 0; margin: 0; }

.link-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.link-list li:last-child { border-bottom: none; }

.link-list a {
    color: var(--brand-primary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.link-list a:hover { text-decoration: underline; }

.link-list .link-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

/* Recent activity */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-primary);
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.activity-dot.new { background: var(--success); }
.activity-dot.modified { background: var(--warning); }
.activity-dot.deleted { background: var(--danger); }

.activity-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ── Messages ───────────────────────────── */
.message-thread {
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
}

.message-bubble {
    max-width: 75%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message-bubble.client {
    background: var(--brand-gradient);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message-bubble.staff {
    background: #f1f5f9;
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
}

.message-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.message-bubble.client .message-meta { color: rgba(255,255,255,0.7); }

.message-input-area {
    display: flex;
    gap: 0.6rem;
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--border-color);
}

.message-input-area textarea {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 44px;
    max-height: 120px;
    font-family: inherit;
}

/* ── Empty State ────────────────────────── */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.empty-state .icon { font-size: 2.5rem; margin-bottom: 0.5rem; }

/* ════════════════════════════════════════════════════════════════════
 * MOBILE / RESPONSIVE
 * ────────────────────────────────────────────────────────────────────
 * Targets phones first (≤ 700px). The unified-view tables on the
 * dashboard are built with 5–6 columns and overflow phone screens, so
 * below the breakpoint each table row reflows into a vertical card:
 *
 *   ┌────────────────────────────┐
 *   │ 💬 Subject              ⋯ │
 *   │ Preview text            ⋯ │
 *   │ 3h ago    [New badge]     │
 *   │              [Reply ▶]    │
 *   └────────────────────────────┘
 *
 * The transformation is pure CSS — no markup change. We coerce <table>,
 * <tbody>, <tr>, <td> into block layout so each row becomes a vertical
 * stack of its cells.
 *
 * Header gets the simpler treatment: nav links wrap to a second row
 * below the brand instead of overflowing horizontally.
 * ════════════════════════════════════════════════════════════════════ */

/* Hamburger button — hidden on desktop, shown on mobile.
 * Lives inside .nav-right alongside the org switcher and nav-menu. */
.nav-hamburger {
    display: none;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    border-radius: 6px;
    padding: 0.4rem 0.65rem;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.25); }

/* Nav menu wrapper — on desktop displays flat alongside the org switcher
 * (matching the previous layout). On mobile collapses into a dropdown. */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Smaller-than-tablet: hamburger appears, nav links collapse into panel */
@media (max-width: 768px) {
    .card-grid { grid-template-columns: 1fr; }
    .portal-content { padding: 1rem; }
    .message-bubble { max-width: 90%; }

    /* Compact navbar — single row, brand left, controls right */
    .portal-navbar {
        height: 56px;
        padding: 0 0.75rem;
    }
    .portal-navbar .brand {
        font-size: 1rem;
        gap: 0.4rem;
    }
    .portal-navbar .brand img { height: 24px !important; }
    .portal-navbar .nav-right {
        gap: 0.4rem;
    }

    /* Show the hamburger, hide the inline nav-menu by default */
    .nav-hamburger { display: inline-flex; align-items: center; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 56px;
        right: 0.5rem;
        background: #fff;
        border: 1px solid var(--border-color, #e2e8f0);
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        min-width: 220px;
        max-width: calc(100vw - 1rem);
        padding: 6px 0;
        z-index: 1000;
        overflow: hidden;
    }
    .nav-menu.open { display: flex; }

    /* Links inside the dropdown — dark text on white, full-width rows.
     * Selectors are scoped under .portal-navbar .nav-right to beat the
     * navbar's `.portal-navbar .nav-right a { color: white }` rule. Equal
     * or lower specificity loses to that rule even with !important. */
    .portal-navbar .nav-right .nav-menu a,
    .portal-navbar .nav-right .nav-menu a:link,
    .portal-navbar .nav-right .nav-menu a:visited,
    .portal-navbar .nav-right .nav-menu span,
    .nav-menu a,
    .nav-menu span {
        display: block;
        padding: 10px 16px;
        color: #1e293b !important;
        background: #fff;
        text-decoration: none;
        font-size: 0.92rem;
        border-bottom: 1px solid var(--border-color, #f1f5f9);
        white-space: nowrap;
    }
    .portal-navbar .nav-right .nav-menu a:hover,
    .nav-menu a:hover {
        background: #f1f5f9;
        color: #1e293b !important;
    }
    .portal-navbar .nav-right .nav-menu a.nav-active,
    .nav-menu a.nav-active {
        background: #e6f6f3;
        color: #0f766e !important;
        font-weight: 600;
    }
    /* The user's name row — non-clickable label */
    .portal-navbar .nav-right .nav-menu .nav-username,
    .nav-menu .nav-username {
        font-size: 0.78rem;
        color: #64748b !important;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        background: #f8fafc;
    }
    /* Sign Out — emphasize as the last action */
    .portal-navbar .nav-right .nav-menu a[href*="logout"],
    .nav-menu a[href*="logout"] {
        color: #dc2626 !important;
        font-weight: 600;
        border-bottom: none;
    }
    .portal-navbar .nav-right .nav-menu a[href*="logout"]:hover,
    .nav-menu a[href*="logout"]:hover {
        background: #fef2f2;
        color: #dc2626 !important;
    }
    .nav-menu a:last-child { border-bottom: none; }

    /* Single-org pill (when user has only one org) — fits beside hamburger */
    .org-name-pill {
        font-size: 0.78rem;
        color: rgba(255,255,255,0.9);
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Org switcher button stays visible but tighter */
    .org-switcher-btn {
        font-size: 0.78rem !important;
        padding: 0.3rem 0.6rem !important;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .org-switcher-dropdown {
        right: auto;
        left: 0;
        min-width: 220px;
    }
}

/* Phone-sized: unified-view tables become card stacks */
@media (max-width: 700px) {

    /* View-mode toggle: keep on one line, shrink padding */
    .view-mode-toggle {
        flex-wrap: wrap;
        gap: 4px !important;
    }
    .view-mode-toggle .view-mode-btn {
        font-size: 0.75rem !important;
        padding: 5px 10px !important;
    }
    #unifiedShowClosed { font-size: 0.7rem !important; }

    /* Section header — keep title and badges on one line, allow
       header-right (e.g. "+ New Message", "View all docs") to wrap */
    .u-section-header {
        flex-wrap: wrap !important;
        gap: 6px !important;
        font-size: 0.78rem !important;
        padding: 7px 10px !important;
    }
    .u-section-header > span:nth-child(3) {
        margin-left: 0 !important;
        flex: 1 1 100%;
        justify-content: flex-end;
    }

    /* Table → cards. Each row stacks its cells; cells lose their
       column widths and become labeled flex rows. The row gets a
       light bottom border so cards visually separate. */
    .u-table,
    .u-table tbody,
    .u-table tr,
    .u-table td {
        display: block;
        width: 100% !important;
    }
    .u-table tr.u-row {
        padding: 10px 12px !important;
        border-bottom: 1px solid var(--border-color, #f1f5f9) !important;
        position: relative;
    }
    .u-table tr.u-row td {
        padding: 3px 0 !important;
        white-space: normal !important;
        text-align: left !important;
    }
    /* The first cell (item title block) gets a slightly bigger top gap */
    .u-table tr.u-row td:first-child {
        padding-top: 0 !important;
        padding-bottom: 6px !important;
    }
    /* The last cell (action button) right-aligns regardless of
       previous text-align resets, and gets some breathing room above */
    .u-table tr.u-row td:last-child {
        text-align: right !important;
        padding-top: 8px !important;
    }
    /* Status badge cell — left-align so it groups with the time text */
    .u-table tr.u-row td span[style*="border-radius:10px"] {
        display: inline-block;
    }

    /* Preview text in card mode: full width, smaller, color matches */
    .u-table tr.u-row td:nth-child(2) {
        font-size: 0.78rem !important;
        color: var(--text-muted, #64748b) !important;
        line-height: 1.35;
    }

    /* Action buttons in rows — readable size, full-width tap target */
    .u-table tr.u-row td:last-child button,
    .u-table tr.u-row td:last-child a {
        font-size: 0.82rem !important;
        padding: 7px 16px !important;
        min-height: 36px;
    }

    /* Reply panel (uPanel_open) on mobile: stack its action row vertically */
    #uPanel_open td > div > div[style*="background:#fff"] > div[style*="justify-content:space-between"] {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px !important;
    }
    #uPanel_open td > div > div[style*="background:#fff"] > div[style*="justify-content:space-between"] > div {
        width: 100%;
        justify-content: space-between;
    }
    #uPanelSendBtn {
        flex: 1;
    }

    /* New-message compose row — same stacking treatment */
    #uComposeRow td > div > div[style*="background:#fff"] > div[style*="justify-content:space-between"] {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px !important;
    }

    /* Attachment chips wrap nicely */
    #uPanelPreview { gap: 4px !important; }

    /* Notification preferences accordion — full width, comfortable padding */
    .dash-notif-acc-toggle {
        font-size: 0.85rem !important;
        padding: 11px 14px !important;
    }
    .dash-notif-acc-body { padding: 14px 14px !important; }
    .pf-input { font-size: 0.92rem !important; }   /* avoid iOS zoom-on-focus below 16px */
    .toggle-switch { margin-left: 8px !important; }

    /* Document modals — full-screen on phones */
    #deliveryModal > div,
    #uComposeModal > div {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        height: 100%;
    }
    #dashImgModal {
        padding: 0 !important;
    }

    /* WI updates feed — already mostly mobile-friendly, but tighten */
    .wi-update-msg { padding: 8px 12px !important; }
    .wi-reply-row {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .wi-reply-row textarea { min-width: 0 !important; flex: 1 1 100% !important; }
    .wi-reply-row button { flex: 0 0 auto; }

    /* Tabbed view's tabs — wrap to multiple rows rather than overflow */
    .portal-tabs {
        flex-wrap: wrap;
    }
    .portal-tab {
        font-size: 0.78rem;
        padding: 0.5rem 0.7rem;
    }

    /* Page heading + general containers */
    .page-title {
        font-size: 1.2rem;
        margin-bottom: 0.6rem;
    }
    .portal-content { padding: 0.7rem; }
}

/* Very narrow phones (≤ 360px) — extra-tight spacing */
@media (max-width: 360px) {
    .portal-navbar .nav-right a,
    .portal-navbar .nav-right button {
        font-size: 0.78rem;
        padding: 0.3rem 0.55rem;
    }
    .u-table tr.u-row td:last-child button,
    .u-table tr.u-row td:last-child a {
        font-size: 0.78rem !important;
        padding: 6px 12px !important;
    }
    .view-mode-btn { font-size: 0.7rem !important; padding: 4px 8px !important; }
}


/* ════════════════════════════════════════════════════════════════════
 * PROFESSIONAL POLISH
 * Additive refinements to the shared component layer. Color/typography/
 * depth only — no layout or structural changes. Inline element styles
 * still win where they set a property; these rules cover the rest
 * (hover/focus states, shadows, radii, and elements with no inline value).
 * ════════════════════════════════════════════════════════════════════ */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* Page heading — on-brand navy, slightly tighter tracking */
.page-title {
    color: var(--sb-navy);
    letter-spacing: -0.01em;
}

/* Buttons — smooth, with a little depth and a gentle hover lift */
.btn {
    transition: background .15s, box-shadow .15s, transform .1s, filter .15s;
    letter-spacing: .01em;
}
.btn-primary { box-shadow: 0 1px 2px rgba(15,118,110,0.25); }
.btn-primary:hover {
    opacity: 1;
    filter: brightness(1.05);
    box-shadow: 0 4px 12px rgba(15,118,110,0.28);
}
.btn-outline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--brand-light);
}

/* Cards — softer layered shadow, consistent radius */
.card {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* Unified-view sections — each becomes a quietly elevated card */
.u-section {
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Unified-view rows — subtle hover so the list reads as interactive */
.u-table tr.u-row { transition: background .12s; }
.u-table tr.u-row:hover { background: #fafbfc; }

/* View-mode toggle (Unified / Tabbed) — clearer active pill */
.view-mode-btn { transition: background .15s, color .15s, box-shadow .15s; }
.view-mode-btn.active {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 1px 3px rgba(15,118,110,0.30);
}

/* Tabbed nav — bolder, cleaner active state */
.portal-tab { transition: color .15s, border-color .15s; }
.portal-tab.active { font-weight: 600; }

/* Transactions table rows — quiet hover (desktop only; mobile is card-mode) */
@media (min-width: 901px) {
    #tabTransactions table tbody tr:hover { background: #fafbfc; }
}

/* Links inside content use the brand teal consistently */
.portal-content a { color: var(--brand-primary); }
