:root {
    --neu-blue: #003366;
    --neu-red: #cc0000;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
                url('https://t3.ftcdn.net/jpg/07/37/40/78/360_F_737407841_4HKGVEVWS97o44VzBWizz6IcLeaxzEM7.jpg');
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 30px;
}

header {
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 15px;
}

.logo { height: 100px; display: block; margin: 0 auto; }

.mode-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    margin-bottom: 10px;
}

.mode-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
}

.mode-btn.active { background: var(--neu-red); font-weight: 600; }

#login-container {
    width: 90%;
    max-width: 400px;
    margin-top: 20px;
    text-align: center;
}

#register-container {
    width: 90%;
    max-width: 400px;
    margin-top: 20px;
    text-align: center;
}

input, select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    outline: none;
}

::placeholder { color: rgba(255,255,255,0.7); }
option { color: black; }

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-primary { background: var(--neu-blue); color: white; }
.btn-primary:hover { background: #004a94; }
.btn-primary:disabled { background: #555; cursor: not-allowed; }

#app-content { display: none; width: 95%; max-width: 1100px; margin-top: 20px; padding-bottom: 50px; }
.welcome-section { text-align: center; margin-bottom: 30px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card { text-align: center; padding: 20px; }
.stat-card h3 { font-size: 0.8rem; text-transform: uppercase; opacity: 0.8; margin-bottom: 10px; }
.stat-card p { font-size: 1.8rem; font-weight: bold; }

.chart-box { height: 300px; width: 100%; margin-top: 20px; }

.hidden { display: none !important; }

.filter-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-group select, .filter-group input { width: auto; min-width: 150px; }

.table-container { margin-top: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9rem; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--glass-border); }
th { background: rgba(255,255,255,0.1); color: var(--neu-red); text-transform: uppercase; letter-spacing: 1px; }

#live-clock { font-weight: 400; font-size: 1.1rem; color: #00d4ff; margin-bottom: 10px; display: block; }

.register-link {
    margin-top: 14px;
    font-size: 0.78rem;
    opacity: 0.75;
}
.register-link a {
    color: #00d4ff;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
}
.register-back {
    font-size: 0.78rem;
    margin-top: 12px;
    opacity: 0.75;
    cursor: pointer;
    color: #00d4ff;
    text-decoration: underline;
    display: block;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 9999;
    transition: opacity 0.4s;
}
.toast.success { background: #00b894; color: white; }
.toast.error   { background: #d63031; color: white; }

.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 9998;
    font-size: 1.2rem;
    letter-spacing: 1px;
}
.loading-overlay.hidden { display: none; }

.realtime-badge {
    display: inline-block;
    background: rgba(0,212,255,0.2);
    border: 1px solid #00d4ff;
    color: #00d4ff;
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 50px;
    margin-left: 10px;
    vertical-align: middle;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.btn-google {
    background: white;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    border: 1px solid rgba(255,255,255,0.3);
    transition: 0.3s;
}
.btn-google:hover { background: #f1f1f1; }

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 2px;
    opacity: 0.6;
    font-size: 0.78rem;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.35);
}

/* ✅ ADDED: Download PDF button */
.btn-download {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    width: auto;
    padding: 12px 28px;
    margin-top: 16px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border-radius: 8px;
    display: inline-block;
}
.btn-download:hover { background: linear-gradient(135deg, #00a381, #00b5b8); }
