/* =============================================================================
   ArrivalPoint -- modern design system
   Loaded AFTER bootstrap.min.css and BEFORE app.css so design tokens cascade
   down, but legacy page styles can still override layout where needed.
   ============================================================================= */

:root {
    /* Brand palette -- teal/cyan -> indigo, paired with deep navy ink */
    --ap-brand-500: #0d9488;
    --ap-brand-600: #0f766e;
    --ap-brand-400: #2dd4bf;
    --ap-accent-500: #6366f1;
    --ap-accent-400: #818cf8;
    --ap-cyan-400: #38bdf8;

    /* Ink + neutrals */
    --ap-ink-900: #0b1020;
    --ap-ink-800: #111a36;
    --ap-ink-700: #1e293b;
    --ap-ink-500: #475569;
    --ap-ink-400: #64748b;
    --ap-ink-300: #94a3b8;
    --ap-ink-200: #cbd5e1;
    --ap-ink-100: #e2e8f0;
    --ap-ink-50:  #f1f5f9;
    --ap-bg:      #f5f7fb;
    --ap-surface: #ffffff;

    /* State */
    --ap-success: #10b981;
    --ap-warning: #f59e0b;
    --ap-danger:  #ef4444;

    /* Elevation */
    --ap-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --ap-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
    --ap-shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.22);
    --ap-shadow-glow: 0 0 0 4px rgba(45, 212, 191, 0.18);

    /* Radius + motion */
    --ap-radius-sm: 0.5rem;
    --ap-radius:    0.75rem;
    --ap-radius-lg: 1rem;
    --ap-radius-xl: 1.5rem;
    --ap-ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Brand gradients reused everywhere */
    --ap-gradient-brand: linear-gradient(135deg, #0d9488 0%, #0ea5e9 55%, #6366f1 100%);
    --ap-gradient-soft:  linear-gradient(135deg, #e8fbf7 0%, #eef2ff 60%, #fef3f9 100%);
    --ap-gradient-ink:   linear-gradient(135deg, #0b1020 0%, #111a36 55%, #1e293b 100%);
}

/* ---- Global typography + body --------------------------------------------- */
html, body {
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--ap-ink-900);
    background: var(--ap-bg);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#app {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 100vh;
}

/* Headings get a touch more weight + tighter tracking */
h1, h2, h3, h4, .ap-display {
    letter-spacing: -0.015em;
    color: var(--ap-ink-900);
}

/* Focus rings -- accessible and on-brand */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: var(--ap-shadow-glow);
    border-color: var(--ap-brand-500) !important;
}

/* ---- Buttons -- override Bootstrap primary/outline with the brand ramp ---- */
.btn {
    border-radius: var(--ap-radius-sm);
    font-weight: 600;
    letter-spacing: 0.005em;
    transition: transform 120ms var(--ap-ease), box-shadow 160ms var(--ap-ease),
                background-color 160ms var(--ap-ease), color 160ms var(--ap-ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--ap-gradient-brand);
    border: none;
    color: #fff;
    box-shadow: 0 6px 20px -8px rgba(13, 148, 136, 0.55);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--ap-gradient-brand);
    filter: brightness(1.05);
    color: #fff;
    box-shadow: 0 10px 24px -10px rgba(99, 102, 241, 0.55);
}

.btn-outline-primary {
    border: 1.5px solid var(--ap-brand-500);
    color: var(--ap-brand-600);
    background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--ap-brand-500);
    color: #fff;
    border-color: var(--ap-brand-500);
}

/* Modern secondary button used on marketing surfaces */
.ap-btn-ghost {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: var(--ap-radius-sm);
    border: 1px solid var(--ap-ink-100);
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    color: var(--ap-ink-900);
    font-weight: 600;
    text-decoration: none;
    transition: all 160ms var(--ap-ease);
}
.ap-btn-ghost:hover {
    background: #fff;
    border-color: var(--ap-brand-500);
    color: var(--ap-brand-600);
    transform: translateY(-1px);
    box-shadow: var(--ap-shadow-md);
}

/* ---- Form controls -- subtle modernization ------------------------------- */
.form-control, .form-select {
    border-radius: var(--ap-radius-sm);
    border: 1px solid var(--ap-ink-100);
    padding: 0.55rem 0.8rem;
    background: #fff;
    transition: border-color 140ms var(--ap-ease), box-shadow 140ms var(--ap-ease);
}

