/* =============================================================
   custom-pages.css — Styles for all create / update pages
   Loaded globally via _Layout.cshtml
   ============================================================= */

/* ─── Bulk Insert Students (bk-*) ─────────────────────── */
.bk-page { padding: 0.5rem 0 3rem; }

.bk-steps {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
}
.bk-steps-title {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: #0369a1; margin-bottom: 1rem;
}
.bk-step-list { display: flex; flex-direction: column; gap: 0.7rem; }
.bk-step { display: flex; align-items: flex-start; gap: 0.8rem; }
.bk-step-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: #0ea5e9; color: #fff;
    font-size: 0.65rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 0.1rem;
}
.bk-step-text { font-size: 0.84rem; color: #0c4a6e; line-height: 1.5; }
.bk-step-text a { color: #0369a1; font-weight: 600; }
.bk-step-text code {
    background: rgba(14,165,233,0.13); color: #0369a1;
    padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.8rem;
}
.bk-rules {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.45rem 1.5rem;
    margin-top: 0.9rem; padding-top: 0.9rem;
    border-top: 1px solid #bae6fd;
}
.bk-rule {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; color: #075985;
}
.bk-rule i { color: #0ea5e9; font-size: 0.7rem; width: 12px; }

.bk-wrap {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 28px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    animation: bk-in 0.35s cubic-bezier(0.22,1,0.36,1);
}
@keyframes bk-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bk-wrap-hd {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.35rem 1.75rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbff;
}
.bk-wrap-icon {
    width: 48px; height: 48px; border-radius: 13px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(99,102,241,0.28); flex-shrink: 0;
}
.bk-wrap-title { font-size: 1rem; font-weight: 700; color: #1e293b; margin: 0 0 0.1rem; }
.bk-wrap-sub   { font-size: 0.78rem; color: #6b7280; margin: 0; }
.bk-wrap-body  { padding: 1.6rem 1.75rem; }

.bk-selects {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 1.1rem; margin-bottom: 1.5rem;
}
.bk-group { display: flex; flex-direction: column; }
.bk-label {
    font-size: 0.69rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: #374151; margin-bottom: 0.38rem;
}
.bk-iw { position: relative; }
.bk-iw > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.8rem;
    pointer-events: none; z-index: 1;
}
.bk-iw select {
    width: 100%;
    padding: 0.68rem 0.9rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; color: #1e293b;
    background: #f9fafb;
    transition: all 0.18s;
    -webkit-appearance: none; appearance: none;
}
.bk-iw select:focus {
    outline: none; border-color: #6366f1;
    background: #fff; box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
}
.bk-iw select:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

.bk-upload-area {
    display: flex; align-items: center; gap: 1.25rem;
    background: linear-gradient(135deg, #f8f9ff, #f0f1ff);
    border: 2px dashed #c7d2fe; border-radius: 14px;
    padding: 1.35rem 1.5rem; margin-bottom: 1.5rem;
    transition: border-color 0.2s;
}
.bk-upload-area:hover { border-color: #6366f1; }
.bk-upload-icon {
    width: 52px; height: 52px; border-radius: 13px;
    background: #ede9fe; color: #6366f1; font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.bk-upload-title { font-size: 0.9rem; font-weight: 600; color: #374151; margin-bottom: 0.18rem; }
.bk-upload-hint  { font-size: 0.75rem; color: #6b7280; margin-bottom: 0.5rem; }

.bk-actions { display: flex; gap: 0.75rem; }
.bk-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; border: none;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.28);
}
.bk-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,0.38); }
.bk-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.bk-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.bk-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }

.bk-result {
    margin-top: 1.75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}
.bk-result-hd {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}
.bk-result-title { font-size: 0.9rem; font-weight: 700; color: #1e293b; margin: 0; }
.bk-badges { display: flex; gap: 0.6rem; margin-left: auto; }
.bk-badge-ok {
    display: inline-flex; align-items: center; gap: 0.3rem;
    background: #dcfce7; color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 0.22rem 0.7rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700;
}
.bk-badge-err {
    display: inline-flex; align-items: center; gap: 0.3rem;
    background: #fff1f2; color: #be123c;
    border: 1px solid #fecdd3;
    padding: 0.22rem 0.7rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700;
}
.bk-result-body { padding: 1rem 1.5rem; }

.bk-selects-2 {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1.1rem; margin-bottom: 1.5rem;
}

.bk-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
    margin-bottom: 1.5rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.bk-check-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.bk-check-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
    cursor: pointer;
    flex-shrink: 0;
}

.bk-check-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

@media (max-width: 640px) {
    .bk-selects { grid-template-columns: 1fr; }
    .bk-selects-2 { grid-template-columns: 1fr; }
    .bk-rules   { grid-template-columns: 1fr; }
    .bk-upload-area { flex-direction: column; }
    .bk-actions { flex-direction: column; }
    .bk-btn-primary, .bk-btn-secondary { justify-content: center; }
    .bk-badges { margin-left: 0; }
}

/* ─── Academic Year Create / Update (ay-*) ─────────────── */
.ay-page { padding: 0.5rem 0 3rem; }
.ay-wrap {
    max-width: 640px; margin: 0 auto;
    background: #fff; border-radius: 22px;
    box-shadow: 0 8px 40px rgba(99,102,241,0.10), 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    animation: ay-in 0.38s cubic-bezier(0.22,1,0.36,1);
}
@keyframes ay-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ay-hero {
    padding: 1.85rem 2.25rem;
    display: flex; align-items: center; gap: 1.25rem;
    position: relative; overflow: hidden;
}
.ay-hero.ay-hero-create { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #7c3aed 100%); }
.ay-hero.ay-hero-edit   { background: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #7c3aed 100%); }
.ay-hero::before {
    content: ''; position: absolute; top: -40%; right: -8%;
    width: 240px; height: 240px;
    background: rgba(255,255,255,0.06); border-radius: 50%;
    pointer-events: none;
}
.ay-hero-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.ay-hero-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 0 0 0.18rem; }
.ay-hero-sub   { font-size: 0.82rem; color: rgba(255,255,255,0.72); margin: 0; }
.ay-body { padding: 2rem 2.25rem; }
.ay-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #374151; margin-bottom: 0.4rem; display: block;
}
.ay-hint { font-size: 0.78rem; color: #6b7280; margin: 0.35rem 0 1.5rem; }
.ay-hint code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 0.77rem; }
.ay-iw { position: relative; margin-bottom: 1.5rem; }
.ay-iw > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.85rem; pointer-events: none; z-index: 1;
}
.ay-iw input {
    width: 100%;
    padding: 0.7rem 0.9rem 0.7rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; background: #f9fafb; transition: all 0.18s;
}
.ay-iw input:focus {
    outline: none; border-color: #6366f1; background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
    transform: translateY(-1px);
}
.ay-actions { display: flex; gap: 0.75rem; padding-top: 0.5rem; }
.ay-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; border: none;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.28);
}
.ay-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,0.38); }
.ay-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
}
.ay-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }
@media (max-width: 500px) {
    .ay-body { padding: 1.25rem 1rem; }
    .ay-actions { flex-direction: column; }
    .ay-btn-primary, .ay-btn-secondary { justify-content: center; }
}

/* ─── Class Create / Edit (cl-*) ───────────────────────── */
.cl-page { padding: 0.5rem 0 3rem; }
.cl-wrap {
    max-width: 860px; margin: 0 auto;
    background: #fff; border-radius: 22px;
    box-shadow: 0 8px 40px rgba(99,102,241,0.10), 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    animation: cl-in 0.38s cubic-bezier(0.22,1,0.36,1);
}
@keyframes cl-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cl-hero {
    padding: 1.85rem 2.25rem;
    display: flex; align-items: center; gap: 1.25rem;
    position: relative; overflow: hidden;
}
.cl-hero.cl-hero-create { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #7c3aed 100%); }
.cl-hero.cl-hero-edit   { background: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #7c3aed 100%); }
.cl-hero::before {
    content: ''; position: absolute; top: -40%; right: -8%;
    width: 260px; height: 260px;
    background: rgba(255,255,255,0.06); border-radius: 50%;
    pointer-events: none;
}
.cl-hero-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.cl-hero-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 0 0 0.18rem; }
.cl-hero-sub   { font-size: 0.82rem; color: rgba(255,255,255,0.72); margin: 0; }
.cl-body { padding: 2rem 2.25rem; }
.cl-info {
    background: #f8faff; border: 1px solid #e0e7ff;
    border-radius: 12px; padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.cl-info-title {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: #6366f1; margin-bottom: 0.75rem;
    display: flex; align-items: center; gap: 0.4rem;
}
.cl-info-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}
.cl-info-key { display: block; font-size: 0.68rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.1rem; }
.cl-info-val { font-size: 0.85rem; font-weight: 500; color: #1e293b; }
.cl-info-span2 { grid-column: 1 / -1; }
.cl-divider { border: none; border-top: 1px solid #f1f5f9; margin: 1.25rem 0; }
.cl-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1.1rem; margin-bottom: 1.25rem;
}
.cl-span2 { grid-column: 1 / -1; }
.cl-group { display: flex; flex-direction: column; }
.cl-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #374151; margin-bottom: 0.38rem; display: block;
}
.cl-iw { position: relative; }
.cl-iw > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.85rem; pointer-events: none; z-index: 1;
}
.cl-iw input, .cl-iw select {
    width: 100%;
    padding: 0.68rem 0.9rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; background: #f9fafb; transition: all 0.18s;
    -webkit-appearance: none; appearance: none;
}
.cl-iw input:focus, .cl-iw select:focus {
    outline: none; border-color: #6366f1; background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
    transform: translateY(-1px);
}
.cl-iw input:disabled, .cl-iw select:disabled { background: #f3f4f6; color: #9ca3af; }
.cl-dd-rel { position: relative; }
.cl-iw-dd { position: relative; }
.cl-iw-dd > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.85rem; pointer-events: none; z-index: 2;
}
.cl-dd-btn {
    width: 100%;
    padding: 0.68rem 2.2rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; background: #f9fafb;
    text-align: left; cursor: pointer; color: #374151;
    transition: all 0.18s; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.cl-dd-btn:hover { border-color: #6366f1; background: #fff; }
.cl-dd-list {
    position: absolute; z-index: 300; left: 0; right: 0;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    padding: 0.4rem; margin-top: 0.3rem;
    max-height: 210px; overflow-y: auto;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.1rem;
}
.cl-dd-list li { list-style: none; }
.cl-dd-list .form-check {
    padding: 0.38rem 0.6rem; border-radius: 7px; margin: 0;
    display: flex; align-items: center; gap: 0.4rem;
    cursor: pointer;
}
.cl-dd-list .form-check:hover { background: #f5f3ff; }
.cl-dd-list .form-check-input { accent-color: #6366f1; margin: 0; width: 14px; height: 14px; }
.cl-dd-list .form-check-label { font-size: 0.83rem; color: #374151; cursor: pointer; margin: 0; }
.cl-actions { display: flex; gap: 0.75rem; padding-top: 0.75rem; }
.cl-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; border: none;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.28);
}
.cl-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,0.38); }
.cl-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
}
.cl-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }
@media (max-width: 600px) {
    .cl-grid, .cl-info-grid { grid-template-columns: 1fr; }
    .cl-body { padding: 1.25rem 1rem; }
    .cl-actions { flex-direction: column; }
    .cl-btn-primary, .cl-btn-secondary { justify-content: center; }
    .cl-dd-list { grid-template-columns: 1fr; }
}

/* ─── Teacher Create / Update (tc-*) ───────────────────── */
.tc-page { padding: 0.5rem 0 3rem; }
.tc-wrap {
    max-width: 900px; margin: 0 auto;
    background: #fff; border-radius: 22px;
    box-shadow: 0 8px 40px rgba(99,102,241,0.10), 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    animation: tc-in 0.38s cubic-bezier(0.22,1,0.36,1);
}
@keyframes tc-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tc-hero {
    padding: 1.85rem 2.25rem;
    display: flex; align-items: center; gap: 1.25rem;
    position: relative; overflow: hidden;
}
.tc-hero.tc-hero-create { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #7c3aed 100%); }
.tc-hero.tc-hero-edit   { background: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #7c3aed 100%); }
.tc-hero::before {
    content: ''; position: absolute; top: -40%; right: -8%;
    width: 260px; height: 260px;
    background: rgba(255,255,255,0.06); border-radius: 50%;
    pointer-events: none;
}
.tc-hero-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.tc-hero-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 0 0 0.18rem; }
.tc-hero-sub   { font-size: 0.82rem; color: rgba(255,255,255,0.72); margin: 0; }
.tc-body { padding: 2rem 2.25rem; }
.tc-section-hd {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: #6366f1; display: flex; align-items: center; gap: 0.4rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid #ede9fe;
    margin: 1.5rem 0 1.1rem; grid-column: 1 / -1;
}
.tc-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1.1rem; margin-bottom: 0.5rem;
}
.tc-span2 { grid-column: 1 / -1; }
.tc-group { display: flex; flex-direction: column; }
.tc-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #374151; margin-bottom: 0.38rem; display: block;
}
.tc-iw { position: relative; }
.tc-iw > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.85rem; pointer-events: none; z-index: 1;
}
.tc-iw input, .tc-iw select {
    width: 100%;
    padding: 0.68rem 0.9rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; background: #f9fafb; transition: all 0.18s;
    -webkit-appearance: none; appearance: none;
}
.tc-iw input:focus, .tc-iw select:focus {
    outline: none; border-color: #6366f1; background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
    transform: translateY(-1px);
}
.tc-dd-rel { position: relative; }
.tc-iw-dd { position: relative; }
.tc-iw-dd > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.85rem; pointer-events: none; z-index: 2;
}
.tc-dd-btn {
    width: 100%;
    padding: 0.68rem 2.2rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; background: #f9fafb;
    text-align: left; cursor: pointer; color: #374151;
    transition: all 0.18s; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.tc-dd-btn:hover { border-color: #6366f1; background: #fff; }
.tc-dd-list {
    position: absolute; z-index: 300; left: 0; right: 0;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    padding: 0.4rem; margin-top: 0.3rem;
    max-height: 210px; overflow-y: auto;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.1rem;
}
.tc-dd-list li { list-style: none; }
.tc-dd-list .form-check {
    padding: 0.38rem 0.6rem; border-radius: 7px; margin: 0;
    display: flex; align-items: center; gap: 0.4rem;
}
.tc-dd-list .form-check:hover { background: #f5f3ff; }
.tc-dd-list .form-check-input { accent-color: #6366f1; margin: 0; width: 14px; height: 14px; }
.tc-dd-list .form-check-label { font-size: 0.83rem; color: #374151; cursor: pointer; margin: 0; }
.tc-photo-area {
    display: flex; align-items: center; gap: 1.25rem;
    padding: 1rem 1.25rem; background: #f9fafb;
    border: 2px dashed #c7d2fe; border-radius: 12px;
    grid-column: 1 / -1;
}
.tc-photo-thumb {
    width: 80px; height: 80px; border-radius: 50%;
    background: #ede9fe; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; border: 3px solid #e0d9ff;
}
.tc-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tc-photo-hint { font-size: 0.78rem; color: #6b7280; margin: 0 0 0.4rem; }
.tc-actions { display: flex; gap: 0.75rem; padding-top: 1rem; }
.tc-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; border: none;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.28);
}
.tc-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,0.38); }
.tc-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
}
.tc-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }
@media (max-width: 600px) {
    .tc-grid { grid-template-columns: 1fr; }
    .tc-body { padding: 1.25rem 1rem; }
    .tc-actions { flex-direction: column; }
    .tc-btn-primary, .tc-btn-secondary { justify-content: center; }
    .tc-dd-list { grid-template-columns: 1fr; }
}

