:root {
    /* Color Palette */
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --bg-card: rgba(25, 25, 25, 0.7);
    --primary: #D4AF37;
    --primary-hover: #C5A028;
    --secondary: #1A1A1A;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(212, 175, 55, 0.2);
    
    /* Effects */
    --glass-blur: blur(12px);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.15);
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 80px;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #000000;
    /* Dotted grid + Spotlight glow */
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.15) 0%, transparent 60%),
        linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 30px 30px, 30px 30px;
    background-position: top center, 0 0, 0 0;
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 2.5rem;
    color: var(--primary);
}

.logo-icon {
    background: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    -webkit-text-fill-color: white;
    box-shadow: var(--shadow-glow);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-3 { margin-bottom: 0.75rem; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--text-main);
}

.nav-item.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.nav-item.active i {
    color: var(--primary);
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: auto;
}

.badge-primary { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-success { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-neutral { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

.pulse {
    background: var(--danger);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

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

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Topbar */
.topbar {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 5;
}

.page-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.page-title p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 6px;
    height: 6px;
    background: var(--danger);
    border-radius: 50%;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chevron {
    color: var(--text-muted);
}

/* Views */
.views-container {
    padding: 2.5rem;
    flex: 1;
}

.view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Shared Components */
.glass-card {
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-block {
    width: 100%;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

.btn-text:hover {
    text-decoration: underline;
}

.icon-btn-small {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn-small:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.icon-btn-small.danger:hover {
    background: var(--danger);
    border-color: var(--danger);
}

.glass-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    transition: all 0.3s;
}

.glass-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.glass-input i {
    color: var(--text-muted);
}

.glass-input input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 0.8rem;
    font-family: inherit;
    width: 100%;
    outline: none;
}

.glass-input-field {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    padding: 0.8rem 1rem;
    font-family: inherit;
    width: 100%;
    outline: none;
    transition: all 0.3s;
}

.glass-input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Dashboard Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-icon.blue { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; }

.stat-details h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.stat-trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-trend.positive { color: var(--success); }
.stat-trend.neutral { color: var(--text-muted); }

.dashboard-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.2rem;
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.session-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s;
}

.session-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

.session-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 1rem;
}

.session-date .day { font-size: 1.2rem; font-weight: 700; line-height: 1; }
.session-date .month { font-size: 0.7rem; text-transform: uppercase; }

.session-info { flex: 1; }
.session-info h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.session-info p { font-size: 0.8rem; color: var(--text-muted); }

.session-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-right: 1rem;
}
.session-status.closed { background: rgba(255,255,255,0.05); color: var(--text-muted); }

.session-attendance {
    font-weight: 600;
    font-size: 1.1rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn i {
    font-size: 1.8rem;
    color: var(--primary);
}

.action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

/* Tables */
.view-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-header-actions .search-bar {
    width: 300px;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.student-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Live Attendance View */
.live-attendance-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    height: calc(100vh - var(--header-height) - 5rem);
}

.camera-section {
    display: flex;
    flex-direction: column;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.camera-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.camera-status.live {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.camera-status.live .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.camera-viewfinder {
    flex: 1;
    background: #000;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#webcam-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.scanning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: none;
}

.scan-line {
    width: 100%;
    height: 2px;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    position: absolute;
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.corners span {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.corners .tl { top: 10%; left: 10%; border-right: none; border-bottom: none; }
.corners .tr { top: 10%; right: 10%; border-left: none; border-bottom: none; }
.corners .bl { bottom: 10%; left: 10%; border-right: none; border-top: none; }
.corners .br { bottom: 10%; right: 10%; border-left: none; border-top: none; }

.camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
}

.camera-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.recognition-log {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.log-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-right: 0.5rem;
}

.log-list::-webkit-scrollbar { width: 4px; }
.log-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.log-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    padding: 0.8rem;
    border-radius: 10px;
    border-left: 3px solid var(--success);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.log-item.empty-state {
    flex-direction: column;
    border: 1px dashed var(--border);
    justify-content: center;
    height: 150px;
    color: var(--text-muted);
    background: transparent;
}

.log-info { flex: 1; }
.log-name { font-weight: 600; font-size: 0.9rem; }
.log-nim { font-size: 0.75rem; color: var(--text-muted); }
.log-time { font-size: 0.75rem; color: var(--text-muted); }

/* Face Registration View */
.registration-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.capture-viewfinder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#reg-webcam {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.registration-capture.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.capture-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.progress-bar-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

/* Student History View */
.history-search {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
}

.search-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2.5rem;
}

.search-input-group {
    display: flex;
    gap: 1rem;
}

.student-profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.student-profile-header img {
    border-radius: 16px;
}

.profile-info h2 { margin-bottom: 0.2rem; }
.profile-info p { color: var(--text-muted); }

.attendance-summary {
    display: flex;
    gap: 2rem;
    margin-left: auto;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-item .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.summary-item .value { font-size: 1.5rem; font-weight: 700; }

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideUp 0.3s ease forwards;
}

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

.toast i { font-size: 1.2rem; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.info i { color: var(--primary); }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE MOBILE STYLES
   ============================================================ */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 1000;
        padding: 8px 5px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 15px));
        border-right: none;
        border-top: 1px solid var(--border);
        flex-direction: row;
        justify-content: space-around;
        background: rgba(15, 23, 42, 0.97);
        backdrop-filter: blur(15px);
    }

    .logo, .sidebar-footer, .nav-label {
        display: none !important;
    }

    .nav-menu {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        gap: 0;
    }

    .nav-item {
        flex-direction: column;
        padding: 6px 4px;
        font-size: 0.65rem;
        gap: 3px;
        justify-content: center;
        align-items: center;
        position: relative;
        cursor: pointer;
        touch-action: manipulation;
        z-index: 1001;
        border-left: none !important;
        border-radius: 8px;
        flex: 1;
    }

    .nav-item.active {
        background: rgba(99, 102, 241, 0.15);
        border-left: none !important;
    }

    .nav-item i {
        font-size: 1.3rem;
        margin-right: 0;
    }
    
    .nav-item .badge {
        position: absolute;
        top: 0;
        right: 10px;
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .main-content {
        padding: 12px;
        padding-bottom: 85px;
    }

    /* === TOPBAR === */
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        margin-bottom: 15px;
    }

    .topbar h1 {
        font-size: 1.3rem;
    }

    .topbar .subtitle {
        font-size: 0.8rem;
    }

    /* === STATS GRID === */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 12px 15px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-details h3 {
        font-size: 0.8rem;
    }

    /* === DASHBOARD CONTENT === */
    .dashboard-content-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-header {
        margin-bottom: 1rem;
    }

    .card-header h2 {
        font-size: 1rem;
    }

    /* === SESSION ITEMS (Dashboard recent) === */
    .session-item {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }

    .session-date {
        width: 42px;
        height: 42px;
        margin-right: 10px;
        flex-shrink: 0;
    }

    .session-date .day {
        font-size: 1rem;
    }

    .session-date .month {
        font-size: 0.6rem;
    }

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

    .session-info h4 {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .session-info p {
        font-size: 0.75rem;
    }

    .session-status {
        font-size: 0.7rem;
        padding: 2px 6px;
        margin-right: 5px;
    }

    .session-attendance {
        font-size: 0.95rem;
    }

    /* === VIEW HEADER ACTIONS (search + button) === */
    .view-header-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .view-header-actions .search-bar {
        width: 100%;
    }
    
    .view-header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* === TABLES → CARD LAYOUT === */
    .table-container {
        overflow-x: visible;
        white-space: normal;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 12px 15px;
        margin-bottom: 10px;
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border-bottom: 1px solid rgba(255,255,255,0.04);
        font-size: 0.85rem;
    }

    .data-table td:last-child {
        border-bottom: none;
        justify-content: flex-end;
        padding-top: 10px;
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-right: 10px;
        flex-shrink: 0;
    }

    .student-name-cell {
        justify-content: flex-end;
    }

    /* === CAMERA === */
    .camera-viewfinder video {
        width: 100%;
        height: auto;
        border-radius: 10px;
    }
    
    /* === REGISTRATION === */
    .registration-layout {
        grid-template-columns: 1fr;
    }
    
    .live-attendance-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    /* === HISTORY === */
    .history-search {
        flex-direction: column;
        text-align: center;
    }
    
    .history-search-container .search-icon-large {
        margin-bottom: 15px;
    }
    
    .student-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .attendance-summary {
        margin-top: 15px;
        width: 100%;
        justify-content: space-between;
    }

    /* === GLASS CARD spacing === */
    .glass-card {
        padding: 15px;
    }
}
