/* From style.css */
.app-bg {
    background: radial-gradient(circle at top, #0f1b3d, #0b1020);
    color: #e5e7eb;
    font-family: Inter, Segoe UI, sans-serif;
}

.app-header {
    height: 56px;
    background: rgba(18, 24, 48, 0.85);
    border-bottom: 1px solid #1f2a55;
}

.stepper-container {
    background: rgba(18, 24, 48, 0.6);
    border-bottom: 1px solid #1f2a55;
}

.stepper {
    display: flex;
    gap: 24px;
    list-style: none;
    padding: 12px 0;
    margin: 0;
}

.stepper li {
    position: relative;
    padding-bottom: 6px;
    font-size: 13px;
    color: #94a3b8;
}

.stepper li.active {
    color: #8b5cf6;
    font-weight: 600;
}

.stepper li.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #8b5cf6, #4f7cff);
}

.ai-panel {
    background: rgba(18, 24, 48, 0.9);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #1f2a55;
}

.ai-panel h6 {
    color: #8b5cf6;
}

.ai-panel ul {
    font-size: 13px;
    padding-left: 16px;
}

.canvas-container {
    background: rgba(15, 23, 42, 0.6);
}

#orgChart {
    width: 100%;
    height: 100%;
}

.drawer {
    background: rgba(18, 24, 48, 0.9);
    border-left: 1px solid #1f2a55;
    padding: 16px;
}


.step-view {
    animation: fadeIn 0.25s ease-in-out;
}

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

/* From index.html inline styles */
:root {
    --bg-deep: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --text-main: #f8fafc;
    --step-text: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Modern Header --- */
.app-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-text {
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Professional Stepper --- */
.stepper-wrapper {
    background: rgba(15, 23, 42, 0.4);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stepper {
    display: flex;
    justify-content: space-between;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 0;
    list-style: none;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-counter {
    width: 32px;
    height: 32px;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.3s;
}

.step-item.active .step-counter {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.step-item.completed .step-counter {
    background: #10b981;
    border-color: #10b981;
}

.step-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--step-text);
    font-weight: 500;
}

.step-item.active .step-label {
    color: #fff;
}

/* --- Content Panels --- */
.ai-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.step-view h6 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-view h6::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 4px;
}

/* --- Form Elements --- */
.form-control,
.form-select {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #334155;
    color: white;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* --- Table Styling --- */
.table-dark {
    background: transparent;
    --bs-table-bg: transparent;
}

.table thead th {
    background: rgba(255, 255, 255, 0.03);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--step-text);
    border-bottom: 1px solid #334155;
}

/* --- Loader Overlay --- */
/* Ensure the overlay covers the ENTIRE screen */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    /* Dark tint */
    backdrop-filter: blur(6px);
    /* Blurs the background content */
    display: flex;
    /* Default hidden via d-none in JS */
    align-items: center;
    /* Vertical center */
    justify-content: center;
    /* Horizontal center */
    z-index: 9999;
    /* Higher than everything else */
    pointer-events: all;
    /* Blocks clicks to things behind it */
}

/* Ensure the loader box itself is solid and visible */
.loader-box {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    min-width: 280px;
}

/* Optional: Disable scrolling while loader is active */
body.loading {
    overflow: hidden;
}

.spinner {
    border-top-color: var(--accent-primary) !important;
}

/* Animation */
.step-view {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
