@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* Variables & Design Tokens */
:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --card-bg: rgba(30, 41, 59, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-glow: rgba(245, 158, 11, 0.03);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-gold: #f59e0b;
    --accent-gold-hover: #d97706;
    --accent-gold-glow: rgba(245, 158, 11, 0.4);
    
    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-success-border: rgba(16, 185, 129, 0.3);
    
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    
    --color-danger: #ef4444;
    --color-danger-bg: rgba(239, 68, 68, 0.1);
    --color-danger-border: rgba(239, 68, 68, 0.3);
    
    --color-info: #3b82f6;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

p, span, label, input, button, select, textarea {
    font-family: var(--font-body);
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--accent-gold-hover);
}

/* App Layout Container */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.logo-icon {
    font-size: 2rem;
    color: var(--accent-gold);
    text-shadow: 0 0 15px var(--accent-gold-glow);
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.logo span {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: block;
    margin-top: -0.25rem;
}

nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover, .nav-btn.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--card-border);
    color: var(--text-primary);
}

.nav-btn.active {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.05);
    color: var(--accent-gold);
}

/* Views Management */
.view-panel {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

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

/* Glassmorphic Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

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

.dash-card {
    cursor: pointer;
    text-align: center;
    padding: 3.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.dash-card:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 12px 40px 0 rgba(245, 158, 11, 0.08);
}

.dash-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: var(--accent-gold);
    transition: var(--transition-smooth);
}

.dash-card:hover .dash-icon-wrapper {
    background: var(--accent-gold);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--accent-gold-glow);
    transform: scale(1.05);
}

.dash-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.dash-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 250px;
    margin: 0 auto;
}

.dash-badge {
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.dash-card:hover .dash-badge {
    border-color: var(--accent-gold);
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title {
    display: flex;
    flex-direction: column;
}

.page-title h2 {
    font-size: 2.25rem;
    line-height: 1.2;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

input, select, textarea {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-gold-hover);
    border-color: var(--accent-gold-hover);
    box-shadow: 0 0 15px var(--accent-gold-glow);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: var(--text-primary);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 4px;
}

/* Multi-column layout for editing content */
.layout-split {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    align-items: start;
}

.student-split {
    display: grid;
    grid-template-columns: 4fr 5fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .layout-split, .student-split {
        grid-template-columns: 1fr;
    }
}

/* Academic Tabs Navigation */
.academic-tabs-nav {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.academic-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.academic-tab-btn:hover {
    color: var(--text-primary);
    border-bottom-color: rgba(245, 158, 11, 0.3);
}

.academic-tab-btn.active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Academic Tab Pane */
.academic-tab-pane {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.academic-tab-pane.active {
    display: block;
}

/* Academic Split Layout for Student View */
.academic-split-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .academic-split-layout {
        grid-template-columns: 1fr;
    }
}

/* Criteria Setup Area */
.criteria-container {
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.3);
    margin-bottom: 1.5rem;
}

.criteria-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.criterion-item {
    display: grid;
    grid-template-columns: 3fr 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.criteria-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--card-border);
}

.criteria-summary.valid {
    color: var(--color-success);
}

.criteria-summary.invalid {
    color: var(--color-danger);
}

/* Exam Cards & List */
.exam-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exam-compact-card {
    background: rgba(30, 41, 59, 0.25);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.exam-compact-card:hover, .exam-compact-card.active {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(30, 41, 59, 0.4);
}

.exam-compact-card.active {
    box-shadow: inset 3px 0 0 var(--accent-gold);
}

.exam-card-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.exam-card-title h3 {
    font-size: 1.15rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.exam-meta-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.meta-pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.meta-pill i {
    margin-right: 0.25rem;
}

/* QR Code & Share Area */
.share-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--card-border);
    text-align: center;
}

#qrcode {
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: var(--transition-smooth);
}

#qrcode canvas, #qrcode img {
    max-width: 180px;
    max-height: 180px;
}

.share-link-box {
    display: flex;
    width: 100%;
    gap: 0.5rem;
}

.share-link-box input {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--accent-gold);
    flex-grow: 1;
    min-width: 0;
}

/* File Upload & EXIF Verification Styles */
.file-upload-zone {
    border: 2px dashed var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: rgba(15, 23, 42, 0.2);
    position: relative;
}

.file-upload-zone:hover, .file-upload-zone.dragover {
    border-color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.02);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: var(--transition-smooth);
}

