@font-face {
    font-family: 'Arial';
    src: url('../fonts/arial.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Arial';
    src: url('../fonts/arial-bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --nfpa-red: #c8102e;
    --nfpa-dark: #1a1a1a;
    --nfpa-gray: #6c757d;
    --nfpa-border: #dee2e6;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(160deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.auth-card {
    max-width: 400px;
    width: 100%;
}

.auth-card-wide {
    max-width: 520px;
    width: 100%;
}

.nfpa-card {
    border: 1px solid var(--nfpa-border);
    border-top: 4px solid var(--nfpa-red);
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.nfpa-logo {
    width: 110px;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
}

.nfpa-title {
    color: var(--nfpa-dark);
    font-weight: bold;
    letter-spacing: 0.02em;
}

.nfpa-subtitle {
    color: var(--nfpa-gray);
    font-size: 0.85rem;
}

.btn-nfpa {
    background-color: var(--nfpa-red);
    border-color: var(--nfpa-red);
    color: #fff;
    font-weight: bold;
}

.btn-nfpa:hover,
.btn-nfpa:focus {
    background-color: #a50d26;
    border-color: #a50d26;
    color: #fff;
}

.form-label {
    font-weight: bold;
    color: var(--nfpa-dark);
    font-size: 0.875rem;
}

.form-control:focus {
    border-color: var(--nfpa-red);
    box-shadow: 0 0 0 0.2rem rgba(200, 16, 46, 0.15);
}

.code-inputs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    direction: ltr;
}

.code-input {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: bold;
    border: 2px solid var(--nfpa-border);
    border-radius: 8px;
}

.code-input:focus {
    border-color: var(--nfpa-red);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(200, 16, 46, 0.15);
}

.toast-container-custom {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1080;
}

.device-choice-btns .btn {
    min-width: 140px;
}

.table tr.row-expired td {
    background-color: #fff5f5 !important;
}

/* Student dashboard */
.student-body {
    background: #f0f2f5;
    min-height: 100vh;
}

.student-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-bottom: 3px solid var(--nfpa-red);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.student-header-logo {
    width: 48px;
    height: auto;
}

.student-brand {
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.2;
}

.student-brand-sub {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.7rem;
}

.student-days-badge {
    background: rgba(200, 16, 46, 0.15);
    border: 1px solid rgba(200, 16, 46, 0.4);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    text-align: center;
}

.student-days-badge .label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
}

.student-days-badge .value {
    display: block;
    color: #fff;
    font-weight: bold;
    font-size: 1.25rem;
    line-height: 1.2;
}

.student-hero {
    background: #fff;
    border: 1px solid var(--nfpa-border);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.student-hero-label {
    color: var(--nfpa-red);
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.student-hero-title {
    color: var(--nfpa-dark);
    font-size: 1.5rem;
    font-weight: bold;
}

.student-hero-desc {
    color: var(--nfpa-gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

.student-stat-card {
    display: flex;
    gap: 0.75rem;
    background: #fafafa;
    border: 1px solid var(--nfpa-border);
    border-radius: 10px;
    padding: 1rem;
}

.student-stat-item {
    flex: 1;
    text-align: center;
}

.student-stat-item .num {
    display: block;
    color: var(--nfpa-red);
    font-weight: bold;
    font-size: 1.35rem;
}

.student-stat-item .lbl {
    display: block;
    color: var(--nfpa-gray);
    font-size: 0.7rem;
    margin-top: 0.15rem;
}

.student-section-title {
    color: var(--nfpa-dark);
    font-size: 1.15rem;
    font-weight: bold;
}

.student-section-sub {
    color: var(--nfpa-gray);
    font-size: 0.85rem;
}

.student-timezone-badge {
    font-size: 0.75rem;
    font-weight: normal;
}

.domain-card {
    background: #fff;
    border: 1px solid var(--nfpa-border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.domain-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.domain-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.domain-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--nfpa-red);
    color: #fff;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 8px;
}

.domain-weight {
    color: var(--nfpa-red);
    font-weight: bold;
    font-size: 1.1rem;
}

.domain-title {
    color: var(--nfpa-dark);
    font-size: 0.85rem;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 0.35rem;
    direction: ltr;
    text-align: left;
}

.domain-title-ar {
    color: var(--nfpa-gray);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.domain-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.domain-section-tag {
    background: #e8f0fe;
    color: #1a56db;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    direction: ltr;
}

.domain-progress {
    height: 6px;
    border-radius: 3px;
    background: #eee;
}

.domain-progress .progress-bar {
    background: linear-gradient(90deg, var(--nfpa-red), #e8354a);
    border-radius: 3px;
}

.domain-card-link {
    cursor: pointer;
}

.domain-card-link:hover {
    border-color: var(--nfpa-red);
}

/* Study chapter pages — English LTR content */
.study-ltr {
    direction: ltr;
    text-align: left;
}

.study-ltr .study-chapter-title,
.study-ltr .study-chapter-ref,
.study-ltr .study-panel-title,
.study-ltr .study-subtitle,
.study-ltr .study-lead,
.study-ltr .study-list,
.study-ltr .study-scenario p,
.study-ltr .study-table,
.study-ltr .study-mcq-text,
.study-ltr .study-mcq-solution p {
    text-align: left;
}

.study-ltr .study-list {
    padding-left: 1.2rem;
    padding-right: 0;
}

.study-ltr .study-callout {
    border-right: 1px solid #f5c6cb;
    border-left: 4px solid var(--nfpa-red);
}

.study-ltr .study-panel-title {
    flex-direction: row;
}

.study-ltr .breadcrumb-item + .breadcrumb-item::before {
    float: left;
    padding-left: 0;
    padding-right: 0.5rem;
}

.student-breadcrumb {
    font-size: 0.8rem;
}

.student-breadcrumb a {
    color: var(--nfpa-red);
    text-decoration: none;
}

.study-chapter-header {
    background: #fff;
    border: 1px solid var(--nfpa-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border-top: 4px solid var(--nfpa-red);
}

.study-chapter-badge {
    display: inline-block;
    background: #f8f9fa;
    border: 1px solid var(--nfpa-border);
    color: var(--nfpa-gray);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.study-chapter-title {
    color: var(--nfpa-dark);
    font-size: 1.35rem;
    font-weight: bold;
    margin-bottom: 0.35rem;
}

.study-chapter-ref {
    color: var(--nfpa-gray);
    font-size: 0.85rem;
}

.study-panel {
    background: #fff;
    border: 1px solid var(--nfpa-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.study-panel-title {
    color: var(--nfpa-dark);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.study-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--nfpa-red);
    color: #fff;
    font-size: 0.85rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.study-subtitle {
    color: var(--nfpa-dark);
    font-size: 0.95rem;
    font-weight: bold;
    margin: 1rem 0 0.5rem;
}

.study-lead {
    color: #444;
    line-height: 1.7;
    font-size: 0.9rem;
}

.study-list {
    font-size: 0.88rem;
    line-height: 1.65;
    color: #444;
    padding-right: 1.2rem;
}

.study-narrative-list {
    list-style: disc;
}

.study-narrative-topic {
    margin-bottom: 1.25rem;
}

.study-narrative-topic-title {
    display: block;
    color: var(--nfpa-dark, #1a1a1a);
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.study-narrative-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.study-list--nested {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
    list-style: circle;
}

.study-list--exam li {
    color: #5c3d2e;
}

.study-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.study-term-tag {
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    color: var(--nfpa-dark);
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    direction: ltr;
}

.study-callout {
    background: #fff8f8;
    border: 1px solid #f5c6cb;
    border-right: 4px solid var(--nfpa-red);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.88rem;
    margin-top: 1rem;
}

.study-scenario {
    border: 1px solid var(--nfpa-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fafafa;
}

.study-scenario-title {
    color: var(--nfpa-red);
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.study-scenario p {
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 0.5rem;
    color: #444;
}

.study-table {
    font-size: 0.82rem;
}

.study-mcq {
    border: 1px solid var(--nfpa-border);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    background: #fafafa;
}

.study-mcq-title {
    color: var(--nfpa-red);
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 0.6rem;
}

.study-mcq-text {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #333;
    margin-bottom: 0.75rem;
}

.study-mcq-options {
    list-style: none;
    padding: 0;
    margin: 0 0 0.85rem;
}

.study-mcq-options li {
    font-size: 0.88rem;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.35rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.study-mcq-options .opt-label {
    font-weight: bold;
    color: var(--nfpa-red);
    min-width: 1.25rem;
}

.study-mcq-solution {
    background: #f0faf4;
    border: 1px solid #b8dfc8;
    border-left: 4px solid #198754;
    border-radius: 8px;
    padding: 0.85rem 1rem;
}

.study-mcq-answer {
    color: #146c43;
    font-size: 0.88rem;
    font-weight: bold;
    margin-bottom: 0.35rem;
}

.study-mcq-solution p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
}
