/* Parrot Design System — LEIT Parity Testing Tool */

/* ========================================
   DESIGN TOKENS
   ======================================== */

:root {
    /* Brand — refined teal */
    --brand-50: #f0fdfa;
    --brand-100: #ccfbf1;
    --brand-200: #99f6e4;
    --brand-300: #5eead4;
    --brand-400: #2dd4bf;
    --brand-500: #14b8a6;
    --brand-600: #0d9488;
    --brand-700: #0f766e;
    --brand-800: #115e59;
    --brand-900: #134e4a;

    /* Semantic status */
    --color-pass: #16a34a;
    --color-fail: #dc2626;
    --color-warning: #d97706;
    --color-info: #0284c7;
    --color-pending: #64748b;

    /* File type colors (unified) */
    --color-csv: #0d9488;
    --color-xml: #ea580c;
    --color-json: #0284c7;
    --color-otc: #7c3aed;
    --color-parquet: #059669;

    /* Storage engine (not a file type — how the table itself is stored) */
    --color-iceberg: #0369a1;
    --color-iceberg-dark: #38bdf8;

    /* Neutrals (slate-tinted) */
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12);

    /* Borders */
    --border-color: var(--neutral-200);
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
}

[data-bs-theme="dark"] {
    --border-color: var(--neutral-700);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Without this, body inherits `color: var(--neutral-800)` (#1e293b) from the
   light-mode rule below, painting dark text on Bootstrap's dark bg. */
[data-bs-theme="dark"] body {
    color: var(--neutral-100);
}
[data-bs-theme="dark"] .text-body,
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] p,
[data-bs-theme="dark"] li,
[data-bs-theme="dark"] td,
[data-bs-theme="dark"] th,
[data-bs-theme="dark"] small {
    color: var(--neutral-100);
}
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .form-text {
    color: var(--neutral-400) !important;
}

/* ========================================
   COMPACT DESIGN
   ======================================== */

html {
    font-size: 15px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.45;
    font-family: var(--font-body);
    color: var(--neutral-800);
}

main {
    flex: 1;
}

/* Compact container padding */
.container-fluid.py-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* Compact navbar */
.navbar {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.navbar-brand {
    font-size: 1rem;
}

.nav-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

/* Compact cards */
.card {
    margin-bottom: 0.75rem;
}

.card-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.card-body {
    padding: 0.75rem;
}

.card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Compact tables */
.table {
    font-size: 0.85rem;
}

.table th,
.table td {
    padding: 0.4rem 0.5rem;
}

.table-sm th,
.table-sm td {
    padding: 0.25rem 0.4rem;
}

/* Compact forms */
.form-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.form-control,
.form-select {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
}

.form-control-sm,
.form-select-sm {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
}

.form-text {
    font-size: 0.75rem;
}

.form-check-label {
    font-size: 0.85rem;
}

/* Compact buttons */
.btn {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
}

.btn-lg {
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
}

/* Compact alerts */
.alert {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

/* Compact badges */
.badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* Compact modals */
.modal-header {
    padding: 0.5rem 0.75rem;
}

.modal-body {
    padding: 0.75rem;
}

.modal-footer {
    padding: 0.5rem 0.75rem;
}

.modal-title {
    font-size: 1rem;
}

/* Compact dropdowns */
.dropdown-item {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

/* Compact list groups */
.list-group-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* Headings — Plus Jakarta Sans for distinction */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

h1, .h1 { font-size: 1.75rem; font-weight: 700; }
h2, .h2 { font-size: 1.4rem; }
h3, .h3 { font-size: 1.2rem; }
h4, .h4 { font-size: 1.05rem; }
h5, .h5 { font-size: 0.95rem; }
h6, .h6 { font-size: 0.85rem; }

[data-bs-theme="dark"] h1, [data-bs-theme="dark"] .h1,
[data-bs-theme="dark"] h2, [data-bs-theme="dark"] .h2,
[data-bs-theme="dark"] h3, [data-bs-theme="dark"] .h3,
[data-bs-theme="dark"] h4, [data-bs-theme="dark"] .h4,
[data-bs-theme="dark"] h5, [data-bs-theme="dark"] .h5,
[data-bs-theme="dark"] h6, [data-bs-theme="dark"] .h6 {
    color: #f1f5f9;
}

/* Compact spacing utilities override */
.mb-4 { margin-bottom: 1rem !important; }
.mt-4 { margin-top: 1rem !important; }
.my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1rem !important; }
.pt-4 { padding-top: 1rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

.mb-3 { margin-bottom: 0.75rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.my-3 { margin-top: 0.75rem !important; margin-bottom: 0.75rem !important; }

/* Compact footer */
.footer {
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

.footer.py-3 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* ========================================
   END COMPACT DESIGN
   ======================================== */

/* Wizard Steps */
.wizard-steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--neutral-200);
    color: var(--neutral-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.wizard-step.active .step-circle {
    background-color: var(--brand-600);
    color: white;
}

.wizard-step.completed .step-circle {
    background-color: var(--color-pass);
    color: white;
}

.step-label {
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--neutral-500);
}

.wizard-step.active .step-label {
    color: var(--brand-600);
    font-weight: 500;
}

.wizard-step.completed .step-label {
    color: var(--color-pass);
}

.wizard-connector {
    width: 40px;
    height: 2px;
    background-color: var(--neutral-200);
    margin-bottom: 20px;
}

/* Wizard Panes */
.wizard-pane {
    display: none;
}

.wizard-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Table Selection */
.table-selection-list .form-check {
    padding: 4px 8px;
    margin: 0;
    border-bottom: 1px solid #e9ecef;
}

.table-selection-list .form-check:last-child {
    border-bottom: none;
}

.table-selection-list .form-check:hover {
    background-color: #f8f9fa;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
}

.toast {
    font-size: 0.85rem;
}

.toast-header {
    padding: 0.35rem 0.5rem;
}

.toast-body {
    padding: 0.5rem;
}

/* Cards — refined with subtle brand accent */
.card {
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.card-header {
    background-color: var(--neutral-50);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.005em;
}

/* Accent card variant — left border brand highlight */
.card-accent {
    border-left: 3px solid var(--brand-500);
}

[data-bs-theme="dark"] .card {
    border-color: var(--neutral-700);
}

[data-bs-theme="dark"] .card-header {
    background-color: var(--neutral-700);
    border-bottom-color: #495057;
}

/* Status badges */
.badge {
    font-weight: 500;
}

/* Log container */
#logContainer {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.4;
}

#logOutput div {
    padding: 1px 0;
    border-bottom: 1px solid #333;
}

#logOutput div:last-child {
    border-bottom: none;
}

/* Progress bar */
.progress {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Navbar brand */
.navbar-brand {
    font-weight: 600;
}

/* Dark mode support */
[data-bs-theme="dark"] .card-header {
    background-color: #2b3035;
}

[data-bs-theme="dark"] .table-selection-list .form-check:hover {
    background-color: #2b3035;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2b3035 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    .wizard-steps {
        flex-wrap: wrap;
        justify-content: center;
    }

    .wizard-connector {
        display: none;
    }

    .wizard-step {
        min-width: 60px;
    }

    .container-fluid.py-4 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

/* Spinner animation */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    margin-top: auto;
}

/* (Old schema-table-tree styles removed — replaced by native-tree.css) */

/* ========================================
   ENVIRONMENT SELECTOR
   ======================================== */

.btn-group-environment {
    gap: 0.5rem;
}

.environment-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    background-color: #fff;
    color: #495057;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    position: relative;
}

.environment-btn:hover {
    border-color: var(--brand-500);
    color: var(--brand-700);
    background-color: var(--brand-50);
}

.environment-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.25);
}

