:root {
    --sv-bg: #f4f5f8;
    --sv-surface: #ffffff;
    --sv-surface-soft: #f8f8fb;
    --sv-border: #d9dbe2;
    --sv-text: #13254b;
    --sv-text-soft: #6f7483;
    --sv-text-muted: #9498a5;
    --sv-primary: #13254b;
    --sv-primary-strong: #0f1d3d;
    --sv-accent: #4b63ff;
    --sv-accent-2: #6a35f0;
    --sv-link: #2f6df6;
    --sv-shadow: 0 12px 30px rgba(19, 37, 75, 0.08);
    --sv-radius-lg: 22px;
    --sv-radius-md: 16px;
    --sv-logo-clear-space: 24px;
    /*
     * Canonical top rhythm used by Terms, Privacy, Profile, Entities,
     * and future standard page layouts.
     */
    --sv-page-content-top-gap: 1.25rem;
    /*
     * Content-section rhythm established by Privacy / Terms:
     * shell gap (1.5rem) + featured first-card offset (.25rem) = 1.75rem.
     * Profile and the root Entities page reuse these same tokens.
     */
    --sv-primary-section-gap: 1.5rem;
    --sv-featured-section-offset: .25rem;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    background: var(--sv-bg);
    color: var(--sv-text);
    font-family: "Poppins", sans-serif;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.legal-title,
.legal-card h2,
.legal-section-card h2,
.help-item h3 {
    font-family: "Montserrat", sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-page {
    flex: 1;
    padding-top: var(--sv-page-content-top-gap);
    padding-bottom: 2.5rem;
}

.app-container {
    max-width: 1180px;
}

/* =========================
   Navbar
   ========================= */

.app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding-top: 0.75rem;
}

.app-navbar {
    position: relative;
    z-index: 1;
    padding-top: 0;
    padding-bottom: 0.75rem;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
}

    .app-navbar .container.app-container {
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(19, 37, 75, 0.06);
        border-radius: 26px;
        box-shadow: 0 14px 36px rgba(19, 37, 75, 0.08);
        padding: 1rem 1.25rem;
    }

.app-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
    margin: 0;
}

.brand-logo {
    height: 38px;
    width: auto;
    display: block;
}

.app-nav-list {
    gap: 0.35rem;
}

.app-nav-link {
    color: var(--sv-text) !important;
    font-weight: 500;
    padding: 0.75rem 0.95rem !important;
    border-radius: 14px;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

    .app-nav-link:hover,
    .app-nav-link:focus,
    .app-nav-link.show {
        color: var(--sv-link) !important;
        background: rgba(75, 99, 255, 0.06);
    }

.app-navbar-toggler {
    border: 1px solid rgba(19, 37, 75, 0.08);
    border-radius: 14px;
    padding: 0.45rem 0.7rem;
    box-shadow: none !important;
}

.app-dropdown {
    position: absolute;
    z-index: 2100;
    min-width: 240px;
    margin-top: 0.55rem !important;
    border: 1px solid rgba(19, 37, 75, 0.08);
    border-radius: 18px;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 40px rgba(19, 37, 75, 0.12);
}

.app-dropdown-label {
    display: block;
    padding: 0.35rem 0.55rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sv-text-muted);
}

.app-tools-dropdown {
    min-width: 310px;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
}

.app-coming-soon-menu-label {
    float: right;
    margin-left: 1rem;
    color: var(--sv-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.dropdown-item.active .app-coming-soon-menu-label,
.dropdown-item:active .app-coming-soon-menu-label {
    color: inherit;
}

.dropdown-item {
    border-radius: 12px;
    color: var(--sv-text);
    padding: 0.72rem 0.8rem;
    font-weight: 500;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: #eef2ff;
        color: var(--sv-link);
    }

.dropdown-divider {
    margin: 0.45rem 0;
    border-top-color: rgba(19, 37, 75, 0.08);
}

@media (max-width: 991.98px) {
    .brand-logo {
        height: 34px;
    }

    .app-nav-list {
        gap: 0.15rem;
        margin-top: 0.7rem;
    }

    .app-dropdown {
        margin-top: 0.2rem !important;
        box-shadow: none;
        border-radius: 14px;
    }

    .app-tools-dropdown {
        min-width: 100%;
        max-height: none;
        overflow-y: visible;
    }
}

/* =========================
   Coming soon destinations
   ========================= */

.coming-soon-page {
    display: grid;
    min-height: min(620px, calc(100vh - 12rem));
    place-items: center;
    padding: 2rem 0;
}

.coming-soon-card {
    width: min(100%, 720px);
    padding: clamp(2rem, 5vw, 4rem);
    text-align: center;
    background: var(--sv-surface);
    border: 1px solid rgba(19, 37, 75, 0.08);
    border-radius: var(--sv-radius-lg);
    box-shadow: var(--sv-shadow);
}

.coming-soon-eyebrow {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--sv-accent-2);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.coming-soon-badge {
    display: inline-flex;
    margin-bottom: 1.25rem;
    padding: 0.45rem 0.8rem;
    color: #5b3fc1;
    font-size: 0.78rem;
    font-weight: 700;
    background: #f0ebff;
    border-radius: 999px;
}

.coming-soon-card h1 {
    margin-bottom: 1rem;
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
}

.coming-soon-card p {
    max-width: 560px;
    margin: 0 auto 1.75rem;
    color: var(--sv-text-soft);
    font-size: 1.05rem;
    line-height: 1.75;
}

@media (max-width: 768px) {
    .brand-logo {
        height: 34px;
    }
}

.app-navbar .navbar-collapse {
    align-items: center;
}

.app-navbar .navbar-nav {
    align-items: center;
    gap: 0.2rem;
}

.app-navbar .nav-link {
    color: var(--sv-text);
    font-weight: 600;
    border-radius: 12px;
    padding: 0.65rem 0.95rem !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

    .app-navbar .nav-link:hover,
    .app-navbar .nav-link:focus {
        color: var(--sv-primary);
        background: rgba(106, 53, 240, 0.06);
    }

    .app-navbar .nav-link.active,
    .app-navbar .nav-link[aria-current="page"] {
        color: var(--sv-primary);
        background: rgba(106, 53, 240, 0.08);
    }

.app-navbar .navbar-toggler {
    border: 1px solid rgba(19, 37, 75, 0.08);
    border-radius: 12px;
    padding: 0.45rem 0.65rem;
    box-shadow: none;
}

    .app-navbar .navbar-toggler:focus {
        box-shadow: 0 0 0 0.12rem rgba(255, 255, 255, 0.95), 0 0 0 0.28rem rgba(106, 53, 240, 0.18);
    }

/* =========================
   Legal pages
   ========================= */

.legal-shell {
    display: flex;
    flex-direction: column;
    gap: var(--sv-primary-section-gap);
}

.legal-hero {
    background: var(--sv-surface);
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: var(--sv-radius-lg);
    box-shadow: var(--sv-shadow);
    padding: 2rem 2rem 1.75rem;
}

.legal-hero-tight {
    margin-bottom: var(--sv-featured-section-offset);
}

.legal-eyebrow {
    display: inline-block;
    color: var(--sv-text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.legal-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 800;
    color: var(--sv-primary);
    margin-bottom: 1rem;
}

.legal-intro {
    color: var(--sv-text-soft);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 860px;
    white-space: pre-line;
}

.legal-card {
    display: block;
    height: 100%;
    background: var(--sv-surface);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--sv-radius-lg);
    box-shadow: var(--sv-shadow);
    padding: 1.6rem;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .legal-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 34px rgba(19, 37, 75, 0.12);
        color: inherit;
    }

.legal-card-icon {
    font-size: 1.6rem;
    margin-bottom: 0.9rem;
}

.legal-card h2 {
    color: var(--sv-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.legal-card p {
    color: var(--sv-text-soft);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-card-link {
    color: var(--sv-link);
    font-weight: 600;
}

.legal-sections,
.help-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legal-section-card {
    background: var(--sv-surface);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--sv-radius-lg);
    box-shadow: var(--sv-shadow);
    padding: 1.5rem;
}

    .legal-section-card h2 {
        color: var(--sv-primary);
        font-size: 1.15rem;
        font-weight: 700;
        margin-bottom: 0.8rem;
    }

.legal-body {
    color: var(--sv-text-soft);
    line-height: 1.9;
}

.help-item {
    border-top: 1px solid #eceef3;
    padding-top: 1rem;
}

    .help-item:first-child {
        border-top: none;
        padding-top: 0;
    }

    .help-item h3 {
        color: var(--sv-primary);
        font-size: 1.02rem;
        font-weight: 700;
        margin-bottom: 0.45rem;
    }

/* =========================
   Buttons
   ========================= */

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.6rem;
}

.btn-primary {
    background: var(--sv-primary);
    border-color: var(--sv-primary);
    color: #fff;
    border-radius: 14px;
    padding: 0.9rem 1.4rem;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(19, 37, 75, 0.18);
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active {
        background: var(--sv-primary-strong) !important;
        border-color: var(--sv-primary-strong) !important;
    }

.btn-outline-secondary {
    border-radius: 14px;
    border-color: #cfd4df;
    color: var(--sv-primary);
    background: #fff;
    padding: 0.9rem 1.4rem;
    font-weight: 600;
}

a {
    color: var(--sv-link);
    text-decoration: none;
}

    a:hover {
        color: #1b57db;
    }

/* =========================
   Footer
   ========================= */

.app-footer {
    width: 100%;
    padding: 0 0 1.5rem;
    background: transparent;
}

.app-footer-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(19, 37, 75, 0.06);
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(19, 37, 75, 0.06);
    padding: 1.15rem 1.25rem;
    backdrop-filter: blur(10px);
}

.app-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.app-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.app-footer-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    color: var(--sv-primary);
}

.app-footer-copy {
    color: var(--sv-text-soft);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

    .footer-links a {
        color: var(--sv-text-soft);
        font-weight: 500;
    }

        .footer-links a:hover {
            color: var(--sv-link);
        }

.footer-sep {
    margin: 0 0.5rem;
    color: #b0b5c0;
}

@media (max-width: 767.98px) {
    .app-footer-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================
   Home page - modern product landing
   ========================= */

.sv-home {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sv-section {
    margin-top: 0.1rem;
}

.sv-eyebrow {
    display: inline-block;
    margin-bottom: 0.85rem;
    max-width: 36rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.5;
    color: var(--sv-text-muted);
}

.sv-eyebrow-light {
    color: rgba(255, 255, 255, 0.72);
}

.sv-hero,
.sv-hero-visual,
.sv-device-stack,
.sv-device-card,
.sv-glow {
    position: relative;
    z-index: 1;
}

.sv-hero {
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(106, 53, 240, 0.10), transparent 34%), radial-gradient(circle at right center, rgba(75, 99, 255, 0.12), transparent 30%), linear-gradient(180deg, #fbfbfe 0%, #f5f6fb 100%);
    border: 1px solid rgba(19, 37, 75, 0.05);
    border-radius: 32px;
    box-shadow: 0 22px 54px rgba(19, 37, 75, 0.09);
    padding: 2.25rem 2.25rem 2rem;
}

.sv-hero-copy {
    max-width: 620px;
}

.sv-hero-title {
    margin: 0 0 1rem;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.6rem);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--sv-primary);
}

.sv-hero-text {
    margin: 0;
    max-width: 620px;
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--sv-text-soft);
}

.sv-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.45rem;
}

.sv-hero-microcopy {
    margin-top: 0.75rem;
    margin-bottom: 0;
    color: var(--sv-text-muted);
    font-size: 0.95rem;
}

.sv-hero-visual {
    height: 100%;
    min-height: 320px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.25rem;
}

.sv-device-stack {
    width: 100%;
    max-width: 500px;
    height: 340px;
}

.sv-device-card {
    border-radius: 28px;
    box-shadow: 0 22px 55px rgba(19, 37, 75, 0.16);
    position: absolute;
}

.sv-device-card-back {
    top: 0;
    left: 16px;
    width: 72%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(19, 37, 75, 0.08);
    backdrop-filter: blur(12px);
    transform: rotate(-7deg);
}

.sv-device-card-front {
    top: 72px;
    right: 12px;
    width: 47%;
}

.sv-device-header {
    display: flex;
    gap: 0.42rem;
    margin-bottom: 1rem;
}

    .sv-device-header span {
        width: 9px;
        height: 9px;
        border-radius: 999px;
        background: #d9deea;
        display: inline-block;
    }

.sv-device-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sv-stat-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.sv-stat-card,
.sv-list-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1rem;
    border: 1px solid rgba(19, 37, 75, 0.05);
}

.sv-stat-label {
    font-size: 0.86rem;
    color: var(--sv-text-muted);
}

.sv-stat-value {
    margin-top: 0.35rem;
    font-family: "Montserrat", sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--sv-primary);
}

.sv-list-line {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(75, 99, 255, 0.22), rgba(106, 53, 240, 0.14));
    margin-bottom: 0.75rem;
}

    .sv-list-line:last-child {
        margin-bottom: 0;
    }

.sv-phone-frame {
    position: relative;
    padding: 10px;
    border-radius: 30px;
    background: linear-gradient(180deg, #17284e 0%, #0f1d3d 100%);
    box-shadow: 0 24px 50px rgba(15, 29, 61, 0.25);
}

.sv-phone-screen {
    min-height: 385px;
    border-radius: 24px;
    background: radial-gradient(circle at top right, rgba(106, 53, 240, 0.12), transparent 35%), linear-gradient(180deg, #ffffff 0%, #f7f8fc 100%);
    padding: 1rem;
}

.sv-app-header {
    padding: 0.2rem 0.2rem 0.8rem;
}

.sv-app-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.sv-app-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.72rem;
    border-radius: 999px;
    background: rgba(75, 99, 255, 0.08);
    color: var(--sv-link);
    font-size: 0.75rem;
    font-weight: 600;
}

.sv-app-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sv-accent), var(--sv-accent-2));
    display: inline-block;
}

.sv-app-header h3 {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--sv-primary);
}

.sv-app-header p {
    margin: 0.3rem 0 0;
    color: var(--sv-text-soft);
    font-size: 0.92rem;
}

.sv-app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.sv-app-panel {
    background: #fff;
    border: 1px solid rgba(19, 37, 75, 0.05);
    border-radius: 18px;
    padding: 0.9rem;
    box-shadow: 0 10px 24px rgba(19, 37, 75, 0.06);
}

.sv-app-panel-wide {
    grid-column: span 2;
}

.sv-panel-kicker {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.76rem;
    color: var(--sv-text-muted);
}

.sv-app-panel strong {
    font-family: "Montserrat", sans-serif;
    color: var(--sv-primary);
    font-size: 1rem;
}

.sv-mini-list {
    padding-left: 1rem;
    margin: 0.5rem 0 0;
    color: var(--sv-text-soft);
}

    .sv-mini-list li {
        margin-bottom: 0.25rem;
    }

.sv-app-footer-card {
    margin-top: 0.75rem;
    padding: 0.9rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(75, 99, 255, 0.10), rgba(106, 53, 240, 0.10));
    border: 1px solid rgba(75, 99, 255, 0.08);
}

    .sv-app-footer-card span {
        display: block;
        color: var(--sv-text-muted);
        font-size: 0.78rem;
        margin-bottom: 0.25rem;
    }

    .sv-app-footer-card strong {
        font-family: "Montserrat", sans-serif;
        color: var(--sv-primary);
        font-size: 0.95rem;
    }

.sv-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(28px);
    opacity: 0.45;
    pointer-events: none;
}

.sv-glow-left {
    left: 18%;
    bottom: 0;
    width: 120px;
    height: 120px;
    background: rgba(106, 53, 240, 0.14);
}

.sv-glow-right {
    right: 10%;
    top: 24%;
    width: 140px;
    height: 140px;
    background: rgba(75, 99, 255, 0.14);
}

.sv-section-heading {
    max-width: 780px;
    margin: 0 auto 0.5rem;
}

    .sv-section-heading h2,
    .sv-story-card h2,
    .sv-cta-band h2 {
        margin: 0;
        font-family: "Montserrat", sans-serif;
        font-size: clamp(1.8rem, 3vw, 2.7rem);
        font-weight: 800;
        line-height: 1.15;
        color: var(--sv-primary);
    }

    .sv-section-heading p,
    .sv-story-card p,
    .sv-cta-band p {
        margin: 0.9rem auto 0;
        color: var(--sv-text-soft);
        line-height: 1.9;
        font-size: 1.03rem;
    }

.sv-feature-card,
.sv-story-card,
.sv-showcase-card,
.sv-step-card {
    height: 100%;
    background: var(--sv-surface);
    border: 1px solid rgba(19, 37, 75, 0.05);
    border-radius: 28px;
    box-shadow: 0 16px 38px rgba(19, 37, 75, 0.07);
    padding: 1.7rem;
}

.sv-feature-icon,
.sv-step-number {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(75, 99, 255, 0.14), rgba(106, 53, 240, 0.14));
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    margin-bottom: 1rem;
}

.sv-feature-card h3,
.sv-step-card h3,
.sv-showcase-top h3 {
    margin: 0 0 0.7rem;
    font-family: "Montserrat", sans-serif;
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--sv-primary);
}

.sv-feature-card p,
.sv-step-card p,
.sv-showcase-top p {
    margin: 0;
    color: var(--sv-text-soft);
    line-height: 1.85;
}

.sv-check-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.25rem;
}

.sv-check-item {
    position: relative;
    padding-left: 1.65rem;
    color: var(--sv-text-soft);
    line-height: 1.8;
}

    .sv-check-item::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.7rem;
        width: 9px;
        height: 9px;
        border-radius: 999px;
        background: linear-gradient(135deg, var(--sv-accent), var(--sv-accent-2));
    }

.sv-showcase-card {
    background: radial-gradient(circle at top right, rgba(106, 53, 240, 0.09), transparent 30%), linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}

.sv-showcase-label {
    display: inline-block;
    margin-bottom: 0.6rem;
    color: var(--sv-text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.sv-showcase-panels {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.sv-showcase-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(19, 37, 75, 0.05);
    border-radius: 20px;
    padding: 1rem;
}

    .sv-showcase-panel span {
        display: block;
        color: var(--sv-text-muted);
        font-size: 0.84rem;
        margin-bottom: 0.35rem;
    }

    .sv-showcase-panel strong {
        font-family: "Montserrat", sans-serif;
        color: var(--sv-primary);
        font-size: 1rem;
    }

.sv-cta-band {
    background: linear-gradient(135deg, #13254b 0%, #1d3270 45%, #472dc7 100%);
    border-radius: 32px;
    padding: 2.1rem;
    box-shadow: 0 20px 48px rgba(19, 37, 75, 0.18);
}

    .sv-cta-band h2,
    .sv-cta-band p {
        color: #fff;
    }

    .sv-cta-band p {
        color: rgba(255, 255, 255, 0.82);
    }

.sv-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sv-btn-light {
    color: var(--sv-primary);
    border-radius: 14px;
    font-weight: 600;
    padding: 0.9rem 1.3rem;
}

.sv-btn-outline-light {
    border-radius: 14px;
    font-weight: 600;
    padding: 0.9rem 1.3rem;
}

@media (max-width: 991.98px) {
    .sv-hero {
        padding: 1.9rem 1.4rem 1.7rem;
        border-radius: 26px;
    }

    .sv-hero-visual {
        min-height: 290px;
        margin-top: 0.5rem;
    }

    .sv-device-stack {
        max-width: 430px;
        height: 300px;
    }

    .sv-device-card-front {
        top: 56px;
        width: 50%;
    }

    .sv-phone-screen {
        min-height: 340px;
    }

    .sv-cta-actions {
        align-items: stretch;
    }

    .app-navbar .container.app-container {
        border-radius: 22px;
        padding: 0.9rem 1rem;
    }

    .app-navbar .navbar-collapse {
        margin-top: 0.85rem;
    }
}

@media (max-width: 767.98px) {
    .sv-home {
        gap: 1.1rem;
    }

    .sv-hero {
        padding: 1.45rem 1rem 1.35rem;
    }

    .sv-hero-title {
        font-size: 2.35rem;
    }

    .sv-hero-text {
        font-size: 1rem;
        line-height: 1.8;
    }

    .sv-hero-visual {
        min-height: 250px;
    }

    .sv-device-stack {
        max-width: 360px;
        height: 250px;
    }

    .sv-device-card-back {
        left: 8px;
        width: 74%;
    }

    .sv-device-card-front {
        top: 54px;
        right: 6px;
        width: 54%;
    }

    .sv-phone-screen {
        min-height: 285px;
        padding: 0.85rem;
    }

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

    .sv-app-panel-wide {
        grid-column: span 1;
    }

    .sv-feature-card,
    .sv-story-card,
    .sv-showcase-card,
    .sv-step-card {
        padding: 1.3rem;
        border-radius: 22px;
    }

    .sv-cta-band {
        padding: 1.5rem 1rem;
        border-radius: 24px;
    }
}

/* =========================
   Plans page
   ========================= */

.app-nav-link.active {
    color: var(--sv-link) !important;
    background: rgba(75, 99, 255, 0.06);
    font-weight: 600;
}

.sv-plans-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sv-plans-hero-section {
    margin-top: 0.1rem;
}

.sv-appstore-badge {
    display: inline-block;
    width: 100%;
    max-width: 210px;
    height: auto;
}

.sv-download-qr {
    width: 180px;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.sv-download-qr-small {
    width: 130px;
}

.sv-screenshot-card {
    height: 100%;
    background: var(--sv-surface);
    border: 1px solid rgba(19, 37, 75, 0.05);
    border-radius: var(--sv-radius-lg);
    box-shadow: var(--sv-shadow);
    padding: 1rem;
}

.sv-screenshot-frame {
    background: linear-gradient(180deg, #fbfbfe 0%, #f3f5fa 100%);
    border-radius: 20px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

    .sv-screenshot-frame img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 16px;
    }

.sv-screenshot-copy h3 {
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sv-primary);
}

.sv-screenshot-copy p {
    margin-bottom: 0;
    color: var(--sv-text-soft);
    line-height: 1.8;
}

.sv-plan-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--sv-surface);
    border: 1px solid rgba(19, 37, 75, 0.05);
    border-radius: 28px;
    box-shadow: var(--sv-shadow);
    overflow: hidden;
}

    .sv-plan-card.is-popular {
        border-color: rgba(75, 99, 255, 0.22);
        box-shadow: 0 18px 46px rgba(75, 99, 255, 0.14);
    }

    /* IMPORTANT:
   Apply status colors ONLY to the status badge,
   not to the Most Popular badge.
*/
    .sv-plan-card.is-coming-soon .sv-plan-badge:not(.is-most-popular) {
        background: rgba(241, 182, 0, 0.14);
        color: #8b6500;
    }

    .sv-plan-card.is-planned .sv-plan-badge:not(.is-most-popular) {
        background: rgba(106, 53, 240, 0.12);
        color: #6a35f0;
    }

.sv-plan-top {
    padding: 1.4rem 1.4rem 1rem;
}

.sv-plan-kicker-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.sv-plan-emoji {
    font-size: 1.1rem;
}

.sv-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* Most Popular badge:
   Make this selector more specific than the status rules.
*/
.sv-plan-card .sv-plan-badge.is-most-popular {
    background: rgba(0, 122, 255, 0.12);
    color: #007aff;
    font-weight: 700;
    border: 1px solid rgba(0, 122, 255, 0.24);
    box-shadow: 0 6px 18px rgba(0, 122, 255, 0.22);
    animation: sv-popular-pulse 2.5s ease-in-out infinite;
}

@keyframes sv-popular-pulse {
    0%, 100% {
        box-shadow: 0 6px 18px rgba(124, 58, 237, 0.25); /* purple */
    }

    50% {
        box-shadow: 0 8px 26px rgba(124, 58, 237, 0.45); /* stronger purple */
    }
}

.sv-plan-card h3 {
    margin-bottom: 0.35rem;
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sv-primary);
}

.sv-plan-subtitle {
    margin-bottom: 0.8rem;
    color: var(--sv-text-soft);
}

.sv-plan-price {
    font-family: "Montserrat", sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--sv-primary);
    margin-bottom: 0.75rem;
}

.sv-plan-description {
    margin-bottom: 0;
    color: var(--sv-text-soft);
    line-height: 1.8;
}

.sv-plan-meta {
    padding: 0 1.4rem 0.9rem;
}

.sv-plan-bestfor {
    display: grid;
    gap: 0.15rem;
    margin-bottom: 0.8rem;
}

    .sv-plan-bestfor span {
        font-size: 0.8rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--sv-text-muted);
    }

    .sv-plan-bestfor strong {
        color: var(--sv-primary);
        font-size: 0.98rem;
    }

.sv-plan-fineprint {
    color: var(--sv-text-soft);
    font-size: 0.92rem;
}

.sv-plan-bullets {
    padding: 0 1.4rem 1rem;
    display: grid;
    gap: 0.7rem;
}

