/**
 * app-dynamic.css — CSS classes extracted from JS-generated HTML.
 * Replaces inline style= attributes across all JS modules.
 */

/* ═══════════════════════════════════════════════════════════════
   TABLE — Class listing (courses / conditional)
═══════════════════════════════════════════════════════════════ */

.j-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.j-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

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

.j-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--secondary-color);
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}

.j-table th.text-center,
.j-table td.text-center {
    text-align: center;
}

.j-table td {
    padding: 16px;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color);
}

.j-table-col-stt {
    width: 60px;
    text-align: center;
}

.j-table-col-class {
    width: 200px;
    text-align: center;
}

.j-table-col-status {
    width: 140px;
    text-align: center;
}

.j-table-col-seats {
    width: 80px;
    text-align: center;
}

.j-table-col-schedule {
    width: 450px;
    min-width: 450px;
    max-width: 450px;
}

.j-table-col-action {
    width: 120px;
    text-align: center;
}

/* course cell details */
.j-cls-code {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 15px;
}

.j-cls-name {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-top: 4px;
}

.j-cls-type {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 4px;
}

.j-cls-tc {
    font-size: 11px;
    margin-top: 4px;
    display: inline-block;
    padding: 2px 6px;
    background: #f1f5f9;
    border-radius: 4px;
}

.j-cls-fee {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 600;
    color: #475569;
}

.j-cls-percent {
    font-weight: 700;
    font-size: 14px;
}

.j-cls-warn {
    color: var(--danger-color);
    font-size: 11px;
    margin-top: 6px;
    font-weight: 500;
}

/* status badge — three states */
.j-status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
}

.j-status-open {
    background: #dcfce7;
    color: #059669;
}

.j-status-full {
    background: #fee2e2;
    color: #dc2626;
}

.j-status-warn {
    background: #fef3c7;
    color: #d97706;
}

/* schedule loading placeholder inside cell */
.j-sched-loading-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    font-size: 13px;
}

/* note / warning pill */
.j-note-pill {
    margin-top: 8px;
    font-size: 12px;
    background: #fffbeb;
    color: #b45309;
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}

/* action column */
.j-action-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.j-action-col .btn {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
}

.j-action-col .btn.disabled,
.j-btn-dim {
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════
   SCHEDULE ITEM CARDS (class detail list)
═══════════════════════════════════════════════════════════════ */

.j-sched-item {
    border: none;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.j-sched-item.online {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.j-sched-item.offline {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.j-sched-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.j-sched-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.j-sched-day {
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.j-sched-item.online .j-sched-day {
    background: #10b981;
}

.j-sched-item.offline .j-sched-day {
    background: #3b82f6;
}

.j-sched-tiet {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
}

.j-sched-type-badge {
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.j-sched-item.online .j-sched-type-badge {
    background: #059669;
}

.j-sched-item.offline .j-sched-type-badge {
    background: #2563eb;
}

.j-sched-room {
    background: white;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.j-sched-item.online .j-sched-room {
    border: 1px solid #a7f3d0;
}

.j-sched-item.offline .j-sched-room {
    border: 1px solid #bfdbfe;
}

.j-sched-room-inner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.j-sched-room-name {
    font-weight: 600;
    font-size: 13px;
}

.j-sched-item.online .j-sched-room-name {
    color: #059669;
}

.j-sched-item.offline .j-sched-room-name {
    color: #1e293b;
}

.j-sched-room-loc {
    font-size: 12px;
    margin-top: 2px;
    font-weight: 500;
}

.j-sched-item.online .j-sched-room-loc {
    color: #10b981;
}

.j-sched-item.offline .j-sched-room-loc {
    color: #64748b;
}

.j-sched-icon-online {
    color: #059669;
    margin-top: 3px;
}

.j-sched-icon-offline {
    margin-top: 0;
}

.j-sched-dates {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 10px;
    border-radius: 6px;
}

.j-sched-dates span {
    font-weight: 500;
}

.j-sched-dates-sep {
    color: #94a3b8;
    font-size: 12px;
    margin: 0 4px;
}

.j-sched-note-pill {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 8px;
    color: #92400e;
    line-height: 1.5;
    word-break: break-word;
}

.j-sched-note-pill i {
    color: #f59e0b;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Loading / Error / Empty boxes */
.j-load-box {
    text-align: center;
    padding: 40px 20px;
}

.j-load-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.j-load-text {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.j-err-box {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: 10px;
    border: 2px solid #fca5a5;
}

.j-err-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.j-err-text {
    font-size: 14px;
    color: #dc2626;
    font-weight: 600;
}

.j-no-sched {
    font-style: italic;
    color: #94a3b8;
    font-size: 13px;
}

.j-sched-list-wrap {
    padding: 0;
}

/* ═══════════════════════════════════════════════════════════════
   REGISTERED COURSES TABLE (core.js)
═══════════════════════════════════════════════════════════════ */

.j-reg-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.j-reg-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1000px;
    font-size: 14px;
}

.j-reg-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 12px 14px;
    color: #475569;
    font-weight: 600;
}

.j-reg-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.j-reg-table tbody tr {
    transition: background 0.2s;
}

.j-reg-table tbody tr.even {
    background: #f8fafc;
}

.j-reg-table tbody tr.odd {
    background: white;
}

.j-reg-table tbody tr:hover {
    background: #f1f5f9 !important;
}

.j-type-badge-dk {
    background: #fee2e2;
    color: #dc2626;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 6px;
    border: 1px solid #fca5a5;
}

.j-fee-paid {
    color: #059669;
    font-size: 11px;
}

.j-fee-unpaid {
    color: #dc2626;
    font-size: 11px;
}

.j-fee-amount {
    font-weight: 600;
    color: #0f172a;
}

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

.j-reg-date {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.j-reg-status {
    font-size: 12px;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
}

.j-reg-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.j-reg-btn-cal {
    background: white;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Schedule modal table (core.js viewSchedule) */
.j-sch-modal-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(75vh - 130px);
}

.j-sch-modal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    margin-bottom: 40px;
}

.j-sch-modal-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
}

.j-sch-modal-table thead tr {
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 50%, #1d4ed8 100%);
}

.j-sch-modal-table thead tr:hover {
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 50%, #1d4ed8 100%) !important;
}

.j-sch-modal-table thead th {
    padding: 12px 16px;
    color: rgba(255, 255, 255, .92);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    text-align: left;
    white-space: nowrap;
    border: none;
}

.j-sch-modal-table thead th:first-child {
    text-align: center;
    width: 48px;
}

.j-sch-modal-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}

.j-sch-modal-table tbody tr:last-child {
    border-bottom: none;
}

.j-sch-modal-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.j-sch-modal-table tbody tr:hover {
    background: #dbeafe !important;
}

.j-sch-modal-td {
    padding: 12px 16px;
    vertical-align: middle;
    color: #1e293b;
}

.j-day-circle {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    margin: 0 auto;
    box-shadow: 0 3px 8px rgba(67, 56, 202, .35);
    letter-spacing: -.5px;
}

.j-sch-room-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
}

.j-sch-room-name.online {
    color: #059669;
    display: flex; align-items: center; gap: 6px;
}

.j-sch-room-name.online::before {
    content: '';
    width: 7px; height: 7px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px #d1fae5;
    flex-shrink: 0;
}

.j-sch-room-sub {
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 3px;
}

.j-sch-type-chip {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #eef2ff, #dbeafe);
    color: #1e40af;
    padding: 4px 11px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    border: 1.5px solid #bfdbfe;
    white-space: nowrap;
    letter-spacing: .3px;
    box-shadow: 0 1px 3px rgba(99,102,241,.15);
}

.j-sch-range {
    font-size: 12px;
    color: #475569;
    white-space: nowrap;
    font-weight: 500;
}

.j-cls-note {
    margin-top: 3px;
    font-size: 11px;
    color: #b45309;
    background: #fffbeb;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════
   CONFLICT MODAL (registration.js)
═══════════════════════════════════════════════════════════════ */

.j-conflict-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.j-conflict-dialog {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.j-conflict-header {
    padding: 24px;
    border-bottom: 2px solid #e5e7eb;
}

.j-conflict-title {
    margin: 0;
    color: var(--danger-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.j-conflict-body {
    overflow: hidden;
    padding: 0;
}

.j-conflict-table-wrap {
    overflow-y: auto;
    max-height: calc(90vh - 200px);
    margin: 16px 24px 0;
}

.j-conflict-alert {
    margin-bottom: 16px;
    padding: 12px;
    background: #fee2e2;
    border-left: 4px solid var(--danger-color);
    border-radius: 8px;
}

.j-conflict-alert p {
    color: var(--danger-color);
    font-weight: 600;
    margin: 0;
}

.j-conflict-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.j-conflict-table thead tr {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.j-conflict-table th {
    padding: 12px;
    border: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.j-conflict-table td {
    padding: 12px;
    border: 1px solid #ddd;
}

.j-conflict-table tbody tr.even {
    background: #f9fafb;
}

.j-conflict-table tbody tr.odd {
    background: #fff;
}

.j-conflict-day {
    text-align: center;
    color: var(--danger-color);
    font-weight: 500;
}

.j-conflict-notice {
    margin-top: 16px;
    padding: 12px;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
}

.j-conflict-notice p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
}

.j-conflict-footer {
    padding: 16px 24px;
    border-top: 2px solid #e5e7eb;
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════
   AUTO REGISTER (auto.js)
═══════════════════════════════════════════════════════════════ */

.j-badge-conditional {
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}

.j-badge-normal {
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE (profile.js)
═══════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.j-profile-hero {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 28px;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.j-profile-cover {
    height: 160px;
    background: linear-gradient(135deg, #2563eb 0%, #5b8ff6 50%, #558bf7 100%);
    position: relative;
    overflow: hidden;
}

.j-profile-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 60L60 0H30L0 30M60 60V30L30 60' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.j-profile-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.18));
}

.j-profile-body {
    padding: 0 32px 32px;
    text-align: center;
    margin-top: -70px;
    position: relative;
    z-index: 10;
}

/* Avatar */
.j-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    display: block;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
    border: 5px solid white;
    background: white;
}

.j-avatar-fallback {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #558bf7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 58px;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
    border: 5px solid white;
}

.j-profile-name-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.j-profile-name {
    font-size: 28px;
    font-weight: 800;
    margin: 14px 0 0;
    color: #0f172a;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* Badges */
.j-profile-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 14px 0 0;
    flex-wrap: wrap;
}

.j-profile-badge-id {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #475569;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
}

.j-profile-badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
}

.j-profile-badge-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
}

/* Stats bar */
.j-profile-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-top: 20px;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    flex-wrap: wrap;
}

.j-stat-box {
    text-align: center;
    padding: 10px 28px;
    border-right: 1px solid #f1f5f9;
    min-width: 120px;
}

.j-stat-box:last-child {
    border-right: none;
}

.j-stat-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.j-stat-value {
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
}

/* ── Grid ── */
.j-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
}

/* ── Cards ── */
.j-profile-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.25s, transform 0.25s;
}

.j-profile-card:hover,
.j-card-hover {
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.12);
    transform: translateY(-3px);
}

.j-profile-card-full {
    grid-column: 1 / -1;
}

/* Sub-section inside card */
.j-card-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
}

/* Card header */
.j-card-hdr {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.j-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    background-color: var(--icon-bg, #f1f5f9);
    color: var(--icon-color, #2563eb);
    flex-shrink: 0;
}

.j-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* ── Rows ── */
.j-prow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s, padding 0.15s, margin 0.15s, border-radius 0.15s;
    gap: 8px;
}

.j-prow:last-child {
    border-bottom: none;
}

.j-prow:hover,
.j-prow-hover {
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 10px;
    margin: 0 -10px;
    border-bottom-color: transparent;
}

.j-prow-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 500;
    flex-shrink: 0;
}

.j-prow-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 12px;
    flex-shrink: 0;
}

.j-prow-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 13.5px;
    text-align: right;
    word-break: break-word;
}

.j-prow-value-right {
    text-align: right;
    max-width: 55%;
}

/* Address rows */
.j-prow-addr {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s, padding 0.15s, margin 0.15s, border-radius 0.15s;
}

.j-prow-addr:last-child {
    border-bottom: none;
}

.j-prow-addr:hover,
.j-prow-addr.j-prow-hover {
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 10px;
    margin: 0 -10px;
    border-bottom-color: transparent;
}

.j-prow-addr-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 13.5px;
    line-height: 1.5;
    padding-left: 38px;
}

/* ── Family ── */
.j-family-card {
    padding: 16px;
    background: #f8fafc;
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.j-family-card:hover {
    background: #f1f5f9;
}

.j-family-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.j-family-name {
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
}

.j-family-rel {
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.j-family-dob {
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.j-family-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 13px;
    color: #475569;
}

.j-family-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.j-family-icon {
    color: #94a3b8;
    font-size: 12px;
}

/* ── Misc ── */
.j-profile-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.j-col-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    column-gap: 32px;
}

.j-err-inline {
    color: var(--danger-color);
    padding: 12px;
    background: #fee2e2;
    border-radius: 8px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .j-profile-body {
        padding: 0 16px 24px;
    }

    .j-profile-name {
        font-size: 22px;
    }

    .j-profile-cover {
        height: 120px;
    }

    .j-stat-box {
        padding: 8px 16px;
        min-width: 90px;
    }

    .j-profile-grid {
        grid-template-columns: 1fr;
    }

    .j-profile-card {
        padding: 18px 16px;
    }

    .j-profile-stats {
        gap: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS.JS — navbar / sidebar / modals
═══════════════════════════════════════════════════════════════ */

.j-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, .55);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.j-modal-dialog {
    background: white;
    border-radius: 24px;
    max-width: 820px;
    width: 94%;
    max-height: 75vh;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15,23,42,.22), 0 4px 16px rgba(79,70,229,.12);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn .22s ease-out;
}

.j-modal-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 55%, #2563eb 100%);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: none;
    border-radius: 24px 24px 0 0;
}

.j-modal-title {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.j-modal-title i {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.18);
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.j-modal-close-btn {
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.28);
    border-radius: 10px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    flex-shrink: 0;
    padding: 0;
    margin-left: 12px;
}

.j-modal-close-btn:hover {
    background: rgba(255,255,255,0.32);
    color: #fff;
}

.j-modal-footer {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 55%, #2563eb 100%);
    padding: 14px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    border-radius: 0 0 24px 24px;
}

.j-modal-footer-close-btn {
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.95);
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background .2s;
}

.j-modal-footer-close-btn:hover {
    background: rgba(255,255,255,0.32);
    color: #fff;
}

.j-modal-body {
    overflow: visible;
    padding: 0;
    flex: 1;
    min-height: 0;
}

.j-modal-body .loading,
.j-modal-body .info,
.j-modal-body .error {
    padding: 28px 20px;
    text-align: center;
    font-size: 13px;
}

.j-confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.j-confirm-dialog {
    background: white;
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

.j-confirm-header {
    padding: 28px 32px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc 0%, white 100%);
}

