/* ============================================================
   style.css – Online testovací systém
   Zahrnuje: student UI + admin panel
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue:       #2563eb;
    --blue-dark:  #1d4ed8;
    --blue-light: #eff6ff;
    --green:      #16a34a;
    --green-bg:   #f0fdf4;
    --yellow:     #d97706;
    --yellow-bg:  #fffbeb;
    --red:        #dc2626;
    --red-bg:     #fef2f2;
    --gray-50:    #f8fafc;
    --gray-100:   #f1f5f9;
    --gray-200:   #e2e8f0;
    --gray-300:   #cbd5e1;
    --gray-400:   #94a3b8;
    --gray-500:   #64748b;
    --gray-600:   #475569;
    --gray-700:   #334155;
    --gray-800:   #1e293b;
    --radius:     12px;
    --shadow:     0 2px 12px rgba(0,0,0,.08);
    --shadow-md:  0 4px 24px rgba(0,0,0,.12);
    --transition: .18s ease;
    --nav-h:      58px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* --- Layout – student --- */
.container       { max-width: 720px;  margin: 0 auto; padding: 24px 16px 48px; }
.container-wide  { max-width: 1000px; margin: 0 auto; padding: 24px 16px 48px; }

/* --- Header --- */
.site-header            { text-align: center; padding: 32px 0 24px; }
.header-icon            { font-size: 3rem; margin-bottom: 8px; }
.site-header h1         { font-size: 1.9rem; font-weight: 700; color: var(--gray-800); }
.subtitle               { color: var(--gray-600); font-size: .95rem; margin-top: 4px; }

/* --- Card --- */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 28px;
    margin-bottom: 20px;
}

/* --- Start/login page --- */
.start-card h2  { font-size: 1.4rem; margin-bottom: 12px; color: var(--gray-700); }
.start-card > p { color: var(--gray-600); margin-bottom: 20px; }

.info-list { list-style: none; margin: 0 0 24px; }
.info-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    font-size: .95rem;
}
.info-list li:last-child { border-bottom: none; }

/* --- Forms --- */
.start-form     { display: flex; flex-direction: column; gap: 16px; }
.inline-form    { display: flex; flex-direction: column; gap: 14px; }
.form-group     { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
    font-weight: 600;
    font-size: .88rem;
    color: var(--gray-700);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="datetime-local"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    padding: 9px 13px;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    background: #fff;
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.field-hint {
    font-size: .78rem;
    color: var(--gray-500);
    margin-top: 2px;
}
.field-hint a { color: var(--blue); }
.form-select { padding: 9px 13px; }
.form-select-sm {
    padding: 5px 10px;
    border: 1.5px solid var(--gray-300);
    border-radius: 6px;
    font-size: .88rem;
    background: #fff;
    cursor: pointer;
}

.radio-group   { display: flex; flex-direction: column; gap: 8px; }
.radio-option, .checkbox-option {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: pointer; font-size: .93rem;
    padding: 8px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    background: var(--gray-50);
    transition: border-color var(--transition);
}
.radio-option:hover, .checkbox-option:hover { border-color: var(--blue); }
.radio-option input, .checkbox-option input { margin-top: 2px; accent-color: var(--blue); }
.radio-option small, .checkbox-option small { color: var(--gray-500); }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 20px;
    border: none; border-radius: 8px;
    font-size: .93rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}
.btn:active  { transform: scale(.97); }
.btn-lg      { padding: 12px 26px; font-size: 1.03rem; }
.btn-sm      { padding: 5px 12px; font-size: .82rem; border-radius: 6px; }

.btn-primary       { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }

.btn-secondary       { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }

.btn-danger       { background: #e74c3c; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.btn-danger:hover { background: #c0392b; }

/* --- Progress bar --- */
.progress-bar-wrap {
    background: var(--gray-200);
    border-radius: 50px;
    height: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), #3b82f6);
    border-radius: 50px;
    transition: width .4s ease;
}
.progress-text {
    text-align: right;
    font-size: .82rem;
    color: var(--gray-600);
    margin-bottom: 16px;
}

