/* Color Variables */
:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary: #06b6d4;
    --text-main: #0f172a;
    --text-muted: #475569;
    --bg-white: #ffffff;
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --mesh-gradient: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(79, 70, 229, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: #f8fafc;
    background-image: var(--mesh-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Navbar (Glassmorphism) --- */
.navbar {
    padding: 1.25rem 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo span {
    color: var(--text-main);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* --- Hero Section --- */
.hero {
    padding: 120px 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 25px;
    letter-spacing: -3px;
    animation: fadeInUp 1s ease-out;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: var(--text-muted);
    max-width: 520px;
    animation: fadeInUp 1.2s ease-out;
}

/* --- Buttons --- */
.cta-buttons {
    display: flex;
    gap: 15px;
    animation: fadeInUp 1.4s ease-out;
}

.btn {
    display: inline-block;
    padding: 16px 36px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: #fff;
    transform: translateY(-4px);
}

/* --- 3D ID Card Floating Mockup --- */
.id-card-outer {
    perspective: 1200px;
    animation: float 6s ease-in-out infinite;
}

.id-card-mockup {
    background: var(--accent-gradient);
    height: 280px;
    width: 460px;
    border-radius: 28px;
    padding: 40px;
    position: relative;
    color: white;
    box-shadow: 0 40px 100px -15px rgba(79, 70, 229, 0.35);
    transform: rotateY(-15deg) rotateX(10deg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

/* Reflection light on the card */
.id-card-mockup::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.1) 45%, rgba(255,255,255,0.2) 50%, transparent 54%);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 45px;
    opacity: 0.9;
}

.circle {
    width: 22px;
    height: 22px;
    border: 4px solid white;
    border-radius: 50%;
}

.brand-text {
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.card-chip {
    width: 65px;
    height: 48px;
    background: linear-gradient(135deg, #fcd34d, #d97706);
    border-radius: 10px;
    margin-bottom: 45px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.line {
    background: rgba(255, 255, 255, 0.25);
    height: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
}

.line.long { width: 85%; }
.line.medium { width: 45%; }

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* --- Footer --- */
.footer {
    padding: 80px 0 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 80px;
    }
    .hero-content h1 { font-size: 3.5rem; }
    .hero-content p { margin: 0 auto 40px; }
    .cta-buttons { justify-content: center; }
    .id-card-mockup { margin: 0 auto; max-width: 100%; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.8rem; }
    .id-card-mockup { width: 100%; height: 220px; }
    .cta-buttons { flex-direction: column; }
    .btn-secondary { margin-left: 0; }
}

/* --- Registration & Auth Specifics --- */
.auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 480px;
    padding: 50px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-block {
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
    border: none;
}

.auth-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.btn-back {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: 0.3s;
}

.btn-back:hover {
    color: var(--primary);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* --- Success Toast Notification --- */
.toast-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #ffffff;
    border-left: 5px solid #22c55e;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 16px 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    overflow: hidden;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toast-icon {
    background: #22c55e;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.toast-message strong {
    display: block;
    color: #1e293b;
    font-size: 0.95rem;
}

.toast-message p {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #cbd5e1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #22c55e;
    animation: progress 5s linear forwards;
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.lock-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 10px rgba(79, 70, 229, 0.2));
}

.auth-form {
    margin-top: 25px;
}

/* Ensure the auth card doesn't jump when errors appear */
.notification {
    margin-bottom: 20px;
    font-size: 0.85rem;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

/* Dashboard Layout */
/* Dashboard Layout Adjustments */
.dashboard-page {
    background: #f1f5f9;
    min-height: 100vh;
}

/* Header */
.dashboard-header {
    background: #ffffff;
    padding: 15px 30px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info { text-align: right; margin-right: 20px; }
.user-info p { font-size: 0.9rem; margin: 0; }
.user-info small { color: var(--primary); font-weight: 700; font-size: 0.7rem; text-transform: uppercase; }

.logout-pill {
    background: #fee2e2;
    color: #ef4444;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: 0.3s;
}

.logout-pill:hover { background: #fecaca; }

/* Dashboard Wrapper */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 73px);
}

/* Sidebar Navigation */
.side-nav {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    padding: 30px 20px;
}

.nav-section { margin-bottom: 30px; }
.nav-section label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 10px;
}

.side-nav ul { list-style: none; margin-top: 10px; }
.side-nav ul li a {
    display: block;
    padding: 12px 15px;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: 0.2s;
    margin-bottom: 5px;
}

.side-nav ul li a span { margin-right: 10px; font-size: 1.1rem; }
.side-nav ul li a:hover, .side-nav ul li a.active {
    background: rgba(79, 70, 229, 0.05);
    color: var(--primary);
}

/* Content Area */
.main-content { padding: 40px; }
.content-header h1 { font-size: 2rem; letter-spacing: -1px; }
.content-header p { color: #64748b; }

.quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 500px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.stat-card small { font-weight: 700; color: #94a3b8; }
.stat-card p { font-size: 1.2rem; font-weight: 800; }
.stat-card p.status.pending { color: #d97706; }

/* Digital ID Card */
.digital-id-card {
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 40px 0;
    perspective: 1000px;
}

.card-front {
    background: #ffffff;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.card-logo {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.card-logo span { color: var(--text-main); }

.card-body {
    display: grid;
    grid-template-columns: 100px 1fr 80px;
    gap: 20px;
    align-items: center;
}

.photo-placeholder {
    width: 100px;
    height: 100px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    border: 2px dashed #cbd5e1;
}

.user-details h3 { font-size: 1.3rem; margin-bottom: 4px; }
.designation { font-size: 0.85rem; color: var(--primary); font-weight: 600; margin-bottom: 15px; }

.id-number small { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 1px; }
.id-number p { font-family: 'Courier New', Courier, monospace; font-weight: 700; font-size: 1.1rem; }

.qr-mockup {
    width: 80px;
    height: 80px;
    background: #333; /* Mock QR */
    border-radius: 8px;
    margin-bottom: 5px;
}

.qr-code small { font-size: 0.6rem; color: var(--text-muted); display: block; text-align: center; }

.card-footer {
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    font-size: 0.65rem;
    color: #94a3b8;
    letter-spacing: 1px;
}

/* Auth Navigation */
.user-nav { display: flex; align-items: center; gap: 20px; }
.btn-logout { 
    font-size: 0.85rem; 
    color: #ef4444; 
    text-decoration: none; 
    font-weight: 600;
    padding: 5px 12px;
    border: 1px solid #fee2e2;
    border-radius: 6px;
}

.btn-logout:hover { background: #fef2f2; }

@media (max-width: 850px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.stat-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

/* Icon Colors */
.emp-icon { background: rgba(79, 70, 229, 0.1); }
.office-icon { background: rgba(6, 182, 212, 0.1); }
.pending-icon { background: rgba(245, 158, 11, 0.1); }
.issued-icon { background: rgba(34, 197, 94, 0.1); }

.stat-data h3 { font-size: 1.8rem; font-weight: 800; color: #1e293b; line-height: 1; }
.stat-data p { color: #64748b; font-size: 0.9rem; font-weight: 600; }

/* Data Table */
.dashboard-row { margin-top: 40px; }
.recent-activity {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th {
    text-align: left;
    padding: 12px;
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    border-bottom: 2px solid #f1f5f9;
}

.data-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.badge-status {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-status.pending { background: #fef3c7; color: #d97706; }

.management-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 30px;
}

.form-container-card, .list-container-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.form-container-card h3, .list-container-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
}

@media (max-width: 992px) {
    .management-grid { grid-template-columns: 1fr; }
}