.form-label {
    color: var(--ap-ink-700);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---- Cards -- a single elevated card style we can reuse ------------------ */
.ap-card {
    background: var(--ap-surface);
    border: 1px solid var(--ap-ink-100);
    border-radius: var(--ap-radius-lg);
    box-shadow: var(--ap-shadow-md);
    padding: 1.5rem 1.75rem;
}

.ap-card--padded { padding: 2rem 2.25rem; }

.ap-card--glass {
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.6);
}

/* ---- Navbar -- elevated, glassy, with logo image ------------------------- */
.db-navbar {
    background: rgba(11, 16, 32, 0.92) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(45, 212, 191, 0.25) !important;
    box-shadow: 0 10px 30px -18px rgba(0,0,0,0.55);
    padding-top: 0.55rem !important;
    padding-bottom: 0.55rem !important;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.db-navbar .db-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.db-brand-logo {
    height: 34px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(45, 212, 191, 0.35));
}

.db-brand .db-logo {
    background: linear-gradient(90deg, #2dd4bf 0%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 800;
    letter-spacing: 0.01em;
    font-size: 1.15rem;
}

.db-brand .db-tag {
    color: var(--ap-ink-300);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
}

.db-navbar .nav-link {
    color: rgba(226, 232, 240, 0.85) !important;
    border-radius: 999px !important;
    padding: 0.4rem 0.9rem !important;
    transition: background-color 160ms var(--ap-ease), color 160ms var(--ap-ease);
}

/* Only apply the dark-text hover to top-level nav links.
 * Dropdown items (.dropdown-item) are also rendered as .nav-link by Blazor
 * NavLink; without :not(.dropdown-item) this rule sets color:#0b1020
 * (near-black) on items inside the dark #0b1020 panel -- making them
 * invisible. The scoped MainLayout.razor.css already has this guard; we
 * mirror it here so the !important in theme.css never beats it. */
.db-navbar .nav-link:not(.dropdown-item):hover,
.db-navbar .nav-link:not(.dropdown-item):focus {
    background-color: rgba(13, 148, 136, 0.10) !important;
    color: #0b1020 !important;
    font-weight: 700 !important;
}

.db-navbar .nav-link.active {
    background: linear-gradient(135deg, rgba(45,212,191,0.22), rgba(99,102,241,0.22)) !important;
    color: #0f766e !important;
}

/* ----------------------------------------------------------------------
 * Dark dropdown panel (Manage / Account submenus)
 *
 * The scoped MainLayout.razor.css also styles .db-dropdown, but because
 * Razor CSS isolation rewrites selectors with a [b-xxx] attribute, the
 * NavLink-rendered <a class="dropdown-item"> tags can lose the scope and
 * fall back to Bootstrap defaults -- which on the dark panel renders
 * hovered text in dark ink, blending into the background.
 *
 * These global rules guarantee that every state (link/visited/hover/focus/
 * focus-visible/active) on a .db-dropdown item is white on a clearly
 * visible teal highlight, regardless of scope or Bootstrap variable bleed.
 * --------------------------------------------------------------------- */
.db-dropdown {
    --bs-dropdown-bg: #0b1020;
    --bs-dropdown-border-color: #1e3a3a;
    --bs-dropdown-link-color: #e2e8f0;
    --bs-dropdown-link-hover-color: #ffffff;
    --bs-dropdown-link-hover-bg: #1e293b;
    --bs-dropdown-link-active-color: #ffffff;
    --bs-dropdown-link-active-bg: #1e293b;
    background-color: #0b1020 !important;
    border: 1px solid #1e3a3a !important;
    border-radius: 0.5rem;
    min-width: 13rem;
    padding: 0.35rem 0;
}

.db-dropdown .dropdown-item,
.db-dropdown a.dropdown-item,
.db-dropdown a.dropdown-item:link,
.db-dropdown a.dropdown-item:visited,
.db-dropdown button.dropdown-item {
    color: #e2e8f0 !important;
    background-color: transparent !important;
    text-decoration: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.db-dropdown .dropdown-item:hover,
.db-dropdown .dropdown-item:focus,
.db-dropdown .dropdown-item:focus-visible,
.db-dropdown a.dropdown-item:hover,
.db-dropdown a.dropdown-item:focus,
.db-dropdown a.dropdown-item:focus-visible,
.db-dropdown button.dropdown-item:hover,
.db-dropdown button.dropdown-item:focus,
.db-dropdown button.dropdown-item:focus-visible {
    background-color: #1e293b !important;
    color: #ffffff !important;
    outline: none !important;
}

.db-dropdown .dropdown-item.active,
.db-dropdown a.dropdown-item.active,
.db-dropdown .dropdown-item.active:hover,
.db-dropdown .dropdown-item.active:focus {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

.db-dropdown .dropdown-divider {
    border-color: #1e3a3a !important;
}

/* ---- Main + footer chrome ------------------------------------------------ */
.db-main {
    background: var(--ap-bg) !important;
    color: var(--ap-ink-900) !important;
    font-family: inherit !important;
    max-width: 1400px !important;
    width: 100%;
    margin: 0 auto;
    padding: 2.25rem 1.75rem !important;
    flex: 1 1 auto;
}

.db-footer {
    background: var(--ap-ink-900) !important;
    color: var(--ap-ink-300) !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    text-align: center;
    padding: 1.1rem 1rem !important;
    font-size: 0.82rem;
}

.db-footer a { color: var(--ap-brand-400); text-decoration: none; }
.db-footer a:hover { color: #fff; }

/* =============================================================================
   Marketing home (Home.razor) -- animated hero + feature grid
   ============================================================================= */
.ap-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--ap-radius-xl);
    padding: 4rem 2rem 3.5rem;
    text-align: center;
    /* Light, airy gradient so the dark-blue ArrivalPoint logo stays readable. */
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 35%, #e0e7ff 70%, #fdf2f8 100%);
    color: var(--ap-ink-800);
    box-shadow: var(--ap-shadow-lg);
    border: 1px solid rgba(56, 189, 248, 0.18);
    margin-bottom: 3rem;
}

.ap-hero::before,
.ap-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    pointer-events: none;
}
.ap-hero::before {
    width: 420px; height: 420px;
    top: -160px; left: -120px;
    background: radial-gradient(circle at 30% 30%, #2dd4bf, transparent 70%);
    animation: ap-blob 14s ease-in-out infinite alternate;
}
.ap-hero::after {
    width: 480px; height: 480px;
    bottom: -180px; right: -140px;
    background: radial-gradient(circle at 70% 70%, #6366f1, transparent 70%);
    animation: ap-blob 18s ease-in-out infinite alternate-reverse;
}

@keyframes ap-blob {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(30px,40px) scale(1.15); }
}

.ap-hero-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }

.ap-hero-logo {
    height: 92px;
    width: auto;
    margin: 0 auto 1.5rem;
    display: block;
    filter: drop-shadow(0 10px 24px rgba(15, 23, 42, 0.18));
    animation: ap-float 6s ease-in-out infinite;
}
@keyframes ap-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* Eyebrow badge above the hero headline.
 * Uses the darker teal (--ap-brand-600 = #0f766e) so the text is legible
 * against the light gradient hero background. The original rule had two
 * conflicting color declarations; the second one (brand-400 = #2dd4bf, light
 * mint) was winning and making the text near-invisible. */
.ap-hero-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #0f766e;
    background: rgba(13, 148, 136, 0.10);
    border: 1px solid rgba(13, 148, 136, 0.40);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.ap-hero h1 {
    color: #0b1020;
    font-size: clamp(2rem, 4.4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1.25rem;
    letter-spacing: -0.025em;
}

.ap-hero .ap-hero-gradient {
    /* Start from a darker teal (#0d9488) instead of the near-white #2dd4bf
     * so the first characters ('N', 'o') are visible on the light hero bg. */
    background: linear-gradient(90deg, #0d9488 0%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.ap-hero p.lead {
    font-size: 1.1rem;
    color: #334155;
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.ap-hero .cta {
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.ap-hero .cta .btn-primary,
.ap-hero .cta .ap-btn-ghost {
    padding: 0.85rem 1.6rem;
    font-size: 0.95rem;
    border-radius: 999px;
}

.ap-hero .ap-btn-ghost {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.18);
    color: #0b1020;
}
.ap-hero .ap-btn-ghost:hover {
    background: #ffffff;
    color: #0f766e;
    border-color: rgba(13, 148, 136, 0.45);
}

.ap-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(13, 148, 136, 0.12);
    border: 1px solid rgba(13, 148, 136, 0.35);
    color: #0f766e;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

.ap-hero-note {
    max-width: 640px;
    margin: 0.5rem auto 0;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.55;
}

/* ---- Feature grid -------------------------------------------------------- */
.ap-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 0 auto 3rem;
    max-width: 1200px;
}

.ap-feature {
    position: relative;
    background: #fff;
    border: 1px solid var(--ap-ink-100);
    border-radius: var(--ap-radius-lg);
    padding: 1.6rem 1.4rem;
    box-shadow: var(--ap-shadow-sm);
    transition: transform 220ms var(--ap-ease), box-shadow 220ms var(--ap-ease),
                border-color 220ms var(--ap-ease);
    overflow: hidden;
}
.ap-feature::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--ap-gradient-brand);
    opacity: 0;
    transition: opacity 220ms var(--ap-ease);
}
.ap-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow-lg);
    border-color: rgba(13, 148, 136, 0.3);
}
.ap-feature:hover::before { opacity: 1; }