/* ─── Subject Create / Edit (sb-*) ─────────────────────── */
.sb-page { padding-bottom: 3rem; }
.sb-wrap {
    background: #fff; border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    animation: sb-in 0.35s cubic-bezier(0.22,1,0.36,1);
}
.sb-wrap::before {
    content: ''; display: block; height: 4px;
    background: linear-gradient(90deg, #6366f1, #4f46e5, #7c3aed);
}
@keyframes sb-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sb-body { padding: 1.75rem 2rem; }
.sb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.sb-span2 { grid-column: 1 / -1; }
.sb-group { display: flex; flex-direction: column; }
.sb-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #374151; margin-bottom: 0.38rem;
}
.sb-iw { position: relative; }
.sb-iw > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.8rem; pointer-events: none; z-index: 1;
}
.sb-iw input, .sb-iw select {
    width: 100%;
    padding: 0.68rem 0.9rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; background: #f9fafb; transition: all 0.18s;
    -webkit-appearance: none; appearance: none;
}
.sb-iw input:focus, .sb-iw select:focus {
    outline: none; border-color: #6366f1; background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
}
.sb-iw select:disabled { background: #f3f4f6; color: #9ca3af; }
.sb-check-row {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.68rem 0.9rem; border: 2px solid #e5e7eb;
    border-radius: 10px; background: #f9fafb;
}
.sb-check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: #6366f1; }
.sb-check-row label { font-size: 0.88rem; color: #374151; margin: 0; cursor: pointer; }
.sb-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.sb-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; border: none;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.28);
}
.sb-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,0.38); }
.sb-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.sb-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
}
.sb-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }
@media (max-width: 600px) {
    .sb-grid { grid-template-columns: 1fr; }
    .sb-body { padding: 1.25rem 1rem; }
    .sb-actions { flex-direction: column; }
    .sb-btn-primary, .sb-btn-secondary { justify-content: center; }
}

/* ─── Exam Create / Edit (ex-*) ────────────────────────── */
.ex-page { padding-bottom: 3rem; }
.ex-wrap {
    background: #fff; border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    animation: ex-in 0.35s cubic-bezier(0.22,1,0.36,1);
}
.ex-wrap::before {
    content: ''; display: block; height: 4px;
    background: linear-gradient(90deg, #6366f1, #4f46e5, #7c3aed);
}
@keyframes ex-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ex-body { padding: 1.75rem 2rem; }
.ex-filter-bar {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1.1rem; padding: 1rem 1.25rem;
    background: #f8faff; border: 1px solid #e0e7ff;
    border-radius: 12px; margin-bottom: 1.5rem;
}
.ex-filter-title {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #6366f1; margin-bottom: 0.75rem;
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 0.4rem;
}
.ex-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.1rem; }
.ex-span2 { grid-column: span 2; }
.ex-span3 { grid-column: 1 / -1; }
.ex-group { display: flex; flex-direction: column; }
.ex-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #374151; margin-bottom: 0.38rem;
}
.ex-iw { position: relative; }
.ex-iw > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.8rem; pointer-events: none; z-index: 1;
}
.ex-iw input, .ex-iw select, .ex-iw textarea {
    width: 100%;
    padding: 0.68rem 0.9rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; background: #f9fafb; transition: all 0.18s;
    -webkit-appearance: none; appearance: none;
}
.ex-iw textarea { padding-top: 0.68rem; resize: vertical; min-height: 72px; }
.ex-iw input:focus, .ex-iw select:focus, .ex-iw textarea:focus {
    outline: none; border-color: #6366f1; background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
}
.ex-iw select:disabled { background: #f3f4f6; color: #9ca3af; }
.ex-divider { border: none; border-top: 1px solid #f1f5f9; margin: 1.25rem 0; }
.ex-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.ex-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; border: none;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.28);
}
.ex-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,0.38); }
.ex-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.ex-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
}
.ex-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }
@media (max-width: 700px) {
    .ex-grid, .ex-filter-bar { grid-template-columns: 1fr; }
    .ex-span2, .ex-span3 { grid-column: 1 / -1; }
    .ex-body { padding: 1.25rem 1rem; }
    .ex-actions { flex-direction: column; }
    .ex-btn-primary, .ex-btn-secondary { justify-content: center; }
}

/* ─── Fine Create / Update (fn-*) ──────────────────────── */
.fn-page { padding-bottom: 3rem; }
.fn-wrap {
    background: #fff; border-radius: 18px; max-width: 760px; margin: 0 auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    animation: fn-in 0.35s cubic-bezier(0.22,1,0.36,1);
}
.fn-wrap::before {
    content: ''; display: block; height: 4px;
    background: linear-gradient(90deg, #6366f1, #4f46e5, #7c3aed);
}
@keyframes fn-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fn-student {
    display: flex; align-items: center; gap: 1.25rem;
    padding: 1.25rem 1.75rem;
    background: #f8faff; border-bottom: 1px solid #e0e7ff;
}
.fn-student-thumb {
    width: 64px; height: 64px; border-radius: 50%;
    overflow: hidden; flex-shrink: 0; border: 3px solid #e0d9ff;
}
.fn-student-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fn-student-name { font-size: 0.98rem; font-weight: 700; color: #1e293b; margin-bottom: 0.15rem; }
.fn-student-meta { font-size: 0.78rem; color: #6b7280; }
.fn-student-meta span { margin-right: 0.75rem; }
.fn-body { padding: 1.75rem 1.75rem; }
.fn-group { display: flex; flex-direction: column; margin-bottom: 1.1rem; }
.fn-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #374151; margin-bottom: 0.38rem;
}
.fn-iw { position: relative; }
.fn-iw > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.8rem; pointer-events: none; z-index: 1;
}
.fn-iw input, .fn-iw select {
    width: 100%;
    padding: 0.68rem 0.9rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; background: #f9fafb; transition: all 0.18s;
    -webkit-appearance: none; appearance: none;
}
.fn-iw input:focus, .fn-iw select:focus {
    outline: none; border-color: #6366f1; background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
}
.fn-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.fn-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; border: none;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.28);
}
.fn-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,0.38); }
.fn-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.fn-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }
@media (max-width: 500px) {
    .fn-body, .fn-student { padding: 1.25rem 1rem; }
    .fn-actions { flex-direction: column; }
    .fn-btn-primary, .fn-btn-secondary { justify-content: center; }
}

/* ─── Payment Edit (pm-*) ──────────────────────────────── */
.pm-page { padding-bottom: 3rem; }
.pm-wrap {
    background: #fff; border-radius: 18px; max-width: 820px; margin: 0 auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    animation: pm-in 0.35s cubic-bezier(0.22,1,0.36,1);
}
.pm-wrap::before {
    content: ''; display: block; height: 4px;
    background: linear-gradient(90deg, #6366f1, #4f46e5, #7c3aed);
}
@keyframes pm-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pm-body { padding: 1.75rem 2rem; }
.pm-section-hd {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: #6366f1; display: flex; align-items: center; gap: 0.4rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid #ede9fe;
    margin: 1.5rem 0 1.1rem;
}
.pm-section-hd:first-child { margin-top: 0; }
.pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.pm-span2 { grid-column: 1 / -1; }
.pm-group { display: flex; flex-direction: column; margin-bottom: 0.15rem; }
.pm-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #374151; margin-bottom: 0.38rem;
}
.pm-iw { position: relative; }
.pm-iw > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.8rem; pointer-events: none; z-index: 1;
}
.pm-iw > i.top { top: 1.1rem; transform: none; }
.pm-iw input, .pm-iw select, .pm-iw textarea {
    width: 100%;
    padding: 0.68rem 0.9rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; background: #f9fafb; transition: all 0.18s;
    -webkit-appearance: none; appearance: none;
}
.pm-iw textarea { padding-top: 0.68rem; resize: vertical; min-height: 72px; }
.pm-iw input:focus, .pm-iw select:focus, .pm-iw textarea:focus {
    outline: none; border-color: #6366f1; background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
}
.pm-iw input:disabled, .pm-iw select:disabled { background: #f3f4f6; color: #9ca3af; }
.pm-readonly {
    padding: 0.68rem 0.9rem 0.68rem 2.4rem;
    background: #f3f4f6; border: 2px solid #e5e7eb;
    border-radius: 10px; font-size: 0.9rem; color: #374151;
    font-weight: 500;
}
.pm-radio-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.pm-radio-opt {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border: 2px solid #e5e7eb;
    border-radius: 8px; cursor: pointer; transition: all 0.18s;
    font-size: 0.88rem; color: #374151;
}
.pm-radio-opt input { accent-color: #6366f1; }
.pm-student-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: #f0f1ff; color: #4f46e5;
    border: 1px solid #c7d2fe; border-radius: 8px;
    padding: 0.4rem 0.9rem; font-size: 0.88rem; font-weight: 600;
    margin-bottom: 1.25rem;
}
.pm-actions { display: flex; gap: 0.75rem; margin-top: 1.75rem; flex-wrap: wrap; }
.pm-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; border: none;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.28);
}
.pm-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,0.38); }
.pm-btn-danger {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #dc2626;
    border: 2px solid #fecaca;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.pm-btn-danger:hover { background: #fff1f2; border-color: #f87171; }
.pm-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.pm-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }
@media (max-width: 600px) {
    .pm-grid { grid-template-columns: 1fr; }
    .pm-body { padding: 1.25rem 1rem; }
    .pm-actions { flex-direction: column; }
    .pm-btn-primary, .pm-btn-danger, .pm-btn-secondary { justify-content: center; }
}

/* ─── Subject List (sbl-*) ─────────────────────────────── */
.sbl-page { padding: 0 0 3rem; }

/* Toolbar */
.sbl-toolbar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.sbl-toolbar-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}
.sbl-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Buttons */
.sbl-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 1rem; border-radius: 8px;
    font-size: 0.84rem; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.18s;
    text-decoration: none;
}
.sbl-btn-save {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    box-shadow: 0 3px 10px rgba(22,163,74,0.25);
}
.sbl-btn-save:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22,163,74,0.35); }
.sbl-btn-save:disabled { opacity: 0.55; cursor: not-allowed; }

/* Count badge */
.sbl-count-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: #f0f1ff; color: #4f46e5;
    border: 1px solid #c7d2fe;
    padding: 0.35rem 0.8rem; border-radius: 20px;
    font-size: 0.78rem; font-weight: 600;
}
.sbl-pending-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: #15803d;
    border-radius: 20px; padding: 0 0.45rem;
    font-size: 0.72rem; font-weight: 700; min-width: 18px;
}

/* Filters */
.sbl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}
.sbl-filter-group {
    display: flex; flex-direction: column; gap: 0.25rem;
    flex: 1 1 180px; min-width: 160px;
}
.sbl-filter-search { flex: 1 1 220px; }
.sbl-filter-label {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: #6b7280;
}
.sbl-select {
    padding: 0.48rem 0.75rem;
    border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-size: 0.85rem; color: #1e293b;
    background: #f9fafb;
    transition: border-color 0.18s, box-shadow 0.18s;
    -webkit-appearance: none; appearance: none;
    width: 100%;
}
.sbl-select:focus {
    outline: none; border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
    background: #fff;
}
.sbl-select:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

/* Search */
.sbl-search-wrap { position: relative; }
.sbl-search-icon {
    position: absolute; left: 0.65rem; top: 50%;
    transform: translateY(-50%);
    color: #9ca3af; font-size: 0.78rem; pointer-events: none;
}
.sbl-search-input {
    width: 100%;
    padding: 0.48rem 0.75rem 0.48rem 2rem;
    border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-size: 0.85rem; background: #f9fafb;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.sbl-search-input:focus {
    outline: none; border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
    background: #fff;
}
.sbl-search-input:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

/* Card */
.sbl-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}

