/* COMPUTECH ACADEMY - Main Stylesheet */
:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --accent: #ff6f00;
    --accent-light: #ffa726;
    --dark: #0d0d0d;
    --light: #f5f6fa;
    --white: #ffffff;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #f57f17;
    --info: #01579b;
    --sidebar-w: 260px;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 12px;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Segoe UI',sans-serif; background:var(--light); color:#333; }

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height:100vh;
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
    display:flex; align-items:center; justify-content:center;
    padding:20px;
}
.login-card {
    background:#fff; border-radius:20px; padding:50px 40px;
    width:100%; max-width:450px;
    box-shadow:0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { text-align:center; margin-bottom:30px; }
.login-logo .logo-icon {
    width:80px; height:80px; background:linear-gradient(135deg,#1a237e,#3949ab);
    border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
    font-size:36px; margin-bottom:15px;
}
.login-logo h1 { font-size:24px; color:var(--primary); font-weight:800; letter-spacing:1px; }
.login-logo p { font-size:12px; color:#888; margin-top:4px; }
.login-tabs { display:flex; gap:10px; margin-bottom:25px; }
.login-tab {
    flex:1; padding:10px; border:2px solid #e0e0e0; border-radius:8px;
    background:#fff; cursor:pointer; font-weight:600; color:#888; transition:.2s;
    font-size:14px; text-align:center;
}
.login-tab.active { border-color:var(--primary); color:var(--primary); background:#e8eaf6; }
.form-group { margin-bottom:18px; }
.form-group label { display:block; font-size:13px; font-weight:600; color:#555; margin-bottom:6px; }
.form-group input, .form-group select, .form-group textarea {
    width:100%; padding:12px 15px; border:2px solid #e0e0e0; border-radius:8px;
    font-size:14px; transition:.2s; background:#fafafa;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color:var(--primary); outline:none; background:#fff;
}
.btn { display:inline-flex; align-items:center; gap:8px; padding:12px 24px;
    border:none; border-radius:8px; cursor:pointer; font-size:14px; font-weight:600; transition:.2s; text-decoration:none; }
.btn-primary { background:linear-gradient(135deg,#1a237e,#3949ab); color:#fff; }
.btn-primary:hover { background:linear-gradient(135deg,#0d1b6e,#2a3897); transform:translateY(-1px); }
.btn-danger { background:#c62828; color:#fff; }
.btn-danger:hover { background:#b71c1c; }
.btn-success { background:#2e7d32; color:#fff; }
.btn-success:hover { background:#1b5e20; }
.btn-warning { background:#f57f17; color:#fff; }
.btn-warning:hover { background:#e65100; }
.btn-info { background:#01579b; color:#fff; }
.btn-secondary { background:#607d8b; color:#fff; }
.btn-sm { padding:7px 14px; font-size:12px; border-radius:6px; }
.btn-full { width:100%; justify-content:center; padding:14px; font-size:15px; }
.designed-by { text-align:center; margin-top:20px; font-size:11px; color:#aaa; }

/* ===== ADMIN LAYOUT ===== */
.admin-wrapper { display:flex; min-height:100vh; }
.sidebar {
    width:var(--sidebar-w); background:linear-gradient(180deg,#0d1b6e 0%,#1a237e 50%,#283593 100%);
    position:fixed; top:0; left:0; height:100vh; overflow-y:auto; z-index:100;
    display:flex; flex-direction:column;
}
.sidebar-brand {
    padding:25px 20px; border-bottom:1px solid rgba(255,255,255,0.1);
    text-align:center;
}
.sidebar-brand .brand-logo {
    width:55px; height:55px; background:linear-gradient(135deg,#ff6f00,#ffa726);
    border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
    font-size:24px; margin-bottom:10px;
}
.sidebar-brand h2 { color:#fff; font-size:14px; font-weight:800; letter-spacing:1px; }
.sidebar-brand p { color:rgba(255,255,255,0.5); font-size:10px; }
.sidebar-nav { flex:1; padding:20px 0; }
.nav-section { padding:0 15px; margin-bottom:5px; }
.nav-section-title { color:rgba(255,255,255,0.4); font-size:10px; font-weight:700;
    letter-spacing:1px; text-transform:uppercase; padding:10px 10px 5px; }
.nav-link {
    display:flex; align-items:center; gap:12px; padding:11px 15px; border-radius:8px;
    color:rgba(255,255,255,0.75); text-decoration:none; margin-bottom:3px; transition:.2s;
    font-size:13.5px; font-weight:500;
}
.nav-link:hover, .nav-link.active {
    background:rgba(255,255,255,0.15); color:#fff;
}
.nav-link .icon { font-size:18px; width:22px; text-align:center; }
.sidebar-footer { padding:15px; border-top:1px solid rgba(255,255,255,0.1); }
.sidebar-footer a { display:flex; align-items:center; gap:10px; color:rgba(255,255,255,0.6);
    text-decoration:none; font-size:13px; padding:8px 10px; border-radius:8px; transition:.2s; }
.sidebar-footer a:hover { background:rgba(255,255,255,0.1); color:#fff; }

.main-content { margin-left:var(--sidebar-w); flex:1; }
.topbar {
    background:#fff; padding:15px 30px; display:flex; align-items:center;
    justify-content:space-between; box-shadow:0 2px 10px rgba(0,0,0,0.08);
    position:sticky; top:0; z-index:50;
}
.topbar-title h2 { font-size:20px; color:var(--primary); font-weight:700; }
.topbar-title p { font-size:12px; color:#888; }
.topbar-user { display:flex; align-items:center; gap:10px; }
.user-avatar { width:38px; height:38px; background:linear-gradient(135deg,#ff6f00,#ffa726);
    border-radius:50%; display:flex; align-items:center; justify-content:center;
    color:#fff; font-weight:700; font-size:16px; }
.content-area { padding:25px 30px; }

/* ===== CARDS & STATS ===== */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:20px; margin-bottom:25px; }
.stat-card {
    background:#fff; border-radius:var(--radius); padding:25px; box-shadow:var(--shadow);
    display:flex; align-items:center; gap:20px; transition:.2s;
}
.stat-card:hover { transform:translateY(-2px); }
.stat-icon { width:60px; height:60px; border-radius:12px; display:flex; align-items:center;
    justify-content:center; font-size:26px; flex-shrink:0; }
.stat-icon.blue { background:#e8eaf6; }
.stat-icon.orange { background:#fff3e0; }
.stat-icon.green { background:#e8f5e9; }
.stat-icon.red { background:#ffebee; }
.stat-info h3 { font-size:28px; font-weight:800; color:var(--dark); }
.stat-info p { font-size:13px; color:#888; }

.card { background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; margin-bottom:25px; }
.card-header { padding:18px 25px; border-bottom:1px solid #f0f0f0; display:flex;
    align-items:center; justify-content:space-between; }
.card-header h3 { font-size:16px; color:var(--primary); font-weight:700; }
.card-body { padding:25px; }

/* ===== TABLE ===== */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:14px; }
thead th { background:#f5f6fa; color:#555; font-weight:700; padding:12px 15px;
    text-align:left; border-bottom:2px solid #e0e0e0; white-space:nowrap; }
tbody td { padding:12px 15px; border-bottom:1px solid #f5f5f5; vertical-align:middle; }
tbody tr:hover { background:#fafafa; }
.badge { display:inline-block; padding:4px 10px; border-radius:20px; font-size:11px; font-weight:700; }
.badge-success { background:#e8f5e9; color:#2e7d32; }
.badge-danger { background:#ffebee; color:#c62828; }
.badge-warning { background:#fff8e1; color:#f57f17; }
.badge-info { background:#e3f2fd; color:#01579b; }
.badge-secondary { background:#f5f5f5; color:#607d8b; }

/* ===== FORMS ===== */
.form-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:20px; }
.form-group label { font-size:13px; font-weight:600; color:#555; display:block; margin-bottom:6px; }
.form-group input, .form-group select, .form-group textarea {
    width:100%; padding:11px 14px; border:2px solid #e0e0e0; border-radius:8px;
    font-size:14px; transition:.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color:var(--primary); outline:none;
}
.form-group textarea { resize:vertical; min-height:100px; }
.form-actions { display:flex; gap:10px; margin-top:20px; flex-wrap:wrap; }

/* ===== EXAM PAGE ===== */
.exam-wrapper { min-height:100vh; background:var(--light); }
.exam-header {
    background:linear-gradient(135deg,#1a237e,#3949ab); color:#fff;
    padding:15px 30px; display:flex; align-items:center; justify-content:space-between;
    position:sticky; top:0; z-index:100;
}
.exam-header h2 { font-size:18px; font-weight:700; }
.exam-timer {
    background:rgba(255,255,255,0.15); padding:10px 20px; border-radius:30px;
    font-size:22px; font-weight:800; letter-spacing:2px; font-family:monospace;
    border:2px solid rgba(255,255,255,0.3);
}
.exam-timer.warning { background:rgba(255,111,0,0.3); border-color:#ff6f00; color:#ffcc02; }
.exam-timer.danger { background:rgba(198,40,40,0.4); border-color:#ef5350; animation:pulse 1s infinite; color:#fff; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }
.exam-body { max-width:900px; margin:0 auto; padding:30px 20px; }
.question-card {
    background:#fff; border-radius:var(--radius); box-shadow:var(--shadow);
    padding:30px; margin-bottom:20px; border-left:5px solid var(--primary);
}
.q-number { font-size:12px; color:#888; font-weight:600; margin-bottom:8px; }
.q-text { font-size:16px; font-weight:600; color:#222; margin-bottom:20px; line-height:1.6; }
.options-list { list-style:none; }
.options-list li { margin-bottom:10px; }
.option-label {
    display:flex; align-items:center; gap:12px; padding:13px 18px; border-radius:8px;
    border:2px solid #e0e0e0; cursor:pointer; transition:.2s; font-size:14.5px;
}
.option-label:hover { border-color:var(--primary); background:#e8eaf6; }
.option-label input[type=radio] { width:18px; height:18px; accent-color:var(--primary); }
input[type=radio]:checked + .option-label,
.option-label:has(input[type=radio]:checked) { border-color:var(--primary); background:#e8eaf6; color:var(--primary); font-weight:600; }

/* Option labels with checked state */
.option-item input[type=radio]:checked ~ label { border-color:var(--primary); background:#e8eaf6; }

/* Student dashboard */
.student-layout { display:flex; min-height:100vh; }
.exam-card-student {
    background:#fff; border-radius:var(--radius); box-shadow:var(--shadow);
    padding:25px; margin-bottom:15px; display:flex; align-items:center;
    justify-content:space-between; gap:20px; flex-wrap:wrap;
}
.exam-card-info h3 { font-size:16px; font-weight:700; color:var(--primary); margin-bottom:5px; }
.exam-card-info p { font-size:13px; color:#888; }
.exam-meta { display:flex; gap:15px; flex-wrap:wrap; margin-top:8px; }
.exam-meta span { font-size:12px; background:#f5f6fa; padding:4px 10px; border-radius:20px; color:#555; }

/* Certificate */
.certificate-page { min-height:100vh; background:#f5f0e8; display:flex; align-items:center; justify-content:center; padding:30px; }
.certificate-box {
    background:#fff; max-width:800px; width:100%; padding:60px 70px;
    border:12px solid #1a237e; border-radius:5px; text-align:center;
    box-shadow:0 0 0 4px #ff6f00, 0 20px 60px rgba(0,0,0,0.2);
    position:relative;
}
.cert-header { margin-bottom:30px; }
.cert-logo { font-size:50px; margin-bottom:10px; }
.cert-title { font-size:13px; letter-spacing:5px; color:#888; text-transform:uppercase; margin-bottom:5px; }
.cert-main-title { font-size:38px; font-weight:800; color:#1a237e; font-family:Georgia,serif; }
.cert-body { margin:20px 0; }
.cert-body p { font-size:16px; color:#555; margin-bottom:10px; }
.cert-name { font-size:36px; color:#ff6f00; font-family:Georgia,serif; font-weight:700;
    border-bottom:2px solid #ff6f00; display:inline-block; padding-bottom:5px; margin:10px 0; }
.cert-course { font-size:20px; font-weight:700; color:#1a237e; margin-top:10px; }
.cert-footer { margin-top:40px; display:flex; justify-content:space-around; }
.cert-sign { text-align:center; }
.cert-sign-line { width:150px; border-top:2px solid #333; margin:0 auto 5px; }
.cert-sign p { font-size:12px; color:#888; }

/* Responsive */
@media(max-width:768px) {
    .sidebar { transform:translateX(-100%); }
    .main-content { margin-left:0; }
    .content-area { padding:15px; }
    .stats-grid { grid-template-columns:1fr 1fr; }
}

/* Utilities */
.text-center{text-align:center} .text-right{text-align:right}
.mt-1{margin-top:8px} .mt-2{margin-top:15px} .mt-3{margin-top:25px}
.mb-1{margin-bottom:8px} .mb-2{margin-bottom:15px} .mb-3{margin-bottom:25px}
.d-flex{display:flex} .align-center{align-items:center} .gap-2{gap:10px}
.flex-wrap{flex-wrap:wrap} .justify-between{justify-content:space-between}
.w-100{width:100%} .text-muted{color:#888} .text-small{font-size:12px}
.no-data { text-align:center; padding:50px; color:#aaa; }
.no-data .icon { font-size:48px; display:block; margin-bottom:10px; }

/* Progress bar */
.progress { background:#e0e0e0; border-radius:20px; height:8px; overflow:hidden; }
.progress-bar { height:100%; border-radius:20px; background:linear-gradient(90deg,#1a237e,#3949ab); transition:.3s; }

/* Alert */
.alert { padding:12px 18px; border-radius:8px; margin-bottom:15px; font-size:14px; }
.alert-success { background:#e8f5e9; color:#2e7d32; border:1px solid #a5d6a7; }
.alert-danger { background:#ffebee; color:#c62828; border:1px solid #ef9a9a; }
.alert-info { background:#e3f2fd; color:#01579b; border:1px solid #90caf9; }
.alert-warning { background:#fff8e1; color:#f57f17; border:1px solid #ffe082; }

/* Page header */
.page-header { margin-bottom:25px; }
.page-header h2 { font-size:24px; font-weight:800; color:var(--primary); }
.page-header p { color:#888; font-size:14px; margin-top:3px; }

/* Modal overlay for instructions */
.modal-overlay {
    position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:999;
    display:flex; align-items:center; justify-content:center; padding:20px;
}
.modal-box {
    background:#fff; border-radius:16px; padding:40px; max-width:650px; width:100%;
    box-shadow:0 20px 60px rgba(0,0,0,0.3);
}
.modal-box h2 { color:var(--primary); margin-bottom:15px; }
.modal-box ul { padding-left:20px; line-height:2; font-size:14.5px; color:#444; }

.question-nav { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.q-nav-btn {
    width:36px; height:36px; border-radius:8px; border:2px solid #e0e0e0;
    background:#fff; cursor:pointer; font-size:13px; font-weight:600;
    display:flex; align-items:center; justify-content:center; transition:.2s;
}
.q-nav-btn.answered { background:var(--primary); color:#fff; border-color:var(--primary); }
.q-nav-btn.current { border-color:var(--accent); color:var(--accent); }

.result-summary {
    background:linear-gradient(135deg,#1a237e,#3949ab); color:#fff;
    border-radius:var(--radius); padding:40px; text-align:center; margin-bottom:25px;
}
.result-score { font-size:64px; font-weight:900; line-height:1; }
.result-label { font-size:16px; opacity:0.8; margin-top:5px; }
.result-status { display:inline-block; padding:8px 25px; border-radius:30px; font-size:18px; font-weight:700; margin-top:15px; }
.result-pass { background:#4caf50; }
.result-fail { background:#f44336; }
