/* =========================================
   LNE Mobile - Staff Management System
   Brand Theme: Solar Energy / Clean Finance
   ========================================= */

:root {
    /* Brand Colors (Solar/Clean Energy Theme) */
    --clr-bg: #020617; /* Very Dark Blue/Black */
    --clr-surface: #0f172a;
    --clr-primary: #10b981; /* Clean Energy Green */
    --clr-primary-hover: #059669; /* Darker Green */
    --clr-secondary: #f59e0b; /* Sun Energy Yellow */
    --clr-accent: #3b82f6; /* Trust Blue */
    --clr-danger: #ef4444; 
    
    /* Text Colors */
    --clr-text: #f8fafc;
    --clr-text-muted: #94a3b8;
    
    /* UI Elements */
    --clr-border: rgba(255, 255, 255, 0.1);
    --clr-glass-bg: rgba(15, 23, 42, 0.6);
    --clr-glass-hover: rgba(15, 23, 42, 0.8);
    
    /* Sizing & Transitions */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Global Reset & Base
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Background Shapes (Solar Energy Vibes) */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.15;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.blob-1 {
    width: 50vw;
    height: 50vw;
    background: var(--clr-primary);
    top: -10%;
    left: -10%;
}
.blob-2 {
    width: 40vw;
    height: 40vw;
    background: var(--clr-secondary);
    bottom: -10%;
    right: -10%;
    animation-direction: alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* =========================================
   Glassmorphism Utilities
   ========================================= */
.glass-panel {
    background: var(--clr-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* =========================================
   Typography & General Classes
   ========================================= */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.mt-4 { margin-top: 1.5rem; }
.hide { display: none !important; }
.subtitle { color: var(--clr-text-muted); font-size: 0.95rem; margin-top: 5px; }

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: var(--clr-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover {
    background: var(--clr-primary-hover);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--clr-text-muted);
}
.btn-large { padding: 15px 30px; font-size: 1.1rem; }

/* =========================================
   Layout - App Container
   ========================================= */
.app-container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* =========================================
   Sidebar
   ========================================= */
.sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
}
.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    text-align: center;
}
.brand-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-hover));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}
.brand h2 { font-size: 1.5rem; letter-spacing: 0.5px; }
.badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--clr-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.nav-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--clr-text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
}
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--clr-text);
    transform: translateX(4px);
}
.nav-btn.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--clr-primary);
    border-left: 3px solid var(--clr-primary);
}
.nav-divider {
    height: 1px;
    background: var(--clr-border);
    margin: 1.5rem 0;
}

/* =========================================
   Main Area
   ========================================= */
.main-content {
    flex: 1;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    padding: 10px 20px 40px 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--clr-primary) transparent;
}
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-thumb { background-color: var(--clr-primary); border-radius: 10px; }

.view.hide { display: none; }
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--clr-border);
}

/* =========================================
   Forms & Inputs
   ========================================= */
.form-wrapper { padding: 30px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 1.2rem;
}
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--clr-text-muted);
}
input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    color: var(--clr-text);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    background: var(--clr-bg);
}
textarea { resize: vertical; min-height: 100px; }

/* =========================================
   Staff Directory Grid
   ========================================= */
.search-box {
    display: flex;
    align-items: center;
    padding: 0 16px;
    width: 300px;
    border-radius: var(--radius-lg);
}
.search-box i { color: var(--clr-text-muted); }
.search-box input {
    border: none;
    background: transparent;
    padding: 12px;
    box-shadow: none;
}
.search-box input:focus { box-shadow: none; }

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.staff-card {
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
}
.staff-card:hover {
    transform: translateY(-5px);
    border-color: var(--clr-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 15px rgba(16, 185, 129, 0.1);
}
.staff-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.staff-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}
.staff-info-short h3 { font-size: 1.1rem; margin-bottom: 4px; }
.staff-info-short p { color: var(--clr-text-muted); font-size: 0.85rem; }

/* =========================================
   ID Card View
   ========================================= */
