/* ══════════════════════════════════════════════════════════
   StaffHub — Premium Light "Bright" Mode Stylesheet
   Pure HTML + CSS (No frameworks)
   ══════════════════════════════════════════════════════════ */

/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
    background: #f1f5f9; /* Soft light background */
    color: #1e293b; /* Dark text for readability */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE (Bright)
   ══════════════════════════════════════════════════════════ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff, #f8fafc, #ede9fe);
    position: relative;
    overflow: hidden;
}

/* Background blobs */
.login-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 8s infinite ease-in-out;
}

.shape-1 {
    width: 400px; height: 400px;
    background: #818cf8;
    top: -100px; right: -100px;
}

.shape-2 {
    width: 350px; height: 350px;
    background: #c084fc;
    bottom: -80px; left: -80px;
    animation-delay: 2s;
}

.shape-3 {
    width: 250px; height: 250px;
    background: #fda4af;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

/* Login Card (Light Glassmorphism) */
.login-card {
    position: relative;
    z-index: 10;
    width: 420px;
    padding: 48px 40px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    animation: cardFadeIn 0.6s ease;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 12px;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 10px;
    color: #ef4444;
    font-size: 13px;
    text-align: center;
    margin-bottom: 8px;
}

.login-btn {
    padding: 14px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.login-footer p {
    color: #94a3b8;
    font-size: 12px;
}

/* ══════════════════════════════════════════════════════════
   SHARED FORM INPUTS (Light Mode)
   ══════════════════════════════════════════════════════════ */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-input,
.form-group input,
.form-group select {
    padding: 13px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.form-input::placeholder,
.form-group input::placeholder {
    color: #94a3b8;
}

.form-input:focus,
.form-group input:focus,
.form-group select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-errors {
    background: #fef2f2 !important;
    border: 1.5px solid #ef4444 !important;
    border-left: 5px solid #dc2626 !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
    display: block !important;
}

.form-errors p {
    color: #b91c1c !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    margin: 4px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.form-errors p::before {
    content: "\f071" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD LAYOUT (Bright)
   ══════════════════════════════════════════════════════════ */

.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

/* ─── Sidebar ──────────────────────────────────────────── */

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    border-right: 1px solid #e2e8f0;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.02);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 24px;
}

.brand-icon { font-size: 28px; }

.sidebar-brand h2 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    margin-bottom: 24px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.user-info { display: flex; flex-direction: column; }
.user-name { color: #1e293b; font-weight: 600; font-size: 14px; }
.user-role {
    color: #4f46e5;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.nav-item:hover {
    background: #f1f5f9;
    color: #4f46e5;
}

.nav-item.active {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    font-weight: 700;
}

.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid #fee2e2;
    background: #fef2f2;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.25s ease;
    margin-top: auto;
    text-align: center;
    justify-content: center;
}

.logout-btn:hover {
    background: #fecaca;
}

/* ─── Main Content (Bright) ────────────────────────────────── */

.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: 32px 40px;
    position: relative;
    background: #f8fafc;
}

.dashboard-content {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 28px;
}

/* ─── Stats Grid ───────────────────────────────────────── */

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stat-purple .stat-icon { background: #e0e7ff; color: #4338ca; }
.stat-blue .stat-icon   { background: #e0f2fe; color: #0369a1; }
.stat-green .stat-icon  { background: #dcfce7; color: #15803d; }
.stat-teal .stat-icon   { background: #ccfbf1; color: #0f766e; }
.stat-orange .stat-icon { background: #ffedd5; color: #c2410c; }

.stat-info { display: flex; flex-direction: column; }

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* ─── Quick Actions ────────────────────────────────────── */

.quick-actions h2 {
    color: #475569;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.action-card:hover {
    background: #f8fafc;
    border-color: #4f46e5;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

.action-icon { font-size: 32px; }

.action-label {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

/* ─── Data Tables ──────────────────────────────────────── */

.recent-section h2 {
    color: #475569;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}

.table-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    padding: 14px 18px;
    text-align: left;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 18px;
    color: #1e293b;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.emp-id-badge {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.superadmin { background: #ffedd5; color: #c2410c; }
.role-badge.admin      { background: #e0f2fe; color: #0369a1; }
.role-badge.employee   { background: #dcfce7; color: #15803d; }

.view-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4f46e5;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: #e0e7ff;
}

.delete-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #ef4444;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* ─── Detail Card ──────────────────────────────────────── */

.back-btn {
    display: inline-block;
    color: #4f46e5;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 600;
}

.detail-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.detail-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.detail-header h2 {
    color: #1e293b;
    font-size: 24px;
    margin: 0 0 6px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.detail-item { display: flex; flex-direction: column; gap: 4px; }

.detail-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.detail-value {
    font-size: 15px;
    color: #1e293b;
    font-weight: 500;
}

.extended-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.extended-section h3 {
    color: #475569;
    font-size: 16px;
    margin: 0 0 16px;
}

/* ─── Forms ────────────────────────────────── */

.dashboard-form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.submit-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}

/* ─── Password Reset Modal (Bright) ────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-card {
    background: #ffffff;
    max-width: 480px;
    width: 100%;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.1);
}

.otp-container {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.otp-input {
    width: 54px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #4f46e5;
}

.otp-input:focus {
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* ─── Login ID Boxes ───────────────────────── */
.login-id-container {
    margin-bottom: 8px;
    justify-content: flex-start;
    gap: 12px;
}

.id-box {
    width: 48px;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #4f46e5;
    transition: all 0.3s ease;
}

.id-box:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}


/* ─── Toast Message (Bright) ───────────────── */

.toast-message {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    padding: 16px 24px;
    border-radius: 12px;
    background: #ffffff;
    border-left: 5px solid #64748b;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    color: #1e293b;
    font-weight: 600;
    animation: slideInRight 0.4s ease;
}

.toast-message.success {
    border-left-color: #10b981;
    background: #f0fdf4;
    color: #166534;
}

.toast-message.error, .toast-message.danger {
    border-left-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.toast-message.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

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

/* ─── Responsive ───────────────────────────── */

@media (max-width: 768px) {
    .sidebar { display: none; }
    .dashboard-main { margin-left: 0; padding: 20px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Action Icon Buttons ───────────────────────── */
.action-icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.action-icon-btn.view {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #dbeafe;
}
.action-icon-btn.view:hover {
    background: #dbeafe;
    transform: scale(1.1);
}

.action-icon-btn.edit {
    background: #f0fdf4;
    color: #22c55e;
    border-color: #dcfce7;
}
.action-icon-btn.edit:hover {
    background: #dcfce7;
    transform: scale(1.1);
}

.action-icon-btn.delete {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fee2e2;
}
.action-icon-btn.delete:hover {
    background: #fee2e2;
    transform: scale(1.1);
}

/* ─── Filter Bar ────────────────────────────────────────── */
.filter-bar {
    background: #ffffff;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 28px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.filter-form {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    gap: 15px;
    align-items: flex-end;
    width: 100%;
}

.filter-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px;
    flex: 1;
    min-width: 0 !important;
}

.filter-group.search {
    flex: 2.5; 
    min-width: 0;
}

.filter-group label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-input, .filter-select {
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
}

.filter-input:focus, .filter-select:focus {
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn-filter {
    padding: 0 24px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}

.btn-reset {
    width: 46px;
    height: 46px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
}

.btn-reset:hover {
    background: #e2e8f0;
    color: #1e293b;
}