.sv-plan-footer {
    margin-top: auto;
    padding: 0 1.4rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sv-plan-btn {
    width: 100%;
    margin-top: 0;
}

.sv-plan-cta-note {
    margin: 0;
    color: var(--sv-text-soft);
    font-size: 0.92rem;
    font-style: italic;
    line-height: 1.55;
}

.sv-download-band .sv-download-band-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 991.98px) {
    .sv-download-band .sv-download-band-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .sv-plan-top,
    .sv-plan-meta,
    .sv-plan-bullets,
    .sv-plan-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .sv-download-qr {
        width: 150px;
    }
}

.sv-plans-hero .sv-hero-copy {
    max-width: 100%;
}

.sv-plans-hero .sv-hero-text {
    max-width: 980px;
}

/* =========================
   Login page (Admin UI match)
   ========================= */

.app-page-login {
    padding-top: 2rem;
}

.login-shell {
    min-height: calc(100vh - 240px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0 2rem;
    --sv-login-primary: #1e2340;
    --sv-login-primary-2: #2a315f;
    --sv-login-accent: #6a35f0;
    --sv-login-accent-2: #4b63ff;
    --sv-login-text: #3f4862;
    --sv-login-text-soft: #667089;
    --sv-login-text-muted: #7f89a3;
    --sv-login-shadow: 0 22px 54px rgba(19, 37, 75, 0.09);
    --sv-login-shadow-soft: 0 14px 36px rgba(19, 37, 75, 0.08);
}

    .login-shell .login-card {
        width: 100%;
        max-width: 1100px;
        display: grid;
        grid-template-columns: 1.1fr 0.9fr;
        gap: 0;
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(19, 37, 75, 0.06);
        border-radius: 24px;
        box-shadow: var(--sv-login-shadow);
        overflow: hidden;
    }

    .login-shell .login-card-copy {
        padding: 2.5rem 2.5rem 2.25rem;
        border-right: 1px solid rgba(19, 37, 75, 0.06);
    }

    .login-shell .login-form-panel {
        padding: 2.5rem 2.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .login-shell .login-form-panel form {
            width: 100%;
            max-width: 420px;
        }

    .login-shell .sv-eyebrow {
        display: inline-block;
        margin-bottom: 0.9rem;
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--sv-login-text-muted);
    }

    .login-shell .login-title {
        margin: 0 0 0.9rem;
        font-size: clamp(2rem, 4vw, 3.3rem);
        font-weight: 800;
        line-height: 1.05;
        letter-spacing: -0.03em;
        color: var(--sv-login-primary);
        font-family: "Montserrat", sans-serif;
    }

    .login-shell .login-text {
        color: var(--sv-login-text-soft);
        font-size: 1.02rem;
        line-height: 1.85;
        margin-bottom: 1.5rem;
        max-width: 34rem;
    }

    .login-shell .login-alert {
        border-radius: 14px;
    }

    .login-shell .app-label {
        font-weight: 700;
        color: var(--sv-login-primary);
        margin-bottom: 0.45rem;
    }

    .login-shell .app-input {
        min-height: 52px;
        border-radius: 14px;
        border: 1px solid rgba(19, 37, 75, 0.10);
        padding: 0.85rem 1rem;
        color: var(--sv-login-primary);
        background: rgba(255, 255, 255, 0.92);
        font-family: "Inter", "Poppins", sans-serif;
    }

        .login-shell .app-input::placeholder {
            color: var(--sv-login-text-muted);
        }

        .login-shell .app-input:focus {
            border-color: rgba(106, 53, 240, 0.28);
            box-shadow: 0 0 0 0.12rem rgba(255, 255, 255, 0.95), 0 0 0 0.28rem rgba(106, 53, 240, 0.22);
        }

    .login-shell .password-input-wrap {
        position: relative;
    }

    .login-shell .app-input-password {
        padding-right: 3.5rem;
    }

    .login-shell .password-toggle-btn {
        position: absolute;
        top: 50%;
        right: 0.85rem;
        transform: translateY(-50%);
        width: 2rem;
        height: 2rem;
        border: 0;
        background: transparent;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--sv-login-text-muted);
        cursor: pointer;
        border-radius: 999px;
    }

        .login-shell .password-toggle-btn:hover {
            color: var(--sv-login-primary);
            background: rgba(106, 53, 240, 0.06);
        }

        .login-shell .password-toggle-btn:focus-visible {
            outline: none;
            box-shadow: 0 0 0 0.12rem rgba(255, 255, 255, 0.95), 0 0 0 0.28rem rgba(106, 53, 240, 0.22);
        }

    .login-shell .password-toggle-icon {
        width: 1.2rem;
        height: 1.2rem;
        fill: currentColor;
    }

        .login-shell .password-toggle-icon.is-hidden {
            display: none;
        }

    .login-shell .login-btn-primary {
        border: none;
        color: #fff !important;
        background: linear-gradient(135deg, var(--sv-login-accent) 0%, var(--sv-login-accent-2) 100%);
        box-shadow: 0 16px 30px rgba(91, 70, 247, 0.28);
        border-radius: 14px;
        font-weight: 700;
        padding: 0.9rem 1.25rem;
        transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    }

        .login-shell .login-btn-primary:hover {
            color: #fff !important;
            transform: translateY(-1px);
            background: linear-gradient(135deg, #5f2ee8 0%, #4059ff 100%);
        }

        .login-shell .login-btn-primary:focus,
        .login-shell .login-btn-primary:active:focus {
            box-shadow: 0 0 0 0.12rem rgba(255, 255, 255, 0.95), 0 0 0 0.28rem rgba(106, 53, 240, 0.22);
        }

@media (max-width: 991.98px) {
    .login-shell .login-card {
        grid-template-columns: 1fr;
    }

    .login-shell .login-card-copy {
        border-right: none;
        border-bottom: 1px solid rgba(19, 37, 75, 0.06);
    }
}

@media (max-width: 767.98px) {
    .login-shell {
        min-height: auto;
        padding-top: 0.5rem;
    }

        .login-shell .login-card-copy,
        .login-shell .login-form-panel {
            padding: 1.5rem 1.2rem;
        }

        .login-shell .login-title {
            font-size: 2rem;
        }

    .app-page-login {
        padding-top: 1rem;
    }
}

/* =========================================
   Shelvera Support FAQ
   ========================================= */

.support-faq-card {
    overflow: hidden;
}

.support-faq-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

    .support-faq-heading h2 {
        margin-bottom: 0.35rem;
    }

.support-faq-subtitle,
.support-contact-intro {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.support-faq-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.10);
    color: #0f766e;
    font-size: 0.85rem;
    font-weight: 700;
}

.support-search-wrap {
    margin-bottom: 1rem;
}

.support-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.support-search-icon {
    position: absolute;
    left: 1rem;
    z-index: 2;
    color: #64748b;
    font-size: 1.1rem;
}

.support-search-input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    padding: 0.95rem 2.75rem 0.95rem 2.55rem;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    .support-search-input:focus {
        border-color: rgba(20, 184, 166, 0.80);
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
        background: #ffffff;
    }

.support-search-clear {
    position: absolute;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    font-size: 1.35rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, color 0.18s ease;
}

    .support-search-clear:hover {
        background: rgba(15, 23, 42, 0.10);
        color: #0f172a;
    }

.support-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
}

.support-category-chip {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 650;
    padding: 0.45rem 0.8rem;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

    .support-category-chip:hover {
        transform: translateY(-1px);
        border-color: rgba(20, 184, 166, 0.55);
        color: #0f766e;
    }

    .support-category-chip.is-active {
        background: #0f766e;
        border-color: #0f766e;
        color: #ffffff;
    }

.support-faq-list {
    display: grid;
    gap: 0.85rem;
}

.support-faq-item {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.86);
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    .support-faq-item.is-open {
        border-color: rgba(20, 184, 166, 0.50);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
        background: #ffffff;
    }

.support-faq-question {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 1rem 1.05rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    color: #0f172a;
}

.support-faq-question-main {
    min-width: 0;
    display: grid;
    gap: 0.35rem;
}

.support-faq-category {
    width: fit-content;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: #0f766e;
    padding: 0.18rem 0.5rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.support-faq-question-text {
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.45;
}

.support-faq-chevron {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: transform 0.18s ease, background 0.18s ease;
}

.support-faq-item.is-open .support-faq-chevron {
    transform: rotate(180deg);
    background: rgba(20, 184, 166, 0.12);
}

.support-faq-answer {
    padding: 0 1.05rem 1.05rem;
}

.support-faq-answer-body {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding-top: 0.9rem;
    color: #475569;
    line-height: 1.7;
}

.support-faq-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.9rem;
}

    .support-faq-tags span {
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.06);
        color: #64748b;
        padding: 0.2rem 0.5rem;
        font-size: 0.75rem;
        font-weight: 650;
    }

.support-faq-mark {
    background: rgba(250, 204, 21, 0.45);
    color: inherit;
    border-radius: 0.2rem;
    padding: 0;
}

.support-faq-empty {
    margin-top: 1.25rem;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    background: rgba(248, 250, 252, 0.85);
}

.support-faq-empty-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 0.75rem;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.support-faq-empty h3 {
    margin-bottom: 0.4rem;
}

.support-faq-empty p {
    margin: 0;
    color: #64748b;
}

.support-contact-card .help-list {
    margin-top: 1rem;
}

@media (max-width: 767.98px) {
    .support-faq-heading {
        flex-direction: column;
    }

    .support-faq-count {
        justify-content: flex-start;
    }

    .support-category-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .support-category-chip {
        flex: 0 0 auto;
    }

    .support-faq-question {
        padding: 0.95rem;
    }

    .support-faq-answer {
        padding: 0 0.95rem 0.95rem;
    }
}

/* Hide browser-native search clear button */
.support-search-input::-webkit-search-cancel-button,
.support-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.support-search-input::-ms-clear,
.support-search-input::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

/* Authenticated Shelvera web workspace and profile pages only. */

/*
 * Standard account-page top alignment:
 * Terms and Privacy already rely only on .app-page for the first-section gap.
 * Profile and Entities now do the same instead of adding a second top offset.
 */
.account-shell {
    padding: 0 0 3rem;
}

/*
 * Profile mirrors the Privacy document flow:
 * first featured card, then the next content group, with the same composed gap.
 */
.profile-shell {
    display: flex;
    flex-direction: column;
    gap: var(--sv-primary-section-gap);
}

/*
 * Higher-specificity protection for any Account-specific stylesheet loaded
 * after site.css. These rules keep Profile and Entities aligned to the
 * Terms/Privacy top rhythm without affecting bottom spacing.
 */
.account-shell.profile-shell,
.account-shell.entities-shell,
.account-shell.entity-detail-shell {
    padding-top: 0;
}

.account-welcome-card,
.profile-header-card,
.profile-card,
.account-placeholder-card {
    background: var(--sv-surface);
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    box-shadow: var(--sv-shadow);
}

.account-welcome-card {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

    .account-welcome-card h1,
    .profile-heading-copy h1 {
        margin: .55rem 0 .6rem;
        color: var(--sv-text);
        font-size: clamp(1.7rem, 3vw, 2.35rem);
        font-weight: 700;
    }

    .account-welcome-card p {
        max-width: 690px;
        margin: 0;
        color: var(--sv-text-soft);
        line-height: 1.72;
    }

.account-welcome-actions,
.profile-header-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: .75rem;
}

.account-btn-primary,
.account-btn-outline,
.account-btn-danger {
    border-radius: 999px;
    padding: .68rem 1.25rem;
    font-weight: 600;
    white-space: nowrap;
}

.account-btn-primary {
    background: linear-gradient(135deg, var(--sv-accent) 0%, var(--sv-accent-2) 100%);
    border: 0;
    color: #fff;
}

    .account-btn-primary:hover,
    .account-btn-primary:focus {
        color: #fff;
        opacity: .94;
    }

.account-btn-outline {
    border: 1px solid var(--sv-border);
    background: var(--sv-surface);
    color: var(--sv-text);
}

    .account-btn-outline:hover,
    .account-btn-outline:focus {
        background: var(--sv-surface-soft);
        color: var(--sv-text);
    }

.account-btn-danger {
    border: 1px solid #f0ced5;
    background: #fff6f7;
    color: #a33a50;
}

    .account-btn-danger:hover,
    .account-btn-danger:focus {
        background: #fcebee;
        color: #8d2940;
    }

.account-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.account-placeholder-card {
    padding: 1.45rem;
}

.account-placeholder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    margin-bottom: 1rem;
    border-radius: .85rem;
    background: #edf0ff;
    color: var(--sv-accent);
    font-weight: 700;
}

.account-placeholder-card h2 {
    margin: 0 0 .55rem;
    font-size: 1.08rem;
}

.account-placeholder-card p {
    min-height: 3.25rem;
    margin: 0 0 1rem;
    color: var(--sv-text-soft);
    font-size: .94rem;
    line-height: 1.6;
}

.account-coming-soon {
    color: var(--sv-text-muted);
    font-size: .83rem;
    font-weight: 600;
}

.app-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.app-user-avatar-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: #edf0ff;
    color: var(--sv-accent);
    font-size: .74rem;
    font-weight: 700;
}

.app-logout-menu-form {
    margin: 0;
    padding: 0;
}

.app-logout-menu-button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

/*
 * Future primary workflows and catalog areas stay visible in navigation so
 * the information architecture remains stable, without linking users to
 * routes that have not been implemented yet.
 */
.app-nav-link-disabled {
    color: var(--sv-text-muted) !important;
    cursor: not-allowed;
    user-select: none;
}

    .app-nav-link-disabled:hover,
    .app-nav-link-disabled:focus {
        color: var(--sv-text-muted) !important;
        background: transparent !important;
    }

.app-dropdown-item-disabled {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    color: var(--sv-text-muted);
    cursor: not-allowed;
    user-select: none;
}

    .app-dropdown-item-disabled:hover,
    .app-dropdown-item-disabled:focus {
        color: var(--sv-text-muted);
        background: transparent;
    }

.app-dropdown-item-status {
    flex-shrink: 0;
    color: var(--sv-text-muted);
    font-size: .72rem;
    font-weight: 600;
}

.profile-header-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: var(--sv-featured-section-offset);
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    flex-shrink: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #edf0ff 0%, #f1ebff 100%);
    color: var(--sv-accent);
    font-family: "Montserrat", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.profile-heading-copy {
    flex: 1;
    min-width: 0;
}

    .profile-heading-copy h1 {
        margin: 0;
        font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    }

    .profile-heading-copy p {
        margin: .38rem 0 0;
        color: var(--sv-text-soft);
    }

.profile-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: .35rem;
}

.profile-role-pill,
.profile-status-pill,
.profile-active-pill,
.profile-count-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: .77rem;
    font-weight: 600;
}

.profile-role-pill {
    padding: .3rem .65rem;
    background: #ecf6ef;
    color: #287a49;
}

.profile-status-pill {
    padding: .28rem .62rem;
    background: #edf0ff;
    color: var(--sv-accent);
    text-transform: capitalize;
}

.profile-active-pill {
    margin-left: .45rem;
    padding: .17rem .46rem;
    background: #ecf6ef;
    color: #287a49;
}

.profile-count-pill {
    min-width: 1.7rem;
    justify-content: center;
    padding: .25rem .5rem;
    background: #edf0ff;
    color: var(--sv-accent);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 1rem;
}

.profile-card {
    padding: 1.35rem;
}

.profile-card-wide {
    grid-column: 1 / -1;
}

.profile-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}

    .profile-card-heading h2 {
        margin: 0;
        font-size: 1.04rem;
    }

.profile-detail-list {
    display: grid;
    gap: .88rem;
    margin: 0;
}

    .profile-detail-list div {
        display: grid;
        gap: .22rem;
    }

    .profile-detail-list dt {
        color: var(--sv-text-muted);
        font-size: .78rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .profile-detail-list dd {
        margin: 0;
        color: var(--sv-text);
        font-size: .94rem;
    }

.profile-code {
    color: var(--sv-text-soft) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .81rem !important;
    word-break: break-all;
}

.profile-plan-title {
    font-family: "Montserrat", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
}

.profile-plan-code {
    margin: .15rem 0 1rem;
    color: var(--sv-text-muted);
    font-size: .83rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.profile-trial-note {
    margin: -.3rem 0 1rem;
    padding: .55rem .7rem;
    border-radius: .75rem;
    background: #fff7e8;
    color: #8a5c00;
    font-size: .86rem;
}

.profile-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.profile-metric {
    padding: .65rem;
    border-radius: .8rem;
    background: var(--sv-surface-soft);
}

    .profile-metric span {
        display: block;
        color: var(--sv-text-muted);
        font-size: .76rem;
    }

    .profile-metric strong {
        color: var(--sv-text);
        font-size: .92rem;
    }

.profile-empty-text {
    margin: 0;
    color: var(--sv-text-soft);
    font-size: .94rem;
}

.profile-workspaces {
    display: grid;
    gap: .7rem;
}

.profile-workspace-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: .85rem .95rem;
    border-radius: .9rem;
    background: var(--sv-surface-soft);
}

.profile-workspace-title {
    display: flex;
    align-items: center;
    font-weight: 600;
}

.profile-workspace-meta {
    margin-top: .23rem;
    color: var(--sv-text-soft);
    font-size: .85rem;
    text-transform: capitalize;
}

@media (max-width: 991px) {
    .account-welcome-card,
    .profile-header-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-placeholder-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-header-actions {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .account-welcome-actions,
    .profile-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

        .account-welcome-actions form,
        .profile-header-actions form,
        .account-welcome-actions .btn,
        .profile-header-actions .btn {
            width: 100%;
        }

    .profile-workspace-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================
   Authenticated Entity Browser
   Mirrors the iOS visual language:
   - folder thumbnail = circle
   - item thumbnail   = rounded rectangle
   ========================================= */

.entities-shell {
    padding-top: 0;
}

/*
 * Only the root Entities overview mirrors the Privacy two-section rhythm.
 * Child folders keep their breadcrumb/content navigation flow unchanged.
 */
.entities-shell-root {
    display: flex;
    flex-direction: column;
    gap: var(--sv-primary-section-gap);
}

.entities-page-header,
.entities-browser-card {
    background: var(--sv-surface);
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    box-shadow: var(--sv-shadow);
}

.entities-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.4rem, 3vw, 2.25rem);
}

    .entities-page-header h1 {
        margin: 0.4rem 0 0.35rem;
        font-size: clamp(1.8rem, 3vw, 2.4rem);
        font-weight: 700;
    }

    .entities-page-header p {
        margin: 0;
        color: var(--sv-text-soft);
    }

.entities-breadcrumb-wrap {
    margin: 0 0 0.9rem;
    padding: 0 0.2rem;
    overflow-x: auto;
}

.entities-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
    color: var(--sv-text-soft);
    font-size: 0.92rem;
}

    .entities-breadcrumb li + li::before {
        content: "/";
        margin-right: 0.55rem;
        color: var(--sv-text-muted);
    }

    .entities-breadcrumb a {
        color: var(--sv-link);
        text-decoration: none;
    }

        .entities-breadcrumb a:hover,
        .entities-breadcrumb a:focus-visible {
            text-decoration: underline;
        }

    .entities-breadcrumb span[aria-current="page"] {
        color: var(--sv-text);
        font-weight: 600;
    }

.entities-browser-card {
    padding: clamp(1rem, 2vw, 1.55rem);
}

.entities-browser-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.3rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--sv-border);
}

