body {
    background-color: rgb(244, 242, 240);
}

.bg-light-gray {
    background-color: #d5d6da;
}

.slide-in-left {
    /* Make sure the element is initially off-screen to the left */
    transform: translateX(-100%);
    opacity: 0;
    animation: slideInFromLeft 0.8s ease-out forwards;
    /* Adjust speed and easing as desired */
}
/* Define the keyframes for sliding in from the left */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.set-up-container {
    max-width: 696px;
}
.set-up-container-lg {
    max-width: 864px;
}
.feature-standout {
    background: linear-gradient(180deg, #f0f5fb 0%, #e4ecf5 100%);
    border: 1px solid #e2edff;
    border-radius: 2em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    max-width: 720px;
    margin: 0 auto;
}

.btn-ai {
    background: linear-gradient(135deg, #12306b 0%, #1e4ba0 50%, #2768e0 100%);
    color: #fff;
    font-weight: 500;
    border: none;
    border-radius: 0.5rem;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.12),
        0 2px 6px rgba(20, 40, 100, 0.35);
}
.btn-ai:hover {
    background: linear-gradient(135deg, #16408a 0%, #2560cc 50%, #2e7aff 100%);
    box-shadow:
        0 3px 8px rgba(30, 60, 150, 0.45),
        inset 0 0 3px rgba(255, 255, 255, 0.2);
    color: #fff; /* ensure readability */
}

.btn-ai:active {
    background: linear-gradient(135deg, #0f2970 0%, #1c4fab 60%, #2560cc 100%);
    box-shadow: 0 2px 4px rgba(20, 40, 90, 0.3);
    color: #fff;
}

.btn-ai:focus-visible {
    outline: 2px solid #2e7aff;
    outline-offset: 2px;
}


/* Drag & drop area styling */
.drop-area {
    transition: all 0.3s ease;
    background-color: #fff;
    border: 2px dashed #6c757d;
    cursor: pointer;
}
.drop-area.dragover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}


.table-scroll {
    min-height: 24rem;
    max-height: 40rem;
    overflow-y: auto;
}

.table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;      /* stay above body cells */
    background: #212529;  /* match .table-dark background */
    color: #fff;          /* match .table-dark text */
}


/* === Section Status Spinner Animation === */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* Status icon colors for section processing indicators */
.section-status-fin { color: #198754; }  /* Bootstrap success green */
.section-status-err { color: #dc3545; }  /* Bootstrap danger red */
.section-status-pro { color: #0d6efd; }  /* Bootstrap primary blue */

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .spin {
        animation: none;
    }
}


/* ===================================================================
   Landing Page — "Dark Stage"
   Monochrome, neutral palette: charcoal, slate, white, black.
   =================================================================== */

.landing-page {
    min-height: 100vh;
    background:
        /* subtle radial spotlight behind content */
        radial-gradient(ellipse 60% 50% at 50% 45%, rgba(255,255,255,0.04) 0%, transparent 70%),
        /* main gradient */
        linear-gradient(160deg, #111 0%, #1a1a1a 40%, #0e0e0e 100%);
    /* override default body bg for this full-bleed section */
    margin-top: -1px;
}

/* Brand name */
.landing-brand {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: #fff;
    background: linear-gradient(180deg, #ffffff 20%, #b0b0b0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: landingFadeUp 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Horizontal accent rule */
.landing-accent {
    width: 0;
    height: 2px;
    margin: 1.5rem auto 1.8rem;
    background: linear-gradient(90deg, transparent, #999, transparent);
    border-radius: 1px;
    animation: landingLineExpand 0.7s 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Tagline */
.landing-tagline {
    font-size: clamp(1.4rem, 2.75vw, 1.6rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.5);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    animation: landingFadeUp 0.7s 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* CTA button */
.landing-cta {
    opacity: 0;
    animation: landingFadeUp 0.7s 1.1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    border-width: 2px;
    padding: 0.7rem 2.5rem;
    letter-spacing: 0.03em;
    transition: background-color 0.25s, color 0.25s, transform 0.2s;
}

.landing-cta:hover {
    background-color: #fff;
    color: #111;
    transform: translateY(-1px);
}

.landing-cta:active {
    transform: translateY(0);
}

/* Keyframes */
@keyframes landingFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes landingLineExpand {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

/* Reduced motion: show everything immediately, no animation */
@media (prefers-reduced-motion: reduce) {
    .landing-brand,
    .landing-tagline,
    .landing-cta {
        opacity: 1;
        animation: none;
        transform: none;
    }
    .landing-accent {
        width: 80px;
        opacity: 1;
        animation: none;
    }
}


/* ===================================================================
   Login page — dark background matching landing page
   =================================================================== */
.login-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 60% 50% at 50% 45%, rgba(255,255,255,0.04) 0%, transparent 70%),
        linear-gradient(160deg, #111 0%, #1a1a1a 40%, #0e0e0e 100%);
    margin-top: -1px;
}

/* Card refinement */
.login-page .card {
    background-color: #faf9f8;
    border: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 2rem 2.2rem;
}

.login-page .card h1 {
    font-weight: 300;
    letter-spacing: 0.04em;
    color: #2a2a2a;
    margin-bottom: 0.6rem;
}

.login-page .login-divider {
    border: none;
    height: 1px;
    background: #a19e9e;
    margin: 0 0 1.8rem;
    opacity: 0.75;
}

.login-page .card .form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.login-page .card .mb-3 {
    margin-bottom: 1.25rem !important;
}

.login-page .card .form-control {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0.4rem;
    padding: 0.6rem 0.8rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-page .card .form-control:focus {
    border-color: #999;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.login-page .card .btn-primary {
    background-color: #222;
    border-color: #222;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.6rem;
    border-radius: 0.4rem;
    transition: background-color 0.2s, transform 0.15s;
}

.login-page .card .btn-primary:hover {
    background-color: #333;
    border-color: #333;
    transform: translateY(-1px);
}

.login-page .card .btn-primary:active {
    transform: translateY(0);
}

/* ---------------------------------------------------------------
   Press-down phase choice (used on deal_create form)
   Native <input type="radio"> visually hidden; the adjacent
   <label class="phase-card"> becomes the big pressable button.
   Uses a softer charcoal (--phase-card-pressed) to distinguish from
   the harder bs-dark used for page headers and primary buttons.
   --------------------------------------------------------------- */
.phase-choice {
    --phase-card-pressed: #465568;
    --phase-card-muted-pressed: #899bb1;
}

.phase-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.phase-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    padding: 1.5rem 1rem;
    border: 2px solid var(--bs-border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.12s ease-in-out;
}

.phase-card i {
    font-size: 2rem;
}

.phase-card:hover {
    border-color: var(--phase-card-pressed);
}

.phase-choice input[type="radio"]:checked + .phase-card {
    border-color: var(--phase-card-pressed);
    background-color: var(--phase-card-pressed);
    color: #fff;
    transform: translateY(2px);
    box-shadow: inset 0 0.25rem 0.5rem rgba(0, 0, 0, 0.25);
}

.phase-choice input[type="radio"]:checked + .phase-card small {
    color: rgba(255, 255, 255, 0.8) !important;
}

.phase-choice input[type="radio"]:focus-visible + .phase-card {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Secondary / "unknown" variant — a slim horizontal card used beneath the
   primary two-option row to allow an explicit blank/unknown choice. */
.phase-card-muted {
    flex-direction: row;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-style: dashed;
    color: var(--phase-card-muted-pressed);
    font-size: 0.95rem;
}
.phase-card-muted i {
    font-size: 1.1rem;
}

/* Override the default dark press-down state for the muted variant: when
   "Unknown" is checked, keep it grey rather than black-filled. */
.phase-choice input[type="radio"]:checked + .phase-card-muted {
    border-color: var(--bs-secondary);
    background-color: var(--bs-secondary);
    color: #fff;
}
.phase-card-muted i {
    font-size: 1.1rem;
}

/* =========================================================
   Deal-list page (PHASE_PLAN Step 6)
   Typographic, de-chromed, lines-not-boxes design language —
   matches the workflow nav reference.
   ========================================================= */

/* Search input with leading icon, no input-group container. */
.deal-list-search {
    position: relative;
}
/* Leading magnifying glass — a real <button type="submit"> so clicking
   the icon submits the form. Visually identical to the previous decorative
   <i>, but discoverable + keyboard-accessible. */
.deal-list-search > .deal-list-search-icon {
    position: absolute;
    top: 50%;
    left: 0.5rem;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    padding: 0.25rem 0.5rem;
    color: var(--bs-secondary);
    line-height: 1;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.deal-list-search > .deal-list-search-icon:hover,
.deal-list-search > .deal-list-search-icon:focus-visible {
    color: var(--bs-dark);
    background-color: rgba(0, 0, 0, 0.04);
}

.deal-list-search > input {
    padding-left: 2.25rem;
    padding-right: 2.25rem;
    background-color: #fff;
}
.deal-list-search > input:focus {
    border-color: var(--bs-dark);
    box-shadow: 0 0 0 0.15rem rgba(33, 37, 41, 0.1);
}
/* Hide the browser's native X clear button — we render our own that
   stays visible whenever the field has content (vs. only on focus/hover). */
.deal-list-search > input::-webkit-search-cancel-button,
.deal-list-search > input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}
/* Custom X clear button: hidden when the input is empty (placeholder
   visible), shown the moment the user types anything. CSS-only — the
   <button> always exists in the DOM; we just toggle its display. */
.deal-list-search > .deal-list-search-clear {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    padding: 0.25rem 0.5rem;
    color: var(--bs-secondary);
    line-height: 1;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.deal-list-search > .deal-list-search-clear:hover,
.deal-list-search > .deal-list-search-clear:focus-visible {
    color: var(--bs-dark);
    background-color: rgba(0, 0, 0, 0.04);
}
.deal-list-search > input:placeholder-shown ~ .deal-list-search-clear {
    display: none;
}


/* Sort select: bare, with leading icon. */
.deal-list-sort {
    position: relative;
}
.deal-list-sort > .bi {
    position: absolute;
    top: 50%;
    left: 0.625rem;
    transform: translateY(-50%);
    color: var(--bs-secondary);
    pointer-events: none;
    font-size: 0.875rem;
}
.deal-list-sort > select {
    padding-left: 2rem;
    background-color: #fff;
}

/* Scope toggle: text-style, mirrors workflow-nav pattern.
   Two adjacent submit-buttons rendered as plain text — the active one
   gets the same underline-on-active treatment as the workflow nav. */
.deal-list-scope {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}
.deal-list-scope > .scope-label {
    color: var(--bs-secondary);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.deal-list-scope button {
    background: transparent;
    border: 0;
    padding: 0.25rem 0;
    color: var(--bs-secondary);
    line-height: 1.25;
    transition: color 0.15s ease, box-shadow 0.15s ease;
}
.deal-list-scope button:hover,
.deal-list-scope button:focus-visible {
    color: var(--bs-dark);
}
.deal-list-scope button.active {
    color: var(--bs-dark);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 0 var(--bs-dark);
}
.deal-list-scope .scope-divider {
    color: var(--bs-secondary);
    opacity: 0.35;
    font-size: 0.75rem;
}

/* Panel heading: small uppercase typographic label, no box. */
.deal-list-panel-heading {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bs-secondary);
    margin: 0;
}
.deal-list-panel-count {
    font-size: 0.8125rem;
    color: var(--bs-secondary);
    opacity: 0.7;
}

/* Subtle hover lift on deal cards — keep the only "boxes" on the page
   feeling alive without adding visual weight. */
.deal-card {
    border: 1px solid rgba(0, 0, 0, 0.075);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.deal-card:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}


