/* ==========================================================================
   2if Modern UI — Warm Editorial Design System
   Scoped to app/auth shells (body.ui-shell) so that public Bio pages,
   redirect pages and other themed surfaces keep their own styles.
   ========================================================================== */

body.ui-shell {
    --ui-bg-0: #f6f5ef;
    --ui-bg-1: #efeee4;
    --ui-bg-2: #e8e6d9;
    --ui-surface: #fdfcf7;
    --ui-surface-elevated: rgba(253, 252, 247, 0.9);
    --ui-border: #e2dfd0;
    --ui-border-subtle: #eceade;
    --ui-text-main: #172b29;
    --ui-text-secondary: #45584f;
    --ui-text-muted: #6d7b72;
    --ui-primary: #176b5b;
    --ui-primary-hover: #12584b;
    --ui-primary-soft: rgba(23, 107, 91, 0.1);
    --ui-primary-ring: rgba(23, 107, 91, 0.22);
    --ui-mint: #dcefe3;
    --ui-mint-strong: #bfe3d1;
    --ui-on-primary: #fbfdfa;
    --ui-accent: #c4622d;
    --ui-accent-soft: rgba(196, 98, 45, 0.12);
    --ui-success: #177a52;
    --ui-danger: #c0392b;
    --ui-warning: #b07908;
    --ui-radius-sm: 0.5rem;
    --ui-radius-md: 0.75rem;
    --ui-radius-lg: 1rem;
    --ui-radius-xl: 1.375rem;
    --ui-shadow-xs: 0 1px 2px rgba(23, 43, 41, 0.05);
    --ui-shadow-sm: 0 3px 12px -2px rgba(23, 43, 41, 0.07), 0 1px 4px -1px rgba(23, 43, 41, 0.05);
    --ui-shadow-md: 0 14px 30px -8px rgba(23, 43, 41, 0.12), 0 4px 10px -2px rgba(23, 43, 41, 0.05);
    --ui-shadow-lg: 0 24px 50px -14px rgba(23, 43, 41, 0.2);
    --ui-header-bg: rgba(246, 245, 239, 0.86);
    --ui-font-body: "InterVariable", "Inter", "Avenir Next", "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
    --ui-font-display: Georgia, "Times New Roman", "Nimbus Roman", serif;
}

html[data-theme="dark"] body.ui-shell {
    --ui-bg-0: #0f1b19;
    --ui-bg-1: #0b1513;
    --ui-bg-2: #1a2925;
    --ui-surface: #152320;
    --ui-surface-elevated: rgba(21, 35, 32, 0.9);
    --ui-border: #26392f;
    --ui-border-subtle: #1d2e28;
    --ui-text-main: #e9efe9;
    --ui-text-secondary: #b4c4ba;
    --ui-text-muted: #8ba296;
    --ui-primary: #3fae93;
    --ui-primary-hover: #58c3a8;
    --ui-primary-soft: rgba(63, 174, 147, 0.14);
    --ui-primary-ring: rgba(63, 174, 147, 0.3);
    --ui-mint: #1e3a31;
    --ui-mint-strong: #2a5043;
    --ui-on-primary: #0f1b19;
    --ui-accent: #d98d55;
    --ui-accent-soft: rgba(217, 141, 85, 0.14);
    --ui-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --ui-shadow-sm: 0 4px 16px -2px rgba(0, 0, 0, 0.4);
    --ui-shadow-md: 0 12px 30px -6px rgba(0, 0, 0, 0.5);
    --ui-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.65);
    --ui-header-bg: rgba(15, 27, 25, 0.85);
}

/* Base & Typography */
body.ui-shell {
    font-family: var(--ui-font-body);
    background-color: var(--ui-bg-0);
    color: var(--ui-text-main);
    letter-spacing: -0.005em;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.ui-shell h1,
body.ui-shell h2,
body.ui-shell h3,
body.ui-shell .h1,
body.ui-shell .h2,
body.ui-shell .h3,
body.ui-shell .display-4,
body.ui-shell .display-3 {
    font-family: var(--ui-font-display);
    color: var(--ui-text-main);
    letter-spacing: -0.015em;
    font-weight: 700;
}

body.ui-shell h4, body.ui-shell h5, body.ui-shell h6,
body.ui-shell .h4, body.ui-shell .h5, body.ui-shell .h6 {
    color: var(--ui-text-main);
    letter-spacing: -0.01em;
    font-weight: 700;
}

body.ui-shell .bg-base-0 { background-color: var(--ui-bg-0) !important; }
body.ui-shell .bg-base-1 { background-color: var(--ui-bg-1) !important; }
body.ui-shell .bg-base-2 { background-color: var(--ui-bg-2) !important; }

body.ui-shell .text-dark { color: var(--ui-text-main) !important; }
body.ui-shell .text-muted { color: var(--ui-text-muted) !important; }
body.ui-shell .text-secondary { color: var(--ui-text-secondary) !important; }
body.ui-shell .text-primary { color: var(--ui-primary) !important; }

body.ui-shell a { color: var(--ui-primary); }
body.ui-shell a:hover { color: var(--ui-primary-hover); }

/* Accessible focus */
body.ui-shell a:focus-visible,
body.ui-shell button:focus-visible,
body.ui-shell .btn:focus-visible,
body.ui-shell .nav-link:focus-visible,
body.ui-shell .form-control:focus-visible,
body.ui-shell .custom-select:focus-visible,
body.ui-shell [tabindex]:focus-visible {
    outline: 3px solid var(--ui-primary-ring);
    outline-offset: 2px;
    border-radius: var(--ui-radius-sm);
}

/* Sticky Warm Header */
body.ui-shell #header.header {
    background-color: var(--ui-header-bg) !important;
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs) !important;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.ui-shell #header .navbar { min-height: 4rem; }