.entities-folder-heading {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

    .entities-folder-heading h2 {
        margin: 0;
        overflow: hidden;
        color: var(--sv-text);
        font-size: 1.3rem;
        font-weight: 650;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .entities-folder-heading p {
        margin: 0.2rem 0 0;
        color: var(--sv-text-soft);
        font-size: 0.84rem;
    }

.entities-back-button {
    display: grid;
    place-items: center;
    width: 2.55rem;
    height: 2.55rem;
    flex-shrink: 0;
    border: 1px solid var(--sv-border);
    border-radius: 999px;
    background: var(--sv-surface-soft);
    color: var(--sv-text);
    font-size: 1.45rem;
    line-height: 1;
    text-decoration: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

    .entities-back-button:hover,
    .entities-back-button:focus-visible {
        border-color: rgba(75, 99, 255, 0.32);
        background: rgba(75, 99, 255, 0.08);
        color: var(--sv-link);
        transform: translateX(-1px);
    }

.entities-search {
    position: relative;
    display: block;
    width: min(20rem, 42%);
    flex-shrink: 0;
}

.entities-browser-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.entities-add-button {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .entities-browser-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .entities-add-button {
        width: 100%;
    }
}

.entities-search svg {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    width: 1.15rem;
    height: 1.15rem;
    fill: var(--sv-text-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.entities-search input {
    width: 100%;
    border: 1px solid var(--sv-border);
    border-radius: 999px;
    padding: 0.72rem 1rem 0.72rem 2.65rem;
    background: var(--sv-surface-soft);
    color: var(--sv-text);
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

    .entities-search input:focus {
        outline: none;
        border-color: rgba(75, 99, 255, 0.56);
        background: var(--sv-surface);
        box-shadow: 0 0 0 4px rgba(75, 99, 255, 0.11);
    }

.entities-level-section + .entities-level-section {
    margin-top: 1.7rem;
}

.entities-section-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}

    .entities-section-title h3 {
        margin: 0;
        color: var(--sv-text);
        font-size: 1rem;
        font-weight: 650;
    }

    .entities-section-title span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 1.45rem;
        height: 1.45rem;
        border-radius: 999px;
        padding: 0 0.45rem;
        background: rgba(75, 99, 255, 0.09);
        color: var(--sv-link);
        font-size: 0.78rem;
        font-weight: 600;
    }

.entities-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
    gap: 0.78rem;
    overflow: visible;
}

.entities-level-section {
    position: relative;
    overflow: visible;
}

.entity-card {
    display: flex;
    align-items: center;
    gap: 0.82rem;
    width: 100%;
    min-height: 5.45rem;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 1.05rem;
    padding: 0.65rem 0.72rem;
    background: var(--sv-surface-soft);
    color: var(--sv-text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

    .entity-card:hover,
    .entity-card:focus-visible {
        border-color: rgba(75, 99, 255, 0.2);
        background: var(--sv-surface);
        box-shadow: 0 10px 22px rgba(19, 37, 75, 0.08);
        color: var(--sv-text);
        transform: translateY(-1px);
    }

    .entity-card:focus-visible {
        outline: 2px solid rgba(75, 99, 255, 0.36);
        outline-offset: 1px;
    }

    .entity-card[hidden] {
        display: none !important;
    }

.entity-thumbnail {
    position: relative;
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    flex: 0 0 auto;
    overflow: hidden;
    background: #eef1fb;
    color: var(--sv-accent);
    border: 1px solid rgba(19, 37, 75, 0.07);
}

    .entity-thumbnail img {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.entity-thumbnail-placeholder {
    display: grid;
    place-items: center;
}

    .entity-thumbnail-placeholder svg {
        width: 1.55rem;
        height: 1.55rem;
        fill: currentColor;
        opacity: 0.68;
    }

.entity-thumbnail-folder {
    border-radius: 999px;
}

.entity-thumbnail-item {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 0.72rem;
}

.entity-card-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

    .entity-card-copy strong {
        overflow: hidden;
        font-family: "Montserrat", sans-serif;
        font-size: 0.96rem;
        font-weight: 560;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.entity-card-folder .entity-card-copy strong {
    font-weight: 650;
}

.entity-card-copy small {
    color: var(--sv-text-soft);
    font-size: 0.8rem;
}

.entity-card-arrow {
    margin-left: auto;
    padding: 0 0.2rem;
    color: var(--sv-text-muted);
    font-size: 1.6rem;
    line-height: 1;
}

.entity-quantity-pill {
    margin-left: auto;
    border-radius: 999px;
    padding: 0.28rem 0.58rem;
    background: rgba(19, 37, 75, 0.06);
    color: var(--sv-text-soft);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.entities-empty-state {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 19rem;
    padding: 2.75rem 1rem;
    text-align: center;
}

.entities-empty-icon {
    display: grid;
    place-items: center;
    width: 4.25rem;
    height: 4.25rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(75, 99, 255, 0.08);
    color: var(--sv-accent);
}

    .entities-empty-icon svg {
        width: 2rem;
        height: 2rem;
        fill: currentColor;
    }

.entities-empty-state h2 {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
}

.entities-empty-state p {
    margin: 0;
    color: var(--sv-text-soft);
}

.entities-filter-empty {
    margin-top: 1rem;
    border: 1px dashed var(--sv-border);
    border-radius: 1rem;
    padding: 2.1rem 1rem;
    color: var(--sv-text-soft);
    text-align: center;
}

.entity-detail-modal .modal-content {
    overflow: hidden;
    border: 1px solid rgba(19, 37, 75, 0.08);
    border-radius: 1.25rem;
    box-shadow: 0 18px 50px rgba(19, 37, 75, 0.16);
}

.entity-detail-modal .modal-header {
    align-items: center;
    border-bottom-color: var(--sv-border);
    padding: 1rem 1.1rem;
}

.entity-modal-heading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

    .entity-modal-heading p {
        margin: 0 0 0.15rem;
        color: var(--sv-text-soft);
        font-size: 0.78rem;
    }

    .entity-modal-heading h2 {
        overflow: hidden;
        margin: 0;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.entity-thumbnail-modal {
    width: 4.35rem;
    height: 4.35rem;
}

.entity-detail-modal .modal-body {
    padding: 1.1rem;
}

.entity-detail-list {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}

    .entity-detail-list div {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        border-bottom: 1px solid rgba(19, 37, 75, 0.06);
        padding-bottom: 0.75rem;
    }

        .entity-detail-list div:last-child {
            border-bottom: 0;
            padding-bottom: 0;
        }

    .entity-detail-list dt {
        color: var(--sv-text-soft);
        font-weight: 500;
    }

    .entity-detail-list dd {
        margin: 0;
        max-width: 68%;
        color: var(--sv-text);
        font-weight: 500;
        text-align: right;
        word-break: break-word;
    }

    .entity-detail-list .entity-detail-notes {
        display: block;
    }

        .entity-detail-list .entity-detail-notes dd {
            max-width: none;
            margin-top: 0.45rem;
            text-align: left;
            white-space: pre-wrap;
        }

@media (max-width: 767.98px) {
    .entities-page-header,
    .entities-browser-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

        .entities-page-header .account-welcome-actions {
            width: 100%;
        }

    .entities-search {
        width: 100%;
    }

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

/* =========================================
   Reusable Shelvera Loading Overlay
   Used by ShelveraLoadingOverlay ViewComponent
   ========================================= */

.shelvera-loader-active {
    overflow: hidden;
}

.shelvera-loading-overlay[hidden] {
    display: none !important;
}

.shelvera-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease-in-out;
}

    .shelvera-loading-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

.shelvera-loading-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(244, 245, 248, 0.78);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.shelvera-loading-panel {
    position: relative;
    z-index: 1;
    min-width: 190px;
    padding: 1.45rem 1.5rem 1.2rem;
    border: 1px solid rgba(19, 37, 75, 0.08);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 46px rgba(19, 37, 75, 0.13);
    text-align: center;
}

.shelvera-loading-mark-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: 5.75rem;
    height: 5.75rem;
    margin: 0 auto 0.95rem;
}

.shelvera-loading-ring {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: conic-gradient( from 0deg, rgba(75, 99, 255, 0.08) 0deg, rgba(75, 99, 255, 0.18) 76deg, var(--sv-accent) 208deg, var(--sv-accent-2) 308deg, rgba(75, 99, 255, 0.08) 360deg );
    -webkit-mask: radial-gradient( farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px) );
    mask: radial-gradient( farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px) );
    animation: shelvera-loader-spin 0.9s linear infinite;
}

.shelvera-loading-logo {
    position: relative;
    display: block;
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

.shelvera-loading-message {
    margin: 0;
    color: var(--sv-primary);
    font-family: "Poppins", sans-serif;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.45;
}

@keyframes shelvera-loader-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .shelvera-loading-overlay {
        transition: none;
    }

    .shelvera-loading-ring {
        animation: none;
        background: linear-gradient( 135deg, rgba(75, 99, 255, 0.7), rgba(106, 53, 240, 0.7) );
    }
}

@media (max-width: 575.98px) {
    .shelvera-loading-panel {
        min-width: 170px;
        padding: 1.25rem 1.15rem 1.05rem;
    }

    .shelvera-loading-mark-wrap {
        width: 5.25rem;
        height: 5.25rem;
    }

    .shelvera-loading-logo {
        width: 2.75rem;
        height: 2.75rem;
    }
}

/* =========================================
   Entity Card Actions + Entity Detail Page
   ========================================= */

.entity-card-with-actions {
    position: relative;
    z-index: 0;
    overflow: visible;
    padding: 0;
    cursor: default;
}

    /*
 * Keep an opened entity action menu above adjacent tiles.
 * The entity card itself must be promoted because a dropdown's z-index
 * cannot escape the stacking order of its parent tile.
 */
    .entity-card-with-actions:hover,
    .entity-card-with-actions:focus-within,
    .entity-card-with-actions:has(.entity-action-menu.show) {
        z-index: 50;
    }

.entity-card-primary {
    display: flex;
    align-items: center;
    gap: 0.82rem;
    width: 100%;
    min-width: 0;
    min-height: 5.45rem;
    padding: 0.65rem 3.15rem 0.65rem 0.72rem;
    color: var(--sv-text);
    text-decoration: none;
}

    .entity-card-primary:hover,
    .entity-card-primary:focus-visible {
        color: var(--sv-text);
    }

.entity-card-actions {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    z-index: 60;
    transform: translateY(-50%);
}

.entity-overflow-button {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 0.22rem;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid var(--sv-border);
    border-radius: 999px;
    background: var(--sv-surface);
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

    .entity-overflow-button span {
        display: block;
        width: 0.22rem;
        height: 0.22rem;
        border-radius: 999px;
        background: var(--sv-text-soft);
    }

    .entity-overflow-button:hover,
    .entity-overflow-button:focus-visible,
    .entity-overflow-button.show {
        border-color: rgba(75, 99, 255, 0.34);
        background: rgba(75, 99, 255, 0.06);
        box-shadow: 0 0 0 4px rgba(75, 99, 255, 0.08);
    }

.entity-overflow-button-small {
    width: 2.25rem;
    height: 2.25rem;
}

.entity-action-menu {
    z-index: 70;
    min-width: 12.5rem;
    border: 1px solid var(--sv-border);
    border-radius: 0.9rem;
    padding: 0.42rem;
    background: var(--sv-surface);
    box-shadow: 0 18px 38px rgba(19, 37, 75, 0.16);
}

    .entity-action-menu .dropdown-item {
        border-radius: 0.58rem;
        padding: 0.62rem 0.72rem;
    }

.entity-action-disabled {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    opacity: 0.62;
}

    .entity-action-disabled small {
        color: var(--sv-text-muted);
        font-size: 0.73rem;
    }

.entity-action-danger span:first-child {
    color: #a92d42;
}

.entity-detail-shell {
    padding-top: 0;
}

.entity-detail-breadcrumb-wrap {
    margin-bottom: 0.9rem;
}

.entity-detail-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    margin-bottom: 1rem;
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    padding: clamp(1rem, 2.2vw, 1.35rem);
    background: var(--sv-surface);
    box-shadow: var(--sv-shadow);
}

.entity-detail-header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.entity-detail-back-link {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    flex-shrink: 0;
    border: 1px solid var(--sv-border);
    border-radius: 999px;
    background: var(--sv-surface-soft);
    color: var(--sv-text);
    font-size: 1.35rem;
    line-height: 1;
    text-decoration: none;
}

    .entity-detail-back-link:hover,
    .entity-detail-back-link:focus-visible {
        border-color: rgba(75, 99, 255, 0.34);
        background: rgba(75, 99, 255, 0.07);
        color: var(--sv-link);
    }

.entity-detail-heading-copy {
    min-width: 0;
}

.entity-detail-heading-meta {
    margin-bottom: 0.4rem;
}

.entity-type-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    border-radius: 999px;
    padding: 0.18rem 0.64rem;
    font-size: 0.75rem;
    font-weight: 650;
}

.entity-type-folder {
    background: rgba(75, 99, 255, 0.1);
    color: var(--sv-link);
}

.entity-type-item {
    background: rgba(31, 135, 89, 0.1);
    color: #167449;
}

.entity-detail-heading-copy h1 {
    overflow: hidden;
    margin: 0 0 0.22rem;
    color: var(--sv-text);
    font-size: clamp(1.5rem, 2.4vw, 1.95rem);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-detail-heading-copy p {
    overflow: hidden;
    margin: 0;
    color: var(--sv-text-soft);
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-detail-header-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-shrink: 0;
}

.entity-detail-open-folder {
    white-space: nowrap;
}

.entity-detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(18rem, 0.88fr);
    gap: 1rem;
    align-items: start;
}

.entity-gallery-card,
.entity-info-card {
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    padding: clamp(1rem, 2vw, 1.25rem);
    background: var(--sv-surface);
    box-shadow: var(--sv-shadow);
}

.entity-detail-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
}

    .entity-detail-section-header h2 {
        margin: 0;
        color: var(--sv-text);
        font-size: 1.08rem;
        font-weight: 650;
    }

    .entity-detail-section-header p {
        margin: 0.22rem 0 0;
        color: var(--sv-text-soft);
        font-size: 0.82rem;
    }

.entity-gallery-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: clamp(22rem, 52vh, 36rem);
    overflow: hidden;
    border: 1px solid rgba(19, 37, 75, 0.08);
    border-radius: 1rem;
    background: #f4f6fb;
}

    .entity-gallery-stage img {
        display: block;
        max-width: 100%;
        max-height: clamp(22rem, 52vh, 36rem);
        object-fit: contain;
        opacity: 1;
        transition: opacity 0.16s ease;
    }

        .entity-gallery-stage img.is-loading {
            opacity: 0.5;
        }

.entity-gallery-counter {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    border: 1px solid rgba(19, 37, 75, 0.1);
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--sv-text-soft);
    font-size: 0.78rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.entity-gallery-placeholder {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    color: var(--sv-text-soft);
}

    .entity-gallery-placeholder svg {
        width: 2.4rem;
        height: 2.4rem;
        fill: var(--sv-text-muted);
    }

.entity-gallery-thumbnails {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    margin-top: 0.85rem;
    padding: 0.15rem 0.05rem 0.3rem;
    scrollbar-width: thin;
}

.entity-gallery-thumb {
    position: relative;
    display: block;
    width: 4.65rem;
    height: 4.65rem;
    flex: 0 0 auto;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 0.72rem;
    padding: 0;
    background: var(--sv-surface-soft);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

    .entity-gallery-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .entity-gallery-thumb:hover,
    .entity-gallery-thumb:focus-visible {
        transform: translateY(-1px);
    }

    .entity-gallery-thumb[aria-current="true"] {
        border-color: var(--sv-accent);
        box-shadow: 0 0 0 3px rgba(75, 99, 255, 0.13);
    }

.entity-gallery-cover-badge {
    position: absolute;
    right: 0.22rem;
    bottom: 0.22rem;
    border-radius: 999px;
    padding: 0.1rem 0.34rem;
    background: rgba(255, 255, 255, 0.93);
    color: var(--sv-link);
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
}

.entity-gallery-empty {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 24rem;
    border: 1px dashed var(--sv-border);
    border-radius: 1rem;
    background: var(--sv-surface-soft);
    text-align: center;
}

    .entity-gallery-empty svg {
        width: 2.8rem;
        height: 2.8rem;
        margin-bottom: 0.7rem;
        fill: var(--sv-text-muted);
    }

    .entity-gallery-empty h3 {
        margin: 0 0 0.3rem;
        font-size: 1.05rem;
    }

    .entity-gallery-empty p {
        margin: 0;
        color: var(--sv-text-soft);
        font-size: 0.88rem;
    }

.entity-field-list {
    display: grid;
    gap: 0;
    margin: 0;
}

    .entity-field-list > div {
        border-bottom: 1px solid rgba(19, 37, 75, 0.07);
        padding: 0.78rem 0;
    }

        .entity-field-list > div:first-child {
            padding-top: 0;
        }

        .entity-field-list > div:last-child {
            border-bottom: 0;
            padding-bottom: 0;
        }

    .entity-field-list dt {
        margin-bottom: 0.28rem;
        color: var(--sv-text-muted);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.055em;
        text-transform: uppercase;
    }

    .entity-field-list dd {
        margin: 0;
        color: var(--sv-text);
        font-size: 0.92rem;
        font-weight: 500;
        overflow-wrap: anywhere;
    }

.entity-field-notes dd {
    color: var(--sv-text-soft);
    font-weight: 400;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* =========================================
   Entity Gallery Navigation
   Uses the same visual language as the
   circular Entities back-navigation button.
   IMPORTANT: These base styles must remain
   outside responsive media queries.
   ========================================= */

.entity-gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 2.55rem;
    height: 2.55rem;
    margin: 0;
    border: 1px solid var(--sv-border);
    border-radius: 999px;
    padding: 0;
    background: var(--sv-surface-soft);
    color: var(--sv-text);
    font-family: "Poppins", sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1;
    appearance: none;
    transform: translateY(-50%);
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

    .entity-gallery-nav span {
        display: block;
        line-height: 1;
        transform: translateY(-0.04rem);
    }

.entity-gallery-nav-prev {
    left: 1rem;
}

.entity-gallery-nav-next {
    right: 1rem;
}

.entity-gallery-nav:hover,
.entity-gallery-nav:focus-visible {
    border-color: rgba(75, 99, 255, 0.32);
    background: rgba(75, 99, 255, 0.08);
    color: var(--sv-link);
    outline: none;
}

.entity-gallery-nav-prev:hover,
.entity-gallery-nav-prev:focus-visible {
    transform: translateY(-50%) translateX(-1px);
}

.entity-gallery-nav-next:hover,
.entity-gallery-nav-next:focus-visible {
    transform: translateY(-50%) translateX(1px);
}

.entity-gallery-nav:disabled {
    border-color: var(--sv-border);
    background: var(--sv-surface-soft);
    color: var(--sv-text-muted);
    opacity: 0.44;
    cursor: not-allowed;
    transform: translateY(-50%);
}

    .entity-gallery-nav:disabled:hover,
    .entity-gallery-nav:disabled:focus-visible {
        border-color: var(--sv-border);
        background: var(--sv-surface-soft);
        color: var(--sv-text-muted);
        transform: translateY(-50%);
    }

@media (max-width: 991.98px) {
    .entity-detail-content-grid {
        grid-template-columns: 1fr;
    }

    .entity-info-card {
        order: -1;
    }
}

@media (max-width: 767.98px) {
    .entity-detail-header-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .entity-detail-header-actions {
        justify-content: space-between;
        width: 100%;
    }

    .entity-detail-open-folder {
        flex: 1;
    }

    .entity-gallery-stage {
        min-height: clamp(17rem, 42vh, 25rem);
    }

        .entity-gallery-stage img {
            max-height: clamp(17rem, 42vh, 25rem);
        }

    .entity-gallery-nav {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 1.05rem;
    }

    .entity-gallery-nav-prev {
        left: 0.65rem;
    }

    .entity-gallery-nav-next {
        right: 0.65rem;
    }
}

/* =========================================================
   Shelvera Entities compact overview card
   Root page: heading + Items | Folders | Total entities
   ========================================================= */

.entities-overview-card {
    padding: clamp(1.05rem, 2vw, 1.35rem);
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    background: var(--sv-surface);
    box-shadow: var(--sv-shadow);
}

.entities-overview-fixed-slot {
    position: relative;
}

.entities-shell-root .entities-overview-fixed-slot {
    margin-bottom: var(--sv-featured-section-offset);
}

@media (min-width: 1100px) {
    .entities-overview-fixed-slot.is-fixed {
        height: var(--entities-overview-height, auto);
    }

        .entities-overview-fixed-slot.is-fixed .entities-overview-card[data-fixed-entities-overview] {
            position: fixed;
            top: var(--entities-fixed-top);
            left: var(--entities-fixed-left);
            z-index: 1020;
            width: var(--entities-fixed-width);
        }
}

/*
 * Safety reset:
 * Summary pinning is desktop-only. On smaller screens the overview must
 * remain in normal page flow so it never blocks the user's entity list.
 */
@media (max-width: 1099.98px) {
    .entities-overview-fixed-slot,
    .entities-overview-fixed-slot.is-fixed {
        height: auto !important;
    }

        .entities-overview-card[data-fixed-entities-overview],
        .entities-overview-fixed-slot.is-fixed .entities-overview-card[data-fixed-entities-overview] {
            position: static !important;
            top: auto !important;
            left: auto !important;
            z-index: auto !important;
            width: auto !important;
        }
}

.entities-overview-card.has-workspace-summary {
    display: grid;
    grid-template-columns: minmax(15.5rem, .88fr) minmax(0, 2.45fr);
    align-items: center;
    gap: clamp(1rem, 2vw, 1.45rem);
}

.entities-overview-heading {
    min-width: 0;
}

    .entities-overview-heading .sv-eyebrow {
        margin-bottom: .55rem;
    }

    .entities-overview-heading h1 {
        margin: 0 0 .3rem;
        color: var(--sv-text);
        font-size: clamp(1.72rem, 2.7vw, 2.08rem);
        font-weight: 700;
    }

    .entities-overview-heading p {
        max-width: 18.75rem;
        margin: 0;
        color: var(--sv-text-soft);
        font-size: .91rem;
        line-height: 1.55;
    }

.entities-summary-grid-embedded {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .68rem;
}

.entities-summary-tile {
    min-width: 0;
    min-height: 102px;
    display: flex;
    align-items: center;
    gap: .72rem;
    padding: .78rem .78rem;
    border: 1px solid rgba(19, 37, 75, .08);
    border-radius: 1rem;
    background: var(--sv-surface-soft);
}

.entities-summary-tile-primary {
    border-color: rgba(75, 99, 255, .23);
    background: linear-gradient(145deg, #f4f6ff 0%, #ffffff 100%);
}

.entities-summary-icon {
    width: 2.42rem;
    height: 2.42rem;
    flex: 0 0 2.42rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .78rem;
}

    .entities-summary-icon svg {
        width: 1.26rem;
        height: 1.26rem;
        fill: currentColor;
    }

.entities-summary-icon-items {
    color: #3569e8;
    background: #edf3ff;
}

.entities-summary-icon-folders {
    color: #c27413;
    background: #fff2de;
}

.entities-summary-icon-total {
    color: var(--sv-accent);
    background: #edf0ff;
}

.entities-summary-copy {
    min-width: 0;
    flex: 1;
}

.entities-summary-label {
    display: block;
    margin-bottom: .1rem;
    color: var(--sv-text-soft);
    font-size: .72rem;
    font-weight: 500;
    white-space: nowrap;
}

.entities-summary-copy strong {
    display: block;
    color: var(--sv-text);
    font-family: "Montserrat", sans-serif;
    font-size: clamp(1.18rem, 1.55vw, 1.42rem);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.entities-summary-total-value {
    letter-spacing: -.02em;
}

.entities-summary-copy p {
    margin: .28rem 0 0;
    color: var(--sv-text-soft);
    font-size: .69rem;
    line-height: 1.35;
}

.entities-summary-tile-primary .entities-summary-copy p {
    color: #59627c;
    font-weight: 500;
}

.entities-summary-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    column-gap: .55rem;
    row-gap: .15rem;
    margin-top: .28rem;
}

    .entities-summary-footer p {
        margin: 0;
    }

.entities-summary-plan-link {
    display: inline-flex;
    align-items: center;
    gap: .16rem;
    flex-shrink: 0;
    color: var(--sv-link);
    font-size: .69rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
}

    .entities-summary-plan-link:hover,
    .entities-summary-plan-link:focus-visible {
        color: #1b57db;
        text-decoration: underline;
    }

    .entities-summary-plan-link:focus-visible {
        border-radius: .25rem;
        outline: 2px solid rgba(75, 99, 255, .26);
        outline-offset: 2px;
    }

.entities-summary-progress {
    width: 100%;
    height: .27rem;
    margin-top: .4rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(75, 99, 255, .12);
}

    .entities-summary-progress span {
        display: block;
        height: 100%;
        min-width: 0;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--sv-accent), var(--sv-accent-2));
    }

/*
 * The root breadcrumb is intentionally hidden because the overview card
 * already establishes the Entities context. The parent .entities-shell-root
 * now uses the exact Privacy pattern: shell gap + featured first-card offset.
 */
.entities-shell-root .entities-overview-fixed-slot + .entities-browser-card {
    margin-top: 0;
}

@media (max-width: 1099.98px) {
    .entities-overview-card.has-workspace-summary {
        display: block;
    }

    .entities-summary-grid-embedded {
        margin-top: .95rem;
        padding-top: .95rem;
        border-top: 1px solid rgba(19, 37, 75, .08);
    }

    .entities-overview-heading p {
        max-width: none;
    }
}

@media (max-width: 767.98px) {
    .entities-overview-card {
        padding: 1rem;
    }

    .entities-summary-grid-embedded {
        grid-template-columns: 1fr;
    }

    .entities-summary-tile {
        min-height: 86px;
    }
}

/* =========================================================
   Profile: prominent entity plan usage callout
   ========================================================= */

.profile-entity-usage-callout {
    margin-bottom: .9rem;
    padding: .9rem .95rem;
    border: 1px solid rgba(75, 99, 255, .18);
    border-radius: .95rem;
    background: linear-gradient(145deg, #f4f6ff 0%, #ffffff 100%);
}

.profile-entity-usage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.profile-entity-usage-label {
    display: block;
    margin-bottom: .16rem;
    color: var(--sv-text-soft);
    font-size: .78rem;
}

.profile-entity-usage-callout strong {
    display: block;
    color: var(--sv-text);
    font-family: "Montserrat", sans-serif;
    font-size: 1.28rem;
    font-weight: 700;
}

.profile-entity-usage-callout p {
    margin: .48rem 0 0;
    color: var(--sv-text-soft);
    font-size: .78rem;
}

.profile-view-entities-link {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    color: var(--sv-link);
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

    .profile-view-entities-link:hover,
    .profile-view-entities-link:focus-visible {
        text-decoration: underline;
    }

@media (max-width: 767.98px) {
    .profile-entity-usage-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   Page top alignment safeguard
   Loaded layout references account.css after site.css.
   Keep account views aligned with Terms/Privacy even if an
   older account stylesheet still contains legacy top padding.
   ========================================================= */

.app-page .account-shell.profile-shell,
.app-page .account-shell.entities-shell,
.app-page .account-shell.entity-detail-shell {
    padding-top: 0;
}

/* =========================================================
   Entity edit page
   Mirrors the editable fields on the iOS entity detail screen.
   ========================================================= */

.app-page .account-shell.entity-edit-shell {
    padding-top: 0;
}

.entity-edit-shell {
    max-width: 900px;
    margin: 0 auto;
}

.entity-edit-header-card {
    margin-bottom: 1rem;
}

.entity-edit-form-card {
    padding: clamp(1rem, 2vw, 1.45rem);
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    background: var(--sv-surface);
    box-shadow: var(--sv-shadow);
}

.entity-edit-section-header {
    margin-bottom: 1rem;
}

.entity-edit-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.entity-edit-field {
    display: flex;
    flex-direction: column;
    gap: .42rem;
}

.entity-edit-field-full {
    grid-column: 1 / -1;
}

.entity-edit-field label {
    color: var(--sv-text);
    font-size: .9rem;
    font-weight: 600;
}

.entity-edit-field small {
    color: var(--sv-text-soft);
    font-size: .77rem;
}

.entity-edit-input {
    width: 100%;
    padding: .78rem .86rem;
    border: 1px solid var(--sv-border);
    border-radius: .8rem;
    background: var(--sv-surface);
    color: var(--sv-text);
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .entity-edit-input:focus {
        outline: 0;
        border-color: var(--sv-accent);
        box-shadow: 0 0 0 .2rem rgba(75, 99, 255, .14);
    }

.entity-edit-input-readonly {
    background: var(--sv-surface-soft);
    color: var(--sv-text-soft);
}

.entity-edit-textarea {
    min-height: 124px;
    resize: vertical;
}

.entity-edit-validation {
    color: #ba1a1a;
    font-size: .8rem;
}

.entity-edit-validation-summary:empty {
    display: none;
}

.entity-edit-validation-summary {
    margin-bottom: 1rem;
    padding: .8rem .9rem;
    border: 1px solid rgba(186, 26, 26, .25);
    border-radius: .8rem;
    background: #fff5f5;
    color: #961212;
    font-size: .85rem;
}

    .entity-edit-validation-summary ul {
        margin: 0;
        padding-left: 1.1rem;
    }

.entity-edit-location-callout {
    display: flex;
    flex-direction: column;
    gap: .18rem;
    margin-top: 1.15rem;
    padding: .8rem .9rem;
    border-radius: .8rem;
    background: var(--sv-surface-soft);
}

    .entity-edit-location-callout strong {
        color: var(--sv-text);
        font-size: .84rem;
    }

    .entity-edit-location-callout span {
        color: var(--sv-text);
        font-weight: 500;
    }

    .entity-edit-location-callout small {
        color: var(--sv-text-soft);
    }

.entity-edit-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .72rem;
    margin-top: 1.25rem;
}

.entity-edit-success-alert {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
    padding: .78rem .9rem;
    border: 1px solid rgba(21, 117, 70, .18);
    border-radius: .82rem;
    background: #edf9f1;
    color: #0c663b;
}

    .entity-edit-success-alert span {
        display: grid;
        place-items: center;
        width: 1.35rem;
        height: 1.35rem;
        border-radius: 999px;
        background: #0c8247;
        color: #fff;
        font-size: .78rem;
        font-weight: 700;
    }

    .entity-edit-success-alert p {
        margin: 0;
        font-size: .88rem;
        font-weight: 500;
    }

@media (max-width: 767.98px) {
    .entity-edit-field-grid {
        grid-template-columns: 1fr;
    }

    .entity-edit-form-actions {
        flex-direction: column-reverse;
    }

        .entity-edit-form-actions .btn {
            width: 100%;
        }
}

/* =========================
   Entity delete / Recently Deleted
   ========================= */
.entity-mutation-alert {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1rem;
    padding: .82rem .95rem;
    border-radius: .82rem;
    font-size: .88rem;
    font-weight: 500;
}

    .entity-mutation-alert span {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 1.4rem;
        height: 1.4rem;
        border-radius: 999px;
        color: #fff;
        font-size: .78rem;
        font-weight: 700;
    }

    .entity-mutation-alert p {
        margin: 0;
    }

.entity-mutation-alert-success {
    border: 1px solid rgba(21, 117, 70, .18);
    background: #edf9f1;
    color: #0c663b;
}

    .entity-mutation-alert-success span {
        background: #0c8247;
    }

.entity-mutation-alert-warning {
    border: 1px solid rgba(176, 116, 0, .22);
    background: #fff8e8;
    color: #815700;
}

    .entity-mutation-alert-warning span {
        background: #ae7400;
    }

.entity-action-danger:not(:disabled) {
    color: #a92d42;
}

    .entity-action-danger:not(:disabled):hover,
    .entity-action-danger:not(:disabled):focus {
        background: #fff1f3;
        color: #8b2036;
    }

.account-btn-danger {
    border: 1px solid #bd334a;
    background: #bd334a;
    color: #fff;
}

    .account-btn-danger:hover,
    .account-btn-danger:focus {
        border-color: #99263b;
        background: #99263b;
        color: #fff;
    }

.entity-trash-modal .modal-content {
    overflow: hidden;
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-md);
    box-shadow: var(--sv-shadow);
}

.entity-trash-modal-header {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    border-bottom: 0;
    padding: 1.25rem 1.25rem .55rem;
}

.entity-trash-warning-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    margin-top: .1rem;
    border-radius: 999px;
    background: #fff1f3;
    color: #a92d42;
    font-weight: 700;
}

.entity-trash-modal-header h2 {
    margin: .15rem 0 0;
    color: var(--sv-text);
    font-size: 1.18rem;
    font-weight: 650;
}

.entity-trash-modal-body {
    padding: .45rem 1.25rem 1.15rem;
    color: var(--sv-text-soft);
    line-height: 1.65;
}

    .entity-trash-modal-body p {
        margin: 0;
    }

.entity-trash-modal-footer {
    gap: .55rem;
    border-top: 1px solid var(--sv-border);
    padding: .85rem 1.25rem 1.1rem;
}

.recently-deleted-shell {
    display: flex;
    flex-direction: column;
    gap: var(--sv-primary-section-gap);
}

    .recently-deleted-shell .entity-mutation-alert {
        margin-bottom: 0;
    }

.recently-deleted-header-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.45rem 1.55rem;
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    background: var(--sv-surface);
    box-shadow: var(--sv-shadow);
}

    .recently-deleted-header-card h1 {
        margin: .3rem 0 .45rem;
        color: var(--sv-text);
        font-size: clamp(1.55rem, 2vw, 1.9rem);
        font-weight: 650;
    }

    .recently-deleted-header-card p {
        max-width: 690px;
        margin: 0;
        color: var(--sv-text-soft);
        line-height: 1.65;
    }

.recently-deleted-summary {
    display: inline-flex;
    align-self: flex-start;
    gap: .3rem;
    padding: .7rem .92rem;
    border: 1px solid var(--sv-border);
    border-radius: 999px;
    background: var(--sv-surface);
    color: var(--sv-text-soft);
    font-size: .86rem;
}

    .recently-deleted-summary strong {
        color: var(--sv-text);
    }

.recently-deleted-groups {
    display: grid;
    gap: 1rem;
}

.deleted-group-card {
    padding: 1.15rem 1.25rem 1.1rem;
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius-lg);
    background: var(--sv-surface);
    box-shadow: 0 5px 18px rgba(19, 37, 75, .05);
}

.deleted-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .9rem;
}

.deleted-group-title-wrap {
    display: flex;
    gap: .8rem;
    min-width: 0;
}

.deleted-group-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: .8rem;
    background: #f2f4fb;
    color: var(--sv-primary);
    font-size: 1.18rem;
}

.deleted-group-type {
    margin: 0 0 .14rem;
    color: var(--sv-text-muted);
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.deleted-group-title-wrap h2 {
    margin: 0;
    color: var(--sv-text);
    font-size: 1.1rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.deleted-group-meta {
    margin: .28rem 0 0;
    color: var(--sv-text-soft);
    font-size: .83rem;
}

.deleted-days-badge {
    flex: 0 0 auto;
    padding: .38rem .58rem;
    border-radius: 999px;
    background: #fff4dc;
    color: #805c12;
    font-size: .74rem;
    font-weight: 650;
    white-space: nowrap;
}

.deleted-child-list {
    display: grid;
    gap: .45rem;
    margin: 1rem 0 .8rem;
    padding: .75rem;
    border: 1px solid #eaecf2;
    border-radius: .9rem;
    background: var(--sv-surface-soft);
    list-style: none;
}

    .deleted-child-list li {
        display: flex;
        align-items: center;
        gap: .6rem;
        padding: .25rem .1rem;
    }

.deleted-child-icon {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    color: var(--sv-text-soft);
}

.deleted-child-list strong {
    display: block;
    color: var(--sv-text);
    font-size: .86rem;
    font-weight: 600;
}

.deleted-child-list span:not(.deleted-child-icon) {
    display: block;
    color: var(--sv-text-muted);
    font-size: .76rem;
}

.deleted-group-guidance {
    margin: .88rem 0;
    color: var(--sv-text-soft);
    font-size: .83rem;
    line-height: 1.6;
}

.deleted-group-actions {
    display: flex;
    justify-content: flex-end;
    gap: .55rem;
    padding-top: .2rem;
}

.deleted-restore-button:hover,
.deleted-restore-button:focus {
    border-color: #118048;
    color: #096439;
    background: #effaf3;
}

.recently-deleted-empty-card {
    display: grid;
    justify-items: center;
    gap: .7rem;
    padding: 3.4rem 1.2rem;
    border: 1px dashed #d9dbe2;
    border-radius: var(--sv-radius-lg);
    background: var(--sv-surface);
    text-align: center;
}

.recently-deleted-empty-icon {
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 999px;
    background: #f2f4fb;
    color: var(--sv-text-soft);
    font-size: 1.35rem;
}

.recently-deleted-empty-card h2 {
    margin: .2rem 0 0;
    color: var(--sv-text);
    font-size: 1.18rem;
}

.recently-deleted-empty-card p {
    max-width: 500px;
    margin: 0 0 .45rem;
    color: var(--sv-text-soft);
}

@media (max-width: 767.98px) {
    .recently-deleted-header-card,
    .deleted-group-header {
        flex-direction: column;
    }

        .recently-deleted-header-card .btn,
        .deleted-group-actions .btn {
            width: 100%;
        }

    .deleted-group-actions {
        flex-direction: column;
    }
}

/* =========================================================
   Authenticated navigation: Inventory and Account dropdowns
   ========================================================= */

.app-dropdown-current {
    color: var(--sv-link) !important;
    background: rgba(75, 99, 255, 0.08) !important;
    font-weight: 600 !important;
}

    .app-dropdown-current:hover,
    .app-dropdown-current:focus {
        color: var(--sv-link) !important;
        background: rgba(75, 99, 255, 0.12) !important;
    }

.app-dropdown-account-name {
    max-width: 270px;
    padding: 0 0.55rem 0.55rem;
    color: var(--sv-text);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .app-dropdown-account-name {
        max-width: 100%;
    }
}

/* =========================================================
   Recently Deleted Phase 2: Empty Trash page-only action
   ========================================================= */

.recently-deleted-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.recently-deleted-empty-trash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid rgba(220, 38, 38, 0.28);
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1;
    padding: 0.72rem 1rem;
    min-height: 42px;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.08);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

    .recently-deleted-empty-trash-btn:hover,
    .recently-deleted-empty-trash-btn:focus {
        background: rgba(220, 38, 38, 0.12);
        border-color: rgba(220, 38, 38, 0.45);
        color: #991b1b;
        box-shadow: 0 14px 30px rgba(220, 38, 38, 0.13);
        transform: translateY(-1px);
    }

    .recently-deleted-empty-trash-btn:active {
        transform: translateY(0);
        box-shadow: 0 8px 18px rgba(220, 38, 38, 0.12);
    }

.recently-deleted-empty-trash-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.recently-deleted-empty-trash-text {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .recently-deleted-header-actions {
        width: 100%;
        justify-content: stretch;
    }

        .recently-deleted-header-actions .btn,
        .recently-deleted-empty-trash-btn {
            width: 100%;
        }
}

/* =========================================================
   Entity photo editor: Shelvera-branded delete confirmation
   ========================================================= */

.shelvera-photo-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.54);
    backdrop-filter: blur(2px);
}

    .shelvera-photo-confirm-backdrop[hidden] {
        display: none !important;
    }

