/* ==========================================================================
   BRAIN STORMERS DESIGN SYSTEM & UTILITY STYLES
   ========================================================================== */

:root {
    /* Dark Theme Core Variables */
    --bg-app: #080c14;
    --bg-sidebar: #0e1422;
    --bg-card: #141b2d;
    --bg-card-hover: #1b253e;
    --bg-input: #0b0f1a;

    --border-color: rgba(255, 255, 255, 0.05);
    --border-color-hover: rgba(255, 255, 255, 0.12);

    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Branding Accents */
    --primary: #6366f1;
    /* Indigo */
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.15);

    --success: #10b981;
    /* Emerald */
    --success-bg: rgba(16, 185, 129, 0.08);
    --success-border: rgba(16, 185, 129, 0.2);

    --warning: #f59e0b;
    /* Amber */
    --warning-bg: rgba(245, 158, 11, 0.08);
    --warning-border: rgba(245, 158, 11, 0.2);

    --danger: #f43f5e;
    /* Rose */
    --danger-bg: rgba(244, 63, 94, 0.08);

    /* Typography & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --sidebar-width: 250px;

    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.1);

    --transition-speed: 0.22s;
    --transition-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-app: #f4f6fa;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f7ff;
    --bg-input: #f1f4f8;

    --border-color: rgba(99, 102, 241, 0.08);
    --border-color-hover: rgba(99, 102, 241, 0.16);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #8393a7;

    --primary: #4f46e5;
    --primary-hover: #3730a3;
    --primary-glow: rgba(79, 70, 229, 0.08);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.06);
    --success-border: rgba(16, 185, 129, 0.15);

    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.06);
    --warning-border: rgba(217, 119, 6, 0.15);

    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.06);
    --danger-border: rgba(239, 68, 68, 0.15);

    --shadow-soft: 0 10px 30px rgba(79, 70, 229, 0.05), 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 0 25px rgba(79, 70, 229, 0.1);
}

/* General Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

h1,
h2,
h3,
h4,
.brand-info h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

/* App Grid Setup */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR & NAVIGATION
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 35px;
}

a.sidebar-brand.brand-home-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity var(--transition-speed);
}

a.sidebar-brand.brand-home-link:hover {
    opacity: 0.88;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.brand-info h1 {
    font-size: 19px;
    line-height: 1;
    letter-spacing: -0.5px;
}

.brand-info span {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed);
}

.nav-item i {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
}

.nav-item.active {
    color: white;
    background-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.sidebar-footer {
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.class-badge {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ==========================================================================
   MAIN DASHBOARD WORKSPACE
   ========================================================================== */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    max-width: calc(100vw - var(--sidebar-width));
}

/* Top bar navigation */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 20px;
}

.header-search {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 520px;
    width: 100%;
}

.header-search input {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 11px 16px 11px 40px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-speed);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    background-color: var(--bg-input);
}

[data-theme="light"] .header-search input:focus {
    background-color: #ffffff;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ==========================================================================
   BUTTON SYSTEM
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-hover);
}