.file-upload-zone:hover .upload-icon {
    color: var(--accent-gold);
    transform: translateY(-5px);
}

.upload-guidelines {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.preview-container {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-top: 1.5rem;
    border: 1px solid var(--card-border);
    display: none;
}

.preview-image {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    display: block;
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 1.5rem 1rem 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* EXIF Details Panel */
.exif-panel {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.4);
}

.exif-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.exif-status-badge.valid {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success-border);
}

.exif-status-badge.warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.exif-status-badge.invalid {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid var(--color-danger-border);
}

.exif-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.exif-info-item {
    font-size: 0.9rem;
}

.exif-info-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.exif-info-item strong {
    color: var(--text-primary);
    font-family: monospace;
}

/* Simulation Inspector for Testing */
.sim-inspector {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.sim-inspector h4 {
    font-size: 0.95rem;
    color: var(--color-info);
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

/* Student Directory (Academic View) */
.student-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
}

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

.student-table th {
    padding: 1rem;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--card-border);
    font-weight: 600;
}

.student-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

.student-table tr:hover {
    background: rgba(255,255,255,0.02);
}

.thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.thumbnail:hover {
    transform: scale(1.1);
}

/* Jury Assessment Styles */
.jury-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .jury-split {
        grid-template-columns: 1fr;
    }
}

.student-list-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 550px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbars */
.student-list-sidebar::-webkit-scrollbar, .exam-list-container::-webkit-scrollbar {
    width: 6px;
}
.student-list-sidebar::-webkit-scrollbar-thumb, .exam-list-container::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 3px;
}

.student-compact-card {
    background: rgba(30, 41, 59, 0.2);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.student-compact-card:hover, .student-compact-card.active {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(30, 41, 59, 0.35);
}

.student-compact-card.active {
    box-shadow: inset 4px 0 0 var(--accent-gold);
}

.student-compact-card img {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    object-fit: cover;
}

.student-compact-info {
    flex-grow: 1;
}

.student-compact-info h4 {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.student-compact-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.score-badge {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 0.9rem;
}

.grading-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.grading-rubric-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.rubric-item {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
}

.rubric-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.rubric-item-header h4 {
    font-size: 1.1rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.rubric-max {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-container input[type="range"] {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-gold);
    box-shadow: 0 0 8px var(--accent-gold-glow);
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.slider-value-display {
    min-width: 45px;
    text-align: right;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent-gold);
}

/* Lightbox Modal (For zoomable images) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius-md);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    border: 1px solid var(--card-border);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--color-success);
}
.toast.success i {
    color: var(--color-success);
}

.toast.error {
    border-left: 4px solid var(--color-danger);
}
.toast.error i {
    color: var(--color-danger);
}

.toast.info {
    border-left: 4px solid var(--color-info);
}
.toast.info i {
    color: var(--color-info);
}

/* Utility classes */
.flex-space {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--accent-gold); }

.grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 600px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* Sınav Durum Rozetleri */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border-color: rgba(16, 185, 129, 0.2);
}

.status-badge.active .dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: status-pulse 1.8s infinite;
}

.status-badge.ended {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.status-badge.ended .dot {
    width: 8px;
    height: 8px;
    background: var(--color-danger);
    border-radius: 50%;
}

@keyframes status-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Sınav Sonlandı Uyarı Bannerı (Jüri) */
#jury-exam-ended-banner {
    animation: slideDown 0.3s ease forwards;
}

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

/* Print styles */
@media screen {
    .print-only, #print-section {
        display: none !important;
    }
}