/* --- Test otázky --- */
.topic-section { margin-bottom: 28px; }
.topic-header  {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--blue-light);
}
.topic-badge {
    background: var(--blue);
    color: #fff;
    border-radius: 6px;
    padding: 2px 10px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.topic-title { font-size: 1.08rem; font-weight: 700; color: var(--gray-800); }

.question-block {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition);
    border-radius: 8px;
}
.question-block:last-child { border-bottom: none; }
.question-block.unanswered-highlight {
    background: var(--yellow-bg);
    padding: 14px;
    border-left: 4px solid var(--yellow);
    margin-bottom: 4px;
}

.question-text {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
    font-size: .97rem;
    line-height: 1.5;
    white-space: pre-wrap;
}
.q-number {
    display: inline-block;
    background: var(--blue-light);
    color: var(--blue);
    border-radius: 50%;
    width: 26px; height: 26px;
    text-align: center; line-height: 26px;
    font-size: .8rem; font-weight: 700;
    margin-right: 8px;
    flex-shrink: 0;
}
.multi-hint { font-size: .78rem; font-weight: 400; color: var(--gray-400); margin-left: 4px; }

/* --- Odpovědi --- */
.options { display: flex; flex-direction: column; gap: 8px; padding-left: 34px; }

.option-label {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    background: var(--gray-50);
    transition: border-color var(--transition), background var(--transition);
    user-select: none;
}
.option-label:hover { border-color: var(--blue); background: var(--blue-light); }
.option-label input[type="radio"],
.option-label input[type="checkbox"] {
    margin-top: 2px; accent-color: var(--blue); flex-shrink: 0;
    width: 17px; height: 17px; cursor: pointer;
}
.option-label input:checked + .option-text { color: var(--blue); font-weight: 600; }
.option-label:has(input:checked) { border-color: var(--blue); background: var(--blue-light); }
.option-text { font-size: .93rem; line-height: 1.45; }