.btn-success {
    background-color: var(--success);
    color: white;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.btn-icon-only {
    padding: 10px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
}

.notif-btn {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-app);
    line-height: 1;
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notif-item {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.notif-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
}

.notif-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.notif-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-empty {
    margin-top: 10px;
}

/* ==========================================================================
   ANALYTICS GRID
   ========================================================================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    position: relative;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 22px;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 14px;
    overflow: hidden;
    transition: transform var(--transition-speed) var(--transition-elastic), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-soft);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: var(--bg-app);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

.revenue .stat-icon {
    color: #818cf8;
    background-color: rgba(129, 140, 248, 0.08);
}

.collected .stat-icon {
    color: var(--success);
    background-color: var(--success-bg);
}

.outstanding .stat-icon {
    color: #f59e0b;
    background-color: var(--warning-bg);
}

.books .stat-icon {
    color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.08);
}

.stat-details {
    z-index: 2;
}

.stat-details h3 {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2px;
}

.stat-percent,
.stat-subtext {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.card-bg-gradient {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
    z-index: 1;
    pointer-events: none;
}

.revenue .card-bg-gradient {
    background: radial-gradient(circle, rgba(129, 140, 248, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
}

.collected .card-bg-gradient {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
}

.outstanding .card-bg-gradient {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
}

/* ==========================================================================
   INTERACTIVE WORKSPACE PANELS
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2.85fr 1.15fr;
    gap: 20px;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.card-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.header-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.registry-filters {
    display: flex;
    gap: 6px;
}

.filter-chip {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.filter-chip:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.filter-chip.active {
    background-color: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary);
}

/* ==========================================================================
   REGISTRY TABLE STYLING
   ========================================================================== */
/* Widen the Student & School Info column */
.premium-table th:first-child,
.premium-table td:first-child {
    min-width: 170px;
    width: 24%;
}

/* Ensure long names wrap gracefully if space is limited */
.student-meta h4 {
    white-space: normal;
    line-height: 1.3;
}

.table-container {
    position: relative;
    overflow-x: auto;
    width: 100%;
}

/* Custom sleek scrollbar for table container */
.table-container::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .table-container::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.12);
}

[data-theme="light"] .table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 70, 229, 0.25);
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th {
    padding: 12px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.premium-table td {
    padding: 12px 8px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

/* Row Hovering & Row Interactive Clicking */
.premium-table tbody tr {
    transition: background-color var(--transition-speed);
    cursor: pointer;
}

.premium-table tbody tr:hover {
    background-color: var(--bg-card-hover);
}

/* Column 1: Student Identity Details */
.student-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--bg-app);
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: 2px solid var(--border-color);
}

.student-meta h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 1px;
}

.student-meta span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Column 2: Fee progress bars */
.fee-cell {
    min-width: 110px;
}

.fee-total {
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 13px;
}

.fee-progress-container {
    width: 100%;
    height: 4px;
    background-color: var(--bg-app);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 3px;
}

.fee-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    width: 0%;
    transition: width 0.4s ease-out;
}

.fee-summary-text {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Column 3: Outstanding Dues */
.due-cell {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.due-cell.has-due {
    color: var(--warning);
}

.due-cell.paid {
    color: var(--success);
}

/* Column 4: Textbooks list */
.books-cell {
    display: flex;
    gap: 4px;
    align-items: center;
    min-width: 120px;
}

.book-pill {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.book-pill.provided {
    background-color: var(--success-bg);
    color: var(--success);
    border-color: var(--success-border);
}

.book-pill.due {
    background-color: var(--warning-bg);
    color: var(--warning);
    border-color: var(--warning-border);
}

/* Column 5: Latest Slip/Receipt Pill */
.receipt-cell {
    font-size: 12px;
}

.receipt-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    padding: 3px 7px;
    border-radius: var(--radius-sm);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--text-secondary);
}

.receipt-pill i {
    font-size: 9px;
    color: var(--text-muted);
}

/* Row Action CTAs */
.action-buttons {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.action-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-app);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.action-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-color-hover);
    background-color: var(--bg-card-hover);
}

.action-btn.pay:hover {
    background-color: var(--success-bg);
    color: var(--success);
    border-color: var(--success);
}

.action-btn.delete:hover {
    background-color: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger);
}

/* Empty Registry state */
.empty-state {
    padding: 50px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.empty-icon {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.empty-state h3 {
    font-size: 17px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 320px;
    line-height: 1.5;
}

/* ==========================================================================
   RECEIPTS RECENT LOGS TIMELINE PANEL
   ========================================================================== */
.timeline-card {
    height: 100%;
}

.timeline-container {
    padding: 20px;
    overflow-y: auto;
    max-height: 620px;
}

/* Premium sleek scrollbar for transaction timeline */
.timeline-container::-webkit-scrollbar {
    width: 6px;
}

.timeline-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 99px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 99px;
    transition: background var(--transition-speed);
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .timeline-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.01);
}

[data-theme="light"] .timeline-container::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.12);
}

