/*
 * File Purpose: Defines global styling, layout rules, components, and responsive behavior.
 */
:root {
    --bg: #0f172a;
    --bg-soft: #020617;
    --surface: #0b1120;
    --surface-elevated: #0f172a;
    --surface-subtle: #020617;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --primary: #38bdf8;
    --primary-soft: rgba(56, 189, 248, 0.12);
    --primary-strong: #0ea5e9;
    --danger: #f97373;
    --border: #1f2937;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --shadow-soft: 0 18px 45px rgba(15,23,42,0.76);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top, #1d283a, #020617 56%);
}

.container {
    width: min(1120px, 94%);
    margin: 0 auto;
}

.site-header,
.site-footer {
    background: linear-gradient(90deg, rgba(15,23,42,0.96), rgba(15,23,42,0.9));
    border-bottom: 1px solid rgba(148,163,184,0.22);
}

.site-footer {
    border-top: 1px solid var(--border);
    border-bottom: none;
    padding: 16px 0;
    margin-top: 30px;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand {
    font-size: 1.2rem;
    text-decoration: none;
    color: #f9fafb;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.btn-logout {
    background: transparent;
    border: 1px solid rgba(248,113,113,0.7);
    box-shadow: 0 0 0 1px rgba(15,23,42,0.5);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-inline: 14px;
    font-size: 0.85rem;
}

.user-label {
    font-size: 0.9rem;
    color: var(--muted);
}

.main-content {
    padding: 24px 0 36px;
}

.card {
    background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(15,23,42,0.94));
    border: 1px solid rgba(30,64,175,0.45);
    border-radius: var(--radius-lg);
    padding: 20px 20px 18px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-soft);
}

.input-rounded,
select.input-rounded {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    margin: 6px 0 10px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.profile-form select,
.settings-form select,
.delete-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(148,163,184,0.5);
    border-radius: 6px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    font-family: inherit;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.profile-form select:focus,
.settings-form select:focus,
.delete-form select:focus {
    outline: none;
    border-color: rgba(74, 95, 127, 0.8);
    box-shadow: 0 0 0 3px rgba(74, 95, 127, 0.1);
}

.profile-form textarea,
.settings-form textarea,
.delete-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(148,163,184,0.5);
    border-radius: 6px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease;
}

.profile-form textarea:focus,
.settings-form textarea:focus,
.delete-form textarea:focus {
    outline: none;
    border-color: rgba(74, 95, 127, 0.8);
    box-shadow: 0 0 0 3px rgba(74, 95, 127, 0.1);
}

.btn-pill {
    border: 1px solid rgba(148,163,184,0.7);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #0b1120;
    cursor: pointer;
    font-size: 0.86rem;
    font-family: inherit;
    white-space: nowrap;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(56,189,248,0.25);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.btn-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(56,189,248,0.38);
    border-color: rgba(248,250,252,0.9);
}

/* Subject dashboard (wireframe-style) */
.app-container:not(.profile-shell) {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subject-dashboard-header h1 {
    margin: 0;
}

.content.subject-dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 6px;
}