.environment-btn.active {
    border-color: var(--brand-600);
    background-color: var(--brand-600);
    color: #fff;
}

.environment-btn.active:hover {
    background-color: var(--brand-700);
    border-color: var(--brand-700);
    color: #fff;
}

.environment-btn.connecting {
    border-color: #ffc107;
    background-color: #fffbeb;
    color: #856404;
    cursor: wait;
}

.environment-btn.error {
    border-color: #dc3545;
    background-color: #fff5f5;
    color: #dc3545;
}

.environment-btn .env-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.environment-btn.active .env-icon {
    opacity: 1;
}

.environment-btn .env-label {
    font-size: 0.85rem;
}

.environment-btn .env-status-icon {
    font-size: 0.75rem;
    margin-left: auto;
}

.environment-btn .env-status-icon:empty {
    display: none;
}

/* Status alert styling */
#environmentStatus {
    font-size: 0.85rem;
}

#environmentStatus.alert-connecting {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

#environmentStatus.alert-success-env {
    background-color: #d1e7dd;
    border-color: #198754;
    color: #0f5132;
}

#environmentStatus.alert-error-env {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #842029;
}

/* Dark mode support */
[data-bs-theme="dark"] .environment-btn {
    background-color: #2b3035;
    border-color: #495057;
    color: #adb5bd;
}

[data-bs-theme="dark"] .environment-btn:hover {
    border-color: #0d6efd;
    color: #6ea8fe;
    background-color: #1a2332;
}

[data-bs-theme="dark"] .environment-btn.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

