/* ============================================================
   Victor 5. razred — base styles
   Mobile-first, no framework, kid-friendly Croatian UI
   v3: extended with content page components
   ============================================================ */

/* ----- Reset and base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #f5f7fa;
    min-height: 100vh;
}
img, svg { max-width: 100%; height: auto; }
a { color: #003DA5; }
a:hover { color: #002a73; }
small { color: #888; font-weight: normal; }

/* ----- Top bar ----- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #003DA5;
    color: #fff;
    padding: 12px 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.topbar-admin { background: #6A4C93; }
.topbar-left .brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
}
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 0.9rem; }
.topbar-right .user-label { font-weight: 600; }
.topbar-right .btn-link {
    color: #fff;
    text-decoration: underline;
}
.topbar-right .btn-link:hover { text-decoration: none; }

/* ----- Main nav ----- */
.mainnav {
    background: #fff;
    border-bottom: 1px solid #e0e4ec;
    padding: 0 16px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.mainnav .navlink {
    display: inline-block;
    padding: 14px 14px 12px;
    color: #333;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    font-size: 0.95rem;
}
.mainnav .navlink:hover { color: #003DA5; }
.mainnav .navlink.active {
    color: #003DA5;
    border-bottom-color: #003DA5;
}

/* ----- Main content ----- */
.content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}
.content h1 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    color: #003DA5;
}
.content h2 {
    margin: 24px 0 12px 0;
    font-size: 1.25rem;
    color: #333;
}
.subtitle {
    margin: 0 0 24px 0;
    color: #666;
    font-size: 1rem;
}

/* ----- Login page ----- */
.login-page {
    background: linear-gradient(135deg, #003DA5 0%, #C8102E 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.login-card h1 {
    margin: 0 0 4px 0;
    font-size: 1.6rem;
    color: #003DA5;
    text-align: center;
}
.login-card .tagline {
    margin: 0 0 24px 0;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}
.login-card label {
    display: block;
    margin: 14px 0 4px 0;
    font-weight: 600;
    font-size: 0.9rem;
}
.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fafafa;
}
.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
    outline: 2px solid #003DA5;
    background: #fff;
}
.checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 16px !important;
    font-weight: normal !important;
    cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}