@media print {
    @page {
        size: A4;
        margin: 15mm 15mm 15mm 15mm;
    }

    .app-container, .lightbox, .toast-container, header, nav, main, footer {
        display: none !important;
    }
    
    body, html {
        background: white !important;
        color: black !important;
        display: block !important;
        margin: 0;
        padding: 0;
    }
    
    /* Show print section only */
    .print-only, #print-section {
        display: block !important;
        background: white !important;
        color: black !important;
        width: 100%;
        margin: 0;
        padding: 0;
        font-family: Georgia, "Times New Roman", Times, serif !important;
    }

    .print-header {
        text-align: center;
        margin-bottom: 25px;
        border-bottom: 2px double #000;
        padding-bottom: 15px;
    }

    .print-header h2 {
        font-size: 1.4rem;
        margin: 0;
        color: #000 !important;
        font-family: serif;
    }

    .print-header h3 {
        font-size: 1.2rem;
        margin: 5px 0 0 0;
        color: #000 !important;
        font-family: serif;
    }

    .print-header h4 {
        font-size: 1.1rem;
        margin: 5px 0 0 0;
        color: #000 !important;
        font-weight: normal;
        font-family: serif;
    }

    .print-title {
        font-size: 1.3rem;
        margin-top: 15px;
        font-weight: bold;
        color: #000 !important;
        letter-spacing: 0.5px;
    }

    .print-exam-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 20px;
        margin-bottom: 25px;
        border: 1px solid #ccc;
        padding: 12px;
        border-radius: 4px;
        font-size: 0.9rem;
    }

    .print-exam-info div {
        border-bottom: 1px dashed #eee;
        padding-bottom: 4px;
        color: #111;
    }

    .print-exam-info div strong {
        color: #000;
    }

    .print-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 40px;
        font-size: 0.9rem;
    }

    .print-table th {
        background-color: #f2f2f2 !important;
        color: black !important;
        border: 1px solid #000;
        padding: 8px 10px;
        font-weight: bold;
        text-align: left;
    }

    .print-table td {
        border: 1px solid #000;
        padding: 8px 10px;
        color: black !important;
    }

    .print-table tr:nth-child(even) {
        background-color: transparent !important;
    }

    .print-signatures-container {
        display: flex;
        justify-content: space-around;
        margin-top: 50px;
        page-break-inside: avoid;
    }

    .signature-box {
        text-align: center;
        width: 250px;
    }

    .sig-line {
        width: 100%;
        height: 60px;
        border-bottom: 1px solid #000;
        margin-bottom: 10px;
    }

    .print-badge {
        display: inline-block;
        padding: 2px 6px;
        font-size: 0.75rem;
        border-radius: 4px;
        font-weight: bold;
        text-transform: uppercase;
        border: 1px solid;
    }

    .print-badge.success {
        background-color: #e6f4ea !important;
        color: #137333 !important;
        border-color: #137333;
    }

    .print-badge.danger {
        background-color: #fce8e6 !important;
        color: #c5221f !important;
        border-color: #c5221f;
    }
}

