/* EvalForge – Core Design System & Styling */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Theme Colors (Refined Dark Slate) */
    --bg-app: #080c14;
    --bg-glass: rgba(18, 25, 41, 0.75);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-glow: rgba(99, 102, 241, 0.25);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-indigo: #6366f1;
    --accent-violet: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;

    /* Glows */
    --glow-indigo: 0 0 25px rgba(99, 102, 241, 0.25);
    --glow-emerald: 0 0 25px rgba(16, 185, 129, 0.25);

    /* Border Radius */
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 10% 20%, rgba(20, 27, 45, 0.9) 0%, rgba(8, 12, 20, 1) 90%);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Auth Page layout */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.auth-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(99, 102, 241, 0.15);
}

.auth-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #818CF8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    text-shadow: var(--glow-indigo);
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.auth-tab.active {
    color: var(--accent-indigo);
    border-bottom-color: var(--accent-indigo);
}

.auth-view {
    display: none;
}
.auth-view.active {
    display: block;
}

/* App Main Grid Shell Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
    width: 260px;
    background-color: #0b0f17;
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.sidebar-brand {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(90deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-item {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.nav-item.active {
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.08);
    font-weight: 600;
    border-left: 3px solid var(--accent-indigo);
}

.sidebar-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 1rem;
    margin-top: auto;
}

.user-profile {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.user-profile strong {
    color: var(--text-primary);
}

/* Main Workspace Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header bar */
.top-header {
    height: 70px;
    border-bottom: 1px solid var(--border-glass);
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(8, 12, 20, 0.5);
    backdrop-filter: blur(8px);
    z-index: 10;
    flex-shrink: 0;
}

.project-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-selector-wrapper select {
    background: #0d1321;
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.5rem 1.5rem 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.project-selector-wrapper select:focus {
    border-color: var(--accent-indigo);
}

/* Central Workspace viewport containing views */
.workspace-viewport {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
}

.page-view {
    display: none;
    animation: fadeInPage 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-view.active {
    display: block;
}

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

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

.page-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Premium Card Layout structures */
.dashboard-grid-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
}

.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-indigo);
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.08);
}

.glass-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Form inputs & variables overrides */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

input[type="text"], input[type="password"], input[type="email"], select, textarea {
    background-color: #0c111c;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.65rem 0.8rem;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.25);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Beautiful custom slider controls */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}
.slider-control input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: var(--radius-sm);
    background: #1e293b;
    outline: none;
}
.slider-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-indigo);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-indigo);
}

/* Modern buttons */
.btn {
    background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-violet) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
    box-shadow: none;
}

.btn-danger:hover {
    background: var(--accent-red);
    color: white;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn-full {
    width: 100%;
}

/* Upload Drop Boxes */
.upload-dropzone {
    background: rgba(0, 0, 0, 0.25);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.upload-dropzone:hover {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.02);
}

.upload-dropzone i {
    font-size: 2.2rem;
    color: var(--text-secondary);
}

.upload-dropzone p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Tables and database lists */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

table.data-table th {
    background-color: #0b0f17;
    color: var(--accent-indigo);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-glass);
}

table.data-table td {
    background-color: rgba(18, 25, 41, 0.3);
    color: var(--text-primary);
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-glass);
}

table.data-table tr:hover td {
    background-color: rgba(99, 102, 241, 0.03);
}

/* Document Upload Items */
.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
}
.document-info h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.document-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* Status Labels Badges */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.badge-pending {
    background-color: rgba(245, 158, 11, 0.12);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-running {
    background-color: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-completed {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-failed {
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Dashboard Two-Column Layout split */
.dashboard-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* General Layout helpers */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tab controls layout inside dashboard */
.tab-header {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 1.25rem;
}

.tab-btn {
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-indigo);
    border-bottom-color: var(--accent-indigo);
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* Modal Popup Window Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #0d121d;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

/* Loader Spinners */
.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255,255,255,0.06);
    border-top-color: var(--accent-indigo);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}