.btn-primary {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background: #003DA5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.btn-primary:hover { background: #002a73; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary-inline {
    display: inline-block;
    background: #003DA5;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}
.footer-note {
    margin-top: 20px;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

/* ----- Boxes / cards ----- */
.error-box {
    background: #fee;
    color: #b00020;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    border-left: 4px solid #b00020;
    font-size: 0.95rem;
}
.placeholder-box {
    background: #fff;
    border: 2px dashed #ccd;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}
.placeholder-box h2 {
    margin: 0 0 12px 0;
    color: #003DA5;
    font-size: 1.2rem;
}
.placeholder-box ul { padding-left: 20px; }
.placeholder-box li { margin: 6px 0; }

.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.info-card h2 { margin-top: 0; }
.info-card.success { border-left: 6px solid #2E7D32; }

.badge-info {
    display: inline-block;
    background: #fff8e1;
    color: #8d6e00;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 8px;
}

/* ----- Stats grid (admin) ----- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.stat-card-action {
    background: #fff8e1;
    border-left: 4px solid #f9a825;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #003DA5;
    line-height: 1.1;
}
.stat-card-action .stat-value { color: #f9a825; }
.stat-label { font-size: 0.85rem; color: #666; margin-top: 4px; }

/* ----- Day progress bar (top of danas.php) ----- */
.day-progress-bar {
    position: relative;
    background: #e0e4ec;
    border-radius: 12px;
    height: 30px;
    overflow: hidden;
    margin: 16px 0 24px;
}
.day-progress-fill {
    background: linear-gradient(90deg, #003DA5, #4caf50);
    height: 100%;
    transition: width 0.5s ease;
}
.day-progress-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    font-size: 0.9rem;
}

/* ----- Block cards (today/danas.php) ----- */
.block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.block-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-top: 5px solid var(--accent, #888);
    transition: opacity 0.3s, transform 0.2s;
}
.block-card.done {
    opacity: 0.85;
    background: #f4faf5;
}
.block-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.block-meta { display: flex; align-items: center; gap: 8px; }
.block-emoji { font-size: 1.4rem; }
.block-subj { font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.block-time {
    background: #f0f4f8;
    color: #555;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}
.block-num { color: #888; font-size: 0.85rem; }
.lesson-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid #eee;
}
.lesson-row:first-of-type { border-top: none; }
.lesson-row.lesson-done .lesson-title {
    text-decoration: line-through;
    color: #888;
}
.lesson-title { flex: 1 1 200px; font-size: 0.95rem; }
.lesson-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-link-small {
    display: inline-block;
    color: #003DA5;
    text-decoration: none;
    background: #eef2f8;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid #d4dbe7;
}
.btn-link-small:hover { background: #dde6f0; }
.btn-complete {
    background: #2E7D32;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}
.btn-complete:hover { background: #1f5723; }
.btn-complete:disabled { opacity: 0.5; cursor: wait; }
.btn-undo {
    background: transparent;
    color: #888;
    border: 1px solid #ccc;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}
.btn-undo:hover { color: #b00020; border-color: #b00020; }
.done-badge {
    color: #2E7D32;
    font-weight: 600;
    font-size: 0.9rem;
}
.block-note {
    margin-top: 8px;
    padding: 8px;
    background: #fffbea;
    border-left: 3px solid #f9a825;
    font-size: 0.85rem;
    color: #5a4500;
}
.block-empty {
    padding: 16px 0;
    color: #888;
    font-style: italic;
    text-align: center;
}

/* ----- Week grid (tjedan.php) ----- */
.week-nav {
    display: flex;
    justify-content: space-between;
    margin: 12px 0 20px;
}
.week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.week-day {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.week-day.is-today {
    border: 2px solid #003DA5;
    background: #f0f4ff;
}
.week-day-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.week-day-date { color: #666; font-size: 0.85rem; }
.week-day-num { color: #003DA5; font-size: 0.8rem; font-weight: 600; }
.week-day-empty { color: #aaa; font-style: italic; padding: 10px 0; }
.week-block-list { list-style: none; padding: 0; margin: 0; }
.week-block {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-left: 3px solid var(--accent, #888);
    margin-bottom: 4px;
    background: #fafbfc;
    border-radius: 4px;
    font-size: 0.85rem;
}
.week-block.done { background: #f4faf5; opacity: 0.75; }
.week-emoji { font-size: 1rem; }
.week-subj { flex: 1; font-weight: 600; }
.week-min { color: #888; font-size: 0.75rem; }
.week-block .check { color: #2E7D32; font-weight: 700; }

/* ----- Subjects grid (predmeti.php) ----- */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.subject-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    text-decoration: none;
    color: #1a1a1a;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border-left: 6px solid var(--accent, #888);
    transition: transform 0.15s, box-shadow 0.15s;
}
.subject-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: #1a1a1a;
}
.subject-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.subject-emoji { font-size: 1.5rem; }
.subject-name { font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.subject-progress-bar {
    background: #e0e4ec;
    border-radius: 8px;
    height: 10px;
    overflow: hidden;
    margin: 8px 0;
}
.subject-progress-fill {
    background: var(--accent, #003DA5);
    height: 100%;
    transition: width 0.4s ease;
}
.subject-progress-label { font-size: 0.85rem; color: #666; }

/* ----- Subject detail (predmet.php) ----- */
.subject-header {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-top: 6px solid var(--accent, #888);
    text-align: center;
}
.subject-emoji-large {
    font-size: 3rem;
    display: block;
    margin-bottom: 4px;
}
.subject-header h1 { color: var(--accent); }
.lessons-week {
    margin: 24px 0;
    background: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.week-title {
    margin: 0 0 12px 0;
    color: #003DA5;
    font-size: 1.05rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

/* ----- Lektira (lektira.php) ----- */
.books-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.book-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border-left: 4px solid #ccc;
}
.book-card.status-citam { border-left-color: #f9a825; }
.book-card.status-zavrsio { border-left-color: #2E7D32; background: #f4faf5; }
.book-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}
.book-header h3 { margin: 0; font-size: 1rem; color: #003DA5; }
.book-author { margin: 2px 0 0; color: #666; font-size: 0.85rem; }
.book-status { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.book-notes { font-size: 0.85rem; color: #555; margin: 8px 0; }
.book-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.btn-status {
    background: #003DA5;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}
.btn-status.secondary { background: #888; }
.btn-status:hover { opacity: 0.9; }
.btn-status:disabled { opacity: 0.5; cursor: wait; }
.book-summary-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}
.book-summary-section h4 { margin: 0 0 8px; font-size: 0.95rem; }
.book-summary-input {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
}
.word-count { font-size: 0.8rem; color: #888; margin: 4px 0 8px; }
.word-count-ok { color: #2E7D32; font-weight: 600; }
.btn-submit-summary {
    background: #2E7D32;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.btn-submit-summary:disabled { opacity: 0.5; cursor: not-allowed; }
.book-summary-text {
    background: #fafbfc;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: pre-wrap;
}
.admin-feedback {
    margin-top: 10px;
    background: #e8f5e9;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}
.lektira-list { padding-left: 20px; }
.lektira-list li { margin: 6px 0; }

/* ----- Glossary themes overview (glosari.php) ----- */
.glossary-themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.glossary-theme-card {
    display: block;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: #1a1a1a;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}
.glossary-theme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: #1a1a1a;
}
.glossary-theme-card h3 {
    margin: 0 0 4px;
    color: #003DA5;
    font-size: 1rem;
}
.theme-en { margin: 0; color: #888; font-size: 0.85rem; font-style: italic; }
.theme-desc { margin: 8px 0; color: #555; font-size: 0.85rem; }
.theme-progress-bar {
    background: #e0e4ec;
    border-radius: 6px;
    height: 8px;
    margin: 8px 0 4px;
    overflow: hidden;
}
.theme-progress-fill {
    background: #FFCD00;
    height: 100%;
    transition: width 0.4s ease;
}
.theme-progress-label { font-size: 0.8rem; color: #666; }

/* ----- Glossary practice (glosar.php) ----- */
.glossary-instructions {
    background: #fffbea;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #FFCD00;
    margin-bottom: 16px;
    font-size: 0.95rem;
}
.glossary-words-list {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.glossary-word-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1.2fr;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
}
.glossary-word-row:last-child { border-bottom: none; }
.glossary-word-row.status-correct,
.glossary-word-row.status-auto-correct { background: #f1f8f3; }
.glossary-word-row.status-incorrect,
.glossary-word-row.status-auto-wrong { background: #fef2f2; }
.glossary-word-row.status-needs { background: #fff8e1; }
.glossary-word-row.status-pending { background: #f0f4ff; }
.word-hr-cell strong { font-size: 1rem; }
.word-input-cell { display: flex; gap: 6px; }
.word-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
}
.btn-submit-word {
    background: #003DA5;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}
.btn-submit-word:hover { background: #002a73; }
.btn-submit-word:disabled { opacity: 0.5; cursor: wait; }
.word-status-cell { font-size: 0.85rem; }
.word-status-badge { font-weight: 600; }
.word-tries { color: #888; font-size: 0.8rem; margin-left: 4px; }

/* ----- Progress dashboard (napredak.php) ----- */
.progress-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.big-stat {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.big-stat-value {
    font-size: 2.4rem;
    font-weight: 700;
    color: #003DA5;
    line-height: 1.1;
}
.big-stat-label {
    font-size: 0.95rem;
    color: #333;
    font-weight: 600;
    margin-top: 4px;
}
.big-stat-detail { font-size: 0.8rem; color: #888; margin-top: 2px; }
.progress-by-subject {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.subj-row {
    display: grid;
    grid-template-columns: 200px 1fr 100px;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f4f4f4;
}
.subj-row:last-child { border-bottom: none; }
.subj-row-left { display: flex; align-items: center; gap: 8px; }
.subj-row-name { font-weight: 600; }
.subj-row-bar {
    background: #e0e4ec;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
}
.subj-row-fill {
    background: var(--accent, #003DA5);
    height: 100%;
    transition: width 0.4s ease;
}
.subj-row-right { text-align: right; font-size: 0.9rem; }
.subj-row-pct { color: #003DA5; font-weight: 700; margin-left: 6px; }

/* ----- Mobile tweaks ----- */
@media (max-width: 600px) {
    .topbar { padding: 10px 12px; }
    .topbar-right { gap: 10px; font-size: 0.85rem; }
    .content { padding: 16px 12px 60px; }
    .content h1 { font-size: 1.4rem; }
    .mainnav { padding: 0 8px; }
    .mainnav .navlink { padding: 12px 10px 10px; font-size: 0.9rem; }

    .block-grid { grid-template-columns: 1fr; }
    .lesson-row { flex-direction: column; align-items: flex-start; }
    .lesson-actions { width: 100%; }

    .week-grid { grid-template-columns: 1fr 1fr; }
    .subj-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .subj-row-right { text-align: left; }

    .glossary-word-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .login-card { padding: 24px 20px; }
}
/* ============================================================
   v4 admin additions — append to existing style.css
   ============================================================ */

/* Admin nav variant */
.mainnav-admin .navlink.active {
    color: #6A4C93;
    border-bottom-color: #6A4C93;
}
.mainnav-admin .navlink:hover {
    color: #6A4C93;
}

/* Admin tables */
.admin-table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-size: 0.9rem;
}
.admin-table th, .admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.admin-table th {
    background: #f5f7fa;
    color: #555;
    font-weight: 600;
}
.admin-table tr:last-child td { border-bottom: none; }

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.filter-bar a {
    padding: 8px 14px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
}
.filter-bar a:hover { background: #f0f4f8; }
.filter-bar a.active { background: #6A4C93; color: #fff; }

/* Glossary review row */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.review-row {
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.review-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 6px;
}
.review-content { margin-bottom: 10px; }
.review-word { font-size: 0.95rem; margin-bottom: 6px; }
.review-answer {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #f5f7fa;
}
.review-answer.answer-match { background: #f1f8f3; }
.review-answer.answer-nomatch { background: #fef2f2; }
.review-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.btn-rev {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}
.btn-rev-correct { background: #2E7D32; }
.btn-rev-needs { background: #f9a825; }
.btn-rev-incorrect { background: #c62828; }
.btn-rev:hover { opacity: 0.9; }
.btn-rev:disabled { opacity: 0.5; cursor: wait; }
.review-current {
    font-size: 0.85rem;
    color: #666;
    border-top: 1px dashed #eee;
    padding-top: 6px;
}

/* Lektira grading */
.lektira-review-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border-left: 4px solid #6A4C93;
}
.lektira-review-card h3 {
    margin: 0 0 4px;
    color: #003DA5;
    font-size: 1.05rem;
}
.lektira-summary-display {
    background: #fafbfc;
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}
.word-count-display { font-size: 0.85rem; color: #888; }
.lektira-grade-form {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}
.grade-buttons { display: flex; gap: 6px; margin: 8px 0; }
.grade-btn {
    width: 40px; height: 40px;
    background: #f0f4f8;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: #555;
}
.grade-btn:hover { background: #e0e8f0; }
.grade-btn.selected {
    background: #2E7D32;
    border-color: #1f5723;
    color: #fff;
}
.lektira-comment {
    width: 100%;
    min-height: 70px;
    padding: 8px;
    margin-top: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}
.btn-submit-grade {
    margin-top: 8px;
    background: #2E7D32;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.btn-submit-grade:disabled { opacity: 0.5; cursor: wait; }
.lektira-grade-existing {
    background: #f1f8f3;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 10px;
}

/* Reset password modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.modal-card h2 { margin: 0 0 12px; color: #6A4C93; }
.modal-card label {
    display: block;
    margin: 14px 0 4px;
    font-weight: 600;
    font-size: 0.9rem;
}
.modal-card input[type="text"],
.modal-card input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}
.btn-cancel {
    background: transparent;
    color: #666;
    border: 1px solid #ccc;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}
.btn-reset-password {
    background: #c62828;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}
.btn-reset-password:hover { background: #962020; }
/* ============================================================
   v5 quiz CSS — append to existing style.css
   ============================================================ */

/* Quiz overview cards */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.quiz-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border-left: 5px solid var(--accent, #888);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quiz-card.passed { background: #f4faf5; opacity: 0.85; }
.quiz-card.no-pool { background: #fafafa; opacity: 0.6; }
.quiz-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
}
.quiz-card-meta { font-size: 0.85rem; color: #666; display: flex; flex-direction: column; gap: 2px; }
.quiz-card-status .badge-pass { color: #2E7D32; font-weight: 600; }
.quiz-card-status .badge-fail { color: #c62828; font-weight: 600; }
.quiz-card-status .badge-pending { color: #f9a825; font-weight: 600; }

/* Active quiz */
.quiz-active {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border-top: 5px solid var(--accent, #003DA5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}
.quiz-header h1 { margin: 0; font-size: 1.4rem; }
.quiz-timer {
    background: #003DA5;
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}
.quiz-timer.warning {
    background: #c62828;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.quiz-instructions {
    background: #fff8e1;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.quiz-q {
    background: #fafbfc;
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 14px;
}
.quiz-q-num {
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    margin-bottom: 6px;
}
.quiz-q-prompt {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 10px;
}
.quiz-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e4ec;
    margin-bottom: 4px;
    cursor: pointer;
}
.quiz-option:hover { background: #f0f4f8; }
.quiz-option input[type="radio"] { width: 18px; height: 18px; }
.quiz-text-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}
.quiz-hint {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
}
.quiz-hint summary { cursor: pointer; }
.quiz-submit-bar {
    margin-top: 20px;
    text-align: center;
}
.quiz-submit-bar .btn-primary {
    width: auto;
    min-width: 200px;
}

/* Quiz result */
.quiz-result {
    text-align: center;
    padding: 30px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}
.quiz-result.pass { background: #e8f5e9; }
.quiz-result.fail { background: #fef2f2; }
.big-icon { font-size: 3rem; display: block; }
.quiz-result-headline h2 { margin: 8px 0; }
.quiz-result-stats { font-size: 1.2rem; }
.quiz-questions-review {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quiz-q-review {
    padding: 14px;
    border-radius: 8px;
    background: #fff;
    border-left: 4px solid #ccc;
}
.quiz-q-review.correct { border-left-color: #2E7D32; }
.quiz-q-review.wrong { border-left-color: #c62828; }
.quiz-q-your { padding: 6px 0; }
.quiz-q-correct { color: #2E7D32; font-size: 0.95rem; }
.quiz-q-expl {
    margin-top: 8px;
    padding: 8px;
    background: #fafbfc;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #555;
}

/* Admin coverage table */
.coverage-table { font-size: 0.85rem; }
.coverage-table th { text-align: center; padding: 6px 4px; }
.coverage-table td { text-align: center; padding: 4px; }
.coverage-table td a { text-decoration: none; color: inherit; display: block; padding: 4px; }
.coverage-table td.cov-empty { background: #fef2f2; color: #c62828; }
.coverage-table td.cov-low { background: #fff3e0; color: #e65100; }
.coverage-table td.cov-partial { background: #fffde7; color: #8d6e00; }
.coverage-table td.cov-full { background: #e8f5e9; color: #2e7d32; }

/* Question rows */
.qq-list { display: flex; flex-direction: column; gap: 8px; }
.qq-row {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
}
.qq-meta { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.qq-type, .qq-ishod, .qq-diff {
    background: #f0f4f8;
    color: #555;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}
.qq-prompt { font-size: 0.95rem; }
.qq-answer { font-size: 0.9rem; color: #2e7d32; }
.qq-actions { white-space: nowrap; }

/* Quiz edit form */
.quiz-edit-form {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.quiz-edit-form label {
    display: block;
    margin: 14px 0 4px;
    font-weight: 600;
    font-size: 0.9rem;
}
.quiz-edit-form input[type="text"],
.quiz-edit-form input[type="number"],
.quiz-edit-form select,
.quiz-edit-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}
.quiz-edit-form textarea { resize: vertical; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