.id-card-container { display: flex; flex-direction: column; align-items: center; }
.id-card {
    width: 350px;
    background: linear-gradient(160deg, #0f172a 0%, #020617 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
/* Holographic effect */
.id-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-25deg);
    animation: hologram 6s infinite;
}
@keyframes hologram { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

.id-header {
    background: var(--clr-primary);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.id-brand-logo { font-size: 2rem; color: #fff; }
.id-brand-text h3 { color: #fff; margin: 0; line-height: 1; font-size: 1.3rem; }
.id-brand-text span { color: rgba(255,255,255,0.8); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }

.id-body { padding: 30px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile-section { margin-bottom: 25px; display: flex; flex-direction: column; align-items: center; }
.avatar-placeholder {
    width: 100px;
    height: 100px;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--clr-primary);
    border-radius: 50%;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--clr-primary);
    position: relative;
    overflow: hidden;
}
.avatar-placeholder span { font-weight: 700; color: var(--clr-primary); }

.id-details h2 { font-size: 1.5rem; margin-bottom: 5px; }
.id-role { color: var(--clr-primary); font-weight: 500; font-size: 1rem; margin-bottom: 2px;}
.id-dept { color: var(--clr-text-muted); font-size: 0.85rem; }

.qr-section { background: rgba(255,255,255,0.02); padding: 15px; border-radius: var(--radius-md); border: 1px dashed var(--clr-border); width: 100%; display: flex; flex-direction: column; align-items: center;}
.qr-box { background: #fff; padding: 10px; border-radius: 8px; display: inline-block; margin-bottom: 15px; }
.id-number { font-family: monospace; font-size: 1.1rem; letter-spacing: 1px; margin-bottom: 5px; }
.qr-hint { font-size: 0.75rem; color: var(--clr-text-muted); }

.id-footer { background: rgba(0,0,0,0.3); padding: 12px; text-align: center; border-top: 1px solid var(--clr-border); }
.id-footer p { font-size: 0.7rem; color: var(--clr-text-muted); margin: 0; }

/* =========================================
   Verification Layout
   ========================================= */
.verify-header { flex-direction: column; justify-content: center; align-items: center; border: none; padding-bottom: 0; }
.verify-icon { font-size: 4rem; margin-bottom: 20px; color: var(--clr-primary); text-shadow: 0 0 20px rgba(16,185,129,0.4); }
.verify-input-box { padding: 40px; border: 1px solid rgba(16,185,129,0.2); }
.verify-result { padding: 40px; text-align: center; }
.status-icon {
    width: 80px; height: 80px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 2.5rem; margin-bottom: 20px;
}
.verify-result.success .status-icon { background: rgba(16,185,129,0.1); color: var(--clr-primary); border: 2px solid var(--clr-primary); box-shadow: 0 0 30px rgba(16,185,129,0.2); }
.verify-result.fail .status-icon { background: rgba(239,68,68,0.1); color: var(--clr-danger); border: 2px solid var(--clr-danger); box-shadow: 0 0 30px rgba(239,68,68,0.2); }

/* =========================================
   Toast Notification
   ========================================= */
.toast {
    position: fixed;
    bottom: -100px;
    right: 30px;
    background: var(--clr-surface);
    color: var(--clr-text);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--clr-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}
.toast.show { bottom: 30px; }
.toast i { color: var(--clr-primary); font-size: 1.2rem; }

/* =========================================
   Print Styles
   ========================================= */
@media print {
    body { background: #fff !important; }
    .sidebar, .view-header button, .id-actions, .blob { display: none !important; }
    .main-content { padding: 0 !important; }
    .id-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        background: #fff !important;
    }
    .id-card * {
        color: #000 !important;
    }
    .id-header {
        background: var(--clr-primary) !important;
        -webkit-print-color-adjust: exact;
    }
    .id-header h3, .id-header i, .id-header span { color: #fff !important; }
    .qr-box { border: 1px solid #000; }
}

@media (max-width: 768px) {
    .app-container { flex-direction: column; height: auto; }
    .sidebar { width: 100%; border-radius: var(--radius-lg); margin-bottom: 20px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
}