[data-theme="light"] .timeline-container::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 70, 229, 0.25);
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(to bottom, var(--success), rgba(99, 102, 241, 0.15));
    opacity: 0.35;
}

.timeline-item {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.timeline-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--success);
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.timeline-item:hover .timeline-marker {
    color: #ffffff;
    background: linear-gradient(135deg, var(--success), #059669);
    border-color: var(--success);
    box-shadow: 0 0 12px var(--success-border), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transform: scale(1.08);
}

.timeline-details {
    flex-grow: 1;
    background-color: rgba(20, 27, 45, 0.45);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--success);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .timeline-details {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.03);
}

.timeline-item:hover .timeline-details {
    border-color: var(--border-color-hover);
    border-left-color: var(--primary);
    background-color: var(--bg-card-hover);
    transform: translateX(5px) translateY(-1px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25), 0 0 15px rgba(99, 102, 241, 0.05);
}

[data-theme="light"] .timeline-item:hover .timeline-details {
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.06), 0 0 15px rgba(99, 102, 241, 0.03);
}

.timeline-details::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.timeline-item:hover .timeline-details::before {
    opacity: 1;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.timeline-student {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.timeline-amount {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--success);
    background: rgba(16, 185, 129, 0.06);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

[data-theme="light"] .timeline-amount {
    background: rgba(16, 185, 129, 0.05);
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.timeline-receipt {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 10px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    color: #818cf8 !important;
    padding: 3px 8px;
    border-radius: 20px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-speed) ease;
}

[data-theme="light"] .timeline-receipt {
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--primary) !important;
}

.timeline-receipt:hover {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
    transform: translateY(-0.5px);
}

/* ==========================================================================
   MODALS COMPONENT
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(5, 7, 12, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease-in-out;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 580px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transform: scale(0.96);
    transition: transform var(--transition-speed) var(--transition-elastic);
}

.modal-backdrop.active .modal-container {
    transform: scale(1);
}

.modal-small {
    width: 430px;
}

.modal-medium {
    width: 760px;
}

.modal-large {
    width: 860px;
    max-width: calc(100vw - 32px);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-speed);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Forms layout & Selects */
.form-row {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.col-8 {
    width: 66.66%;
}

.col-4 {
    width: 33.33%;
}

.col-6 {
    width: 50%;
}

.col-12 {
    width: 100%;
}

.label-hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 10px;
}

.course-detail-trigger-group {
    margin-bottom: 14px;
}

.course-detail-trigger-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.receipt-no-field {
    display: flex;
    gap: 8px;
    align-items: center;
}

.receipt-no-field input {
    flex: 1;
    min-width: 0;
}

.books-static-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

body.portal-no-books .profile-grid-section {
    grid-template-columns: 1fr;
}

body.portal-no-books .finance-sub-card {
    grid-column: 1 / -1;
}

.course-detail-summary {
    flex: 1;
    min-width: 200px;
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.45;
}

.course-detail-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.course-detail-block {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.course-detail-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 15px;
    font-weight: 600;
    color: #8b2942;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

[data-theme="light"] .course-detail-title {
    color: #7a1f38;
}

.course-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.course-detail-col {
    padding: 12px 14px;
    border-right: 1px solid var(--border-color);
}

.course-detail-col:last-child {
    border-right: none;
}

.course-detail-col h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.course-check-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.course-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.course-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.course-check-child {
    padding-left: 28px;
    font-size: 12px;
}

.course-check-others {
    flex-wrap: wrap;
}

.course-others-input {
    flex: 1;
    min-width: 120px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 4px 8px;
    font-size: 12px;
}

@media (max-width: 640px) {
    .course-detail-grid {
        grid-template-columns: 1fr;
    }

    .course-detail-col {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .course-detail-col:last-child {
        border-bottom: none;
    }
}

.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.required {
    color: var(--danger);
    margin-left: 2px;
}

.form-group input,
.form-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 9px 12px;
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-speed);
    width: 100%;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 32px;
}

.form-select option,
select option {
    background-color: var(--bg-card, #141b2d);
    color: var(--text-primary, #f9fafb);
}

.form-group input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.field-hint {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Textbook quick toggle grid */
.book-delivery-section {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 20px;
}

.book-delivery-section h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.section-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.book-toggle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.book-checkbox-card {
    cursor: pointer;
}

.book-checkbox-card input {
    display: none;
}

.checkbox-inner {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-speed);
}

.book-icon {
    font-size: 18px;
    color: var(--text-muted);
    transition: all var(--transition-speed);
}

.checkbox-inner span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.book-checkbox-card input:checked+.checkbox-inner {
    border-color: var(--success);
    background-color: var(--success-bg);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.08);
}

.book-checkbox-card input:checked+.checkbox-inner .book-icon {
    color: var(--success);
    transform: scale(1.08);
}

.book-checkbox-card input:checked+.checkbox-inner span {
    color: var(--success);
}

/* Payment helper stats panel */
.student-payment-info {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.info-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.info-val {
    font-size: 14px;
    font-weight: 700;
}

.outstanding-due-text {
    color: var(--warning);
    font-family: 'Space Grotesk', sans-serif;
}

/* Interactive book delivery checklist modal */
.modal-intro {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.book-list-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.book-check-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.book-check-item:hover {
    border-color: var(--border-color-hover);
    background-color: var(--bg-card-hover);
}

.book-check-item input {
    display: none;
}

.custom-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    transition: all var(--transition-speed);
}

.custom-check::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: white;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.book-check-item input:checked+.custom-check {
    background-color: var(--success);
    border-color: var(--success);
}

.book-check-item input:checked+.custom-check::after {
    opacity: 1;
}

.book-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.book-name {
    font-size: 13px;
    font-weight: 700;
}

.book-desc {
    font-size: 10px;
    color: var(--text-muted);
}

/* ==========================================================================
   PHYSICAL RECEIPTS VOUCHERS (SAME TO SAME LIKE REC.JPEG)
   ========================================================================== */
.money-receipt-wrapper {
    background-color: white;
    color: #111827;
    /* Dark text for paper legibility */
    padding: 30px;
    border-radius: 4px;
    border: 1px dashed #d1d5db;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-family: Arial, sans-serif;
    position: relative;
}

/* Header layout receipt */
.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.rec-header-left {
    display: flex;
    flex-direction: column;
}

.rec-brand-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    font-family: 'Space Grotesk', sans-serif;
}

.rec-brand-subtitle {
    font-size: 11px;
    color: #4b5563;
    font-weight: 600;
    margin-top: 1px;
}

.rec-header-middle {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.rec-sl-label {
    font-size: 10px;
    font-weight: 800;
    color: #4b5563;
    letter-spacing: 0.5px;
}

.rec-sl-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #ef4444;
    /* Red print color for serial number */
}

.rec-pill-receipt {
    border: 1px solid #111827;
    border-radius: 12px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.rec-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.rec-copy-badge {
    border: 1px solid #b91c1c;
    color: #b91c1c;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Individual digit boxes for dates */
.rec-date-grid {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rec-date-label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.rec-date-boxes {
    display: flex;
    gap: 1px;
}

.rec-date-boxes span {
    width: 22px;
    height: 24px;
    border: 1px solid #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

/* Details dotted rows */
.rec-details-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.rec-detail-row {
    display: flex;
    align-items: center;
    width: 100%;
    font-size: 13px;
}

.rec-flex-row {
    gap: 15px;
}

.rec-col-4 {
    width: 30%;
    display: flex;
    align-items: center;
}

.rec-col-8 {
    width: 70%;
    display: flex;
    align-items: center;
}

.rec-col-6 {
    width: 50%;
    display: flex;
    align-items: center;
}

.rec-field-label {
    font-weight: 700;
    color: #374151;
    margin-right: 8px;
    flex-shrink: 0;
}

.rec-field-value {
    flex-grow: 1;
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
    padding: 0 4px;
}

.rec-dotted-line {
    border-bottom: 1px dotted #4b5563;
    min-height: 20px;
}

/* Class checkbox lines */
.rec-checkbox-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.rec-box-item {
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
    color: #374151;
}

.rec-box-item i {
    font-size: 12px;
    color: #111827;
}

/* Grid checklist Table identical to rec.jpeg */
.rec-grid-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 1px solid #111827;
}

.rec-grid-table th {
    border: 1px solid #111827;
    background-color: #f3f4f6;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.rec-grid-table th.col-main {
    width: 72%;
    text-align: center;
}

.rec-grid-table th.col-amt {
    width: 28%;
    text-align: center;
}

.rec-grid-table td {
    border: 1px solid #111827;
    padding: 8px 10px;
    font-size: 12px;
}

/* Internal sub-tables of checklist columns */
.td-checks-grid {
    padding: 0 !important;
}

.rec-sub-table {
    display: flex;
    width: 100%;
    min-height: 140px;
}

.rec-sub-left {
    width: 40%;
    border-right: 1px solid #111827;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rec-sub-right {
    width: 100%;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    align-content: start;
}

.rec-check-pill {
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #374151;
}

.rec-check-pill i {
    font-size: 12px;
    color: #111827;
}

.rec-row-header-divider {
    background-color: #f9fafb;
}

.rec-row-header-divider td {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid #111827 !important;
    padding: 3px !important;
    letter-spacing: 0.5px;
}

.vertical-valign {
    vertical-align: middle;
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.td-amt-fill {
    background-color: #fafafa;
}

/* Aligned calculation summary elements on receipt right */
.rec-sum-label-cell {
    text-align: right;
    font-weight: 800;
    padding: 6px 12px !important;
    background-color: #f9fafb;
    text-transform: uppercase;
    font-size: 11px;
}

.rec-sum-val-cell {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 800;
    background-color: #fafafa;
    padding: 6px 10px !important;
}

.font-bold {
    font-weight: 800;
}

/* Slip codes, dates footer rows */
.rec-bottom-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.rec-bottom-left {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rec-bottom-row {
    display: flex;
    align-items: center;
    width: 100%;
    font-size: 12px;
}

/* Iconic bottom contact banner and signatures */
.rec-footer-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.rec-footer-contact {
    background-color: #0f766e;
    /* Dark Teal-Green banner like image */
    color: white;
    font-weight: 800;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 2px;
    letter-spacing: 0.5px;
    font-family: 'Space Grotesk', sans-serif;
}

.rec-signature-box {
    width: 180px;
    border: 1.5px solid #111827;
    height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    font-size: 8px;
    font-weight: 700;
    color: #6b7280;
    padding: 4px 8px 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.rec-signature-box .signature-name {
    font-family: 'Brush Script MT', 'Segoe Script', cursive;
    font-size: 0.95rem !important;
    font-weight: bold;
    color: #1e3a8a;
    line-height: 1.1;
    margin-bottom: 1px;
    text-align: center;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   STUDENT DETAILED PROFILE POPUP DIALOG
   ========================================================================== */
.profile-header-block {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.profile-avatar-large {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: white;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--primary-glow);
    flex-shrink: 0;
}

.profile-main-meta {
    flex-grow: 1;
}

.profile-main-meta h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.prof-tag {
    display: inline-block;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-right: 4px;
}

.prof-tag strong {
    color: var(--text-primary);
}

.profile-contact-btn .btn {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* Sub-card grid layout details modal */
.profile-grid-section {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-card-sub {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
}

.profile-card-sub h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

/* Radial progress chart ring details */
.prof-ring-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Circular progress chart radial indicators */
.profile-card-sub.finance-sub-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.prof-ring-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.prof-progress-radial {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.radial-svg {
    width: 100%;
    height: 100%;
}

.radial-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 7;
}

[data-theme="light"] .radial-bg {
    stroke: rgba(0, 0, 0, 0.05);
}

.radial-bar {
    fill: none;
    stroke: var(--success);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 263.89;
    stroke-dashoffset: 263.89;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 4px var(--success-glow, rgba(16, 185, 129, 0.3)));
}

.radial-center {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.prof-pct-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.prof-sub-title {
    font-size: 8px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.prof-radial-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radial-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding-bottom: 4px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .radial-row {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.03);
}

.radial-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.radial-row span:first-child {
    font-weight: 500;
    color: var(--text-muted);
}

.radial-row span:last-child,
.radial-row strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-left: 8px;
}

.radial-row strong.text-success {
    color: #10b981 !important;
}

.radial-row strong.text-warning {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

[data-theme="light"] .radial-row strong.text-warning {
    background: rgba(245, 158, 11, 0.05);
}

/* Class 5 Textbook checklists grid modal */
.prof-books-checklist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.prof-book-check-card {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.p-book-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.prof-book-check-card h4 {
    font-size: 11px;
    font-weight: 700;
    flex-grow: 1;
}

.prof-book-status {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 20px;
}

/* Color states textbook cards */
.prof-book-check-card.provided {
    border-color: var(--success-border);
}

.prof-book-check-card.provided .p-book-icon {
    color: var(--success);
    background-color: var(--success-bg);
}

.prof-book-check-card.provided .prof-book-status {
    background-color: var(--success-bg);
    color: var(--success);
}

.prof-book-check-card.pending {
    border-color: var(--warning-border);
}

.prof-book-check-card.pending .p-book-icon {
    color: var(--warning);
    background-color: var(--warning-bg);
}

.prof-book-check-card.pending .prof-book-status {
    background-color: var(--warning-bg);
    color: var(--warning);
}

/* History Ledger inside Details Modal */
.profile-ledger-section h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.prof-table-wrap {
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.prof-ledger-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.prof-ledger-table th {
    background-color: var(--bg-input);
    padding: 8px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.prof-ledger-table td {
    padding: 9px 8px;
    font-size: 11px;
    border-bottom: 1px solid var(--border-color);
}

.prof-ledger-table tbody tr {
    transition: background-color var(--transition-speed);
}

.prof-ledger-table tbody tr:hover {
    background-color: var(--bg-card-hover);
}

/* ==========================================================================
   TOAST NOTIFICATION COMPONENT
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
}

.toast {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    transform: translateY(20px);
    opacity: 0;
    animation: toast-in 0.28s var(--transition-elastic) forwards;
}

@keyframes toast-in {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */

@media (max-width: 1280px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .timeline-card {
        height: auto;
    }
}

@media (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 68px;
        padding: 16px 8px;
    }

    .sidebar-brand .brand-info,
    .sidebar-nav span,
    .sidebar-footer .class-badge span:not(.pulse-dot) {
        display: none;
    }

    .sidebar-brand {
        justify-content: center;
        margin-bottom: 24px;
    }

    .sidebar-nav {
        align-items: center;
    }

    .nav-item {
        padding: 10px;
        justify-content: center;
    }

    .main-content {
        margin-left: 68px;
        max-width: calc(100vw - 68px);
        padding: 20px;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .header-search {
        width: 100%;
    }

    .header-actions {
        justify-content: space-between;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .registry-filters {
        overflow-x: auto;
        width: 100%;
        padding-bottom: 4px;
    }

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

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .book-toggle-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .col-8,
    .form-row .col-4,
    .form-row .col-6 {
        width: 100%;
    }

    .modal-container {
        border-radius: var(--radius-md);
    }

    .modal-body {
        padding: 14px;
    }

/* Inline 3-column classes */
.rec-three-col-row {
    display: flex;
    gap: 8px;
}
.rec-col-inline {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.rec-col-inline .rec-field-label {
    flex-shrink: 0;
}
.rec-col-inline .rec-checkbox-row {
    flex-wrap: nowrap;
    gap: 4px;
}
}


/* ==========================================================================
   PRINT MEDIA RULES (MONEY RECEIPT SPECIFIC PRINTING)
   ========================================================================== */
@media print {
    @page {
        margin: 0;
        size: A4 portrait;
    }

    body {
        margin: 0 !important;
        padding: 0 !important;
    }

    body > *:not(#modal-invoice) {
        display: none !important;
    }

    .no-print {
        display: none !important;
    }

    #modal-invoice {
        position: static !important;
        left: auto;
        top: auto;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        background: none !important;
        backdrop-filter: none !important;
        display: flex !important;
        opacity: 1 !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .modal-container {
        position: static;
        width: 100%;
        max-width: 100%;
        max-height: none;
        overflow: visible;
        border: none !important;
        box-shadow: none !important;
        background: white !important;
        transform: none !important;
        margin: 0 auto;
        padding: 0;
    }

    .modal-body {
        padding: 10px;
    }

    #printable-invoice {
        zoom: 0.9;
    }

    .money-receipt-wrapper {
        border: 1px solid #999 !important;
        box-shadow: none !important;
        background: white !important;
        color: #111827 !important;
        width: 100%;
        max-width: 100%;
        padding: 20px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Force all receipt text to be dark by default */
    .money-receipt-wrapper,
    .money-receipt-wrapper * {
        color: #111827 !important;
    }

    /* Preserve special colored elements */
    .rec-footer-contact {
        background-color: #0f766e !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .rec-footer-contact * {
        color: white !important;
    }

    .rec-sum-label-cell,
    .rec-grid-table th,
    .rec-row-header-divider td {
        background-color: #f3f4f6 !important;
        color: #111827 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .rec-sl-value {
        color: #ef4444 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .rec-sum-val-cell.font-bold.text-danger {
        color: #dc2626 !important;
    }
}

/* ==========================================================================
   DELETE CONFIRMATION MODAL
   ========================================================================== */

/* Danger button variant */
.btn-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #dc2626 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
    font-weight: 700;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e11d48 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.45);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Delete modal container sizing */
.modal-delete-confirm-container {
    max-width: 460px;
    width: 100%;
}

/* Delete modal header with danger icon */
.delete-modal-header {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-bottom: 1px solid rgba(244, 63, 94, 0.15) !important;
    padding: 22px 24px 18px;
    position: relative;
    text-align: center;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.delete-modal-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.18) 0%, rgba(220, 38, 38, 0.12) 100%);
    border: 2px solid rgba(244, 63, 94, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    animation: delete-icon-pulse 2s ease-in-out infinite;
}

.delete-modal-icon-wrap i {
    font-size: 24px;
    color: #f43f5e;
}

@keyframes delete-icon-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.25); }
    50% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
}

.delete-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.delete-modal-header .modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

/* Delete modal body */
.delete-modal-body {
    padding: 22px 24px 16px;
}

.delete-modal-warning {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
    text-align: center;
}

.delete-modal-warning strong {
    color: var(--text-primary);
}

/* Student info card inside modal */
.delete-student-info-card {
    background: var(--bg-app);
    border: 1px solid rgba(244, 63, 94, 0.15);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
}

.delete-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    transition: background-color var(--transition-speed);
}

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

.delete-info-row:hover {
    background: var(--bg-card-hover);
}

.delete-info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.delete-info-label i {
    font-size: 11px;
    color: #f43f5e;
    opacity: 0.8;
}

.delete-info-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
}

.delete-modal-sub-warning {
    font-size: 12px;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.07);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.delete-modal-sub-warning i {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Delete modal footer */
.delete-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.delete-modal-footer .btn-secondary {
    flex: 1;
}

.delete-modal-footer .btn-danger {
    flex: 1.5;
}

/* ==========================================================================
   RECEIPT SPLIT SUMMARY SECTION
   ========================================================================== */
.rec-summary-section {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 22px;
    width: 100%;
}

.rec-summary-left {
    width: 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rec-total-box {
    border: 1.5px solid #111827;
    background-color: #f8fafc;
    border-radius: 4px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    min-height: 84px;
}

.rec-total-box-label {
    font-size: 10.5px;
    font-weight: 800;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rec-total-box-val {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 21px;
    font-weight: 900;
    color: #111827;
}

.rec-summary-right {
    width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.rec-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #111827;
    background-color: #fafafa;
    border-radius: 4px;
    padding: 6px 10px;
}

.rec-calc-label {
    font-size: 10px;
    font-weight: 800;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rec-calc-val {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #111827;
}

.rec-calc-row.rec-due-highlight {
    background-color: #fffbeb;
    border: 1.2px solid #111827;
}

.rec-calc-row.rec-due-highlight .rec-calc-label {
    color: #b45309;
}

.rec-calc-row.rec-due-highlight .rec-calc-val {
    color: #ef4444;
    font-weight: 900;
}

/* Interactive receipt link in ledger */
.receipt-link {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    color: var(--primary, #818cf8);
    cursor: pointer;
    text-decoration: none;
    transition: color var(--transition-speed, 0.2s) ease, text-shadow var(--transition-speed, 0.2s) ease;
}

.receipt-link:hover {
    color: var(--success, #10b981);
    text-shadow: 0 0 8px var(--success-glow, rgba(16, 185, 129, 0.3));
    text-decoration: underline;
}

/* Premium Neon-Green Paid Highlights */
.notif-item.paid-highlight {
    border-left: 4px solid #10b981 !important;
    background: rgba(16, 185, 129, 0.06) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15) !important;
}
[data-theme="light"] .notif-item.paid-highlight {
    background: rgba(16, 185, 129, 0.04) !important;
}
.neon-paid-badge {
    color: #10b981 !important;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   DISCOUNT PRESET COMPONENT
   ========================================================================== */
.discount-presets-grid {
    margin-top: 6px;
}

.discount-preset-card {
    position: relative;
    user-select: none;
}

.discount-preset-card input[type="radio"]:checked + .preset-inner {
    border-color: var(--primary) !important;
    background-color: var(--primary-glow) !important;
    color: var(--primary) !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
}

.discount-preset-card:hover .preset-inner {
    border-color: var(--border-color-hover);
    background-color: var(--bg-card-hover);
}

[data-theme="light"] .discount-preset-card input[type="radio"]:checked + .preset-inner {
    border-color: var(--primary) !important;
    background-color: rgba(99, 102, 241, 0.08) !important;
    color: var(--primary) !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.1) !important;
}

/* Glowing border animation for Discount Row in Student Profile */
.radial-row.discount-glow-row {
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    border-radius: var(--radius-md) !important;
    padding: 6px 10px !important;
    background: rgba(16, 185, 129, 0.04) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1) !important;
    animation: discountGlow 2.5s infinite alternate !important;
    margin: 2px 0;
}

@keyframes discountGlow {
    0% {
        box-shadow: 0 0 4px rgba(16, 185, 129, 0.15), inset 0 0 4px rgba(16, 185, 129, 0.05);
        border-color: rgba(16, 185, 129, 0.25) !important;
    }
    100% {
        box-shadow: 0 0 12px rgba(16, 185, 129, 0.5), inset 0 0 6px rgba(16, 185, 129, 0.15);
        border-color: rgba(16, 185, 129, 0.65) !important;
    }
}

/* ==========================================================================
   COLLECTED FEE SUMMARY & SUBMISSIONS
   ========================================================================== */
.collected-fee-header-box {
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.collected-fee-header-box h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    opacity: 0.9;
    color: #ffffff;
}

.collected-fee-header-box .amount-display {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 38px;
    font-weight: 700;
    color: #ffffff;
}

/* Glow effects */
.glow-gradient {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glow-red {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.65);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.glow-green {
    background: linear-gradient(135deg, #064e3b, #065f46);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.65);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .collected-fee-header-box h2 {
    color: #ffffff;
}

[data-theme="light"] .collected-fee-header-box .amount-display {
    color: #ffffff;
}

/* Inline 3-column classes */
.rec-three-col-row {
    display: flex;
    gap: 8px;
}
.rec-col-inline {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.rec-col-inline .rec-field-label {
    flex-shrink: 0;
}
.rec-col-inline .rec-checkbox-row {
    flex-wrap: nowrap;
    gap: 4px;
}
