/**
 * Enrichment Modal Design System — Three-Act Architecture
 * Jazz-lounge, cream-and-emerald, RiQ-curated.
 *
 * Act 1: The Entrance — two-beat reveal, warm forest header, glowing icon
 * Act 2: The Body — recessed cream panel, breathing pills, ivory rows
 * Act 3: The Resolution — warm cream-emerald toast, personal language
 */

/* ============================================
   ACT 1: BACKDROP — Dims first, card follows
   ============================================ */
#promptModal.enrichment-active {
    background: rgba(12, 20, 18, 0.55) !important;
    backdrop-filter: blur(14px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.2) !important;
    animation: enrichBackdropIn 0.35s ease-out forwards !important;
}

@keyframes enrichBackdropIn {
    from { background: rgba(12, 20, 18, 0); backdrop-filter: blur(0); }
    to   { background: rgba(12, 20, 18, 0.55); backdrop-filter: blur(14px); }
}

/* ============================================
   ACT 1: MODAL CARD — Floats up after backdrop
   ============================================ */
#promptModal.enrichment-active .prompt-modal-content {
    max-width: 700px !important;
    border: none !important;
    border-radius: 28px !important;
    box-shadow:
        0 0 0 1px rgba(74, 144, 128, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 24px 80px rgba(12, 20, 18, 0.22) !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0;
    animation: enrichCardFloat 0.55s 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes enrichCardFloat {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(40px);
        filter: blur(6px);
    }
    50% {
        opacity: 1;
        filter: blur(0);
    }
    75% {
        transform: scale(1.008) translateY(-3px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* ============================================
   ACT 1: DARK HEADER — Forest emerald warmth
   ============================================ */
.enrich-modal-header {
    background: linear-gradient(140deg, #0c1f1a 0%, #132e25 40%, #1a3d32 70%, #0f2922 100%);
    padding: 1.75rem 2rem 1.375rem;
    position: relative;
    overflow: hidden;
    color: #F1F5F9;
}

/* Warm emerald glow — top right */
.enrich-modal-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 45%;
    height: 200%;
    background: radial-gradient(ellipse at 60% 40%, rgba(74, 144, 128, 0.22) 0%, rgba(110, 218, 194, 0.06) 40%, transparent 70%);
    pointer-events: none;
}

/* Subtle bottom glow */
.enrich-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(110, 218, 194, 0.2), transparent);
    pointer-events: none;
}

.enrich-header {
    position: relative;
    z-index: 1;
    margin: 0;
}

#promptModal.enrichment-active .enrich-title,
#promptModal .enrich-modal-header .enrich-title {
    font-family: var(--ed-font-serif, 'Fraunces', Georgia, serif) !important;
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    color: #EDF5F0 !important;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

/* Glowing icon lamp */
.enrich-title .enrich-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: rgba(74, 144, 128, 0.2);
    border: 1px solid rgba(110, 218, 194, 0.25);
    color: #6EDAC2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(74, 144, 128, 0.15), 0 0 4px rgba(110, 218, 194, 0.1) inset;
    animation: enrichIconGlow 3s ease-in-out infinite;
}

@keyframes enrichIconGlow {
    0%, 100% { box-shadow: 0 0 16px rgba(74, 144, 128, 0.12), 0 0 4px rgba(110, 218, 194, 0.08) inset; }
    50%      { box-shadow: 0 0 28px rgba(74, 144, 128, 0.25), 0 0 8px rgba(110, 218, 194, 0.15) inset; }
}

.enrich-title .enrich-icon svg {
    width: 18px;
    height: 18px;
}

#promptModal.enrichment-active .enrich-instructions,
#promptModal .enrich-modal-header .enrich-instructions {
    font-family: var(--ed-font-sans, 'DM Sans', sans-serif) !important;
    font-size: 0.875rem !important;
    color: rgba(190, 210, 200, 0.75) !important;
    line-height: 1.65;
    margin: 0 0 0 0;
    max-width: 540px;
}

/* ============================================
   MODAL STRUCTURE OVERRIDES
   ============================================ */