body.ui-shell #header .navbar-nav .nav-link {
    font-weight: 600;
    color: var(--ui-text-secondary);
    padding: 0.5rem 0.9rem;
    border-radius: var(--ui-radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
}

body.ui-shell #header .navbar-nav .nav-link:hover {
    color: var(--ui-primary);
    background-color: var(--ui-primary-soft);
}

/* Cards */
body.ui-shell .card {
    background-color: var(--ui-surface);
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-lg) !important;
    box-shadow: var(--ui-shadow-sm) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.ui-shell .card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--ui-border);
    padding: 1rem 1.35rem;
    font-weight: 600;
}

body.ui-shell .card-body { padding: 1.35rem; }

body.ui-shell .card-footer {
    background-color: var(--ui-bg-1) !important;
    border-top: 1px solid var(--ui-border) !important;
    padding: 0.85rem 1.35rem;
    border-bottom-left-radius: var(--ui-radius-lg) !important;
    border-bottom-right-radius: var(--ui-radius-lg) !important;
}

body.ui-shell .feature .card:hover,
body.ui-shell .dashboard-stat-card:hover,
body.ui-shell .action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ui-shadow-md) !important;
    border-color: var(--ui-primary-ring) !important;
}

/* Buttons */
body.ui-shell .btn {
    border-radius: var(--ui-radius-md);
    font-weight: 600;
    letter-spacing: -0.005em;
    padding: 0.55rem 1.1rem;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.ui-shell .btn-sm {
    border-radius: var(--ui-radius-sm);
    padding: 0.38rem 0.75rem;
    font-size: 0.84rem;
}

body.ui-shell .btn-lg {
    border-radius: var(--ui-radius-md);
    padding: 0.78rem 1.5rem;
    font-size: 1.05rem;
}

body.ui-shell .btn-primary {
    background-color: var(--ui-primary);
    border-color: var(--ui-primary);
    color: var(--ui-on-primary) !important;
    box-shadow: 0 4px 12px rgba(23, 107, 91, 0.22);
}

body.ui-shell .btn-primary:hover,
body.ui-shell .btn-primary:focus {
    background-color: var(--ui-primary-hover);
    border-color: var(--ui-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(23, 107, 91, 0.3);
}

body.ui-shell .btn-primary:active { transform: translateY(0); }

body.ui-shell .btn-outline-primary {
    color: var(--ui-primary);
    border-color: rgba(23, 107, 91, 0.4);
    background-color: transparent;
}

html[data-theme="dark"] body.ui-shell .btn-outline-primary {
    border-color: rgba(63, 174, 147, 0.45);
}

body.ui-shell .btn-outline-primary:hover,
body.ui-shell .btn-outline-primary:focus {
    background-color: var(--ui-primary);
    border-color: var(--ui-primary);
    color: #fbfdfa !important;
    box-shadow: 0 4px 12px rgba(23, 107, 91, 0.22);
}

body.ui-shell .btn-outline-secondary {
    color: var(--ui-text-secondary);
    border-color: var(--ui-border);
}

body.ui-shell .btn-outline-secondary:hover,
body.ui-shell .btn-outline-secondary:focus {
    color: var(--ui-text-main);
    background-color: var(--ui-bg-2);
    border-color: var(--ui-border);
}

body.ui-shell .btn-secondary {
    background-color: var(--ui-bg-2);
    border-color: var(--ui-bg-2);
    color: var(--ui-text-main);
}

/* Inputs & Selects */
body.ui-shell .form-control,
body.ui-shell .custom-select {
    background-color: var(--ui-surface);
    border: 1.5px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    color: var(--ui-text-main);
    padding: 0.58rem 0.9rem;
    height: auto;
    min-height: 2.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    box-shadow: none;
}

body.ui-shell .form-control::placeholder { color: var(--ui-text-muted); opacity: 0.75; }

body.ui-shell .form-control-sm,
body.ui-shell .custom-select-sm {
    min-height: 2.25rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--ui-radius-sm);
}

body.ui-shell .form-control-lg,
body.ui-shell .custom-select-lg {
    min-height: 3.35rem;
    padding: 0.75rem 1.15rem;
    border-radius: var(--ui-radius-md);
    font-size: 1.05rem;
}

body.ui-shell .form-control:focus,
body.ui-shell .custom-select:focus {
    background-color: var(--ui-surface);
    color: var(--ui-text-main);
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 3.5px var(--ui-primary-ring);
}

body.ui-shell .input-group-text {
    background-color: var(--ui-bg-1);
    border: 1.5px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    color: var(--ui-text-secondary);
}

/* ==========================================================================
   Landing page (home)
   ========================================================================== */

body.ui-shell .landing-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 20%, rgba(23, 107, 91, 0.1) 0%, transparent 46%),
        radial-gradient(circle at 88% 12%, rgba(196, 98, 45, 0.08) 0%, transparent 42%),
        var(--ui-bg-0);
    border-bottom: 1px solid var(--ui-border);
}