.pill-button {
    display: block;
    text-align: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.pill-button:hover {
    background: var(--surface-elevated);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.btn-danger {
    background: linear-gradient(135deg, #f97373, #fb3748);
    border-color: rgba(252,165,165,0.9);
    color: #0b1120;
    box-shadow: 0 12px 24px rgba(248,113,113,0.35);
}

.action-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-pills .btn-pill {
    text-decoration: none;
    display: inline-block;
}

.stats-grid,
.subject-grid {
    display: grid;
    gap: 14px;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.subject-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.subject-card {
    background: linear-gradient(150deg, rgba(15,23,42,0.96), rgba(15,23,42,0.9));
    border: 1px solid rgba(31,41,55,0.9);
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    position: relative;
    backdrop-filter: blur(16px);
}

.subject-card.clickable {
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.subject-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15,23,42,0.8);
    border-color: rgba(56,189,248,0.65);
}

.subject-card .arrow {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 1.5rem;
    color: var(--muted);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0;
    font-size: 1.3rem;
}

.search-btn {
    min-width: 100px;
}

.muted-text {
    color: var(--muted);
    font-style: normal;
    font-size: 0.86rem;
}

.recent-list {
    padding: 12px 0;
}

.tabs {
    display: flex;
    gap: 16px;
    border-bottom: 2px solid var(--border);
    margin: 20px 0;
}

.tab-link {
    padding: 10px 16px;
    text-decoration: none;
    color: var(--muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
}

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    padding: 20px 0;
}

.resource-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resource-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(15,23,42,0.96);
    border: 1px solid rgba(30,64,175,0.45);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.resource-item:hover {
    background: var(--surface-elevated);
}

.badge {
    padding: 3px 10px;
    background: var(--primary);
    color: white;
    border-radius: 999px;
    font-size: 0.8rem;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.note-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(15,23,42,0.96);
    border: 1px solid rgba(30,64,175,0.45);
    border-radius: 10px;
    gap: 14px;
}

.note-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-title {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
}

.note-title:hover {
    color: var(--primary);
}

.note-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.note-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.note-actions form {
    margin: 0;
}

.stat-card,
.subject-card {
    background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(15,23,42,0.94));
    border: 1px solid rgba(30,64,175,0.45);
    border-radius: 14px;
    padding: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    text-align: left;
    border-bottom: 1px solid var(--border);
    padding: 8px 10px;
    font-size: 0.95rem;
}

.data-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.table-actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.table-actions form {
    margin: 0;
    display: inline;
}

.alert {
    color: #fecaca;
    background: rgba(127, 29, 29, 0.3);
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(248, 113, 113, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.inline-form {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto;
    margin-bottom: 16px;
    align-items: center;
}

.dob-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 8px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
}

.auth-link {
    text-align: center;
    margin-top: 16px;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
}

/* Mobile wireframe container + pill buttons (scoped to avoid breaking site header) */
.app-container {
    width: 100%;
    max-width: 480px;
    min-height: calc(100vh - 140px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.app-container > header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    background: linear-gradient(90deg, rgba(15,23,42,0.98), rgba(15,23,42,0.94));
}

.app-container > header h1 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.app-container .back-link {
    position: absolute;
    left: 20px;
    top: 20px;
    text-decoration: none;
    font-size: 1.5rem;
    color: var(--primary);
}

.app-container .content {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.app-container .pill-button {
    display: block;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 25px;
    font-weight: 700;
    transition: background 0.2s;
}

.app-container .pill-button:hover {
    background-color: var(--surface-elevated);
}

.app-container .form-group h3 {
    font-size: 0.9rem;
    color: var(--text);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.profile-shell h3 {
    font-size: 0.95rem;
    color: var(--text);
    margin: 16px 0 12px 0;
    font-weight: 600;
}

.app-container .form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 10px;
}

.app-container .topic-content-box {
    border: 2px solid rgba(30,64,175,0.7);
    padding: 20px;
    min-height: 350px;
    border-radius: 10px;
    background: rgba(15,23,42,0.98);
    color: var(--text);
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.admin-note-actions {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.admin-note-actions .btn-pill {
    min-width: 120px;
}

/* Notes List Page Styling */
.notes-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-label {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text);
    margin: 0 0 8px 0;
    padding-left: 4px;
}

.topic-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.topic-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(148, 163, 184, 0.6);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    text-align: center;
    background: rgba(15, 23, 42, 0.96);
    transition: all 0.2s ease;
    font-weight: 500;
}

.topic-btn:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Profile & settings */
.profile-shell .profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.profile-shell .profile-header.compact {
    margin-bottom: 15px;
}

.avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 20%, var(--primary), var(--surface));
    border: 2px solid rgba(148,163,184,0.6);
    box-shadow: 0 12px 24px rgba(15,23,42,0.9);
}

.avatar-circle.small {
    width: 48px;
    height: 48px;
}

.profile-shell .profile-header h2 {
    margin: 8px 0 0;
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 600;
}

.profile-shell .profile-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-shell .content p:not(.muted-text):not(.success-text):not(.alert) {
    color: var(--text);
    font-size: 0.95rem;
    margin: 12px 0 8px 0;
    font-weight: 500;
}

.badge-soft {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Base button styles for profile pages */
.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.profile-menu .btn {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    text-align: center;
}

.profile-form button[type="submit"],
.settings-form button[type="submit"],
.delete-form button[type="submit"],
.btn.save-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border: 1.5px solid rgba(56, 189, 248, 0.7);
    color: #0b1120;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    margin-top: 8px;
    font-size: 0.95rem;
}

.profile-form button[type="submit"]:hover,
.settings-form button[type="submit"]:hover,
.delete-form button[type="submit"]:hover,
.btn.save-btn:hover {
    box-shadow: 0 12px 24px rgba(56,189,248,0.35);
    transform: translateY(-1px);
}

.btn.profile-btn {
    background: transparent;
    border-radius: 8px;
    border: 1.5px solid rgba(148,163,184,0.6);
    color: var(--text);
    padding: 10px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn.profile-btn:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.logout-btn {
    background: rgba(248,113,113,0.15);
    border-color: rgba(248,113,113,0.7);
    color: #fecaca !important;
}

.logout-btn:hover {
    background: rgba(248,113,113,0.25);
    border-color: var(--danger);
    transform: translateY(-1px);
}

.profile-form .input-field,
.settings-form .input-field,
.delete-form .input-field {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: rgba(15, 23, 42, 0.96);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.input-field {
    display: block;
    box-sizing: border-box;
}

.profile-form .input-field:focus,
.settings-form .input-field:focus,
.delete-form .input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.btn-alt {
    border-radius: 8px;
    border: 1.5px solid rgba(56, 189, 248, 0.6);
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(14, 165, 233, 0.08));
    color: var(--text);
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn-alt:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.15));
    border-color: var(--primary);
    transform: translateY(-1px);
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.divider {
    border: none;
    border-top: 1px solid rgba(149, 165, 166, 0.2);
    margin: 18px 0 20px;
}

.delete-link {
    display: inline-block;
    margin-top: 18px;
    color: #fecaca;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.delete-link:hover {
    color: var(--danger);
}

.warning-box {
    border-radius: 8px;
    border: 1px solid rgba(248, 113, 113, 0.8);
    background: rgba(127, 29, 29, 0.3);
    padding: 12px 14px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: #fecaca;
    font-weight: 500;
}

.action-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.action-row .btn-alt {
    flex: 1;
    margin: 0;
}

.action-row .delete-btn {
    flex: 1;
}

.delete-btn {
    background: linear-gradient(135deg, #f97373, #fb3748);
    border: 1.5px solid rgba(252,165,165,0.7);
    color: #0b1120;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    box-shadow: 0 12px 24px rgba(248,113,113,0.35);
    transform: translateY(-1px);
}

.success-text {
    color: #bbf7d0;
    font-size: 0.9rem;
    background: rgba(17, 94, 89, 0.2);
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 500;
}

/* Admin/manage notes + edit note (scoped to app container) */
.app-container .add-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.app-container .pill-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #333;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.app-container .pill-input.centered {
    text-align: center;
}

.app-container .pill-button-small {
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    font-weight: 700;
    cursor: pointer;
}

.app-container .notes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.app-container .notes-table th {
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    color: var(--muted);
    font-weight: 600;
}

.app-container .notes-table td {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.app-container .action-btn {
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 15px;
    font-size: 12px;
    color: var(--text);
    margin: 0 2px;
    background: transparent;
    cursor: pointer;
}

.app-container .action-btn.edit {
    background-color: rgba(56, 189, 248, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.app-container .action-btn.delete {
    background-color: rgba(249, 115, 115, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

.app-container .edit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-container .content-textarea {
    width: 100%;
    min-height: 250px;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 15px;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
    outline: none;
}

.app-container .align-right {
    display: flex;
    justify-content: flex-end;
}

.app-container .save-btn {
    background-color: #2e7d32;
    color: white;
    border-color: #1b5e20;
}

/* Bigger screens: keep mobile-first, enhance layout */
@media (min-width: 900px) {
    .app-container {
        max-width: 920px;
        box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    }

    .app-container .content {
        padding: 28px;
    }

    /* Notes list: show form groups in 2 columns when space allows */
    .app-container.notes-index .content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        align-items: start;
    }

    .app-container.notes-index .form-group {
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 16px;
        background: var(--surface);
    }
}

/* Admin Sidebar Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: start;
}

.admin-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    position: sticky;
    top: 20px;
}

.admin-sidebar h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.admin-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-sidebar a {
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: var(--bg);
}

.admin-content {
    min-width: 0;
}

.quiz-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quiz-card {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 16px;
    background: rgba(15,23,42,0.96);
    border: 1px solid rgba(30,64,175,0.45);
    border-radius: 12px;
    gap: 16px;
}

.quiz-info h3 {
    margin-top: 0;
    color: var(--text);
}

.quiz-info p {
    margin: 8px 0;
    color: var(--muted);
}

.quiz-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
}

.question-block {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
}

.question-text {
    font-weight: 500;
    margin: 12px 0;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.options label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    margin: 0;
    transition: background 0.2s;
}

.options label:hover {
    background: var(--surface-elevated);
}

.options input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
}

.result-card {
    text-align: center;
}

.result-banner {
    padding: 30px;
    border-radius: 14px;
    margin: 20px 0;
}

.result-banner.passed {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid #10b981;
}

.result-banner.failed {
    background: rgba(249, 115, 115, 0.2);
    border: 2px solid var(--danger);
}

.result-banner h2 {
    margin: 0 0 12px 0;
}

.score-display {
    font-size: 3rem;
    font-weight: bold;
    margin: 16px 0;
    color: inherit;
}

.result-details {
    margin: 20px 0;
}

@media (max-width: 768px) {
    .inline-form {
        grid-template-columns: 1fr;
    }

    .nav-wrap {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .dob-inputs {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