/* Mobile & Tablet Responsiveness Enhancements */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        text-align: center;
        padding-bottom: 1.25rem;
        margin-bottom: 1.75rem;
    }
    
    nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        overflow-x: visible;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        white-space: normal;
        text-align: center;
    }
    
    .page-title h2 {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .page-title p {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .page-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .page-header div[style*="display: flex"] {
        justify-content: center;
        width: 100%;
    }
    
    #results-exam-select, #jury-exam-select {
        width: 100% !important;
        min-width: 100% !important;
    }

    /* Tab navigation vertical stacking */
    .academic-tabs-nav {
        flex-direction: column !important;
        gap: 0.5rem !important;
        border-bottom: none !important;
        margin-bottom: 1.5rem !important;
        overflow-x: visible !important;
    }
    
    .academic-tab-btn {
        width: 100% !important;
        border: 1px solid var(--card-border) !important;
        border-radius: var(--border-radius-sm) !important;
        background: rgba(255, 255, 255, 0.02) !important;
        justify-content: center !important;
        padding: 0.75rem !important;
        white-space: normal !important;
        text-align: center;
    }
    
    .academic-tab-btn.active {
        border-color: var(--accent-gold) !important;
        background: rgba(245, 158, 11, 0.05) !important;
    }

    /* Table-to-Card Responsive Layout Conversion */
    .student-table-container {
        border: none;
        padding: 0;
        overflow-x: visible;
    }
    
    .student-table, .student-table thead, .student-table tbody, .student-table th, .student-table td, .student-table tr,
    .jury-table, .jury-table thead, .jury-table tbody, .jury-table th, .jury-table td, .jury-table tr {
        display: block;
        width: 100%;
    }
    
    .student-table thead, .jury-table thead {
        display: none; /* Hide table headers on mobile */
    }
    
    .student-table tr, .jury-table tr {
        background: rgba(30, 41, 59, 0.3);
        border: 1px solid var(--card-border);
        border-radius: var(--border-radius-md);
        margin-bottom: 1.25rem;
        padding: 1.25rem;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        transition: var(--transition-smooth);
    }
    
    .student-table tr:hover, .jury-table tr:hover {
        background: rgba(30, 41, 59, 0.45);
        border-color: rgba(245, 158, 11, 0.25);
    }
    
    .student-table td, .jury-table td {
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 0.75rem 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 0.25rem;
        width: 100%;
        max-width: 100% !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
    
    .student-table td:last-child, .jury-table td:last-child {
        border-bottom: none;
        padding-top: 1rem;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    /* Table Labels Injection via ::before */
    .student-table td::before, .jury-table td::before {
        font-weight: 600;
        color: var(--accent-gold);
        text-align: left;
        margin-right: 0;
        margin-bottom: 0.15rem;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        display: block;
    }
    
    /* Academic Student list column labels */
    #academic-student-table-body td:nth-of-type(1)::before { content: "Öğrenci No"; }
    #academic-student-table-body td:nth-of-type(2)::before { content: "Ad Soyad"; }
    #academic-student-table-body td:nth-of-type(3)::before { content: "Görsel"; }
    #academic-student-table-body td:nth-of-type(4)::before { content: "Fotoğraf Zamanı"; }
    #academic-student-table-body td:nth-of-type(5)::before { content: "Hoca Puanı"; }
    #academic-student-table-body td:nth-of-type(6)::before { content: "Jüri Puanı"; }
    #academic-student-table-body td:nth-of-type(7)::before { content: "Genel Ortalama"; }
    #academic-student-table-body td:nth-of-type(8)::before { content: "İşlem"; }
    
    /* Final Results table column labels */
    #results-table-body td:nth-of-type(1)::before { content: "Öğrenci No"; }
    #results-table-body td:nth-of-type(2)::before { content: "Ad Soyad"; }
    #results-table-body td:nth-of-type(3)::before { content: "Hoca Puanı"; }
    #results-table-body td:nth-of-type(4)::before { content: "Jüri Puanı"; }
    #results-table-body td:nth-of-type(5)::before { content: "Genel Ortalama"; }
    #results-table-body td:nth-of-type(6)::before { content: "Hoca Yorumu"; }
    #results-table-body td:nth-of-type(7)::before { content: "Jüri Yorumu"; }
    #results-table-body td:nth-of-type(8)::before { content: "İşlem"; }
    
    /* Academic Jury table column labels */
    #academic-jury-table-body td:nth-of-type(1)::before { content: "Jüri Adı"; }
    #academic-jury-table-body td:nth-of-type(2)::before { content: "Giriş Şifresi"; }
    #academic-jury-table-body td:nth-of-type(3)::before { content: "Puan Ağırlığı (%)"; }
    #academic-jury-table-body td:nth-of-type(4)::before { content: "İşlem"; }

    /* Active Exam Header Responsive Stacking */
    #active-exam-container > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    #active-exam-container > div:first-child > div:last-child {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    /* Results Table Header Responsive Stacking */
    #results-ended-content > div:first-child {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 1rem !important;
    }

    /* Lightbox and Modal Responsiveness overrides */
    .lightbox {
        padding: 1rem;
    }
    
    .lightbox .glass-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 1.5rem !important;
        max-height: 95vh !important;
    }
    
    .lightbox-close {
        top: 10px !important;
        right: 15px !important;
        font-size: 1.75rem !important;
    }
    
    .jury-scores-tooltip::before {
        bottom: auto;
        top: 125%;
        z-index: 99;
    }
}

@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .dash-card {
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .criterion-item {
        grid-template-columns: 1fr auto;
        gap: 0.5rem;
    }
    
    .criterion-item input[type="text"] {
        grid-column: 1 / -1;
    }
    
    .toast-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }
    
    .toast {
        width: 100%;
        max-width: 100%;
    }
}

/* Tooltip styles for jury score breakdown */
.jury-scores-tooltip {
    position: relative;
    cursor: help;
    display: inline-block;
}

.jury-scores-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--accent-gold);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    white-space: pre-line;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    min-width: 160px;
    text-align: left;
    line-height: 1.4;
}

.jury-scores-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Jury Management Table and Form */
.jury-form-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 2rem;
}
.jury-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.jury-table th, .jury-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}
.jury-table th {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.9rem;
}
.jury-table td {
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Plate Explanation Text Auto-wrapping styles */
.plate-explanation-text {
    word-break: break-word;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