body.ui-shell .landing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background-color: var(--ui-mint);
    color: var(--ui-primary);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
    border: 1px solid var(--ui-mint-strong);
}

html[data-theme="dark"] body.ui-shell .landing-eyebrow {
    border-color: var(--ui-border);
}

body.ui-shell .landing-title {
    font-family: var(--ui-font-display);
    font-size: clamp(2.25rem, 5vw, 3.75rem) !important;
    font-weight: 700 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.02em !important;
}

body.ui-shell .landing-subtitle {
    font-size: clamp(1.02rem, 1.9vw, 1.22rem) !important;
    color: var(--ui-text-secondary) !important;
    max-width: 34rem;
    line-height: 1.65;
}

body.ui-shell .landing-kicker {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ui-accent);
}

body.ui-shell .landing-section-title {
    font-family: var(--ui-font-display);
    font-size: clamp(1.7rem, 3vw, 2.35rem) !important;
    line-height: 1.18 !important;
}

body.ui-shell .landing-lead {
    color: var(--ui-text-secondary);
    font-size: 1.06rem;
    line-height: 1.7;
}

/* Product composition (hero illustration, clearly labelled sample) */
body.ui-shell .landing-stage {
    position: relative;
    min-height: 26rem;
}

body.ui-shell .landing-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(52px);
    opacity: 0.5;
    pointer-events: none;
}

body.ui-shell .landing-blob-mint {
    width: 21rem;
    height: 21rem;
    background: var(--ui-mint-strong);
    top: -3rem;
    inset-inline-end: -2rem;
}

body.ui-shell .landing-blob-orange {
    width: 15rem;
    height: 15rem;
    background: var(--ui-accent-soft);
    bottom: -2rem;
    inset-inline-start: -1rem;
}

body.ui-shell .landing-phone {
    position: relative;
    width: min(15.5rem, 68vw);
    margin-inline: auto;
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: 2rem;
    box-shadow: var(--ui-shadow-lg);
    padding: 1.4rem 1rem 1.2rem;
    z-index: 2;
}

body.ui-shell .landing-phone::before {
    content: "";
    display: block;
    width: 4.2rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--ui-border);
    margin: 0 auto 1.1rem;
}

body.ui-shell .landing-phone-avatar {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    margin: 0 auto 0.6rem;
    background: linear-gradient(140deg, var(--ui-primary) 0%, var(--ui-accent) 130%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbfdfa;
}

body.ui-shell .landing-phone-name {
    font-family: var(--ui-font-display);
    font-weight: 700;
    text-align: center;
    color: var(--ui-text-main);
    font-size: 0.98rem;
}

body.ui-shell .landing-phone-bio {
    text-align: center;
    color: var(--ui-text-muted);
    font-size: 0.74rem;
    margin-bottom: 0.9rem;
}

body.ui-shell .landing-phone-socials {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

body.ui-shell .landing-phone-socials span {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--ui-bg-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ui-primary);
}

body.ui-shell .landing-phone-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ui-bg-1);
    border: 1px solid var(--ui-border-subtle);
    border-radius: var(--ui-radius-md);
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.5rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--ui-text-secondary);
}

body.ui-shell .landing-phone-link.is-featured {
    background: var(--ui-primary);
    border-color: var(--ui-primary);
    color: var(--ui-on-primary);
}

body.ui-shell .landing-float-card {
    position: absolute;
    background: var(--ui-surface-elevated);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-md);
    padding: 0.8rem 1rem;
    z-index: 3;
}

body.ui-shell .landing-card-link {
    top: 2.2rem;
    inset-inline-start: 0;
    max-width: 16rem;
    transform: rotate(-3deg);
}

body.ui-shell .landing-card-stats {
    bottom: 1.6rem;
    inset-inline-end: 0;
    width: 12.5rem;
    transform: rotate(2deg);
}

body.ui-shell .landing-card-qr {
    top: 9.5rem;
    inset-inline-end: -0.4rem;
    transform: rotate(4deg);
    padding: 0.7rem;
}

body.ui-shell .landing-mini-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ui-text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

body.ui-shell .landing-mini-url {
    font-weight: 700;
    color: var(--ui-primary);
    font-size: 0.9rem;
    direction: ltr;
    text-align: start;
}

