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

:root {
    --primary: #06b6d4; /* Cyan accent */
    --primary-hover: #0891b2;
    --secondary: #8b5cf6; /* Violet */
    --bg-gradient: linear-gradient(135deg, #020617 0%, #0f172a 100%);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism containers */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem;
    width: 100%;
    flex: 1;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 1.25rem;
    background: linear-gradient(to right, #38bdf8, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.7;
    font-weight: 300;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

input, select, textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

input::placeholder, textarea::placeholder {
    color: #475569;
}

option {
    background: #0f172a;
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

th, td {
    padding: 1.25rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    transition: background-color 0.2s;
}

th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.02);
}

th:first-child { border-top-left-radius: 12px; }
th:last-child { border-top-right-radius: 12px; }

tr:last-child td { border-bottom: none; }
tr:last-child td:first-child { border-bottom-left-radius: 12px; }
tr:last-child td:last-child { border-bottom-right-radius: 12px; }

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover {
    color: white;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--glass-border);
}

.toast.success { background: rgba(16, 185, 129, 0.9); backdrop-filter: blur(8px); }
.toast.error { background: rgba(239, 68, 68, 0.9); backdrop-filter: blur(8px); }

@keyframes slideIn {
    from { transform: translateX(100%) scale(0.9); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Dashboard Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Global Print Styles to Fix Layout Issues */
@media print {
    body {
        display: block !important;
        min-height: auto !important;
        height: auto !important;
        background: white !important;
        color: black !important;
    }
    .no-print {
        display: none !important;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .nav-brand {
        font-size: 1.25rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    .glass-panel {
        padding: 1.5rem;
    }
    .container {
        padding: 1rem;
    }
}

/* ID Card Styling for Modals */
.id-card {
    width: 3.8in;
    height: 2.65in;
    background: white;
    border: 1px dashed #ddd;
    padding: 18px;
    box-sizing: border-box;
    position: relative;
    font-family: Arial, sans-serif;
    color: black;
    margin: 0 auto;
}
.id-card::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid black;
    border-radius: 10px;
    pointer-events: none;
}
.id-card .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #444;
    padding-bottom: 5px;
    margin-bottom: 8px;
}
.id-card .header img.logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}
.id-card .school-name {
    flex: 1;
    text-align: center;
    color: navy;
    font-weight: bold;
    font-size: 13pt;
    line-height: 1.2;
    padding: 0 5px;
}
.id-card .photo-box {
    width: 50px;
    height: 60px;
    border: 1px solid #aaa;
    padding: 2px;
}
.id-card .photo-box img.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.id-card .title {
    font-size: 14pt;
    font-weight: bold;
    color: red;
    text-align: center;
    margin-bottom: 5px;
    background: none;
    -webkit-text-fill-color: initial;
}
.id-card .student-name {
    font-size: 12pt;
    font-weight: bold;
    text-align: center;
    color: #000;
}
.id-card .barcode {
    margin-top: 5px;
    display: flex;
    justify-content: center;
}
.id-card .barcode svg {
    width: 100%;
    height: auto;
    max-height: 85px;
}