.ap-feature-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--ap-gradient-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    box-shadow: 0 6px 18px -6px rgba(13, 148, 136, 0.55);
}

.ap-feature h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: var(--ap-ink-900);
}
.ap-feature p {
    margin: 0;
    color: var(--ap-ink-500);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* =============================================================================
   Auth shell -- richer split-style layout with logo + gradient ink panel
   ============================================================================= */
.auth-shell {
    background: var(--ap-gradient-soft) !important;
    min-height: 100vh !important;
    padding: 2rem 1rem !important;
}

.auth-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(45,212,191,0.18), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(99,102,241,0.18), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.auth-card {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.7) !important;
    border-radius: var(--ap-radius-lg) !important;
    box-shadow: var(--ap-shadow-lg) !important;
    padding: 2.25rem 2.25rem !important;
    max-width: 440px !important;
    width: 100%;
}

.auth-logo-row {
    margin-bottom: 1.5rem !important;
    text-align: center;
}

.auth-logo-row img.auth-logo {
    height: 56px;
    width: auto;
    display: block;
    margin: 0 auto 0.75rem;
    filter: drop-shadow(0 4px 14px rgba(13, 148, 136, 0.35));
}

.auth-brand {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    background: var(--ap-gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent !important;
    letter-spacing: -0.01em !important;
}

.auth-title {
    font-size: 1.45rem !important;
    text-align: center;
    margin-bottom: 0.35rem !important;
    color: #0b1020 !important;
}

.auth-sub {
    text-align: center;
    margin-bottom: 1.5rem !important;
    color: #475569;
}

.auth-footer a {
    color: var(--ap-brand-600);
    font-weight: 600;
    text-decoration: none;
}
.auth-footer a:hover { color: var(--ap-brand-500); text-decoration: underline; }

/* =============================================================================
   Signup page -- compact card replacing the old bare form
   ============================================================================= */
.ap-signup-shell {
    background: var(--ap-gradient-soft);
    min-height: calc(100vh - 130px);
    margin: -2.25rem -1.75rem;
    padding: 3rem 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.ap-signup-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--ap-ink-100);
    border-radius: var(--ap-radius-lg);
    box-shadow: var(--ap-shadow-lg);
    padding: 2.25rem 2.25rem;
    max-width: 460px;
    width: 100%;
}

