/* Google Font - Outfit & Inter */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-base: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-glass: rgba(226, 232, 240, 0.85);
    --border-glass: rgba(15, 23, 42, 0.08);
    
    --primary: #0284c7;
    --primary-glow: rgba(2, 132, 199, 0.1);
    --primary-grad: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    --accent-grad: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --warn-grad: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --danger-grad: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dark: #0f172a;
    
    --shadow-premium: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.03);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --font-outfit: 'Outfit', sans-serif;
    --font-jakarta: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    background-color: var(--bg-base);
    background-image: radial-gradient(at 0% 0%, hsla(253,16%,7%,0) 0, transparent 50%), 
                      radial-gradient(at 50% 0%, rgba(14, 165, 233, 0.05) 0, transparent 50%), 
                      radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.05) 0, transparent 50%);
    color: var(--text-main);
    font-family: var(--font-jakarta);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-outfit);
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

/* Glassmorphic Container & Cards */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-premium);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(14, 165, 233, 0.25);
    box-shadow: 0 20px 40px -15px rgba(2, 132, 199, 0.12);
    transform: translateY(-2px);
}

/* Header / Navigation */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 2%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-outfit);
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.user-badge {
    background: rgba(2, 132, 199, 0.08);
    color: var(--primary);
    border: 1px solid rgba(2, 132, 199, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
}

/* Layout container */
main {
    flex: 1;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 2%;
}

/* Form Styles */
.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

/* Excel-view specific overrides for all forms */
.excel-view div[style*="grid-template-columns"] {
    background-color: #cbd5e1 !important;
    gap: 1px !important;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    margin-bottom: 0.25rem !important;
}
.excel-view .form-group {
    background-color: #f1f5f9;
    margin-bottom: 0 !important;
    padding: 0.35rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.excel-view .form-group label {
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
}
.excel-view .form-control {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 0;
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
}
.excel-view .section-title-candidacy {
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.15rem !important;
    font-size: 0.95rem;
}
.excel-view .dynamic-card {
    padding: 0;
    margin-bottom: 1rem;
    border: none;
    background: transparent;
}
.excel-view table.modern-table th,
.excel-view table.modern-table td {
    padding: 0.15rem 0.25rem;
    border: 1px solid #cbd5e1;
    vertical-align: top;
}
.excel-view table.modern-table th {
    background: #f1f5f9;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
}
.excel-view table.modern-table input,
.excel-view table.modern-table select {
    border: none;
    border-radius: 0;
    padding: 0.25rem;
    background: transparent;
}
.excel-view table.modern-table input:focus,
.excel-view table.modern-table select:focus {
    box-shadow: inset 0 0 0 2px var(--primary);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control:disabled {
    background: #f8fafc;
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Custom Sliders for Judge */
.slider-container {
    margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.02);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.slider-val {
    font-family: var(--font-outfit);
    font-weight: 700;
    color: var(--primary);
    font-size: 1.15rem;
}

input[type="range"].modern-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #cbd5e1;
    outline: none;
}

input[type="range"].modern-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
    transition: transform 0.1s ease;
}

input[type="range"].modern-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Beautiful Button */
.btn-primary {
    background: var(--primary-grad);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-outfit);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

.btn-primary:hover {
    opacity: 0.95;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.28);
}

.btn-primary:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.8;
}

.btn-success {
    background: var(--accent-grad);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-outfit);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.28);
}

.btn-danger {
    background: var(--danger-grad);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-outfit);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Alert styles */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #065f46;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #991b1b;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #92400e;
}

/* Grid & Dashboard utilities */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.full-width {
    grid-column: 1 / -1;
}

/* Countdown widget */
.countdown-box {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 75px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.countdown-num {
    font-family: var(--font-outfit);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Table styling */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

table.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table.modern-table th {
    background: rgba(15, 23, 42, 0.02);
    padding: 1rem;
    font-family: var(--font-outfit);
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 2px solid var(--border-glass);
}

table.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-main);
    font-size: 0.95rem;
    vertical-align: top;
}

table.modern-table tbody tr:hover {
    background: rgba(2, 132, 199, 0.015);
}

/* Split-screen view for Judging workspace */
.split-container {
    display: flex;
    height: calc(100vh - 120px);
    gap: 1.5rem;
    margin: -1rem;
}

.split-left {
    flex: 65;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.split-right {
    flex: 35;
    height: 100%;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Styling checklist */
.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    border-left: 4px solid #ef4444;
    border-top: 1px solid var(--border-glass);
    border-right: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.checklist-item.checked {
    border-left-color: #10b981;
}

.check-icon {
    font-size: 1.2rem;
    font-weight: 700;
}

.check-icon {
    color: #ef4444;
}

.checked .check-icon {
    color: #10b981;
}

/* Traffic indicators */
.badge-color {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.badge-red {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-yellow {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-green {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Leaderboard Rank numbers */
.rank-num {
    font-family: var(--font-outfit);
    font-weight: 800;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.05);
}

.rank-1 { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: white; }
.rank-2 { background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%); color: var(--text-dark); }
.rank-3 { background: linear-gradient(135deg, #b45309 0%, #78350f 100%); color: white; }

/* Timeline progress list */
.timeline-list {
    margin-top: 1rem;
}

.timeline-step {
    display: flex;
    gap: 1rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: var(--border-glass);
}

.timeline-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 3px solid var(--bg-surface);
    z-index: 1;
}

.timeline-step.active .timeline-dot {
    background: var(--primary);
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.timeline-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Resizer */
.resizer {
    width: 6px;
    background-color: var(--border-glass);
    cursor: col-resize;
    border-radius: 3px;
    transition: background-color 0.2s;
    margin: 0 -0.5rem;
    z-index: 10;
}

.resizer:hover, .resizer.resizing {
    background-color: var(--primary);
}