.j-confirm-title {
    margin: 0;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.j-confirm-body {
    padding: 28px 32px;
}

.j-confirm-msg {
    margin: 0;
    color: var(--dark-text);
    font-size: 15px;
    line-height: 1.6;
}

.j-confirm-footer {
    padding: 20px 32px 28px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.j-confirm-cancel {
    padding: 12px 28px;
    background: #e2e8f0;
    color: var(--dark-text);
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

.j-confirm-ok {
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 10px;
}

.j-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* navbar */
.j-navbar-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.j-navbar-logo-box {
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.j-navbar-logo-box i {
    color: var(--primary-color);
    font-size: 20px;
}

.j-navbar-user {
    cursor: pointer;
    position: relative;
    padding-right: 32px;
}

.j-navbar-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--secondary-color);
}

.j-user-details {
    padding-right: 8px;
}

/* sidebar */
.j-sidebar-menu-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding-left: 24px;
}

.j-sidebar-arrow {
    transition: transform 0.3s;
    width: auto;
}

.j-sidebar-flex1 {
    flex: 1;
}

.ai-sidebar-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #6c63ff, #4338ca);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    margin-left: 4px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.j-sidebar-profile-wrap {
    padding: 12px 16px;
    background: var(--light-bg);
    border-radius: 8px;
    margin: 0 8px 8px;
}