.shelvera-photo-confirm-dialog {
    position: relative;
    width: min(100%, 500px);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.shelvera-photo-confirm-close {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-size: 1.8rem;
    line-height: 1;
}

    .shelvera-photo-confirm-close:hover,
    .shelvera-photo-confirm-close:focus {
        background: rgba(15, 23, 42, 0.06);
        color: #0f172a;
    }

.shelvera-photo-confirm-body {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0.9rem;
    padding: 1.45rem 1.45rem 1.2rem;
}

.shelvera-photo-confirm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(225, 29, 72, 0.08);
    color: #be123c;
    font-weight: 800;
}

.shelvera-photo-confirm-eyebrow {
    margin-bottom: 0.5rem;
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.shelvera-photo-confirm-dialog h2 {
    margin: 0;
    color: #0f172a;
    font-family: var(--sv-font-heading, "Montserrat", sans-serif);
    font-size: clamp(1.15rem, 2.4vw, 1.35rem);
    font-weight: 800;
    line-height: 1.25;
}

.shelvera-photo-confirm-dialog p {
    margin: 0.95rem 0 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.65;
}

.shelvera-photo-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.45rem 1.25rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.7);
}

body.shelvera-photo-confirm-open {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .shelvera-photo-confirm-body {
        grid-template-columns: 1fr;
        padding-right: 1.25rem;
        padding-left: 1.25rem;
    }

    .shelvera-photo-confirm-actions {
        flex-direction: column-reverse;
        padding-right: 1.25rem;
        padding-left: 1.25rem;
    }

        .shelvera-photo-confirm-actions .btn {
            width: 100%;
        }
}

/* =========================================================
   Entity Edit: sticky save/cancel action bar
   ========================================================= */

.entity-edit-sticky-actions {
    position: sticky;
    top: calc(var(--app-header-height, 76px) + 1.65rem);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-height: 0;
    margin: 0;
    padding: 0 1rem;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0), rgba(245, 247, 255, 0));
    box-shadow: none;
    backdrop-filter: blur(0);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: max-height 2s ease, margin 2s ease, padding 2s ease, border-color 2s ease, background 2s ease, box-shadow 2s ease, backdrop-filter 2s ease, opacity 2s ease, transform 2s ease;
}

    .entity-edit-sticky-actions.is-visible {
        max-height: 120px;
        margin: 1.65rem 0 1rem;
        padding: 0.9rem 1rem;
        overflow: visible;
        border-color: rgba(199, 210, 254, 0.85);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 255, 0.96));
        box-shadow: 0 16px 44px rgba(30, 41, 59, 0.12), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
        backdrop-filter: blur(12px);
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

.entity-edit-sticky-copy {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-width: 0;
    color: #172554;
}

    .entity-edit-sticky-copy strong {
        display: block;
        color: #101c40;
        font-family: "Montserrat", "Inter", sans-serif;
        font-size: 0.94rem;
        font-weight: 800;
        line-height: 1.2;
    }

    .entity-edit-sticky-copy span:not(.entity-edit-sticky-dot) {
        display: block;
        margin-top: 0.15rem;
        color: #64748b;
        font-size: 0.86rem;
        line-height: 1.35;
    }

.entity-edit-sticky-dot {
    width: 0.72rem;
    height: 0.72rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 0.38rem rgba(245, 158, 11, 0.14);
}

.entity-edit-sticky-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
    flex: 0 0 auto;
}

.entity-edit-form-actions-hint {
    justify-content: center;
    padding-top: 0.2rem;
    color: #64748b;
    font-size: 0.86rem;
}

    .entity-edit-form-actions-hint span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.6rem 0.9rem;
        border-radius: 999px;
        background: rgba(248, 250, 252, 0.9);
    }

@media (max-width: 767.98px) {
    .entity-edit-sticky-actions {
        top: auto;
        bottom: 0.85rem;
        flex-direction: column;
        align-items: stretch;
    }

        .entity-edit-sticky-actions.is-visible {
            max-height: 180px;
            margin: 1.65rem 0 1rem;
            padding: 0.9rem 1rem;
            border-radius: 1.15rem;
        }

    .entity-edit-sticky-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

        .entity-edit-sticky-buttons .btn {
            width: 100%;
        }

    .entity-edit-form-actions-hint {
        display: none;
    }
}


/* ---------------------------------------------------------
   Entities post-login progressive loading skeletons
   --------------------------------------------------------- */
.entities-skeleton {
    display: block;
    border-radius: 999px;
    background: linear-gradient( 90deg, rgba(217, 230, 225, 0.55) 18%, rgba(241, 246, 244, 0.92) 42%, rgba(217, 230, 225, 0.55) 66% );
    background-size: 220% 100%;
    animation: entitiesSkeletonPulse 1.35s ease-in-out infinite;
}

@keyframes entitiesSkeletonPulse {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: -110% 0;
    }
}

.entities-skeleton-summary-tile {
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 14px;
    row-gap: 10px;
    min-height: 118px;
}

.entities-skeleton-icon {
    grid-row: 1 / span 3;
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.entities-skeleton-label {
    width: 42%;
    height: 12px;
    margin-top: 4px;
}

.entities-skeleton-value {
    width: 58%;
    height: 24px;
}

.entities-skeleton-line {
    width: 70%;
    height: 11px;
}

.entities-count-loading {
    color: var(--sv-muted, #59716c);
}

.entities-inventory-skeleton {
    margin-top: 1.35rem;
}

.entities-skeleton-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.entities-skeleton-title {
    width: 100px;
    height: 18px;
}

.entities-skeleton-pill {
    width: 30px;
    height: 22px;
}

.entities-skeleton-card {
    display: grid;
    grid-template-columns: 66px 1fr;
    grid-template-rows: 1fr 1fr;
    column-gap: 14px;
    row-gap: 10px;
    align-content: center;
    min-height: 98px;
    padding: 14px;
    pointer-events: none;
}

.entities-skeleton-thumb {
    grid-row: 1 / span 2;
    width: 66px;
    height: 66px;
    border-radius: 13px;
}

.entities-skeleton-card-title {
    width: min(150px, 78%);
    height: 15px;
    align-self: end;
}

.entities-skeleton-card-caption {
    width: min(90px, 52%);
    height: 11px;
}

.entities-hydration-error {
    display: grid;
    gap: 0.6rem;
    justify-items: start;
    margin-top: 1.35rem;
    padding: 1.2rem;
    border: 1px solid rgba(171, 91, 53, 0.22);
    border-radius: 16px;
    background: #fffaf6;
}

    .entities-hydration-error h3,
    .entities-hydration-error p {
        margin: 0;
    }

@media (prefers-reduced-motion: reduce) {
    .entities-skeleton {
        animation: none;
    }
}


/* =========================================================
   Recently Deleted group-first summary + preview UX
   ========================================================= */

.recently-deleted-summary {
    align-items: center;
    flex-wrap: wrap;
}

.deleted-group-badges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
    flex-wrap: wrap;
}

.deleted-group-count-pill {
    flex: 0 0 auto;
    padding: .38rem .58rem;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--sv-primary);
    font-size: .74rem;
    font-weight: 700;
    white-space: nowrap;
}

.deleted-group-overview {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .95rem;
    padding: .55rem .72rem;
    border: 1px solid #e6e8f2;
    border-radius: 999px;
    background: var(--sv-surface-soft);
    color: var(--sv-text-soft);
    font-size: .86rem;
}

    .deleted-group-overview strong {
        color: var(--sv-text);
    }

.deleted-group-actions-top {
    justify-content: flex-start;
    margin: .95rem 0 .35rem;
}

.deleted-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 1rem 0 .55rem;
    color: var(--sv-text-soft);
    font-size: .82rem;
    line-height: 1.45;
}

.deleted-preview-toggle {
    border: 1px solid rgba(75, 99, 255, .22);
    border-radius: 999px;
    background: rgba(75, 99, 255, .08);
    color: var(--sv-primary);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
    padding: .52rem .72rem;
    white-space: nowrap;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

    .deleted-preview-toggle:hover,
    .deleted-preview-toggle:focus {
        background: rgba(75, 99, 255, .13);
        border-color: rgba(75, 99, 255, .36);
        transform: translateY(-1px);
    }

    .deleted-preview-toggle:active {
        transform: translateY(0);
    }

.deleted-child-list li[hidden] {
    display: none !important;
}

.deleted-child-list li {
    padding-left: calc(.1rem + (var(--deleted-child-depth, 0) * .85rem));
}

.deleted-preview-note {
    margin: -.15rem 0 .85rem;
    color: var(--sv-text-muted);
    font-size: .78rem;
    line-height: 1.5;
}

    .deleted-preview-note strong {
        color: var(--sv-text-soft);
    }

.deleted-group-card.is-showing-all-deleted-children .deleted-child-list {
    max-height: 52rem;
    overflow: auto;
}

@media (max-width: 767.98px) {
    .deleted-group-badges,
    .deleted-preview-header,
    .deleted-group-actions-top {
        width: 100%;
    }

    .deleted-group-badges,
    .deleted-preview-header {
        justify-content: flex-start;
    }

    .deleted-preview-header,
    .deleted-group-actions-top {
        flex-direction: column;
        align-items: stretch;
    }

    .deleted-preview-toggle {
        width: 100%;
    }
}

/* =========================
   Accounts page
   ========================= */

.accounts-page {
    display: flex;
    flex-direction: column;
    gap: 1.45rem;
}

.accounts-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem 0 0.15rem;
}

.accounts-eyebrow {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--sv-text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.accounts-page-header h1 {
    margin: 0;
    color: var(--sv-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
}

.accounts-page-header p {
    max-width: 640px;
    margin: 0.65rem 0 0;
    color: var(--sv-text-soft);
    font-size: 1rem;
    line-height: 1.75;
}

.accounts-primary-action,
.accounts-secondary-action,
.accounts-filter-submit,
.accounts-danger-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 46px;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-weight: 700;
}

.accounts-primary-action {
    border: 1px solid var(--sv-primary);
    background: linear-gradient(135deg, var(--sv-primary), #254a98);
    box-shadow: 0 12px 26px rgba(19, 37, 75, 0.18);
    color: #fff;
}

    .accounts-primary-action:hover,
    .accounts-primary-action:focus {
        border-color: var(--sv-primary-strong);
        background: linear-gradient(135deg, var(--sv-primary-strong), #1f3f85);
        color: #fff;
    }

.accounts-secondary-action,
.accounts-filter-submit {
    border: 1px solid rgba(19, 37, 75, 0.14);
    background: rgba(255, 255, 255, 0.82);
    color: var(--sv-primary);
}

    .accounts-secondary-action:hover,
    .accounts-secondary-action:focus,
    .accounts-filter-submit:hover,
    .accounts-filter-submit:focus {
        border-color: rgba(75, 99, 255, 0.35);
        background: #fff;
        color: var(--sv-link);
    }

.accounts-danger-action {
    border: 1px solid #c74343;
    background: #c74343;
    color: #fff;
}

.accounts-alert {
    border-radius: 16px;
    padding: 0.95rem 1.05rem;
    font-weight: 500;
}

.accounts-alert-success {
    border: 1px solid rgba(28, 127, 77, 0.2);
    background: #ebf8f0;
    color: #166b40;
}

.accounts-alert-error {
    border: 1px solid rgba(199, 67, 67, 0.24);
    background: #fff0f0;
    color: #9a2525;
}

.accounts-summary-section {
    padding: 1.15rem;
    border: 1px solid rgba(19, 37, 75, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 10px 24px rgba(19, 37, 75, 0.04);
}

.accounts-summary-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.accounts-summary-eyebrow {
    display: inline-block;
    margin-bottom: 0.25rem;
    color: var(--sv-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.accounts-summary-heading h2 {
    margin: 0;
    color: var(--sv-primary);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.accounts-summary-heading p {
    max-width: 760px;
    margin: 0.35rem 0 0;
    color: var(--sv-text-soft);
    font-size: 0.88rem;
    line-height: 1.55;
}

.accounts-summary-notice {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(190, 126, 23, 0.24);
    border-radius: 16px;
    background: #fff8e7;
    color: #805c12;
    font-size: 0.9rem;
    line-height: 1.45;
}

.accounts-summary-notice strong {
    color: #704d06;
}

.account-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
    gap: 0.9rem;
}

.account-summary-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    padding: 1.1rem;
    border: 1px solid rgba(19, 37, 75, 0.09);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(19, 37, 75, 0.045);
}

.account-summary-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.account-summary-currency {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 0.62rem;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--sv-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.045em;
}

.account-summary-count {
    color: var(--sv-text-soft);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: right;
}

.account-summary-net span {
    display: block;
    color: var(--sv-text-soft);
    font-size: 0.82rem;
    font-weight: 600;
}

.account-summary-net strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-size: clamp(1.45rem, 2.4vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.account-summary-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 0;
}

.account-summary-metrics div {
    min-width: 0;
    padding-top: 0.72rem;
    border-top: 1px solid rgba(19, 37, 75, 0.08);
}

.account-summary-metrics dt {
    color: var(--sv-text-soft);
    font-size: 0.73rem;
    font-weight: 700;
}

.account-summary-metrics dd {
    margin: 0.24rem 0 0;
    color: var(--sv-text);
    font-size: 0.95rem;
    font-weight: 700;
}

.accounts-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(130px, auto)) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.78rem;
    border: 1px solid rgba(19, 37, 75, 0.07);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 10px 24px rgba(19, 37, 75, 0.04);
}

.accounts-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0 0.8rem;
    border: 1px solid rgba(19, 37, 75, 0.11);
    border-radius: 13px;
    background: #fff;
    color: var(--sv-text-muted);
}

    .accounts-search-wrap input,
    .accounts-filter-select,
    .account-form-section input,
    .account-form-section select {
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--sv-text);
        font: inherit;
    }

.accounts-filter-select {
    min-height: 44px;
    padding: 0 0.7rem;
    border: 1px solid rgba(19, 37, 75, 0.11);
    border-radius: 13px;
    background: #fff;
    font-size: 0.9rem;
}

.accounts-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

    .accounts-results-heading p,
    .accounts-results-heading span {
        margin: 0;
        color: var(--sv-text-soft);
    }

    .accounts-results-heading span {
        font-size: 0.84rem;
    }

.accounts-results-controls {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.accounts-display-controls {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.accounts-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.24rem;
    border: 1px solid rgba(19, 37, 75, 0.1);
    border-radius: 12px;
    background: #fff;
}

.accounts-display-option,
.accounts-display-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 9px;
    color: var(--sv-text-soft);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.accounts-display-option {
    min-width: 58px;
    padding: 0 0.6rem;
}

    .accounts-display-option:hover,
    .accounts-display-option:focus,
    .accounts-display-link:hover,
    .accounts-display-link:focus {
        color: var(--sv-primary);
        background: #f2f4fb;
    }

    .accounts-display-option.is-active {
        background: var(--sv-primary);
        color: #fff;
        box-shadow: 0 4px 10px rgba(19, 37, 75, 0.14);
    }

.accounts-display-link {
    padding: 0 0.72rem;
    border: 1px solid rgba(19, 37, 75, 0.11);
    background: #fff;
}

.accounts-list-wrap {
    overflow-x: auto;
    border: 1px solid rgba(19, 37, 75, 0.08);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(19, 37, 75, 0.06);
}

.accounts-list-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

    .accounts-list-table th,
    .accounts-list-table td {
        padding: 0.95rem 1rem;
        border-bottom: 1px solid rgba(19, 37, 75, 0.07);
        color: var(--sv-text-soft);
        font-size: 0.84rem;
        text-align: left;
        vertical-align: middle;
    }

    .accounts-list-table th {
        background: rgba(242, 244, 251, 0.72);
        color: var(--sv-text-muted);
        font-size: 0.73rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .accounts-list-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .accounts-list-table tbody tr:hover {
        background: rgba(242, 244, 251, 0.42);
    }

.accounts-list-account {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 220px;
}

.account-list-icon {
    flex: 0 0 auto;
}

.accounts-list-account strong,
.accounts-list-account small,
.accounts-list-balance-label,
.accounts-list-balance {
    display: block;
}

.accounts-list-account strong,
.accounts-list-balance {
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
}

.accounts-list-account small,
.accounts-list-balance-label,
.accounts-list-schedule {
    margin-top: 0.18rem;
    color: var(--sv-text-soft);
    font-size: 0.78rem;
}

.accounts-list-balance {
    margin-top: 0.18rem;
    font-size: 0.98rem;
}

.accounts-list-schedule {
    min-width: 250px;
    line-height: 1.45;
}

.accounts-all-results {
    margin: 1.1rem 0 0;
    color: var(--sv-text-soft);
    font-size: 0.86rem;
}

.accounts-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.account-card {
    position: relative;
    min-height: 205px;
    overflow: hidden;
    border: 1px solid rgba(19, 37, 75, 0.07);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(19, 37, 75, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

    .account-card:hover {
        transform: translateY(-3px);
        border-color: rgba(75, 99, 255, 0.2);
        box-shadow: 0 18px 35px rgba(19, 37, 75, 0.1);
    }

    .account-card::before {
        position: absolute;
        top: 0;
        left: 0;
        width: 5px;
        height: 100%;
        content: "";
        background: var(--account-accent, var(--sv-accent));
    }

.account-card-ocean {
    --account-accent: #2f6df6;
}

.account-card-indigo {
    --account-accent: #4b63ff;
}

.account-card-violet {
    --account-accent: #7447d7;
}

.account-card-teal {
    --account-accent: #0c9b91;
}

.account-card-coral {
    --account-accent: #e8795b;
}

.account-card-gold {
    --account-accent: #b68213;
}

.account-card-slate {
    --account-accent: #5e6878;
}

.account-card-main {
    width: 100%;
    min-height: 205px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    border: 0;
    padding: 1.25rem 1.25rem 1.05rem 1.45rem;
    background: transparent;
    color: inherit;
    text-align: left;
}

    .account-card-main:focus-visible,
    .account-menu-trigger:focus-visible,
    .account-sheet-close:focus-visible {
        outline: 3px solid rgba(75, 99, 255, 0.35);
        outline-offset: -3px;
    }

.account-card-icon,
.account-details-icon,
.account-list-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--account-accent, var(--sv-accent)) 13%, #fff);
    color: var(--account-accent, var(--sv-accent));
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
}

.account-card-title-row,
.account-card-balance-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.account-card-title-row {
    margin-top: 0.85rem;
}

    .account-card-title-row strong,
    .account-card-title-row small,
    .account-card-balance-row small,
    .account-card-balance-row strong,
    .account-card-footer {
        display: block;
    }

    .account-card-title-row strong {
        color: var(--sv-primary);
        font-family: "Montserrat", sans-serif;
        font-size: 1.05rem;
        font-weight: 700;
    }

    .account-card-title-row small,
    .account-card-balance-row small,
    .account-card-footer {
        color: var(--sv-text-soft);
        font-size: 0.82rem;
    }

    .account-card-title-row small {
        margin-top: 0.25rem;
    }

.account-type-pill {
    border-radius: 999px;
    padding: 0.32rem 0.6rem;
    background: #f2f4fb;
    color: var(--sv-text-soft);
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
}

.account-card-balance-row {
    align-items: flex-end;
}

    .account-card-balance-row strong {
        margin-top: 0.15rem;
        color: var(--sv-primary);
        font-family: "Montserrat", sans-serif;
        font-size: 1.45rem;
        font-weight: 800;
        letter-spacing: -0.04em;
    }

.account-card-arrow {
    color: var(--account-accent, var(--sv-accent));
    font-size: 1.35rem;
}

.account-card-menu {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
}

.account-menu-trigger {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--sv-text-soft);
    font-weight: 800;
    letter-spacing: 0.05em;
}

    .account-menu-trigger:hover,
    .account-menu-trigger:focus {
        background: #f2f4fb;
        color: var(--sv-primary);
    }

.accounts-danger-link {
    color: #b32828;
}

    .accounts-danger-link:hover,
    .accounts-danger-link:focus {
        background: #fff1f1;
        color: #8e1c1c;
    }

.accounts-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.25rem 0 0;
    color: var(--sv-text-soft);
    font-size: 0.86rem;
}

    .accounts-pagination > div {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
    }

.accounts-page-indicator {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 0.45rem;
    color: var(--sv-text-soft);
    font-size: 0.82rem;
    font-weight: 600;
}

    .accounts-page-indicator[aria-disabled="true"] {
        color: rgba(19, 37, 75, 0.38);
    }

.accounts-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 680px;
    margin: 1rem auto;
    padding: 3rem 1.35rem;
    border: 1px dashed rgba(19, 37, 75, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.accounts-empty-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(75, 99, 255, 0.14), rgba(106, 53, 240, 0.14));
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
}

