.unlock-body {
    min-height: 100vh;
    background: linear-gradient(160deg, #e8f4fc 0%, #f8f9fa 60%);
}

.unlock-container {
    max-width: 480px;
}

.unlock-card {
    border: 0;
    border-radius: 1rem;
}

.unlock-steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.unlock-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    min-width: 4.5rem;
    text-align: center;
}

.unlock-step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e9ecef;
    color: #6c757d;
}

.unlock-step-active .unlock-step-dot {
    background: #0d6efd;
    color: #fff;
}

.unlock-step-done .unlock-step-dot {
    background: #198754;
    color: #fff;
}

.unlock-step-label {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 0.35rem;
    line-height: 1.2;
}

.unlock-step-active .unlock-step-label {
    color: #0d6efd;
    font-weight: 600;
}

.unlock-step-line {
    flex: 1 1 auto;
    height: 2px;
    background: #e9ecef;
    margin: 0 0.25rem;
    margin-bottom: 1.1rem;
    min-width: 1rem;
}

.unlock-step-line-done {
    background: #198754;
}

.feeling-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feeling-chip span {
    display: inline-block;
    padding: 0.6rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 999px;
    cursor: pointer;
    min-height: 44px;
    line-height: 1.4;
}

.feeling-chip input:checked + span {
    border-color: #0d6efd;
    background: #e7f1ff;
}

/* Feeling picker — student unlock / receive */
.feeling-picker-heading {
    margin-bottom: 0.75rem;
}

.feeling-picker-label {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.15rem;
}

.feeling-picker-hint {
    font-size: 0.9rem;
    color: #64748b;
}

.feeling-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

@media (min-width: 576px) {
    .feeling-picker-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.feeling-picker .feeling-chip {
    display: block;
    margin: 0;
    cursor: pointer;
    position: relative;
}

.feeling-picker .feeling-chip-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    min-height: 5.25rem;
    padding: 0.85rem 0.6rem;
    border: 2px solid #cbd5e1;
    border-radius: 1rem;
    background: #f8fafc;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.feeling-picker .feeling-chip-emoji {
    font-size: 1.85rem;
    line-height: 1;
    display: block;
    border: 0;
    padding: 0;
    min-height: 0;
    background: transparent;
}

.feeling-picker .feeling-chip-text {
    display: block;
    border: 0;
    padding: 0;
    min-height: 0;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    line-height: 1.25;
}

.feeling-picker .feeling-chip:hover .feeling-chip-face {
    border-color: #94a3b8;
    background: #fff;
}

.feeling-picker .feeling-chip input:checked + .feeling-chip-face,
.feeling-picker .feeling-chip.is-selected .feeling-chip-face {
    border-color: #2563eb;
    background: #dbeafe;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.feeling-picker .feeling-chip input:focus-visible + .feeling-chip-face {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.break-all {
    word-break: break-all;
}

@media (max-width: 575.98px) {
    .btn-lg {
        min-height: 48px;
    }
}

/* ========== Student app design ========== */
.student-app {
    --student-primary: #2563eb;
    --student-primary-dark: #1d4ed8;
    --student-primary-soft: #dbeafe;
    --student-accent: #0ea5e9;
    --student-success: #059669;
    --student-warm: #f59e0b;
    --student-text: #0f172a;
    --student-muted: #64748b;
    --student-card-bg: #ffffff;
    --student-radius: 1rem;
    --student-radius-sm: 0.75rem;
    --student-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
    --student-shadow-lg: 0 12px 40px rgba(37, 99, 235, 0.12);
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--student-text);
}

.student-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.student-shell--app {
    background: linear-gradient(165deg, #dbeafe 0%, #fef3c7 18%, #f0fdf4 45%, #eff6ff 100%);
    background-attachment: fixed;
}

.student-shell--auth {
    background: linear-gradient(160deg, #dbeafe 0%, #f0f9ff 40%, #f8fafc 100%);
    background-attachment: fixed;
}

.student-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.student-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 640px;
    margin: 0 auto;
    padding: 0.65rem 1rem;
}

.student-header-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.student-header-inner--app {
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.student-header-brand--app {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
}

.student-header-brand--app .student-header-school-name {
    font-size: 0.95rem;
    text-align: left;
}

.student-header-brand--app .school-logo--header {
    margin: 0;
    max-height: 44px;
    max-width: 120px;
}

.student-account-menu {
    flex-shrink: 0;
}

.student-account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: rgba(255, 255, 255, 0.95);
    color: var(--student-text);
    border-radius: 999px;
    padding: 0.2rem 0.55rem 0.2rem 0.25rem;
    font-weight: 600;
    max-width: 9.5rem;
}

.student-account-toggle::after {
    margin-left: 0.1rem;
}

.student-account-toggle:hover,
.student-account-toggle:focus {
    background: var(--student-primary-soft);
    border-color: var(--student-primary);
    color: var(--student-primary-dark);
}

.student-account-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--student-primary) 0%, #3b82f6 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.student-account-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
}