body.ui-shell .landing-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
    background: var(--ui-mint);
    color: var(--ui-primary);
    font-size: 0.7rem;
    font-weight: 700;
}

body.ui-shell .landing-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.3rem;
    height: 3.4rem;
    margin-top: 0.55rem;
}

body.ui-shell .landing-bars span {
    flex: 1;
    border-radius: 0.3rem 0.3rem 0.15rem 0.15rem;
    background: linear-gradient(180deg, var(--ui-primary) 0%, var(--ui-mint-strong) 130%);
    min-height: 12%;
}

/* Guest workspace */
body.ui-shell .landing-workspace {
    background:
        radial-gradient(circle at 88% 90%, rgba(23, 107, 91, 0.07) 0%, transparent 40%),
        var(--ui-bg-1);
}

body.ui-shell .landing-panel {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-xl);
    box-shadow: var(--ui-shadow-md);
    padding: 1.6rem;
}

body.ui-shell .landing-panel .qr-builder-container {
    margin-bottom: 0;
}

/* Feature showcase rows */
body.ui-shell .landing-feature-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

body.ui-shell .landing-feature-check .check-icon {
    flex-shrink: 0;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: var(--ui-mint);
    color: var(--ui-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}

body.ui-shell .landing-mock {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-xl);
    box-shadow: var(--ui-shadow-md);
    overflow: hidden;
}

body.ui-shell .landing-mock-toolbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--ui-border-subtle);
}

body.ui-shell .landing-mock-toolbar i {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--ui-border);
    display: inline-block;
}

body.ui-shell .landing-mock-toolbar i:first-child { background: var(--ui-accent); }

body.ui-shell .landing-mock-body { padding: 1.25rem; }

body.ui-shell .landing-mock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--ui-border-subtle);
    font-size: 0.85rem;
    color: var(--ui-text-secondary);
}

body.ui-shell .landing-mock-row:last-child { border-bottom: none; }

body.ui-shell .landing-meter {
    flex: 0 0 42%;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--ui-bg-2);
    overflow: hidden;
}

body.ui-shell .landing-meter > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ui-primary), var(--ui-mint-strong));
}

body.ui-shell .landing-qr-frame {
    display: inline-flex;
    padding: 1rem;
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-md);
}

/* Capability tiles */
body.ui-shell .landing-tile {
    height: 100%;
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.ui-shell .landing-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--ui-shadow-md);
    border-color: var(--ui-primary-ring);
}

body.ui-shell .landing-tile-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: var(--ui-radius-md);
    background: var(--ui-mint);
    color: var(--ui-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
}

body.ui-shell .landing-tile-icon.is-accent {
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
}

/* Segmented pill tabs in the guest workspace */
body.ui-shell #hero-tabs.qr-nav-tabs {
    border-bottom: none;
    background-color: var(--ui-bg-2);
    padding: 0.35rem;
    border-radius: 999px;
    display: inline-flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--ui-border);
}

body.ui-shell #hero-tabs.qr-nav-tabs .nav-link {
    border-radius: 999px;
    border-bottom: none !important;
    margin-bottom: 0;
    padding: 0.6rem 1.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ui-text-secondary);
    min-height: 44px;
}

body.ui-shell #hero-tabs.qr-nav-tabs .nav-link.active {
    background-color: var(--ui-surface);
    color: var(--ui-primary);
    box-shadow: var(--ui-shadow-xs);
}

/* Guest shortener box */
body.ui-shell .hero-shortener-card {
    background-color: var(--ui-surface);
    border: 1.5px solid var(--ui-border);
    border-radius: var(--ui-radius-xl);
    padding: 0.6rem;
    box-shadow: var(--ui-shadow-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.ui-shell .hero-shortener-card:focus-within {
    border-color: var(--ui-primary);
    box-shadow: var(--ui-shadow-md), 0 0 0 3px var(--ui-primary-ring);
}

body.ui-shell .hero-shortener-card .form-control-lg {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 3.25rem;
}

body.ui-shell .hero-shortener-card .btn-lg {
    min-height: 3.25rem;
    padding-left: 1.75rem;
    padding-right: 1.75rem;
    border-radius: calc(var(--ui-radius-xl) - 0.35rem);
}

/* ==========================================================================
   App shell: sidebar, slide menu, bottom nav
   ========================================================================== */

body.ui-shell #slide-menu.slide-menu {
    background-color: var(--ui-surface) !important;
    border-inline-end: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs) !important;
    width: 260px;
}

body.ui-shell #slide-menu .slide-menu-close {
    border: none;
    background: transparent;
    color: var(--ui-text-secondary);
    border-radius: var(--ui-radius-sm);
    min-width: 44px;
    min-height: 44px;
}

body.ui-shell #slide-menu .slide-menu-close:hover {
    color: var(--ui-primary);
    background-color: var(--ui-primary-soft);
}