/* --- Matching --- */
.matching-table  { width: 100%; margin-top: .5rem; }
.matching-header {
    display: flex;
    font-weight: 600;
    padding: .4rem .6rem;
    background: #eef2ff;
    border-radius: 6px 6px 0 0;
    gap: 1rem;
    color: #3730a3;
    font-size: .83rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.matching-header span:first-child { flex: 0 0 40%; }
.matching-row {
    display: flex; align-items: center; gap: 1rem;
    padding: .5rem .2rem;
    border-bottom: 1px solid #e5e7eb;
}
.matching-row:last-child { border-bottom: none; }
.matching-left {
    flex: 0 0 40%;
    font-weight: 500;
    color: #1e3a5f;
    font-size: .92rem;
}
.matching-select {
    flex: 1;
    padding: .4rem .7rem;
    border: 1.5px solid #c7d2fe;
    border-radius: 6px;
    font-size: .92rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.matching-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

/* --- Submit --- */
.submit-section  { text-align: center; padding: 28px; background: linear-gradient(135deg, #eff6ff, #fff); }
.submit-info     { color: var(--gray-600); margin-bottom: 16px; font-size: .92rem; }

/* --- Alerts --- */
.alert {
    padding: 11px 15px;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 14px;
    border-left: 4px solid;
}
.alert-error   { background: var(--red-bg);    border-color: var(--red);    color: #991b1b; }
.alert-warning { background: var(--yellow-bg); border-color: var(--yellow); color: #92400e; }
.alert-success { background: var(--green-bg);  border-color: var(--green);  color: #14532d; }
.alert-info    { background: #eff6ff;           border-color: #3b82f6;       color: #1e40af; }

/* --- Results --- */
.result-student-card {
    text-align: center;
    background: linear-gradient(135deg, var(--blue) 0%, #3b82f6 100%);
    color: #fff;
}
.result-student-name { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.result-meta         { opacity: .85; font-size: .9rem; }

.score-card { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.score-circle {
    min-width: 110px; min-height: 110px;
    border-radius: 50%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    border: 5px solid;
    padding: 12px; flex-shrink: 0;
}
.score-pct      { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.score-fraction { font-size: .78rem; color: var(--gray-600); }
.score-info { flex: 1; }
.grade-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700; font-size: 1rem;
    margin-bottom: 14px;
}
.score-bar-wrap { background: var(--gray-200); border-radius: 50px; height: 10px; margin-bottom: 10px; overflow: hidden; }
.score-bar      { height: 100%; border-radius: 50px; transition: width 1s ease; }
.score-desc     { font-size: .9rem; color: var(--gray-600); }

/* Grade colours */
.grade-1 { color: #14532d; border-color: #16a34a; background: #dcfce7; }
.grade-2 { color: #1e3a5f; border-color: #2563eb; background: #dbeafe; }
.grade-3 { color: #713f12; border-color: #d97706; background: #fef3c7; }
.grade-4 { color: #7c2d12; border-color: #ea580c; background: #ffedd5; }
.grade-5 { color: #7f1d1d; border-color: #dc2626; background: #fee2e2; }
.grade-1.score-bar { background: #16a34a; }
.grade-2.score-bar { background: #2563eb; }
.grade-3.score-bar { background: #d97706; }
.grade-4.score-bar { background: #ea580c; }
.grade-5.score-bar { background: #dc2626; }

.grade-pill {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    font-weight: 700; font-size: .82rem; color: #fff;
    flex-shrink: 0;
}
.grade-1.grade-pill { background: #16a34a; }
.grade-2.grade-pill { background: #2563eb; }
.grade-3.grade-pill { background: #d97706; }
.grade-4.grade-pill { background: #ea580c; }
.grade-5.grade-pill { background: #dc2626; }

.section-title   { font-size: 1.08rem; font-weight: 700; margin-bottom: 12px; }
.wrong-intro     { color: var(--gray-600); margin-bottom: 10px; font-size: .93rem; }
.wrong-topics-list  { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.wrong-topic-item   {
    display: flex; align-items: center; gap: 10px;
    background: var(--red-bg); border: 1px solid #fca5a5;
    border-radius: 8px; padding: 10px 14px; color: #7f1d1d; font-weight: 500;
}
.wrong-icon  { font-size: 1.1rem; }
.wrong-name  { font-size: .93rem; }
.all-passed  { font-size: 1rem; font-weight: 600; }
.actions-card { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* --- Footer --- */
.site-footer { text-align: center; color: var(--gray-400); font-size: .82rem; padding-top: 16px; }

/* --- Spinner/overlay --- */
.overlay     { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.overlay-box { background: #fff; border-radius: var(--radius); padding: 40px 56px; text-align: center; box-shadow: var(--shadow-md); }
.overlay-box p { margin-top: 16px; color: var(--gray-700); font-weight: 600; }
.spinner {
    width: 48px; height: 48px;
    border: 5px solid var(--gray-200);
    border-top-color: var(--blue);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ADMIN PANEL
   ============================================================ */

/* --- Admin layout --- */
.admin-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Admin nav --- */
.admin-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: #1e293b;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    overflow-x: auto;
}
.admin-nav-brand {
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
    padding-right: 1.5rem;
    white-space: nowrap;
    letter-spacing: -.01em;
}
.admin-nav-links {
    display: flex; align-items: center; gap: .2rem; flex: 1; overflow-x: auto;
}
.admin-nav-link {
    color: #94a3b8;
    text-decoration: none;
    padding: .5rem .85rem;
    border-radius: 7px;
    font-size: .87rem;
    font-weight: 500;
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.admin-nav-link:hover  { color: #fff; background: rgba(255,255,255,.1); }
.admin-nav-link.active { color: #fff; background: var(--blue); }
.admin-nav-logout {
    margin-left: .8rem;
    padding: .4rem 1rem;
    background: rgba(220,38,38,.75);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.admin-nav-logout:hover { background: #dc2626; }

/* --- Admin main --- */
.admin-main {
    flex: 1;
    padding: 1.5rem 1.5rem 3rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* --- Admin page header --- */
.admin-page-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .5rem;
    margin-bottom: 1.2rem;
}
.admin-page-header h1 {
    font-size: 1.5rem; font-weight: 700; margin: 0;
}

/* --- Stats grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.stats-grid-4 { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .9rem 1.1rem;
    display: flex; align-items: center; gap: .8rem;
}
.stat-icon { font-size: 1.5rem; }
.stat-body strong { display: block; font-size: 1.4rem; font-weight: 800; color: var(--blue); }
.stat-body span   { font-size: .78rem; color: var(--gray-500); }

/* --- Two-column layout --- */
.admin-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    align-items: start;
}
@media (max-width: 860px) { .admin-two-col { grid-template-columns: 1fr; } }

/* --- Card header row --- */
.card-header-row {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .5rem;
    margin-bottom: .9rem;
}
.card-header-row h2 { margin: 0; font-size: 1rem; }

/* --- Admin tables --- */
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th {
    background: var(--gray-50);
    color: var(--gray-600);
    padding: .5rem .7rem;
    text-align: left;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid var(--gray-200);
}
.admin-table td {
    padding: .55rem .7rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}
.admin-table tr:hover td { background: #f8fafd; }
.admin-table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* --- Filter bar --- */
.filter-bar {
    display: flex; gap: .6rem; flex-wrap: wrap; align-items: center;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 50px;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.badge-class    { background: var(--blue-light);   color: var(--blue); }
.badge-ok       { background: var(--green-bg);     color: var(--green); }
.badge-error    { background: var(--red-bg);        color: var(--red); }
.badge-count    { background: var(--gray-100);      color: var(--gray-700); text-decoration: none; }
.badge-count:hover { background: var(--gray-200); }
.badge-active   { background: #dcfce7; color: #15803d; }
.badge-scheduled{ background: #fef3c7; color: #92400e; }
.badge-inactive { background: var(--gray-100); color: var(--gray-500); }

/* --- Quick actions --- */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .8rem;
}
.qa-btn {
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    text-align: center;
    padding: 1.1rem .8rem;
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    text-decoration: none; color: inherit;
    transition: border-color var(--transition), background var(--transition);
}
.qa-btn:hover { border-color: var(--blue); background: var(--blue-light); }
.qa-btn span   { font-size: 1.8rem; }
.qa-btn strong { font-size: .9rem; color: var(--gray-800); }
.qa-btn small  { font-size: .75rem; color: var(--gray-500); }

/* --- Student profile --- */
.student-profile-card {
    display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-start;
}
.student-avatar {
    width: 64px; height: 64px;
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 700;
    flex-shrink: 0;
}
.student-info { flex: 1; }
.student-info h2 { margin: 0 0 .3rem; }
.student-info p  { font-size: .88rem; color: var(--gray-600); margin: .15rem 0; }
.student-actions { display: flex; flex-direction: column; gap: .4rem; align-items: flex-end; }

/* --- Topic error breakdown --- */
.topic-error-list   { display: flex; flex-direction: column; gap: .5rem; }
.topic-error-row    { display: flex; align-items: center; gap: .6rem; }
.topic-error-name   { font-size: .82rem; flex: 0 0 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-error-bar-wrap { flex: 1; height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.topic-error-bar    { height: 100%; background: var(--red); border-radius: 4px; }
.topic-error-cnt    { font-size: .78rem; font-weight: 700; color: var(--red); width: 30px; text-align: right; }

/* --- JSON / code editor --- */
.json-editor {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: .82rem;
    resize: vertical;
    width: 100%;
    padding: .6rem .8rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    background: #fdfdfd;
    line-height: 1.5;
    transition: border-color .15s;
}
.json-editor:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,.1); }
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: .8rem;
    overflow-x: auto;
    line-height: 1.6;
    max-height: 420px;
    overflow-y: auto;
}

/* --- Tab bar --- */
.tab-bar {
    display: flex; gap: 0; flex-wrap: wrap;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: -2px;
}
.tab-btn {
    padding: .55rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: color .15s, border-color .15s;
    margin-bottom: -2px;
}
.tab-btn:hover        { color: var(--gray-800); }
.tab-btn.active       { color: var(--blue); border-bottom-color: var(--blue); }
.tab-pane             { margin-top: .8rem; }

/* ── admin_detail.php ──────────────────────────────────────────────── */
.detail-header-card          { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.detail-meta h2              { margin: 0 0 .4rem; }
.detail-meta p               { margin: .2rem 0; color: var(--gray-600); font-size: .9rem; }
.grade-pill-lg               { display: inline-flex; align-items: center; justify-content: center;
                               width: 52px; height: 52px; border-radius: 50%; font-size: 1.5rem;
                               font-weight: 700; color: #fff; flex-shrink: 0; }
.topic-block                 { margin-bottom: 1.2rem; border: 1px solid var(--gray-200); border-radius: 10px; overflow: hidden; }
.topic-head                  { display: flex; align-items: center; justify-content: space-between;
                               padding: .7rem 1rem; background: #f8fafc; border-bottom: 1px solid var(--gray-200); }
.topic-head h3               { margin: 0; font-size: .95rem; }
.topic-score                 { font-size: .85rem; font-weight: 600; }
.topic-score.all-ok          { color: #16a34a; }
.topic-score.has-err         { color: #dc2626; }
.q-row                       { padding: .8rem 1rem; border-bottom: 1px solid #f0f2f5; }
.q-row:last-child            { border-bottom: none; }
.q-text                      { font-weight: 600; font-size: .92rem; margin-bottom: .5rem; }
.q-num                       { color: var(--gray-400); font-weight: 400; margin-right: .3rem; }
.answers-grid                { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .87rem; }
.ans-box                     { flex: 1; min-width: 180px; padding: .5rem .8rem; border-radius: 7px; }
.ans-box.student-correct     { background: #f0fdf4; border: 1px solid #86efac; }
.ans-box.student-wrong       { background: #fef2f2; border: 1px solid #fca5a5; }
.ans-box.correct-ans         { background: #eff6ff; border: 1px solid #93c5fd; }
.ans-label                   { font-size: .73rem; font-weight: 700; text-transform: uppercase;
                               letter-spacing: .04em; margin-bottom: .25rem; color: var(--gray-500); }
.ans-text                    { font-weight: 500; }
@media print {
    .admin-nav, .admin-page-header.no-print, .no-print { display: none !important; }
    .admin-main { padding: 0; }
}

/* --- Individual password rows --- */
.ind-pw-row {
    display: flex; gap: .4rem; align-items: center;
    margin-bottom: .35rem;
}
.ind-inp-email {
    flex: 2;
    padding: .4rem .7rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 6px;
    font-size: .85rem;
}
.ind-inp-pw {
    flex: 1;
    padding: .4rem .7rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 6px;
    font-size: .85rem;
}

/* --- Admin user badge --- */
.admin-user-badge {
    font-size: .82rem;
    color: var(--gray-500);
    padding: .3rem .7rem;
    background: var(--gray-100);
    border-radius: 50px;
}

/* --- Text helpers --- */
.text-muted   { color: var(--gray-500); }
.no-results   { text-align: center; padding: 2rem; color: var(--gray-500); }

/* --- Stat cards (admin_lesson_detail, dashboard) --- */
.stat-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: .85rem 1rem;
    text-align: center;
}
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); line-height: 1.2; }
.stat-label { font-size: .75rem; color: var(--gray-500); margin-top: .25rem; font-weight: 500; }

/* --- Print --- */
@media print {
    body { background: #fff; }
    .admin-nav, .btn, .filter-bar, .no-print { display: none !important; }
    .card  { box-shadow: none; border: 1px solid var(--gray-200); }
    .admin-main { padding: 0; }
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .admin-main        { padding: .8rem .8rem 2rem; }
    .score-card        { flex-direction: column; align-items: center; }
    .options           { padding-left: 0; }
    .topic-header      { flex-direction: column; align-items: flex-start; }
    .stats-grid        { grid-template-columns: repeat(2, 1fr); }
    .quick-actions     { grid-template-columns: repeat(2, 1fr); }
    .student-profile-card { flex-direction: column; }
    .student-actions   { align-items: flex-start; }
}