.student-account-dropdown {
    min-width: 12rem;
    border-radius: var(--student-radius-sm);
    border-color: rgba(148, 163, 184, 0.25);
}

.student-account-dropdown-name {
    font-weight: 700;
    color: var(--student-text);
    line-height: 1.25;
}

.student-account-dropdown-id {
    font-size: 0.78rem;
    color: var(--student-muted);
    margin-top: 0.15rem;
}

.student-merit-rotator {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 50%, #ecfeff 100%);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--student-radius);
    min-height: 5.5rem;
    margin-bottom: 1.25rem;
    padding: 1.15rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.student-merit-rotator-slide {
    width: 100%;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.student-merit-rotator-slide.is-active {
    opacity: 1;
    transform: translateY(0);
}

.student-merit-rotator-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--student-primary-dark);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.student-merit-rotator-text {
    font-size: 0.92rem;
    line-height: 1.5;
    color: #334155;
    font-weight: 500;
}

.student-header-inner--centered {
    justify-content: center;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.student-header-brand--centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    width: 100%;
}

.student-header-school-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--student-text);
    line-height: 1.25;
    letter-spacing: -0.02em;
    max-width: 100%;
}

.student-app .school-logo--header {
    max-height: 56px;
    max-width: 160px;
    margin: 0 auto;
    filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.1));
}

.student-header-school {
    font-size: 0.7rem;
    color: var(--student-muted);
    line-height: 1.2;
}

.student-header-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--student-primary);
    line-height: 1.2;
}

.student-lang-btn {
    border-color: rgba(37, 99, 235, 0.25);
    color: var(--student-primary);
    background: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
}

.student-lang-btn:hover {
    background: var(--student-primary-soft);
    border-color: var(--student-primary);
    color: var(--student-primary-dark);
}

.student-app .school-logo--sm {
    margin: 0;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06));
}

.student-main {
    flex: 1;
    padding: 1rem 0 5.5rem;
}

.student-shell--auth .student-main {
    padding-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.student-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1rem;
}

.student-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--student-text);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.student-page-lead {
    color: var(--student-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.student-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--student-muted);
    margin-bottom: 0.75rem;
}

.student-card {
    background: var(--student-card-bg);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--student-radius);
    box-shadow: var(--student-shadow);
    margin-bottom: 1rem;
    overflow: hidden;
}

.student-card-body {
    padding: 1.15rem 1.25rem;
}

.student-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    color: var(--student-text);
}

.student-celebrate {
    background: linear-gradient(135deg, #fff 0%, #fef9c3 55%, #fce7f3 100%);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: var(--student-radius);
    padding: 1.15rem 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}

.student-celebrate-emoji {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.student-celebrate-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #92400e;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.student-celebrate-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #78350f;
}

.student-hero {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 45%, #06b6d4 100%);
    color: #fff;
    border-radius: var(--student-radius);
    padding: 1.35rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
}

.student-hero::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -20%;
    width: 55%;
    height: 140%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.student-hero-label {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

.student-hero-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.student-hero-id {
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.15);
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.student-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.student-stat-card {
    background: var(--student-card-bg);
    border-radius: var(--student-radius-sm);
    padding: 1rem 0.85rem;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: var(--student-shadow);
}

.student-stat-icon {
    font-size: 1.35rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.student-stat-card--values {
    background: linear-gradient(145deg, #fff 0%, #eff6ff 100%);
}

.student-stat-card--badges {
    background: linear-gradient(145deg, #fff 0%, #fffbeb 100%);
}

.student-stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.15rem;
}

.student-stat-card--values .student-stat-value {
    color: var(--student-primary);
}

.student-stat-card--badges .student-stat-value {
    color: var(--student-warm);
}

.student-stat-label {
    font-size: 0.75rem;
    color: var(--student-muted);
    font-weight: 500;
}

.achievement-badge {
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
    color: #78350f;
    font-weight: 600;
    padding: 0.45em 0.9em;
    border-radius: 999px;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.35);
}

.merit-unlock-card,
.student-timeline-card {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--student-radius-sm);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
    border-left: 4px solid var(--student-primary);
    margin-bottom: 0.75rem;
}

.merit-unlock-card .card-body,
.student-timeline-card .card-body {
    padding: 1rem 1.1rem;
}

.merit-unlock-emoji {
    font-size: 1.75rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.student-value-name {
    font-weight: 700;
    color: var(--student-primary-dark);
    font-size: 0.95rem;
}

.student-header--auth .student-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
}

.student-header-side {
    width: 3.25rem;
    flex-shrink: 0;
}

.student-header-slogan {
    grid-column: 2;
    margin: 0;
    padding: 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--student-primary-dark);
    text-align: center;
    letter-spacing: -0.02em;
}

.student-header--auth .student-lang-btn {
    grid-column: 3;
    justify-self: end;
}

.student-header-spacer {
    flex: 1;
}

.student-auth-panel {
    width: 100%;
    max-width: 420px;
    margin: 0.25rem auto 0;
}

.student-auth-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: calc(var(--student-radius) + 0.25rem);
    box-shadow: var(--student-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.85);
    padding: 1.75rem 1.35rem 1.5rem;
}