/* Table */
.sbl-table-wrap { overflow-x: auto; }
.sbl-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.865rem;
}
.sbl-table thead tr {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
}
.sbl-table thead th {
    padding: 0.7rem 1rem;
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: #6b7280; white-space: nowrap;
}
.sbl-th-actions { text-align: right; }
.sbl-table tbody td {
    padding: 0.65rem 1rem;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.sbl-row:last-child td { border-bottom: none; }
.sbl-row:hover { background: #fafbff; }
.sbl-td-center { text-align: center; }
.sbl-td-actions { text-align: right; white-space: nowrap; }

/* Code pill */
.sbl-code {
    display: inline-block;
    background: #f1f5f9; color: #475569;
    border-radius: 5px; padding: 0.12rem 0.45rem;
    font-size: 0.78rem; font-family: monospace;
}

/* Order input */
.sbl-order-input {
    width: 70px; padding: 0.2rem 0.4rem;
    border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 0.82rem; text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.sbl-order-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.12); }
.sbl-order-changed { border-color: #f59e0b !important; background: #fffbeb; }

/* Checkbox */
.sbl-checkbox { width: 16px; height: 16px; accent-color: #6366f1; cursor: pointer; }
.sbl-checkbox-changed { accent-color: #f59e0b; outline: 2px solid #f59e0b; outline-offset: 1px; }

/* Active badge */
.sbl-badge {
    display: inline-flex; align-items: center;
    padding: 0.22rem 0.6rem; border-radius: 20px;
    font-size: 0.72rem; font-weight: 700;
}
.sbl-badge--active  { background: #dcfce7; color: #15803d; }
.sbl-badge--inactive { background: #f1f5f9; color: #6b7280; }

/* Action icon buttons */
.sbl-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 7px;
    border: none; cursor: pointer; font-size: 0.88rem;
    transition: all 0.16s; margin-left: 0.2rem;
    text-decoration: none;
}
.sbl-icon-btn--warning { background: #fef3c7; color: #d97706; }
.sbl-icon-btn--warning:hover { background: #fde68a; color: #b45309; }
.sbl-icon-btn--success { background: #dcfce7; color: #16a34a; }
.sbl-icon-btn--success:hover { background: #bbf7d0; color: #15803d; }
.sbl-icon-btn--danger  { background: #fff1f2; color: #dc2626; }
.sbl-icon-btn--danger:hover  { background: #fecdd3; color: #b91c1c; }

/* Empty state */
.sbl-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.5rem; padding: 3rem 1rem;
    color: #9ca3af; font-size: 0.9rem;
}
.sbl-empty-icon { font-size: 2rem; color: #d1d5db; }

/* Pagination */
.sbl-pager {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}
.sbl-pager-size {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.82rem; color: #6b7280;
}
.sbl-pager-select { width: auto; }
.sbl-pager-nav { display: flex; align-items: center; gap: 0.5rem; }
.sbl-pager-btn {
    width: 32px; height: 32px; border-radius: 7px;
    border: 1.5px solid #e5e7eb; background: #fff;
    font-size: 1.1rem; color: #374151; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.sbl-pager-btn:hover:not(:disabled) { border-color: #6366f1; color: #6366f1; background: #f5f3ff; }
.sbl-pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.sbl-pager-info { font-size: 0.85rem; font-weight: 600; color: #374151; min-width: 50px; text-align: center; }
.sbl-pager-of { color: #9ca3af; font-weight: 400; }
.sbl-pager-count { font-size: 0.78rem; color: #6b7280; }

@media (max-width: 640px) {
    .sbl-toolbar-top { justify-content: flex-start; }
    .sbl-filters { flex-direction: column; }
    .sbl-filter-group { min-width: 100%; }
    .sbl-pager { flex-direction: column; align-items: flex-start; }
}

/* ─── Class Fee Plan Create / Edit (fp-*) ──────────────── */
.fp-page { padding-bottom: 3rem; }
.fp-wrap {
    background: #fff; border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    animation: fp-in 0.35s cubic-bezier(0.22,1,0.36,1);
}
.fp-wrap::before {
    content: ''; display: block; height: 4px;
    background: linear-gradient(90deg, #6366f1, #4f46e5, #7c3aed);
}
@keyframes fp-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fp-body { padding: 1.75rem 2rem; }
.fp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.5rem; }
.fp-group { display: flex; flex-direction: column; }
.fp-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #374151; margin-bottom: 0.38rem;
}
.fp-iw { position: relative; }
.fp-iw > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.8rem; pointer-events: none; z-index: 1;
}
.fp-iw select {
    width: 100%;
    padding: 0.68rem 0.9rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb; border-radius: 10px;
    font-size: 0.9rem; background: #f9fafb; transition: all 0.18s;
    -webkit-appearance: none; appearance: none;
}
.fp-iw select:focus {
    outline: none; border-color: #6366f1; background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
}
.fp-iw select:disabled { background: #f3f4f6; color: #9ca3af; }
.fp-info-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.fp-info-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: #f0f1ff; color: #4f46e5;
    border: 1px solid #c7d2fe; border-radius: 8px;
    padding: 0.4rem 0.9rem; font-size: 0.85rem; font-weight: 600;
}
.fp-inst-hd {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: #6366f1; display: flex; align-items: center; gap: 0.4rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid #ede9fe;
    margin-bottom: 1rem;
}
.fp-inst-row {
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 12px; padding: 1rem 1.25rem;
    margin-bottom: 0.75rem; transition: border-color 0.18s;
}
.fp-inst-row:hover { border-color: #c7d2fe; }
.fp-inst-inner {
    display: grid;
    grid-template-columns: 60px 1fr 140px 1fr 1fr auto;
    gap: 0.75rem; align-items: center;
}
.fp-inst-inner input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 2px solid #e5e7eb; border-radius: 8px;
    font-size: 0.88rem; background: #fff; transition: all 0.18s;
}
.fp-inst-inner input:focus {
    outline: none; border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.fp-inst-inner input:disabled { background: #f3f4f6; color: #9ca3af; }
.fp-inst-num {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: #ede9fe; color: #6366f1;
    font-size: 0.8rem; font-weight: 700;
}
.fp-add-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: transparent; color: #6366f1;
    border: 2px dashed #c7d2fe;
    padding: 0.55rem 1.25rem; border-radius: 10px;
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all 0.18s; margin-bottom: 1.5rem;
}
.fp-add-btn:hover { background: #f5f3ff; border-color: #6366f1; }
.fp-remove-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: #fff1f2; color: #dc2626;
    border: 1px solid #fecaca; font-size: 1rem;
    cursor: pointer; transition: all 0.18s; flex-shrink: 0;
}
.fp-remove-btn:hover { background: #fecdd3; }
.fp-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.fp-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; border: none;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.28);
}
.fp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,0.38); }
.fp-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.72rem 2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
}
.fp-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }
@media (max-width: 700px) {
    .fp-grid { grid-template-columns: 1fr; }
    .fp-body { padding: 1.25rem 1rem; }
    .fp-inst-inner { grid-template-columns: 1fr; }
    .fp-actions { flex-direction: column; }
    .fp-btn-primary, .fp-btn-secondary { justify-content: center; }
}

/* ─── Exam Detail (exd-*) ─────────────────────────────── */
.exd-page {
    padding: 0.5rem 0 3rem;
    animation: exd-in 0.32s cubic-bezier(0.22,1,0.36,1);
}
@keyframes exd-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Loading placeholder */
.exd-loading-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
    font-size: 0.95rem;
}

/* Hero card */
.exd-hero-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}
.exd-hero-info {
    flex: 1;
    min-width: 0;
}
.exd-hero-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
    margin-bottom: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.exd-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

/* Badges */
.exd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}
.exd-badge--primary  { background: #eff6ff; color: #1d4ed8; }
.exd-badge--info     { background: #f0fdf4; color: #15803d; }
.exd-badge--secondary{ background: #f5f3ff; color: #6d28d9; }
.exd-badge--success  { background: #dcfce7; color: #166534; }
.exd-badge--muted    { background: #f1f5f9; color: #64748b; }

/* Hero action buttons */
.exd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
}
.exd-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}
.exd-btn-edit {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1.5px solid #bfdbfe;
}
.exd-btn-edit:hover { background: #dbeafe; color: #1e40af; text-decoration: none; }

.exd-btn-action {
    background: #f0fdf4;
    color: #15803d;
    border: 1.5px solid #bbf7d0;
}
.exd-btn-action:hover { background: #dcfce7; color: #166534; text-decoration: none; }

.exd-btn-warn {
    background: #fffbeb;
    color: #92400e;
    border: 1.5px solid #fde68a;
}
.exd-btn-warn:hover { background: #fef3c7; color: #78350f; }

/* Info grid */
.exd-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    margin-bottom: 1.25rem;
}

.exd-info-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.exd-info-card-hd {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #f1f5f9;
}
.exd-info-rows { padding: 0.25rem 0; }

.exd-info-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid #f8fafc;
}
.exd-info-row:last-child { border-bottom: none; }
.exd-info-key {
    flex-shrink: 0;
    width: 130px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
}
.exd-info-value {
    font-size: 0.88rem;
    color: #111827;
    font-weight: 500;
}

/* Status pill in info grid */
.exd-status-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.exd-status-pill--published { background: #dcfce7; color: #166534; }
.exd-status-pill--draft     { background: #f1f5f9; color: #475569; }

/* Results section */
.exd-section-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.exd-section-hd {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #f1f5f9;
}
.exd-section-count {
    margin-left: auto;
    font-size: 0.73rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: none;
    letter-spacing: 0;
}

.exd-table-wrap { overflow-x: auto; }

.exd-section-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.exd-section-table thead tr {
    background: #f8fafc;
}
.exd-section-table th {
    padding: 0.7rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.exd-row { transition: background 0.15s; }
.exd-row:hover { background: #f8fafc; }
.exd-section-table td {
    padding: 0.7rem 1rem;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.exd-section-table tbody tr:last-child td { border-bottom: none; }

.exd-td-num  { color: #9ca3af; font-size: 0.8rem; width: 40px; }
.exd-td-uid  { font-family: monospace; font-size: 0.82rem; color: #6b7280; }
.exd-td-marks { font-weight: 600; color: #1d4ed8; }
.exd-td-remarks { color: #6b7280; font-size: 0.82rem; }

.exd-student-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.exd-student-link:hover { text-decoration: underline; color: #1d4ed8; }

.exd-absent-pill {
    display: inline-block;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: #fef2f2;
    color: #b91c1c;
}
.exd-present-pill {
    display: inline-block;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: #f0fdf4;
    color: #15803d;
}

/* Empty state */
.exd-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 2.5rem 1rem;
    color: #9ca3af;
    font-size: 0.9rem;
}
.exd-empty-icon { font-size: 2rem; color: #d1d5db; }

/* Responsive */
@media (max-width: 768px) {
    .exd-hero-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem 1.1rem;
    }
    .exd-hero-title { font-size: 1.15rem; white-space: normal; }
    .exd-hero-actions { width: 100%; }
    .exd-btn { flex: 1; justify-content: center; }
    .exd-info-key { width: 110px; }
}

/* ═══════════════════════════════════════════════════════
   Student Create / Edit Form — sc-* namespace
   ═══════════════════════════════════════════════════════ */

.sc-page { padding: 1rem 0 3rem; }

.sc-wrap {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 8px 40px rgba(99,102,241,0.10), 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    animation: sc-in 0.38s cubic-bezier(0.22,1,0.36,1);
}
@keyframes sc-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sc-hero {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #7c3aed 100%);
    padding: 1.85rem 2.25rem;
    display: flex; align-items: center; gap: 1.25rem;
    position: relative; overflow: hidden;
}
.sc-hero::before {
    content: ''; position: absolute; right: -50px; top: -50px;
    width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255,255,255,0.07); pointer-events: none;
}
.sc-hero::after {
    content: ''; position: absolute; right: 80px; bottom: -70px;
    width: 150px; height: 150px; border-radius: 50%;
    background: rgba(255,255,255,0.05); pointer-events: none;
}
.sc-hero-icon {
    width: 58px; height: 58px;
    background: rgba(255,255,255,0.18);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.55rem; color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    position: relative; z-index: 1;
}
.sc-hero-text { position: relative; z-index: 1; }
.sc-hero-title { color: #fff; font-size: 1.22rem; font-weight: 700; margin: 0 0 0.2rem; }
.sc-hero-sub   { color: rgba(255,255,255,0.76); font-size: 0.82rem; margin: 0; }

.sc-body { padding: 2rem 2.25rem; }

.sc-section { margin-bottom: 2.25rem; }

.sc-section-hd {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.67rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: #6366f1;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid #ede9fe;
    margin-bottom: 1.2rem;
}
.sc-section-hd i { font-size: 0.78rem; }

.sc-fees-hd {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.67rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: #059669;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid #d1fae5;
    margin-bottom: 1.2rem;
}

.sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.sc-span2 { grid-column: 1 / -1; }

.sc-group { display: flex; flex-direction: column; }

.sc-label {
    font-size: 0.69rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: #374151; margin-bottom: 0.38rem;
}
.sc-opt { font-weight: 400; color: #9ca3af; text-transform: none; letter-spacing: 0; font-size: 0.68rem; }

.sc-iw { position: relative; }
.sc-iw > i {
    position: absolute; left: 0.88rem; top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc; font-size: 0.8rem;
    pointer-events: none; z-index: 1;
}
.sc-iw input,
.sc-iw select {
    width: 100%;
    padding: 0.68rem 0.9rem 0.68rem 2.4rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9rem; color: #1e293b;
    background: #f9fafb;
    transition: all 0.18s;
    -webkit-appearance: none; appearance: none;
    line-height: 1.4;
}
.sc-iw input:focus,
.sc-iw select:focus {
    outline: none; border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
    transform: translateY(-1px);
}
.sc-iw input:disabled,
.sc-iw select:disabled {
    background: #f3f4f6; color: #9ca3af;
    cursor: not-allowed; border-color: #e9ecef; transform: none;
}
.sc-hint { font-size: 0.71rem; color: #6b7280; margin-top: 0.28rem; }

.sc-photo-area {
    display: flex; align-items: center; gap: 1.5rem;
    background: linear-gradient(135deg, #f8f9ff, #f0f1ff);
    border: 2px dashed #c7d2fe;
    border-radius: 14px; padding: 1.4rem 1.6rem;
    transition: border-color 0.2s;
}
.sc-photo-area:hover { border-color: #6366f1; }
.sc-photo-thumb {
    width: 84px; height: 84px; border-radius: 50%;
    border: 3px solid #e0e7ff; flex-shrink: 0;
    background: #e0e7ff;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(99,102,241,0.15);
}
.sc-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-photo-thumb > i { font-size: 1.9rem; color: #a5b4fc; }
.sc-photo-title { font-size: 0.9rem; color: #374151; font-weight: 600; margin-bottom: 0.2rem; }
.sc-photo-hint  { font-size: 0.73rem; color: #6b7280; margin-bottom: 0.5rem; }

.sc-valid-wrap { margin-bottom: 1.25rem; }
.sc-valid-wrap ul {
    background: #fff1f2; border: 1px solid #fecdd3;
    border-radius: 10px;
    padding: 0.75rem 1rem 0.75rem 1.5rem;
    font-size: 0.82rem; color: #be123c; margin: 0;
}

.sc-actions {
    display: flex; gap: 0.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid #f1f5f9;
    margin-top: 1.5rem;
}
.sc-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff; border: none;
    padding: 0.72rem 2.2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(99,102,241,0.28);
}
.sc-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,0.38); }
.sc-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.sc-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.72rem 2.2rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.sc-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }

@media (max-width: 600px) {
    .sc-grid  { grid-template-columns: 1fr; }
    .sc-body  { padding: 1.25rem 1rem; }
    .sc-hero  { padding: 1.25rem; }
    .sc-photo-area { flex-direction: column; text-align: center; }
    .sc-actions { flex-direction: column; }
    .sc-btn-primary, .sc-btn-secondary { justify-content: center; width: 100%; }
}

/* ==========================================================================
   ExamList — exl-* namespace
   ========================================================================== */
.exl-class-name { font-weight: 600; color: #111827; }
.exl-year-name  { font-size: 0.75rem; color: #9ca3af; }
.exl-subject    { font-weight: 600; color: #4f46e5; }
.exl-type       { font-size: 0.75rem; color: #9ca3af; }

.exl-badge {
    display: inline-block;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.exl-badge--success { background: #d1fae5; color: #065f46; }
.exl-badge--gray    { background: #f3f4f6; color: #6b7280; }

.exl-stats {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.78rem;
    color: #6b7280;
    white-space: nowrap;
}

.exl-stats-avg { font-weight: 700; color: #374151; }

/* ==========================================================================
   TeacherList — tcl-* namespace
   ========================================================================== */
.tcl-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.tcl-post-badge {
    display: inline-block;
    padding: 0.2em 0.55em;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 0.3rem;
    font-size: 0.775rem;
    color: #495057;
    font-weight: 500;
}

.tcl-post-empty { color: #adb5bd; }
.tcl-name { font-weight: 700; color: #1a1d23; }

.tcl-uid {
    font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.78rem;
    color: #6c757d;
}

.tcl-email { font-size: 0.8rem; color: #6c757d; }

/* ==========================================================================
   AcademicYearList — ayl-* namespace
   ========================================================================== */
.ayl-td-name { font-weight: 600; color: #1e293b; }

/* ==========================================================================
   StudentList — sl-* namespace
   ========================================================================== */
.sl-th-photo  { width: 60px; }
.sl-th-toggle { width: 42px; }
.sl-th-actions { width: 110px; text-align: center; }
.sl-td-photo  { width: 60px; }

.sl-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e8ecf1;
    display: block;
}

.sl-name { font-weight: 600; color: #1e293b; }

.sl-uid {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #6b7280;
}

.sl-pill {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0.1rem 0.1rem 0.1rem 0;
    white-space: nowrap;
}

.sl-pill--class   { background: #ede9fe; color: #5b21b6; }
.sl-pill--section { background: #dbeafe; color: #1d4ed8; }

.sl-amount { font-weight: 600; white-space: nowrap; }

.sl-currency {
    font-size: 0.68rem;
    font-weight: 500;
    color: #9ca3af;
    margin-left: 1px;
}

.sl-discount {
    font-size: 0.7rem;
    color: #059669;
    margin-left: 4px;
}

.sl-amount--paid  { color: #059669; }
.sl-amount--due   { color: #dc2626; }
.sl-amount--clear { color: #059669; }

/* ==========================================================================
   FeeList — fel-* namespace + connected layout overrides
   ========================================================================== */

/* Connected toolbar+banner+card layout (scoped to FeeList via wrapper class) */
.lp-page.fel-connected-layout { gap: 0; }
.lp-page.fel-connected-layout .lp-toolbar { border-radius: 12px 12px 0 0; border-bottom: none; }
.lp-page.fel-connected-layout .lp-card    { border-radius: 0 0 12px 12px; }

/* Total overdue banner */
.fel-total-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-top: none;
    border-bottom: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.83rem;
    color: #92400e;
}

.fel-total-amount {
    font-size: 1.1rem;
    font-weight: 800;
    color: #dc2626;
}

.fel-total-count { color: #9ca3af; font-size: 0.75rem; }

/* Column alignment helpers */
.fel-th-center { text-align: center; }
.fel-th-right  { text-align: right; }
.fel-td-center { text-align: center; }
.fel-td-right  { text-align: right; }

/* Cell content */
.fel-td-student { font-weight: 700; color: #111827; }

.fel-uid {
    color: #9ca3af;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.76rem;
}

.fel-from-date { font-size: 0.72rem; color: #9ca3af; margin-top: 0.1rem; }
.fel-overdue   { color: #dc2626; font-weight: 700; }
.fel-paid      { color: #16a34a; }
.fel-remaining { color: #dc2626; font-weight: 700; }

/* View button (text+icon style, different from square lp-icon-btn) */
.fel-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.fel-icon-btn--info {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.fel-icon-btn--info:hover { background: #dbeafe; color: #1d4ed8; }

/* ==========================================================================
   TeacherDetails — tcd-* namespace
   ========================================================================== */

.tcd-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem 0 2rem;
}

.tcd-hero-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.tcd-hero-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
    flex-shrink: 0;
}

.tcd-hero-info { flex: 1; min-width: 0; }

.tcd-hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
    margin-bottom: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tcd-hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tcd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.tcd-badge--primary { background: #e8f0fe; color: #1a56db; }
.tcd-badge--meta    { background: #f1f5f9; color: #64748b; }

.tcd-hero-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-left: auto;
    align-items: center;
}

.tcd-btn-back,
.tcd-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.tcd-btn-back { border: 1.5px solid #adb5bd; color: #495057; background: #ffffff; }
.tcd-btn-back:hover { background: #f8f9fa; border-color: #6c757d; color: #212529; }

.tcd-btn-edit { border: 1.5px solid #1a56db; color: #1a56db; background: #ffffff; }
.tcd-btn-edit:hover { background: #1a56db; color: #ffffff; }

.tcd-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.1rem;
}

.tcd-info-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.tcd-info-card-hd {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    padding: 0.7rem 1.1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e9ecef;
}

.tcd-info-rows { padding: 0.3rem 0; }

.tcd-info-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.6rem 1.1rem;
    border-bottom: 1px solid #f1f5f9;
}

.tcd-info-row:last-child { border-bottom: none; }

.tcd-info-key {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    min-width: 90px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tcd-info-value { font-size: 0.88rem; color: #1e293b; word-break: break-word; }

.tcd-section-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.tcd-section-hd {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    padding: 0.7rem 1.1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e9ecef;
}

.tcd-class-pills { display: flex; flex-wrap: wrap; gap: 0.55rem; padding: 1rem 1.1rem; }

.tcd-class-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: #e8f0fe;
    color: #1a56db;
    border: 1px solid #c7d9fd;
}

.tcd-empty {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #94a3b8;
    font-size: 0.88rem;
    padding: 1.1rem 1.25rem;
}

.tcd-empty-icon { font-size: 1.1rem; opacity: 0.6; }

@media (max-width: 640px) {
    .tcd-hero-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .tcd-hero-actions { margin-left: 0; width: 100%; }
    .tcd-btn-back, .tcd-btn-edit { flex: 1; justify-content: center; }
    .tcd-hero-title { font-size: 1.2rem; white-space: normal; }
    .tcd-info-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ClassDetail — cld-* namespace
   ========================================================================== */

.cld-page { display: flex; flex-direction: column; gap: 1rem; }

.cld-btn-back,
.cld-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.cld-btn-back { background: #f8fafc; color: #374151; border-color: #d1d5db; }
.cld-btn-back:hover { background: #f1f5f9; border-color: #9ca3af; }

.cld-btn-edit {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.cld-btn-edit:hover { background: linear-gradient(135deg, #4f46e5, #4338ca); color: #fff; transform: translateY(-1px); }

.cld-hero-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1.5rem 1.75rem;
    position: relative;
    overflow: hidden;
}

.cld-hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #3b82f6);
}

.cld-hero-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.65rem;
    line-height: 1.25;
}

.cld-hero-badges { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.cld-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.28rem 0.75rem;
    border-radius: 20px;
}

.cld-badge--primary   { background: #eff6ff; color: #1d4ed8; }
.cld-badge--secondary { background: #f5f3ff; color: #6d28d9; }

.cld-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.cld-section-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    overflow: hidden;
}

.cld-section-hd {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #f1f5f9;
}

.cld-table-wrap { overflow-x: auto; }

.cld-section-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.cld-section-table thead tr { background: #f8fafc; }

.cld-section-table th {
    padding: 0.65rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    border-bottom: 1px solid #e8ecf1;
    white-space: nowrap;
}

.cld-row { transition: background 0.15s; }
.cld-row:hover { background: #f8faff; }

.cld-section-table td {
    padding: 0.65rem 1rem;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.cld-section-table tbody tr:last-child td { border-bottom: none; }

.cld-email { font-size: 0.8rem; color: #6b7280; }

.cld-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    background: #f0f4ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.cld-empty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    color: #9ca3af;
    font-size: 0.85rem;
    justify-content: center;
}

.cld-empty-icon { font-size: 1.3rem; color: #d1d5db; }

@media (max-width: 640px) {
    .cld-info-grid { grid-template-columns: 1fr; }
    .cld-hero-card { padding: 1.1rem 1rem; }
    .cld-hero-title { font-size: 1.15rem; }
}

/* ==========================================================================
   StudentDetail — sd-* namespace
   ========================================================================== */

.sd-page { display: flex; flex-direction: column; gap: 1rem; }

.sd-hero {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.sd-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #3b82f6);
}

.sd-hero-avatar-wrap { flex-shrink: 0; }

.sd-hero-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8ecf1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sd-hero-info { flex: 1 1 200px; min-width: 0; }

.sd-hero-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.sd-hero-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }

.sd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

.sd-badge--class   { background: #ede9fe; color: #5b21b6; }
.sd-badge--section { background: #dbeafe; color: #1d4ed8; }
.sd-badge--year    { background: #d1fae5; color: #065f46; }
.sd-badge--gender  { background: #fce7f3; color: #9d174d; }

.sd-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; font-size: 0.78rem; }

.sd-meta-item { display: flex; align-items: center; gap: 0.3rem; }

.sd-meta-key {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sd-meta-val { color: #374151; font-weight: 700; font-family: 'Courier New', monospace; font-size: 0.75rem; }
.sd-meta-sep { color: #d1d5db; }

.sd-hero-actions { display: flex; flex-direction: column; gap: 0.5rem; flex-shrink: 0; }

.sd-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.sd-hero-btn--back { background: #f8fafc; color: #374151; border-color: #d1d5db; }
.sd-hero-btn--back:hover { background: #f1f5f9; border-color: #9ca3af; }

.sd-hero-btn--edit {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.sd-hero-btn--edit:hover { background: linear-gradient(135deg, #4f46e5, #4338ca); color: #fff; transform: translateY(-1px); }

.sd-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.sd-info-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    padding: 1.1rem 1.25rem;
}

.sd-info-card-hd {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #f1f5f9;
}

.sd-info-rows { display: flex; flex-direction: column; gap: 0.5rem; }

.sd-info-row { display: flex; gap: 0.75rem; align-items: baseline; font-size: 0.82rem; }

.sd-info-key {
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 72px;
    flex-shrink: 0;
}

.sd-info-val { color: #1e293b; font-weight: 500; }
.sd-info-phone { color: #6b7280; font-size: 0.75rem; margin-left: 0.4rem; }

.sd-section {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    padding: 1.25rem;
}

.sd-section-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.sd-section-title { font-size: 0.95rem; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 0.5rem; }
.sd-section-title i { color: #6366f1; }

.sd-outline-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    background: #f8fafc;
    color: #374151;
    border: 1px solid #d1d5db;
    transition: all 0.16s;
    margin-bottom: 0;
}

.sd-outline-btn:hover { background: #f1f5f9; border-color: #9ca3af; }
.sd-outline-btn--sm { font-size: 0.72rem; padding: 0.28rem 0.65rem; }

.sd-empty-notice {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    color: #0369a1;
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
}

.sd-admission-form {
    background: #f8faff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.sd-admission-form-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: #ede9fe;
    font-size: 0.82rem;
    font-weight: 600;
    color: #5b21b6;
}

.sd-admission-form-body { padding: 1rem; }

.sd-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.85rem; }

.sd-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.9rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    background: #f8fafc;
    color: #6b7280;
    border: 1px solid #e2e8f0;
    transition: all 0.16s;
}

.sd-tab:hover { background: #f0f0ff; color: #4f46e5; border-color: #c7d2fe; }

.sd-tab--active { background: #6366f1; color: #fff; border-color: #6366f1; box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.sd-tab--active:hover { background: #4f46e5; color: #fff; }

.sd-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }

.sd-pay-selected-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: #f0fdf4;
    color: #065f46;
    border: 1px solid #6ee7b7;
    margin-bottom: 0.85rem;
    transition: all 0.16s;
    width: 100%;
    justify-content: center;
}

.sd-pay-selected-btn:hover:not(:disabled) { background: #d1fae5; border-color: #34d399; }
.sd-pay-selected-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.sd-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid #f1f5f9; }

.sd-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }

.sd-table thead tr { background: #f8fafc; border-bottom: 2px solid #e8ecf1; }

.sd-table th {
    padding: 0.6rem 0.85rem;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    white-space: nowrap;
    text-align: left;
}

.sd-fee-row { border-bottom: 1px solid #f1f5f9; transition: background 0.13s; }
.sd-fee-row td { padding: 0.6rem 0.85rem; vertical-align: middle; }
.sd-fee-row:hover { background: #fafbff !important; }

.sd-fee-paid    { background: #f0fdf4; }
.sd-fee-pending { background: #fffbeb; }
.sd-fee-overdue { background: #fff1f2; }

.sd-fee-num    { font-family: monospace; font-weight: 700; color: #6b7280; font-size: 0.75rem; }
.sd-fee-name   { font-weight: 600; color: #1e293b; }
.sd-fee-caret  { color: #9ca3af; font-size: 0.7rem; }
.sd-fee-amount { font-weight: 600; white-space: nowrap; }

.sd-cur { font-size: 0.65rem; font-weight: 500; color: #9ca3af; margin-left: 1px; }

.sd-fee-paid-col  { color: #059669; }
.sd-fee-remaining { color: #dc2626; }
.sd-fee-date      { font-size: 0.75rem; color: #6b7280; white-space: nowrap; }
.sd-fee-desc      { font-size: 0.75rem; color: #6b7280; max-width: 150px; }
.sd-fee-actions   { white-space: nowrap; }

.sd-discount    { font-size: 0.7rem; color: #059669; margin-left: 4px; }
.sd-dash        { color: #9ca3af; }

.sd-pending-badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 600;
}

.sd-status-paid   { color: #059669; font-weight: 600; font-size: 0.78rem; }
.sd-status-unpaid { color: #dc2626; font-weight: 600; font-size: 0.78rem; }

.sd-payments-row { background: #f8faff; }
.sd-payments-row td { padding: 0; }

.sd-payments-panel {
    margin: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.sd-no-payments { padding: 0.75rem 1rem; text-align: center; color: #9ca3af; font-size: 0.78rem; }

.sd-payment-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }

.sd-payment-table th {
    background: #f1f5f9;
    padding: 0.45rem 0.75rem;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    text-align: center;
}

.sd-payment-table td {
    padding: 0.45rem 0.75rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

.sd-payment-table tr:last-child td { border-bottom: none; }

@media (max-width: 640px) {
    .sd-hero { flex-direction: column; align-items: flex-start; }
    .sd-hero-actions { flex-direction: row; }
    .sd-hero-avatar { width: 80px; height: 80px; }
    .sd-hero-name { font-size: 1.15rem; }
}

/* ==========================================================================
   StudentExamDetail — sed-* namespace
   ========================================================================== */

.sed-page { display: flex; flex-direction: column; gap: 1.25rem; padding: 1.5rem 0 2rem; }

.sed-hero-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.sed-hero-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
    flex-shrink: 0;
}

.sed-hero-info { flex: 1; min-width: 0; }

.sed-hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
    margin-bottom: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sed-hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.65rem; }

.sed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.sed-badge--primary   { background: #e8f0fe; color: #1a56db; }
.sed-badge--info      { background: #e0f2fe; color: #0369a1; }
.sed-badge--secondary { background: #f1f5f9; color: #64748b; }

.sed-hero-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.5rem; font-size: 0.82rem; }

.sed-meta-key { font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.73rem; }
.sed-meta-val { color: #1e293b; }
.sed-meta-sep { color: #cbd5e1; font-size: 0.9rem; }

.sed-hero-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-left: auto; align-items: center; }

.sed-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    border: 1.5px solid #adb5bd;
    color: #495057;
    background: #ffffff;
    cursor: pointer;
}

.sed-btn-back:hover { background: #f8f9fa; border-color: #6c757d; color: #212529; }

.sed-section-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.sed-section-hd {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e9ecef;
}

/* ── Exam section body ── */
.sed-section-body { padding: 1.25rem 1.5rem; }

/* Year pill tabs */
.sed-year-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.sed-year-tab {
    padding: 0.35rem 0.95rem; font-size: 0.82rem; font-weight: 600;
    border-radius: 999px; border: 1.5px solid #e2e8f0; background: #f8fafc;
    color: #64748b; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.sed-year-tab:hover { border-color: #6366f1; color: #6366f1; background: #f5f3ff; }
.sed-year-tab--active { background: #6366f1; color: #fff; border-color: #6366f1; }
.sed-year-tab--active:hover { background: #4f46e5; border-color: #4f46e5; color: #fff; }

/* Search */
.sed-search-wrap { position: relative; max-width: 340px; margin-left: auto; margin-bottom: 1.25rem; }
.sed-search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 0.82rem; pointer-events: none; }
.sed-search-input {
    width: 100%; padding: 0.42rem 0.75rem 0.42rem 2.1rem; font-size: 0.83rem;
    border: 1.5px solid #e2e8f0; border-radius: 8px; outline: none; color: #374151; background: #fff;
}
.sed-search-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

/* Inline states */
.sed-inline-loading { padding: 2rem; display: flex; align-items: center; justify-content: center; gap: 0.6rem; color: #9ca3af; font-size: 0.88rem; }
.sed-no-exams { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2.5rem 1rem; color: #94a3b8; font-size: 0.9rem; }
.sed-no-exams-icon { font-size: 2rem; color: #cbd5e1; }

/* Summary stat cards */
.sed-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; margin-bottom: 1.5rem; }
.sed-stat-card { background: #f8fafc; border: 1px solid #e8ecf1; border-radius: 10px; padding: 0.85rem 1rem; }
.sed-stat-label { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.3rem; }
.sed-stat-value { font-size: 1.35rem; font-weight: 800; color: #1e293b; line-height: 1.15; margin-bottom: 0.2rem; }
.sed-stat-sub { font-size: 0.73rem; color: #94a3b8; }

/* Per-subject summary table */
.sed-subject-section { margin-bottom: 1.5rem; }
.sed-subject-hd { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; margin-bottom: 0.55rem; display: flex; align-items: center; gap: 0.4rem; }
.sed-subject-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e8ecf1; border-radius: 10px; }
.sed-subject-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; min-width: 480px; }
.sed-subject-table thead tr { background: #f8fafc; border-bottom: 2px solid #e2e8f0; }
.sed-subject-table thead th { padding: 0.55rem 0.85rem; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; text-align: right; }
.sed-subject-table thead th:first-child { text-align: left; }
.sed-subject-table tbody td { padding: 0.55rem 0.85rem; vertical-align: middle; border-bottom: 1px solid #f1f5f9; text-align: right; }
.sed-subject-table tbody td:first-child { font-weight: 600; text-align: left; color: #1e293b; }
.sed-subject-table tbody tr:last-child td { border-bottom: none; }
.sed-subject-table tbody tr:hover { background: #f8faff; }
.sed-cell--absent { color: #f97316; font-weight: 700; font-size: 0.75rem; }
.sed-cell--avg    { font-weight: 700; color: #4f46e5; }
.sed-cell--empty  { color: #d1d5db; }

/* Detail table */
.sed-detail-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e8ecf1; border-radius: 10px; }
.sed-detail-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 620px; color: #1e293b; }
.sed-detail-table thead tr { background: #f8fafc; border-bottom: 2px solid #e2e8f0; }
.sed-detail-table thead th { padding: 0.65rem 1rem; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; white-space: nowrap; }
.sed-detail-table tbody td { padding: 0.6rem 1rem; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }
.sed-detail-table tbody tr:last-child td { border-bottom: none; }
.sed-detail-row:hover { background: #f8faff; transition: background 0.1s; }
.sed-detail-row--absent { background: #fffbeb !important; }
.sed-detail-row--absent:hover { background: #fef3c7 !important; }
.sed-detail-td-subject { font-weight: 600; }
.sed-detail-td-term, .sed-detail-td-type { font-size: 0.8rem; color: #64748b; }
.sed-detail-td-right  { text-align: right; }
.sed-detail-td-marks  { font-weight: 700; color: #1e40af; text-align: right; }
.sed-detail-td-absent { font-weight: 700; color: #f97316; text-align: right; }
.sed-status-pill { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.71rem; font-weight: 700; padding: 0.18rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.sed-status-pill--published { background: #d1fae5; color: #065f46; }
.sed-status-pill--draft     { background: #f1f5f9; color: #475569; }
.sed-view-btn {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.65rem;
    border-radius: 6px; border: 1.5px solid #bfdbfe; background: #eff6ff;
    color: #2563eb; text-decoration: none; transition: all 0.15s;
}
.sed-view-btn:hover { background: #2563eb; color: #fff; text-decoration: none; }

/* Legend */
.sed-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.75rem; color: #94a3b8; margin-top: 0.9rem; }
.sed-legend-item { display: flex; align-items: center; gap: 0.4rem; }
.sed-legend-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; border: 1px solid; flex-shrink: 0; }

@media (max-width: 768px) {
    .sed-hero-card { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.25rem; }
    .sed-hero-avatar { width: 80px; height: 80px; }
    .sed-hero-title { font-size: 1.2rem; white-space: normal; }
    .sed-hero-actions { margin-left: 0; width: 100%; }
    .sed-btn-back { flex: 1; justify-content: center; }
    .sed-hero-meta { font-size: 0.78rem; }
    .sed-summary-grid { grid-template-columns: 1fr 1fr; }
    .sed-search-wrap { max-width: 100%; margin-left: 0; }
    .sed-section-body { padding: 1rem; }
}
@media (max-width: 480px) {
    .sed-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .sed-page { padding: 1rem 0 1.5rem; }
    .sed-hero-card { padding: 1rem; border-radius: 10px; }
    .sed-hero-avatar { width: 64px; height: 64px; }
    .sed-hero-title { font-size: 1.05rem; }
    .sed-section-card { border-radius: 10px; }
    .sed-section-hd { font-size: 0.72rem; padding: 0.6rem 1rem; }
}

/* ==========================================================================
   ClassFeePlanDetail — fpd-* namespace
   ========================================================================== */

.fpd-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem 1rem;
    max-width: 960px;
    margin: 0 auto;
}

.fpd-hero-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.fpd-hero-info { display: flex; flex-direction: column; gap: .5rem; }

.fpd-hero-title { font-size: 1.45rem; font-weight: 700; color: #111827; line-height: 1.2; }

.fpd-hero-badges { display: flex; flex-wrap: wrap; gap: .45rem; }

.fpd-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    font-weight: 600;
    padding: .25rem .65rem;
    border-radius: 999px;
    white-space: nowrap;
}

.fpd-badge--primary   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.fpd-badge--secondary { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.fpd-hero-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }

.fpd-btn-back,
.fpd-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    font-weight: 600;
    padding: .45rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    text-decoration: none;
}

.fpd-btn-back { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.fpd-btn-back:hover { background: #e5e7eb; color: #111827; }

.fpd-btn-edit { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.fpd-btn-edit:hover { background: #1e40af; border-color: #1e40af; color: #fff; }

.fpd-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.fpd-info-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.fpd-info-card-hd {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    padding: .65rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.fpd-info-rows { display: flex; flex-direction: column; }

.fpd-info-row { display: flex; align-items: baseline; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid #f3f4f6; }
.fpd-info-row:last-child { border-bottom: none; }

.fpd-info-key  { flex: 0 0 160px; font-size: .82rem; font-weight: 600; color: #6b7280; }
.fpd-info-value { flex: 1; font-size: .9rem; color: #111827; word-break: break-word; }

.fpd-section-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.fpd-section-hd {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    padding: .65rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.fpd-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.fpd-section-table { width: 100%; border-collapse: collapse; font-size: .875rem; color: #374151; }

.fpd-section-table thead tr { background: #f9fafb; }

.fpd-section-table th {
    padding: .7rem 1rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.fpd-section-table td { padding: .7rem 1rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }

.fpd-row:last-child td { border-bottom: none; }
.fpd-row:hover td { background: #f9fafb; }

.fpd-empty { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 2.5rem 1rem; color: #9ca3af; font-size: .9rem; }
.fpd-empty-icon { font-size: 1.4rem; }

@media (max-width: 600px) {
    .fpd-hero-card { flex-direction: column; }
    .fpd-hero-actions { width: 100%; justify-content: flex-start; }
    .fpd-info-key { flex: 0 0 120px; }
}

/* ==========================================================================
   ResultList — rsl-* namespace
   ========================================================================== */

.rsl-page { padding: 1.25rem 1rem; }

.rsl-filter-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}

.rsl-filter-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.rsl-filter-group { display: flex; flex-direction: column; gap: 0.25rem; }

.rsl-filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.rsl-select {
    height: 2.1rem;
    min-width: 160px;
    padding: 0 0.65rem;
    border: 1px solid #cbd5e0;
    border-radius: 7px;
    background: #fff;
    font-size: 0.875rem;
    color: #1e293b;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: auto;
}

.rsl-select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.rsl-select:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }

.rsl-btn-load {
    align-self: flex-end;
    height: 2.1rem;
    padding: 0 1rem;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    white-space: nowrap;
}

.rsl-btn-load:hover:not(:disabled) { background: #2563eb; box-shadow: 0 4px 12px rgba(59,130,246,0.3); transform: translateY(-1px); }
.rsl-btn-load:disabled { background: #93c5fd; cursor: not-allowed; transform: none; box-shadow: none; }

.rsl-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.rsl-empty { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 3rem 1rem; color: #94a3b8; font-size: 0.9rem; }
.rsl-empty-icon { font-size: 2rem; color: #cbd5e0; }

.rsl-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 0.875rem; color: #1e293b; }

.rsl-table thead tr { background: #f8fafc; border-bottom: 2px solid #e2e8f0; }

.rsl-table thead th {
    padding: 0.75rem 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    white-space: nowrap;
}

.rsl-table tbody td { padding: 0.75rem 1rem; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }

.rsl-row:hover { background: #f8fafc; transition: background 0.1s; }
.rsl-row:last-child td { border-bottom: none; }

.rsl-th-right, .rsl-td-right   { text-align: right; }
.rsl-th-center, .rsl-td-center { text-align: center; }
.rsl-td-actions { text-align: right; white-space: nowrap; }

.rsl-btn-action,
.rsl-btn-edit,
.rsl-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    border: 1px solid transparent;
    margin-left: 0.3rem;
    white-space: nowrap;
}

.rsl-btn-action:first-child,
.rsl-btn-edit:first-child,
.rsl-btn-outline:first-child { margin-left: 0; }

.rsl-btn-action { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.rsl-btn-action:hover { background: #059669; color: #fff; border-color: #059669; box-shadow: 0 3px 8px rgba(5,150,105,0.25); transform: translateY(-1px); }

.rsl-btn-edit { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.rsl-btn-edit:hover { background: #3b82f6; color: #fff; border-color: #3b82f6; box-shadow: 0 3px 8px rgba(59,130,246,0.25); transform: translateY(-1px); }

.rsl-btn-outline { background: #f8fafc; color: #475569; border-color: #cbd5e0; }
.rsl-btn-outline:hover { background: #e2e8f0; color: #1e293b; border-color: #94a3b8; transform: translateY(-1px); }

@media (max-width: 768px) {
    .rsl-page { padding: 0.75rem 0.5rem; }
    .rsl-filter-header { flex-direction: column; align-items: stretch; gap: 0.6rem; padding: 0.875rem 1rem; }
    .rsl-select { min-width: 0; width: 100%; }
    .rsl-btn-load { width: 100%; justify-content: center; }
    .rsl-table thead th, .rsl-table tbody td { padding: 0.6rem 0.65rem; font-size: 0.8rem; }
    .rsl-btn-action, .rsl-btn-edit, .rsl-btn-outline { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
}

@media (max-width: 480px) {
    .rsl-page { padding: 0.5rem 0.25rem; }
    .rsl-filter-header { padding: 0.75rem; }
    .rsl-table thead th, .rsl-table tbody td { padding: 0.5rem 0.5rem; font-size: 0.75rem; }
    .rsl-empty { padding: 2rem 1rem; font-size: 0.85rem; }
    .rsl-empty-icon { font-size: 1.6rem; }
}

/* ==========================================================================
   ResultCards — rc-* namespace
   ========================================================================== */

.rc-page { display: flex; flex-direction: column; gap: 1rem; }

.rc-filter-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 1.25rem 1.5rem;
}

.rc-filter-header { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }

.rc-filter-group { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 160px; min-width: 140px; }

.rc-filter-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.rc-select {
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #f8fafc;
    color: #374151;
    transition: border-color 0.18s, box-shadow 0.18s;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
}

.rc-select:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); background: #fff; }
.rc-select:disabled { opacity: 0.45; cursor: not-allowed; }

.rc-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
    transition: all 0.18s ease;
    white-space: nowrap;
}

.rc-btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #4f46e5, #4338ca); box-shadow: 0 4px 14px rgba(99,102,241,0.4); transform: translateY(-1px); }
.rc-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

@media (max-width: 640px) {
    .rc-filter-header { flex-direction: column; }
    .rc-filter-group  { width: 100%; min-width: unset; }
    .rc-btn-primary   { width: 100%; justify-content: center; }
}

/* ==========================================================================
   StudentYearProfiles — syp-* namespace
   ========================================================================== */

.syp-page { display: flex; flex-direction: column; gap: 1rem; padding: 1rem 1.25rem 2rem; }

.syp-filter-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.syp-filter-header {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.syp-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; flex: 1; }

.syp-filter-group { display: flex; flex-direction: column; gap: 0.2rem; min-width: 130px; }

.syp-filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.syp-select {
    padding: 0.32rem 2rem 0.32rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.825rem;
    color: #111827;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 0.6rem center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.15s;
}

.syp-select:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12); }
.syp-select:disabled { background-color: #f9fafb; color: #9ca3af; cursor: not-allowed; border-color: #e5e7eb; }

.syp-filter-search { flex: 1; min-width: 180px; }

.syp-search-wrap { position: relative; display: flex; align-items: center; }

.syp-search-icon { position: absolute; left: 0.6rem; color: #9ca3af; font-size: 0.85rem; pointer-events: none; }

.syp-search-input {
    width: 100%;
    padding: 0.32rem 0.75rem 0.32rem 2rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.825rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
}

.syp-search-input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12); }
.syp-search-input:disabled { background: #f9fafb; color: #9ca3af; cursor: not-allowed; border-color: #e5e7eb; }

.syp-header-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.syp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.85rem;
    border-radius: 6px;
    font-size: 0.825rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.syp-btn-save {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 1rem;
    border-radius: 6px;
    font-size: 0.825rem;
    font-weight: 600;
    border: 1px solid #15803d;
    background: #16a34a;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.syp-btn-save:hover:not(:disabled) { background: #15803d; border-color: #166534; color: #fff; }
.syp-btn-save:disabled { background: #d1d5db; border-color: #d1d5db; color: #9ca3af; cursor: not-allowed; }

.syp-save-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
}

.syp-table-wrap { overflow-x: auto; }

.syp-table { width: 100%; border-collapse: collapse; font-size: 0.845rem; }

.syp-table thead tr { background: #f9fafb; border-bottom: 2px solid #e5e7eb; }

.syp-th {
    padding: 0.65rem 0.9rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    white-space: nowrap;
    vertical-align: bottom;
}

.syp-th-sub { display: block; font-size: 0.68rem; font-weight: 400; color: #9ca3af; text-transform: none; letter-spacing: 0; margin-top: 0.15rem; }

.syp-th--rollno { width: 80px; }
.syp-th--name   { width: 200px; }
.syp-th--field  { width: 220px; }

.syp-td { padding: 0.6rem 0.9rem; vertical-align: middle; color: #111827; border-bottom: 1px solid #f3f4f6; }
.syp-td--rollno { font-weight: 600; color: #374151; white-space: nowrap; }
.syp-td--name   { font-weight: 500; color: #111827; }
.syp-td--field  { vertical-align: top; padding-top: 0.7rem; }

.syp-row:hover { background: #fafafa; }

.syp-input {
    width: 100%;
    padding: 0.28rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.815rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
}

.syp-input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1); }

.syp-textarea {
    width: 100%;
    padding: 0.28rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.815rem;
    color: #111827;
    background: #fff;
    resize: vertical;
    transition: border-color 0.15s;
}

.syp-textarea:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1); }

.syp-char-count { text-align: right; font-size: 0.68rem; color: #9ca3af; margin-top: 0.15rem; }

.syp-empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 3rem 1rem; color: #9ca3af; font-size: 0.9rem; }
.syp-empty-icon { font-size: 2rem; color: #d1d5db; display: block; }

.syp-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

.syp-pager-size { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: #6b7280; }
.syp-pager-select { padding: 0.25rem 1.8rem 0.25rem 0.5rem; font-size: 0.8rem; }
.syp-pager-nav { display: flex; align-items: center; gap: 0.4rem; }

.syp-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 1.1rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.13s, border-color 0.13s;
}

.syp-pager-btn:hover:not(:disabled) { background: #f3f4f6; border-color: #9ca3af; }
.syp-pager-btn:disabled { color: #d1d5db; cursor: not-allowed; background: #f9fafb; }

.syp-pager-info { font-size: 0.825rem; font-weight: 600; color: #374151; padding: 0 0.25rem; }
.syp-pager-of   { font-weight: 400; color: #9ca3af; }
.syp-pager-count { font-size: 0.78rem; color: #9ca3af; }

@media (max-width: 768px) {
    .syp-page { padding: 0.75rem 0.75rem 1.5rem; }
    .syp-filter-header { flex-direction: column; align-items: stretch; }
    .syp-filters { flex-direction: column; }
    .syp-filter-group { min-width: unset; width: 100%; }
    .syp-filter-search { min-width: unset; }
    .syp-header-actions { justify-content: flex-end; }
    .syp-table { min-width: 700px; }
    .syp-pager { flex-direction: column; align-items: center; gap: 0.5rem; }
}

/* ==========================================================================
   Documents — doc-* namespace
   ========================================================================== */

.doc-page { display: flex; flex-direction: column; gap: 1.1rem; }

/* Shared card shell */
.doc-upload-card,
.doc-list-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.doc-card-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e8ecf1;
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
    gap: 0.75rem;
}

.doc-card-hd-left { display: flex; align-items: center; gap: 0.5rem; }
.doc-card-hd-left i { color: #6366f1; }

.doc-card-body { padding: 1.25rem; }

/* Drop zone */
.doc-drop-zone {
    border: 2px dashed #c7d2fe;
    border-radius: 12px;
    background: #f8faff;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.doc-drop-zone.drag-over { border-color: #6366f1; background: #ede9fe; }

.doc-drop-icon { font-size: 2.4rem; color: #6366f1; margin-bottom: 0.55rem; display: block; }
.doc-drop-title { font-size: 0.9rem; font-weight: 600; color: #1e293b; margin-bottom: 0.2rem; }
.doc-drop-sub { font-size: 0.75rem; color: #6b7280; margin-bottom: 0.8rem; }
.doc-drop-hint { font-size: 0.7rem; color: #9ca3af; margin-top: 0.5rem; }

.doc-browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: #6366f1;
    border: 1.5px solid #6366f1;
    transition: all 0.15s;
    text-decoration: none;
}

.doc-browse-btn:hover { background: #6366f1; color: #fff; }

/* Upload queue */
.doc-queue { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }

.doc-queue-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.42rem 0.65rem;
    border-radius: 7px;
    font-size: 0.8rem;
    background: #f8fafc;
}

.doc-queue-icon { font-size: 1rem; width: 18px; flex-shrink: 0; text-align: center; }
.doc-queue-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; font-weight: 500; }
.doc-queue-size { font-size: 0.7rem; color: #9ca3af; width: 60px; text-align: right; flex-shrink: 0; }
.doc-queue-status { width: 110px; flex-shrink: 0; }

.doc-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0.5rem; border-radius: 6px; font-size: 0.68rem; font-weight: 600; }
.doc-badge--pending  { background: #f1f5f9; color: #6b7280; }
.doc-badge--done     { background: #d1fae5; color: #065f46; }
.doc-badge--failed   { background: #fee2e2; color: #dc2626; }
.doc-badge--spinning { background: #ede9fe; color: #6366f1; }

.doc-progress { height: 5px; background: #e2e8f0; border-radius: 3px; overflow: hidden; width: 100%; }
.doc-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #3b82f6);
    border-radius: 3px;
    width: 40%;
    animation: doc-prog 0.9s ease-in-out infinite alternate;
}
@keyframes doc-prog { from { margin-left: 0; } to { margin-left: 60%; } }

.doc-queue-del {
    border: none;
    background: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.13s;
}
.doc-queue-del:hover { color: #dc2626; }

.doc-upload-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.85rem; flex-wrap: wrap; }

.doc-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
    transition: all 0.15s;
}
.doc-upload-btn:hover:not(:disabled) { background: linear-gradient(135deg, #4f46e5, #4338ca); transform: translateY(-1px); }
.doc-upload-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.doc-upload-feedback { font-size: 0.77rem; }
.doc-upload-feedback--ok  { color: #059669; }
.doc-upload-feedback--err { color: #dc2626; }

.doc-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    background: #f8fafc;
    color: #6b7280;
    border: 1px solid #d1d5db;
    transition: all 0.13s;
}
.doc-clear-btn:hover:not(:disabled) { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.doc-clear-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* List toolbar */
.doc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e8ecf1;
}

.doc-search-wrap { position: relative; flex: 1; min-width: 200px; }
.doc-search-icon { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 0.8rem; pointer-events: none; }

.doc-search-input {
    width: 100%;
    padding: 0.38rem 2rem 0.38rem 2.1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.83rem;
    background: #fff;
    color: #1e293b;
    transition: border-color 0.15s;
}
.doc-search-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }

.doc-search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    line-height: 1;
    transition: color 0.12s;
}
.doc-search-clear:hover { color: #dc2626; }

.doc-size-wrap { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: #6b7280; white-space: nowrap; }

.doc-size-select {
    padding: 0.3rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.78rem;
    background: #fff;
    color: #374151;
}

/* Document table */
.doc-table-wrap { overflow-x: auto; }

.doc-table { width: 100%; border-collapse: collapse; font-size: 0.855rem; }
.doc-table thead tr { background: #f8fafc; border-bottom: 2px solid #e8ecf1; }

.doc-table th {
    padding: 0.6rem 1rem;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    white-space: nowrap;
}

.doc-row { transition: background 0.12s; }
.doc-row:hover { background: #f8faff; }

.doc-table td { padding: 0.68rem 1rem; border-bottom: 1px solid #f1f5f9; color: #374151; vertical-align: middle; }
.doc-table tbody tr:last-child td { border-bottom: none; }

.doc-num { font-size: 0.72rem; color: #9ca3af; font-family: monospace; }

.doc-name-cell { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; color: #1e293b; }
.doc-name-cell i { font-size: 1.05rem; flex-shrink: 0; }

.doc-size-td  { font-size: 0.78rem; color: #6b7280; white-space: nowrap; }
.doc-date-td  { font-size: 0.8rem; color: #6b7280; white-space: nowrap; }
.doc-actions-td { white-space: nowrap; text-align: right; }

.doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.26rem 0.65rem;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.14s;
    background: none;
}

.doc-btn--download { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.doc-btn--download:hover { background: #2563eb; color: #fff; border-color: #2563eb; }

.doc-btn--delete { background: #fff1f2; color: #dc2626; border-color: #fecaca; }
.doc-btn--delete:hover { background: #dc2626; color: #fff; border-color: #dc2626; }

/* Empty + loading states */
.doc-empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 3rem 1rem; color: #9ca3af; font-size: 0.88rem; }
.doc-empty-icon { font-size: 2.2rem; color: #d1d5db; }

.doc-loading { display: flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 3rem 1rem; color: #9ca3af; font-size: 0.85rem; }

/* Pager */
.doc-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

.doc-pager-info { font-size: 0.78rem; color: #6b7280; }
.doc-pager-nav { display: flex; align-items: center; gap: 0.3rem; }

.doc-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.3rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 0.82rem;
    transition: background 0.12s;
}
.doc-pager-btn:hover:not(:disabled) { background: #f3f4f6; border-color: #9ca3af; }
.doc-pager-btn:disabled { color: #d1d5db; cursor: not-allowed; background: #f9fafb; }
.doc-pager-btn--active { background: #6366f1; color: #fff; border-color: #6366f1; font-weight: 700; }
.doc-pager-btn--active:hover { background: #4f46e5; border-color: #4f46e5; }
.doc-pager-ellipsis { padding: 0 0.2rem; color: #9ca3af; font-size: 0.82rem; }

/* Delete modal */
.doc-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 1050; }
.doc-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-width: 440px;
    width: calc(100% - 2rem);
    overflow: hidden;
}
.doc-modal-hd {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}
.doc-modal-hd i { color: #dc2626; font-size: 1.1rem; }
.doc-modal-body { padding: 1.1rem 1.25rem; font-size: 0.875rem; color: #374151; }
.doc-modal-ft { display: flex; gap: 0.65rem; justify-content: flex-end; padding: 0.85rem 1.25rem; background: #f8fafc; border-top: 1px solid #f1f5f9; }
.doc-modal-cancel { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.42rem 0.9rem; border-radius: 8px; font-size: 0.82rem; font-weight: 600; cursor: pointer; background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; transition: all 0.13s; }
.doc-modal-cancel:hover { background: #e5e7eb; }
.doc-modal-delete { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.42rem 0.9rem; border-radius: 8px; font-size: 0.82rem; font-weight: 600; cursor: pointer; background: #dc2626; color: #fff; border: none; transition: all 0.13s; }
.doc-modal-delete:hover { background: #b91c1c; }

@media (max-width: 640px) {
    .doc-toolbar { flex-direction: column; align-items: stretch; }
    .doc-search-wrap { min-width: unset; }
}

/* ==========================================================================
   Payments Records — pmt-* namespace
   ========================================================================== */

.pmt-date      { font-size: 0.8rem; color: #374151; white-space: nowrap; }
.pmt-uid       { font-family: 'Courier New', monospace; font-size: 0.72rem; color: #9ca3af; }
.pmt-student   { font-weight: 600; color: #1e293b; }
.pmt-student:hover { color: #4f46e5; }
.pmt-group     { font-size: 0.72rem; color: #6b7280; margin-top: 0.1rem; }
.pmt-fee-name  { font-weight: 500; color: #374151; font-size: 0.83rem; }
.pmt-amount    { font-size: 0.83rem; color: #374151; white-space: nowrap; }
.pmt-discount  { color: #dc2626; font-size: 0.83rem; font-weight: 600; white-space: nowrap; }
.pmt-received  { font-weight: 700; color: #059669; font-size: 0.9rem; white-space: nowrap; }

.pmt-method {
    display: inline-block;
    padding: 0.17rem 0.55rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.pmt-collector { font-size: 0.78rem; color: #6b7280; }

.pmt-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.14s;
    font-size: 0.88rem;
    background: none;
}

.pmt-icon-btn--print { color: #6b7280; border-color: #e2e8f0; background: #f8fafc; }
.pmt-icon-btn--print:hover { background: #f1f5f9; color: #374151; border-color: #cbd5e0; }
.pmt-icon-btn--edit { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.pmt-icon-btn--edit:hover { background: #2563eb; color: #fff; border-color: #2563eb; }

/* Mobile payment card */
.pmt-mob-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 0.65rem;
}

.pmt-mob-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: #059669;
}

.pmt-mob-body { padding: 0.85rem 0.85rem 0.85rem 1.1rem; }

.pmt-mob-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.6rem; }
.pmt-mob-name { font-weight: 700; color: #1e293b; font-size: 0.9rem; text-decoration: none; display: block; }
.pmt-mob-name:hover { color: #4f46e5; }
.pmt-mob-meta { font-size: 0.72rem; color: #6b7280; margin-top: 0.1rem; }
.pmt-mob-amount { font-weight: 800; color: #059669; font-size: 1rem; text-align: right; }
.pmt-mob-disc { font-size: 0.72rem; color: #dc2626; text-align: right; }

.pmt-mob-divider { border: none; border-top: 1px solid #f1f5f9; margin: 0.55rem 0; }

.pmt-mob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; font-size: 0.78rem; margin-bottom: 0.65rem; }
.pmt-mob-lbl { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #9ca3af; display: block; margin-bottom: 0.1rem; }
.pmt-mob-val { color: #374151; font-weight: 500; }

.pmt-mob-actions { display: flex; gap: 0.5rem; padding-top: 0.55rem; border-top: 1px solid #f1f5f9; }
.pmt-mob-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.38rem 0.5rem;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.14s;
}
.pmt-mob-btn--receipt { background: #f8fafc; color: #374151; border-color: #d1d5db; }
.pmt-mob-btn--receipt:hover { background: #f1f5f9; }
.pmt-mob-btn--edit { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.pmt-mob-btn--edit:hover { background: #2563eb; color: #fff; }

/* ==========================================================================
   Payment Summary — ps-* namespace
   ========================================================================== */

.ps-id       { font-size: 0.7rem; font-family: monospace; color: #9ca3af; }
.ps-date     { font-size: 0.8rem; color: #374151; white-space: nowrap; }
.ps-student  { font-weight: 600; color: #1e293b; }
.ps-group    { font-size: 0.72rem; color: #6b7280; margin-top: 0.1rem; }
.ps-collector { font-size: 0.78rem; color: #6b7280; }

.ps-method {
    display: inline-block;
    padding: 0.17rem 0.55rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.ps-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
}
.ps-check--yes { background: #d1fae5; color: #059669; }
.ps-check--no  { background: #fee2e2; color: #dc2626; }
.ps-check--na  { background: #f3f4f6; color: #9ca3af; font-size: 0.65rem; }

.ps-print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    background: #f8fafc;
    color: #6366f1;
    font-size: 0.85rem;
    transition: all 0.14s;
}
.ps-print-btn:hover { background: #ede9fe; border-color: #c4b5fd; color: #4f46e5; }

.ps-mob-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 0.65rem;
}

.ps-mob-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: #3b82f6;
}

.ps-mob-body { padding: 0.85rem 0.85rem 0.85rem 1.1rem; }
.ps-mob-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.ps-mob-name { font-weight: 700; color: #1e293b; font-size: 0.9rem; display: block; }
.ps-mob-group { font-size: 0.72rem; color: #6b7280; margin-top: 0.1rem; }
.ps-mob-meta { font-size: 0.78rem; color: #374151; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 1rem; margin: 0.55rem 0; }
.ps-mob-lbl { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #9ca3af; display: block; }
.ps-mob-val { color: #374151; font-weight: 500; font-size: 0.8rem; }
.ps-mob-divider { border: none; border-top: 1px dashed #e8ecf1; margin: 0.5rem 0; }
.ps-mob-status-title { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #9ca3af; margin-bottom: 0.4rem; }
.ps-mob-checks { display: flex; gap: 0.6rem; align-items: center; }
.ps-mob-check-item { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.ps-mob-check-lbl { font-size: 0.6rem; font-weight: 600; color: #9ca3af; text-transform: uppercase; }
.ps-mob-footer { display: flex; justify-content: flex-end; padding-top: 0.5rem; border-top: 1px solid #f1f5f9; margin-top: 0.5rem; }

/* ==========================================================================
   Overdue Fees (FeeList) — urgency row coloring
   ========================================================================== */
.fel-row--critical { background: #fff1f2 !important; }
.fel-row--high     { background: #fff7ed !important; }
.fel-row--medium   { background: #fffbeb !important; }

.fel-row--critical:hover { background: #ffe4e6 !important; }
.fel-row--high:hover     { background: #ffedd5 !important; }
.fel-row--medium:hover   { background: #fef9c3 !important; }

.fel-urgency-chip {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
    margin-left: 0.3rem;
}
.fel-urgency-chip--critical { background: #fee2e2; color: #b91c1c; }
.fel-urgency-chip--high     { background: #ffedd5; color: #c2410c; }
.fel-urgency-chip--medium   { background: #fef3c7; color: #92400e; }

.fel-remaining-critical { color: #b91c1c; font-weight: 800; font-size: 0.92rem; }
.fel-remaining-high     { color: #c2410c; font-weight: 700; }
.fel-remaining-medium   { color: #d97706; font-weight: 700; }

/* ==========================================================================
   EXAM RESULTS ENTRY  (ere-*)
   @page "/exams/{Id:int}/results-entry"
   ========================================================================== */
.ere-page { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

.ere-meta-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(15,23,42,0.06);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}
.ere-meta-subject { font-size: 1.15rem; font-weight: 700; color: #1e293b; margin-bottom: 0.6rem; }
.ere-meta-grid { display: grid; grid-template-columns: repeat(4, auto); gap: 0.5rem 1.5rem; }
.ere-meta-item {}
.ere-meta-label { font-size: 0.63rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #9ca3af; }
.ere-meta-value { font-size: 0.85rem; font-weight: 600; color: #374151; }
.ere-status-badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 700; padding: 0.18rem 0.65rem; border-radius: 999px; }
.ere-status-badge--published { background: #d1fae5; color: #065f46; }
.ere-status-badge--draft     { background: #f1f5f9; color: #475569; }
.ere-meta-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-start; }
.ere-back-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.45rem 1rem; font-size: 0.82rem; font-weight: 600;
    border-radius: 8px; border: 1.5px solid #d1d5db; background: #f9fafb;
    color: #374151; text-decoration: none; transition: all 0.15s;
}
.ere-back-btn:hover { background: #f1f5f9; border-color: #9ca3af; color: #1e293b; text-decoration: none; }

.ere-locked-banner {
    display: flex; align-items: center; gap: 0.7rem;
    background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px;
    padding: 0.75rem 1.1rem; margin-bottom: 1.25rem;
    font-size: 0.85rem; color: #9a3412;
}
.ere-locked-icon { font-size: 1.1rem; color: #f97316; }

.ere-entry-card { background: #fff; border: 1px solid #e8ecf1; border-radius: 14px; box-shadow: 0 1px 6px rgba(15,23,42,0.06); overflow: hidden; }

.ere-entry-toolbar {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
    padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; background: #fafbfc;
}
.ere-search-wrap { position: relative; flex: 0 0 220px; }
.ere-search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 0.82rem; pointer-events: none; }
.ere-search-input {
    width: 100%; padding: 0.4rem 0.75rem 0.4rem 2rem; font-size: 0.83rem;
    border: 1.5px solid #e2e8f0; border-radius: 8px; outline: none; color: #374151; background: #fff;
}
.ere-search-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.ere-bulk-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-left: auto; }
.ere-bulk-btn {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.38rem 0.75rem; font-size: 0.78rem; font-weight: 600;
    border-radius: 7px; border: 1.5px solid #d1d5db; background: #f9fafb; color: #374151;
    cursor: pointer; transition: all 0.15s;
}
.ere-bulk-btn:hover:not(:disabled) { background: #f1f5f9; border-color: #9ca3af; }
.ere-bulk-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ere-save-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 1.1rem; font-size: 0.83rem; font-weight: 700;
    border-radius: 8px; border: none; background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.ere-save-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99,102,241,0.4); }
.ere-save-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.ere-pub-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 1rem; font-size: 0.83rem; font-weight: 600;
    border-radius: 8px; border: 1.5px solid #fcd34d; background: #fffbeb; color: #92400e;
    cursor: pointer; transition: all 0.15s;
}
.ere-pub-btn:hover { background: #fef3c7; border-color: #f59e0b; }

.ere-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ere-table { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 0.875rem; color: #1e293b; }
.ere-table thead tr { background: #f8fafc; border-bottom: 2px solid #e2e8f0; }
.ere-table thead th { padding: 0.65rem 1rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; white-space: nowrap; }
.ere-table tbody td { padding: 0.5rem 0.75rem; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }
.ere-row:hover { background: #f8faff; }
.ere-row--invalid { background: #fff1f2 !important; }
.ere-row--invalid:hover { background: #fee2e2 !important; }
.ere-td-num  { color: #9ca3af; font-size: 0.78rem; width: 44px; text-align: center; }
.ere-td-uid  { font-family: monospace; font-size: 0.8rem; color: #6b7280; white-space: nowrap; }
.ere-td-name { font-weight: 600; }
.ere-absent-cell { text-align: center; width: 90px; }
.ere-marks-input {
    width: 90px; padding: 0.35rem 0.55rem; font-size: 0.85rem; font-weight: 600;
    border: 1.5px solid #e2e8f0; border-radius: 7px; outline: none; color: #1e40af; text-align: right;
}
.ere-marks-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.ere-marks-input:disabled { background: #f3f4f6; color: #9ca3af; }
.ere-marks-err { font-size: 0.72rem; color: #dc2626; display: block; margin-top: 0.15rem; }
.ere-remarks-input {
    width: 100%; padding: 0.35rem 0.55rem; font-size: 0.82rem;
    border: 1.5px solid #e2e8f0; border-radius: 7px; outline: none; color: #374151; min-width: 140px;
}
.ere-remarks-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.ere-remarks-input:disabled { background: #f3f4f6; color: #9ca3af; }
.ere-no-students { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 3rem 1rem; color: #94a3b8; font-size: 0.9rem; }
.ere-no-students-icon { font-size: 2rem; color: #cbd5e1; }
.ere-footer {
    display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem;
    padding: 0.85rem 1.25rem; border-top: 1px solid #f1f5f9; background: #fafbfc; flex-wrap: wrap;
}
@media (max-width: 640px) {
    .ere-meta-grid { grid-template-columns: 1fr 1fr; }
    .ere-entry-toolbar { flex-direction: column; align-items: flex-start; }
    .ere-search-wrap { flex: none; width: 100%; }
    .ere-bulk-btns { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ResultCards — rc-* namespace additions
═══════════════════════════════════════════════════════════════════════ */
.rc-hero {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1.1rem 1.4rem;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe; border-radius: 14px;
}
.rc-hero-icon {
    width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: #fff; font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
}
.rc-hero-title { font-size: 1rem; font-weight: 700; color: #3b0764; margin-bottom: 0.2rem; }
.rc-hero-sub { font-size: 0.82rem; color: #6d28d9; line-height: 1.5; }

.rc-filter-title {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #6b7280; margin-bottom: 0.9rem;
}
.rc-filter-required { color: #ef4444; font-weight: 700; }
.rc-filter-footer {
    display: flex; align-items: center; gap: 1rem;
    margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid #f3f4f6;
    flex-wrap: wrap;
}
.rc-hint { font-size: 0.79rem; color: #9ca3af; display: inline-flex; align-items: center; gap: 0.3rem; }

/* ═══════════════════════════════════════════════════════════════════════
   ManualPromotion — mp-* namespace
═══════════════════════════════════════════════════════════════════════ */
.mp-page { display: flex; flex-direction: column; gap: 1.25rem; }

.mp-hero {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.4rem;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a; border-radius: 14px;
}
.mp-hero-left { display: flex; align-items: flex-start; gap: 0.75rem; }
.mp-hero-icon {
    width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
    background: #f59e0b; color: #fff; font-size: 1.25rem;
    display: flex; align-items: center; justify-content: center;
}
.mp-hero-title { font-size: 1.05rem; font-weight: 700; color: #1f2937; margin-bottom: 0.15rem; }
.mp-hero-sub { font-size: 0.81rem; color: #92400e; }
.mp-back-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 1rem; font-size: 0.82rem; font-weight: 500;
    background: #fff; border: 1px solid #d1d5db; border-radius: 8px;
    color: #374151; text-decoration: none; white-space: nowrap;
    transition: background 0.15s;
}
.mp-back-btn:hover { background: #f9fafb; color: #111827; }

.mp-filter-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 1.25rem 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mp-filter-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.mp-filter-group { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 180px; min-width: 150px; }
.mp-filter-label {
    font-size: 0.76rem; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.mp-filter-label small { font-size: 0.7rem; font-weight: 400; text-transform: none; color: #9ca3af; }
.mp-select {
    height: 38px; padding: 0 2rem 0 0.75rem;
    border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.875rem;
    color: #374151; background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.6rem center;
    transition: border-color 0.15s;
}
.mp-select:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.mp-search-wrap { position: relative; display: flex; align-items: center; }
.mp-search-icon { position: absolute; left: 0.65rem; color: #9ca3af; font-size: 0.85rem; pointer-events: none; }
.mp-search-input {
    width: 100%; height: 38px; padding: 0 0.75rem 0 2rem;
    border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 0.875rem; color: #374151; transition: border-color 0.15s;
}
.mp-search-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.mp-filter-actions { display: flex; gap: 0.5rem; align-items: flex-end; flex-shrink: 0; }
.mp-search-btn {
    height: 38px; padding: 0 1.1rem; background: #4f46e5; color: #fff;
    border: none; border-radius: 8px; font-size: 0.875rem; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
    transition: background 0.15s;
}
.mp-search-btn:hover:not(:disabled) { background: #4338ca; }
.mp-search-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.mp-clear-btn {
    height: 38px; padding: 0 1rem; background: #fff; color: #6b7280;
    border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.875rem;
    cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
    transition: background 0.15s;
}
.mp-clear-btn:hover:not(:disabled) { background: #f3f4f6; }

.mp-success-state {
    display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
    padding: 3rem 1rem; background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 14px; text-align: center;
}
.mp-success-icon { font-size: 2.5rem; color: #16a34a; }
.mp-success-title { font-size: 0.95rem; font-weight: 600; color: #166534; }

.mp-results-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mp-results-hd {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 0.5rem;
    padding: 0.85rem 1.25rem; border-bottom: 1px solid #f3f4f6;
}
.mp-results-count { display: flex; align-items: center; gap: 0.45rem; font-size: 0.875rem; font-weight: 600; color: #374151; }
.mp-warn-icon { color: #f59e0b; }
.mp-target-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.22rem 0.65rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
    background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8;
}
.mp-table-wrap { overflow-x: auto; }
.mp-table { width: 100%; border-collapse: collapse; font-size: 0.845rem; }
.mp-table thead tr { background: #f9fafb; border-bottom: 2px solid #e5e7eb; }
.mp-table th {
    padding: 0.65rem 1rem; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; white-space: nowrap;
}
.mp-table td { padding: 0.7rem 1rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; color: #374151; }
.mp-table tr:last-child td { border-bottom: none; }
.mp-table tr:hover td { background: #fafafa; }
.mp-td-name { font-weight: 600; color: #111827; }
.mp-td-uid  { font-size: 0.8rem; color: #9ca3af; font-family: monospace; }
.mp-year-badge {
    display: inline-block; padding: 0.2rem 0.55rem; border-radius: 5px;
    font-size: 0.76rem; font-weight: 500; background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb;
}
.mp-unpaid { font-weight: 700; color: #dc2626; }
.mp-btn-group { display: flex; gap: 0.4rem; justify-content: center; align-items: center; }
.mp-view-btn {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.3rem 0.65rem; border-radius: 7px; font-size: 0.78rem; font-weight: 500;
    border: 1px solid #d1d5db; background: #fff; color: #374151;
    text-decoration: none; transition: background 0.15s;
}
.mp-view-btn:hover { background: #f3f4f6; color: #111827; }
.mp-promote-btn {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.3rem 0.75rem; border-radius: 7px; font-size: 0.78rem; font-weight: 600;
    border: none; cursor: pointer; white-space: nowrap; transition: opacity 0.15s;
}
.mp-promote-btn--promote { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.mp-promote-btn--promote:hover:not(:disabled) { background: #fde68a; }
.mp-promote-btn--graduate { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.mp-promote-btn--graduate:hover:not(:disabled) { background: #bbf7d0; }
.mp-promote-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.mp-mob-wrap { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.6rem; background: #f9fafb; }
.mp-mob-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.mp-mob-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.mp-mob-name { font-weight: 700; font-size: 0.95rem; color: #111827; }
.mp-mob-uid  { font-size: 0.78rem; color: #9ca3af; }
.mp-mob-amount { text-align: right; }
.mp-mob-unpaid { font-size: 1rem; font-weight: 700; color: #dc2626; }
.mp-mob-year   { font-size: 0.72rem; color: #6b7280; margin-top: 0.1rem; }
.mp-mob-divider { height: 1px; background: #f3f4f6; }
.mp-mob-meta   { font-size: 0.8rem; color: #6b7280; }
.mp-mob-actions { display: flex; gap: 0.5rem; }
.mp-mob-btn {
    flex: 1; padding: 0.45rem 0.5rem; border-radius: 8px;
    font-size: 0.82rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    transition: opacity 0.15s;
}
.mp-mob-btn--view     { background: #fff; color: #374151; border: 1px solid #d1d5db; text-decoration: none; }
.mp-mob-btn--view:hover { background: #f3f4f6; color: #111827; }
.mp-mob-btn--promote  { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.mp-mob-btn--graduate { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.mp-mob-btn:disabled  { opacity: 0.45; cursor: not-allowed; }

.mp-pager {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.75rem;
    padding: 0.8rem 1.25rem; border-top: 1px solid #f3f4f6; background: #fff;
}
.mp-pager-size { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: #6b7280; }
.mp-pager-select { padding: 0.25rem 1.8rem 0.25rem 0.5rem; font-size: 0.8rem; border: 1px solid #d1d5db; border-radius: 6px; }
.mp-pager-nav { display: flex; align-items: center; gap: 0.4rem; }
.mp-pager-btn {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    border: 1px solid #e5e7eb; border-radius: 7px; background: #fff;
    font-size: 0.9rem; cursor: pointer; color: #374151; transition: background 0.15s;
}
.mp-pager-btn:hover:not(:disabled) { background: #f3f4f6; border-color: #9ca3af; }
.mp-pager-btn:disabled { color: #d1d5db; cursor: not-allowed; }
.mp-pager-info  { font-size: 0.825rem; font-weight: 600; color: #374151; padding: 0 0.3rem; }
.mp-pager-count { font-size: 0.78rem; color: #9ca3af; }

@media (max-width: 768px) {
    .mp-hero { flex-direction: column; }
    .mp-filter-row { flex-direction: column; }
    .mp-filter-group { min-width: unset; width: 100%; }
    .mp-filter-actions { width: 100%; }
    .mp-search-btn, .mp-clear-btn { flex: 1; justify-content: center; }
    .mp-pager { flex-direction: column; align-items: center; }
}

/* ═══════════════════════════════════════════════════════════════════════
   UserManage — um-* namespace
═══════════════════════════════════════════════════════════════════════ */
.um-page { display: flex; flex-direction: column; gap: 1.25rem; }

.um-header {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
    padding: 1rem 1.4rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd; border-radius: 14px;
}
.um-header-left { display: flex; align-items: center; gap: 0.75rem; }
.um-header-icon {
    width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
    background: #0284c7; color: #fff; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
}
.um-header-title { font-size: 1rem; font-weight: 700; color: #0c4a6e; }
.um-header-sub   { font-size: 0.79rem; color: #0369a1; margin-top: 0.1rem; }
.um-count-badge {
    padding: 0.28rem 0.8rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600;
    background: #fff; border: 1px solid #bae6fd; color: #0369a1;
}
.um-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.um-loading {
    display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
    padding: 4rem 1rem; color: #9ca3af; font-size: 0.9rem;
}
.um-table-wrap { overflow-x: auto; }
.um-table { width: 100%; border-collapse: collapse; font-size: 0.845rem; }
.um-table thead tr { background: #f9fafb; border-bottom: 2px solid #e5e7eb; }
.um-table th {
    padding: 0.65rem 1.1rem; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; white-space: nowrap;
}
.um-table td { padding: 0.8rem 1.1rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.um-table tr:last-child td { border-bottom: none; }
.um-table tr:hover td { background: #fafafa; }
.um-td-name  { font-weight: 700; color: #111827; }
.um-td-email { color: #6b7280; font-size: 0.845rem; }
.um-td-actions { text-align: right; white-space: nowrap; }
.um-role-select {
    height: 34px; padding: 0 1.8rem 0 0.65rem; min-width: 140px;
    border: 1px solid #d1d5db; border-radius: 7px; font-size: 0.835rem; color: #374151; background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.5rem center;
    transition: border-color 0.15s;
}
.um-role-select:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.um-role-select:disabled { background-color: #f9fafb; color: #9ca3af; cursor: not-allowed; }
.um-protected-chip {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.22rem 0.65rem; border-radius: 20px; font-size: 0.73rem; font-weight: 600;
    background: #fef9c3; border: 1px solid #fde047; color: #713f12;
}
.um-action-btn {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.3rem 0.65rem; border-radius: 7px;
    font-size: 0.78rem; font-weight: 500; border: none; cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
}
.um-action-btn--save   { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.um-action-btn--save:hover:not(:disabled)   { background: #dcfce7; }
.um-action-btn--delete { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; margin-left: 0.4rem; }
.um-action-btn--delete:hover:not(:disabled) { background: #fee2e2; }
.um-action-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.um-mob-wrap { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.6rem; background: #f9fafb; }
.um-mob-card { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.um-mob-accent { height: 4px; }
.um-mob-accent--admin { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.um-mob-accent--user  { background: linear-gradient(90deg, #6366f1, #818cf8); }
.um-mob-body { padding: 0.9rem 1rem; }
.um-mob-top  { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.2rem; }
.um-mob-name { font-weight: 700; font-size: 0.95rem; color: #111827; }
.um-mob-email { font-size: 0.79rem; color: #9ca3af; margin-bottom: 0.75rem; }
.um-mob-role-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #9ca3af; margin-bottom: 0.3rem; }
.um-mob-role-row { margin-bottom: 0.75rem; }
.um-mob-actions { display: flex; gap: 0.5rem; }
.um-mob-btn {
    flex: 1; padding: 0.45rem 0.5rem; border-radius: 8px;
    font-size: 0.82rem; font-weight: 600; border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    transition: opacity 0.15s;
}
.um-mob-btn--save   { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.um-mob-btn--save:hover:not(:disabled)   { background: #dcfce7; }
.um-mob-btn--delete { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.um-mob-btn--delete:hover:not(:disabled) { background: #fee2e2; }
.um-mob-btn:disabled { opacity: 0.35; cursor: not-allowed; }

@media (max-width: 768px) {
    .um-header { flex-direction: column; align-items: flex-start; }
}
