@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bs-font-sans-serif: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --emerald-dark: #093824;
    --emerald-primary: #0f5132;
    --emerald-medium: #198754;
    --emerald-light: #25a266;
    --emerald-mint: #e8f5e9;
    --emerald-soft: #d1e7dd;
    --surface-bg: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-soft: 0 4px 20px rgba(15, 81, 50, 0.05);
    --shadow-elevated: 0 10px 30px rgba(15, 81, 50, 0.12);
}

body {
    font-family: var(--bs-font-sans-serif);
    background-color: var(--surface-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Sidebar Styling */
#sidebar-wrapper {
    min-height: 100vh;
    width: 260px;
    background: linear-gradient(180deg, var(--emerald-dark) 0%, var(--emerald-primary) 100%);
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: #4ade80;
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    list-style: none;
    margin: 0;
}

.nav-label {
    padding: 0.75rem 0.75rem 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.8px;
}

.sidebar-nav .nav-item {
    margin-bottom: 4px;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-nav .nav-link i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link.active i {
    color: #4ade80;
}

/* Header & Topbar */
.main-header {
    background: #ffffff;
    height: 70px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    padding: 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    sticky: top;
    z-index: 999;
}

.topbar-clock {
    background: var(--emerald-mint);
    color: var(--emerald-primary);
    padding: 0.4rem 1rem;
    border-radius: 50rem;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Metric & Stat Cards */
.card-stat {
    background: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.card-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
}

.card-stat .icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.icon-emerald { background: var(--emerald-mint); color: var(--emerald-primary); }
.icon-blue { background: #e0f2fe; color: #0284c7; }
.icon-amber { background: #fef3c7; color: #d97706; }
.icon-rose { background: #ffe4e6; color: #e11d48; }

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Cards */
.card-custom {
    background: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
}

.card-custom .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-custom .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--emerald-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn-emerald {
    background: linear-gradient(135deg, var(--emerald-primary) 0%, var(--emerald-medium) 100%);
    color: #ffffff;
    border: none;
    font-weight: 600;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(15, 81, 50, 0.2);
    transition: all 0.2s ease;
}

.btn-emerald:hover {
    background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald-primary) 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 81, 50, 0.3);
}

/* RFID Scan Terminal Panel */
.scanner-terminal {
    background: linear-gradient(135deg, #093824 0%, #0f5132 100%);
    border-radius: var(--radius-lg);
    color: #ffffff;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-elevated);
    position: relative;
}

.scanner-terminal .scan-ring {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    border: 3px dashed #4ade80;
    animation: pulseRing 2s infinite ease-in-out;
}

.scanner-terminal .scan-ring i {
    font-size: 3rem;
    color: #4ade80;
}

@keyframes pulseRing {
    0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(74, 222, 128, 0); }
    100% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Student Profile Card */
.student-profile-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 2px solid var(--emerald-soft);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.student-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--emerald-mint);
    box-shadow: var(--shadow-soft);
}

/* DataTables Styling Overrides */
.table {
    vertical-align: middle;
}

.table thead th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 2px solid #e2e8f0;
    padding: 0.85rem 1rem;
}

.table tbody tr:hover {
    background-color: rgba(209, 231, 221, 0.25);
}

/* Badges */
.badge-emerald {
    background-color: var(--emerald-mint);
    color: var(--emerald-primary);
    font-weight: 700;
    padding: 0.35em 0.75em;
    border-radius: 50rem;
}

/* Audio Synthesizer Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}