.student-auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.student-auth-brand-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.student-auth-monogram {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--student-primary-dark);
    background: linear-gradient(145deg, #ffffff 0%, var(--student-primary-soft) 100%);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.student-auth-monogram--default {
    font-size: 1.75rem;
}

.student-auth-school {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--student-text);
    margin: 0 0 0.65rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.student-auth-brand-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--student-primary);
    letter-spacing: 0.01em;
}

.student-auth-slogan {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1.45;
    color: var(--student-primary-dark);
    letter-spacing: -0.01em;
}

.student-auth-heading {
    margin: 0 0 1rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--student-text);
}

.student-auth-form-title {
    margin: 0 0 0.85rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--student-muted);
}

.student-auth-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--student-primary-soft);
    border-radius: 50%;
}

.student-app .form-control,
.student-app .form-select {
    border-radius: var(--student-radius-sm);
    border-color: rgba(148, 163, 184, 0.35);
    padding: 0.55rem 0.85rem;
}

.student-app .form-control:focus,
.student-app .form-select:focus {
    border-color: var(--student-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.student-identity-input {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.student-identity-input::placeholder {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    color: #64748b;
}

@media (max-width: 380px) {
    .student-identity-input::placeholder {
        font-size: 0.9rem;
    }

    .student-header-slogan {
        font-size: 0.92rem;
    }
}

.student-otp-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.student-otp-actions .btn {
    width: 100%;
}

.student-shell--auth .student-auth-brand {
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
}

.student-shell--auth .alert {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.student-shell--auth .student-otp-box {
    margin-bottom: 0.75rem;
}

.student-app .btn-primary {
    background: linear-gradient(135deg, var(--student-primary) 0%, #3b82f6 100%);
    border: none;
    border-radius: var(--student-radius-sm);
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.student-app .btn-primary:hover {
    background: linear-gradient(135deg, var(--student-primary-dark) 0%, var(--student-primary) 100%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.student-app .btn-outline-primary {
    border-radius: var(--student-radius-sm);
    font-weight: 600;
    border-color: rgba(37, 99, 235, 0.4);
    color: var(--student-primary);
}

.student-app .btn-outline-secondary {
    border-radius: var(--student-radius-sm);
}

.student-app .alert {
    border-radius: var(--student-radius-sm);
    border: none;
}

.student-app .list-group-item {
    border-color: rgba(148, 163, 184, 0.2);
    padding: 1rem 1.1rem;
}

.student-app .list-group {
    border-radius: var(--student-radius-sm);
    overflow: hidden;
    box-shadow: var(--student-shadow);
}

.student-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--student-muted);
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--student-radius-sm);
    border: 1px dashed rgba(148, 163, 184, 0.35);
}

.student-empty--cheerful {
    background: linear-gradient(145deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #047857;
    padding: 1.5rem 1rem;
}

.student-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.student-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.student-bottom-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 1040;
}

.student-bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    max-width: 640px;
    margin: 0 auto;
    padding: 0.35rem 0.25rem 0.5rem;
}

.student-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 52px;
    padding: 0.35rem 0.2rem;
    text-decoration: none;
    color: var(--student-muted);
    border-radius: 0.65rem;
    transition: color 0.15s, background 0.15s;
}

.student-nav-link:hover {
    color: var(--student-primary);
    background: rgba(37, 99, 235, 0.06);
}

.student-nav-link.active {
    color: var(--student-primary);
    background: var(--student-primary-soft);
    font-weight: 600;
}

.student-nav-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.student-nav-label {
    font-size: 0.62rem;
    line-height: 1.15;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.otp-input {
    letter-spacing: 0.35em;
    font-weight: 600;
    font-size: 1.25rem;
}

.serial-input {
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 1.15rem;
}

.qr-reader-wrap {
    max-width: 320px;
    border-radius: var(--student-radius-sm);
    overflow: hidden;
    background: #0f172a;
}

.qr-reader-wrap video {
    border-radius: var(--student-radius-sm);
}

.reference-body {
    color: #334155;
    line-height: 1.65;
}

.reference-body code {
    font-family: ui-monospace, monospace;
    font-size: 0.9em;
    background: #f1f5f9;
    padding: 0.1em 0.35em;
    border-radius: 0.25rem;
}

.reference-article .reference-body ul {
    padding-left: 1.25rem;
}

.student-otp-box {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: var(--student-radius-sm);
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.student-profile-dl dt {
    color: var(--student-muted);
    font-weight: 500;
}

.student-profile-dl dd {
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .student-main {
        padding-bottom: 6rem;
    }

    .student-nav-label {
        font-size: 0.68rem;
    }

    .student-page-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 380px) {
    .student-nav-label {
        font-size: 0.55rem;
    }

    .student-nav-icon {
        font-size: 1rem;
    }
}

.report-content p:last-child {
    margin-bottom: 0;
}

.report-content em {
    color: var(--student-muted);
}

/* Staff vertical sidebar (admin + teacher + principal) */
body.staff-layout {
    margin: 0;
    overflow-x: hidden;
    background: #f8f9fa;
}

body.staff-shell--admin {
    --staff-accent: #0d6efd;
    --staff-accent-dark: #0a58ca;
}

body.staff-shell--teacher {
    --staff-accent: #0f766e;
    --staff-accent-dark: #0d5c56;
}

body.staff-shell--principal {
    --staff-accent: #5b21b6;
    --staff-accent-dark: #4c1d95;
}

.staff-shell {
    min-height: 100vh;
    background: #f8f9fa;
}

.staff-sidebar {
    background: var(--staff-accent);
    color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
}

@media (min-width: 992px) {
    .staff-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        z-index: 1030;
    }

    .staff-main {
        margin-left: 260px;
        min-height: 100vh;
        width: calc(100% - 260px);
    }
}

.staff-sidebar-nav {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1rem 0.75rem 1.5rem;
}

.staff-offcanvas .staff-sidebar-nav {
    min-height: auto;
    padding-top: 0.5rem;
}

.staff-sidebar-brand-block {
    text-align: center;
    padding: 0.5rem 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.75rem;
}

.staff-sidebar-brand-block .school-logo {
    margin-left: auto;
    margin-right: auto;
}

.staff-sidebar-school {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    padding: 0.35rem 0.25rem 0;
}

.staff-shell--admin .staff-sidebar-brand-block .school-logo--lg {
    max-height: 88px;
    max-width: 220px;
}

.staff-shell--admin .staff-sidebar-school {
    font-size: 1rem;
}

.staff-sidebar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    padding: 0.5rem 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.75rem;
}

.staff-shell--admin .staff-sidebar-brand {
    padding-bottom: 0.65rem;
    margin-bottom: 0.5rem;
}

.staff-sidebar-brand:hover {
    color: #fff;
    opacity: 0.9;
}

.staff-sidebar-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    padding: 0 0.75rem 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.staff-sidebar-section {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    padding: 0.75rem 0.75rem 0.35rem;
}

.staff-shell--admin .staff-sidebar-section {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 0.35rem;
    margin: 0.65rem 0.15rem 0.2rem;
    padding: 0.4rem 0.65rem;
}

.staff-sidebar-link {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    line-height: 1.35;
}

.staff-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.staff-sidebar-link.active {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-weight: 600;
}

.staff-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 0.75rem;
    margin-top: 1rem;
}

.staff-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.staff-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.staff-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--staff-accent, #0d6efd);
    color: var(--staff-accent, #0d6efd);
    background: #fff;
    min-height: 44px;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
}

.staff-menu-btn:hover,
.staff-menu-btn:focus {
    background: var(--staff-accent, #0d6efd);
    color: #fff;
    border-color: var(--staff-accent, #0d6efd);
}

.staff-menu-icon {
    display: inline-block;
    width: 1rem;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.staff-topbar-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
}

.staff-shell--admin .staff-topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #212529;
}

@media (min-width: 992px) {
    .staff-topbar-title {
        font-size: 0.875rem;
        font-weight: 400;
        color: #6c757d;
    }

    .staff-shell--admin .staff-topbar-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: #212529;
    }
}

.staff-content {
    flex: 1;
}

.staff-subnav .nav-link {
    font-weight: 600;
    color: #495057;
}

.staff-subnav .nav-link.active {
    background: var(--staff-accent, #0d6efd);
    color: #fff;
}

.cards-custody-tabs {
    gap: 0.35rem;
}

.cards-custody-tabs .nav-link {
    border-radius: 0.5rem;
}

.cards-custody-tab--all:not(.active) {
    background: #f1f3f5;
}

.cards-custody-tab--serialised:not(.active) {
    background: #e9ecef;
}

.cards-custody-tab--in_stock:not(.active) {
    background: #e7f1ff;
}

.cards-custody-tab--with_teacher:not(.active) {
    background: #e7f5ff;
}

.cards-custody-tab--unlocked:not(.active) {
    background: #e8f6ee;
}

.cards-custody-tab--lost:not(.active) {
    background: #fdeeee;
}

.cards-custody-tab--deactivated:not(.active) {
    background: #f3f0f7;
}

.cards-custody-tabs .nav-link.active {
    color: #fff;
}

.cards-custody-tab--all.active {
    background: #495057;
}

.cards-custody-tab--serialised.active {
    background: #6c757d;
}

.cards-custody-tab--in_stock.active {
    background: #0d6efd;
}

.cards-custody-tab--with_teacher.active {
    background: #0dcaf0;
    color: #055160;
}

.cards-custody-tab--unlocked.active {
    background: #198754;
}

.cards-custody-tab--lost.active {
    background: #dc3545;
}

.cards-custody-tab--deactivated.active {
    background: #6f42c1;
}

.staff-offcanvas.offcanvas {
    width: min(280px, 88vw);
    background-color: var(--staff-accent, #0d6efd);
    color: #fff;
    border-right: 0;
}

.staff-offcanvas .offcanvas-header {
    background-color: var(--staff-accent, #0d6efd);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
}

.staff-offcanvas .offcanvas-title {
    color: #fff;
    font-weight: 700;
}

.staff-offcanvas .offcanvas-body {
    background-color: var(--staff-accent, #0d6efd);
    color: #fff;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.staff-offcanvas .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.85;
}

.staff-offcanvas .btn-close:hover {
    opacity: 1;
}

.offcanvas-backdrop.show {
    opacity: 0.55;
}

@media (min-width: 992px) {
    .staff-offcanvas {
        display: none !important;
    }
}

.auth-shell {
    min-height: 100vh;
    background: linear-gradient(165deg, #eef2ff 0%, #f8f9fa 45%, #ecfdf5 100%);
}

.auth-shell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid #dee2e6;
    backdrop-filter: blur(6px);
}

.auth-shell-brand {
    font-weight: 700;
    color: #0d6efd;
    text-decoration: none;
}

.auth-shell-brand:hover {
    color: #0a58ca;
}

.auth-shell-main {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.school-logo {
    display: block;
    max-height: 56px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}

.school-logo--sm {
    max-height: 40px;
    max-width: 120px;
    margin-bottom: 0.5rem;
}

.school-logo--lg {
    max-height: 80px;
    max-width: 200px;
    margin-bottom: 0.75rem;
}

.school-logo--auth {
    max-height: 96px;
    max-width: 240px;
    margin: 0 auto;
    filter: drop-shadow(0 8px 20px rgba(15, 23, 42, 0.12));
}

.school-logo--header {
    max-height: 56px;
    max-width: 160px;
    margin: 0 auto;
}

.school-logo--preview {
    max-height: 72px;
    margin-left: 0;
}

.school-logo--print {
    max-height: 64px;
}

.staff-sidebar-nav .school-logo--sm {
    margin-left: 0;
    margin-right: auto;
}

.settings-mail-panel {
    background: #f8f9fa;
}

.settings-smtp-panel {
    background: #fff;
    border-radius: 0.375rem;
    padding: 1rem !important;
    margin-top: 1rem !important;
}

.settings-jump-nav .nav-link {
    color: #495057;
    background: #f8f9fa;
}

.settings-jump-nav .nav-link:hover {
    color: #0d6efd;
    background: #e7f1ff;
}

.auth-shell-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-shell-school {
    line-height: 1.2;
}

.auth-shell .school-logo--sm {
    margin: 0;
}

.activity-option {
    cursor: pointer;
    min-height: 44px;
}

.activity-option:has(input:checked) {
    border-color: #0d6efd !important;
    background: #e7f1ff;
}

/* Public give-card (student QR) */
body:has(.give-page) {
    background:
        radial-gradient(ellipse 120% 80% at 10% -10%, rgba(14, 165, 233, 0.22), transparent 55%),
        radial-gradient(ellipse 90% 70% at 100% 0%, rgba(34, 197, 94, 0.14), transparent 50%),
        linear-gradient(165deg, #f0f9ff 0%, #f8fafc 45%, #ecfdf5 100%);
}

.give-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "DM Sans", system-ui, sans-serif;
}

.give-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.give-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.give-topbar-brand .school-logo--sm {
    margin: 0;
    max-height: 1.75rem;
}

.give-topbar-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.give-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.give-topbar-btn {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
}

.give-topbar-btn--out {
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.25);
}

.give-shell {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
    flex: 1;
}

.give-hero {
    text-align: center;
    margin-bottom: 1.25rem;
}

.give-hero-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0284c7;
}

.give-hero-title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.45rem, 5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.2;
}

.give-hero-lead {
    margin: 0 auto;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.55;
    max-width: 36rem;
    text-wrap: pretty;
}

.give-student-card,
.give-pair-card,
.give-panel {
    background: #fff;
    border-radius: 1.15rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.give-student-card--solo {
    text-align: center;
    padding: 1.25rem 1rem;
    margin-bottom: 1rem;
}

.give-student-name {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.give-student-name-alt {
    margin-top: 0.2rem;
    font-size: 0.9rem;
    color: #64748b;
}

.give-student-id {
    display: inline-block;
    margin-top: 0.55rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0369a1;
    background: #e0f2fe;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
}

.give-pair-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.45rem 0.55rem;
    align-items: start;
    padding: 1rem 0.85rem;
    margin-bottom: 1rem;
}

.give-pair-teacher,
.give-pair-student {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.give-pair-student {
    align-items: flex-start;
}

.give-pair-teacher {
    align-items: flex-end;
    text-align: right;
}

.give-pair-role {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.give-pair-name {
    font-size: clamp(0.95rem, 3.4vw, 1.05rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.give-pair-student .give-student-id {
    margin-top: 0.35rem;
}

.give-pair-arrow {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0ea5e9;
    line-height: 1;
    align-self: center;
    padding-top: 0.85rem;
}

.give-panel {
    padding: 1.15rem 1rem 1.25rem;
}

.give-section-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.give-alert {
    border-radius: 0.85rem;
}

.give-label {
    font-weight: 700;
    color: #0f172a;
}

.give-input {
    border-radius: 0.85rem;
    margin-bottom: 1rem;
    border-color: #cbd5e1;
}

.give-primary-btn {
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
    padding: 0.7rem 1rem;
    color: #fff;
}

.give-primary-btn:hover,
.give-primary-btn:focus {
    color: #fff;
    background: linear-gradient(135deg, #0369a1, #0284c7);
}

.give-primary-btn:disabled {
    opacity: 0.55;
    box-shadow: none;
}

.give-value-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: min(48vh, 26rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.15rem;
}

.give-value-option {
    display: block;
    margin: 0;
    cursor: pointer;
}

.give-value-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.give-value-option-body {
    display: block;
    border: 2px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.8rem 0.9rem;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    background: #f8fafc;
    min-height: 3rem;
}

.give-value-option input:checked + .give-value-option-body {
    border-color: #0ea5e9;
    background: #e0f2fe;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.give-value-option input:focus-visible + .give-value-option-body {
    outline: 2px solid #0284c7;
    outline-offset: 2px;
}

.give-value-name {
    display: block;
    font-weight: 700;
    color: #0f172a;
}

.give-value-name-alt {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.15rem;
}

/* Teacher portal give — same visual language */
.teacher-give {
    max-width: 36rem;
    margin: 0 auto;
}

.teacher-give .give-hero--staff {
    text-align: left;
    margin-bottom: 1rem;
}

.teacher-give .give-hero--staff .give-hero-lead {
    margin-inline: 0;
}

.teacher-give-find-row {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.teacher-give-find-btn {
    width: 100%;
}

@media (min-width: 576px) {
    .teacher-give-find-row {
        flex-direction: row;
        align-items: stretch;
    }

    .teacher-give-find-row .give-input {
        flex: 1 1 auto;
        min-width: 0;
    }

    .teacher-give-find-btn {
        width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
        padding-inline: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .give-shell {
        padding: 0.9rem 0.85rem 2rem;
    }

    .give-topbar {
        padding: 0.55rem 0.75rem;
        gap: 0.5rem;
    }

    .give-topbar-title {
        font-size: 0.85rem;
        max-width: 7.5rem;
    }

    .give-topbar-btn {
        padding: 0.28rem 0.65rem;
        font-size: 0.8rem;
    }

    .give-hero {
        margin-bottom: 0.9rem;
    }

    .give-hero-lead {
        font-size: 0.9rem;
    }

    .give-page .give-hero-lead {
        text-align: left;
    }

    .give-pair-card {
        padding: 0.85rem 0.7rem;
        gap: 0.35rem 0.4rem;
    }

    .give-pair-arrow {
        padding-top: 0.7rem;
        font-size: 1.1rem;
    }

    .give-panel {
        padding: 0.95rem 0.85rem 1.1rem;
    }

    .give-value-list {
        max-height: none;
        overflow: visible;
    }

    .give-value-option-body {
        padding: 0.75rem 0.8rem;
    }

    .teacher-give .give-hero--staff {
        text-align: left;
    }

    .staff-content .teacher-give .give-hero-title {
        font-size: 1.45rem;
    }
}

.staff-kpi-card {
    border: 0;
}

.dashboard-chart-wrap {
    position: relative;
    height: 260px;
}

.dashboard-chart-wrap--wide {
    height: min(360px, max(220px, calc(40px * var(--teacher-count, 4))));
}

.staff-mobile-card .btn-sm {
    min-height: 36px;
}

/* Responsive staff tables: card rows on phone, normal table on md+ */
.staff-table-card {
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .staff-main .table-responsive.d-none.d-md-block {
        display: none !important;
    }

    .staff-content {
        max-width: 100%;
        overflow-x: hidden;
    }

    .staff-content .card,
    .staff-content .staff-mobile-card,
    .staff-table-card {
        border-radius: 0.5rem;
    }

    .staff-content .btn-group {
        flex-wrap: wrap;
    }

    .staff-content .btn-group .btn {
        margin-bottom: 0.25rem;
    }

    .staff-table thead {
        display: none;
    }

    .staff-table tbody tr {
        display: block;
        margin: 0.75rem;
        padding: 0.25rem 0;
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    .staff-table tbody tr.table-secondary {
        opacity: 0.85;
    }

    .staff-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.55rem 0.85rem;
        border: 0;
        border-bottom: 1px solid #f1f3f5;
        text-align: right;
    }

    .staff-table td:last-child {
        border-bottom: 0;
    }

    .staff-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: #6c757d;
        text-align: left;
        flex: 0 0 38%;
        max-width: 45%;
    }

    .staff-table td.staff-cell-actions {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .staff-table td.staff-cell-actions::before {
        margin-bottom: 0.25rem;
        flex: none;
        max-width: none;
    }

    .staff-table td.staff-cell-actions .btn {
        min-height: 40px;
    }
}

@media (min-width: 768px) {
    .staff-table-card {
        overflow-x: auto;
    }
}

@media print {
    .staff-sidebar, .staff-topbar, .staff-offcanvas { display: none !important; }
    .staff-shell { display: block; }
    .staff-main { margin-left: 0 !important; width: 100% !important; }
    .student-bottom-nav, header, .btn, .no-print { display: none !important; }
    .print-page { padding: 1rem; }
}

/* ——— Public home (Character Hub style) ——— */
.home-body {
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
    color: #0f172a;
    background: #f8fafc;
}

.home-header {
    position: sticky;
    top: 0;
    z-index: 1030;
}

.home-nav {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    box-shadow: 0 4px 24px rgba(30, 58, 138, 0.25);
}

.home-nav .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.45);
}

.home-nav .navbar-toggler-icon {
    filter: invert(1);
}

.home-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.2rem;
}

.home-hero-logo {
    display: block;
    width: auto;
    max-width: min(300px, 75vw);
    max-height: clamp(80px, 14vw, 140px);
    height: auto;
    object-fit: contain;
    margin-bottom: 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 0.85rem;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.home-hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.home-nav .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.35rem 0.75rem !important;
    border-radius: 999px;
}

.home-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12);
}

.home-nav-btn {
    font-weight: 600;
    border-radius: 999px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.home-nav-btn--primary {
    color: #1d4ed8 !important;
}

.home-hero {
    position: relative;
    min-height: clamp(420px, 72vh, 640px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 45%, #0ea5e9 100%);
    overflow: hidden;
}

.home-hero--image {
    background-size: cover;
    background-position: center;
}

.home-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72) 0%, rgba(37, 99, 235, 0.55) 100%);
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.home-hero-content {
    max-width: 640px;
    color: #fff;
}

.home-hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 0.75rem;
}

.home-hero-subtitle {
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    opacity: 0.92;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.home-cta {
    font-weight: 600;
    color: #1d4ed8 !important;
    border-radius: 999px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.home-demo-hint {
    font-size: 0.9rem;
    opacity: 0.88;
    margin-bottom: 0.5rem;
}

.home-section {
    padding: 4rem 0;
}

.home-section--alt {
    background: #fff;
}

.home-section--contact {
    padding-bottom: 5rem;
}

.home-section-title {
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.home-section-lead {
    color: #64748b;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.home-about-text {
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.75;
}

.home-about-image-wrap {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

.home-about-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.home-value-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
    border-top: 4px solid var(--value-accent, #2563eb);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-value-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.home-value-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--value-accent, #2563eb) 15%, white);
    color: var(--value-accent, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.home-value-card--has-image {
    position: relative;
    padding: 0;
    overflow: hidden;
    border-top: none;
    min-height: 18rem;
    aspect-ratio: 3 / 4;
}

.home-value-card-media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--value-accent, #2563eb) 8%, #f8fafc);
}

.home-value-card--has-image .home-value-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.home-value-card-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.5rem 1.15rem 1.15rem;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0) 0%,
        rgba(15, 23, 42, 0.55) 45%,
        rgba(15, 23, 42, 0.82) 100%
    );
    color: #fff;
    pointer-events: none;
}

.home-value-card--has-image .home-value-name {
    margin-bottom: 0.35rem;
    font-size: 1.15rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.home-value-card--has-image .home-value-desc {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
    line-height: 1.45;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (min-width: 992px) {
    .home-value-card--has-image {
        min-height: 20rem;
    }
}

.home-value-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.unlock-value-image {
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
}

.home-value-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.home-value-desc {
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.6;
}

.home-medal-card {
    text-align: center;
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    height: 100%;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
}

.home-medal-card--has-image {
    position: relative;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.home-medal-card-media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.home-medal-card--has-image .home-medal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.home-medal-card-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.25rem 0.85rem 0.85rem;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0) 0%,
        rgba(15, 23, 42, 0.5) 40%,
        rgba(15, 23, 42, 0.85) 100%
    );
    color: #fff;
    pointer-events: none;
}

.home-medal-card--has-image .home-medal-name {
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.home-medal-card--has-image .home-medal-meta {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.home-medal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-medal-icon {
    margin-bottom: 0.75rem;
}

.home-medal-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.home-medal-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.5;
}

.home-medal--hero { color: #dc2626; }
.home-medal--bronze { color: #b45309; }
.home-medal--silver { color: #64748b; }
.home-medal--gold { color: #ca8a04; }
.home-medal--diamond { color: #0891b2; }
.home-medal--default { color: #2563eb; }

.home-contact-card {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border-radius: 1.25rem;
    padding: 2.5rem;
    border: 1px solid #dbeafe;
    max-width: 720px;
    margin: 0 auto;
}

.home-contact-email {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.home-contact-email:hover {
    text-decoration: underline;
}

.home-footer {
    background: #0f172a;
    color: rgba(255, 255, 255, 0.75);
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

.home-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.home-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.home-footer-powered {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

.home-footer-powered:hover {
    color: #fff;
}

@media (max-width: 991.98px) {
    .home-nav .navbar-collapse {
        background: rgba(15, 23, 42, 0.15);
        border-radius: 0.75rem;
        padding: 0.75rem;
        margin-top: 0.75rem;
    }

    .home-nav-btn {
        width: 100%;
        margin-top: 0.35rem;
    }
}

/* Guardian / parent portal */
.guardian-app.guardian-shell--app {
    --student-accent: #7c3aed;
}

.guardian-praise-card {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.85rem;
    overflow: hidden;
}

.guardian-praise-card-image {
    width: 5.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.guardian-praise-card-body {
    padding: 0.75rem 0.85rem 0.75rem 0;
    min-width: 0;
}

.guardian-praise-pick-card {
    position: relative;
    border-radius: 0.85rem;
    overflow: hidden;
    border: 2px solid transparent;
    background: #f8fafc;
    min-height: 7rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.guardian-value-pick.is-selected .guardian-praise-pick-card {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.guardian-praise-pick-card--has-image {
    min-height: 8.5rem;
}

.guardian-praise-pick-image {
    width: 100%;
    height: 8.5rem;
    object-fit: cover;
    display: block;
}

.guardian-praise-pick-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 0.5rem 0.6rem;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.75));
    color: #fff;
}

.guardian-praise-pick-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.guardian-praise-pick-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #7c3aed;
}

.guardian-medal-thumb {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
}

.students-admin-table {
    font-size: 0.8125rem;
}

.students-admin-table th,
.students-admin-table td {
    padding: 0.35rem 0.45rem;
    vertical-align: middle;
}

.students-sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.students-sort-link:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

.students-col-id { width: 4.5rem; }
.students-col-class { width: 4.25rem; }
.students-col-name { max-width: 7rem; }
.students-col-email { max-width: 9rem; }
.students-col-wa { width: 6.5rem; }
.students-col-num { width: 2.5rem; text-align: center; }
.students-col-status { width: 4.5rem; }
.students-col-actions { width: 11rem; }

.students-cell-truncate {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Public features / marketing page */
.features-hero{padding-top:2.5rem;padding-bottom:2rem}.features-lead{max-width:40rem}.features-toc{display:flex;flex-wrap:wrap;gap:.5rem}.features-wrap{max-width:56rem}.features-callout{background:#f0f9ff;border:1px solid #bae6fd;border-radius:1rem;padding:1.15rem 1.25rem}.features-subtitle{font-size:1.05rem;font-weight:700;color:#0f172a;margin:0 0 .75rem}.features-list{margin:0 0 1.25rem;padding-left:1.15rem;color:#334155;line-height:1.55}.features-list li+li{margin-top:.4rem}.features-list--ordered{padding-left:1.25rem}.features-list--cols{columns:1}@media (min-width:768px){.features-list--cols{columns:2;column-gap:2rem}}.features-card{background:#fff;border:1px solid rgba(15,23,42,.06);border-radius:1rem;box-shadow:0 8px 24px rgba(15,23,42,.05);padding:1.15rem 1.2rem;height:100%}