@media (min-width: 992px) {
    body.ui-shell .content { margin-inline-start: 260px; }
}

body.ui-shell .sidebar .nav-link {
    margin: 0.18rem 0.75rem;
    padding: 0.68rem 1rem !important;
    border-radius: var(--ui-radius-md);
    border-right: none !important;
    border-left: none !important;
    font-weight: 500;
    color: var(--ui-text-secondary);
    transition: all 0.15s ease;
}

body.ui-shell .sidebar .nav-link:hover {
    background-color: var(--ui-bg-2);
    color: var(--ui-text-main);
}

body.ui-shell .sidebar .nav-link.active {
    background-color: var(--ui-primary-soft);
    color: var(--ui-primary);
    font-weight: 600;
}

body.ui-shell .sidebar .nav-link.active > .sidebar-icon { color: var(--ui-primary); }

/* Mobile slide menu backdrop */
body.ui-shell .slide-menu-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 27, 25, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1028;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

body.ui-shell .slide-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile bottom navigation bar (authenticated users) */
body.ui-shell .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1026;
    background-color: var(--ui-header-bg);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-top: 1px solid var(--ui-border);
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(23, 43, 41, 0.07);
}

body.ui-shell .mobile-bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 540px;
    margin: 0 auto;
}

body.ui-shell .mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.6rem;
    border-radius: var(--ui-radius-sm);
    color: var(--ui-text-muted);
    text-decoration: none !important;
    font-size: 0.7rem;
    font-weight: 600;
    gap: 0.22rem;
    min-width: 3.6rem;
    min-height: 44px;
    transition: color 0.15s ease, background-color 0.15s ease;
    background: transparent;
    border: none;
}

body.ui-shell .mobile-bottom-nav-item:hover,
body.ui-shell .mobile-bottom-nav-item:focus { color: var(--ui-primary); }

body.ui-shell .mobile-bottom-nav-item.active {
    color: var(--ui-primary);
    background-color: var(--ui-primary-soft);
}

