@import url(https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&icon_names=arrow_back_2,play_lesson,restore_page,resume,verified,work_history&display=block);
@import url(https://use.typekit.net/qmt8clx.css);

/* === CSS Variables === */
:root {
    --primary: #0062B3;
    --primary-dark: #00467F;
    --success: #28a745;
    --success-dark: #1e7e34;
    --danger: #dc3545;
    --danger-dark: #c82333;
    --warning: #ffc107;
    --warning-dark: #e0a800;
    --info: #17a2b8;
    --info-dark: #138496;
    --secondary: #6c757d;
    --secondary-dark: #545b62;
    --light: #f8f9fa;
    --dark: #333;
    --muted: #595959; /* Improved contrast: was #666, now meets 4.5:1 ratio */
    --border: #ddd;
    --border-light: #eee;
    --radius: 4px;
    --radius-lg: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 2px 10px rgba(0,0,0,0.1);
    --focus-ring: 0 0 0 3px rgba(0, 98, 179, 0.4);
}

/* === Reset & Base === */
* { box-sizing: border-box; }
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	font-family: 'gotham';
	line-height: 1.6;
	color: #000;
	background-color: #F2F3F4;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
hr { margin: 30px 0; border: none; border-top: 1px solid var(--border); }
main {
	flex: 1;
	width: 100%;
	max-width: 87.5rem;
	margin: 0 auto;
	padding: 0 12px;
}

/* === Skip Link (Accessibility) === */
.skip-link { position: absolute; top: -4rem; left: 0; display: block; background: var(--primary); color: #fff; padding: .5rem; z-index: 1001; transition: top 0.2s; }
.skip-link:focus { top: 0; outline: 2px solid #fff; outline-offset: 2px; }

/* === Focus Styles (Accessibility) === */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--focus-ring); outline: none; }

/* === Login Page Background === */
/* Mobile: no background image */
.login-page { min-height: 100vh; }

/* Tablet (768px+): fixed size, center bottom */
@media (min-width: 768px) {
    .login-page {
        background-image: url('images/springfield_bkg.svg');
        background-position: center bottom;
        background-repeat: no-repeat;
        /* Fixed width - does not scale */
    }
}

/* Desktop (1024px+): contained, center bottom */
@media (min-width: 1024px) {
    .login-page {
        background-image: url('images/springfield_bkg.svg');
        background-position: center bottom;
        background-repeat: no-repeat;
        background-size: contain;
    }
}

/* Login container - creates BFC to prevent margin collapse */
.login-container { display: flow-root; font-family: "futura-pt", sans-serif; }
.login-container .form-group input[type="text"],
.login-container .form-group input[type="email"],
.login-container .form-group input[type="password"] { font-family: "gotham", sans-serif; width: 100%; max-width: none; }
.login-container h2 { color: var(--primary); text-align: center; font-size: 2rem; font-weight: 600; margin: 0 0 1rem; }
.login-container button { background: var(--primary); width: 100%; }
.login-container button:hover { background: var(--primary-dark); }
.login-links { display: flex; justify-content: space-between; margin-top: 1rem; font-weight: 700; font-size: 1rem; }
.login-links a { color: var(--muted); }
.login-links a:hover { text-decoration: none; }

/* Clear container - semi-transparent white box */
.clear-container {
	padding: 2rem;
    background: white;
    border-radius: .5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.clear-container h3 { margin: 0 0 1rem; }

/* === Two Column Layout === */
/* Mobile: stacked, second column displays first */
.two-col-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.flex-reverse {
	flex-direction: column-reverse;
}

/* Tablet/Desktop (768px+): side by side */
@media (min-width: 768px) {
    .two-col-layout {
        flex-direction: row;
        align-items: stretch;
		gap: 30px;
    }
    .two-col-layout .col {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .two-col-layout .col .login-container {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .two-col-layout .col .login-container .clear-container {
        flex: 1;
    }
	.clear-container { background: rgba(255, 255, 255, 0.9); }
}

/* === Header === */
.site-header { background: var(--primary-dark); color: #fff; border-bottom: 1px solid #fff; padding: 1rem 0; margin-bottom: 1.5rem; font-family: "futura-pt", sans-serif; box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.25); }
.site-header-content { display: flex; flex-direction: column; align-items: center; max-width: 87.5rem; margin: 0 auto; padding: 0 1rem; flex-wrap: wrap; gap: .5rem; }
.site-header-title { display: flex; justify-content: center; flex-direction: row; flex-wrap: wrap; gap: 1rem; }
.site-header-logo-link { display: block; }
.site-header-logo { max-width: 100%; max-height: 60px; height: auto; width: auto; display: block; }
.site-header-text { font-size: 1.5rem; line-height: 2rem; }
.site-header-text p { margin: 0; }
.site-header-subtitle { font-size: 0.85em; margin-top: 2px !important; }
.site-header-content nav { display: flex; align-items: center; gap: 8px; justify-content: center; }
nav a { font-weight: 600; color: white; text-decoration: none; }
.header-version { font-size: 0.75em; margin-left: 8px; }
.site-header-public { background: #333; color: #fff; padding: 15px 20px; text-align: center; }
.site-header-public p { margin: 0; font-size: 1.2em; }
.btn-help, .btn-logout { background: none; border: solid 1px white; border-radius: .25rem; color: white; cursor: pointer; font-size: inherit; font-family: inherit; padding: .25rem .5rem; text-decoration: none; line-height: inherit; box-sizing: border-box; display: inline-flex; align-items: center; }
.btn-help:hover, .btn-logout:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.btn-help:focus-visible, .btn-logout:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Help modal contact rows */
.help-contact-row { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border-light); }
.help-contact-row:last-child { border-bottom: none; }
.help-contact-icon { font-size: 1.4em; flex-shrink: 0; width: 2rem; text-align: center; }

/* === Navigation Dropdown === */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-btn { background: none; border: none; color: white; cursor: pointer; font-size: inherit; padding: 10px 12px; min-height: 44px; } /* Improved touch target */
.nav-dropdown-btn:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-dropdown-btn[aria-expanded="true"] + .nav-dropdown-content { display: block; }
.nav-dropdown-content { display: none; position: absolute; right: 0; background: #fff; min-width: 180px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); border-radius: var(--radius); z-index: 100; }
.nav-dropdown-content a { display: block; padding: 10px 16px; color: var(--dark); min-height: 44px; display: flex; align-items: center; } /* Improved touch target */
.nav-dropdown-content a:hover { background: #f5f5f5; text-decoration: none; }
.nav-dropdown-content a:focus { background: #e8f4fd; outline: none; }
.nav-dropdown-content a.active { background: #e8f4fd; color: var(--primary-dark); }
.nav-dropdown-divider { margin: 4px 0; border: none; border-top: 1px solid var(--border); }

/* === Footer === */
footer {
	margin-top: 1rem;
	padding: 1rem;
	color: white;
	font-size: .8rem;
	text-align: center;
	background-color: #1C1C1C;
}
footer img { display: block; margin: 0 auto .5rem auto; }
footer p { margin: 0; }

/* === Alerts === */
.alert { margin: 12px 0; padding: 12px 16px; border-radius: var(--radius); }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning, .admin-notice { background: #fff3cd; color: #856404; border: 1px solid var(--warning); padding: 10px 15px; border-radius: 5px; margin-bottom: 20px; }
.alert-info { background: #e8f4fd; color: #0c5460; border: 1px solid #bee5eb; }

/* === Buttons === */
button, .btn { font-family: "futura-pt", sans-serif; font-weight: 600; font-size: 1.2rem; }
.btn { display: inline-block; padding: .5rem 1rem; border-radius: var(--radius); text-decoration: none; cursor: pointer; border: none; transition: background 0.2s; min-height: 44px; line-height: 1.6; } /* Improved touch target */
.btn:hover { text-decoration: none; }
.btn:focus-visible { box-shadow: var(--focus-ring); outline: none; }
.btn-primary { background: var(--primary); color: #fff;}
.btn-primary:hover { background: var(--primary-dark); }
.btn-success, .btn-start { background: var(--success); color: #fff; }
.btn-success:hover, .btn-start:hover { background: var(--success-dark); }
.btn-danger, .btn-admin { background: var(--danger); color: #fff; }
.btn-danger:hover, .btn-admin:hover { background: var(--danger-dark); }
.btn-warning { background: var(--warning); color: #212529; }
.btn-warning:hover { background: var(--warning-dark); }
.btn-info, .btn-resume, .btn-transcript { background: var(--info); color: #fff; }
.btn-info:hover, .btn-resume:hover, .btn-transcript:hover { background: var(--info-dark); }
.btn-secondary, .btn-review { background: var(--secondary); color: #fff; }
.btn-secondary:hover, .btn-review:hover { background: var(--secondary-dark); }
.btn-small { padding: 8px 14px; font-size: 0.8em; min-height: 44px; } /* Improved touch target */
.btn:disabled, .btn.validating, .btn.btn-disabled { opacity: 0.6; cursor: not-allowed; }
.print-btn { background: var(--secondary); color: #fff; padding: 10px 18px; border: none; border-radius: var(--radius); cursor: pointer; min-height: 44px; }
.print-btn:hover { background: var(--secondary-dark); }
.print-btn:focus-visible { box-shadow: var(--focus-ring); outline: none; }

.button-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 1rem 0;
}

/* === Forms === */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 5px; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"], .form-group select {
    width: 100%; max-width: 400px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1em; min-height: 44px;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: var(--focus-ring); outline: none; }
form input:not([type="radio"]):not([type="checkbox"]), form select { padding: 10px 12px; font-size: 1em; border: 1px solid #ccc; border-radius: var(--radius); min-height: 44px; background: #fff; }
form input:not([type="radio"]):not([type="checkbox"]):focus, form select:focus { border-color: var(--primary); box-shadow: var(--focus-ring); outline: none; }
form input[type="text"], form input[type="email"], form input[type="password"] { width: 100%; max-width: 300px; }
form button { background: var(--primary); color: #fff; border: none; cursor: pointer; border-radius: var(--radius); min-height: 44px; }
form button:hover { background: var(--primary-dark); }
form button:focus-visible { box-shadow: var(--focus-ring); outline: none; }
.form-inline { display: inline-block; }

.radio-group { display: flex; align-items: center; gap: 1.5rem; width: 100%; }
.checkbox-group-explicit { display: flex; align-items: center; gap: .5rem; font-weight: normal; }
.checkbox-group-explicit input, .checkbox-group-explicit label { cursor: pointer; }
.checkbox-group label { display: flex; align-items: center; gap: .5rem; font-weight: normal; cursor: pointer; margin: 0; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; min-height: auto; }
.radio-group label { width: 100%; margin: 0; padding: 1rem 0; cursor: pointer; }
.radio-group input[type="radio"] { min-height: auto; margin: 0 0 0 1.5rem; cursor: pointer; }
.help-text { margin-top: 5px; color: var(--muted); font-size: 0.9em; }
.info-text { color: var(--muted); font-size: 0.9em; margin-bottom: 20px; }

/* === Page Containers === */
.page-container { max-width: 87.5rem; padding: 0 1.5rem 1.5rem 1.5rem; }
.cert-lookup-container, .validation-container, .unlock-container, .unsubscribe-container, .error-container {
    max-width: 90%; width: 500px; margin: 60px auto; padding: 40px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); text-align: center;
}
.cert-lookup-container h1, .validation-container h1, .unlock-container h1, .unsubscribe-container h1 { color: var(--dark); margin-bottom: 10px; margin-top: 0; }
.cert-lookup-container p, .validation-container p { color: var(--muted); margin-bottom: 30px; }

/* === Page Headers === */
/* .page-header { margin-bottom: 30px; }
.page-header h1 { margin: 0 0 10px; color: var(--dark); } */
h1 { margin: 0 0 1rem; font-size: 1.5em; color: var(--primary); }
h2 { color: var(--primary); }
.page-header p { color: var(--muted); margin: 0; }
.admin-header-row, .header-actions { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; }
.header-actions h2 { margin: 0; }
/* === Cards === */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h3 { margin: 0 0 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); gap: 20px; }
.card.full-width { grid-column: 1 / -1; }
.card .url-box { background: #f5f5f5; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; font-size: 0.85em; word-break: break-all; margin-bottom: 15px; }
.card .btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.card .divider { margin: 20px 0; border-top: 1px solid var(--border); }

/* === Tables === */
/* Auto-scroll containers with tables on small screens */
:has(> table.data-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.data-table {
    width: 100%; margin: 1rem 0; border-collapse: collapse; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius-lg); overflow: hidden;
}
.data-table th, .data-table td {
    padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border-light);
}
.data-table th {
    background: var(--light); font-weight: bold; color: var(--dark);
}
.data-table tr:hover { background: var(--light); }
.number { text-align: right; }
.actions-col { width: 120px; text-align: center; white-space: nowrap; }
table .button-group { display: flex; flex-wrap: wrap; gap: .5rem; }
table td .btn { min-height: auto; padding: .5rem; font-size: .9rem; }

/* === Filter Section === */
.filter-section { background: white; margin: 1rem 0; padding: 1rem; border: solid 1px var(--border); border-radius: var(--radius-lg); margin-bottom: 30px; }
.filter-section h3 { margin: 0 0 15px; color: var(--dark); }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-weight: bold; font-size: 0.9em; }
.filter-group input, .filter-group select {
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1em; min-height: 44px;
}
.filter-group input:focus, .filter-group select:focus { border-color: var(--primary); box-shadow: var(--focus-ring); outline: none; }
.filter-buttons { display: flex; gap: 1rem; margin-top: 15px; flex-wrap: wrap; }
form .filter-buttons button { margin-top: initial; }
.report-filter-row { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.report-filter-or { display: flex; align-items: flex-end; padding-bottom: 8px; font-weight: bold; color: var(--muted); }
.filter-row { display: flex; gap: 15px; flex-wrap: wrap; align-items: flex-end; margin-top: 15px; }
.date-range-group { display: flex; gap: 10px; align-items: center; }

/* === Summary Cards === */
.summary-row { display: flex; flex-wrap: wrap; gap: 1.5rem;}
.summary-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	min-width: 150px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg); padding: 20px;
	box-shadow: var(--shadow);
}
.summary-card:hover { box-shadow: var(--shadow-md); }
.summary-value, .summary-card .value, .stat-value { font-size: 2em; font-weight: bold; color: var(--primary); line-height: 1.2; }
.summary-label, .summary-card h3, .stat-label { font-size: 0.9em; color: var(--muted); margin-top: 5px; text-align: center; text-transform: uppercase; margin-bottom: 0; }
.summary-card .subtitle { font-size: 0.8em; color: #999; margin-top: 5px; }
button.summary-card { cursor: pointer; font-family: inherit; font-size: inherit; color: inherit; transition: box-shadow 0.2s, border-color 0.2s; }
button.summary-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
button.summary-card:focus-visible { box-shadow: var(--focus-ring); outline: none; }

/* === Stats Section === */
.stats-section { margin-bottom: 2rem; }
.stats-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.stats-header h3 { margin: 0; color: var(--dark); }
.stats-filter { display: flex; align-items: center; gap: 10px; }
.stats-filter label { font-weight: bold; font-size: 0.9em; }
.stats-filter select { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.stats-section .summary-card { background: #fff; }

/* === Results Summary === */
.results-summary { background: #e8f4fd; padding: 15px 20px; border-radius: var(--radius-lg); margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.results-summary .count { font-size: 1.1em; }
.results-summary .count strong { color: var(--primary); }
.pagination-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pagination-controls label { font-size: 0.9em; color: var(--muted); }
.pagination-controls select { padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9em; min-height: 36px; background: #fff; }
.pagination-controls #pageInfo { font-size: 0.9em; color: var(--muted); min-width: 100px; text-align: center; }
.btn-sm { padding: 4px 10px; font-size: 0.85em; min-height: 36px; }

/* === Modal (native dialog element) === */
dialog.modal {
	font-family: "gotham", sans-serif;
    border: none;
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 90%;
    width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
dialog.modal p:first-child { margin-top: 0; }
dialog.modal::backdrop {
    background: rgba(0,0,0,0.5);
}
dialog.modal[open] {
    display: flex;
    flex-direction: column;
}
dialog.modal-wide {
    width: 95%; /* Mobile-first: use more screen width */
}

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 1.2em; }
.modal-close { background: none; border: none; font-size: 1.5em; cursor: pointer; color: var(--muted); padding: 8px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { color: var(--dark); }
.modal-close:focus-visible { box-shadow: var(--focus-ring); outline: none; border-radius: var(--radius); }
.modal-body { padding: 1rem; }
.modal-body h4 { margin: 16px 0 8px; }
.modal-body li { margin-bottom: 8px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); text-align: right; }
.modal-warning { background: #fff3cd; border: 1px solid var(--warning); border-radius: var(--radius); padding: 12px; margin-top: 16px; }
.modal-meta { padding: 0 20px; font-size: 0.85em; color: var(--muted); margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--border-light); }
.modal-body.text-body { white-space: pre-wrap; font-size: 0.9em; background: var(--light); border-radius: var(--radius); }
.modal-body iframe { width: 100%; height: 500px; border: 1px solid var(--border); border-radius: var(--radius); }

/* === Status Indicators === */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: #856404; }
.text-muted { color: var(--muted); }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.85em; font-weight: 500; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.75em; font-weight: 500; vertical-align: middle; }
.badge-muted { background: #e9ecef; color: var(--muted); }
.status-completed { background: #d4edda; color: #155724; }
.status-in-progress { background: #fff3cd; color: #856404; }
.completion-count { font-weight: bold; color: var(--success); }
.no-completions { color: #999; }
.completion-indicator { font-size: 1.2em; font-weight: bold; }
.completion-indicator.completed { color: var(--success); }
.completion-indicator.not-completed { color: var(--danger); }

/* === Info Row === */
.info-row { margin-bottom: 10px; }
.info-row strong { color: var(--dark); }
.user-info { color: var(--muted); font-size: 0.95em; }

/* === Back Link / Nav === */
/* .back-link { margin-bottom: .5rem; } */
.back-link a { display: inline-flex; align-items: center; font-weight: 600; color: var(--secondary); text-decoration: none; transition: color 300ms; }
.back-link a:hover { color: var(--primary-dark); }
.report-nav-row { display: flex; gap: 15px; margin-bottom: 30px; align-items: center; flex-wrap: wrap; }

/* Data Dump dropdown */
.dump-dropdown { position: relative; }
.dump-dropdown summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.dump-dropdown summary::-webkit-details-marker { display: none; }
.dump-dropdown summary .material-symbols-outlined { font-size: 1.1em; }
.btn-outline { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-dark); color: #fff; }
.dump-dropdown-menu { position: absolute; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); z-index: 10; min-width: 180px; overflow: hidden; }
.dump-option { display: flex; align-items: center; gap: 8px; padding: 10px 16px; text-decoration: none; color: #333; white-space: nowrap; min-height: 44px; }
.dump-option:hover { background: #f0f4f8; color: var(--primary); }
.dump-option .material-symbols-outlined { font-size: 1.2em; color: var(--muted); }
.filter-info { background: #e9ecef; padding: 10px 15px; border-radius: 5px; margin-bottom: 20px; color: var(--muted); }

/* === Utility Classes === */
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.text-center, th.text-center, td.text-center { text-align: center; }
.text-small { font-size: 0.9em; }
.text-smaller { font-size: 0.85em; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.ml-20 { margin-left: 20px; }
.w-100 { width: 100%; }
.inline-block { display: inline-block; }
.flex-responsive {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

/* === Empty States === */
.no-results, .no-logs { text-align: center; padding: 40px; color: var(--muted); background: #f9f9f9; border-radius: var(--radius-lg); }

/* === Password Validation === */
.password-feedback, .confirm-feedback { margin-top: 4px; font-size: 0.9em; }
.password-errors { display: flex; flex-direction: column; gap: 2px; }
.password-rule { padding: 3px 0; display: flex; align-items: flex-start; gap: 6px; line-height: 1.3; }
.password-rule .rule-icon { font-weight: bold; flex-shrink: 0; width: 16px; text-align: center; }
.password-rule-pass { color: var(--success); }
.password-rule-fail { color: var(--danger); }
.password-strength-meter { margin-top: 12px; padding-top: 8px; border-top: 1px solid #e9ecef; }
.strength-meter-label { font-size: 0.85em; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.strength-meter { height: 6px; background: #e9ecef; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.strength-bar { height: 100%; width: 0; transition: width 0.3s, background-color 0.3s; border-radius: 3px; }
.strength-weak { background: var(--danger); }
.strength-fair { background: #fd7e14; }
.strength-good { background: var(--warning); }
.strength-strong { background: var(--success); }
.strength-very-strong { background: #20c997; }
.strength-label { font-size: 0.85em; color: var(--muted); margin-top: 4px; font-weight: 500; }
.strength-label-weak { color: var(--danger); }
.strength-label-fair { color: #fd7e14; }
.strength-label-good { color: #b8860b; }
.strength-label-strong { color: var(--success); }
.strength-label-very-strong { color: #20c997; }
.password-policy-errors { background: #f8d7da; border: 1px solid #f5c6cb; border-radius: var(--radius); padding: 12px 12px 12px 32px; margin: 12px 0; color: #721c24; }

/* === Security Questions === */
.security-questions-container { margin: 2rem 0; }
.security-question-row {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 1rem;
	position: relative;
	margin-bottom: 1rem;
	padding: 1rem;
	border: solid 1px var(--border);
	border-radius: var(--radius);
}
.security-question-row .question-input { width: 100%; }
.security-question-row .answer-input { flex: 1; min-width: 150px; }
.security-question-row .answer-input.form-group { margin-bottom: 0; }
.security-question-row .answer-input input { max-width: 100%; }
.security-question-row input, .security-question-row select { width: 100%; padding: .5em; border: 1px solid var(--border); border-radius: var(--radius); }
.security-question-row .remove-btn { position: absolute; top: .5rem; right: .5rem; min-height: auto; background: var(--danger); color: #fff; border: none; padding: .5rem; border-radius: var(--radius); cursor: pointer;}
.add-question-btn { background: var(--success); color: #fff; border: none; padding: 8px 15px; border-radius: var(--radius); cursor: pointer; margin-top: 10px; }
.question-type-toggle { display: flex; gap: .5rem; margin-bottom: 1rem; }
.question-type-toggle form button { margin-top: 0; }
.question-type-toggle button:focus-visible { box-shadow: var(--focus-ring); outline: none; }
.question-type-toggle button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.preset-question.hidden { display: none; }
.custom-question { display: none; }
.custom-question.active { display: block; }

/* === Email Verification === */
.email-verification-status { margin-top: 20px; padding: 15px; border-radius: 5px; }
.email-verification-status.verified { background: #d4edda; border: 1px solid #c3e6cb; }
.email-verification-status.unverified { background: #fff3cd; border: 1px solid var(--warning); }
.email-verification-status .status-text { margin: 0; }
.email-verification-status.verified .status-text { color: #155724; }
.email-verification-status.unverified .status-text { color: #856404; margin-bottom: 10px; }
.email-logs-link { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }

/* === Import Data === */
.import-match-row { padding: 0.75rem; margin-top: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: #f8f9fa; }
.import-match-row p { margin: 0 0 0.25rem; }
.import-match-row form { margin-top: 0.5rem; }
.import-search-results { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.import-search-results h4 { margin: 0 0 0.75rem; }

/* Import Modal */
dialog.modal-import {
    width: 90%;
    max-width: 90%;
    height: 90vh;
    max-height: 90vh;
}
dialog.modal-import[open] {
    display: flex;
    flex-direction: column;
}
dialog.modal-import .modal-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.import-modal-search {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.import-modal-search .filter-grid {
    margin-bottom: 0.75rem;
}
.import-modal-results {
    flex: 1;
    overflow-y: auto;
}
.import-results-table {
    width: 100%;
}
.import-results-table td[data-label="Action"] {
    text-align: right;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .import-results-table thead { display: none; }
    .import-results-table tr { display: block; padding: 0.75rem; margin-bottom: 0.5rem; border: 1px solid var(--border); border-radius: var(--radius); }
    .import-results-table td { display: block; padding: 0.25rem 0; border: none; }
    .import-results-table td::before { content: attr(data-label) ": "; font-weight: bold; }
    .import-results-table td[data-label="Action"]::before { content: none; }
    .import-results-table td[data-label="Action"] { text-align: left; margin-top: 0.5rem; }
    .dump-dropdown { margin-left: 0; width: 100%; }
    .dump-dropdown summary { justify-content: center; }
    .dump-dropdown-menu { left: 0; right: 0; }
}

/* === Organization Autocomplete === */
.autocomplete-wrapper { position: relative; }
.org-autocomplete-list {
    display: none; position: absolute; z-index: 100; left: 0; right: 0; top: 100%;
    max-height: 200px; overflow-y: auto; margin: 0; padding: 0; list-style: none;
    background: white; border: 1px solid var(--border); border-top: none;
    border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow);
}
.org-autocomplete-list.visible { display: block; }
.org-autocomplete-list li {
    padding: 8px 12px; cursor: pointer; font-size: 1em;
}
.org-autocomplete-list li:hover,
.org-autocomplete-list li.active { background-color: var(--primary); color: white; }

/* === Course Heading Row === */
.courses-heading-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.courses-heading-row h2 { margin: 0; }
/* === Sortable Table Headers === */
th.sortable { cursor: pointer; user-select: none; position: relative; padding-right: 1.5em; }
th.sortable::after { content: '\2195'; position: absolute; right: 0.4em; opacity: 0.3; font-size: 0.85em; }
th.sortable[aria-sort="ascending"]::after { content: '\2191'; opacity: 0.8; }
th.sortable[aria-sort="descending"]::after { content: '\2193'; opacity: 0.8; }
th.sortable:hover { background-color: rgba(0, 0, 0, 0.04); }

.courses-filter select {
	min-height: 44px;
	padding: 0 .25rem;
	font-size: 1rem;
	appearance: auto;
	background-color: white;
	border-radius: var(--radius);
	cursor: pointer;
}

/* === Course Components === */
.courses-list {
	background-color: white;
	border: solid 1px var(--border);
	border-radius: var(--radius);
}

.courses-list a, .courses-list button {
	display: flex;
	align-items: center;
	min-height: auto;
	width: 100%;
	padding: .5rem 1rem;
	font-family: "futura-pt", sans-serif;
	font-size: 1rem;
	font-weight: 600;
	line-height: normal;
	text-decoration: none;
	cursor: pointer;
	border: none;
	border-radius: var(--radius);
	transition: background-color 350ms, color 350ms;
}
.courses-list a:hover { text-decoration: none; }
.courses-list a:focus-visible, .courses-list button:focus-visible { box-shadow: var(--focus-ring); outline: none; }

.courses-list a span, .courses-list button span {
	margin-right: .5rem;
}

.courses-list button.course-start {
	color: #0062B3;
	background-color: #E8EDFF;
	border: solid 1px #0062B3;
}
.courses-list button.course-start:hover {
	background-color: #0062B3;
	color: white;
}
.courses-list button.course-resume {
	color: #B34F00;
	background-color: #FFF2E8;
	border: solid 1px #B34F00;
}
.courses-list button.course-resume:hover {
	color: white;
	background-color: #B34F00;
}
.courses-list button.course-review {
	color: #B38200;
	background-color: #FCF9DB;
	border: solid 1px #B38200;
}
.courses-list button.course-review:hover {
	color: white;
	background-color: #B38200;
}
.courses-list a.course-cert {
	color: #258C00;
	background-color: #DBFCE7;
	border: solid 1px #258C00;
}
.courses-list a.course-cert:hover {
	color: white;
	background-color: #258C00;
}
.courses-list a.course-history {
	color: #6301A8;
	background-color: #F3E8FF;
	border: solid 1px #6301A8;
}
.courses-list a.course-history:hover {
	color: white;
	background-color: #6301A8;
}

.course-detail { padding: 15px; background: #f9f9f9; border-radius: var(--radius); }
.course-summary { display: flex; gap: 15px; margin-bottom: 20px; }
.course-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	font-size: .9rem;
	color: var(--muted);
}
.course-meta-item {
	padding: .5rem 1rem;
	border: solid 1px var(--border);
	border-radius: 1rem;
}
.course-item {
	display: flex;
	flex-direction: column;
	/* justify-content: space-between;
	align-items: center; */
	column-gap: 2rem;
	row-gap: 1rem;
	padding: 1rem;
	border-bottom: solid 1px var(--border);
}
.course-item .course-info { flex: 1; }
.course-item .course-info p:last-child { margin-bottom: 0; }
.course-item h3 { margin: 0; }
/* .course-item .course-action { margin-left: 1em; flex-shrink: 0; } */
.course-action { display: flex; flex-direction: column; gap: .5rem; width: 100%; }
.course-link { color: var(--primary); font-weight: 500; }
.course-wrapper {
	position: relative;
	margin: 2rem 0;
	padding: 2rem;
	background-color: white;
	border: solid 1px var(--border);
	border-radius: .5rem;
}
.course-wrapper p:last-child { margin-bottom: 0; }
.course-wrapper.course-header h2 { margin: 0; }
.course-wrapper h3.course-name {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	margin: 0;
	padding: 1rem 2rem;
	border-bottom: solid 1px var(--border);
}
.page-nav-buttons { display: flex; gap: 1em; margin: 1em 0; }
.btn-next-page { background: #4a90d9; color: #fff; border-color: #3a7bc8; }
.btn-next-page:hover { background: #3a7bc8; }

.course-wrapper iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16/9;
	margin: 4rem 0 2rem 0;
}
.course-wrapper-content {
	margin: 4rem 0 0 0;
}
.course-wrapper-content p { margin: 0; }
.resource-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 4rem 0 0 0;
	padding: 0;
	list-style-type: none;
}
.resource-list li {
	background-image: url("images/open_in_new.svg");
	background-repeat: no-repeat;
	padding-left: 2rem;
}

/* === Exam Components === */
.exam-wrapper { max-width: 50rem; margin: 0 auto; }
.exam-header { background: var(--light); padding: 20px; border-radius: var(--radius-lg); margin-bottom: 30px; }
.exam-header h1 { margin: 0 0 10px; }
.exam-meta { color: var(--muted); }
.exam-meta p { margin: 5px 0; }
.exam-summary { background: #e8f4fd; padding: 15px 20px; border-radius: var(--radius-lg); margin-bottom: 20px; }
.question-block { background: #fff; border: 1px solid var(--border); border-radius: 5px; padding: 20px; margin-bottom: 20px; }
.question-number { font-weight: bold; color: var(--dark); margin-bottom: 10px; }
.question-text { font-size: 1.1em; margin-bottom: 15px; }
.question-type-indicator { font-size: 0.85em; color: var(--muted); font-style: italic; margin-bottom: 10px; }
.question-meta { font-weight: normal; color: var(--muted); font-size: 0.9em; }
.options-list { list-style: none; padding: 0; margin: 0; }
.options-list li { margin: 5px 0; background: #fafafa; border-radius: var(--radius); border: 1px solid var(--border); }
.options-list li:hover { background: #f0f0f0; }
/* .options-list label { display: flex; align-items: center; cursor: pointer; }
.options-list input[type="radio"], .options-list input[type="checkbox"] { margin-right: 10px; } */
.submit-section { text-align: center; margin-top: 30px; }
.submit-section button { padding: 15px 40px; font-size: 1.1em; }

/* === Exam Results === */
.exam-score { padding: 1rem; border-radius: var(--radius); text-align: center; margin-bottom: 1rem; }
.exam-score h3 { margin: 0; font-size: 2em; }
.exam-score p { padding: 0; margin: 0; }
.score-passed { background: #d4edda; border: 2px solid var(--success); }
.score-passed .result-status { color: var(--success); font-size: 1.5em; font-weight: bold; }
.score-failed { background: #f8d7da; border: 2px solid var(--danger); }
.score-failed .result-status { color: var(--danger); font-size: 1.5em; font-weight: bold; }
.score-pending { color: var(--muted); font-style: italic; }
.retake-section { text-align: center; padding: 20px; background: #fff3cd; border: 1px solid var(--warning); border-radius: 5px; margin-bottom: 20px; }
.completion-section { text-align: center; padding: 1rem; background: #d4edda; border: 1px solid var(--success); border-radius: 5px; margin-top: 30px; }
.completion-section p { margin: 0 0 1rem 0; padding: 0; }
.question-block.question-correct { border-left: 4px solid var(--success); }
.question-block.question-incorrect { border-left: 4px solid var(--danger); }
.question-result { float: right; font-size: 0.9em; }
.question-correct .question-result { color: var(--success); }
.question-incorrect .question-result { color: var(--danger); }
.options-list.review-mode li { display: flex; align-items: center; gap: 10px; padding: .5rem; }
.option-marker { font-weight: bold; width: 20px; text-align: center; }
.option-correct { background: #d4edda; border-color: var(--success); }
.option-correct::before { content: "✓ "; color: var(--success); font-weight: bold; }
.option-correct-selected { background: #d4edda !important; border-left: 3px solid var(--success); }
.option-correct-missed { background: #fff3cd !important; border-left: 3px solid var(--warning); }
.option-incorrect-selected { background: #f8d7da !important; border-left: 3px solid var(--danger); }
.correct-indicator { color: var(--success); font-size: 0.85em; font-style: italic; display: inline-block; background: var(--success); color: #fff; padding: 2px 8px; border-radius: 3px; margin-left: 10px; }
.your-answer { color: var(--muted); font-size: 0.85em; font-style: italic; }

/* === Attempts === */
.attempt-block { background: #fff; border: 1px solid var(--border); border-radius: 5px; padding: 20px; margin-bottom: 20px; }
.attempt-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-light); padding-bottom: 10px; margin-bottom: 15px; }
.attempt-title { font-size: 1.2em; font-weight: bold; }
.attempt-status { padding: 5px 10px; border-radius: 3px; font-size: 0.9em; }
.attempt-details { color: var(--muted); margin-bottom: 15px; }
.attempt-details p { margin: 5px 0; }
.exam-attempts { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border-light); }
.exam-attempts h4 { margin: 0 0 10px; color: var(--dark); }
.exam-attempt-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: #f9f9f9; border-radius: 3px; margin-bottom: 8px; }
.exam-attempt-item .exam-score { font-weight: bold; margin-left: 15px; padding: 3px 8px; border-radius: 3px; display: inline-block; }
.attempt-actions { display: flex; gap: 10px; margin-top: 15px; }
.no-attempts { color: var(--muted); font-style: italic; }

/* === Certificate === */
.certificate-container { max-width: 800px; margin: 30px auto; padding: 30px 40px; border: 3px solid #333; background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); text-align: center; }
.certificate-header { border-bottom: 2px solid #666; padding-bottom: 15px; margin-bottom: 20px; }
.certificate-header h1 { font-size: 2.2em; color: var(--dark); margin: 0; }
.certificate-header p { font-size: 1.1em; color: var(--muted); margin: 8px 0 0; }
.certificate-body { padding: 15px 0; }
.congratulations { font-size: 1.3em; color: var(--success); margin-bottom: 10px; }
.certificate-text { font-size: 1em; color: #444; line-height: 1.6; margin: 5px 0; }
.certificate-container .student-name { font-size: 1.8em; font-weight: bold; color: var(--dark); margin: 10px 0; }
.certificate-container .course-title { font-size: 1.3em; font-weight: bold; color: var(--primary); margin: 10px 0 5px; }
.completion-details { margin-top: 15px; font-size: 0.95em; color: #555; display: flex; justify-content: center; gap: 40px; }
.completion-details p { margin: 3px 0; }
.verification-section { margin-top: 15px; padding-top: 15px; border-top: 1px dashed #ccc; }
.verification-note { font-size: 0.85em; color: var(--muted); margin-bottom: 8px; }
.completion-code, .completion-code-link { background: #f5f5f5; padding: 3px 8px; border-radius: 3px; font-size: 0.9em; text-decoration: none; display: inline-block; }
.completion-code-link { font-size: 1.3em; font-weight: bold; letter-spacing: 3px; padding: 8px 16px; border-radius: 5px; }
.completion-code-link:hover { background: #e8e8e8; color: var(--primary); }
.calendar-year { font-size: 1.1em; font-weight: bold; color: var(--dark); margin-top: 10px; }
.certificate-footer { border-top: 2px solid #666; padding-top: 15px; margin-top: 15px; color: var(--muted); font-size: 0.85em; }
.validation-notice { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; padding: 12px 20px; border-radius: 5px; margin-bottom: 15px; text-align: center; }
.validation-icon { display: inline-block; background: var(--success); color: #fff; width: 22px; height: 22px; border-radius: 50%; text-align: center; line-height: 22px; margin-right: 8px; font-weight: bold; }

/* === Certificate Lookup Form === */
.cert-lookup-form { display: flex; flex-direction: column; gap: 15px; }
.cert-lookup-form label { text-align: left; font-weight: bold; }
.cert-lookup-form input[type="text"] { padding: 12px 15px; font-size: 1.2em; border: 2px solid var(--border); border-radius: 5px; text-align: center; letter-spacing: 2px; }
.cert-lookup-form input:focus { border-color: var(--primary); outline: none; }
.cert-lookup-form button { padding: 12px 20px; font-size: 1.1em; }
.input-code { text-transform: uppercase; letter-spacing: 2px; }

/* === Error/Success Boxes === */
.error-icon { font-size: 4em; margin-bottom: 20px; }
.error-container h1 { color: var(--danger); margin-bottom: 15px; }
.error-container .code-entered { font-size: 1.2em; background: #f5f5f5; padding: 8px 15px; border-radius: var(--radius); display: inline-block; margin: 10px 0 20px; }
.error-container .try-again-btn { display: inline-block; padding: 12px 25px; background: var(--primary); color: #fff; border-radius: 5px; margin-top: 15px; }
.error-box { background: #f8d7da; color: #721c24; padding: 15px; border-radius: var(--radius); margin-bottom: 20px; border: 1px solid #f5c6cb; }
.success-box { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; padding: 20px; border-radius: var(--radius-lg); text-align: center; }
.success-box h2 { margin-top: 0; color: #155724; }

/* === Validation Form === */
.validation-form { text-align: left; }
.validation-form label { display: block; font-weight: bold; margin-bottom: 5px; }
.validation-form input[type="text"] { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1.1em; text-align: center; letter-spacing: 2px; }
.validation-form button { width: 100%; padding: 12px; margin-top: 15px; }
.validation-container input[type=text] { max-width: 100%; }
.validation-container .message { padding: 15px 20px; border-radius: 5px; margin-bottom: 20px; }
.validation-container .message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.validation-container .message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.validation-container .icon { font-size: 48px; margin-bottom: 15px; }
.validation-container .icon.success { color: var(--success); }
.validation-container .icon.error { color: var(--danger); }
.validation-container .login-link { margin-top: 20px; }

/* === Admin Badge === */
.admin-badge { display: inline-block; background: var(--danger); color: #fff; padding: 4px 10px; border-radius: var(--radius); font-size: 0.8em; margin-left: 10px; vertical-align: middle; }

/* === Email Status === */
.status-loading { text-align: center; padding: 40px; color: var(--muted); }
.status-error { text-align: center; padding: 20px; color: var(--danger); background: #f8d7da; border-radius: var(--radius); }
.status-summary { display: flex; align-items: center; gap: 15px; padding: 20px; border-radius: var(--radius-lg); margin-bottom: 20px; }
.status-summary.status-delivered, .status-summary.status-opened, .status-summary.status-clicked { background: #d4edda; color: #155724; }
.status-summary.status-failed, .status-summary.status-bounced, .status-summary.status-dropped { background: #f8d7da; color: #721c24; }
.status-summary.status-accepted { background: #fff3cd; color: #856404; }
.status-summary.status-unknown { background: #e9ecef; color: #495057; }
.status-icon { font-size: 2em; }
.status-events-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.status-events-table th, .status-events-table td { padding: 10px; text-align: left; border-bottom: 1px solid var(--border); }
.status-events-table th { background: var(--light); font-weight: 600; }
.event-badge { display: inline-block; padding: 3px 8px; border-radius: var(--radius); font-size: 0.85em; font-weight: 500; text-transform: capitalize; }
.event-badge.event-delivered { background: #d4edda; color: #155724; }
.event-badge.event-opened { background: #cce5ff; color: #004085; }
.event-badge.event-accepted { background: #fff3cd; color: #856404; }
.event-badge.event-failed, .event-badge.event-bounced { background: #f8d7da; color: #721c24; }
.message-id { font-size: 0.8em; color: var(--muted); word-break: break-all; }
.message-id-link { color: var(--primary); cursor: pointer; }
.btn-view, .btn-text, .btn-html { padding: 8px 14px; margin: 2px; border: none; border-radius: var(--radius); cursor: pointer; font-size: 0.85em; min-height: 44px; }
.btn-text { background: var(--secondary); color: #fff; }
.btn-html { background: var(--primary); color: #fff; }
.btn-view:focus-visible, .btn-text:focus-visible, .btn-html:focus-visible { box-shadow: var(--focus-ring); outline: none; }

/* === My Info Box === */
.my-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-bottom: 1rem;
	padding: 1rem;
	background-color: white;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}
.my-info-content p { margin: 0; }
.my-info-content span + span { display: block; }
.my-info-buttons {
	display: flex;
	justify-content: space-between;
	width: 100%;
	margin: 1rem 0 0 0;
}
.my-info-buttons a { text-decoration: underline; }

/* === Key/Output Display === */
.key-display { margin-top: 15px; padding: 10px; background: #fff3cd; border: 1px solid var(--warning); border-radius: var(--radius); }
.key-display code { background: var(--light); padding: 2px 6px; border-radius: 3px; }
.output-content { background: #f5f5f5; border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; font-size: 0.85em; white-space: pre-wrap; word-break: break-all; max-height: 400px; overflow-y: auto; }
.warning-text { color: #856404; font-size: 0.9em; margin-top: 10px; }

/* === Help Page === */
.help-content { background: #fff; border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); }
.help-content h1 { color: var(--dark); border-bottom: 2px solid var(--primary); padding-bottom: 10px; margin-top: 0; }
.help-content h2 { color: #444; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-top: 30px; }
.help-content p { line-height: 1.6; margin: 10px 0; }
.help-content ul, .help-content ol { margin: 10px 0; padding-left: 25px; }
.help-content li { margin: 5px 0; }
.help-content code { background: #f4f4f4; padding: 2px 6px; border-radius: 3px; }
.help-content pre { background: var(--light); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; overflow-x: auto; }

/* === Action Buttons === */
.action-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.actions-cell { text-align: center; white-space: nowrap; }

/* === Additional Button Variants === */
.btn-secondary-gray { background: #6c757d; color: #fff; }
.btn-secondary-gray:hover { background: #5a6268; }
.custom-btn { background: var(--secondary); color: #fff; border: none; padding: 8px 16px; border-radius: var(--radius); cursor: pointer; }
.preset-btn { background: var(--secondary); border: 1px solid var(--border); padding: 6px 12px; border-radius: var(--radius); cursor: pointer; }

/* === Alert Variants === */
.alert-centered { text-align: center; }
.admin-notice-readonly { background: #e8f4fd; border: 1px solid var(--info); color: #0c5460; }
.info-message { background: #e8f4fd; padding: 15px; border-radius: var(--radius); color: #0c5460; margin-bottom: 20px; }

/* === Error Page === */
.error-page-body { display: flex; align-items: center; justify-content: center; min-height: 80vh; }
.error-content { text-align: center; max-width: 500px; padding: 40px; }
.error-header { margin-bottom: 20px; }
.error-title { font-size: 1.5em; color: var(--danger); margin: 10px 0; }
.error-code { font-size: 3em; color: var(--danger); font-weight: bold; }
.error-description { color: var(--muted); margin-bottom: 20px; }
.error-actions { margin-top: 20px; }
.error-footer { margin-top: 30px; color: var(--muted); font-size: 0.9em; }

/* === Filter Extras === */
.filter-form { display: flex; flex-direction: column; gap: 1rem; }
.filter-form p { margin: 0; }
.filter-form .flex-responsive .form-group { width: 100%; }
.filter-form .flex-responsive .form-group select { max-width: 100%; }
.filter-form .flex-responsive .form-group input[type=date] { width: 100%; }
.filter-label { font-weight: bold; }
.filter-toggle { padding: 8px 16px; background: var(--light); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.filter-toggle.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* === Email Components === */
.email-certificate-form { margin-top: 1rem; padding: 1rem; background: white; border-radius: var(--radius); }
.email-success { color: var(--success); margin: 10px 0; }
.email-error { color: var(--danger); margin: 10px 0; }

/* === Forgot Password === */
.forgot-password-container { margin: 1rem auto; }

/* === Method Selection (Password Reset) === */
.method-options { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }
.method-option {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	border: 2px solid var(--border);
	border-radius: var(--radius-lg);
	cursor: pointer;
	transition: border-color 0.2s;
}
.method-option:hover { border-color: var(--primary); }
.method-option.selected { border-color: var(--primary); background: #e8f4fd; }
.method-option-title { font-weight: 600; }
.method-option-desc { color: var(--muted); font-size: 0.9em; }

/* === Step Indicator === */
.step-indicator { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; }
.step { width: 2rem; height: 2rem; border-radius: 50%; background: var(--border); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.step.active { background: var(--primary); }
.step.completed { background: var(--success); }
.checkmark::after { content: '✓'; }

/* === Table Column Widths === */
.date-col { width: 150px; white-space: nowrap; }
.subject-col { max-width: 300px; }

/* === Additional Text Classes === */
.text-muted-light { color: #999; }
.hint { font-size: 0.85em; color: var(--muted); font-style: italic; }
.help-link { font-size: 0.9em; }
.success-message { color: var(--success); margin: 10px 0; }

/* === Transcript === */
.transcript-subtitle { color: var(--muted); margin-bottom: 20px; }

/* === Security Questions === */
.security-questions-actions { margin-top: 15px; }
.security-answer-label, .sq-answer-label { font-weight: normal; }

/* === Legend Badge === */
.legend-badge { display: inline-block; padding: 2px 8px; border-radius: var(--radius); font-size: 0.85em; margin-right: 10px; }

/* === Misc Classes === */
.list-compact { margin: 0; padding-left: 20px; }
.list-compact li { margin: 3px 0; }
.no-events { color: var(--muted); font-style: italic; padding: 20px; text-align: center; }
.print-summary { margin-bottom: 20px; }
.start-over { margin-top: 20px; }
.student-email { color: var(--muted); font-size: 0.9em; }
.summary-section { margin-bottom: 30px; }
.verify-url-link { word-break: break-all; }
.version-info { font-size: 0.85em; color: var(--muted); }
.year-separator { border-top: 2px solid var(--border); margin: 30px 0 20px; padding-top: 20px; }
.icon { font-size: 1.2em; }
.exam-attempt-info { padding: 10px; background: #f9f9f9; border-radius: var(--radius); margin-top: 10px; }
.stat { text-align: center; }
.status-description { color: var(--muted); margin: 10px 0; }
.status-message-id { font-size: 0.85em; color: var(--muted); word-break: break-all; margin-top: 10px; }

/* === Responsive Breakpoints (Mobile-First) === */

/* Mobile only: compact tables */
@media (max-width: 767px) {
    .data-table {
        font-size: 0.85em;
    }
    .data-table th, .data-table td {
        padding: 8px 6px;
    }
}

/* Tablet and up (768px+) */
@media (min-width: 768px) {
    /* Header: row layout on larger screens */
    .site-header-content {
        flex-direction: row;
        justify-content: space-between;
    }
	.site-header-title {  justify-content: flex-start; }
    .site-header-content nav {
        justify-content: flex-end;
    }
	.site-header-text { font-size: 2rem; }

	.flex-responsive { flex-direction: row; }
	.filter-form .flex-responsive .form-group { width: auto; }
	.filter-form .flex-responsive .form-group select { max-width: 400px; }
	.filter-form .flex-responsive .form-group input[type=date] { width: auto; }

	.my-info-content span + span { display: inline; margin-left: 1rem; }

	.my-info-buttons {
		display: flex;
		justify-content: flex-start;
		flex-direction: column;
		width: auto;
		margin: 0;
		text-align: right;
	}

	.course-item {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
	.course-action { width: auto; min-width: 11rem; }
    
    /* Header actions: row layout */
    .admin-header-row, .header-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Modals: narrower on larger screens */
    dialog.modal-wide {
        width: 75%;
    }

	/* === Forgot Password === */
	.forgot-password-container { max-width: 66%; }

	.summary-card { flex: 1; }
	.flex-last-item { margin-left: auto; }

	.security-question-row .question-input { flex: 2; width: auto; }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    /* Slightly more padding on large screens */
    main {
        padding: 0 20px;
    }
	.action-buttons { flex-wrap: nowrap; }
}

/* === Print Styles === */
@media print {
    .site-header, footer, .back-link, .no-print, .filter-section, .btn, .print-btn, .report-nav-row, .stats-filter { display: none !important; }
    .page-container { margin: 0; padding: 0; }
    .data-table { box-shadow: none; }
    .summary-card { border: 1px solid #333; box-shadow: none; }
    .certificate-container { border: 3px solid #333; box-shadow: none; margin: 0; padding: 15px 25px; max-width: none; }
    .admin-badge { background: #333; }
}