.accounts-empty-state h2 {
    margin: 0;
    color: var(--sv-primary);
    font-size: 1.45rem;
    font-weight: 800;
}

.accounts-empty-state p {
    max-width: 510px;
    margin: 0.7rem 0 1.3rem;
    color: var(--sv-text-soft);
    line-height: 1.75;
}

.account-overlay {
    position: fixed;
    z-index: 1040;
    inset: 0;
    background: rgba(10, 20, 43, 0.28);
    opacity: 0;
    transition: opacity 0.18s ease;
}

    .account-overlay.is-open {
        opacity: 1;
    }

.account-sheet {
    position: fixed;
    z-index: 1050;
    top: 0;
    right: 0;
    width: min(100%, 530px);
    height: 100vh;
    overflow-y: auto;
    padding: 1.3rem;
    background: #fff;
    box-shadow: -24px 0 54px rgba(19, 37, 75, 0.18);
    transform: translateX(103%);
    transition: transform 0.18s ease;
}

    .account-sheet.is-open {
        transform: translateX(0);
    }

.account-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid rgba(19, 37, 75, 0.09);
}

    .account-sheet-header h2 {
        margin: 0;
        color: var(--sv-primary);
        font-size: 1.55rem;
        font-weight: 800;
    }

.account-sheet-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(19, 37, 75, 0.12);
    border-radius: 12px;
    background: #fff;
    color: var(--sv-primary);
    font-size: 1.65rem;
    line-height: 1;
}

.account-sheet form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.2rem;
}

.account-form-section {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

    .account-form-section label {
        color: var(--sv-primary);
        font-size: 0.86rem;
        font-weight: 700;
    }

    .account-form-section input,
    .account-form-section select {
        min-height: 46px;
        padding: 0.7rem 0.75rem;
        border: 1px solid rgba(19, 37, 75, 0.16);
        border-radius: 13px;
        background: #fff;
    }

        .account-form-section input:focus,
        .account-form-section select:focus {
            border-color: var(--sv-accent);
            box-shadow: 0 0 0 0.18rem rgba(75, 99, 255, 0.12);
        }

.account-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.account-money-input {
    display: flex;
    align-items: center;
    min-height: 46px;
    overflow: hidden;
    border: 1px solid rgba(19, 37, 75, 0.16);
    border-radius: 13px;
    background: #fff;
}

    .account-money-input:focus-within {
        border-color: var(--sv-accent);
        box-shadow: 0 0 0 0.18rem rgba(75, 99, 255, 0.12);
    }

    .account-money-input span {
        padding-left: 0.8rem;
        color: var(--sv-text-muted);
        font-weight: 700;
    }

    .account-money-input input {
        border: 0;
        box-shadow: none !important;
    }

.account-sheet-footer {
    position: sticky;
    bottom: -1.3rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
    margin: 1.3rem -1.3rem -1.3rem;
    padding: 1rem 1.3rem;
    border-top: 1px solid rgba(19, 37, 75, 0.09);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
}

.account-details-content {
    padding-top: 1.35rem;
}

.account-details-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.3rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #eef3ff, #f7f5ff);
}

    .account-details-hero[data-account-details-color="teal"] {
        background: linear-gradient(135deg, #e9f9f7, #f7fffd);
    }

    .account-details-hero[data-account-details-color="coral"] {
        background: linear-gradient(135deg, #fff0ec, #fff9f6);
    }

    .account-details-hero[data-account-details-color="gold"] {
        background: linear-gradient(135deg, #fff7e5, #fffcf5);
    }

    .account-details-hero[data-account-details-color="slate"] {
        background: linear-gradient(135deg, #f1f4f7, #f9fafb);
    }

    .account-details-hero span:not(.account-details-icon),
    .account-details-hero small {
        color: var(--sv-text-soft);
    }

    .account-details-hero strong {
        margin-top: 0.2rem;
        color: var(--sv-primary);
        font-family: "Montserrat", sans-serif;
        font-size: 2rem;
        font-weight: 800;
        letter-spacing: -0.055em;
    }

.account-details-list {
    display: grid;
    gap: 0;
    margin: 1.25rem 0 0;
}

    .account-details-list div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.95rem 0;
        border-bottom: 1px solid rgba(19, 37, 75, 0.08);
    }

    .account-details-list dt {
        color: var(--sv-text-soft);
        font-weight: 500;
    }

    .account-details-list dd {
        margin: 0;
        color: var(--sv-primary);
        font-weight: 700;
        text-align: right;
    }

.account-confirm-dialog {
    position: fixed;
    z-index: 1060;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.account-confirm-card {
    width: min(100%, 430px);
    padding: 1.5rem;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(19, 37, 75, 0.24);
}

.account-confirm-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff0f0;
    color: #b32828;
    font-weight: 800;
}

.account-confirm-card h2 {
    margin: 1rem 0 0;
    color: var(--sv-primary);
    font-size: 1.35rem;
    font-weight: 800;
}

.account-confirm-card p {
    margin: 0.65rem 0 1.2rem;
    color: var(--sv-text-soft);
    line-height: 1.7;
}

.account-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
}

@media (max-width: 991.98px) {
    .account-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .accounts-filter-bar {
        grid-template-columns: minmax(200px, 1fr) repeat(2, minmax(130px, 1fr));
    }

    .accounts-filter-submit {
        grid-column: span 3;
    }
}

@media (max-width: 767.98px) {
    .accounts-page-header,
    .accounts-results-heading,
    .accounts-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

        .accounts-page-header .accounts-primary-action {
            width: 100%;
        }

    .account-summary-grid,
    .accounts-card-grid,
    .account-form-grid {
        grid-template-columns: 1fr;
    }

    .accounts-filter-bar {
        grid-template-columns: 1fr;
    }

    .accounts-filter-submit {
        grid-column: span 1;
    }

    .accounts-results-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .account-sheet {
        width: 100%;
        padding: 1rem;
    }

    .account-sheet-footer {
        bottom: -1rem;
        margin: 1.1rem -1rem -1rem;
        padding: 0.85rem 1rem;
    }

    .account-confirm-actions {
        flex-direction: column-reverse;
    }

        .account-confirm-actions .btn {
            width: 100%;
        }
}

/* =========================
   Credit-card artwork
   =========================
   Decorative artwork is intentionally Web UI-local. Financial values remain
   in the solid content area below; this preserves contrast and fast scanning.

   The artwork header uses a quiet FP-blue gallery halo behind each card image.
   It is intentionally subtle: the actual issuer/private artwork stays dominant,
   while light cards retain enough edge definition against the white surface.
*/
.account-card-credit {
    display: flex;
    flex-direction: column;
    min-height: 340px;
}

    .account-card-credit .account-card-art {
        position: relative;
        isolation: isolate;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 136px;
        overflow: hidden;
        padding: 8px 24px;
        border-bottom: 1px solid rgba(19, 37, 75, 0.08);
        background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    }

        .account-card-credit .account-card-art::before {
            position: absolute;
            z-index: 0;
            inset: -34% -14%;
            content: "";
            pointer-events: none;
            background: radial-gradient( ellipse 58% 62% at 50% 50%, rgba(47, 109, 246, 0.13) 0%, rgba(75, 99, 255, 0.07) 38%, rgba(75, 99, 255, 0) 72%);
            opacity: 0.92;
        }

        .account-card-credit .account-card-art::after {
            display: none;
        }

.account-card-art-image {
    position: relative;
    z-index: 1;
    width: auto;
    max-width: 100%;
    height: 100%;
    display: block;
    margin: 0 auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 8px 14px rgba(19, 37, 75, 0.15));
    object-fit: contain;
    object-position: center center;
}

.account-card-art-fallback {
    position: relative;
    z-index: 1;
    width: 78%;
    height: 72%;
    display: block;
    border: 1px solid rgba(19, 37, 75, 0.10);
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(19, 37, 75, 0.04) 0%, rgba(19, 37, 75, 0.09) 100%), #ffffff;
    box-shadow: 0 8px 18px rgba(19, 37, 75, 0.08);
}

.account-card-credit .account-card-main {
    min-height: 0;
    flex: 1 1 auto;
    padding: 1rem 1.25rem 1.05rem 1.45rem;
}

.account-card-credit .account-card-title-row {
    margin-top: 0;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .account-card-credit .account-card-art::before,
    .account-card-credit .account-card-art-image {
        transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
    }

    .account-card-credit:hover .account-card-art::before {
        opacity: 1;
        transform: scale(1.035);
    }

    .account-card-credit:hover .account-card-art-image {
        filter: drop-shadow(0 11px 19px rgba(19, 37, 75, 0.18));
        transform: translateY(-1px);
    }
}

@media (max-width: 767.98px) {
    .account-card-credit {
        min-height: 350px;
    }

        .account-card-credit .account-card-art {
            flex-basis: 140px;
            padding-inline: 16px;
        }
}

/* =========================
   Transaction Categories
   =========================
   The Category catalog is a server-rendered management surface. The styles
   intentionally reuse FP's Accounts visual language while keeping catalog
   classification, AI spending-nature metadata, and lifecycle status scannable.
*/
.category-page,
.category-form-page,
.category-delete-page {
    padding: 1.4rem 0 2.2rem;
}

.category-page-header,
.category-form-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.35rem;
    margin-bottom: 1.15rem;
}

.category-eyebrow {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--sv-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.category-page-header h1,
.category-form-header h1,
.category-delete-card h1 {
    margin: 0;
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-size: clamp(1.75rem, 2.6vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.045em;
}

.category-page-header p,
.category-form-header p {
    max-width: 760px;
    margin: 0.65rem 0 0;
    color: var(--sv-text-soft);
    line-height: 1.72;
}

.category-primary-action,
.category-secondary-action,
.category-filter-submit,
.category-danger-action {
    min-height: 42px;
    padding: 0.62rem 0.9rem;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 800;
}

.category-primary-action {
    border: 1px solid var(--sv-primary);
    background: var(--sv-primary);
    color: #fff;
}

.category-primary-action:hover,
.category-primary-action:focus {
    border-color: #0f2b65;
    background: #0f2b65;
    color: #fff;
}

.category-secondary-action,
.category-filter-submit {
    border: 1px solid rgba(19, 37, 75, 0.14);
    background: #fff;
    color: var(--sv-primary);
}

.category-secondary-action:hover,
.category-secondary-action:focus,
.category-filter-submit:hover,
.category-filter-submit:focus {
    border-color: rgba(47, 109, 246, 0.38);
    background: #f6f8ff;
    color: var(--sv-primary);
}

.category-danger-action {
    border: 1px solid #b32828;
    background: #b32828;
    color: #fff;
}

.category-danger-action:hover,
.category-danger-action:focus {
    border-color: #8e1c1c;
    background: #8e1c1c;
    color: #fff;
}

.category-alert {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

.category-alert-success {
    border: 1px solid rgba(16, 132, 91, 0.18);
    background: #edf9f3;
    color: #136d4d;
}

.category-alert-error {
    border: 1px solid rgba(179, 40, 40, 0.18);
    background: #fff2f2;
    color: #9a2424;
}

.category-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(132px, 1fr)) auto auto;
    align-items: end;
    gap: 0.72rem;
    padding: 0.85rem;
    border: 1px solid rgba(19, 37, 75, 0.09);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 26px rgba(19, 37, 75, 0.04);
}

.category-search-wrap input,
.category-filter-select,
.category-form-section input,
.category-form-section select {
    width: 100%;
    min-height: 44px;
    padding: 0.62rem 0.72rem;
    border: 1px solid rgba(19, 37, 75, 0.16);
    border-radius: 12px;
    background: #fff;
    color: var(--sv-primary);
    font-size: 0.88rem;
}

.category-search-wrap input:focus,
.category-filter-select:focus,
.category-form-section input:focus,
.category-form-section select:focus {
    border-color: var(--sv-accent);
    box-shadow: 0 0 0 0.18rem rgba(75, 99, 255, 0.12);
    outline: 0;
}

.category-clear-filters {
    align-self: center;
    color: var(--sv-text-soft);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.category-clear-filters:hover,
.category-clear-filters:focus {
    color: var(--sv-primary);
    text-decoration: underline;
}

.category-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.1rem 0 0.75rem;
}

.category-results-heading > div {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
}

.category-results-heading strong {
    color: var(--sv-primary);
    font-size: 0.95rem;
}

.category-results-heading span {
    color: var(--sv-text-soft);
    font-size: 0.8rem;
}

.category-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(19, 37, 75, 0.09);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(19, 37, 75, 0.04);
}

.category-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

.category-table th,
.category-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(19, 37, 75, 0.08);
    vertical-align: middle;
    text-align: left;
}