[data-bs-theme="dark"] .environment-btn.connecting {
    background-color: #332701;
    border-color: #ffc107;
    color: #ffc107;
}

[data-bs-theme="dark"] .environment-btn.error {
    background-color: #2c0b0e;
    border-color: #dc3545;
    color: #f8d7da;
}

/* ========================================
   PROFILE CARDS
   ======================================== */

.profile-card {
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
    border: 1px solid #dee2e6;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-500);
}

.profile-card .card-title {
    font-size: 0.9rem;
}

.profile-card .start-profile-btn {
    opacity: 0.9;
}

.profile-card:hover .start-profile-btn {
    opacity: 1;
}

[data-bs-theme="dark"] .profile-card {
    border-color: #495057;
}

[data-bs-theme="dark"] .profile-card:hover {
    border-color: #0d6efd;
}

/* (Old @widgetjs/tree and row count status styles removed — replaced by native-tree.css) */

/* ========================================
   WIZARD SECTIONS (replaces accordion)
   ======================================== */

.wizard-section--disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   WIZARD ACTION BAR (replaces summary panel)
   ======================================== */

.wizard-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: var(--bs-body-bg);
    border-top: 2px solid var(--brand-500);
    padding: 0.5rem 1.5rem;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

[data-bs-theme="dark"] .wizard-action-bar {
    box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
}

/* ========================================
   OTC FILE TYPE - PURPLE THEME
   ======================================== */

.badge-otc { background-color: #6f42c1 !important; color: #fff !important; }
.badge-parquet, .bg-parquet { background-color: #20c997 !important; color: #fff !important; }
.bg-purple { background-color: #6f42c1 !important; }
.text-purple { color: #6f42c1 !important; }

.btn-outline-purple {
    color: #6f42c1;
    border-color: #6f42c1;
}
.btn-outline-purple:hover,
.btn-outline-purple:focus,
.btn-outline-purple.active {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: #fff;
}

.btn-purple {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: #fff;
}
.btn-purple:hover,
.btn-purple:focus {
    background-color: #5a32a3;
    border-color: #5a32a3;
    color: #fff;
}

/* ============================================================
   SIDEBAR NAVIGATION
   ============================================================ */

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100%;
    background-color: var(--neutral-800);
    overflow-y: auto;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease;
    font-family: var(--font-body);
}

/* --- Brand --- */
.sidebar-brand {
    padding: 0.75rem;
    border-bottom: 1px solid var(--neutral-700);
}

.sidebar-brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.sidebar-brand-name:hover {
    color: var(--brand-300);
}

.sidebar-brand-env {
    font-size: 0.7rem;
    color: #94a3b8;
    display: block;
    text-decoration: none;
}

.sidebar-brand-env:hover {
    color: #cbd5e1;
}

/* --- Sections --- */
.sidebar-section {
    padding: 0.5rem 0.75rem;
}

.sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.08em;
    padding-left: 0.5rem;
    display: block;
    margin-bottom: 0.25rem;
    margin-top: 0.5rem;
}

/* --- Links --- */
.sidebar-link {
    display: block;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0.25rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.sidebar-link.active {
    background-color: rgba(20, 184, 166, 0.15);
    color: var(--brand-300);
    font-weight: 500;
}

.sidebar-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.sidebar-link .step-num {
    font-weight: bold;
    color: #64748b;
    font-size: 0.75rem;
}

.sidebar-link i {
    width: 1.1rem;
    text-align: center;
    margin-right: 0.3rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.sidebar-sublink {
    padding-left: 1.8rem;
    font-size: 0.75rem;
}

/* --- Connection info --- */
.sidebar-connections {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #334155;
}

.sidebar-connection-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0;
}

.sidebar-connection-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.4);
    min-width: 2.8rem;
}

.sidebar-connection-name {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Bottom area --- */
.sidebar-bottom {
    margin-top: auto;
    padding: 0.75rem;
    border-top: 1px solid #334155;
    display: flex;
    flex-direction: column;
}

.sidebar-bottom a {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.sidebar-bottom a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.sidebar-bottom a.text-danger {
    color: #f87171;
}

.sidebar-bottom a.text-danger:hover {
    color: #fca5a5;
    background-color: rgba(248, 113, 113, 0.1);
    border-radius: 0.25rem;
}

/* --- Main layout --- */
.app-layout {
    margin-left: 220px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Mobile topbar --- */
.mobile-topbar {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background-color: #1e293b;
    padding: 0.5rem 0.75rem;
}

.mobile-topbar .sidebar-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* --- Overlay for mobile --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1039;
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .app-layout {
        margin-left: 0;
    }

    .mobile-topbar {
        display: flex;
    }
}

/* Hide old navbar */
.navbar { display: none !important; }

/* ========================================
   PAGE HEADER (standardized across all pages)
   ======================================== */

.page-header {
    margin-bottom: 1.25rem;
}

.page-header h1,
.page-header h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--neutral-900);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.page-header .page-subtitle {
    font-size: 0.85rem;
    color: var(--neutral-500);
    margin: 0;
}

[data-bs-theme="dark"] .page-header h1,
[data-bs-theme="dark"] .page-header h2 {
    color: #f1f5f9;
}

/* ========================================
   EMPTY STATE — teaches and guides
   ======================================== */

.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--neutral-500);
}