/* Dashboard action hub */
body.ui-shell .action-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--ui-surface);
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-lg);
    padding: 1.35rem;
    text-decoration: none !important;
    color: var(--ui-text-main);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.ui-shell .action-card-icon {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: var(--ui-radius-md);
    background: var(--ui-mint);
    color: var(--ui-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

body.ui-shell .action-card.is-accent .action-card-icon {
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
}

body.ui-shell .action-card:hover { border-color: var(--ui-primary-ring) !important; }
body.ui-shell .action-card:hover .action-card-cta { color: var(--ui-primary); }

body.ui-shell .action-card-cta {
    margin-top: auto;
    padding-top: 0.9rem;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--ui-text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Page shell helpers */
body.ui-shell .app-page-title { font-family: var(--ui-font-display); letter-spacing: -0.015em; }
body.ui-shell .app-page-lead { color: var(--ui-text-muted); max-width: 44rem; }

/* List groups, tables, dropdowns, modals, badges */
body.ui-shell .list-group-flush .list-group-item {
    background-color: transparent;
    border-color: var(--ui-border);
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

body.ui-shell .badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.45rem;
}

body.ui-shell .badge-primary { background-color: var(--ui-primary); color: #fbfdfa; }
body.ui-shell .badge-light { background-color: var(--ui-bg-2); color: var(--ui-text-secondary); }

body.ui-shell .dropdown-menu {
    background-color: var(--ui-surface);
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-md);
    box-shadow: var(--ui-shadow-md) !important;
    padding: 0.5rem;
}

body.ui-shell .dropdown-item {
    border-radius: var(--ui-radius-sm);
    padding: 0.5rem 0.85rem;
    color: var(--ui-text-main);
    font-weight: 500;
}

body.ui-shell .dropdown-item:hover,
body.ui-shell .dropdown-item:focus {
    background-color: var(--ui-bg-2);
    color: var(--ui-primary);
}

body.ui-shell .modal-content {
    background-color: var(--ui-surface);
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-lg) !important;
}

body.ui-shell .progress { background-color: var(--ui-bg-2); }
body.ui-shell .progress-bar { background-color: var(--ui-primary); }

body.ui-shell .breadcrumb { background: transparent; }
body.ui-shell .breadcrumb-item.active { color: var(--ui-text-main); }
body.ui-shell .breadcrumb-item a { color: var(--ui-text-muted); }

body.ui-shell .alert-success {
    background-color: var(--ui-mint);
    border-color: var(--ui-mint-strong);
    color: var(--ui-primary-hover);
}

/* Mobile link row meta chips */
body.ui-shell .mobile-link-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

body.ui-shell .mobile-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    background-color: var(--ui-bg-2);
    color: var(--ui-text-secondary);
}

/* ==========================================================================
   Page-scoped compatibility for late-loaded builder stylesheets
   (custom-qr.css, bio-builder.css load inside content views)
   ========================================================================== */

body.ui-shell .app-page .qr-builder-container,
body.ui-shell .landing-workspace .qr-builder-container {
    background-color: var(--ui-surface);
    border-color: var(--ui-border);
    box-shadow: var(--ui-shadow-sm);
}

body.ui-shell .qr-preview-card {
    background: var(--ui-surface);
    border-color: var(--ui-border);
    max-width: 24rem;
    margin-inline: auto;
}

body.ui-shell .qr-preview-stage-wrapper { background: var(--ui-bg-1); }

body.ui-shell .qr-choice-btn {
    background-color: var(--ui-surface);
    border-color: var(--ui-border);
    color: var(--ui-text-secondary);
}

body.ui-shell .qr-choice-btn.active {
    border-color: var(--ui-primary);
    background-color: var(--ui-primary-soft);
    color: var(--ui-primary);
    box-shadow: 0 0 0 1px var(--ui-primary);
}

body.ui-shell .qr-step-title { color: var(--ui-text-main); }
body.ui-shell .qr-step-subtitle { color: var(--ui-text-muted); }

body.ui-shell .qr-color-swatch.active {
    box-shadow: 0 0 0 2.5px var(--ui-primary), 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Bio builder preview phone shrinks to fit narrow viewports */
body.ui-shell .bio-builder-wrapper .phone-mockup {
    width: min(340px, 100%);
}

/* ==========================================================================
   Responsive & accessibility
   ========================================================================== */

@media (max-width: 991.98px) {
    /* Space for mobile bottom navigation when authenticated */
    body.ui-shell.has-mobile-nav {
        padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    }

    body.ui-shell #slide-menu.slide-menu {
        width: min(84vw, 300px);
        box-shadow: var(--ui-shadow-lg) !important;
    }

    body.ui-shell .qr-preview-card {
        position: static !important;
        margin-top: 1.5rem;
    }

    body.ui-shell .landing-stage { min-height: 24rem; }

    body.ui-shell .landing-card-link { inset-inline-start: -0.2rem; }
    body.ui-shell .landing-card-stats { inset-inline-end: -0.2rem; }
}

@media (max-width: 767.98px) {
    body.ui-shell .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    body.ui-shell .card-body { padding: 1.1rem; }
    body.ui-shell .card-header { padding: 0.9rem 1.1rem; }

    /* Prevent iOS Safari auto-zoom on form focus */
    body.ui-shell input.form-control,
    body.ui-shell select.custom-select,
    body.ui-shell textarea.form-control {
        font-size: 16px !important;
    }

    /* Stack card header title & search toolbar cleanly on phones */
    body.ui-shell .card-header > .row { row-gap: 0.65rem; }
    body.ui-shell .card-header > .row > .col-auto { width: 100%; }
    body.ui-shell .card-header > .row > .col-auto form,
    body.ui-shell .card-header > .row > .col-auto .input-group { width: 100%; }

    /* Filter dropdowns fit mobile screen width */
    body.ui-shell #search-filters.dropdown-menu,
    body.ui-shell .dropdown-menu.width-64 {
        width: min(92vw, 320px) !important;
        max-height: 75vh;
        overflow-y: auto;
    }

    /* Minimum touch target size on interactive elements */
    body.ui-shell .navbar-nav .nav-link,
    body.ui-shell .btn,
    body.ui-shell .dropdown-item,
    body.ui-shell .mobile-bottom-nav-item,
    body.ui-shell .qr-choice-btn {
        min-height: 44px;
    }

    /* Guest shortener card stacks input & button cleanly */
    body.ui-shell .hero-shortener-card {
        padding: 0.75rem;
        border-radius: var(--ui-radius-lg);
    }

    body.ui-shell .hero-shortener-card .form-control-lg {
        border: 1.5px solid var(--ui-border) !important;
        background-color: var(--ui-surface) !important;
        border-radius: var(--ui-radius-md);
    }

    body.ui-shell .hero-shortener-card .btn-lg {
        border-radius: var(--ui-radius-md);
        width: 100%;
    }

    /* QR builder mobile padding */
    body.ui-shell .qr-builder-container {
        padding: 1.15rem !important;
        border-radius: var(--ui-radius-lg) !important;
    }

    body.ui-shell .qr-preview-stage-wrapper {
        min-height: 240px !important;
        padding: 1rem 0.5rem !important;
    }

    /* Pagination stacks cleanly on narrow viewports */
    body.ui-shell .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    body.ui-shell .landing-panel { padding: 1.15rem; }
    body.ui-shell .landing-stage { min-height: auto; padding-bottom: 4.5rem; }

    body.ui-shell .landing-float-card { position: relative; }
    body.ui-shell .landing-card-link {
        top: auto;
        inset-inline-start: auto;
        margin: 0 auto 1rem;
        transform: rotate(-2deg);
    }
    body.ui-shell .landing-card-stats {
        bottom: auto;
        inset-inline-end: auto;
        margin: 0 auto;
        transform: rotate(1.5deg);
    }
    body.ui-shell .landing-card-qr { display: none; }
    body.ui-shell .landing-phone { margin-bottom: 1.25rem; }
}

/* ==========================================================================
   Modern Auth (Register & Login) Styles
   ========================================================================== */

body.ui-shell .auth-modern-wrapper {
    position: relative;
    padding: 2.5rem 0 3.5rem;
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
}

body.ui-shell .auth-modern-card {
    background-color: var(--ui-surface);
    border: 1.5px solid var(--ui-border);
    border-radius: var(--ui-radius-xl, 1.375rem);
    box-shadow: 0 20px 45px -12px rgba(23, 43, 41, 0.12), 0 4px 16px -2px rgba(23, 43, 41, 0.04);
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

body.ui-shell .auth-form-column {
    padding: 3.25rem 2.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 991.98px) {
    body.ui-shell .auth-form-column {
        padding: 2.25rem 1.5rem;
    }
    body.ui-shell .auth-modern-wrapper {
        padding: 1.5rem 0 2.5rem;
    }
}

body.ui-shell .auth-eyebrow-badge {
    display: inline-flex;
    align-items: center;
    background-color: var(--ui-mint);
    border: 1px solid var(--ui-mint-strong);
    color: var(--ui-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
}

body.ui-shell .auth-form-title {
    font-family: var(--ui-font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ui-text-main);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

body.ui-shell .auth-form-subtitle {
    color: var(--ui-text-muted);
    font-size: 0.95rem;
}

body.ui-shell .auth-field-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ui-text-secondary);
    margin-bottom: 0.4rem;
}

body.ui-shell .auth-input-group {
    border-radius: var(--ui-radius-md);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

body.ui-shell .auth-input-group .input-group-prepend .input-group-text {
    background-color: var(--ui-bg-1);
    border: 1.5px solid var(--ui-border);
    border-right: none;
    border-top-left-radius: var(--ui-radius-md);
    border-bottom-left-radius: var(--ui-radius-md);
    color: var(--ui-text-muted);
    padding: 0 0.95rem;
}

body.ui-shell .auth-input-group .form-control {
    border: 1.5px solid var(--ui-border);
    border-left: none;
    border-top-right-radius: var(--ui-radius-md);
    border-bottom-right-radius: var(--ui-radius-md);
    font-size: 0.95rem;
    height: auto;
    padding: 0.72rem 1rem;
    background-color: var(--ui-surface);
    color: var(--ui-text-main);
}

body.ui-shell .auth-input-group.has-append .form-control {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

body.ui-shell .auth-input-group .input-group-append .btn-toggle-password {
    background-color: var(--ui-surface);
    border: 1.5px solid var(--ui-border);
    border-left: none;
    border-top-right-radius: var(--ui-radius-md);
    border-bottom-right-radius: var(--ui-radius-md);
    color: var(--ui-text-muted);
    padding: 0 0.95rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

body.ui-shell .auth-input-group .input-group-append .btn-toggle-password:hover {
    color: var(--ui-primary);
    background-color: var(--ui-bg-1);
}

body.ui-shell .auth-input-group:focus-within {
    box-shadow: 0 0 0 3px var(--ui-primary-ring);
    border-radius: var(--ui-radius-md);
}

body.ui-shell .auth-input-group:focus-within .input-group-text,
body.ui-shell .auth-input-group:focus-within .form-control,
body.ui-shell .auth-input-group:focus-within .btn-toggle-password {
    border-color: var(--ui-primary);
}

body.ui-shell .auth-submit-btn {
    border-radius: var(--ui-radius-md);
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    background-color: var(--ui-primary);
    border: none;
    color: var(--ui-on-primary, #ffffff);
    box-shadow: 0 4px 14px rgba(23, 107, 91, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

body.ui-shell .auth-submit-btn:hover {
    background-color: var(--ui-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 107, 91, 0.35);
    color: #ffffff;
}

body.ui-shell .auth-submit-btn:active {
    transform: translateY(0);
}

/* Brand Showcase Column (Right) */
body.ui-shell .auth-brand-column {
    background:
        radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.08) 0%, transparent 45%),
        linear-gradient(145deg, #0f3d34 0%, #176b5b 55%, #0b2b24 100%);
    padding: 3.5rem 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    overflow: hidden;
}

body.ui-shell .auth-brand-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2f4ea;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    backdrop-filter: blur(8px);
}

body.ui-shell .auth-brand-title {
    font-family: var(--ui-font-display);
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #ffffff;
}

body.ui-shell .auth-brand-desc {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.55;
}

body.ui-shell .auth-feature-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

body.ui-shell .auth-feature-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.12);
}

body.ui-shell .auth-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

body.ui-shell .auth-feature-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

body.ui-shell .auth-feature-text {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.35;
}

body.ui-shell .auth-testimonial-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1.15rem 1.35rem;
    backdrop-filter: blur(12px);
}

body.ui-shell .auth-trust-note {
    font-size: 0.8rem;
    color: var(--ui-text-muted);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    body.ui-shell *,
    body.ui-shell *::before,
    body.ui-shell *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   Modern Legal Pages (Terms & Privacy) Styles
   ========================================================================== */

body.ui-shell .legal-hero {
    background:
        radial-gradient(circle at 10% 20%, var(--ui-mint) 0%, transparent 40%),
        var(--ui-surface);
    border-bottom: 1px solid var(--ui-border);
    padding: 3.5rem 0 2.5rem;
}

body.ui-shell .legal-eyebrow {
    display: inline-flex;
    align-items: center;
    background-color: var(--ui-mint);
    border: 1px solid var(--ui-mint-strong);
    color: var(--ui-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 0.85rem;
}

body.ui-shell .legal-title {
    font-family: var(--ui-font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ui-text-main);
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

body.ui-shell .legal-subtitle {
    color: var(--ui-text-muted);
    font-size: 1.1rem;
    max-width: 680px;
    line-height: 1.6;
}

body.ui-shell .legal-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--ui-border);
    font-size: 0.88rem;
    color: var(--ui-text-secondary);
}

body.ui-shell .legal-meta-item {
    display: inline-flex;
    align-items: center;
}

body.ui-shell .legal-toc-card {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--ui-shadow-sm);
    position: sticky;
    top: 90px;
}

body.ui-shell .legal-toc-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ui-text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.ui-shell .legal-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.ui-shell .legal-toc-link {
    display: flex;
    align-items: baseline;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    color: var(--ui-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--ui-radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
}

body.ui-shell .legal-toc-link:hover {
    background-color: var(--ui-mint);
    color: var(--ui-primary);
    text-decoration: none;
    transform: translateX(3px);
}

body.ui-shell .legal-toc-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ui-primary);
    margin-right: 0.6rem;
    opacity: 0.85;
}

body.ui-shell .legal-section {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    padding: 2.25rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--ui-shadow-sm);
    scroll-margin-top: 100px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.ui-shell .legal-section:hover {
    border-color: rgba(23, 107, 91, 0.3);
    box-shadow: var(--ui-shadow-md);
}

body.ui-shell .legal-section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ui-border);
}