.category-table th {
    background: #fafbff;
    color: var(--sv-text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.category-table tbody tr:last-child td {
    border-bottom: 0;
}

.category-table tbody tr:hover {
    background: #fbfcff;
}

.category-name-cell {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.category-name-cell strong {
    color: var(--sv-primary);
    font-size: 0.92rem;
}

.category-standard-badge,
.category-classification-pill,
.category-nature-pill,
.category-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.category-standard-badge {
    background: #eef2ff;
    color: #4056bc;
}

.category-classification-income { background: #edf9f3; color: #136d4d; }
.category-classification-expense { background: #fff3ed; color: #ad4d2d; }
.category-classification-transfer { background: #eff7fb; color: #287090; }
.category-classification-adjustment { background: #f3f0ff; color: #6846a8; }
.category-nature-essential { background: #eef7ef; color: #397348; }
.category-nature-discretionary { background: #f5f1ff; color: #6a4eaa; }
.category-nature-avoidable { background: #fff2ef; color: #b14937; }
.category-nature-neutral { background: #f2f4f7; color: #596575; }
.category-status-active { background: #edf9f3; color: #136d4d; }
.category-status-archived { background: #f2f4f7; color: #596575; }

.category-actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.28rem;
    white-space: nowrap;
}

.category-actions-cell form {
    margin: 0;
}

.category-action-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.35rem 0.48rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--sv-primary);
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.category-action-link:hover,
.category-action-link:focus {
    background: #f1f4ff;
    color: var(--sv-primary);
}

.category-action-danger {
    color: #b32828;
}

.category-action-danger:hover,
.category-action-danger:focus {
    background: #fff1f1;
    color: #8e1c1c;
}

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

.category-pagination > div {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.category-page-indicator {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 0.35rem;
    color: var(--sv-text-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.category-page-indicator[aria-disabled="true"] {
    color: rgba(19, 37, 75, 0.36);
}

.category-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 1rem auto;
    padding: 3rem 1.35rem;
    border: 1px dashed rgba(19, 37, 75, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.category-empty-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(75, 99, 255, 0.14), rgba(106, 53, 240, 0.14));
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
}

.category-empty-state h2 {
    margin: 0;
    color: var(--sv-primary);
    font-size: 1.42rem;
    font-weight: 800;
}

.category-empty-state p {
    max-width: 520px;
    margin: 0.7rem 0 1.25rem;
    color: var(--sv-text-soft);
    line-height: 1.7;
}

.category-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
    align-items: start;
    gap: 1.1rem;
}

.category-form-card,
.category-guidance-card,
.category-delete-card {
    border: 1px solid rgba(19, 37, 75, 0.09);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(19, 37, 75, 0.05);
}

.category-form-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.3rem;
}

.category-form-section {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.category-form-section label {
    color: var(--sv-primary);
    font-size: 0.84rem;
    font-weight: 800;
}

.category-form-section small {
    color: var(--sv-text-soft);
    font-size: 0.78rem;
    line-height: 1.55;
}

.category-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.category-sort-order-section {
    max-width: 230px;
}

.category-validation-summary,
.category-field-validation {
    color: #ad2f2f;
    font-size: 0.78rem;
    font-weight: 600;
}

.category-validation-summary:empty {
    display: none;
}

.category-form-context {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem;
    border-radius: 14px;
    background: #f7f9ff;
    color: var(--sv-text-soft);
    font-size: 0.8rem;
    line-height: 1.5;
}

.category-form-context strong {
    color: var(--sv-primary);
}

.category-form-actions,
.category-delete-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 0.25rem;
}

.category-guidance-card {
    padding: 1.25rem;
}

.category-guidance-card h2 {
    margin: 0;
    color: var(--sv-primary);
    font-size: 1.05rem;
    font-weight: 800;
}

.category-guidance-card dl {
    display: grid;
    gap: 1rem;
    margin: 1rem 0 0;
}

.category-guidance-card dl div {
    padding-bottom: 0.95rem;
    border-bottom: 1px solid rgba(19, 37, 75, 0.08);
}

.category-guidance-card dl div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.category-guidance-card dt {
    color: var(--sv-primary);
    font-size: 0.8rem;
    font-weight: 800;
}

.category-guidance-card dd {
    margin: 0.35rem 0 0;
    color: var(--sv-text-soft);
    font-size: 0.8rem;
    line-height: 1.58;
}

.category-back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--sv-primary);
    font-size: 0.83rem;
    font-weight: 800;
    text-decoration: none;
}

.category-back-link:hover,
.category-back-link:focus {
    color: var(--sv-accent);
    text-decoration: underline;
}

.category-delete-page {
    display: grid;
    place-items: center;
    min-height: 60vh;
}

.category-delete-card {
    width: min(100%, 560px);
    padding: 1.6rem;
}

.category-delete-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #fff0f0;
    color: #b32828;
    font-family: "Montserrat", sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
}

.category-delete-card .category-eyebrow {
    margin-top: 1rem;
}

.category-delete-card p {
    margin: 0.8rem 0 0;
    color: var(--sv-text-soft);
    line-height: 1.72;
}

.category-delete-note {
    padding: 0.8rem;
    border-radius: 12px;
    background: #fff8ed;
    color: #865016 !important;
    font-size: 0.84rem;
}

@media (max-width: 1199.98px) {
    .category-filter-bar {
        grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(132px, 1fr));
    }
}

@media (max-width: 991.98px) {
    .category-page-header,
    .category-results-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-search-wrap {
        grid-column: span 2;
    }

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

@media (max-width: 767.98px) {
    .category-page,
    .category-form-page,
    .category-delete-page {
        padding-top: 0.85rem;
    }

    .category-page-header .category-primary-action {
        width: 100%;
    }

    .category-filter-bar,
    .category-form-grid {
        grid-template-columns: 1fr;
    }

    .category-search-wrap {
        grid-column: span 1;
    }

    .category-filter-submit,
    .category-clear-filters {
        width: 100%;
        text-align: center;
    }

    .category-form-actions,
    .category-delete-actions {
        flex-direction: column-reverse;
    }

    .category-form-actions .btn,
    .category-delete-actions .btn {
        width: 100%;
    }
}

/* =========================
   Transaction Item catalog
   =========================
   Items deliberately reuse the established Category management language. The
   additions below make optional entry defaults and the wider Item table clear
   without changing the approved Accounts card artwork or navigation styling.
*/
.item-filter-bar {
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(132px, 1fr)) auto auto;
}

.item-table {
    min-width: 1040px;
}

.item-default-comment {
    max-width: 260px;
    margin-top: 0.32rem;
    color: var(--sv-text-soft);
    font-size: 0.74rem;
    line-height: 1.45;
}

.item-default-summary {
    color: var(--sv-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.item-default-empty {
    color: var(--sv-text-soft);
    font-size: 0.8rem;
}

.item-form-card {
    gap: 1.1rem;
}

.item-default-toggle {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.58rem;
    row-gap: 0.16rem;
    padding: 0.9rem;
    border: 1px solid rgba(47, 109, 246, 0.16);
    border-radius: 14px;
    background: #f8faff;
}

.item-default-toggle input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--sv-primary);
}

.item-default-toggle label {
    margin: 0;
    color: var(--sv-primary);
    font-size: 0.86rem;
    font-weight: 800;
}

.item-default-toggle span {
    grid-column: 2;
    color: var(--sv-text-soft);
    font-size: 0.76rem;
    line-height: 1.45;
}

.item-default-entry-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid rgba(19, 37, 75, 0.11);
    border-radius: 16px;
    background: #fbfcff;
}

.item-default-entry-card.is-hidden {
    display: none;
}

.item-default-entry-heading {
    display: grid;
    gap: 0.18rem;
}

.item-default-entry-heading strong {
    color: var(--sv-primary);
    font-size: 0.87rem;
}

.item-default-entry-heading span {
    color: var(--sv-text-soft);
    font-size: 0.77rem;
    line-height: 1.48;
}

.category-form-section textarea {
    width: 100%;
    min-height: 92px;
    padding: 0.62rem 0.72rem;
    border: 1px solid rgba(19, 37, 75, 0.16);
    border-radius: 12px;
    background: #fff;
    color: var(--sv-primary);
    font-size: 0.88rem;
    line-height: 1.5;
    resize: vertical;
}

.category-form-section textarea:focus {
    border-color: var(--sv-accent);
    box-shadow: 0 0 0 0.18rem rgba(75, 99, 255, 0.12);
    outline: 0;
}

@media (max-width: 1199.98px) {
    .item-filter-bar {
        grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(132px, 1fr));
    }
}

@media (max-width: 991.98px) {
    .item-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .item-filter-bar {
        grid-template-columns: 1fr;
    }
}

/* Transaction Item pagination: compact, familiar page controls above and below the table. */
.item-pagination {
    justify-content: space-between;
    gap: 0.9rem;
    margin: 0.95rem 0;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(19, 37, 75, 0.09);
    border-bottom: 1px solid rgba(19, 37, 75, 0.09);
}

.item-pagination-summary {
    color: var(--sv-text-soft);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.item-pagination-summary strong {
    color: var(--sv-primary);
    font-weight: 850;
}

.item-pagination-controls,
.item-page-number-list {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.36rem;
}

.item-pagination-controls {
    justify-content: flex-end;
}

.item-page-control {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.58rem;
    border: 1px solid rgba(19, 37, 75, 0.15);
    border-radius: 10px;
    background: #fff;
    color: var(--sv-primary);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.item-page-control:hover,
.item-page-control:focus-visible {
    border-color: rgba(75, 99, 255, 0.58);
    background: #f1f4ff;
    color: var(--sv-primary);
    outline: 0;
    transform: translateY(-1px);
}

.item-page-control:focus-visible {
    box-shadow: 0 0 0 3px rgba(75, 99, 255, 0.18);
}

.item-page-control-wide {
    min-width: auto;
}

.item-page-number {
    padding-right: 0.45rem;
    padding-left: 0.45rem;
}

.item-page-control.is-current {
    border-color: var(--sv-primary);
    background: var(--sv-primary);
    color: #fff;
    cursor: default;
}

.item-page-control.is-disabled {
    border-color: rgba(19, 37, 75, 0.09);
    background: #f7f8fb;
    color: rgba(19, 37, 75, 0.38);
    cursor: not-allowed;
}

.item-page-show-all {
    margin-left: 0.18rem;
    border-color: rgba(75, 99, 255, 0.3);
    background: #f7f8ff;
}

.item-page-show-all span {
    margin-left: 0.25rem;
    color: var(--sv-text-soft);
    font-variant-numeric: tabular-nums;
}

.item-page-ellipsis {
    min-width: 22px;
    color: var(--sv-text-soft);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

@media (max-width: 991.98px) {
    .item-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .item-pagination-controls {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .item-pagination-controls {
        gap: 0.28rem;
    }

    .item-page-control {
        min-width: 36px;
        min-height: 36px;
        padding: 0.3rem 0.48rem;
        font-size: 0.76rem;
    }


    .item-page-show-all {
        margin-left: 0;
        font-size: 0.76rem;
    }
}

/* Scoped catalog search and detail pages */
.catalog-scoped-search {
    position: relative;
    z-index: 20;
    margin: 0 0 1rem;
}

.catalog-scoped-search-form {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 0.85rem;
    border: 1px solid rgba(75, 99, 255, 0.5);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(75, 99, 255, 0.10), 0 10px 28px rgba(19, 37, 75, 0.07);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.catalog-scoped-search-form:focus-within {
    border-color: var(--sv-primary);
    box-shadow: 0 0 0 4px rgba(75, 99, 255, 0.18), 0 14px 34px rgba(19, 37, 75, 0.10);
}

.catalog-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    color: #74809a;
    font-size: 1.5rem;
    line-height: 1;
    transform: rotate(-14deg);
}

.catalog-scoped-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--sv-text);
    font-size: 1rem;
    font-weight: 600;
}

.catalog-scoped-search input::placeholder {
    color: #7d879c;
    font-weight: 500;
}

/* Match Shelvera: keep only the FP clear-search control, not the browser-native search cancel control. */
.catalog-scoped-search input::-webkit-search-cancel-button,
.catalog-scoped-search input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.catalog-scoped-search input::-ms-clear,
.catalog-scoped-search input::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

.catalog-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6e7890;
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1;
}

.catalog-search-clear:hover,
.catalog-search-clear:focus-visible {
    background: #eef1f7;
    color: var(--sv-primary);
    outline: 0;
}

.catalog-search-results {
    position: absolute;
    right: 0;
    left: 0;
    top: calc(100% + 0.58rem);
    overflow: hidden;
    border: 1px solid rgba(19, 37, 75, 0.12);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(19, 37, 75, 0.17);
}

.catalog-search-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(19, 37, 75, 0.10);
    color: #626e86;
    font-size: 0.8rem;
    font-weight: 800;
}

.catalog-search-scope {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(75, 99, 255, 0.28);
    border-radius: 999px;
    background: #f5f7ff;
    color: var(--sv-primary);
    padding: 0.28rem 0.5rem;
    font-size: 0.72rem;
}

.catalog-search-result-list {
    max-height: min(430px, 58vh);
    overflow-y: auto;
}

.catalog-search-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 1rem;
    padding: 0.82rem 1rem;
    border-bottom: 1px solid rgba(19, 37, 75, 0.08);
    color: var(--sv-text);
    text-decoration: none;
    transition: background-color 0.14s ease;
}

.catalog-search-result:last-child {
    border-bottom: 0;
}

.catalog-search-result:hover,
.catalog-search-result:focus-visible,
.catalog-search-result.is-active {
    background: #f4f6ff;
    color: var(--sv-text);
    outline: 0;
}

.catalog-search-result-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.catalog-search-result-title {
    overflow: hidden;
    color: #1d2e53;
    font-size: 0.98rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-search-result-badge,
.catalog-search-result-status {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    background: #eef0f5;
    color: #6d778b;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.32rem 0.5rem;
}

.catalog-search-result-meta {
    overflow: hidden;
    color: #69758c;
    font-size: 0.82rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-search-result-status {
    align-self: center;
    grid-column: 2;
    grid-row: 1 / span 2;
    background: #eaf8f0;
    color: #347451;
}

.catalog-search-result-status.is-archived {
    background: #f1f2f6;
    color: #777f91;
}

.catalog-search-highlight {
    padding: 0 0.08rem;
    border-radius: 0.14rem;
    background: #ffec94;
    color: inherit;
}

.catalog-search-message {
    margin: 0;
    padding: 1rem;
    color: #657188;
    font-size: 0.88rem;
    font-weight: 600;
}

.catalog-search-message.is-loading,
.catalog-search-message.is-hint {
    color: #66748d;
}

.catalog-search-message.is-error {
    color: #a1434a;
}

.catalog-name-link,
.account-detail-link {
    color: inherit;
    text-decoration: none;
}

.catalog-name-link {
    color: #203764;
    font-weight: 800;
}

.catalog-name-link:hover,
.catalog-name-link:focus-visible,
.account-detail-link:hover,
.account-detail-link:focus-visible {
    color: var(--sv-primary);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    outline: 0;
}

.catalog-detail-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.3rem 0 2.5rem;
}

.catalog-detail-back {
    display: inline-flex;
    gap: 0.42rem;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--sv-primary);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.catalog-detail-back:hover,
.catalog-detail-back:focus-visible {
    color: #203baf;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    outline: 0;
}

.catalog-alert {
    margin-bottom: 1rem;
    padding: 0.78rem 1rem;
    border-radius: 12px;
    font-weight: 650;
}

.catalog-alert-success { background: #ecf9f0; color: #2c7850; }
.catalog-alert-error { background: #fff0f1; color: #a13f4a; }
.catalog-alert-info {
    background: rgba(239, 244, 255, 0.92);
    color: #27416f;
    border: 1px solid rgba(39, 80, 159, 0.14);
}

.correction-workflow-note { line-height: 1.55; }

.catalog-detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(19, 37, 75, 0.10);
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f6ff 100%);
    box-shadow: 0 12px 30px rgba(19, 37, 75, 0.07);
}

.catalog-detail-eyebrow {
    display: block;
    margin-bottom: 0.42rem;
    color: var(--sv-primary);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.catalog-detail-hero h1 {
    margin: 0;
    color: #182a4c;
    font-family: Montserrat, Inter, sans-serif;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 800;
}

.catalog-detail-hero p {
    margin: 0.45rem 0 0;
    color: #68758c;
    font-weight: 600;
}

.catalog-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-end;
    gap: 0.5rem;
}

.catalog-detail-actions form { margin: 0; }

.category-row-actions a + a { margin-left: 0.7rem; }

.catalog-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.95rem;
}

.catalog-detail-card,
.catalog-detail-panel {
    border: 1px solid rgba(19, 37, 75, 0.10);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(19, 37, 75, 0.04);
}

.catalog-detail-card {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    padding: 1rem;
}

.catalog-detail-card > span:first-child {
    color: #778197;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.catalog-detail-card strong { color: #20355e; font-size: 1.08rem; }
.catalog-detail-card small { color: #7b8599; font-weight: 600; }

.catalog-detail-panel {
    margin-top: 0.95rem;
    padding: clamp(1rem, 2vw, 1.35rem);
}

.catalog-detail-panel h2 {
    margin: 0 0 0.85rem;
    color: #22355c;
    font-family: Montserrat, Inter, sans-serif;
    font-size: 1.06rem;
    font-weight: 800;
}

.catalog-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.5rem;
    margin: 0;
}

.catalog-detail-list > div {
    padding-bottom: 0.62rem;
    border-bottom: 1px solid rgba(19, 37, 75, 0.08);
}

.catalog-detail-list dt {
    margin-bottom: 0.22rem;
    color: #788399;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.catalog-detail-list dd {
    margin: 0;
    color: #27395f;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.catalog-detail-empty { margin: 0; color: #748096; font-weight: 600; }

.account-detail-hero { background: linear-gradient(135deg, #ffffff 0%, #eef3ff 100%); }

@media (max-width: 767.98px) {
    .catalog-scoped-search-form { min-height: 52px; }
    .catalog-search-result { grid-template-columns: minmax(0, 1fr); }
    .catalog-search-result-status { grid-column: 1; grid-row: auto; justify-self: start; }
    .catalog-detail-hero { flex-direction: column; }
    .catalog-detail-actions { justify-content: flex-start; }
    .catalog-detail-grid,
    .catalog-detail-list { grid-template-columns: 1fr; }
}


/* =========================
   Structured Transactions
   ========================= */

.transactions-page .category-page-header {
    align-items: flex-end;
}

.transaction-filter-card {
    margin-bottom: 1.15rem;
}

.transaction-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: end;
}

.transaction-filter-action {
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.transaction-filter-action .btn {
    width: 100%;
}

.transaction-filter-reset {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.85rem;
    font-size: 0.88rem;
    font-weight: 700;
}

.transaction-list-summary {
    align-items: flex-start;
}

.transaction-list-summary p {
    margin: 0;
    max-width: 34rem;
    text-align: right;
    font-size: 0.9rem;
}

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

.transaction-table {
    min-width: 960px;
}

.transaction-table td {
    vertical-align: top;
}

.transaction-row-primary-link {
    display: inline-flex;
    color: var(--sv-primary);
    font-weight: 800;
    line-height: 1.35;
}

.transaction-row-primary-link:hover,
.transaction-row-primary-link:focus-visible {
    color: var(--sv-link);
    text-decoration: underline;
}

.transaction-row-secondary {
    display: block;
    margin-top: 0.22rem;
    color: #758098;
    font-size: 0.84rem;
    font-weight: 600;
}

.transaction-amount {
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap;
}

.transaction-comment {
    max-width: 18rem;
    color: #69758b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.transaction-row-voided {
    opacity: 0.72;
}

.transaction-row-voided .transaction-row-primary-link {
    text-decoration: line-through;
}

.transaction-form-page {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.transaction-form-card {
    padding: 1.45rem;
}

.transaction-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.transaction-form-field-wide {
    grid-column: 1 / -1;
}

.transaction-amount-input {
    position: relative;
}

.transaction-amount-input > span {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    color: #78839a;
    font-size: 0.82rem;
    font-weight: 700;
    pointer-events: none;
}

.transaction-amount-input input {
    padding-left: 4.5rem;
}

.transaction-derived-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column: 1 / -1;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(75, 99, 255, 0.18);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(75, 99, 255, 0.06), rgba(106, 53, 240, 0.05));
}

.transaction-derived-preview > div {
    min-width: 0;
}

.transaction-derived-preview span {
    display: block;
    margin-bottom: 0.22rem;
    color: #7a8498;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.transaction-derived-preview strong {
    display: block;
    overflow: hidden;
    color: var(--sv-primary);
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-detail-hero {
    align-items: flex-start;
}

.transaction-detail-amount {
    white-space: nowrap;
}

.transaction-detail-explainer {
    margin: -0.2rem 0 1rem;
    color: #6f7a8e;
    line-height: 1.6;
}

.transaction-voided-notice {
    margin-bottom: 1.15rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(179, 59, 59, 0.22);
    border-radius: 14px;
    background: rgba(255, 239, 239, 0.72);
    color: #9f1e1e;
    font-weight: 650;
    line-height: 1.55;
}

.transaction-void-page {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.transaction-void-card {
    padding: 1.45rem;
}

.transaction-void-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0 0 1.35rem;
}

.transaction-void-summary > div {
    padding: 0.9rem;
    border: 1px solid rgba(24, 50, 96, 0.09);
    border-radius: 13px;
    background: #fbfcff;
}

.transaction-void-summary dt {
    margin-bottom: 0.25rem;
    color: #78839a;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.transaction-void-summary dd {
    margin: 0;
    color: var(--sv-primary);
    font-weight: 750;
}

@media (max-width: 1199.98px) {
    .transaction-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .transactions-page .category-page-header {
        align-items: flex-start;
    }

    .transaction-filter-grid,
    .transaction-form-grid,
    .transaction-derived-preview,
    .transaction-void-summary {
        grid-template-columns: 1fr;
    }

    .transaction-filter-action {
        align-items: stretch;
    }

    .transaction-list-summary p {
        text-align: left;
    }

    .transaction-comment {
        max-width: none;
    }

    .transaction-table {
        min-width: 0;
    }

    .transaction-table thead {
        display: none;
    }

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

    .transaction-table tr {
        padding: 0.9rem;
        border-bottom: 1px solid rgba(24, 50, 96, 0.10);
    }

    .transaction-table td {
        display: grid;
        grid-template-columns: minmax(8rem, 38%) minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.3rem 0;
        border: 0;
    }

    .transaction-table td::before {
        content: attr(data-label);
        color: #78839a;
        font-size: 0.76rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .transaction-table td.category-row-actions::before {
        content: "";
    }

    .transaction-table td.category-row-actions {
        display: block;
        margin-top: 0.35rem;
    }
}

/* ==========================================
   Structured Transaction entry refinement
   Calm, deliberate, decision-first data entry
   ========================================== */
.transaction-entry-page {
    max-width: 1020px;
}

.transaction-entry-header {
    max-width: 760px;
    margin-bottom: 1.35rem;
}

.transaction-entry-header p {
    max-width: 700px;
}

.transaction-entry-card {
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(24, 50, 96, 0.10);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(19, 37, 75, 0.07);
}

.transaction-entry-card > .catalog-form-validation {
    margin: 1.25rem 1.45rem 0;
}

.transaction-entry-section {
    padding: 1.45rem 1.55rem;
    border-top: 1px solid rgba(24, 50, 96, 0.09);
}

.transaction-entry-section:first-of-type {
    border-top: 0;
}

.transaction-entry-section-primary {
    background:
        radial-gradient(circle at 95% 0%, rgba(106, 53, 240, 0.09), transparent 30%),
        linear-gradient(135deg, rgba(75, 99, 255, 0.045), rgba(255, 255, 255, 0.95));
}

.transaction-entry-section-amount {
    background: #ffffff;
}

.transaction-entry-section-derived {
    background: #fafbff;
}

.transaction-entry-section-note {
    background: #ffffff;
}

.transaction-entry-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.1rem;
}

.transaction-entry-section-heading > div {
    min-width: 0;
}

.transaction-entry-step {
    display: inline-block;
    margin-bottom: 0.25rem;
    color: var(--sv-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.transaction-entry-section-heading h2 {
    margin: 0;
    color: var(--sv-primary);
    font-size: 1.12rem;
    font-weight: 800;
}

.transaction-entry-section-heading p {
    max-width: 25rem;
    margin: 0.1rem 0 0;
    color: #718098;
    font-size: 0.9rem;
    line-height: 1.52;
    text-align: right;
}

.transaction-entry-section-heading-compact {
    margin-bottom: 0.9rem;
}

.transaction-entry-primary-grid {
    display: grid;
    grid-template-columns: minmax(10rem, 0.72fr) minmax(15rem, 1.1fr);
    gap: 1rem;
    align-items: start;
}

.transaction-item-field {
    grid-column: 1 / -1;
}

.transaction-entry-card .catalog-form-field label {
    margin-bottom: 0.45rem;
    color: #34496e;
    font-size: 0.86rem;
    font-weight: 750;
}

.transaction-entry-card .catalog-form-field input,
.transaction-entry-card .catalog-form-field select,
.transaction-entry-card .catalog-form-field textarea {
    min-height: 48px;
    border-color: rgba(24, 50, 96, 0.16);
    border-radius: 13px;
    background: #ffffff;
    box-shadow: none;
    color: var(--sv-primary);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.transaction-entry-card .catalog-form-field textarea {
    min-height: 104px;
    padding: 0.78rem 0.9rem;
    line-height: 1.5;
    resize: vertical;
}

.transaction-entry-card .catalog-form-field input:focus,
.transaction-entry-card .catalog-form-field select:focus,
.transaction-entry-card .catalog-form-field textarea:focus {
    border-color: rgba(75, 99, 255, 0.74);
    background: #ffffff;
    box-shadow: 0 0 0 0.22rem rgba(75, 99, 255, 0.12);
}

.transaction-entry-card .catalog-form-field input:disabled,
.transaction-entry-card .catalog-form-field select:disabled,
.transaction-entry-card .catalog-form-field textarea:disabled {
    opacity: 0.68;
    cursor: not-allowed;
}

.transaction-default-status {
    display: flex;
    align-items: flex-start;
    gap: 0.72rem;
    margin-top: 0.9rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(24, 50, 96, 0.10);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.66);
    color: #65728a;
}

.transaction-default-status.has-defaults {
    border-color: rgba(75, 99, 255, 0.22);
    background: rgba(75, 99, 255, 0.055);
    color: #405277;
}

.transaction-default-status.has-applied-defaults {
    border-color: rgba(57, 155, 113, 0.24);
    background: rgba(57, 155, 113, 0.065);
}

.transaction-default-status-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: rgba(75, 99, 255, 0.10);
    color: var(--sv-accent);
    font-size: 0.9rem;
    font-weight: 800;
}

.transaction-default-status.has-applied-defaults .transaction-default-status-icon {
    background: rgba(57, 155, 113, 0.13);
    color: #287e59;
}

.transaction-default-status strong,
.transaction-default-status span:not(.transaction-default-status-icon) {
    display: block;
}

.transaction-default-status strong {
    margin-bottom: 0.1rem;
    color: var(--sv-primary);
    font-size: 0.88rem;
    font-weight: 750;
}

.transaction-default-status span:not(.transaction-default-status-icon) {
    font-size: 0.82rem;
    line-height: 1.45;
}

.transaction-transfer-guidance {
    margin: 0.8rem 0 0;
    color: #6d7990;
    font-size: 0.84rem;
    line-height: 1.5;
}

.transaction-amount-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(16rem, 1.18fr);
    gap: 1rem;
    align-items: end;
}

.transaction-amount-field label {
    margin-bottom: 0.55rem !important;
}

.transaction-amount-control {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 60px;
    overflow: hidden;
    border: 1px solid rgba(24, 50, 96, 0.16);
    border-radius: 15px;
    background: #ffffff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.transaction-amount-control:focus-within {
    border-color: rgba(75, 99, 255, 0.74);
    box-shadow: 0 0 0 0.22rem rgba(75, 99, 255, 0.12);
}

.transaction-amount-control > span {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    align-self: stretch;
    padding: 0 0.9rem;
    border-right: 1px solid rgba(24, 50, 96, 0.10);
    background: #f6f7fd;
    color: #506487;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.transaction-amount-control input {
    min-height: 58px !important;
    width: 100%;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0.6rem 0.95rem !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.transaction-amount-control input::placeholder {
    color: #a6afbe;
}

.transaction-amount-guidance {
    display: flex;
    align-items: flex-start;
    gap: 0.72rem;
    min-height: 60px;
    padding: 0.7rem 0.85rem;
    border: 1px dashed rgba(24, 50, 96, 0.18);
    border-radius: 15px;
    background: #fbfcff;
    color: #69778f;
}

.transaction-amount-guidance-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    background: #eaf6ef;
    color: #287e59;
    font-size: 0.82rem;
    font-weight: 900;
}

.transaction-amount-guidance strong,
.transaction-amount-guidance span {
    display: block;
}

.transaction-amount-guidance strong {
    margin-bottom: 0.14rem;
    color: var(--sv-primary);
    font-size: 0.86rem;
    font-weight: 750;
}

.transaction-amount-guidance span {
    font-size: 0.8rem;
    line-height: 1.42;
}

.transaction-entry-card .transaction-derived-preview {
    grid-column: auto;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(75, 99, 255, 0.16);
    border-radius: 16px;
    background: #ffffff;
}

.transaction-entry-card .transaction-derived-preview > div {
    padding: 0.95rem 1rem;
    border-left: 1px solid rgba(24, 50, 96, 0.09);
}

.transaction-entry-card .transaction-derived-preview > div:first-child {
    border-left: 0;
}

.transaction-entry-card .transaction-derived-preview span {
    margin-bottom: 0.3rem;
}

.transaction-entry-card .transaction-derived-preview strong {
    font-size: 1rem;
}

.transaction-comment-field textarea {
    max-width: none;
}

.transaction-comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.38rem;
    color: #7a879a;
    font-size: 0.78rem;
    font-weight: 600;
}

.transaction-entry-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.1rem 1.55rem;
    border-top: 1px solid rgba(24, 50, 96, 0.10);
    background: #fbfcff;
}

.transaction-entry-footer > p {
    max-width: 36rem;
    margin: 0;
    color: #69778e;
    font-size: 0.82rem;
    line-height: 1.48;
}

.transaction-entry-footer > p > span {
    margin-right: 0.28rem;
    color: var(--sv-accent);
    font-weight: 900;
}

.transaction-entry-actions {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

.transaction-entry-actions .btn {
    min-height: 46px;
}

@media (max-width: 767.98px) {
    .transaction-entry-card {
        border-radius: 19px;
    }

    .transaction-entry-section,
    .transaction-entry-footer {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .transaction-entry-section-heading,
    .transaction-entry-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .transaction-entry-section-heading p {
        max-width: none;
        text-align: left;
    }

    .transaction-entry-primary-grid,
    .transaction-amount-layout {
        grid-template-columns: 1fr;
    }

    .transaction-item-field {
        grid-column: auto;
    }

    .transaction-entry-card .transaction-derived-preview {
        grid-template-columns: 1fr;
    }

    .transaction-entry-card .transaction-derived-preview > div {
        border-top: 1px solid rgba(24, 50, 96, 0.09);
        border-left: 0;
    }

    .transaction-entry-card .transaction-derived-preview > div:first-child {
        border-top: 0;
    }

    .transaction-entry-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .transaction-entry-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   Structured Transactions — drawer and list refinement
   Decision-forward entry; compact, aligned ledger controls.
   ========================================================= */
.transactions-workspace {
    position: relative;
}

.transactions-workspace-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.transactions-workspace-header h1 {
    margin: 0.2rem 0 0;
    color: var(--sv-primary);
}

.transactions-workspace-header p {
    max-width: 36rem;
    margin: 0.62rem 0 0;
    color: #65738b;
    font-size: 1rem;
    line-height: 1.55;
}

.transaction-add-action {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-height: 46px;
    white-space: nowrap;
}

.transaction-add-action > span {
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1;
}

.transaction-filter-panel {
    margin: 1rem 0 1.15rem;
    padding: 0.9rem;
    border: 1px solid rgba(24, 50, 96, 0.10);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(19, 37, 75, 0.045);
}

.transaction-filter-primary-row {
    display: grid;
    grid-template-columns: minmax(8.5rem, 0.72fr) minmax(12rem, 1.1fr) minmax(17rem, 1.25fr) minmax(8.6rem, 0.72fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.transaction-filter-control,
.transaction-filter-submit {
    display: grid;
    min-width: 0;
    gap: 0.34rem;
}

.transaction-filter-control label {
    color: #65738b;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.035em;
}

.transaction-filter-control select,
.transaction-filter-control input,
.transaction-filter-submit .btn {
    min-height: 42px;
    border-radius: 11px;
}

.transaction-filter-date-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem;
}

.transaction-filter-date-range input {
    min-width: 0;
    padding-inline: 0.55rem;
}

.transaction-filter-date-range > span {
    color: #98a2b4;
    font-weight: 700;
}

.transaction-filter-submit .btn {
    min-width: 6.75rem;
    padding-inline: 1rem;
}

.transaction-more-filters {
    margin-top: 0.72rem;
    padding-top: 0.72rem;
    border-top: 1px solid rgba(24, 50, 96, 0.08);
}

.transaction-more-filters > summary {
    width: fit-content;
    cursor: pointer;
    color: #42577f;
    font-size: 0.84rem;
    font-weight: 750;
    list-style: none;
}

.transaction-more-filters > summary::-webkit-details-marker { display: none; }
.transaction-more-filters > summary::before { content: "+"; margin-right: 0.34rem; color: var(--sv-accent); font-size: 1rem; font-weight: 800; }
.transaction-more-filters[open] > summary::before { content: "−"; }

.transaction-filter-secondary-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.transaction-filter-reset {
    display: inline-flex;
    margin-top: 0.7rem;
    color: #586a89;
    font-size: 0.82rem;
    font-weight: 700;
}

.transaction-list-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0 0.7rem;
}

.transaction-list-heading strong {
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    font-weight: 800;
}

.transaction-list-heading span,
.transaction-list-heading p {
    margin-left: 0.35rem;
    color: #748198;
    font-size: 0.88rem;
    font-weight: 600;
}

.transaction-list-heading p {
    margin: 0;
    text-align: right;
}

.transactions-workspace .transaction-pagination {
    margin-top: 0.75rem;
}

.transaction-table {
    min-width: 780px;
}

.transaction-table th {
    padding-top: 0.82rem;
    padding-bottom: 0.82rem;
}

.transaction-table td {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.transaction-drawer-layer {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: flex;
    justify-content: flex-end;
}

.transaction-drawer-backdrop {
    position: absolute;
    inset: 0;
    display: block;
    background: rgba(16, 27, 48, 0.48);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.transaction-drawer {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(calc(100% - 2rem), 680px);
    height: calc(100dvh - 1.5rem);
    margin: 0.75rem 1rem 0.75rem 0;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.35rem;
    background: #ffffff;
    box-shadow: -1.2rem 0 3.75rem rgba(12, 24, 45, 0.22);
    animation: transaction-drawer-enter 180ms ease-out both;
}

@keyframes transaction-drawer-enter {
    from { transform: translateX(2rem); opacity: 0.72; }
    to { transform: translateX(0); opacity: 1; }
}

.transaction-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.45rem 1.9rem 1.15rem;
    border-bottom: 1px solid rgba(24, 50, 96, 0.09);
}

.transaction-drawer-eyebrow {
    display: block;
    margin-bottom: 0.22rem;
    color: var(--sv-accent);
    font-size: 0.69rem;
    font-weight: 850;
    letter-spacing: 0.115em;
    text-transform: uppercase;
}

.transaction-drawer-header h2 {
    margin: 0;
    color: var(--sv-primary);
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
}

.transaction-drawer-close {
    display: inline-grid;
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(24, 50, 96, 0.10);
    border-radius: 50%;
    color: #556982;
    font-size: 1.4rem;
    line-height: 1;
    text-decoration: none;
}

.transaction-drawer-close:hover,
.transaction-drawer-close:focus-visible {
    border-color: rgba(75, 99, 255, 0.4);
    background: #f5f7ff;
    color: var(--sv-accent);
}

.transaction-drawer-form {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.transaction-drawer-body {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.25rem 1.9rem 1.45rem;
}

.transaction-drawer-body .catalog-form-validation {
    margin-bottom: 0.95rem;
}

.transaction-drawer-body .catalog-form-field {
    display: grid;
    gap: 0.38rem;
}

.transaction-drawer-body .catalog-form-field > label {
    color: #42577d;
    font-size: 0.82rem;
    font-weight: 800;
}

.transaction-drawer-body .catalog-form-field input,
.transaction-drawer-body .catalog-form-field select,
.transaction-drawer-body .catalog-form-field textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    border-color: rgba(24, 50, 96, 0.16);
    border-radius: 12px;
    color: var(--sv-primary);
}

.transaction-drawer-body .catalog-form-field input:focus,
.transaction-drawer-body .catalog-form-field select:focus,
.transaction-drawer-body .catalog-form-field textarea:focus {
    border-color: rgba(75, 99, 255, 0.72);
    box-shadow: 0 0 0 0.22rem rgba(75, 99, 255, 0.12);
}

.transaction-drawer-body .catalog-form-field textarea {
    min-height: 104px;
    resize: vertical;
}

.transaction-drawer-amount-field {
    margin-bottom: 1.05rem;
}

.transaction-drawer-amount-control {
    min-height: 66px;
    border-radius: 15px;
}

.transaction-drawer-amount-control input {
    min-height: 64px !important;
    font-size: 1.65rem;
}

.transaction-drawer-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.transaction-drawer-item-field {
    position: relative;
    z-index: 4;
    min-width: 0;
    margin-bottom: 0.7rem;
}

.transaction-item-picker-control {
    position: relative;
    margin-bottom: 0.6rem;
}

.transaction-item-picker.is-enhanced .transaction-item-native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.transaction-item-search-control {
    position: relative;
}

.transaction-drawer-body .transaction-item-search-control input {
    width: 100%;
    padding-right: 3rem;
    padding-left: 2.45rem;
    text-overflow: ellipsis;
}

.transaction-item-search-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 0.82rem;
    transform: translateY(-50%);
    color: #62759a;
    font-size: 1.28rem;
    line-height: 1;
    pointer-events: none;
}

.transaction-item-search-clear {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: 0.48rem;
    display: grid;
    width: 2rem;
    height: 2rem;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6a7b98;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.transaction-item-search-clear:hover,
.transaction-item-search-clear:focus-visible {
    background: #edf1ff;
    color: var(--sv-accent);
    outline: none;
}

.transaction-item-search-control input::-webkit-search-cancel-button,
.transaction-item-search-control input::-webkit-search-decoration {
    display: none;
    -webkit-appearance: none;
}

.transaction-item-search-control input::-ms-clear,
.transaction-item-search-control input::-ms-reveal {
    display: none;
}

.transaction-item-search-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.42rem);
    right: 0;
    left: 0;
    max-height: min(22rem, 42dvh);
    overflow-y: auto;
    border: 1px solid rgba(75, 99, 255, 0.26);
    border-radius: 0.9rem;
    background: #ffffff;
    box-shadow: 0 1rem 2.25rem rgba(22, 39, 75, 0.18);
}

.transaction-item-search-summary {
    display: flex;
    align-items: center;
    min-height: 2.15rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid rgba(24, 50, 96, 0.08);
    background: #f8f9ff;
    color: #64738d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.transaction-item-search-result-list {
    display: grid;
}

.transaction-item-search-result {
    display: grid;
    width: 100%;
    gap: 0.22rem;
    padding: 0.72rem 0.85rem;
    border: 0;
    border-bottom: 1px solid rgba(24, 50, 96, 0.07);
    background: #ffffff;
    color: var(--sv-primary);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.transaction-item-search-result:last-child {
    border-bottom: 0;
}

.transaction-item-search-result:hover,
.transaction-item-search-result:focus-visible,
.transaction-item-search-result.is-active {
    background: #eef2ff;
    color: var(--sv-primary);
    outline: none;
}

.transaction-item-search-result-primary {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.transaction-item-search-result-title {
    overflow: hidden;
    color: var(--sv-primary);
    font-size: 0.91rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-item-search-result-defaults {
    flex: 0 0 auto;
    padding: 0.14rem 0.38rem;
    border-radius: 999px;
    background: #eaf8f3;
    color: #13715e;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.transaction-item-search-result-meta {
    overflow: hidden;
    color: #72819a;
    font-size: 0.78rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-item-search-highlight {
    padding: 0;
    background: #fff0ad;
    color: inherit;
    font: inherit;
}

.transaction-item-search-message {
    margin: 0;
    padding: 0.85rem;
    color: #718098;
    font-size: 0.84rem;
    font-weight: 600;
}

.transaction-drawer-field-note {
    color: #7b8798;
    font-size: 0.76rem;
    font-weight: 600;
}

.transaction-drawer-default-status {
    margin-top: 0.15rem;
    margin-bottom: 0.9rem;
    padding: 0.72rem 0.8rem;
}

.transaction-drawer-derived {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    margin: 0.9rem 0;
    border: 1px solid rgba(75, 99, 255, 0.16);
    border-radius: 14px;
    background: #fafbff;
}

.transaction-drawer-derived > div {
    min-width: 0;
    padding: 0.78rem;
    border-left: 1px solid rgba(24, 50, 96, 0.08);
}

.transaction-drawer-derived > div:first-child { border-left: 0; }

.transaction-drawer-derived span {
    display: block;
    margin-bottom: 0.2rem;
    color: #7b879b;
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.transaction-drawer-derived strong {
    display: block;
    overflow: hidden;
    color: #29416f;
    font-size: 0.86rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-drawer-comment-field {
    position: relative;
    margin-top: 0.7rem;
}

.transaction-drawer-comment-field label span {
    margin-left: 0.25rem;
    color: #8894a6;
    font-size: 0.72rem;
    font-weight: 650;
}

.transaction-comment-count {
    justify-self: end;
    color: #7f8ba0;
    font-size: 0.73rem;
    font-weight: 650;
}

.transaction-drawer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.95rem 1.9rem calc(1.05rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(24, 50, 96, 0.09);
    background: #ffffff;
}

.transaction-drawer-add-another {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    color: #42577d;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 750;
}

.transaction-drawer-add-another input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--sv-accent);
}

.transaction-drawer-add-another input:disabled {
    cursor: not-allowed;
}

.transaction-drawer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.transaction-drawer-footer .btn { min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
    .transaction-drawer { animation: none; }
}

@media (max-width: 991.98px) {
    .transaction-filter-primary-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .transaction-filter-submit { align-self: end; }
}

@media (max-width: 767.98px) {
    .transactions-workspace-header,
    .transaction-list-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .transaction-list-heading p { text-align: left; }

    .transaction-filter-primary-row,
    .transaction-filter-secondary-row,
    .transaction-drawer-grid,
    .transaction-drawer-derived {
        grid-template-columns: 1fr;
    }

    .transaction-filter-date-range {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .transaction-filter-submit .btn { width: 100%; }

    .transaction-table { min-width: 0; }

    .transaction-drawer {
        width: 100%;
        height: min(94dvh, 900px);
        margin: 0;
        margin-top: auto;
        border-radius: 1.25rem 1.25rem 0 0;
        animation-name: transaction-drawer-enter-mobile;
    }

    @keyframes transaction-drawer-enter-mobile {
        from { transform: translateY(2rem); opacity: 0.72; }
        to { transform: translateY(0); opacity: 1; }
    }

    .transaction-drawer-header { padding: 1.05rem 1.15rem 0.9rem; }
    .transaction-drawer-body { padding: 0.95rem 1.15rem 1.1rem; }
    .transaction-item-search-results { max-height: min(19rem, 40dvh); }
    .transaction-drawer-footer {
        align-items: stretch;
        flex-direction: column;
        padding: 0.8rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    }
    .transaction-drawer-actions { width: 100%; }
    .transaction-drawer-footer .btn { flex: 1; }
    .transaction-drawer-derived > div { border-top: 1px solid rgba(24, 50, 96, 0.08); border-left: 0; }
    .transaction-drawer-derived > div:first-child { border-top: 0; }
}

@media (max-width: 767.98px) {
    .transaction-drawer-layer { align-items: flex-end; }
}

/* -------------------------------------------------------------------------
   Dashboard Phase 1
   ------------------------------------------------------------------------- */
.dashboard-page {
    display: grid;
    gap: 1.5rem;
    padding: 0.7rem 0 2.3rem;
}

.dashboard-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 0 0.35rem;
}

.dashboard-eyebrow {
    display: block;
    margin-bottom: 0.3rem;
    color: #4f68ff;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.dashboard-page-header h1 {
    margin: 0;
    color: #122956;
    font-family: Montserrat, Inter, sans-serif;
    font-size: clamp(2rem, 3.3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
}

.dashboard-page-header p {
    max-width: 42rem;
    margin: 0.55rem 0 0;
    color: #68799d;
    font-size: 1rem;
}

.dashboard-manage-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    color: #1c3d83;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-manage-link:hover,
.dashboard-manage-link:focus-visible {
    color: #4f68ff;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.dashboard-alert {
    display: grid;
    gap: 0.25rem;
    border: 1px solid;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
}

.dashboard-alert-error {
    border-color: #f0c5ce;
    background: #fff7f8;
    color: #9e2944;
}

.dashboard-view-switch {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #d7dff2;
    border-radius: 0.8rem;
    background: #f8faff;
}

.dashboard-view-switch a {
    min-width: 8.6rem;
    padding: 0.7rem 1rem;
    color: #607196;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.dashboard-view-switch a.is-active {
    background: #162d5d;
    color: #fff;
    box-shadow: 0 5px 14px rgba(13, 35, 81, 0.18);
}

.dashboard-view-switch a:focus-visible,
.dashboard-filter-bar select:focus-visible,
.dashboard-filter-apply:focus-visible,
.dashboard-attention-list a:focus-visible,
.dashboard-account-card-main:focus-visible,
.dashboard-account-card-link:focus-visible {
    outline: 3px solid rgba(79, 104, 255, 0.35);
    outline-offset: 2px;
}

.dashboard-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.85rem;
    border: 1px solid #e0e6f2;
    border-radius: 1.05rem;
    background: #fff;
    box-shadow: 0 10px 27px rgba(19, 44, 91, 0.06);
    padding: 0.95rem 1rem;
}

.dashboard-filter-field {
    display: grid;
    gap: 0.3rem;
    min-width: 11rem;
}

.dashboard-filter-field label {
    color: #52668f;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.dashboard-filter-field select {
    min-height: 2.7rem;
    border: 1px solid #c7d1e5;
    border-radius: 0.65rem;
    background: #fff;
    color: #162d5d;
    padding: 0.45rem 2rem 0.45rem 0.7rem;
    font: inherit;
    font-size: 0.92rem;
}

.dashboard-filter-apply {
    min-height: 2.7rem;
    border: 0;
    border-radius: 0.65rem;
    background: #162d5d;
    color: #fff;
    padding: 0.45rem 1.2rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
}

.dashboard-filter-apply:hover,
.dashboard-filter-apply:focus-visible {
    background: #244889;
}

.dashboard-attention-section {
    display: grid;
    gap: 0.75rem;
}

.dashboard-attention-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.9rem;
}

.dashboard-attention-section-header > div {
    display: grid;
    gap: 0.12rem;
}

.dashboard-attention-section-header > div > span {
    color: #4f68ff;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-attention-section-header h2 {
    margin: 0;
    color: #162d5d;
    font-family: Montserrat, Inter, sans-serif;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.dashboard-attention-section-header small {
    color: #7482a2;
    font-size: 0.76rem;
    font-weight: 700;
}

.dashboard-attention-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21.5rem), 1fr));
    align-items: stretch;
    gap: 0.9rem;
}

.dashboard-attention-panel {
    min-width: 0;
    min-height: 10.4rem;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid #e1e6f0;
    border-radius: 1.05rem;
    background: #fff;
    padding: 1rem;
}

.dashboard-attention-panel > header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.dashboard-attention-panel h3,
.dashboard-attention-panel p {
    margin: 0;
}

.dashboard-attention-panel h3 {
    color: #1c315e;
    font-size: 0.95rem;
    font-weight: 800;
}

.dashboard-attention-panel p {
    margin-top: 0.18rem;
    color: #72809f;
    font-size: 0.78rem;
}

.dashboard-attention-icon {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    place-items: center;
    border-radius: 0.7rem;
    font-size: 0.95rem;
    font-weight: 900;
}

.dashboard-attention-panel-critical {
    border-color: #df92a0;
    background: linear-gradient(115deg, #fff3f5 0%, #fff 72%);
}

.dashboard-attention-panel-critical .dashboard-attention-icon {
    background: #efc0c8;
    color: #8f1830;
}

.dashboard-attention-panel-urgent {
    border-color: #f0b9c0;
    background: linear-gradient(115deg, #fff8f8 0%, #fff 72%);
}

.dashboard-attention-panel-urgent .dashboard-attention-icon {
    background: #f9d7db;
    color: #be1832;
}

.dashboard-attention-panel-warning {
    border-color: #f0d99e;
    background: linear-gradient(115deg, #fffaf0 0%, #fff 72%);
}

.dashboard-attention-panel-warning .dashboard-attention-icon {
    background: #f8e4af;
    color: #a16400;
}

.dashboard-attention-list {
    align-self: end;
    display: grid;
    gap: 0.45rem;
    margin: 0.9rem 0 0;
    padding: 0.8rem 0 0;
    border-top: 1px solid rgba(91, 106, 140, 0.15);
    list-style: none;
}

.dashboard-attention-list li {
    min-width: 0;
}

.dashboard-attention-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    min-width: 0;
    border-radius: 0.7rem;
    color: inherit;
    padding: 0.48rem 0.52rem;
    text-decoration: none;
}

.dashboard-attention-list a:hover {
    background: rgba(89, 111, 177, 0.07);
}

.dashboard-attention-card-name {
    display: grid;
    min-width: 0;
    gap: 0.12rem;
}

.dashboard-attention-card-name strong {
    overflow: hidden;
    color: #1c315e;
    font-size: 0.84rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-attention-card-name span {
    color: #72809f;
    font-size: 0.72rem;
    font-weight: 700;
}

.dashboard-attention-card-name .dashboard-attention-card-balance {
    margin-top: 0.08rem;
    color: #1c315e;
    font-size: 0.76rem;
    font-weight: 800;
}

.dashboard-attention-due {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.3rem 0.48rem;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-attention-due-critical {
    background: #f8dce1;
    color: #931b32;
}

.dashboard-attention-due-urgent {
    background: #fdebed;
    color: #ad263c;
}

.dashboard-attention-due-warning {
    background: #fff3d8;
    color: #875600;
}

.dashboard-summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 0.9rem;
}

.dashboard-summary-card {
    min-width: 0;
    border: 1px solid #dcd8f5;
    border-radius: 1.05rem;
    background: linear-gradient(135deg, #fbfaff 0%, #f4f1ff 100%);
    padding: 1rem 1.05rem;
}

.dashboard-summary-card header,
.dashboard-summary-card dl,
.dashboard-account-card header,
.dashboard-account-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dashboard-summary-card header > span {
    color: #5e4eb9;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.11em;
}

.dashboard-summary-card header small {
    color: #7f7b9d;
    font-size: 0.73rem;
    font-weight: 700;
}

.dashboard-summary-primary {
    display: grid;
    gap: 0.2rem;
    margin-top: 1.05rem;
}

.dashboard-summary-primary span {
    color: #68759a;
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-summary-primary strong {
    color: #172d62;
    font-size: clamp(1.38rem, 2.1vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.dashboard-summary-card dl {
    margin: 1rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(101, 86, 183, 0.17);
}

.dashboard-summary-card dl div {
    display: grid;
    gap: 0.18rem;
}

.dashboard-summary-card dt {
    color: #7b86a1;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-summary-card dd {
    margin: 0;
    color: #263c72;
    font-size: 0.83rem;
    font-weight: 800;
}

.dashboard-summary-card-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin: 0.72rem 0 0;
    color: #74809e;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.45;
}

.dashboard-summary-payment-date-needed dt {
    color: #a16400;
}

.dashboard-summary-card-action {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.35rem;
    border-radius: 0.55rem;
    color: #244889;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-summary-card-action:hover,
.dashboard-summary-card-action:focus-visible {
    color: #163a7b;
    text-decoration: underline;
    text-underline-offset: 0.16rem;
}

.dashboard-account-group {
    display: grid;
    gap: 0.85rem;
}

.dashboard-account-group-header {
    align-items: flex-end;
}

.dashboard-account-group-header > div {
    display: grid;
    gap: 0.14rem;
}

.dashboard-account-group-header span {
    color: #4f68ff;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.dashboard-account-group-header h2 {
    margin: 0;
    color: #162d5d;
    font-family: Montserrat, Inter, sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.dashboard-account-group-header small {
    color: #7482a2;
    font-size: 0.76rem;
}

.dashboard-account-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-account-card {
    --dashboard-accent: #486df5;
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 22.3rem;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dfe5f2;
    border-radius: 1.15rem;
    background: #fff;
    box-shadow: 0 11px 29px rgba(19, 42, 84, 0.08);
}

.dashboard-account-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 0.34rem;
    background: var(--dashboard-accent);
    content: "";
}

.dashboard-account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 17px 34px rgba(19, 42, 84, 0.13);
}

.dashboard-account-card-ocean { --dashboard-accent: #2f6df6; }
.dashboard-account-card-indigo { --dashboard-accent: #4b63ff; }
.dashboard-account-card-violet { --dashboard-accent: #7447d7; }
.dashboard-account-card-teal { --dashboard-accent: #0c9b91; }
.dashboard-account-card-coral { --dashboard-accent: #df6749; }
.dashboard-account-card-gold { --dashboard-accent: #a36f06; }
.dashboard-account-card-slate { --dashboard-accent: #5c687a; }

/* Calm cards use green for a positive, no-attention state. Payment urgency
   remains semantically distinct: urgent is red, warning is amber, and a
   missing card schedule stays neutral slate. */
.dashboard-account-card:not(.is-critical):not(.is-urgent):not(.is-warning):not(.is-schedule-missing)::before {
    background: #2f9d6a;
}

.dashboard-account-card.is-critical {
    border-color: #da8393;
    box-shadow: 0 16px 35px rgba(142, 30, 54, 0.21);
}

.dashboard-account-card.is-critical::before { background: #a91e39; }
.dashboard-account-card.is-urgent {
    border-color: #f1a6ad;
    box-shadow: 0 15px 33px rgba(187, 48, 62, 0.17);
}

.dashboard-account-card.is-urgent::before { background: #dc4254; }
.dashboard-account-card.is-warning { border-color: #efd79b; }
.dashboard-account-card.is-warning::before { background: #d79715; }
.dashboard-account-card.is-schedule-missing::before { background: #8390aa; }

.dashboard-account-card.is-usage-blocked {
    border-color: #ef8d98;
    box-shadow: 0 16px 35px rgba(181, 28, 48, 0.16);
}

.dashboard-account-card.is-usage-blocked::before {
    background: #d92d20;
}

.dashboard-account-card-main {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    gap: 1rem;
    color: inherit;
    padding: 1.35rem 1.2rem 0.8rem;
    text-decoration: none;
}

.dashboard-account-card-main header {
    align-items: flex-start;
}

.dashboard-account-card-main h3 {
    overflow-wrap: anywhere;
    margin: 0.2rem 0 0;
    color: #142952;
    font-size: 1.04rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dashboard-account-card-main header > div:first-child {
    min-width: 0;
}

.dashboard-account-card-badges {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.36rem;
    max-width: 8.8rem;
}

.dashboard-card-usage-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.6rem;
    border-radius: 999px;
    padding: 0.32rem 0.62rem;
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-card-usage-pill-danger {
    border: 1px solid #f4a5ad;
    background: #fde7eb;
    color: #a5122c;
}

.dashboard-card-usage-pill-success {
    border: 1px solid #9ad7bb;
    background: #e8f7ef;
    color: #1a7748;
}

.dashboard-account-type,
.dashboard-account-currency {
    color: #7080a3;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-account-currency {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #edf2fc;
    color: #344f92;
    padding: 0.32rem 0.48rem;
}

.dashboard-account-balance {
    display: grid;
    gap: 0.24rem;
    border: 1px solid #dedaf6;
    border-radius: 0.9rem;
    background: linear-gradient(125deg, #f9f8ff 0%, #f1efff 100%);
    padding: 0.85rem 0.9rem;
}

.dashboard-account-balance span,
.dashboard-account-balance small {
    color: #737e9a;
    font-size: 0.75rem;
    font-weight: 700;
}

.dashboard-account-balance strong {
    color: #182f64;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.dashboard-card-schedule {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.dashboard-card-schedule div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.dashboard-card-schedule dt {
    color: #74809e;
    font-size: 0.72rem;
    font-weight: 700;
}

.dashboard-card-schedule dd {
    margin: 0;
    color: #203969;
    font-size: 0.77rem;
    font-weight: 800;
    text-align: right;
}

/* A calm date callout rather than another status pill. It gives the next
   statement enough visual priority to scan quickly without competing with
   Do Not Use, urgency, or currency badges. */
.dashboard-card-schedule .dashboard-card-next-statement {
    position: relative;
    align-items: center;
    border: 1px solid #ddd7f8;
    border-left: 3px solid #7557d5;
    border-radius: 0.72rem;
    background: linear-gradient(120deg, #faf9ff 0%, #f4f1ff 100%);
    padding: 0.58rem 0.66rem;
    box-shadow: 0 2px 8px rgba(71, 55, 133, 0.06);
}

.dashboard-card-next-statement dt {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #65549b;
}

.dashboard-card-next-statement dd {
    color: #4e398f;
    font-size: 0.8rem;
    letter-spacing: -0.01em;
}

.dashboard-card-next-statement-icon {
    position: relative;
    display: inline-block;
    width: 1.08rem;
    height: 1.08rem;
    flex: 0 0 1.08rem;
    border: 1.5px solid #7557d5;
    border-radius: 0.28rem;
    background: #ffffff;
}

.dashboard-card-next-statement-icon::before {
    content: "";
    position: absolute;
    top: 0.25rem;
    right: 0.12rem;
    left: 0.12rem;
    border-top: 1.5px solid #7557d5;
}

.dashboard-card-next-statement-icon::after {
    content: "";
    position: absolute;
    top: -0.13rem;
    left: 0.23rem;
    width: 0.42rem;
    height: 0.28rem;
    border-right: 1.5px solid #7557d5;
    border-left: 1.5px solid #7557d5;
}

.dashboard-payment-status {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: auto 0 0;
    border-radius: 0.68rem;
    padding: 0.62rem 0.7rem;
    font-size: 0.78rem;
}

.dashboard-payment-status span {
    display: grid;
    width: 1.22rem;
    height: 1.22rem;
    flex: 0 0 1.22rem;
    place-items: center;
    border-radius: 0.38rem;
    font-size: 0.72rem;
    font-weight: 900;
}

.dashboard-payment-status-critical {
    background: #fde7eb;
    color: #941c33;
}

.dashboard-payment-status-critical span {
    background: #efbbc5;
    color: #8d1730;
}

.dashboard-payment-status-urgent {
    background: #fff0f1;
    color: #ad263c;
}

.dashboard-payment-status-urgent span {
    background: #f7c7cd;
    color: #be1832;
}

.dashboard-payment-status-warning {
    background: #fff8e9;
    color: #8a5a00;
}

.dashboard-payment-status-warning span {
    background: #f5ddb0;
    color: #a56a00;
}

.dashboard-payment-status-missing {
    background: #f2f5fa;
    color: #66738a;
}

.dashboard-payment-status-missing span {
    background: #dde3ed;
    color: #68758a;
}

.dashboard-account-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    border-top: 1px solid #e6ebf4;
    color: #2a52bb;
    padding: 0.84rem 1.2rem 0.92rem;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-account-card-link:hover,
.dashboard-account-card-link:focus-visible {
    background: #f7f9ff;
    color: #173b9d;
}

.dashboard-empty-state {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    border: 1px dashed #cbd5e7;
    border-radius: 1.1rem;
    background: #fbfcff;
    padding: 3.2rem 1.4rem;
    text-align: center;
}

.dashboard-empty-state > span {
    color: #7188d8;
    font-size: 2.1rem;
}

.dashboard-empty-state h2 {
    margin: 0.1rem 0 0;
    color: #243b6a;
    font-size: 1.08rem;
    font-weight: 800;
}

.dashboard-empty-state p {
    max-width: 28rem;
    margin: 0;
    color: #73809c;
    font-size: 0.88rem;
}

.dashboard-empty-state a {
    color: #2d54bf;
    font-size: 0.86rem;
    font-weight: 800;
}

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

@media (max-width: 720px) {
    .dashboard-page {
        gap: 1.15rem;
        padding-top: 0.1rem;
    }

    .dashboard-page-header,
    .dashboard-account-group-header,
    .dashboard-attention-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-page-header h1 {
        font-size: 2.05rem;
    }

    .dashboard-manage-link {
        align-self: flex-start;
    }

    .dashboard-view-switch {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-view-switch a {
        min-width: 0;
    }

    .dashboard-filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-filter-field {
        min-width: 0;
    }

    .dashboard-filter-apply {
        width: 100%;
    }

    .dashboard-summary-section,
    .dashboard-attention-grid,
    .dashboard-account-grid {
        grid-template-columns: 1fr;
    }

        .dashboard-attention-list a {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.38rem;
    }

    .dashboard-summary-card-note {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-account-card {
        min-height: 0;
    }
}


/* Ledger-first Account maintenance: fixed identity and opening values are displayed
   as semantic read-only form values rather than disabled controls, so their
   trusted values continue to post through hidden fields on Edit. */
.catalog-readonly-value {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--fp-border, #d8deee);
    border-radius: 0.65rem;
    background: var(--fp-surface-muted, #f6f8fd);
    color: var(--fp-ink, #14274d);
    font-weight: 700;
}

/* -------------------------------------------------------------------------
   Transfers workspace
   ------------------------------------------------------------------------- */
.transfers-workspace-header {
    align-items: flex-end;
}

.transfer-filter-primary-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.transfer-table th:nth-child(2) { min-width: 10.5rem; }
.transfer-table th:nth-child(3),
.transfer-table th:nth-child(4) { min-width: 11.5rem; }

.transfer-destination-owed-label {
    display: block;
    margin-top: 0.18rem;
    color: #1a7748;
    font-size: 0.69rem;
    font-weight: 850;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.transfer-drawer {
    width: min(42rem, calc(100vw - 1.25rem));
}

.transfer-drawer-header {
    background:
        radial-gradient(circle at 90% 2%, rgba(105, 19, 204, 0.13), transparent 35%),
        linear-gradient(180deg, #fbfaff 0%, #ffffff 100%);
}

.transfer-drawer-subtitle {
    max-width: 31rem;
    margin: 0.32rem 0 0;
    color: #66789d;
    font-size: 0.83rem;
    line-height: 1.5;
}

.transfer-amount-field {
    margin-bottom: 0.25rem;
}

.transfer-account-route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3.1rem minmax(0, 1fr);
    align-items: start;
    gap: 0.72rem;
    margin-top: 0.85rem;
}

.transfer-account-field {
    position: relative;
    min-width: 0;
}

.transfer-account-route:has(.transfer-route-swap:not([hidden])) {
    margin-bottom: 2.18rem;
}

.transfer-route-direction {
    position: relative;
    display: flex;
    min-height: 2.85rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.71rem;
    color: #4c63ef;
}

.transfer-route-arrow {
    position: relative;
    display: block;
    width: 2.28rem;
    height: 0.2rem;
    border-radius: 999px;
    background: #4c63ef;
    box-shadow: 0 1px 0 rgba(31, 54, 132, 0.12);
}

.transfer-route-arrow::after {
    position: absolute;
    top: 50%;
    right: 0;
    width: 0.72rem;
    height: 0.72rem;
    border-top: 0.2rem solid #4c63ef;
    border-right: 0.2rem solid #4c63ef;
    content: "";
    transform: translateY(-50%) rotate(45deg);
}

.transfer-route-swap {
    position: absolute;
    top: calc(100% + 0.32rem);
    width: 1.9rem;
    height: 1.9rem;
    border: 1px solid rgba(75, 99, 255, 0.2);
    border-radius: 999px;
    background: #f8f9ff;
    color: #3654c9;
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 850;
    line-height: 1;
}

.transfer-route-swap:hover,
.transfer-route-swap:focus-visible {
    border-color: rgba(75, 99, 255, 0.45);
    background: #eff2ff;
    outline: none;
}

.transfer-route-swap:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.transfer-account-field.is-enhanced > select {
    display: none;
}

.transfer-account-search-control {
    position: relative;
    display: flex;
    align-items: center;
}

.transfer-drawer-body .transfer-account-search-control input {
    width: 100%;
    min-height: 2.85rem;
    padding-right: 2.35rem;
    padding-left: 2.25rem;
}

.transfer-drawer-body .transfer-account-search-control input:disabled {
    overflow: visible;
    padding-right: 0.72rem;
    color: #7080a0;
    font-size: 0.79rem;
    letter-spacing: -0.012em;
    opacity: 1;
}

.transfer-drawer-body .transfer-account-search-control input:disabled::placeholder {
    color: #7080a0;
    opacity: 1;
}

.transfer-account-search-icon {
    position: absolute;
    z-index: 1;
    left: 0.78rem;
    color: #6479a5;
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
}

.transfer-account-search-clear {
    position: absolute;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    border: 0;
    border-radius: 999px;
    background: #e9edf9;
    color: #5a6d96;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.transfer-account-search-clear:hover,
.transfer-account-search-clear:focus-visible {
    background: #dce4fb;
    color: #183260;
    outline: none;
}

.transfer-account-search-results {
    position: absolute;
    z-index: 8;
    width: min(22rem, calc(100vw - 3.2rem));
    max-height: min(19rem, 42dvh);
    overflow-y: auto;
    margin-top: 0.38rem;
    border: 1px solid #d8e0f1;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 17px 35px rgba(23, 47, 91, 0.16);
    padding: 0.36rem;
}

.transfer-account-result-list {
    display: grid;
    gap: 0.18rem;
}

.transfer-account-search-result {
    display: grid;
    gap: 0.18rem;
    width: 100%;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    color: #19315e;
    cursor: pointer;
    padding: 0.62rem 0.68rem;
    text-align: left;
}

.transfer-account-search-result:hover,
.transfer-account-search-result:focus-visible {
    background: #f0f3ff;
    outline: none;
}

.transfer-account-search-result strong {
    overflow: hidden;
    color: #19315e;
    font-size: 0.84rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transfer-account-search-result span,
.transfer-account-search-message {
    color: #7181a0;
    font-size: 0.73rem;
    line-height: 1.35;
}

.transfer-account-search-message {
    margin: 0;
    padding: 0.75rem;
    text-align: center;
}

.transfer-date-note-grid {
    display: grid;
    grid-template-columns: minmax(10rem, 0.9fr) minmax(0, 1.1fr);
    align-items: end;
    gap: 0.9rem;
    margin-top: 0.9rem;
}

.transfer-date-note-hint {
    display: grid;
    gap: 0.2rem;
    min-height: 2.8rem;
    border-left: 3px solid rgba(105, 19, 204, 0.38);
    color: #7583a0;
    padding: 0.14rem 0 0.14rem 0.75rem;
}

.transfer-date-note-hint strong {
    color: #2e426d;
    font-size: 0.78rem;
    font-weight: 850;
}

.transfer-date-note-hint span {
    font-size: 0.74rem;
    line-height: 1.38;
}

.transfer-impact-preview {
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid rgba(105, 19, 204, 0.18);
    border-radius: 0.95rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(105, 19, 204, 0.08), transparent 38%),
        #fbfaff;
}

.transfer-impact-preview > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(31, 52, 94, 0.08);
    padding: 0.68rem 0.85rem;
}

.transfer-impact-preview > header span {
    color: #617097;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.transfer-impact-preview > header strong {
    color: #6913cc;
    font-size: 0.78rem;
    font-weight: 850;
}

.transfer-impact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
}

.transfer-impact-account {
    display: grid;
    gap: 0.21rem;
    min-width: 0;
    padding: 0.86rem;
}

.transfer-impact-account > span {
    color: #7886a1;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.transfer-impact-account strong {
    overflow: hidden;
    color: #233a68;
    font-size: 0.86rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transfer-impact-account small {
    color: #71819d;
    font-size: 0.72rem;
}

.transfer-impact-account b {
    color: #183260;
    font-size: 0.75rem;
    font-weight: 850;
}

.transfer-impact-arrow {
    align-self: center;
    color: #8952d5;
    font-size: 1.25rem;
    font-weight: 850;
}

.transfer-impact-warning {
    border-top: 1px solid rgba(217, 45, 32, 0.18);
    background: #fff8f7;
    color: #a3261b;
    font-size: 0.76rem;
    font-weight: 750;
    line-height: 1.45;
    padding: 0.7rem 0.86rem;
}

.transfer-drawer-note-field {
    margin-top: 1rem;
}

.transfer-drawer-ledger-note {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    margin: 0;
    color: #61729a;
    font-size: 0.75rem;
    font-weight: 750;
}

.transfer-drawer-ledger-note > span {
    color: #6913cc;
    font-size: 0.86rem;
}

.transfer-detail-hero h1 > span {
    color: #6913cc;
}

.transfer-detail-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.transfer-detail-explainer {
    max-width: 54rem;
    color: #637492;
    line-height: 1.65;
}


/* Transfer filter refinement: route choices read as one intentional movement,
   while date, sort, and the single primary action remain visually secondary. */
.transfer-filter-panel {
    display: grid;
    gap: 0;
    overflow: hidden;
    border-color: #dce3f4;
    background:
        radial-gradient(circle at 100% 0%, rgba(105, 19, 204, 0.08), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #fbfcff 100%);
    box-shadow: 0 13px 30px rgba(24, 48, 99, 0.075);
    padding: 0;
}

.transfer-filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(44, 70, 129, 0.1);
    padding: 0.88rem 1rem 0.78rem;
}

.transfer-filter-toolbar > div {
    display: grid;
    gap: 0.15rem;
}

.transfer-filter-eyebrow {
    color: #6913cc;
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.105em;
    text-transform: uppercase;
}

.transfer-filter-toolbar p {
    margin: 0;
    color: #7583a1;
    font-size: 0.77rem;
    line-height: 1.4;
}

.transfer-filter-clear {
    flex: 0 0 auto;
    border-radius: 999px;
    color: #4057af;
    font-size: 0.76rem;
    font-weight: 850;
    padding: 0.38rem 0.62rem;
    text-decoration: none;
}

.transfer-filter-clear:hover,
.transfer-filter-clear:focus-visible {
    background: #eef1ff;
    color: #203f98;
    outline: none;
}

.transfer-filter-route-grid {
    display: grid;
    grid-template-columns: minmax(8.8rem, 0.6fr) minmax(14rem, 1fr) minmax(14rem, 1fr);
    gap: 0.78rem;
    padding: 0.9rem 1rem 0;
}

.transfer-filter-options-grid {
    display: grid;
    grid-template-columns: minmax(17rem, 1.35fr) minmax(9.5rem, 0.7fr) auto;
    align-items: end;
    gap: 0.78rem;
    margin-top: 0.88rem;
    border-top: 1px solid rgba(44, 70, 129, 0.09);
    padding: 0.85rem 1rem 0.98rem;
}

.transfer-filter-panel .transaction-filter-control {
    min-width: 0;
}

.transfer-filter-panel .transaction-filter-control label {
    color: #50648e;
    font-size: 0.72rem;
}

.transfer-filter-panel .transaction-filter-control select,
.transfer-filter-panel .transaction-filter-control input {
    border-color: #cbd5e9;
    background-color: #fff;
}

.transfer-filter-panel .transaction-filter-control select:focus,
.transfer-filter-panel .transaction-filter-control input:focus {
    border-color: #6c7ff0;
    box-shadow: 0 0 0 3px rgba(76, 99, 239, 0.12);
    outline: none;
}

.transfer-filter-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    min-width: max-content;
}

.transfer-filter-apply {
    min-height: 2.72rem;
    white-space: nowrap;
}

/* Dashboard account search is intentionally client-side only: it narrows the
   already selected server-side view without exposing a browser API contract. */
.dashboard-account-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #dce3f3;
    border-radius: 1rem;
    background: linear-gradient(135deg, #fff 0%, #fafbff 100%);
    box-shadow: 0 9px 25px rgba(22, 45, 93, 0.055);
    padding: 0.72rem 0.82rem;
}

.dashboard-account-search-control {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-account-search-icon {
    position: absolute;
    left: 0.86rem;
    color: #6075a2;
    font-size: 1.1rem;
    line-height: 1;
    pointer-events: none;
}

.dashboard-account-search-control input {
    width: 100%;
    min-height: 2.78rem;
    border: 1px solid #b6c4ef;
    border-radius: 0.76rem;
    background: #fff;
    color: #172e5f;
    font: inherit;
    font-size: 0.92rem;
    padding: 0.52rem 2.55rem 0.52rem 2.42rem;
}

.dashboard-account-search-control input::placeholder {
    color: #7483a4;
}

.dashboard-account-search-control input:focus {
    border-color: #5f76ed;
    box-shadow: 0 0 0 3px rgba(76, 99, 239, 0.14);
    outline: none;
}

.dashboard-account-search-clear {
    position: absolute;
    right: 0.58rem;
    width: 1.56rem;
    height: 1.56rem;
    border: 0;
    border-radius: 999px;
    background: #e8edf9;
    color: #51658e;
    cursor: pointer;
    font-size: 1.06rem;
    line-height: 1;
}

.dashboard-account-search-clear:hover,
.dashboard-account-search-clear:focus-visible {
    background: #dce5fb;
    color: #183260;
    outline: none;
}

.dashboard-account-search-status {
    flex: 0 0 auto;
    margin: 0;
    color: #71809f;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-account-search-status strong {
    color: #22396d;
    font-weight: 900;
}

.dashboard-account-search-empty {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    border: 1px dashed #c7d2ed;
    border-radius: 1rem;
    background: #fbfcff;
    color: #66789c;
    padding: 2.2rem 1rem;
    text-align: center;
}

.dashboard-account-search-empty > span {
    display: grid;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    border-radius: 0.85rem;
    background: #edf1ff;
    color: #4c63ef;
    font-size: 1.2rem;
}

.dashboard-account-search-empty h2,
.dashboard-account-search-empty p {
    margin: 0;
}

.dashboard-account-search-empty h2 {
    color: #263d72;
    font-size: 0.96rem;
}

.dashboard-account-search-empty p {
    font-size: 0.78rem;
}

.transaction-transfer-route {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.32rem;
    color: #1b3467;
    font-weight: 700;
}

.transaction-transfer-route-arrow {
    color: #5d73e5;
    font-weight: 900;
}

.transaction-transfer-liability-label {
    display: block;
    color: #16824f;
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

@media (max-width: 1199.98px) {
    .transfer-filter-primary-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .transfer-filter-route-grid {
        grid-template-columns: minmax(8rem, 0.62fr) minmax(13rem, 1fr) minmax(13rem, 1fr);
    }

    .transfer-filter-options-grid {
        grid-template-columns: minmax(15rem, 1fr) minmax(9rem, 0.7fr) auto;
    }

    .transfer-detail-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .transfer-filter-primary-row,
    .transfer-filter-route-grid,
    .transfer-filter-options-grid,
    .transfer-account-route,
    .transfer-date-note-grid,
    .transfer-impact-grid,
    .transfer-detail-summary-grid {
        grid-template-columns: 1fr;
    }

    .transfer-route-direction {
        min-height: 1.9rem;
        justify-content: flex-start;
        margin-top: 0;
    }

    .transfer-route-arrow {
        width: 0.2rem;
        height: 1.68rem;
        margin-left: 0.92rem;
    }

    .transfer-route-arrow::after {
        top: auto;
        right: auto;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%) rotate(135deg);
    }

    .transfer-route-swap {
        position: static;
        margin-left: 0.42rem;
    }

    .transfer-filter-toolbar,
    .dashboard-account-search {
        align-items: flex-start;
        flex-direction: column;
    }

    .transfer-filter-toolbar {
        gap: 0.52rem;
    }

    .transfer-filter-options-grid {
        margin-top: 0.72rem;
    }

    .transfer-filter-actions {
        justify-content: stretch;
        min-width: 0;
    }

    .transfer-filter-apply {
        width: 100%;
    }

    .dashboard-account-search-status {
        white-space: normal;
    }

    .transfer-impact-arrow {
        display: none;
    }

    .transfer-impact-account + .transfer-impact-account {
        border-top: 1px solid rgba(31, 52, 94, 0.08);
    }

    .transfer-drawer-footer {
        align-items: stretch;
    }

    .transfer-drawer-ledger-note {
        justify-content: center;
    }
}

.dashboard-emergency-withdrawal-section {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.95rem;
    align-items: center;
    border: 1px solid rgba(217, 45, 32, 0.2);
    border-left: 5px solid #d92d20;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(217, 45, 32, 0.07), #fff 58%);
    box-shadow: 0 16px 34px rgba(19, 44, 91, 0.07);
    padding: 1rem 1.05rem;
}

.dashboard-emergency-withdrawal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: rgba(217, 45, 32, 0.12);
    color: #b42318;
    font-weight: 900;
}

.dashboard-emergency-withdrawal-copy {
    min-width: 0;
    display: grid;
    gap: 0.36rem;
}

.dashboard-emergency-withdrawal-copy > span {
    color: #b42318;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-emergency-withdrawal-copy h2 {
    margin: 0;
    color: #162d5d;
    font-family: Montserrat, Inter, sans-serif;
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.dashboard-emergency-withdrawal-copy p {
    max-width: 62rem;
    margin: 0;
    color: #607196;
    font-size: 0.88rem;
    line-height: 1.45;
}

.dashboard-emergency-withdrawal-copy dl {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.15rem 0 0;
}

.dashboard-emergency-withdrawal-copy dl > div {
    display: inline-flex;
    gap: 0.28rem;
    align-items: center;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(217, 45, 32, 0.14);
    padding: 0.3rem 0.55rem;
}

.dashboard-emergency-withdrawal-copy dt,
.dashboard-emergency-withdrawal-copy dd {
    margin: 0;
    font-size: 0.74rem;
}

.dashboard-emergency-withdrawal-copy dt {
    color: #7482a2;
    font-weight: 800;
}

.dashboard-emergency-withdrawal-copy dd {
    color: #162d5d;
    font-weight: 900;
}

.dashboard-emergency-withdrawal-due {
    justify-self: end;
    border-radius: 999px;
    background: #fde7eb;
    border: 1px solid #f4a5ad;
    color: #a5122c;
    padding: 0.48rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 900;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .dashboard-emergency-withdrawal-section {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .dashboard-emergency-withdrawal-due {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/* Posted activity correction/reversal actions */
.category-row-actions.posting-row-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.22rem;
    min-width: 5.75rem;
    line-height: 1.2;
}

.category-row-actions.posting-row-actions a {
    display: inline-flex;
    justify-content: flex-end;
    width: fit-content;
    margin-left: 0;
    font-weight: 750;
    text-align: right;
}

.category-row-actions.posting-row-actions .posting-row-action-danger {
    color: #b42318;
}

.category-row-actions.posting-row-actions .posting-row-action-danger:hover,
.category-row-actions.posting-row-actions .posting-row-action-danger:focus-visible {
    color: #7a1010;
}

.posting-reversal-impact-card {
    margin: 0 0 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(217, 45, 32, 0.18);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 245, 245, 0.86), rgba(255, 255, 255, 0.96));
    color: var(--sv-primary);
}

.posting-reversal-impact-card > span,
.posting-reversal-impact-header > span {
    display: block;
    margin-bottom: 0.3rem;
    color: #b42318;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.posting-reversal-impact-card strong,
.posting-reversal-impact-header strong {
    display: block;
    color: var(--sv-primary);
    font-size: 1rem;
    font-weight: 850;
}

.posting-reversal-impact-card p {
    margin: 0.45rem 0 0;
    color: #6f7890;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.55;
}

.transfer-reversal-impact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.transfer-reversal-impact-grid > div {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid rgba(24, 50, 96, 0.09);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
}

.transfer-reversal-impact-grid span {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--sv-primary);
    font-size: 0.94rem;
    font-weight: 850;
}

.transfer-reversal-impact-grid dl {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.transfer-reversal-impact-grid dl > div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.transfer-reversal-impact-grid dt {
    color: #7a8498;
    font-size: 0.78rem;
    font-weight: 800;
}

.transfer-reversal-impact-grid dd {
    margin: 0;
    color: var(--sv-primary);
    font-weight: 850;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .category-row-actions.posting-row-actions {
        align-items: flex-start;
    }

    .category-row-actions.posting-row-actions a {
        justify-content: flex-start;
        text-align: left;
    }

    .transfer-reversal-impact-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-card-usage-detail {
    margin: 0.45rem 0 0;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.35;
}