.empty-state-icon {
    font-size: 2.5rem;
    color: var(--neutral-300);
    margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .empty-state-icon {
    color: var(--neutral-600);
}

.empty-state-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 0.35rem;
}

[data-bs-theme="dark"] .empty-state-title {
    color: var(--neutral-300);
}

.empty-state-desc {
    font-size: 0.85rem;
    color: var(--neutral-400);
    max-width: 360px;
    margin: 0 auto 1rem;
}

/* ========================================
   COMPLETION CELEBRATION
   ======================================== */

.completion-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

.completion-banner.banner-pass {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.completion-banner.banner-fail {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.completion-banner.banner-partial {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

[data-bs-theme="dark"] .completion-banner.banner-pass {
    background-color: #064e3b;
    border-color: #065f46;
    color: #a7f3d0;
}

[data-bs-theme="dark"] .completion-banner.banner-fail {
    background-color: #450a0a;
    border-color: #7f1d1d;
    color: #fecaca;
}

[data-bs-theme="dark"] .completion-banner.banner-partial {
    background-color: #451a03;
    border-color: #78350f;
    color: #fde68a;
}

.completion-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.completion-banner-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
}

.completion-banner-detail {
    font-size: 0.85rem;
    opacity: 0.85;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   STYLED CONFIRMATION MODAL
   ======================================== */

.confirm-modal .modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.confirm-modal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.confirm-modal .modal-footer {
    border-top: none;
    padding-top: 0;
}

.confirm-modal .confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.confirm-modal .confirm-icon.danger { color: var(--color-fail); }
.confirm-modal .confirm-icon.warning { color: var(--color-warning); }
.confirm-modal .confirm-icon.info { color: var(--color-info); }

/* ========================================
   COLLAPSIBLE ADVANCED SECTIONS
   ======================================== */

.advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--neutral-500);
    cursor: pointer;
    padding: 0.25rem 0;
    border: none;
    background: none;
    transition: color 0.15s;
}

.advanced-toggle:hover {
    color: var(--brand-600);
}

.advanced-toggle .toggle-chevron {
    transition: transform 0.2s ease;
    font-size: 0.7rem;
}

.advanced-toggle[aria-expanded="true"] .toggle-chevron {
    transform: rotate(90deg);
}

.advanced-section {
    border-left: 2px solid var(--neutral-200);
    padding-left: 0.75rem;
    margin-top: 0.5rem;
}

[data-bs-theme="dark"] .advanced-section {
    border-left-color: var(--neutral-600);
}

/* ========================================
   TOOLTIP ENHANCEMENTS
   ======================================== */

.help-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neutral-200);
    color: var(--neutral-500);
    font-size: 0.65rem;
    cursor: help;
    margin-left: 0.25rem;
    vertical-align: middle;
}

[data-bs-theme="dark"] .help-hint {
    background: var(--neutral-600);
    color: var(--neutral-400);
}

/* ========================================
   BRAND BUTTON VARIANTS
   ======================================== */

.btn-brand {
    background-color: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
}

.btn-brand:hover,
.btn-brand:focus {
    background-color: var(--brand-700);
    border-color: var(--brand-700);
    color: #fff;
}

.btn-brand:active {
    background-color: var(--brand-800);
    border-color: var(--brand-800);
    color: #fff;
}

.btn-outline-brand {
    color: var(--brand-600);
    border-color: var(--brand-600);
    background: transparent;
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
    background-color: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
}

/* ========================================
   KEYBOARD SHORTCUT HINTS
   ======================================== */

.kbd-hint {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--neutral-500);
    background: var(--neutral-100);
    border: 1px solid var(--neutral-300);
    border-radius: 3px;
    line-height: 1.3;
    vertical-align: middle;
}

[data-bs-theme="dark"] .kbd-hint {
    background: var(--neutral-700);
    border-color: var(--neutral-600);
    color: var(--neutral-400);
}

/* ========================================
   FOOTER REFINEMENT
   ======================================== */

.app-footer {
    font-family: var(--font-body);
}

.app-footer code {
    font-family: var(--font-mono);
}