.j-sidebar-profile-name {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.j-sidebar-profile-item {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.j-sidebar-icon-w {
    width: 16px;
}

.j-sidebar-step-list {
    padding-left: 20px;
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   SCHEDULE.JS — card extras
═══════════════════════════════════════════════════════════════ */

.j-sc-stop-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 700;
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.j-sc-note {
    margin-top: 6px;
    color: #b45309;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    gap: 6px;
}

.j-sc-note i {
    margin-top: 2px;
}

.j-sc-outline {
    margin-top: 6px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    gap: 6px;
}

.j-sc-outline i {
    margin-top: 2px;
}

.j-sc-link {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.j-sc-link i {
    margin-top: 2px;
    color: #dc2626;
}

.j-sc-link a {
    color: #dc2626;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s;
}

.j-sc-link a:hover {
    color: #b91c1c;
}

.j-sc-lhp-sub {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 4px;
    text-decoration: none;
}

.j-sc-paused {
    text-decoration: line-through;
}

/* schedule card paused state */
.j-sc-card-paused {
    opacity: 0.8;
}

.j-sc-empty-day {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-style: italic;
    font-size: 13px;
    padding: 20px 0;
}

.j-sc-online-icon {
    color: #10b981;
}

.j-sc-link-icon {
    color: #2563eb;
    margin-top: 2px;
}

/* s-title padding-right when paused (to not overlap stop badge) */
.s-title.j-sc-paused {
    padding-right: 70px;
}

/* schedule card color themes (8 colours + 1 paused) */
.j-sc-theme-0 {
    --sc-border: #3b82f6;
    --sc-bg: #eff6ff;
    --sc-text: #1d4ed8;
}

.j-sc-theme-1 {
    --sc-border: #10b981;
    --sc-bg: #ecfdf5;
    --sc-text: #047857;
}

.j-sc-theme-2 {
    --sc-border: #f59e0b;
    --sc-bg: #fffbeb;
    --sc-text: #b45309;
}

.j-sc-theme-3 {
    --sc-border: #ec4899;
    --sc-bg: #fdf2f8;
    --sc-text: #be185d;
}

.j-sc-theme-4 {
    --sc-border: #5b8ff6;
    --sc-bg: #f3f7ff;
    --sc-text: #1d4ed8;
}

.j-sc-theme-5 {
    --sc-border: #14b8a6;
    --sc-bg: #f0fdfa;
    --sc-text: #0f766e;
}

.j-sc-theme-6 {
    --sc-border: #f97316;
    --sc-bg: #fff7ed;
    --sc-text: #c2410c;
}

.j-sc-theme-7 {
    --sc-border: #06b6d4;
    --sc-bg: #ecfeff;
    --sc-text: #0369a1;
}

.j-sc-theme-paused {
    --sc-border: #94a3b8;
    --sc-bg: #f8fafc;
    --sc-text: #64748b;
}

/* ═══════════════════════════════════════════════════════════════
   SCHEDULE ITEM — room / daynha / no-room / arrow extras
═══════════════════════════════════════════════════════════════ */
.j-sched-room-icon {
    font-size: 14px;
    margin-top: 3px;
    flex-shrink: 0;
    color: #64748b;
}

.j-sched-room-icon.online {
    color: #059669;
}

.j-sched-room-daynha {
    font-size: 11px;
    color: #64748b;
    margin-top: 1px;
    font-weight: 500;
}

.j-sched-room-daynha.online {
    color: #10b981;
}

.j-sched-no-room {
    color: #f97316;
}

.j-sched-arrow {
    color: #94a3b8;
    font-size: 10px;
    margin: 0 2px;
}

/* ═══════════════════════════════════════════════════════════════
   TABLE CELL UTILITIES  (registration.js / core.js)
═══════════════════════════════════════════════════════════════ */
.j-td-center {
    text-align: center !important;
}

.j-td-right {
    text-align: right !important;
    vertical-align: middle !important;
}

.j-td-top {
    vertical-align: top !important;
}

.j-td-secondary {
    color: #64748b;
}

.j-td-primary-bold {
    font-weight: 600;
    color: var(--primary-color);
}

.j-td-class {
    vertical-align: middle;
    text-align: center;
}

.j-td-subject-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.j-td-subject-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.j-td-sched {
    width: 450px;
    min-width: 450px;
    max-width: 450px;
    vertical-align: top;
}

.j-table-row {
    transition: background 0.15s;
}

.j-table-row:nth-child(even) {
    background: #f8fafc;
}

.j-table-row:nth-child(odd) {
    background: white;
}

.j-table-row:hover {
    background: #f1f5f9 !important;
}

/* inline loading spinner for td */
.j-load-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary-color);
    font-size: 13px;
}

/* Portal-down retry indicator */
.j-load-retry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1.5px solid #fde68a;
    border-radius: 12px;
    color: #92400e;
    font-size: 13px;
    font-weight: 600;
    margin: 16px;
}
.j-load-retry i {
    font-size: 18px;
    color: #d97706;
    flex-shrink: 0;
}
.j-load-retry-count {
    color: #b45309;
    font-weight: 700;
}

/* misc cls- extras */
.j-cls-note {
    font-size: 11px;
    color: #d97706;
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   REGISTERED TABLE EXTRAS  (core.js)
═══════════════════════════════════════════════════════════════ */
.j-reg-total-tc {
    font-weight: 600;
    color: var(--primary-color);
}

.j-reg-total-fee {
    font-weight: 700;
    color: #dc2626;
}

.j-reg-status-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: #f1f5f9;
    color: #475569;
}

.j-reg-btn-sched {
    background: white;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.j-reg-btn-sched:hover {
    background: #eff6ff;
}

.j-reg-btn-cancel {
    background: white;
    border: 1px solid #dc2626;
    color: #dc2626;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.j-reg-btn-cancel:hover {
    background: #fef2f2;
}

.j-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.j-reg-footer-count {
    padding: 10px 16px;
    color: #64748b;
    font-size: 13px;
    text-align: right;
}

/* Deadline cell — "Hạn nộp HP" */
.j-rt-col-deadline {
    width: 110px;
    text-align: center;
}

.j-deadline-plain {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    line-height: 1.5;
}

.j-deadline-plain small {
    font-size: 10px;
    color: #94a3b8;
}

/* registration table action button */
.j-reg-btn-dk {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.j-reg-btn-dk:hover {
    background: var(--primary-dark, #4338ca);
}

/* ═══════════════════════════════════════════════════════════════
   REGISTERED COURSES V2 — Enterprise Design (core.js)
═══════════════════════════════════════════════════════════════ */

/* ── Stats bar ────────────────────────────────────────────────────────────────── */
.jrv2-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.jrv2-stat-card {
    background: white;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    border: 1px solid #f0f4fa;
    transition: box-shadow .15s;
}
.jrv2-stat-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.10); }
.jrv2-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.jrv2-stat-icon--purple { background: #f3f7ff; color: #2563eb; }
.jrv2-stat-icon--blue   { background: #eff6ff; color: #3b82f6; }
.jrv2-stat-icon--amber  { background: #fffbeb; color: #d97706; }
.jrv2-stat-icon--green  { background: #f0fdf4; color: #16a34a; }
.jrv2-stat-label {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 5px;
}
.jrv2-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}
.jrv2-stat-value--purple { color: #2563eb; }
.jrv2-stat-value--blue   { color: #3b82f6; }
.jrv2-stat-value--red    { color: #dc2626; font-size: 18px; }
.jrv2-stat-value--green  { color: #16a34a; }

/* ── Table container ────────────────────────────────────────────────────────── */
.jrv2-wrap {
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    border: 1px solid #e8edf5;
    overflow: hidden;
}
.jrv2-table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 360px);
}
.jrv2-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}

/* ── Header ──────────────────────────────────────────────────────────────────── */
.jrv2-thead { position: sticky; top: 0; z-index: 10; }
.jrv2-thead tr {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}
.jrv2-thead tr:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
}
.jrv2-th {
    padding: 13px 14px;
    color: rgba(255,255,255,.92);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    border: none;
}

/* ── Rows ────────────────────────────────────────────────────────────────────── */
.jrv2-tr { border-bottom: 1px solid #f1f5f9; transition: background .12s; }
.jrv2-tr:last-child { border-bottom: none; }
.jrv2-tr:nth-child(even) { background: #fafbff; }
.jrv2-tr:hover { background: #f0f2ff !important; }
.jrv2-td { padding: 13px 14px; vertical-align: middle; color: #1e293b; }

/* Column types */
.jrv2-td-center { text-align: center; }
.jrv2-td-right  { text-align: right; }
.jrv2-td-stt  { width: 46px; text-align: center; color: #94a3b8; font-size: 12px; font-weight: 600; }
.jrv2-td-code { width: 130px; font-weight: 700; color: #1d4ed8; font-family: 'Courier New', monospace; font-size: 13px; }
.jrv2-td-tc   { width: 52px; text-align: center; font-weight: 800; color: #0f172a; font-size: 17px; }
.jrv2-td-lop  { width: 120px; font-size: 12px; color: #475569; font-weight: 600; }

/* Subject name */
.jrv2-subj-name { font-weight: 700; color: #0f172a; line-height: 1.4; margin-bottom: 3px; }
.jrv2-subj-meta { font-size: 11px; color: #94a3b8; }
.jrv2-subj-meta i { margin-right: 3px; }

/* Status chips */
.jrv2-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.3;
}
.jrv2-chip--gray   { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.jrv2-chip--blue   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.jrv2-chip--green  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.jrv2-chip--amber  { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.jrv2-chip--red    { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.jrv2-chip--purple { background: #f3f7ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* Type badge */
.jrv2-badge-dk {
    display: inline-block;
    background: #fee2e2;
    color: #dc2626;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .3px;
    margin-left: 6px;
    border: 1px solid #fca5a5;
    vertical-align: middle;
}

/* Fee */
.jrv2-fee-amount {
    font-weight: 800;
    color: #0f172a;
    font-size: 14px;
    white-space: nowrap;
}

/* Deadline */
.jrv2-deadline { font-size: 12px; font-weight: 600; color: #475569; }
.jrv2-deadline--urgent { color: #dc2626; }

/* Action buttons */
.jrv2-actions { display: flex; gap: 6px; justify-content: center; }
.jrv2-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all .15s;
}
.jrv2-btn--sched { background: #f0f2ff; color: #1d4ed8; }
.jrv2-btn--sched:hover { background: #1d4ed8; color: white; box-shadow: 0 2px 8px rgba(79,70,229,.3); }
.jrv2-btn--cancel { background: #fff1f2; color: #e11d48; }
.jrv2-btn--cancel:hover:not(:disabled) { background: #e11d48; color: white; box-shadow: 0 2px 8px rgba(225,29,72,.3); }
.jrv2-btn--cancel:disabled { opacity: .35; cursor: not-allowed; }

/* Footer */
.jrv2-footer {
    padding: 12px 18px;
    background: #f8fafc;
    border-top: 1px solid #e8edf5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.jrv2-footer-count { font-size: 12.5px; color: #64748b; font-weight: 500; }
.jrv2-footer-legend { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.jrv2-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #64748b; }

/* Empty state */
.jrv2-empty {
    padding: 60px 24px;
    text-align: center;
    color: #94a3b8;
}
.jrv2-empty i { font-size: 44px; margin-bottom: 14px; display: block; color: #cbd5e1; }
.jrv2-empty p { font-size: 14px; margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   CONFLICT TABLE EXTRAS  (registration.js)
═══════════════════════════════════════════════════════════════ */
.j-conflict-note {
    padding: 10px 24px 4px;
    font-size: 12px;
    color: #b45309;
    font-style: italic;
}

.j-conflict-td-bold {
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   AUTO REGISTER LIST OF COURSES  (auto.js displayAutoListCourses)
═══════════════════════════════════════════════════════════════ */
.j-alist-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
}

.j-alist-table {
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.j-alist-thead-row {
    background: #f8fafc;
}

.j-alist-th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 12px 14px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.j-alist-th-cb {
    text-align: center;
    width: 50px;
}

.j-alist-th-stt {
    text-align: center;
    width: 50px;
}

.j-alist-th-ma {
    text-align: left;
    width: 120px;
}

.j-alist-th-ten {
    text-align: left;
}

.j-alist-th-tc {
    text-align: center;
    width: 80px;
}

.j-alist-th-dk {
    text-align: left;
}

.j-alist-th-loai {
    text-align: center;
    width: 120px;
}

.j-alist-th-score {
    text-align: center;
    width: 100px;
}

.j-alist-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.j-alc-cb-disabled {
    cursor: not-allowed;
}

.j-alist-row {
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.2s;
}

.j-alist-row:nth-child(odd) {
    background: white;
}

.j-alist-row:nth-child(even) {
    background: #f8fafc;
}

.j-alist-row-selected {
    background: #eff6ff !important;
}

.j-alist-row-hover {
    background: #f1f5f9 !important;
}

.j-alist-row-selected.j-alist-row-hover {
    background: #eff6ff !important;
}

.j-alist-td-center {
    padding: 12px 14px;
    text-align: center;
    vertical-align: top;
}

.j-alist-td {
    padding: 12px 14px;
    vertical-align: top;
}

.j-alist-td-num {
    color: #64748b;
}

.j-alist-td-tc {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
}

.j-alist-td-dk {
    font-size: 13px;
    color: #475569;
}

.j-alist-code {
    font-weight: 600;
    color: var(--dark-text, #0f172a);
    font-size: 14px;
}

.j-alist-name {
    color: var(--dark-text, #0f172a);
    font-size: 14px;
    font-weight: 500;
}

.j-alist-note {
    font-size: 11px;
    color: #d97706;
    margin-top: 4px;
}

.j-alist-type-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.j-alist-type-bb {
    background: #fee2e2;
    color: #dc2626;
}

.j-alist-type-tc {
    background: #dcfce7;
    color: #059669;
}

.j-alist-th-diem {
    width: 72px;
    text-align: center;
}

.j-alist-diem-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: #f1f5f9;
    color: #334155;
}

.j-alist-score-pass {
    text-align: center;
    font-weight: 600;
    color: #059669;
}

.j-alist-score-fail {
    text-align: center;
    font-weight: 600;
    color: #dc2626;
}

.j-alist-footer {
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════
   AUTO REGISTER LIST OF CLASSES  (auto.js displayAutoListClasses)
═══════════════════════════════════════════════════════════════ */

/* ── Course group header row (replaces old card-block + purple-hdr) ── */
.j-alc-group-row {
    background: var(--bg-alt, #f3f7ff);
}

.j-alc-group-td {
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    border-top: 2px solid var(--border-color);
}

.j-alc-group-td:first-child:not(:only-child) {
    border-top: none;
}

.j-alc-group-row:first-child .j-alc-group-td {
    border-top: none;
}

.j-alc-group-hdr {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
}

.j-alc-group-icon {
    color: var(--primary-color);
    font-size: 15px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.j-alc-group-code {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-color);
}

.j-alc-group-name {
    font-size: 13px;
    color: var(--secondary-color);
    font-weight: 500;
}

.j-alc-group-badge {
    margin-left: auto;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
}

.j-alc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

/* Schedule cell in alc-table needs border + padding (not covered by j-alc-td-* classes) */
.j-alc-table .j-td-sched {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.j-alc-table .j-td-sched .j-sched-item:last-child {
    margin-bottom: 0;
}

.j-alc-th {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 14px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--secondary-color);
    background: #f8fafc;
    text-align: center;
    white-space: nowrap;
}

.j-alc-th-cb {
    width: 50px;
}

.j-alc-th-stt {
    width: 60px;
}

.j-alc-th-class {
    width: 220px;
}

.j-alc-th-status {
    width: 140px;
}

.j-alc-th-seats {
    width: 90px;
}

.j-alc-th-sched {
    text-align: left;
    width: 450px;
    min-width: 450px;
    max-width: 450px;
}

.j-alc-row {
    transition: background 0.15s;
}

.j-alc-row:nth-child(odd) {
    background: #ffffff;
}

.j-alc-row:nth-child(even) {
    background: #fafafa;
}

.j-alc-row-hover {
    background: #f0f4ff !important;
}

.j-alc-td-center {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    vertical-align: top;
}

.j-alc-td-num {
    color: var(--secondary-color);
    font-weight: 500;
}

.j-alc-td-cb {
    width: 50px;
}

.j-alc-td-class {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    text-align: center;
}

.j-alc-td-status {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    vertical-align: top;
}

.j-alc-td-percent {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    vertical-align: top;
}

.j-alc-class-code {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
}

.j-alc-class-name {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-top: 4px;
}

.j-alc-warn {
    margin-top: 4px;
    font-size: 11px;
    color: var(--danger-color);
    font-weight: 600;
}

.j-alc-dk-link {
    margin-top: 4px;
    font-size: 11px;
    background: #fffbeb;
    color: #b45309;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.j-alc-percent {
    font-size: 16px;
    font-weight: 700;
}

.j-alc-percent-ok {
    color: #059669;
}

.j-alc-percent-warn {
    color: #d97706;
}

.j-alc-percent-full {
    color: #dc2626;
}

.j-alc-no-schedule {
    font-style: italic;
    color: #94a3b8;
    font-size: 12px;
}

.j-alc-no-class {
    padding: 20px;
    text-align: center;
    color: var(--secondary-color);
    font-style: italic;
    background: var(--light-bg);
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

/* sidebar bars icon / confirm icon */
.j-sidebar-bars-icon {
    font-size: 16px;
}

.j-confirm-icon {
    font-size: 24px;
}

.j-navbar-user {
    cursor: pointer;
    position: relative;
    padding-right: 32px;
}

/* ═══════════════════════════════════════════════════════════════
   PASS-2 ADDITIONS — remaining extracted inline styles
═══════════════════════════════════════════════════════════════ */

/* Profile sub-section spacing */
.j-card-section {
    margin-top: 32px;
}

.j-card-hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Table row highlight (added via classList.add) */
.j-table-row-hover {
    background: #f1f5f9 !important;
}

/* Generic td helpers */
.j-td-num {
    color: #64748b;
    font-weight: 500;
}

.j-td-sub {
    font-size: 12px;
}

.j-td-bold {
    font-weight: 600;
}

/* Registered-courses table sizing */
.j-reg-table-main {
    min-width: 1000px;
    font-size: 14px;
}

.j-reg-table-summary {
    margin-bottom: 20px;
}

/* Registered-courses table column widths */
.j-rt-col-stt {
    width: 50px;
    text-align: center;
}

.j-rt-col-lhp {
    width: 120px;
}

.j-rt-col-tc {
    width: 60px;
    text-align: center;
}

.j-rt-col-lop {
    width: 120px;
}

.j-rt-col-status {
    width: 140px;
    text-align: center;
}

.j-rt-col-fee {
    width: 120px;
    text-align: right;
}

.j-rt-col-action {
    width: 150px;
    text-align: center;
}

/* Sidebar menu link variants */
.j-sidebar-menu-no-pad {
    padding-left: 16px;
}

.j-sidebar-sub-icon {
    width: 14px;
    font-size: 12px;
    color: #94a3b8;
}

.j-sidebar-menu-sm {
    font-size: 14px;
    margin-bottom: 4px;
}

/* Action column header in alist tables */
.j-alist-th-action {
    text-align: center;
    width: 140px;
}

/* Auto register footer card (controls + list) */
.j-auto-footer-card {
    margin-top: 0;
    padding: 24px 32px;
}

/* ═══════════════════════════════════════════════════════════════
   VISIBILITY UTILITIES — replaces all style.display in JS/HTML
═══════════════════════════════════════════════════════════════ */
.j-hidden {
    display: none !important;
}

.j-modal-overlay.j-open {
    display: flex;
}

.j-confirm-overlay.j-open {
    display: flex;
}

/* Icon helpers */
.j-icon-primary {
    color: var(--primary-color);
}

/* Payment step 3 body padding */
.j-pstep3 {
    padding-top: 24px;
}

/* Loading state flex container */
.schedule-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--secondary-color);
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════
   KẾT QUẢ HỌC TẬP PAGE
═══════════════════════════════════════════════════════════════ */
.j-kq-header {
    margin-bottom: 0;
}

/* Sub-tab bar */
.j-kq-tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0 24px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.j-kq-tabs::-webkit-scrollbar {
    display: none;
}

.j-kq-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    color: var(--secondary-color);
    background: var(--light-bg);
    transition: all 0.2s;
}

.j-kq-tab:hover {
    color: var(--primary-color);
    background: #dbeafe;
}

.j-kq-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

/* Pane / loading */
.j-kq-pane {
    min-height: 120px;
}

.j-kq-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 40px 0;
    color: var(--secondary-color);
    font-size: 15px;
}

/* Summary bar (GPA) */
.j-kq-summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #dbeafe, #dbeafe);
    border-radius: 12px;
    padding: 16px 20px;
}

.j-kq-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 3px 0;
    border-bottom: 1px dashed #d5e3ff;
}

.j-kq-stat-label {
    font-size: 12px;
    color: var(--secondary-color);
    font-weight: 500;
    white-space: nowrap;
}

.j-kq-stat-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
}

/* Semester block */
.j-kq-semester-block {
    margin-bottom: 28px;
}

.j-kq-semester-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
    padding: 8px 14px;
    background: #dbeafe;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-color);
}

.j-kq-ky-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
    margin-top: 12px;
    padding: 12px 16px;
    background: #f5f8ff;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color, #2563eb);
    font-size: 13px;
}

.j-kq-ky-stats-title {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--primary-color, #2563eb);
    margin-bottom: 4px;
}

.j-kq-ky-stats strong {
    color: #1e293b;
}

/* Table */
.j-kq-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
}

.j-kq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.j-kq-table th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.j-kq-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.j-kq-table tbody tr:hover {
    background: #fafafa;
}

/* Pass/fail chip */
.j-kq-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.j-kq-chip.pass {
    background: #dcfce7;
    color: #15803d;
}

.j-kq-chip.fail {
    background: #fee2e2;
    color: #dc2626;
}

.j-kq-chip-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--purple, #2563eb);
    opacity: 0.85;
}

.j-kq-th-stt {
    width: 36px;
}

.j-td-nowrap {
    white-space: nowrap;
}

/* Info cards (dauvao) */
.j-kq-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.j-kq-card {
    flex: 1;
    min-width: 260px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
}

.j-kq-card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.j-kq-card-row:last-child {
    border-bottom: none;
}

.j-kq-card-key {
    font-size: 13px;
    color: var(--secondary-color);
    font-weight: 500;
}

.j-kq-card-val {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* JSON fallback */
.j-kq-json {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    font-size: 12px;
    overflow-x: auto;
}

/* ═══════════════════════════════════════════════════════════════
   CHƯƠNG TRÌNH KHUNG  (curriculum.js)
═══════════════════════════════════════════════════════════════ */

/* Hero header */
.j-ctk-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px 18px;
    background: linear-gradient(135deg, #1d4ed8 0%, #1d4ed8 100%);
    border-radius: 14px;
    margin-bottom: 24px;
    color: #fff;
}

.j-ctk-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.j-ctk-hero-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #fff;
}

.j-ctk-hero-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, .75);
    margin: 0;
}

/* Summary stats bar */
.j-ctk-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.j-ctk-summary-item {
    flex: 1 1 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    border-radius: 12px;
    background: #f5f8ff;
    border: 1px solid #d5e3ff;
}

.j-ctk-summary-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #2563eb;
}

.j-ctk-summary-val {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

/* Semester group */
.j-ctk-group {
    margin-bottom: 24px;
}

.j-ctk-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 16px;
    margin-bottom: 0;
    background: linear-gradient(90deg, #f3f7ff, #fff);
    border-left: 4px solid #2563eb;
    border-radius: 0 10px 0 0;
    border-top: 1px solid #dbeafe;
    border-right: 1px solid #dbeafe;
    font-size: 14px;
    font-weight: 700;
    color: #2052b6;
}

.j-ctk-hk-meta {
    margin-left: auto;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Table */
.j-ctk-table-wrap {
    overflow-x: auto;
    border: 1px solid #dbeafe;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

.j-ctk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.j-ctk-table th {
    background: #f5f8ff;
    color: #2052b6;
    font-weight: 600;
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid #dbeafe;
    white-space: nowrap;
    font-size: 13px;
}

.j-ctk-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f3f7ff;
    vertical-align: middle;
}

.j-ctk-table tbody tr:last-child td {
    border-bottom: none;
}

.j-ctk-table tbody tr:hover {
    background: #f5f8ff;
}

.j-ctk-dat {
    background: #f0fdf4;
}

.j-ctk-dat:hover {
    background: #dcfce7 !important;
}

/* Cell classes */
.j-ctk-stt {
    color: #b5cdfd;
    font-size: 12px;
    text-align: center;
}

.j-ctk-num {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.j-ctk-ma {
    white-space: nowrap;
    font-size: 12px;
    color: #1d4ed8;
    font-weight: 600;
    font-family: monospace;
}

.j-ctk-ten {
    min-width: 200px;
}

.j-ctk-ten-name {
    display: block;
    font-weight: 500;
}

.j-ctk-ma-hp {
    display: block;
    font-size: 11px;
    color: #60a5fa;
    font-family: monospace;
    margin-top: 1px;
}

.j-ctk-truoc {
    font-size: 11px;
    color: #94a3b8;
    font-family: monospace;
    line-height: 1.7;
}

.j-ctk-rel-lbl {
    font-weight: 700;
    color: #2563eb;
    font-family: sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* Column widths */
.j-ctk-col-stt {
    width: 42px;
    text-align: center;
}

.j-ctk-col-ma {
    width: 90px;
}

.j-ctk-col-num {
    width: 48px;
    text-align: center;
}

.j-ctk-col-loai {
    width: 100px;
}

/* Status icons */
.j-ctk-icon-ok {
    color: #16a34a;
}

.j-ctk-icon-no {
    color: #dc2626;
}

/* Badges */
.j-ctk-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.j-ctk-badge-bb {
    background: #dbeafe;
    color: #1d4ed8;
}

.j-ctk-badge-tc {
    background: #f1f5f9;
    color: #64748b;
}

.j-ctk-badge-ktbc {
    background: #fef3c7;
    color: #d97706;
    font-size: 11px;
    padding: 2px 7px;
}

.j-ctk-badge-nhom {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    padding: 2px 7px;
}

.j-ctk-col-nhom {
    width: 80px;
    text-align: center;
}

.j-ctk-col-tcnhom {
    width: 90px;
    text-align: center;
}

.j-ctk-nhom {
    text-align: center;
    vertical-align: middle;
}

.j-ctk-nhom-val {
    display: block;
    font-weight: 600;
    color: #0369a1;
    font-size: 12px;
}

.j-ctk-nhom-tc {
    display: block;
    font-size: 11px;
    color: #0284c7;
    margin-top: 2px;
}

/* Raw fallback */
.j-ctk-raw {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    font-size: 12px;
    overflow-x: auto;
}

/* Mobile */
@media (max-width: 600px) {
    .j-ctk-hero {
        padding: 16px;
        gap: 12px;
    }

    .j-ctk-hero-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .j-ctk-hero-title {
        font-size: 16px;
    }

    .j-ctk-summary-item {
        padding: 10px 8px;
    }

    .j-ctk-summary-val {
        font-size: 18px;
    }

    .j-ctk-group-title {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .j-ctk-hk-meta {
        flex-shrink: 0;
        gap: 4px;
    }

    .j-ctk-hk-meta .j-ctk-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD PAGE  (v9 — Professional Redesign)
═══════════════════════════════════════════════════════════════ */

/* ── Page background ─────────────────────────────────────── */
/* background now set globally in reset.css */

/* ── Page wrap ────────────────────────────────────────────── */
.dv2-wrap {
    margin: 0 32px 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ══════════════════════════════════════
   HERO PROFILE CARD
══════════════════════════════════════ */
.dv2-hero-card {
    background: #fff;
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 12px 40px rgba(15, 23, 42, .08);
    overflow: hidden;
    position: relative;
}

/* ── Cover strip ──────────────────────────────────────────── */
.dv2-cover {
    height: 115px;
    background: linear-gradient(118deg, #0f172a 0%, #2d2b7a 18%, #1e40af 38%, #1d4ed8 62%, #2563eb 82%, #3370ea 100%);
    position: relative;
    overflow: hidden;
}

/* Atmospheric glow layers */
.dv2-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 65% 50%, rgba(99, 102, 241, .2) 0%, transparent 44%),
        radial-gradient(ellipse at 8% 70%, rgba(255, 255, 255, .1) 0%, transparent 44%),
        radial-gradient(circle at 88% 18%, rgba(147, 51, 234, .3) 0%, transparent 36%),
        radial-gradient(ellipse at 50% 110%, rgba(79, 70, 229, .14) 0%, transparent 40%);
    pointer-events: none;
}

/* Geometric decoration: concentric rings (right) + wave bottom */
.dv2-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 115'%3E%3Ccircle cx='710' cy='57' r='110' fill='none' stroke='rgba(255%2C255%2C255%2C0.07)' stroke-width='1'/%3E%3Ccircle cx='710' cy='57' r='78' fill='none' stroke='rgba(255%2C255%2C255%2C0.08)' stroke-width='1'/%3E%3Ccircle cx='710' cy='57' r='46' fill='none' stroke='rgba(255%2C255%2C255%2C0.10)' stroke-width='1'/%3E%3Ccircle cx='710' cy='57' r='18' fill='rgba(255%2C255%2C255%2C0.07)'/%3E%3Cline x1='640' y1='0' x2='800' y2='115' stroke='rgba(255%2C255%2C255%2C0.04)' stroke-width='20'/%3E%3Cpath d='M0%2C88 C120%2C108 280%2C68 440%2C88 C600%2C108 700%2C78 800%2C88 L800%2C115 L0%2C115 Z' fill='rgba(255%2C255%2C255%2C0.04)'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
}

/* Inner layout: left greeting + right date */
.dv2-cover-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.dv2-cover-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dv2-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: 10.5px;
    font-weight: 700;
    color: rgba(196, 181, 253, .9);
    letter-spacing: .6px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.dv2-portal-badge i {
    font-size: 9px;
}

.dv2-greeting {
    font-size: 26px;
    font-weight: 800;
    color: rgba(255, 255, 255, .92);
    letter-spacing: -.5px;
    line-height: 1.1;
}

.dv2-greeting strong {
    color: #fff;
    font-weight: 900;
}

.dv2-cover-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

.dv2-date-dow {
    font-size: 11px;
    font-weight: 700;
    color: rgba(148, 163, 184, .7);
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.dv2-date-dmy {
    font-size: 15px;
    font-weight: 800;
    color: rgba(224, 231, 255, .92);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -.1px;
}

.dv2-date-dmy i {
    font-size: 12px;
    color: rgba(196, 181, 253, .7);
}

/* ── Avatar (overlaps cover → body boundary) ──────────────── */
.dv2-ava-wrap {
    position: absolute;
    top: 79px;
    left: 32px;
    /* 115px cover - 36px overlap */
    z-index: 10;
    width: 92px;
    height: 92px;
}

.dv2-ava-img,
.dv2-ava-fb {
    position: absolute;
    top: 0;
    left: 0;
    width: 92px;
    height: 92px;
}

.dv2-ava-img {
    border-radius: 20px;
    display: block;
    border: 4px solid #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .18);
    object-fit: cover;
}

.dv2-ava-fb {
    border-radius: 20px;
    background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #2563eb;
    border: 4px solid #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .16);
    box-sizing: border-box;
}

.dv2-ava-dot {
    position: absolute;
    bottom: 2px;
    right: -1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #22c55e;
    border: 3px solid #fff;
    z-index: 11;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

/* ── Card body ────────────────────────────────────────────── */
.dv2-hbody {
    padding: 60px 30px 24px;
    /* 92px avatar - 36px overlap + 4px gap */
}

.dv2-hbody-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
}

.dv2-name-block {
    flex: 1;
    min-width: 0;
}

.dv2-name {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 9px;
    letter-spacing: -.4px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dv2-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dv2-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 99px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #bfdbfe;
    white-space: nowrap;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dv2-chip i {
    font-size: 9px;
    flex-shrink: 0;
}

.dv2-chip-gray {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.dv2-chip-green {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.dv2-status {
    flex-shrink: 0;
    margin-top: 3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 10px;
    background: #f0fdf4;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #bbf7d0;
    white-space: nowrap;
}

.dv2-status i {
    font-size: 7px;
    color: #22c55e;
}

/* Divider */
.dv2-divider {
    height: 1px;
    background: linear-gradient(90deg, #f1f5f9, #e2e8f0 45%, #f1f5f9);
    margin: 16px 0;
}

/* ── Details 2-col grid with icon rows ────────────────────── */
.dv2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.dv2-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 10px 0;
    border-bottom: 1px solid #f8fafc;
}

.dv2-row:nth-child(even) {
    padding-left: 22px;
    padding-right: 0;
    border-left: 1px solid #f1f5f9;
}

.dv2-row:nth-last-child(-n+2) {
    border-bottom: none;
}

.dv2-row-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f3f7ff;
    border: 1px solid #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    color: #2563eb;
}

.dv2-row-content {
    flex: 1;
    min-width: 0;
}

.dv2-row-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .65px;
    margin-bottom: 2px;
}

.dv2-row-val {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════════════════════════════════
   SECTION HEADER
══════════════════════════════════════ */
.dv2-section-hdr {
    display: flex;
    align-items: center;
    padding: 6px 4px 2px;
}

.dv2-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.dv2-section-title i {
    font-size: 10px;
}

/* ══════════════════════════════════════
   QUICK NAVIGATION TILES  (vertical cards)
══════════════════════════════════════ */
.dv2-tiles {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    /* Scrollbar mỏng */
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.dv2-tiles::-webkit-scrollbar {
    height: 5px;
}

.dv2-tiles::-webkit-scrollbar-track {
    background: transparent;
}

.dv2-tiles::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 99px;
}

.dv2-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 20px 20px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e8edf5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .05);
    text-decoration: none;
    min-height: 176px;
    min-width: 200px;
    flex: 0 0 220px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}

.dv2-tile::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 0 0 18px 18px;
    opacity: 0;
    transition: opacity .2s ease;
}

.dv2-tile:hover {
    transform: translateY(-4px);
    text-decoration: none;
}

.dv2-tile:hover::after {
    opacity: 1;
}

/* Icon bubble */
.dv2-tile-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    margin-bottom: 16px;
    transition: transform .2s ease;
}

.dv2-tile:hover .dv2-tile-icon {
    transform: scale(1.08) rotate(-4deg);
}

.dv2-tile-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 5px;
    white-space: nowrap;
}

.dv2-tile-sub {
    font-size: 12px;
    color: #64748b;
    line-height: 1.55;
    flex: 1;
}

.dv2-tile-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 16px;
    letter-spacing: -.1px;
    transition: gap .2s ease;
}

.dv2-tile:hover .dv2-tile-cta {
    gap: 7px;
}

.dv2-tile-cta i {
    font-size: 10px;
}

/* ── Color variants ──────────────────────────────────────── */
.dv2-tile--indigo {
    border-color: #dbeafe;
}

.dv2-tile--indigo:hover {
    box-shadow: 0 8px 32px rgba(79, 70, 229, .15);
    border-color: #bfdbfe;
}

.dv2-tile--indigo .dv2-tile-icon {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 4px 16px rgba(79, 70, 229, .32);
}

.dv2-tile--indigo .dv2-tile-cta {
    color: #1d4ed8;
}

.dv2-tile--indigo::after {
    background: linear-gradient(90deg, #1d4ed8, #2563eb);
}

.dv2-tile--violet {
    border-color: #dbeafe;
}

.dv2-tile--violet:hover {
    box-shadow: 0 8px 32px rgba(124, 58, 237, .15);
    border-color: #bfdbfe;
}

.dv2-tile--violet .dv2-tile-icon {
    background: linear-gradient(135deg, #2563eb, #558bf7);
    box-shadow: 0 4px 16px rgba(124, 58, 237, .32);
}

.dv2-tile--violet .dv2-tile-cta {
    color: #2563eb;
}

.dv2-tile--violet::after {
    background: linear-gradient(90deg, #2563eb, #558bf7);
}

.dv2-tile--teal {
    border-color: #ccfbf1;
}

.dv2-tile--teal:hover {
    box-shadow: 0 8px 32px rgba(13, 148, 136, .15);
    border-color: #99f6e4;
}

.dv2-tile--teal .dv2-tile-icon {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    box-shadow: 0 4px 16px rgba(13, 148, 136, .32);
}

.dv2-tile--teal .dv2-tile-cta {
    color: #0d9488;
}

.dv2-tile--teal::after {
    background: linear-gradient(90deg, #0d9488, #14b8a6);
}

.dv2-tile--emerald {
    border-color: #d1fae5;
}

.dv2-tile--emerald:hover {
    box-shadow: 0 8px 32px rgba(16, 185, 129, .15);
    border-color: #a7f3d0;
}

.dv2-tile--emerald .dv2-tile-icon {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 4px 16px rgba(16, 185, 129, .32);
}

.dv2-tile--emerald .dv2-tile-cta {
    color: #059669;
}

.dv2-tile--emerald::after {
    background: linear-gradient(90deg, #059669, #10b981);
}

.dv2-tile--orange {
    border-color: #ffedd5;
}

.dv2-tile--orange:hover {
    box-shadow: 0 8px 32px rgba(234, 88, 12, .15);
    border-color: #fed7aa;
}

.dv2-tile--orange .dv2-tile-icon {
    background: linear-gradient(135deg, #ea580c, #f97316);
    box-shadow: 0 4px 16px rgba(234, 88, 12, .32);
}

.dv2-tile--orange .dv2-tile-cta {
    color: #ea580c;
}

.dv2-tile--orange::after {
    background: linear-gradient(90deg, #ea580c, #f97316);
}

.dv2-tile--rose {
    border-color: #ffe4e6;
}

.dv2-tile--rose:hover {
    box-shadow: 0 8px 32px rgba(225, 29, 72, .15);
    border-color: #fecdd3;
}

.dv2-tile--rose .dv2-tile-icon {
    background: linear-gradient(135deg, #e11d48, #f43f5e);
    box-shadow: 0 4px 16px rgba(225, 29, 72, .32);
}

.dv2-tile--rose .dv2-tile-cta {
    color: #e11d48;
}

.dv2-tile--rose::after {
    background: linear-gradient(90deg, #e11d48, #f43f5e);
}

.dv2-tile--cyan {
    border-color: #cffafe;
}

.dv2-tile--cyan:hover {
    box-shadow: 0 8px 32px rgba(6, 182, 212, .15);
    border-color: #a5f3fc;
}

.dv2-tile--cyan .dv2-tile-icon {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    box-shadow: 0 4px 16px rgba(6, 182, 212, .32);
}

.dv2-tile--cyan .dv2-tile-cta {
    color: #0891b2;
}

.dv2-tile--cyan::after {
    background: linear-gradient(90deg, #0891b2, #06b6d4);
}

.dv2-tile--sky {
    border-color: #bae6fd;
}

.dv2-tile--sky:hover {
    box-shadow: 0 8px 32px rgba(14, 165, 233, .15);
    border-color: #7dd3fc;
}

.dv2-tile--sky .dv2-tile-icon {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    box-shadow: 0 4px 16px rgba(14, 165, 233, .32);
}

.dv2-tile--sky .dv2-tile-cta {
    color: #0284c7;
}

.dv2-tile--sky::after {
    background: linear-gradient(90deg, #0284c7, #0ea5e9);
}

.dv2-tile--orange:hover {
    box-shadow: 0 8px 32px rgba(234, 88, 12, .15);
    border-color: #fed7aa;
}

.dv2-tile--orange .dv2-tile-icon {
    background: linear-gradient(135deg, #ea580c, #f97316);
    box-shadow: 0 4px 16px rgba(234, 88, 12, .32);
}

.dv2-tile--orange .dv2-tile-cta {
    color: #ea580c;
}

.dv2-tile--orange::after {
    background: linear-gradient(90deg, #ea580c, #f97316);
}

.dv2-tile--amber {
    border-color: #fef3c7;
}

.dv2-tile--amber:hover {
    box-shadow: 0 8px 32px rgba(245, 158, 11, .12);
    border-color: #fde68a;
}

.dv2-tile--amber .dv2-tile-icon {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 4px 16px rgba(245, 158, 11, .32);
}

.dv2-tile--amber .dv2-tile-cta {
    color: #d97706;
}

.dv2-tile--amber::after {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.dv2-tile--rose {
    border-color: #fce7f3;
}

.dv2-tile--rose:hover {
    box-shadow: 0 8px 32px rgba(236, 72, 153, .12);
    border-color: #fbcfe8;
}

.dv2-tile--rose .dv2-tile-icon {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    box-shadow: 0 4px 16px rgba(236, 72, 153, .32);
}

.dv2-tile--rose .dv2-tile-cta {
    color: #e11d48;
}

.dv2-tile--rose::after {
    background: linear-gradient(90deg, #ec4899, #f43f5e);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 820px) {
    .dv2-wrap {
        margin: 16px 16px 16px;
    }

    .dv2-tiles {
        gap: 10px;
    }

    .dv2-tile {
        min-height: 160px;
    }
}

@media (max-width: 540px) {
    .dv2-cover {
        height: 95px;
    }

    .dv2-cover-inner {
        padding: 0 20px;
    }

    .dv2-greeting {
        font-size: 20px;
    }

    .dv2-portal-badge {
        display: none;
    }

    .dv2-ava-wrap {
        top: 59px;
        left: 20px;
        width: 76px;
        height: 76px;
    }

    .dv2-ava-img,
    .dv2-ava-fb {
        width: 76px;
        height: 76px;
        font-size: 30px;
        border-radius: 16px;
    }

    .dv2-hbody {
        padding: 44px 18px 22px;
    }

    .dv2-name {
        font-size: 18px;
    }

    .dv2-status {
        display: none;
    }

    .dv2-grid {
        grid-template-columns: 1fr;
    }

    .dv2-row,
    .dv2-row:nth-child(even) {
        border-left: none;
        padding: 9px 0;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .dv2-row:last-child {
        border-bottom: none !important;
    }

    .dv2-tiles {
        gap: 9px;
    }

    .dv2-tile {
        padding: 18px 16px 16px;
        min-height: 148px;
    }

    .dv2-tile-icon {
        width: 44px;
        height: 44px;
        font-size: 17px;
        border-radius: 11px;
        margin-bottom: 12px;
    }

    .dv2-tile-title {
        font-size: 13.5px;
    }

    .dv2-tile-sub {
        font-size: 11px;
    }
}

/* ══════════════════════════════════════
   DASHBOARD — HỌC TẬP PANELS
══════════════════════════════════════ */

/* 2-col row for KQ + Mon */
.dv2-ht-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Generic panel card */
.dv2-panel {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .05);
    overflow: hidden;
}

.dv2-panel-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.dv2-panel-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.dv2-panel-title i {
    font-size: 12px;
    color: #2563eb;
}

.dv2-ky-sel {
    padding: 7px 28px 7px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    color: #334155;
    background: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    max-width: 240px;
    flex-shrink: 1;
    min-width: 0;
    margin-right: 3px;
    transition: border-color .2s, box-shadow .2s;
}

.dv2-ky-sel:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.dv2-ky-sel:disabled {
    opacity: .5;
    cursor: default;
}

.dv2-panel-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 32px 20px;
    color: #94a3b8;
    font-size: 13px;
}

/* ── Dashboard: Reminders Row ──────────────────────── */
.dv2-reminders-row {
    margin-bottom: 24px;
    width: 100%;
}
.dv2-reminders-hdr {
    margin-bottom: 16px;
}
.dv2-reminders-box {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.dv2-reminders-body {
    display: flex;
    flex-direction: column;
}

/* ── Dashboard: Notes compact box (dv2-notes-box) ──────────────────── */
.dv2-notes-box {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(124,58,237,.10);
    border: 1.5px solid #dbeafe;
    overflow: hidden;
    margin-bottom: .5rem;
    cursor: pointer;
    transition: box-shadow .2s, border-color .2s;
}
.dv2-notes-box:hover { box-shadow: 0 6px 24px rgba(124,58,237,.16); border-color: #b5cdfd; }

.dv2-nb-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem .75rem;
    border-bottom: 1px solid #f0f0f0;
    gap: .75rem;
}
.dv2-nb-hdr-left { display: flex; align-items: center; gap: .75rem; }

.dv2-nb-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .75rem;
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(124,58,237,.25);
}

.dv2-nb-title {
    font-size: .95rem;
    font-weight: 700;
    color: #1e293b;
}
.dv2-nb-sub {
    font-size: .75rem;
    color: #94a3b8;
    margin-top: 1px;
}

.dv2-nb-badge {
    min-width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 .45rem;
    flex-shrink: 0;
}
.dv2-nb-badge--empty { background: #e2e8f0; color: #94a3b8; }

.dv2-nb-preview { 
    padding: .6rem .9rem .6rem .4rem; 
    max-height: 240px; 
    overflow-y: auto; 
    overflow-x: hidden; 
}
.dv2-nb-preview::-webkit-scrollbar { width: 6px; }
.dv2-nb-preview::-webkit-scrollbar-track { background: transparent; }
.dv2-nb-preview::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.dv2-nb-preview::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.dv2-lms-icon {
    background: #eff6ff;
    color: #2563eb;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dv2-lms-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.dv2-lms-card {
    border-left: 3px solid #3b82f6; 
    display: block; 
    text-decoration: none; 
    margin-bottom: 8px; 
    padding: 12px; 
    background: #f8fafc; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: background 0.2s;
}
.dv2-lms-card:hover {
    background: #f1f5f9;
}

.dv2-lms-card-title {
    font-size: 14px; 
    color: #1e293b; 
    font-weight: 600; 
    margin-bottom: 6px;
}

.dv2-lms-card-date {
    font-size: 13px; 
    color: #475569; 
    display: flex; 
    align-items: center; 
    gap: 6px;
}
.dv2-lms-card-course {
    font-size: 13px; 
    color: #64748b; 
    margin-top: 4px; 
    display: flex; 
    align-items: center; 
    gap: 6px;
}

.dv2-nb-empty {
    padding: .75rem .5rem;
    color: #94a3b8;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.dv2-nb-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .5rem;
    border-radius: .5rem;
    transition: background .15s;
}
.dv2-nb-item:hover { background: #f3f7ff; }

.dv2-nb-item-icon {
    font-size: .75rem;
    color: #2563eb;
    width: 1rem;
    flex-shrink: 0;
}
.dv2-nb-item.nb-item--warn .dv2-nb-item-icon { color: #d97706; }
.dv2-nb-item.nb-item--dead .dv2-nb-item-icon { color: #dc2626; }

.dv2-nb-item-title {
    font-size: .825rem;
    color: #334155;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dv2-nb-item-date {
    font-size: .72rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.dv2-nb-footer {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.2rem;
    background: #f8fafc;
    border-top: 1px solid #dbeafe;
    font-size: .82rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: background .15s;
}
.dv2-nb-footer:hover { background: #dbeafe; }
.dv2-nb-footer-arr { margin-left: auto; }

/* ── Note Detail Page (nd-*) ─────────────────────────────────────────────── */
.nd-page-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.nd-page-hdr-left { display: flex; align-items: center; gap: .85rem; }

.nd-back-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .6rem;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    text-decoration: none;
    flex-shrink: 0;
    transition: background .15s;
}
.nd-back-btn:hover { background: #e2e8f0; }

.nd-page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: .45rem;
}
.nd-page-title i { color: #2563eb; }
.nd-page-sub { font-size: .8rem; color: #94a3b8; margin: 2px 0 0; }

.nd-count-badge {
    display: inline-flex;
    align-items: center;
    padding: .3rem .75rem;
    background: #2563eb;
    color: #fff;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}

.nd-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 3rem 1rem;
    color: #2563eb;
    font-size: .9rem;
}

/* Filter bar */
.nd-filter-bar {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.nd-filter-bar::-webkit-scrollbar { display: none; }
.nd-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .9rem;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: .8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
    white-space: nowrap;
}
.nd-filter-btn:hover { border-color: #60a5fa; color: #2563eb; }
.nd-filter-btn.active { background: #2563eb; border-color: #2563eb; color: #fff; }

/* List */
.nd-list {
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

/* Card */
.nd-card {
    display: flex;
    gap: 1rem;
    background: #fff;
    border-radius: .875rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    border-left: 4px solid #2563eb;
    transition: box-shadow .15s, transform .15s;
}
.nd-card:hover { box-shadow: 0 6px 20px rgba(124,58,237,.13); transform: translateY(-1px); }
.nd-card--warn { border-color: #f59e0b; }
.nd-card--dead { border-color: #ef4444; }

.nd-card-icon-wrap { flex-shrink: 0; }
.nd-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .65rem;
    background: rgba(124,58,237,.1);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.nd-card--warn .nd-card-icon { background: rgba(245,158,11,.12); color: #d97706; }
.nd-card--dead .nd-card-icon { background: rgba(239,68,68,.1);   color: #dc2626; }

.nd-card-body { flex: 1; min-width: 0; }

.nd-card-top {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .4rem;
    flex-wrap: wrap;
}

.nd-tag {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .3px;
}
.nd-tag--info { background: #dbeafe; color: #2563eb; }
.nd-tag--warn { background: #fef3c7; color: #d97706; }
.nd-tag--dead { background: #fee2e2; color: #dc2626; }

.nd-card-date {
    font-size: .72rem;
    color: #94a3b8;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.nd-card-title {
    font-size: .925rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: .35rem;
    line-height: 1.35;
}

.nd-card-content {
    font-size: .83rem;
    color: #475569;
    line-height: 1.55;
}

.nd-card-content a {
    text-decoration: none;
}

.nd-card-content a:hover {
    text-decoration: none;
}

/* Empty state */
.nd-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
}
.nd-empty-icon { font-size: 3rem; color: #cbd5e1; margin-bottom: 1rem; }
.nd-empty-title { font-size: 1rem; font-weight: 700; color: #64748b; margin: 0 0 .3rem; }
.nd-empty-sub   { font-size: .82rem; color: #94a3b8; margin: 0; }

@media (max-width: 600px) {
    .nd-card { gap: .75rem; padding: .875rem 1rem; }
    .nd-card-icon { width: 2rem; height: 2rem; font-size: .85rem; }
}
/* ────────────────────────────────────────────────────────────────────────────── */

/* ── Dashboard: Notes & Réminders (old grid — kept for compat) ─── */
.dv2-section-more {
    font-size: 0.78rem;
    color: var(--primary, #2563eb);
    font-weight: 600;
    text-decoration: none;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .3rem;
    transition: opacity .15s;
}
.dv2-section-more:hover { opacity: .7; }

.dv2-panel--full { width: 100%; }

.dv2-notes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: .75rem;
    padding: .25rem .5rem .75rem;
}

.dv2-note {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .75rem 1rem;
    border-radius: .75rem;
    border-left: 4px solid var(--primary, #2563eb);
    background: #f8fafc;
    transition: box-shadow .15s;
}
.dv2-note:hover { box-shadow: 0 4px 16px rgba(124,58,237,.10); }

.dv2-note.note--warn {
    border-color: #f59e0b;
    background: #fffbeb;
}
.dv2-note.note--dead {
    border-color: #ef4444;
    background: #fff5f5;
}

.dv2-note-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(124,58,237,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: #2563eb;
}
.dv2-note.note--warn .dv2-note-icon { background: rgba(245,158,11,.15); color: #d97706; }
.dv2-note.note--dead .dv2-note-icon { background: rgba(239,68,68,.12); color: #dc2626; }

.dv2-note-body { flex: 1; min-width: 0; }

.dv2-note-title {
    font-size: .875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: .2rem;
    line-height: 1.35;
}

.dv2-note-content {
    font-size: .8rem;
    color: #475569;
    line-height: 1.45;
    margin-bottom: .35rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dv2-note-date {
    font-size: .72rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: .25rem;
}

@media (max-width: 600px) {
    .dv2-notes-list { grid-template-columns: 1fr; }
}
/* ────────────────────────────────────────────────────────────────────────────── */

.dv2-panel-empty {
    min-height: 150px;
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.dv2-panel-empty i {
    font-size: 28px;
    color: #cbd5e1;
}

/* ── Kết quả học tập chart ── */
.dv2-kq-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px 4px;
}

.dv2-kq-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #bfdbfe;
}

.dv2-kq-chart-wrap {
    padding: 4px 12px 12px;
    overflow-x: auto;
}

.dv2-kq-info {
    margin: 0 16px 14px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    animation: kqInfoIn .18s ease;
}

@keyframes kqInfoIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dv2-kq-info-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    min-width: 0;
}

.dv2-kq-info-score {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.dv2-kq-info-grade {
    font-size: 12px;
    font-weight: 600;
    background: currentColor;
    color: inherit;
    padding: 3px 10px;
    border-radius: 99px;
    background: rgba(0, 0, 0, .06);
}

.dv2-kq-info-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #94a3b8;
    line-height: 1;
    padding: 2px 4px;
}

.dv2-kq-info-close:hover {
    color: #374151;
}

/* ── Bar chart hover tooltip ── */
.dv2-kq-tooltip {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 10px;
    padding: 9px 13px 10px;
    min-width: 200px;
    max-width: 280px;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    animation: kqTipIn .12s ease;
}

.dv2-kq-tooltip.is-visible {
    display: block;
}

@keyframes kqTipIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dv2-kq-tip-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.3;
}

.dv2-kq-tip-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: #cbd5e1;
}

.dv2-kq-tip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Tiến độ học tập ── */
.dv2-td-wrap {
    padding: 20px 24px 22px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.dv2-td-ring {
    flex-shrink: 0;
}

.dv2-td-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.dv2-td-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 18px;
    border-radius: 12px;
    min-width: 80px;
    flex: 1;
}

.dv2-td-stat--done {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.dv2-td-stat--need {
    background: #eef2ff;
    border: 1px solid #bfdbfe;
}

.dv2-td-stat--rem {
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.dv2-td-stat-val {
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.dv2-td-stat--done .dv2-td-stat-val {
    color: #16a34a;
}

.dv2-td-stat--need .dv2-td-stat-val {
    color: #4338ca;
}

.dv2-td-stat--rem .dv2-td-stat-val {
    color: #ea580c;
}

.dv2-td-stat-lbl {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 600;
    margin-top: 5px;
    text-align: center;
}

.dv2-td-bar-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dv2-td-bar {
    height: 10px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
}

.dv2-td-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width .8s cubic-bezier(.4, 0, .2, 1);
}

.dv2-td-bar-lbl {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 600;
}

/* ── Lớp học phần table ── */
.dv2-mon-summary {
    padding: 10px 16px 8px;
    font-size: 12.5px;
    color: #475569;
    border-bottom: 1px solid #f8fafc;
}

.dv2-mon-summary b {
    color: #1e293b;
}

.dv2-mon-summary i {
    color: #2563eb;
}

.dv2-mon-table-wrap {
    overflow-y: auto;
    max-height: 280px;
}

.dv2-mon-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dv2-mon-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f3f7ff;
    color: #4338ca;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1.5px solid #d9e3f7;
}

.dv2-mon-table tbody tr {
    border-bottom: 1px solid #f8fafc;
    transition: background .12s;
}

.dv2-mon-table tbody tr:last-child {
    border-bottom: none;
}

.dv2-mon-table tbody tr:hover {
    background: #f5f8ff;
}

.dv2-mon-table tbody td {
    padding: 9px 12px;
    color: #1e293b;
    vertical-align: middle;
}

.dv2-mt-stt {
    width: 36px;
    text-align: center;
    color: #60a5fa;
    font-weight: 700;
    font-size: 12px;
}

.dv2-mt-ma {
    font-size: 11.5px;
    color: #2563eb;
    font-weight: 600;
    white-space: nowrap;
}

.dv2-mt-ten {
    font-size: 12.5px;
}

.dv2-mt-tc {
    width: 42px;
    text-align: center;
}

.dv2-tc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #dbeafe;
    color: #2052b6;
    font-size: 12px;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 820px) {
    .dv2-ht-row {
        grid-template-columns: 1fr;
    }

    .dv2-td-stats {
        gap: 10px;
    }

    .dv2-td-stat {
        padding: 10px 12px;
    }
}

@media (max-width: 540px) {
    .dv2-td-wrap {
        gap: 16px;
    }

    .dv2-td-ring svg {
        width: 120px !important;
        height: 120px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TRA CỨU CÔNG NỢ PAGE
═══════════════════════════════════════════════════════════════ */

/* ── Selector bar ─────────────────────────────────────────── */
.j-cn-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 20px;
    flex-wrap: wrap;
}

.j-cn-selector-label {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.j-cn-select {
    padding: 8px 36px 8px 14px;
    border: 1.5px solid #b5cdfd;
    border-radius: 8px;
    font-size: 14px;
    color: #1e3a8a;
    background: #f5f8ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c3aed' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    min-width: 220px;
    box-shadow: 0 1px 4px rgba(124, 58, 237, .08);
    transition: border-color .2s, box-shadow .2s;
}

.j-cn-select:focus {
    outline: none;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .15);
}

/* ── Summary card (object responses) ─────────────────────── */
.j-cn-card {
    padding: 4px 0;
}

.j-cn-summary {
    background: linear-gradient(135deg, #f3f7ff 0%, #dbeafe 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary-color, #2563eb);
    box-shadow: 0 2px 8px rgba(124, 58, 237, .08);
}

.j-cn-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px dashed #bfdbfe;
    font-size: 14px;
}

.j-cn-summary-row:last-child {
    border-bottom: none;
}

.j-cn-summary-label {
    color: #1d4ed8;
    font-weight: 500;
}

.j-cn-summary-val {
    font-weight: 700;
    color: #1e3a8a;
    font-variant-numeric: tabular-nums;
}

.j-cn-td-label {
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    padding-right: 16px;
}

.j-cn-sub-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--primary-color, #2563eb);
    margin: 20px 0 10px;
}

/* ── Tuition table wrapper ────────────────────────────────── */
.j-tuition-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 320px);
    border-radius: 12px;
    border: 1px solid #dbeafe;
    box-shadow: 0 4px 16px rgba(124, 58, 237, .08), 0 1px 4px rgba(0, 0, 0, .04);
    background: #fff;
    margin-top: 4px;
}

/* ── Tuition table ────────────────────────────────────────── */
.j-tuition-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

/* Header */
.j-tuition-table thead tr {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.j-tuition-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 13px 16px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    border: none;
    text-align: left;
    vertical-align: middle;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.j-tuition-table thead th.j-dth-center {
    text-align: center;
}

.j-tuition-table thead th.j-dth-right {
    text-align: right;
}

/* Body rows */
.j-tuition-table tbody tr {
    transition: background .15s, box-shadow .15s;
    border-bottom: 1px solid #eff6ff;
}

.j-tuition-table tbody tr:last-child {
    border-bottom: none;
}

.j-tuition-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.j-tuition-table tbody tr:nth-child(odd) {
    background: #fff;
}

.j-tuition-table tbody tr:hover {
    background: #dbeafe !important;
    box-shadow: inset 3px 0 0 #2563eb;
}

.j-tuition-table tbody td {
    padding: 13px 16px;
    color: #0f172a;
    vertical-align: middle;
    border: none;
    line-height: 1.5;
    white-space: nowrap;
}

.j-tuition-table tbody td.j-dtd-center {
    text-align: center;
}

.j-tuition-table tbody td.j-dtd-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: #1e3a8a;
}

.j-tuition-table tbody td.j-dtd-stt {
    text-align: center;
    color: #60a5fa;
    font-weight: 700;
    font-size: 13px;
    width: 48px;
    min-width: 48px;
}

/* Footer totals row */
.j-tuition-table tfoot tr {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-top: 2px solid #60a5fa;
}

.j-tuition-table tfoot td {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 13px;
    color: #1e40af;
    vertical-align: middle;
    border: none;
}

.j-tuition-table tfoot td.j-dtd-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 13.5px;
    color: #1e3a8a;
}

.j-tuition-tfoot-label {
    text-transform: uppercase;
    letter-spacing: .4px;
    font-size: 11.5px;
    color: #1d4ed8;
}

/* Badges */
.tuition-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: .2px;
}

.tuition-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .7;
    flex-shrink: 0;
}

.tuition-badge-ok {
    background: #dcfce7;
    color: #15803d;
}

.tuition-badge-no {
    background: #fee2e2;
    color: #b91c1c;
}

.tuition-badge-warn {
    background: #fef9c3;
    color: #92400e;
}

.tuition-badge-info {
    background: #dbeafe;
    color: #2052b6;
}

/* Generic utils */
.j-td-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ── Monthly Calendar ───────────────────────── */
.dv2-cal-nav {
    background: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background .15s;
}

.dv2-cal-nav:hover {
    background: #f0f0ff;
}

/* ── Calendar picker ── */
.dv2-cal-picker-wrap {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
}

.dv2-cal-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 18px;
    border: 1.5px solid #bfdbfe;
    border-radius: 999px;
    background: #f3f7ff;
    color: #4338ca;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
    white-space: nowrap;
}

.dv2-cal-picker-btn:hover {
    background: #eef2ff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(99, 102, 241, .12);
}

.dv2-cal-picker-chevron {
    font-size: 10px;
    opacity: .55;
    transition: transform .2s;
}

.dv2-cal-picker-btn:hover .dv2-cal-picker-chevron {
    transform: rotate(180deg);
}

.dv2-cal-picker-pop {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(99, 102, 241, .14), 0 2px 8px rgba(0, 0, 0, .07);
    padding: 14px;
    z-index: 300;
    min-width: 224px;
    animation: calPickerIn .15s ease;
}

@keyframes calPickerIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.dv2-cal-picker-yr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 2px 4px;
}

.dv2-cal-picker-yr-nav {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    color: #2563eb;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.dv2-cal-picker-yr-nav:hover {
    background: #eef2ff;
}

.dv2-cal-picker-yr-lbl {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.dv2-cal-picker-months {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.dv2-cal-picker-mon {
    padding: 9px 4px;
    border: 1.5px solid transparent;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    text-align: center;
}

.dv2-cal-picker-mon:hover {
    background: #eef2ff;
    color: #4338ca;
}

.dv2-cal-picker-mon-sel {
    background: #2563eb !important;
    color: #fff !important;
    font-weight: 700;
    border-color: #1d4ed8 !important;
}

.dv2-cal-picker-mon-now {
    border-color: #2563eb;
    color: #4338ca;
    background: #eef2ff;
}

#dashCalBody {
    transition: opacity .2s ease;
}

.dv2-cal-grid {
    padding: 4px 16px 16px;
}

.dv2-cal-dow-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}

.dv2-cal-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    padding: 6px 0;
}

.dv2-cal-dow-sun {
    color: #f43f5e;
}

.dv2-cal-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.dv2-cal-cell {
    min-height: 52px;
    border-radius: 10px;
    padding: 6px 4px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    position: relative;
    transition: background .15s;
}

.dv2-cal-cell-empty {
    background: transparent;
}

.dv2-cal-cell:not(.dv2-cal-cell-empty) {
    background: #f8fafc;
}

.dv2-cal-cell:not(.dv2-cal-cell-empty):hover {
    background: #f0f0ff;
}

.dv2-cal-cell-today {
    background: #eef2ff !important;
    box-shadow: 0 0 0 2px #2563eb;
}

.dv2-cal-cell-has {
    cursor: pointer;
}

.dv2-cal-cell-click {
    cursor: pointer;
}

.dv2-cal-cell-click:not(.dv2-cal-cell-empty):hover {
    background: #f0f0ff;
}

.dv2-cal-day {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    line-height: 1;
}

.dv2-cal-cell-today .dv2-cal-day {
    color: #2563eb;
}

.dv2-cal-dots {
    display: flex;
    gap: 3px;
    margin-top: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.dv2-cal-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.mt-12 {
    margin-top: 12px;
}

/* ════════════════════════════════════════════
   DAY SCHEDULE MODAL
════════════════════════════════════════════ */
.dv2-day-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: dvDayOvlIn .18s ease;
}

.dv2-day-overlay.j-hidden {
    display: none !important;
}

/* Calendar body loading state — overlay existing content while fetching */
.cal-body--loading {
    opacity: 0.4;
    pointer-events: none;
}

@keyframes dvDayOvlIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.dv2-day-modal {
    background: #fff;
    border-radius: 24px;
    width: min(540px, calc(100vw - 32px));
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 100px rgba(99, 102, 241, .2), 0 4px 24px rgba(0, 0, 0, .1);
    animation: dvDayModalIn .22s cubic-bezier(.34, 1.3, .64, 1);
    overflow: hidden;
}

@keyframes dvDayModalIn {
    from {
        transform: translateY(28px) scale(.96);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.dv2-day-modal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 18px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 60%, #0369a1 100%);
    flex-shrink: 0;
}

.dv2-day-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dv2-day-modal-ico {
    font-size: 20px;
    color: rgba(255, 255, 255, .85);
}

.dv2-day-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.2px;
}

.dv2-day-modal-close {
    background: rgba(255, 255, 255, .18);
    border: 1.5px solid rgba(255, 255, 255, .25);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    transition: background .15s;
}

.dv2-day-modal-close:hover {
    background: rgba(255, 255, 255, .32);
}

.dv2-day-modal-body {
    overflow-y: auto;
    padding: 16px 16px 20px;
    flex: 1;
}

.dv2-day-modal-body::-webkit-scrollbar {
    width: 4px;
}

.dv2-day-modal-body::-webkit-scrollbar-thumb {
    background: #bfdbfe;
    border-radius: 4px;
}

/* ── Empty state ── */
.dv2-day-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 44px 20px;
}

.dv2-day-empty-ico {
    font-size: 42px;
    color: #a5f3fc;
    line-height: 1;
}

.dv2-day-empty .dv2-day-empty-ico i {
    color: #22c55e;
}

.dv2-day-empty-txt {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.dv2-day-empty-sub {
    font-size: 13px;
    color: #94a3b8;
}

/* ── Schedule item card ── */
.dv2-di-card {
    display: flex;
    gap: 0;
    border-radius: 18px;
    overflow: hidden;
    border: 1.5px solid #e8eaf6;
    margin-bottom: 12px;
    background: #fff;
    transition: box-shadow .18s, border-color .18s, transform .18s;
}

.dv2-di-card:last-child {
    margin-bottom: 0;
}

.dv2-di-card:hover {
    box-shadow: 0 8px 28px rgba(99, 102, 241, .13);
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

.dv2-di-accent {
    width: 5px;
    flex-shrink: 0;
}

.dv2-di-body {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* Top row: time pill + badges */
.dv2-di-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dv2-di-time-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.dv2-di-time-pill i {
    font-size: 10px;
}

.dv2-di-tiet {
    font-size: 11px;
    font-weight: 500;
    opacity: .8;
}

.dv2-di-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.dv2-di-badge-sus {
    background: #fee2e2;
    color: #dc2626;
}

.dv2-di-badge-online {
    background: #d1fae5;
    color: #059669;
}

/* Subject name */
.dv2-di-name {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    letter-spacing: -.1px;
}

/* Codes */
.dv2-di-codes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dv2-di-code-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: #2563eb;
    background: #eef2ff;
    border: 1px solid #bfdbfe;
}

.dv2-di-code-chip i {
    font-size: 9px;
}

/* Meta chips (room, campus) */
.dv2-di-meta {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.dv2-di-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 11px;
}

.dv2-di-meta-chip i {
    font-size: 10px;
    color: #a5b4fc;
}

/* Note */
.dv2-di-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12px;
    color: #78716c;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 7px 12px;
    line-height: 1.5;
}

.dv2-di-note i {
    color: #f59e0b;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Outline description */
.dv2-di-outline {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12px;
    color: #475569;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 7px 12px;
    line-height: 1.5;
}

.dv2-di-outline i {
    color: #0ea5e9;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Actions */
.dv2-di-actions {
    display: flex;
    gap: 8px;
    padding-top: 2px;
}

.dv2-di-join-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    color: #fff;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .15s, transform .15s, box-shadow .15s;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .35);
}

.dv2-di-join-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, .45);
}

.dv2-di-join-btn i {
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   NEWS — Trang tin tức
═══════════════════════════════════════════════════════════════ */

/* Subtabs */
.news-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.news-tabs::-webkit-scrollbar {
    display: none;
}

.news-tab {
    padding: 8px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}

.news-tab:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #f0f0ff;
}

.news-tab.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.35);
}

/* Filter bar */
.news-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.news-filter-bar select {
    padding: 7px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #374151;
}

#newsTotalInfo {
    font-size: 13px;
    color: #64748b;
    margin-left: auto;
}

/* Pagination */
#newsPagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.news-pg-btn {
    padding: 6px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all .15s;
    min-width: 36px;
}

.news-pg-btn:hover:not(.news-pg-btn--disabled):not(.news-pg-btn--active) {
    border-color: #2563eb;
    color: #2563eb;
}

.news-pg-btn--active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.news-pg-btn--disabled {
    opacity: .4;
    cursor: default;
}

.news-pg-ellipsis {
    padding: 6px 4px;
    font-size: 13px;
    color: #9ca3af;
}

.news-card {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1.5px solid #f1f5f9;
    align-items: flex-start;
}

.news-card:last-child {
    border-bottom: none;
}

.news-card-img {
    width: 110px;
    min-width: 110px;
    height: 76px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}

.news-card-body {
    flex: 1;
    min-width: 0;
}

.news-card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.news-card-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #2563eb;
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 4px;
}

.news-card-date {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-title--link {
    cursor: pointer;
    color: var(--primary, #2563eb);
    transition: opacity .15s;
}
.news-card-title--link:hover { opacity: .75; text-decoration: underline; }

.news-card-desc {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-readmore {
    font-size: 13px;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.news-card-readmore:hover {
    color: #4338ca;
    text-decoration: underline;
}

@media (max-width: 540px) {
    .news-card-img {
        display: none;
    }
}

/* ═══════════════════════════════════════════════
   NEWS DETAIL MODAL
═══════════════════════════════════════════════ */
.news-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
    overflow-y: auto;
}
.news-modal-box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 820px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: fadeInUp .2s ease;
}
.news-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px 12px;
    border-bottom: 1px solid #eee;
    background: #fff;
    border-radius: 12px 12px 0 0;
}
.news-modal-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.5;
    margin: 0;
}
.news-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}
.news-modal-close:hover { background: #f1f5f9; color: #0f172a; }
.news-modal-meta {
    display: flex;
    gap: 16px;
    padding: 8px 24px;
    font-size: .8rem;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}
.news-modal-meta span { display: flex; align-items: center; gap: 5px; }
.news-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    font-size: .95rem;
    line-height: 1.8;
    color: #334155;
}
.news-modal-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 8px 0; }
.news-modal-body p   { margin: 0 0 .9em; }
.news-modal-body h1,.news-modal-body h2,.news-modal-body h3 { font-weight: 700; margin: 1em 0 .4em; color: #1e293b; }
.news-modal-body a   { color: #2563eb; }
.news-modal-body table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.news-modal-body td,.news-modal-body th { border: 1px solid #e2e8f0; padding: 6px 10px; font-size: .9rem; }
.news-modal-footer {
    padding: 12px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}
@media (max-width: 600px) {
    .news-modal-box { max-height: 95vh; }
    .news-modal-body { padding: 14px 16px; }
    .news-modal-header { padding: 14px 16px 10px; }
}

/* ═══════════════════════════════════════════════════════
   NEWS DETAIL PAGE
═══════════════════════════════════════════════════════ */
.news-detail-topbar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid #f1f5f9;
}
.news-detail-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--primary, #2563eb);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 7px;
    border: 1.5px solid var(--primary, #2563eb);
    transition: background .15s, color .15s;
}
.news-detail-back-btn:hover {
    background: var(--primary, #2563eb);
    color: #fff;
}
.news-detail-header {
    border-bottom: 1.5px solid #f1f5f9;
    padding-bottom: 16px;
    margin-bottom: 20px;
}
.news-detail-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.5;
    margin: 0 0 12px;
}
.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: .82rem;
    color: #64748b;
}
.news-detail-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.news-detail-body {
    font-size: 1rem;
    line-height: 1.85;
    color: #1e293b;
    word-break: break-word;
}
.news-detail-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.news-detail-body p   { margin: 0 0 1em; }
.news-detail-body h1,.news-detail-body h2,.news-detail-body h3 { font-weight: 700; margin: 1.2em 0 .4em; color: #0f172a; }
.news-detail-body a   { color: var(--primary, #2563eb); text-decoration: none !important; }
.news-detail-body a:hover { text-decoration: underline !important; }
.news-detail-body table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.news-detail-body td,.news-detail-body th { border: 1px solid #e2e8f0; padding: 7px 12px; font-size: .92rem; }
.news-detail-body th  { background: #f8fafc; font-weight: 600; }
.news-detail-portal-link {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1.5px solid #f1f5f9;
    font-size: .88rem;
}
.news-detail-portal-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    text-decoration: none;
}
.news-detail-portal-link a:hover { color: var(--primary, #2563eb); }
@media (max-width: 600px) {
    .news-detail-card { padding: 18px 14px; }
    .news-detail-title { font-size: 1.1rem; }
}

/* ═══════════════════════════════════════════════════════
   CHANGE PASSWORD MODAL
═══════════════════════════════════════════════════════ */
.cpw-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.cpw-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: fadeInUp .2s ease;
}
.cpw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    gap: 8px;
}
.cpw-header i { color: var(--primary, #2563eb); margin-right: 6px; }
.cpw-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    padding: 4px 7px;
    border-radius: 6px;
    transition: background .15s;
}
.cpw-close:hover { background: #f1f5f9; color: #0f172a; }
.cpw-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cpw-msg {
    font-size: .85rem;
    padding: 9px 13px;
    border-radius: 8px;
    font-weight: 500;
}
.cpw-msg--error { background: #fef2f2; color: #dc2626; }
.cpw-msg--ok    { background: #f0fdf4; color: #16a34a; }
.cpw-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}
.cpw-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .15s;
}
.cpw-input-wrap:focus-within { border-color: var(--primary, #2563eb); }
.cpw-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 9px 12px;
    font-size: .93rem;
    background: transparent;
}
.cpw-eye {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 12px;
    color: #94a3b8;
    font-size: .9rem;
    transition: color .15s;
}
.cpw-eye:hover { color: var(--primary, #2563eb); }
.cpw-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 22px 18px;
}
.cpw-header--google { background: linear-gradient(135deg,#4285f4 0%,#34a853 100%); color: #fff; border-bottom: none; border-radius: 14px 14px 0 0; }
.cpw-header--google i { color: #fff; }
.cpw-header--google .cpw-close { color: rgba(255,255,255,.8); }
.cpw-header--google .cpw-close:hover { background: rgba(255,255,255,.2); color: #fff; }
.cgpw-email-row { display: flex; align-items: center; gap: 8px; background: #eff6ff; border: 1.5px solid #bfdbfe; border-radius: 8px; padding: 9px 13px; font-size: .88rem; color: #1d4ed8; font-weight: 500; word-break: break-all; }
.cgpw-email-row i { flex-shrink: 0; color: #4285f4; }
.cpw-header--microsoft { background: linear-gradient(135deg,#0078d4 0%,#00b4d8 100%); color: #fff; border-bottom: none; border-radius: 14px 14px 0 0; }
.cpw-header--microsoft i { color: #fff; }
.cpw-header--microsoft .cpw-close { color: rgba(255,255,255,.8); }
.cpw-header--microsoft .cpw-close:hover { background: rgba(255,255,255,.2); color: #fff; }
.cmpw-otp-row { display: flex; gap: 8px; margin-top: 4px; }
.cmpw-otp-row .cpw-input { flex: 1; }
.cmpw-otp-btn { flex-shrink: 0; padding: 0 12px; height: 38px; border: 1.5px solid #0078d4; border-radius: 8px; background: #eff6ff; color: #0078d4; font-size: .83rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.cmpw-otp-btn:hover { background: #0078d4; color: #fff; }
.cmpw-otp-btn:disabled { opacity: .6; cursor: not-allowed; }
.cmpw-check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .875rem; color: #374151; user-select: none; }
.cmpw-check-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: #0078d4; cursor: pointer; flex-shrink: 0; }
.cmpw-otp-target { display: flex; gap: 18px; }
.cmpw-otp-target label { display: flex; align-items: center; gap: 6px; font-size: .875rem; cursor: pointer; font-weight: 400; color: #374151; }
.cmpw-otp-target input[type="radio"] { accent-color: #0078d4; width: 15px; height: 15px; }


/* ════════════════════════════════════════════════════════════════════════════
   PROFILE 2.0  —  Enterprise UI  (p2-*)
   ═════════════════════════════════════════════════════════════════════════ */

/* ── Hero wrapper ── */
.p2-hero {
    border-radius: 20px;
    overflow: visible;                          /* let avatar stick above cover */
    box-shadow: 0 0 0 1px rgba(0,0,0,.07),
                0 10px 40px rgba(79,70,229,.10);
    margin-bottom: 24px;
    background: #fff;
}

/* ── Cover ── */
.p2-cover {
    height: 200px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(120deg,#312e81 0%,#1d4ed8 35%,#2563eb 70%,#1c4daf 100%);
    position: relative;
    overflow: hidden;
}
.p2-cover::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%,  rgba(255,255,255,.07) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%,  rgba(255,255,255,.05) 0%, transparent 50%);
}
.p2-cover::after {
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Hero body: sits in normal flow after cover ── */
.p2-hero-body {
    border-radius: 0 0 20px 20px;
    background: #fff;
    position: relative;
}

/* ── Top row (avatar + identity) — LinkedIn style ── */
.p2-toprow {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 0 36px 0;
    margin-top: -72px;          /* pull whole row up so avatar overlaps cover */
}
.p2-av-wrap {
    position: relative;
    flex-shrink: 0;
}
.p2-avatar {
    width: 136px; height: 136px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 8px 32px rgba(79,70,229,.20), 0 2px 8px rgba(0,0,0,.12);
    display: block;
    background: #fff;
}
.p2-avatar-fb {
    width: 136px; height: 136px;
    border-radius: 50%;
    border: 5px solid #fff;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg,#1d4ed8,#558bf7);
    color: #fff; font-size: 56px;
    box-shadow: 0 8px 32px rgba(79,70,229,.20);
}
.p2-av-dot {
    position: absolute; bottom: 10px; right: 10px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #22c55e;
    border: 3.5px solid #fff;
    box-shadow: 0 0 0 3px rgba(34,197,94,.20);
}

/* ── Identity block: content starts BELOW cover bottom ── */
.p2-id-block {
    flex: 1;
    min-width: 0;
    padding-top: 78px;          /* 78 ≈ 72 margin-top offset + 6px breathing room → name is always in white zone */
    padding-bottom: 6px;
}
.p2-name {
    font-size: 27px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    letter-spacing: -.6px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badges */
.p2-badges {
    display: flex; flex-wrap: wrap; gap: 7px;
    margin-bottom: 12px;
}
.p2-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.p2-badge i { font-size: 11px; }
.p2-badge--id {
    background: #f8fafc; color: #475569;
    border: 1px solid #e2e8f0;
    letter-spacing: .3px; font-weight: 700;
}
.p2-badge--ok  { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.p2-badge--role { background: #fefce8; color: #a16207; border: 1px solid #fde047; }

/* Action buttons */
.p2-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.p2-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 20px; border-radius: 10px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    border: none; font-family: inherit; line-height: 1;
    transition: all .15s ease;
}
.p2-btn--primary {
    background: linear-gradient(135deg,#1d4ed8,#2563eb);
    color: #fff;
    box-shadow: 0 2px 10px rgba(79,70,229,.30);
}
.p2-btn--primary:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(79,70,229,.35); }
.p2-btn--ghost {
    background: #fff; color: #475569;
    border: 1.5px solid #e2e8f0;
}
.p2-btn--ghost:hover { background: #f8fafc; border-color: #cbd5e1; }
.p2-btn-copied {
    background: linear-gradient(135deg,#10b981,#059669) !important;
    box-shadow: 0 2px 10px rgba(16,185,129,.30) !important;
}

/* ── Divider between toprow and stats ── */
.p2-hero-divider {
    height: 1px; background: #f1f5f9; margin: 20px 36px 0;
}

/* ── Stats strip ── */
.p2-stats {
    display: flex; align-items: center; flex-wrap: wrap;
    padding: 18px 36px 28px; gap: 0;
}
.p2-stat { padding: 4px 28px 4px 0; min-width: 0; }
.p2-stat:first-child { padding-left: 0; }
.p2-stat-sep { width: 1px; height: 28px; background: #e2e8f0; margin-right: 28px; flex-shrink: 0; }
.p2-stat-lbl {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .8px;
    color: #94a3b8; margin-bottom: 4px;
}
.p2-stat-val { font-size: 14px; font-weight: 700; color: #0f172a; }

/* ── Main content grid ── */
.p2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
    align-items: start;
}

/* ── Cards ── */
.p2-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 6px rgba(0,0,0,.047);
    transition: box-shadow .2s, transform .2s;
    position: relative;
    overflow: hidden;
}
.p2-card::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--card-accent, transparent);
    border-radius: 4px 0 0 4px;
}
.p2-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.09); transform: translateY(-2px); }
.p2-card-full { grid-column: 1 / -1; }

/* ── Card header ── */
.p2-card-hdr {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 18px; padding-bottom: 14px;
    border-bottom: 1px solid #f8fafc;
}
.p2-card-hdr-icon {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
    background: var(--hib, #eef2ff); color: var(--hic, #2563eb);
}
.p2-card-hdr-title {
    font-size: 15px; font-weight: 700; color: #1e293b; margin: 0;
    letter-spacing: -.2px;
}

/* ── Section separator inside card ── */
.p2-sep {
    border: none; border-top: 1px dashed #e2e8f0; margin: 16px 0;
}

/* ── Info rows ── */
.p2-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px; border-radius: 8px; gap: 10px;
    cursor: default; transition: background .12s;
}
.p2-row:hover { background: #f8fafc; }
.p2-row + .p2-row { margin-top: 2px; }
.p2-row-addr { flex-direction: column; align-items: flex-start; gap: 5px; }
.p2-row-lbl {
    display: flex; align-items: center; gap: 9px;
    font-size: 12.5px; font-weight: 500; color: #64748b; flex-shrink: 0;
}
.p2-row-icon {
    width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 11px;
    background: var(--ib, #eef2ff); color: var(--ic, #2563eb);
}
.p2-row-val {
    font-size: 13px; font-weight: 600; color: #1e293b;
    text-align: right; word-break: break-word; min-width: 0;
    display: flex; align-items: center; gap: 6px;
}
.p2-row-mono { font-family: inherit; letter-spacing: .4px; font-size: 13px; font-weight: 700; }
.p2-empty { color: #cbd5e1; }
.p2-empty--light { color: #cbd5e1; font-weight: 400; }
.p2-row-addr-val {
    font-size: 13px; font-weight: 600; color: #1e293b;
    line-height: 1.5; padding-left: 35px;
}

/* ── Copy button inside rows ── */
.p2-copy-btn {
    background: none; border: none; cursor: pointer; padding: 3px 5px;
    border-radius: 5px; font-size: 11px; color: #94a3b8;
    opacity: 0; flex-shrink: 0; transition: all .12s;
}
.p2-row:hover .p2-copy-btn,
.p2-copy-btn:focus { opacity: 1; }
.p2-copy-btn:hover { color: #2563eb; background: #eef2ff; }

/* ── Academic highlight tile grid ── */
.p2-hl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}
.p2-hl {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 16px 14px;
    display: flex; flex-direction: column; gap: 7px;
    transition: box-shadow .18s, transform .18s;
    position: relative;
}
.p2-hl::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px; border-radius: 12px 12px 0 0;
    background: var(--hlc, #2563eb);
}
.p2-hl:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); transform: translateY(-2px); }
.p2-hl-icon {
    width: 34px; height: 34px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--hlc, #2563eb);
    background-color: color-mix(in srgb, var(--hlc,#2563eb) 12%, white);
}
.p2-hl-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: #94a3b8;
}
.p2-hl-value { font-size: 13.5px; font-weight: 700; color: #0f172a; line-height: 1.4; }

/* ── Family grid ── */
.p2-fam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.p2-fmember {
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(16,185,129,.08);
    transition: box-shadow .2s, transform .2s;
}
.p2-fmember:hover { box-shadow: 0 8px 24px rgba(16,185,129,.18); transform: translateY(-3px); }
/* Header area */
.p2-fm-header {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 18px 16px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-bottom: 1px solid #a7f3d0;
}
.p2-fm-av {
    width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(16,185,129,.35);
}
.p2-fm-identity { flex: 1; min-width: 0; }
.p2-fm-name { font-weight: 700; font-size: 15px; color: #064e3b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p2-fm-rel {
    display: inline-block; margin-top: 4px;
    background: #10b981; color: #fff;
    font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 20px;
    letter-spacing: .3px;
}
.p2-fm-dob { margin-top: 6px; font-size: 12px; color: #047857; display: flex; align-items: center; gap: 5px; font-weight: 500; }
.p2-fm-dob i { font-size: 11px; }
/* Rows area */
.p2-fm-rows { padding: 6px 16px 10px; display: flex; flex-direction: column; }
.p2-fm-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 8px 4px; border-bottom: 1px solid #f0fdf4; font-size: 13px; gap: 8px;
}
.p2-fm-row:last-child { border-bottom: none; }
.p2-fm-rl {
    display: flex; align-items: center; gap: 7px;
    color: #64748b; font-size: 12px; font-weight: 500;
    white-space: nowrap; flex-shrink: 0; min-width: 100px;
}
.p2-fm-rl i { color: #10b981; font-size: 11.5px; width: 14px; text-align: center; flex-shrink: 0; }
.p2-fm-rv { color: #0f172a; font-weight: 600; font-size: 13px; text-align: right; line-height: 1.5; word-break: break-word; }
.p2-fm-row-addr .p2-fm-rv { max-width: 60%; }

/* ── Mobile ── */
@media (max-width: 768px) {
    .p2-hero { border-radius: 16px; }
    .p2-cover { height: 150px; border-radius: 16px 16px 0 0; }
    .p2-toprow { margin-top: -60px; padding: 0 18px 0; flex-direction: column; align-items: center; }
    .p2-avatar, .p2-avatar-fb { width: 110px; height: 110px; }
    .p2-avatar-fb { font-size: 42px; }
    .p2-av-dot { width: 16px; height: 16px; bottom: 7px; right: 7px; }
    .p2-id-block { padding-top: 10px; text-align: center; width: 100%; }
    .p2-badges { justify-content: center; }
    .p2-actions { justify-content: center; }
    .p2-name { font-size: 21px; white-space: normal; }
    .p2-hero-divider { margin: 14px 18px 0; }
    .p2-stats { padding: 14px 18px 22px; }
    .p2-grid { grid-template-columns: 1fr; }
    .p2-card { padding: 18px 16px; }
    .p2-hl-grid { grid-template-columns: 1fr 1fr; }
    .p2-fam-grid { grid-template-columns: 1fr; }
    .p2-fm-row-addr .p2-fm-rv { max-width: 55%; }
}

/* ── Print ── */
@media print {
    .p2-hero { box-shadow: none; border: 1px solid #e2e8f0; border-radius: 12px; }
    .p2-cover { height: 100px; }
    .p2-actions, .p2-copy-btn { display: none !important; }
    .p2-card { box-shadow: none; border: 1px solid #e2e8f0; page-break-inside: avoid; }
    .p2-card:hover, .p2-hl:hover { transform: none; box-shadow: none; }
    .p2-row:hover { background: none; }
    .p2-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .p2-hl-grid { grid-template-columns: repeat(3,1fr); }
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE EDIT DROPDOWN (p2-edit-drop)
   used inside .p2-actions in the hero id-block
═══════════════════════════════════════════════════════════════ */
.p2-actions { margin-top: 10px; display: flex; align-items: center; gap: 8px; }
.p2-edit-drop { position: relative; display: inline-block; }
.p2-edit-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: linear-gradient(135deg,#2563eb,#5b8ff6);
    color: #fff; border: none; border-radius: 22px;
    padding: 8px 18px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: opacity .15s, transform .15s;
    box-shadow: 0 4px 14px rgba(99,102,241,.35);
    white-space: nowrap;
}
.p2-edit-btn:hover { opacity: .88; transform: translateY(-1px); }
.p2-edit-chev { font-size: 10px; transition: transform .2s; }
.p2-edit-drop.open .p2-edit-chev { transform: rotate(180deg); }
.p2-edit-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12); min-width: 210px;
    z-index: 200; overflow: hidden;
    animation: epDropIn .15s ease;
}
@keyframes epDropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.p2-edit-drop.open .p2-edit-menu { display: block; }
.p2-edit-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; color: #334155; font-size: 13.5px; font-weight: 500;
    text-decoration: none; transition: background .12s;
}
.p2-edit-menu a:hover { background: #f1f5f9; color: #2563eb; }
.p2-edit-menu a i { width: 16px; color: #2563eb; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════
   EDIT PROFILE PAGE  (ep-*)  — editprofile.html
═══════════════════════════════════════════════════════════════ */

/* ── Page header ── */
.ep-page-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 22px;
}
.ep-page-header-left { display: flex; align-items: center; gap: 14px; }
.ep-back-btn {
    width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    color: #64748b; text-decoration: none; font-size: 15px;
    transition: background .15s, color .15s;
}
.ep-back-btn:hover { background: #2563eb; border-color: #2563eb; color: #fff; }
.ep-page-subtitle { margin: 2px 0 0; font-size: 13px; color: #94a3b8; }
.ep-check-banner {
    display: flex; align-items: center; gap: 8px; padding: 9px 16px;
    border-radius: 10px; font-size: 13px; font-weight: 500;
}
.ep-check-banner.hidden { display: none !important; }
.ep-check-ok   { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.ep-check-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.ep-check-banner i { font-size: 15px; }

/* ── Sub-tabs ── */
.ep-tabs {
    display: flex; gap: 4px; border-bottom: 2px solid #e2e8f0;
    margin-bottom: 24px; padding-bottom: 0;
}
.ep-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 20px; border: none; background: none;
    font-size: 13.5px; font-weight: 600; color: #94a3b8;
    cursor: pointer; border-radius: 10px 10px 0 0;
    border-bottom: 2.5px solid transparent; margin-bottom: -2px;
    transition: color .15s, border-color .15s, background .15s;
}
.ep-tab:hover { color: #2563eb; background: #f1f5f9; }
.ep-tab.active { color: #2563eb; border-bottom-color: #2563eb; background: #f3f7ff; }
.ep-tab i { font-size: 13px; }

/* ── Panels ── */
.ep-panel { display: block; }
.ep-panel.hidden { display: none; }

/* ── Loading ── */
.ep-loading {
    text-align: center; padding: 60px 20px; color: #94a3b8;
    font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 10px;
}

/* ── Form grid ── */
.ep-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.ep-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
}
.ep-section-full { grid-column: 1 / -1; }
.ep-section-hdr {
    display: flex; align-items: center; gap: 9px;
    font-size: 13px; font-weight: 700; color: #2563eb;
    text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: 16px; padding-bottom: 10px;
    border-bottom: 1.5px solid #eef2ff;
}
.ep-section-hdr i { font-size: 13px; }

/* ── Field ── */
.ep-field { display: flex; flex-direction: column; gap: 5px; }
.ep-label { font-size: 12.5px; font-weight: 600; color: #475569; }
.ep-required { color: #ef4444; margin-left: 2px; }
.ep-input {
    width: 100%; padding: 9px 12px; border: 1.5px solid #e2e8f0;
    border-radius: 9px; font-size: 13.5px; color: #0f172a;
    background: #f8fafc; transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box; font-family: inherit;
}
.ep-input:focus {
    outline: none; border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
    background: #fff;
}
select.ep-input { appearance: auto; cursor: pointer; }
.ep-mono { font-family: inherit; font-weight: 700; letter-spacing: .4px; }

/* ── Row helpers ── */
.ep-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ep-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.ep-row-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.ep-section .ep-row-2,
.ep-section .ep-row-3,
.ep-section .ep-row-4 { margin-bottom: 10px; }
.ep-section .ep-field { margin-bottom: 10px; }
.ep-section .ep-field:last-child { margin-bottom: 0; }

/* ── Submit bar ── */
.ep-submit-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
    padding: 18px 0 4px;
    border-top: 1.5px solid #e2e8f0;
    margin-top: 8px;
}
.ep-save-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg,#2563eb,#5b8ff6);
    color: #fff; border: none; border-radius: 22px;
    padding: 11px 28px; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: opacity .15s, transform .15s;
    box-shadow: 0 4px 16px rgba(99,102,241,.35);
}
.ep-save-btn:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }
.ep-save-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Message ── */
.ep-msg { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; }
.ep-msg.hidden { display: none !important; }
.ep-msg--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.ep-msg--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Photo tab ── */
.ep-photo-wrap {
    display: flex; gap: 40px; align-items: flex-start;
    padding: 10px 0 30px; flex-wrap: wrap;
}
.ep-photo-preview {
    width: 180px; height: 220px; border-radius: 14px;
    border: 2px solid #e2e8f0; overflow: hidden;
    background: #f8fafc; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.ep-photo-placeholder { color: #cbd5e1; font-size: 72px; }
.ep-photo-img { width: 100%; height: 100%; object-fit: cover; }
.ep-photo-actions { flex: 1; min-width: 220px; }
.ep-photo-title { font-size: 17px; font-weight: 700; color: #0f172a; margin: 0 0 8px; }
.ep-photo-desc { font-size: 13px; color: #64748b; margin: 0 0 18px; line-height: 1.5; }
.ep-upload-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #2563eb; color: #fff; border-radius: 22px;
    padding: 10px 22px; font-size: 13.5px; font-weight: 600;
    cursor: pointer; transition: opacity .15s;
}
.ep-upload-btn:hover { opacity: .85; }
.ep-photo-fname { margin-top: 10px; font-size: 12.5px; color: #64748b; }
.ep-photo-submit { margin-top: 14px; }

/* ── Coming soon note ── */
.ep-coming-note {
    display: flex; align-items: flex-start; gap: 10px;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px;
    padding: 14px 18px; color: #92400e; font-size: 13.5px;
    line-height: 1.55; margin-bottom: 20px;
}
.ep-coming-note i { color: #f59e0b; font-size: 16px; margin-top: 1px; flex-shrink: 0; }

/* ── Family preview in family tab ── */
.ep-fam-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; margin-top: 16px; }
.ep-fam-card {
    display: flex; align-items: flex-start; gap: 14px;
    background: #f8fafc; border: 1px solid #d1fae5;
    border-radius: 14px; padding: 16px;
}
.ep-fam-av {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg,#10b981,#059669);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 18px; box-shadow: 0 3px 10px rgba(16,185,129,.3);
}
.ep-fam-body { flex: 1; min-width: 0; }
.ep-fam-name { font-weight: 700; font-size: 14px; color: #064e3b; }
.ep-fam-rel {
    display: inline-block; margin-top: 3px;
    background: #10b981; color: #fff;
    font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px;
}
.ep-fam-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ep-fam-meta span { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #475569; }
.ep-fam-meta i { color: #10b981; font-size: 11px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .ep-row-2, .ep-row-3 { grid-template-columns: 1fr; }
    .ep-row-4 { grid-template-columns: 1fr 1fr; }
    .ep-photo-wrap { flex-direction: column; align-items: center; }
    .ep-photo-preview { width: 140px; height: 170px; }
    .ep-tabs { gap: 2px; }
    .ep-tab { padding: 9px 12px; font-size: 12.5px; }
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS PAGE  (settings.html)
═══════════════════════════════════════════════════════════════ */

/* ── Header ── */
.st-page-hdr   { display:flex; align-items:center; gap:16px; margin-bottom:32px; }
.st-page-icon  { font-size:32px; color:var(--primary-color); }
.st-page-title { margin:0; font-size:22px; font-weight:700; color:var(--dark-text); }
.st-page-sub   { margin:4px 0 0; color:var(--secondary-color); font-size:14px; }

/* ── Back button ── */
.st-back-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: #f1f5f9; color: var(--dark-text); text-decoration: none;
    font-size: 14px; flex-shrink: 0; transition: background .2s;
}
.st-back-btn:hover { background: #e2e8f0; }

/* ── Page icon (sub-pages) ── */
.st-page-icon-wrap {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.st-page-icon--email { background: #dbeafe; color: #2563eb; }
.st-page-icon--bell  { background: #fef3c7; color: #d97706; }

/* ── Settings group ── */
.st-group { margin-bottom: 28px; }
.st-group-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--secondary-color);
    margin-bottom: 10px; padding: 0 4px;
}

/* ── Menu item (hub rows) ── */
.st-menu-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; background: #f8fafc;
    border: 1.5px solid var(--border-color); border-radius: 12px;
    text-decoration: none; color: inherit; cursor: pointer;
    transition: border-color .15s, background .15s;
    margin-bottom: 10px;
}
.st-menu-item:hover { border-color: var(--primary-color); background: #f5f8ff; }

.st-menu-icon-wrap {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.st-menu-icon--email { background: #dbeafe; color: #2563eb; }
.st-menu-icon--bell  { background: #fef3c7; color: #d97706; }

.st-menu-body  { flex: 1; min-width: 0; }
.st-menu-title { font-weight: 700; font-size: 15px; color: var(--dark-text); }
.st-menu-sub   { font-size: 12.5px; color: var(--secondary-color); margin-top: 2px; }
.st-menu-arrow { font-size: 13px; color: #94a3b8; flex-shrink: 0; }

/* ── Info card (in hub) ── */
.st-info-card { background: #f8fafc; border: 1.5px solid var(--border-color); border-radius: 12px; padding: 18px; }

/* ── Section card ── */
.st-section      { background:#f8fafc; border-radius:12px; padding:24px; margin-bottom:24px; border:1px solid var(--border-color); }
.st-section--info { background:#fff; }
.st-section-hdr  { display:flex; align-items:center; gap:16px; margin-bottom:20px; }
.st-section-icon { font-size:20px; color:var(--primary-color); width:24px; text-align:center; }
.st-section-title{ font-weight:700; font-size:16px; color:var(--dark-text); }
.st-section-sub  { font-size:13px; color:var(--secondary-color); margin-top:2px; }

/* ── Toggle switch ── */
.st-toggle { position:relative; display:inline-block; width:48px; height:26px; margin-left:auto; flex-shrink:0; }
.st-toggle input { opacity:0; width:0; height:0; }
.st-toggle-slider { position:absolute; inset:0; background:#cbd5e1; border-radius:26px; cursor:pointer; transition:.3s; }
.st-toggle-slider:before { content:''; position:absolute; width:20px; height:20px; left:3px; bottom:3px; background:white; border-radius:50%; transition:.3s; }
.st-toggle input:checked + .st-toggle-slider { background:var(--primary-color); }
.st-toggle input:checked + .st-toggle-slider:before { transform:translateX(22px); }

/* ── Email body ── */
.st-email-body         { margin-top:4px; }
.st-email-body--hidden { display:none; }

/* ── Field group & inputs ── */
.st-field-group { margin-bottom:20px; }
.st-label   { display:block; font-weight:600; color:var(--dark-text); font-size:14px; margin-bottom:8px; }
.st-label i { color:var(--primary-color); margin-right:4px; }
.st-input   { width:100%; padding:12px 14px; border:1.5px solid var(--border-color); border-radius:8px; font-size:14px; font-family:inherit; transition:border .2s; box-sizing:border-box; }
.st-input:focus { outline:none; border-color:var(--primary-color); box-shadow:0 0 0 3px rgba(99,102,241,.12); }
.st-email-row { display:flex; gap:10px; align-items:center; }
.st-email-row .st-input { flex:1; }
.st-hint { font-size:12px; color:var(--secondary-color); margin:6px 0 0; }

/* ── Buttons ── */
.st-btn-test  { padding:11px 16px; background:white; border:1.5px solid var(--primary-color); color:var(--primary-color); border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap; transition:all .2s; }
.st-btn-test:hover  { background:var(--primary-color); color:white; }
.st-btn-save  { padding:12px 24px; background:var(--primary-color); color:white; border:none; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; transition:background .2s; }
.st-btn-save:hover  { background:var(--primary-dark,#4338ca); }
.st-btn-save:disabled { opacity:.6; cursor:not-allowed; }
.st-btn-check { padding:10px 18px; background:#f1f5f9; border:1.5px solid var(--border-color); color:var(--dark-text); border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; transition:all .2s; }
.st-btn-check:hover { background:#e2e8f0; }
.st-save-row  { display:flex; align-items:center; gap:16px; margin-top:8px; padding-top:20px; border-top:1px solid var(--border-color); }
.st-save-msg      { font-size:13px; font-weight:600; }
.st-save-msg--ok  { color:#059669; }
.st-save-msg--err { color:#dc2626; }

/* ── Category list ── */
.st-categories   { display:flex; flex-direction:column; gap:10px; }
.st-cat-loading  { color:var(--secondary-color); font-size:13px; }
.st-cat-item     { display:flex; align-items:flex-start; gap:12px; padding:12px 14px; background:white; border:1.5px solid var(--border-color); border-radius:8px; cursor:pointer; transition:border .15s; }
.st-cat-item:hover { border-color:#60a5fa; }
.st-cat-cb   { margin-top:2px; width:16px; height:16px; accent-color:var(--primary-color); cursor:pointer; flex-shrink:0; }
.st-cat-info { display:flex; flex-direction:column; gap:2px; }
.st-cat-name { font-weight:600; font-size:14px; color:var(--dark-text); }
.st-cat-desc { font-size:12px; color:var(--secondary-color); }

/* ── Notify preference list ── */
.st-notify-list { display:flex; flex-direction:column; gap:10px; margin-bottom:4px; }
.st-notify-item {
    display:flex; align-items:center; gap:14px;
    padding:14px 16px; background:white;
    border:1.5px solid var(--border-color); border-radius:10px;
}
.st-notify-icon-wrap {
    width:38px; height:38px; border-radius:9px;
    display:flex; align-items:center; justify-content:center;
    font-size:16px; flex-shrink:0;
}
.st-notify-icon--schedule   { background:#dbeafe; color:#2563eb; }
.st-notify-icon--tuition    { background:#dcfce7; color:#16a34a; }
.st-notify-icon--reg        { background:#dbeafe; color:#2563eb; }
.st-notify-icon--news       { background:#fef3c7; color:#d97706; }
.st-notify-body  { flex:1; min-width:0; }
.st-notify-title { font-weight:600; font-size:14px; color:var(--dark-text); }
.st-notify-sub   { font-size:12.5px; color:var(--secondary-color); margin-top:2px; }

/* ── Info grid ── */
.st-info-grid  { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.st-info-item  { display:flex; flex-direction:column; gap:2px; }
.st-info-label { font-size:12px; color:var(--secondary-color); font-weight:500; }
.st-info-val   { font-size:14px; font-weight:600; color:var(--dark-text); }

/* ── Settings responsive ── */
@media (max-width: 480px) {
    .st-info-grid { grid-template-columns: 1fr; }
    .st-email-row { flex-direction: column; }
    .st-email-row .st-input { width: 100%; }
}

/* ── Refactored Dashboard Clean Classes ── */
.dv2-nb-link-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dv2-nb-link-all {
    font-size: 13px;
    font-weight: 500;
    color: #3b82f6;
    text-decoration: none;
}

.dv2-lms-hdr-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dv2-nb-badge--active {
    background: #dbeafe;
    color: #2563eb;
}

.dv2-lms-timeline-hdr {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 10px 4px;
}

.dv2-lms-timeline-dot {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #dbeafe;
}

.dv2-lms-timeline-text {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.5px;
}

.dv2-lms-card {
    margin-left: 16px;
    position: relative;
    display: block;
    text-decoration: none;
}

.dv2-lms-card-line {
    position: absolute;
    left: -16px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
    margin-left: 3px;
}