.ap-signup-logo {
    height: 52px;
    width: auto;
    display: block;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 4px 14px rgba(13, 148, 136, 0.35));
}

.ap-signup-card h1 {
    font-size: 1.5rem;
    text-align: center;
    margin: 0 0 0.35rem;
    background: var(--ap-gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.ap-signup-card .ap-signup-sub {
    text-align: center;
    color: var(--ap-ink-400);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.ap-signup-card .row {
    margin: 0 0 1rem;
}

.ap-signup-card label {
    display: block;
    color: var(--ap-ink-700);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.ap-signup-card label > input,
.ap-signup-card label > select {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--ap-ink-100);
    border-radius: var(--ap-radius-sm);
    background: #fff;
    font-size: 0.95rem;
    color: var(--ap-ink-900);
    transition: border-color 140ms var(--ap-ease), box-shadow 140ms var(--ap-ease);
}
.ap-signup-card label > input:focus,
.ap-signup-card label > select:focus {
    outline: none;
    border-color: var(--ap-brand-500);
    box-shadow: var(--ap-shadow-glow);
}

.ap-signup-card .btn-primary {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.98rem;
    border-radius: var(--ap-radius-sm);
}

.ap-signup-card .error {
    color: var(--ap-danger);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--ap-radius-sm);
    padding: 0.5rem 0.75rem;
    margin-top: 1rem;
    font-size: 0.88rem;
}

.ap-signup-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--ap-ink-400);
    margin-top: 1.25rem;
}
.ap-signup-footer a {
    color: var(--ap-brand-600);
    font-weight: 600;
    text-decoration: none;
}
.ap-signup-footer a:hover { text-decoration: underline; }