#promptModal.enrichment-active .modal-header {
    background: transparent; padding: 0; border: none; position: relative;
}
#promptModal.enrichment-active .modal-header h3 {
    margin: 0; padding: 0; font-size: inherit; line-height: inherit; height: auto; overflow: visible;
}

/* Close button — soft glass circle */
#promptModal.enrichment-active .modal-close {
    position: absolute;
    top: 1.125rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(190, 210, 200, 0.6);
    font-size: 1.125rem;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    backdrop-filter: blur(4px);
}
#promptModal.enrichment-active .modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #EDF5F0;
    border-color: rgba(255, 255, 255, 0.12);
}

/* Body — cream interior */
#promptModal.enrichment-active .modal-body {
    padding: 1.375rem 2rem 0.75rem;
    background: linear-gradient(180deg, #FAF8F5 0%, #F7F4F0 100%);
}

#promptModal.enrichment-active .modal-body > p {
    display: none;
}

/* Footer — buttons */
#promptModal.enrichment-active .prompt-modal-buttons {
    padding: 0.75rem 2rem 1.75rem;
    margin-top: 0.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: linear-gradient(180deg, #F7F4F0 0%, #FAF8F5 100%);
}

/* ============================================
   ACT 2: SUMMARY BAR — Warm, breathable
   ============================================ */
.enrich-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1.125rem;
    background: linear-gradient(135deg, #E8F0EC 0%, #EFF5F1 50%, #F0EDE8 100%);
    border: 1px solid rgba(74, 144, 128, 0.1);
    border-radius: 16px;
    margin-bottom: 1rem;
    font-family: var(--ed-font-sans, 'DM Sans', sans-serif);
    font-size: 0.82rem;
    color: var(--ink-light, #3d3d3d);
    flex-wrap: wrap;
}

.enrich-summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.78rem;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    letter-spacing: 0.01em;
}

.enrich-summary-badge .dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