body.ui-shell .legal-section-num {
    background-color: var(--ui-mint);
    border: 1px solid var(--ui-mint-strong);
    color: var(--ui-primary);
    font-size: 0.85rem;
    font-weight: 800;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.ui-shell .legal-section-title {
    font-family: var(--ui-font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ui-text-main);
    letter-spacing: -0.015em;
    margin-bottom: 0.25rem;
}

body.ui-shell .legal-content-body {
    color: var(--ui-text-secondary);
    font-size: 0.98rem;
    line-height: 1.72;
}

body.ui-shell .legal-content-body p:last-child {
    margin-bottom: 0;
}

body.ui-shell .legal-callout {
    background-color: var(--ui-bg-1);
    border-left: 4px solid var(--ui-primary);
    border-radius: 0 var(--ui-radius-md) var(--ui-radius-md) 0;
    padding: 1.15rem 1.35rem;
    margin: 1.25rem 0;
    font-size: 0.92rem;
    color: var(--ui-text-main);
}

body.ui-shell .legal-callout.warning {
    border-left-color: #d97706;
    background-color: rgba(217, 119, 6, 0.08);
}

body.ui-shell .legal-callout.info {
    border-left-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.08);
}

body.ui-shell .legal-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

body.ui-shell .legal-feature-box {
    background-color: var(--ui-bg-1);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    padding: 1rem 1.2rem;
}