/* =============================================================================
   Responsive tweaks
   ============================================================================= */
@media (max-width: 720px) {
    .ap-hero { padding: 3rem 1.25rem 2.5rem; }
    .ap-hero-logo { height: 72px; }
    .db-main { padding: 1.5rem 1rem !important; }
    .ap-signup-shell { margin: -1.5rem -1rem; padding: 2rem 1rem; }
}

/* Subtle entrance for primary surfaces -- runs once on mount */
.ap-fade-in {
    animation: ap-fade-in 480ms var(--ap-ease) both;
}
@keyframes ap-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   Admin / settings tabs -- modern pill style
   Apply: <ul class="nav nav-tabs ap-tabs"> ... </ul>
   ============================================================================= */
.ap-tabs {
    border-bottom: 1px solid var(--ap-ink-100);
    gap: 0.25rem;
    padding-bottom: 0.25rem;
    margin-bottom: 1.5rem !important;
}
.ap-tabs .nav-item { margin-bottom: -1px; }
.ap-tabs .nav-link {
    position: relative;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--ap-ink-500);
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    background: transparent;
    transition: color 160ms var(--ap-ease),
                background-color 160ms var(--ap-ease),
                box-shadow 160ms var(--ap-ease),
                transform 160ms var(--ap-ease);
}
.ap-tabs .nav-link:hover {
    color: var(--ap-brand-600);
    background: rgba(13, 148, 136, 0.08);
    border-color: rgba(13, 148, 136, 0.18);
}
.ap-tabs .nav-link:focus-visible {
    outline: none;
    box-shadow: var(--ap-shadow-glow);
}
.ap-tabs .nav-link.active {
    color: #fff;
    background: var(--ap-gradient-brand);
    border-color: transparent;
    box-shadow: 0 6px 16px -6px rgba(13, 148, 136, 0.55);
}
.ap-tabs .nav-link.active:hover {
    color: #fff;
    background: var(--ap-gradient-brand);
    border-color: transparent;
}

/* Optional badge inside a tab (e.g. count). */
.ap-tabs .nav-link .ap-tab-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0 0.45rem;
    font-size: 0.7rem;
    line-height: 1.4;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
}
.ap-tabs .nav-link.active .ap-tab-badge {
    background: rgba(255, 255, 255, 0.22);
}


/* =============================================================================
   Round-2 safety overrides -- contrast + light surfaces
   ============================================================================= */

/* Force the authenticated header light, regardless of legacy app.css */
nav.db-navbar,
.db-navbar {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0b1020 !important;
}
.db-navbar .navbar-brand,
.db-navbar .nav-link {
    color: #1e293b !important;
}
.db-navbar .nav-link.active {
    color: #0f766e !important;
}

/* Footer always visually distinct from the white cards above it.
   Slight slate tint + stronger top divider + tiny shadow so the eye reads
   the footer as a separate band -- fixes the "card runs into footer" bug. */
.db-footer {
    background: #eef2f7 !important;
    color: #475569 !important;
    border-top: 1px solid #cbd5e1 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    padding: 1.25rem 1rem !important;
    margin-top: auto;
}

/* Ensure hero headline + lead are readable on the new light gradient */
.ap-hero h1 { color: #0b1020 !important; }
.ap-hero p.lead { color: #334155 !important; }
.ap-hero-note { color: #475569 !important; }

/* Pad the admin/settings main area so cards don't kiss the footer.
   3.5rem leaves a clear gap between the last card and the footer band. */
.db-main {
    padding-bottom: 3.5rem !important;
}

/* Cap the brand logo in the navbar so the wordmark doesn't dominate */
.db-brand-logo {
    height: 32px;
    width: auto;
}