.dot--green { background: #059669; }
.dot--amber { background: #d97706; }
.dot--red   { background: #dc2626; }
.dot--blue  { background: #2563EB; }
.dot--muted { background: #9CA3AF; }

/* ============================================
   ACT 2: DATA CONTAINER — Recessed panel
   ============================================ */
.enrich-data {
    background: linear-gradient(180deg, #F5F2ED 0%, #FAF8F5 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 1.125rem;
    max-height: 44vh;
    overflow-y: auto;
    position: relative;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03), inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.enrich-data::-webkit-scrollbar { width: 5px; }
.enrich-data::-webkit-scrollbar-track { background: transparent; }
.enrich-data::-webkit-scrollbar-thumb { background: rgba(74,144,128,0.35); border-radius: 3px; }
.enrich-data::-webkit-scrollbar-thumb:hover { background: rgba(74,144,128,0.55); }
.enrich-data { scrollbar-width: thin; scrollbar-color: rgba(74,144,128,0.35) transparent; }

.enrich-scroll-fade { position: relative; }
.enrich-scroll-fade::after {
    content: '';
    position: sticky;
    bottom: 0; left: 0; right: 0;
    height: 36px;
    background: linear-gradient(to top, #FAF8F5, transparent);
    pointer-events: none;
    display: block;
}

/* ============================================
   ACT 2: PILL SYSTEM — Warm emerald, breathing
   ============================================ */
.enrich-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px 2px;
}

.enrich-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--ed-font-sans, 'DM Sans', sans-serif);
    font-size: 0.84rem;
    color: #3D3D3D;
    font-weight: 500;
    user-select: none;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.enrich-pill:hover {
    border-color: rgba(74, 144, 128, 0.4);
    background: #E8F0EC;
    color: #1a3d32;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 128, 0.1);
}

.enrich-pill.selected {
    background: linear-gradient(135deg, #3a7265 0%, #4a9080 100%);
    color: white;
    border-color: #2d5c4f;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(58, 114, 101, 0.35);
}

.enrich-pill.selected:hover {
    background: linear-gradient(135deg, #2d5c4f 0%, #3a7265 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(58, 114, 101, 0.4);
}

.enrich-pill.selected .enrich-pill-check { display: inline-flex; }
.enrich-pill-check { display: none; width: 14px; height: 14px; align-items: center; justify-content: center; }
.enrich-pill-check svg { width: 12px; height: 12px; stroke: white; stroke-width: 2.5; fill: none; }
.enrich-pill .enrich-pill-code { font-family: var(--ed-font-mono, 'JetBrains Mono', monospace); font-size: 0.73rem; opacity: 0.55; }

.enrich-pill .confidence-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.enrich-pill .confidence-text { font-size: 0.72rem; font-family: var(--ed-font-mono, monospace); opacity: 0.65; }
.enrich-pill.selected .confidence-dot,
.enrich-pill.selected .confidence-text { opacity: 0.75; }

/* Staggered pill cascade */
.enrich-pills .enrich-pill {
    opacity: 0;
    animation: enrichPillCascade 0.35s ease forwards;
}
@keyframes enrichPillCascade {
    from { opacity: 0; transform: translateY(8px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.enrich-pills .enrich-pill:nth-child(1)  { animation-delay: 0.08s; }
.enrich-pills .enrich-pill:nth-child(2)  { animation-delay: 0.12s; }
.enrich-pills .enrich-pill:nth-child(3)  { animation-delay: 0.16s; }
.enrich-pills .enrich-pill:nth-child(4)  { animation-delay: 0.20s; }
.enrich-pills .enrich-pill:nth-child(5)  { animation-delay: 0.24s; }
.enrich-pills .enrich-pill:nth-child(6)  { animation-delay: 0.28s; }
.enrich-pills .enrich-pill:nth-child(7)  { animation-delay: 0.30s; }
.enrich-pills .enrich-pill:nth-child(8)  { animation-delay: 0.32s; }
.enrich-pills .enrich-pill:nth-child(9)  { animation-delay: 0.34s; }
.enrich-pills .enrich-pill:nth-child(10) { animation-delay: 0.36s; }
.enrich-pills .enrich-pill:nth-child(n+11) { animation-delay: 0.38s; }

/* ============================================
   ACT 2: ROW SYSTEM — Ivory breathing
   ============================================ */
.enrich-rows { display: flex; flex-direction: column; gap: 3px; }

.enrich-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 14px;
    transition: all 0.2s ease;
    min-height: 42px;
}

.enrich-row:nth-child(odd) { background: rgba(255, 255, 255, 0.65); }
.enrich-row:nth-child(even) { background: rgba(247, 244, 240, 0.5); }
.enrich-row:hover { background: #E8F0EC; }

.enrich-row[data-class="current"]     { border-left: 3px solid #059669; }
.enrich-row[data-class="non-current"] { border-left: 3px solid #2563EB; }
.enrich-row[data-class="fixed"]       { border-left: 3px solid #059669; }
.enrich-row[data-class="variable"]    { border-left: 3px solid #dc2626; }
.enrich-row[data-class="semi"]        { border-left: 3px solid #d97706; }

.enrich-row-info { flex: 1; min-width: 0; }
.enrich-row-name { font-weight: 600; font-size: 0.875rem; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enrich-row-meta { font-size: 0.75rem; color: #6b6b6b; display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.enrich-row-meta .mono { font-family: var(--ed-font-mono, monospace); }
.enrich-row-control { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Row entrance */
.enrich-rows .enrich-row { opacity: 0; animation: enrichRowSlide 0.3s ease forwards; }
@keyframes enrichRowSlide {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}
.enrich-rows .enrich-row:nth-child(1) { animation-delay: 0.1s; }
.enrich-rows .enrich-row:nth-child(2) { animation-delay: 0.14s; }
.enrich-rows .enrich-row:nth-child(3) { animation-delay: 0.18s; }
.enrich-rows .enrich-row:nth-child(4) { animation-delay: 0.22s; }
.enrich-rows .enrich-row:nth-child(5) { animation-delay: 0.26s; }
.enrich-rows .enrich-row:nth-child(6) { animation-delay: 0.30s; }
.enrich-rows .enrich-row:nth-child(7) { animation-delay: 0.32s; }
.enrich-rows .enrich-pill:nth-child(8) { animation-delay: 0.34s; }
.enrich-rows .enrich-row:nth-child(n+9) { animation-delay: 0.36s; }

/* ============================================
   CONFIDENCE BADGE
   ============================================ */
.enrich-confidence { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-family: var(--ed-font-mono, monospace); white-space: nowrap; }
.enrich-confidence .conf-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.enrich-confidence.high .conf-dot  { background: #059669; }
.enrich-confidence.medium .conf-dot { background: #d97706; }
.enrich-confidence.low .conf-dot   { background: #dc2626; }
.enrich-confidence.high  { color: #059669; }
.enrich-confidence.medium { color: #d97706; }
.enrich-confidence.low   { color: #dc2626; }

/* ============================================
   FORM INPUTS — Warm, rounded
   ============================================ */
.enrich-input {
    font-family: var(--ed-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.875rem;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    text-align: right;
    transition: all 0.25s ease;
    width: 80px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.enrich-input:focus {
    outline: none;
    border-color: #4a9080;
    box-shadow: 0 0 0 3px rgba(74, 144, 128, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.02);
    background: white;
}
.enrich-input.wide { width: 100%; text-align: left; }
.enrich-input-suffix { font-size: 0.82rem; color: #6b6b6b; margin-left: 4px; }

.enrich-form-group { margin-bottom: 10px; }
.enrich-form-group label { display: block; font-family: var(--ed-font-sans); font-weight: 600; font-size: 0.85rem; color: #1a1a1a; margin-bottom: 5px; }
.enrich-form-group .enrich-helper { font-size: 0.78rem; color: #6b6b6b; margin-top: 3px; }
.enrich-form-group .enrich-ref { font-size: 0.78rem; color: #999; font-family: var(--ed-font-mono, monospace); margin-top: 2px; }
.enrich-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ============================================
   DROPDOWN — Warm, rounded
   ============================================ */
.enrich-select {
    font-family: var(--ed-font-sans, 'DM Sans', sans-serif);
    font-size: 0.84rem;
    padding: 8px 30px 8px 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 140px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.enrich-select:focus { outline: none; border-color: #4a9080; box-shadow: 0 0 0 3px rgba(74, 144, 128, 0.1); background-color: white; }

/* ============================================
   CHECKBOX — Warm
   ============================================ */
.enrich-checkbox {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; user-select: none;
    font-family: var(--ed-font-sans); font-size: 0.85rem; color: #3d3d3d; padding: 4px 0;
}
.enrich-checkbox input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.enrich-checkbox .check-box {
    width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.12);
    border-radius: 6px; background: rgba(255,255,255,0.9);
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.25s ease; flex-shrink: 0;
}
.enrich-checkbox .check-box svg { width: 12px; height: 12px; stroke: white; stroke-width: 3; fill: none; opacity: 0; transform: scale(0.5); transition: all 0.2s ease; }
.enrich-checkbox input:checked + .check-box { background: linear-gradient(135deg, #3a7265, #4a9080); border-color: #2d5c4f; }
.enrich-checkbox input:checked + .check-box svg { opacity: 1; transform: scale(1); }
.enrich-checkbox:hover .check-box { border-color: #4a9080; }

/* ============================================
   CARD MULTI-SELECT
   ============================================ */
.enrich-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.enrich-card {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 14px; background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.06); border-radius: 16px;
    cursor: pointer; transition: all 0.25s ease; user-select: none;
}
.enrich-card:hover { border-color: rgba(74,144,128,0.35); background: #E8F0EC; }
.enrich-card.selected { border-color: #4a9080; border-left: 3px solid #4a9080; background: rgba(74,144,128,0.06); }
.enrich-card .check-box {
    width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.12);
    border-radius: 6px; background: rgba(255,255,255,0.9);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 1px; transition: all 0.25s ease;
}
.enrich-card .check-box svg { width: 12px; height: 12px; stroke: white; stroke-width: 3; fill: none; opacity: 0; transform: scale(0.5); transition: all 0.2s ease; }
.enrich-card.selected .check-box { background: linear-gradient(135deg, #3a7265, #4a9080); border-color: #2d5c4f; }
.enrich-card.selected .check-box svg { opacity: 1; transform: scale(1); }
.enrich-card-info { flex: 1; min-width: 0; }
.enrich-card-name { font-weight: 600; font-size: 0.84rem; color: #1a1a1a; line-height: 1.3; }
.enrich-card-balance { font-size: 0.78rem; font-family: var(--ed-font-mono, monospace); color: #6b6b6b; margin-top: 2px; }

/* ============================================
   TAB SYSTEM
   ============================================ */
.enrich-tabs { display: flex; gap: 0; border-bottom: 2px solid rgba(0,0,0,0.05); margin-bottom: 10px; overflow-x: auto; }
.enrich-tab {
    padding: 7px 16px;
    font-family: var(--ed-font-sans); font-size: 0.85rem; font-weight: 500;
    color: #6b6b6b; background: none; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    cursor: pointer; transition: all 0.25s ease; white-space: nowrap;
    border-radius: 10px 10px 0 0;
}
.enrich-tab:hover { color: #4a9080; background: rgba(74,144,128,0.04); }
.enrich-tab.active { color: #3a7265; border-bottom-color: #4a9080; font-weight: 600; }
.enrich-tab-panel { display: none; }
.enrich-tab-panel.active { display: block; animation: enrichFadeIn 0.3s ease; }
@keyframes enrichFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================
   TABLE STYLE
   ============================================ */
.enrich-table { width: 100%; border-collapse: collapse; font-family: var(--ed-font-sans); font-size: 0.85rem; }
.enrich-table thead th { text-align: left; font-weight: 600; font-size: 0.78rem; color: #6b6b6b; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 2px solid rgba(0,0,0,0.05); }
.enrich-table tbody td { padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,0.03); vertical-align: middle; }
.enrich-table tbody tr:hover { background: #E8F0EC; }
.enrich-table .cell-name { font-weight: 500; }
.enrich-table .cell-mono { font-family: var(--ed-font-mono, monospace); font-size: 0.82rem; color: #6b6b6b; }
.enrich-table input.enrich-input { width: 120px; }

/* ============================================
   SECTION HEADINGS
   ============================================ */
.enrich-section-title {
    font-family: var(--ed-font-serif, 'Fraunces', Georgia, serif);
    font-size: 0.92rem; font-weight: 600; color: #1a1a1a;
    margin: 10px 0 6px 0; padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex; align-items: center; gap: 8px;
}
.enrich-section-title:first-child { margin-top: 0; }
.enrich-section-desc { font-size: 0.82rem; color: #6b6b6b; margin: -4px 0 6px 0; line-height: 1.4; }

/* ============================================
   BUTTONS — Warm emerald, luxe
   ============================================ */
#promptModal.enrichment-active .enrich-btn-confirm,
#promptModal .prompt-modal-buttons .enrich-btn-confirm {
    background: linear-gradient(135deg, #3a7265 0%, #4a9080 100%) !important;
    color: white !important;
    border: none !important;
    padding: 13px 36px !important;
    border-radius: 16px !important;
    font-family: var(--ed-font-sans, 'DM Sans', sans-serif) !important;
    font-size: 0.925rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(58, 114, 101, 0.3), 0 1px 3px rgba(0,0,0,0.06) !important;
    letter-spacing: -0.01em;
}
#promptModal.enrichment-active .enrich-btn-confirm:hover,
#promptModal .prompt-modal-buttons .enrich-btn-confirm:hover {
    background: linear-gradient(135deg, #2d5c4f 0%, #3a7265 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(58, 114, 101, 0.4), 0 2px 4px rgba(0,0,0,0.08) !important;
}
#promptModal.enrichment-active .enrich-btn-confirm:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(58, 114, 101, 0.25) !important;
}

#promptModal.enrichment-active .enrich-btn-skip,
#promptModal .prompt-modal-buttons .enrich-btn-skip {
    background: none !important;
    color: #999 !important;
    border: none !important;
    padding: 13px 24px !important;
    border-radius: 16px !important;
    font-family: var(--ed-font-sans, 'DM Sans', sans-serif) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none !important;
}
#promptModal.enrichment-active .enrich-btn-skip:hover {
    color: #3d3d3d !important;
    background: rgba(0, 0, 0, 0.03) !important;
}

.enrich-btn-skip-all {
    background: none; color: #5b6eae;
    border: 1px solid rgba(91, 110, 174, 0.3);
    padding: 8px 18px; border-radius: 12px;
    font-family: 'DM Sans', sans-serif; font-size: 0.8rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s ease;
    white-space: nowrap; margin-right: auto;
}
.enrich-btn-skip-all:hover { background: #5b6eae; color: white; border-color: #5b6eae; }

.enrich-btn-secondary {
    background: rgba(255,255,255,0.8); color: #3d3d3d;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 8px 18px; border-radius: 12px;
    font-family: var(--ed-font-sans); font-size: 0.82rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s ease;
}
.enrich-btn-secondary:hover { border-color: #4a9080; color: #3a7265; }

/* ============================================
   LIQUID CARD
   ============================================ */
.enrich-liquid-card {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 14px; background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; margin-bottom: 6px;
}
.enrich-liquid-card:hover { border-color: rgba(74,144,128,0.3); }
.enrich-liquid-name { flex: 1; min-width: 0; }
.enrich-liquid-name .name { font-weight: 600; font-size: 0.88rem; color: #1a1a1a; }
.enrich-liquid-name .code-bal { font-size: 0.78rem; color: #6b6b6b; font-family: var(--ed-font-mono, monospace); margin-top: 1px; }
.enrich-liquid-checks { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }

/* ============================================
   BUDGET / EMPLOYEE
   ============================================ */
.enrich-budget-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.enrich-budget-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; }
.enrich-budget-row:nth-child(odd) { background: rgba(255,255,255,0.5); }
.enrich-budget-row .acct-name { flex: 1; font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enrich-budget-row .acct-actual { font-family: var(--ed-font-mono, monospace); font-size: 0.82rem; color: #6b6b6b; min-width: 80px; text-align: right; }
.enrich-budget-row .enrich-input { width: 100px; }
.enrich-budget-row .copy-btn { padding: 4px 10px; font-size: 0.75rem; border: 1px solid rgba(0,0,0,0.08); border-radius: 8px; background: rgba(255,255,255,0.8); cursor: pointer; color: #6b6b6b; transition: all 0.2s; }
.enrich-budget-row .copy-btn:hover { border-color: #4a9080; color: #3a7265; }

.enrich-summary-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.enrich-summary-card { background: rgba(255,255,255,0.8); border: 1px solid rgba(0,0,0,0.05); border-radius: 16px; padding: 12px; text-align: center; }
.enrich-summary-card .label { font-size: 0.78rem; color: #6b6b6b; margin-bottom: 4px; }
.enrich-summary-card .value { font-family: var(--ed-font-mono, monospace); font-size: 1.1rem; font-weight: 600; color: #1a1a1a; }

.enrich-form-section { margin-bottom: 12px; padding: 12px; background: rgba(255,255,255,0.8); border-radius: 16px; border: 1px solid rgba(0,0,0,0.05); }
.enrich-form-section h4 { font-family: var(--ed-font-serif); font-size: 0.92rem; font-weight: 600; color: #3a7265; margin: 0 0 8px 0; display: flex; align-items: center; gap: 8px; }
.enrich-form-section h4 svg { width: 18px; height: 18px; stroke: #4a9080; flex-shrink: 0; }

/* ============================================
   CONFIDENCE GROUPS
   ============================================ */
.enrich-confidence-group { margin-bottom: 0.75rem; }
.enrich-group-label {
    font-family: var(--ed-font-sans); font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; color: #6b6b6b;
    margin-bottom: 0.5rem; padding-left: 2px;
    display: flex; align-items: center; gap: 6px;
}
.enrich-group-label .group-dot { width: 6px; height: 6px; border-radius: 50%; }

/* ============================================
   ACT 3: ENRICHMENT TOAST — Warm cream-emerald
   ============================================ */
.enrich-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(24px);
    opacity: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.75rem;
    background: linear-gradient(135deg, #FAF8F5 0%, #EDF5F0 100%);
    color: #1a1a1a;
    border-radius: 20px;
    border: 1px solid rgba(74, 144, 128, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(74, 144, 128, 0.06);
    font-family: var(--ed-font-sans, 'DM Sans', sans-serif);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    animation: enrichToastIn 0.45s 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards,
               enrichToastOut 0.4s 4.5s ease-in forwards;
    max-width: 90vw;
}

.enrich-toast-icon {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #3a7265, #4a9080);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: white;
    box-shadow: 0 2px 8px rgba(58, 114, 101, 0.3);
}
.enrich-toast-icon svg { width: 15px; height: 15px; }

.enrich-toast-text { display: flex; flex-direction: column; gap: 2px; }
.enrich-toast-title { font-weight: 600; font-size: 0.875rem; color: #1a1a1a; }
.enrich-toast-sub { font-size: 0.75rem; color: #6b6b6b; font-weight: 400; }

@keyframes enrichToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(24px) scale(0.94); }
    60%  { transform: translateX(-50%) translateY(-3px) scale(1.01); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes enrichToastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ============================================
   AI REVIEW LOADING STATE
   ============================================ */
.enrich-ai-loading {
    display: flex; align-items: center; gap: 10px;
    padding: 0.875rem 1.125rem; margin: 0 0 0.875rem 0;
    border: 1px solid rgba(74, 144, 128, 0.15);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(74,144,128,0.05) 0%, rgba(110,218,194,0.04) 100%);
    color: #1a3d32;
    font-size: 0.82rem; font-weight: 600;
    font-family: var(--ed-font-sans, 'DM Sans', sans-serif);
}

.enrich-ai-loading .ai-dots { display: flex; gap: 4px; }
.enrich-ai-loading .ai-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: #4a9080;
    animation: enrichDotPulse 1.4s ease-in-out infinite;
}
.enrich-ai-loading .ai-dot:nth-child(2) { animation-delay: 0.2s; }
.enrich-ai-loading .ai-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes enrichDotPulse {
    0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
    40% { transform: scale(1.1); opacity: 1; }
}

/* ============================================
   PREPARING STATE
   ============================================ */
.enrich-preparing {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 3.5rem 2rem; gap: 1.5rem; min-height: 220px;
}
.enrich-preparing-pulse {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, #3a7265, #4a9080);
    display: flex; align-items: center; justify-content: center;
    color: white;
    animation: enrichPrepPulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(74, 144, 128, 0.3);
}
@keyframes enrichPrepPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 144, 128, 0.35); transform: scale(1); }
    50% { box-shadow: 0 0 0 18px rgba(74, 144, 128, 0); transform: scale(1.04); }
}
.enrich-preparing-text {
    font-family: var(--ed-font-serif, 'Fraunces', Georgia, serif);
    font-size: 1.1rem; font-weight: 500; color: #1a1a1a; letter-spacing: -0.01em;
}
.enrich-preparing-sub {
    font-family: var(--ed-font-sans); font-size: 0.82rem; color: #6b6b6b;
    text-align: center; line-height: 1.5; max-width: 380px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    #promptModal.enrichment-active .prompt-modal-content { max-width: 100% !important; margin: 8px !important; border-radius: 22px !important; }
    .enrich-modal-header { padding: 1.375rem 1.25rem 1.125rem; }
    #promptModal.enrichment-active .modal-body { padding: 1rem 1.25rem 0.5rem; }
    #promptModal.enrichment-active .prompt-modal-buttons { padding: 0.75rem 1.25rem 1.5rem; }
    .enrich-pills { gap: 8px; }
    .enrich-pill { padding: 6px 12px; font-size: 0.82rem; }
    .enrich-row { flex-direction: column; align-items: flex-start; gap: 6px; border-radius: 12px; }
    .enrich-row-control { align-self: flex-end; }
    .enrich-cards { grid-template-columns: 1fr; }
    .enrich-form-grid { grid-template-columns: 1fr; }
    .enrich-liquid-card { flex-direction: column; gap: 8px; }
    .enrich-summary-cards { grid-template-columns: 1fr; }
    .enrich-toast { font-size: 0.8rem; padding: 0.875rem 1.25rem; white-space: normal; border-radius: 16px; }
}

@media (max-width: 480px) {
    .enrich-data { max-height: 38vh; border-radius: 16px; }
    .enrich-preparing { padding: 2.5rem 1.5rem; }
}