body.ui-shell .legal-feature-box-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--ui-text-main);
    margin-bottom: 0.35rem;
}

body.ui-shell .legal-feature-box-desc {
    font-size: 0.85rem;
    color: var(--ui-text-muted);
    line-height: 1.45;
}

body.ui-shell .legal-switch-card {
    background: linear-gradient(135deg, rgba(23, 107, 91, 0.06), rgba(63, 174, 147, 0.12));
    border: 1px solid var(--ui-mint-strong);
    border-radius: var(--ui-radius-md);
    padding: 1.1rem;
    margin-top: 1.5rem;
    text-align: center;
}

@media print {
    #header, #footer, .legal-toc-card, .legal-meta-bar button, .legal-switch-card {
        display: none !important;
    }
    body.ui-shell .legal-section {
        border: none !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        padding: 1rem 0 !important;
    }
    body.ui-shell .legal-hero {
        background: transparent !important;
        padding: 1rem 0 !important;
    }
}


/* Header brand logo sizing override (app.css keeps it at 2.375rem) */
#header .logo,
.navbar-brand .logo {
    height: 3.75rem;
    width: auto;
    display: flex;
    align-items: center;
}

#header .logo img,
.navbar-brand .logo img {
    height: 100%;
    max-height: 3.75rem;
    max-width: 16rem;
    object-fit: contain;
}

@media (max-width: 991.98px) {
    #header .logo,
    .navbar-brand .logo {
        height: 3rem;
    }

    #header .logo img,
    .navbar-brand .logo img {
        max-height: 3rem;
        max-width: 12.5rem;
    }
}
