/* ==========================================================================
   Qamar Al-Khaleej Attendance Portal - Style Sheet
   Executive Dark Sapphire Glassmorphism Design System
   ========================================================================== */

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

/* --- Root Variables & Theme Tokens --- */
:root {
    /* Color Palette (Executive Dark Sapphire & Glass) */
    --bg-page: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.72);
    --bg-card-solid: #111827;
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-input: rgba(15, 23, 42, 0.65);
    --bg-input-focus: rgba(30, 41, 59, 0.9);

    --color-primary: #f8fafc;
    --color-muted: #94a3b8;
    --color-subtle: #64748b;

    --color-accent: #0ea5e9;
    --color-accent-hover: #0284c7;
    --color-accent-light: rgba(14, 165, 233, 0.15);
    --color-accent-glow: rgba(14, 165, 233, 0.35);

    --color-emerald: #10b981;
    --color-emerald-hover: #059669;
    --color-emerald-light: rgba(16, 185, 129, 0.15);

    --color-rose: #f43f5e;
    --color-rose-hover: #e11d48;
    --color-rose-light: rgba(244, 63, 94, 0.15);

    --color-gold: #f59e0b;
    --color-gold-light: rgba(245, 158, 11, 0.15);

    --border-light: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(14, 165, 233, 0.3);
    --border-focus: #38bdf8;

    /* Sizing */
    --radius-ui: 14px;
    --radius-card: 22px;
    --height-input: 3.6rem;
    --height-btn: 3.8rem;
    --height-btn-punch: 5.2rem;

    /* Shadows & Effects */
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
    --shadow-glow: 0 0 25px rgba(14, 165, 233, 0.25);
    --glass-blur: blur(18px);
}

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

body {
    background-color: var(--bg-page);
    color: var(--color-primary);
    font-family: 'Cairo', -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2.5rem 1.2rem;
    overflow-x: hidden;
}

/* --- Ambient Glowing Mesh Background --- */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    animation: orbFloat 18s ease-in-out infinite alternate;
}

.orb-1 {
    width: 380px;
    height: 380px;
    background: #0ea5e9;
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 450px;
    height: 450px;
    background: #6366f1;
    bottom: -150px;
    left: -150px;
    animation-delay: -6s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #10b981;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    animation-delay: -12s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -40px) scale(1.1); }
    100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* --- App Main Container --- */
.app-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 2;
    position: relative;
}

.hidden {
    display: none !important;
}

/* --- Header Branding --- */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
    position: relative;
    width: 100%;
    padding: 0.5rem 0;
}

.brand-logo-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border-radius: 22px;
    border: 1px solid var(--border-accent);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    z-index: 2;
}

.logo-icon {
    font-size: 34px;
    color: var(--color-accent);
    filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.6));
}

.logo-glow {
    position: absolute;
    width: 90px;
    height: 90px;
    background: var(--color-accent);
    opacity: 0.25;
    border-radius: 50%;
    filter: blur(20px);
    z-index: 1;
}

.brand-info {
    margin-top: 2px;
}

.brand-title {
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.brand-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 4px;
    text-transform: uppercase;
    display: block;
    margin-top: -4px;
}

.portal-badge {
    font-size: 13px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    padding: 6px 18px;
    border-radius: 30px;
    border: 1px solid var(--border-accent);
    font-weight: 700;
    backdrop-filter: blur(10px);
}

/* User Profile Badge in Header */
.user-profile-badge {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    padding: 8px 16px;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.user-avatar-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--color-accent-light);
    border: 1px solid var(--border-accent);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-display-name {
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
}

.role-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    display: inline-block;
}

.role-tag.admin {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.role-tag.employee {
    background: var(--color-emerald-light);
    color: var(--color-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-logout {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: var(--color-rose);
    cursor: pointer;
    font-size: 16px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--color-rose);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
    transform: scale(1.05);
}

/* --- Card View Base --- */
.card-view {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 2.2rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    transition: all 0.3s ease;
}

/* --- Login View --- */
.login-card-view {
    max-width: 460px;
    width: 100%;
    margin: 2rem auto;
    border: 1px solid var(--border-accent);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-icon-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--color-accent-light);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.login-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
}

.login-header p {
    font-size: 14px;
    color: var(--color-muted);
    margin-top: 4px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-field-wrapper {
    position: relative;
    width: 100%;
}

.input-field-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-subtle);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-field {
    width: 100%;
    height: var(--height-input);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-ui);
    padding: 12px 14px 12px 46px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

.input-field:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
    background: var(--bg-input-focus);
}

.input-field:focus + i {
    color: var(--color-accent);
}

.textarea-field {
    height: auto;
    padding: 14px;
    resize: vertical;
}

.btn-primary {
    width: 100%;
    height: var(--height-btn);
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
    border: none;
    border-radius: var(--radius-ui);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.25 ease;
    box-shadow: 0 8px 20px -4px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(14, 165, 233, 0.6);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Employee Dashboard Grid --- */
.employee-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.8rem;
}

@media (min-width: 900px) {
    .employee-dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dashboard-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-section-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

/* --- Live Clock Card --- */
.live-clock-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.8rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.clock-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-accent);
    background: var(--color-accent-light);
    border: 1px solid var(--border-accent);
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.live-clock-face {
    font-family: 'Outfit', 'Cairo', sans-serif;
    font-size: 3.6rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 2px;
    text-shadow: 0 0 25px rgba(14, 165, 233, 0.4);
    line-height: 1;
    margin: 6px 0;
}

.date-text {
    font-size: 15px;
    color: var(--color-muted);
    font-weight: 600;
}

/* --- GPS Radar Widget --- */
.gps-status-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.gps-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gps-title {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-pending {
    background: var(--color-accent-light);
    color: var(--color-accent);
    border: 1px solid var(--border-accent);
}

.badge-success {
    background: var(--color-emerald-light);
    color: var(--color-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-error {
    background: var(--color-rose-light);
    color: var(--color-rose);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.radar-container {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-ui);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    position: relative;
}

.radar-status-panel {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-accent);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.radar-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
    animation: radar-ripple 2.2s linear infinite;
    opacity: 0;
}

.radar-core {
    font-size: 20px;
    z-index: 2;
}

.radar-status-panel.success .radar-ping {
    border-color: var(--color-emerald);
}
.radar-status-panel.error .radar-ping {
    border-color: var(--color-rose);
}

@keyframes radar-ripple {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.distance-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.distance-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.distance-val {
    font-size: 13px;
    color: var(--color-accent);
    font-weight: 700;
    margin-top: 2px;
}

.btn-refresh-gps {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--color-muted);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-refresh-gps:hover:not(:disabled) {
    color: var(--color-accent);
    border-color: var(--color-accent);
    transform: rotate(45deg);
}

/* --- Punch Buttons --- */
.punch-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-punch {
    height: var(--height-btn-punch);
    border: none;
    border-radius: var(--radius-card);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-soft);
}

.btn-punch i {
    font-size: 22px;
}

.btn-punch.in {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4);
}

.btn-punch.in:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 25px -4px rgba(16, 185, 129, 0.6);
}

.btn-punch.out {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    box-shadow: 0 10px 20px -5px rgba(244, 63, 94, 0.4);
}

.btn-punch.out:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 25px -4px rgba(244, 63, 94, 0.6);
}

.btn-punch:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-punch:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(0.8);
    box-shadow: none;
}

/* --- Hours Summary Card --- */
.hours-summary-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.6rem;
}

.hours-stats-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hours-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-ui);
    font-size: 14px;
}

.hours-stat-label {
    color: var(--color-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hours-stat-value {
    color: #ffffff;
    font-weight: 700;
    font-family: 'Outfit', 'Cairo', sans-serif;
}

.status-deficit-row {
    border-color: rgba(244, 63, 94, 0.3);
    background: var(--color-rose-light);
}

.status-deficit-row.completed {
    border-color: rgba(16, 185, 129, 0.3);
    background: var(--color-emerald-light);
}

/* --- Notifications Card Feed --- */
.logs-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.6rem;
}

.notifications-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
}

.notification-card {
    border-radius: var(--radius-ui);
    padding: 1rem 1.2rem;
    font-size: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-card.warning {
    border-right: 4px solid var(--color-rose);
}

.notification-card.bonus {
    border-right: 4px solid var(--color-emerald);
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-muted);
    font-weight: 700;
}

.notification-message {
    color: #ffffff;
}

.notification-amount {
    color: var(--color-gold);
    font-weight: 800;
}

.no-notifications {
    text-align: center;
    color: var(--color-muted);
    font-size: 14px;
    padding: 16px;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-ui);
}

/* --- Status Console Logger --- */
.console-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.6rem;
}

.console-box {
    background: #060911;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-ui);
    padding: 12px 16px;
    height: 100px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: monospace;
    font-size: 12px;
}

.console-line.info { color: var(--color-muted); }
.console-line.success { color: var(--color-emerald); font-weight: 700; }
.console-line.error { color: var(--color-rose); font-weight: 700; }
.console-line.warning { color: var(--color-gold); }

/* --- Footer --- */
.footer {
    text-align: center;
    font-size: 13px;
    color: var(--color-subtle);
    padding: 1rem 0;
}

/* ==========================================================================
   3. ADMIN DASHBOARD LAYOUT (Full height sidebar + Navbar)
   ========================================================================== */

.admin-dashboard-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--bg-page);
    z-index: 100;
    overflow: hidden;
}

/* Admin Sidebar */
.admin-sidebar {
    width: 290px;
    height: 100%;
    background: var(--bg-card-solid);
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: 102;
    transition: transform 0.3s ease;
}

.admin-sidebar-header {
    padding: 1.5rem 1.2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-small {
    width: 42px;
    height: 42px;
    background: var(--color-accent-light);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 20px;
}

.brand-text h3 {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.brand-text span {
    font-family: 'Outfit', sans-serif;
    font-size: 9px;
    color: var(--color-accent);
    letter-spacing: 2px;
}

.btn-close-sidebar {
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 20px;
    cursor: pointer;
    display: none; /* Desktop default */
}

.admin-sidebar-nav {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-ui);
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-muted);
    font-size: 15px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.sidebar-nav-btn:hover {
    background: var(--bg-input);
    color: #ffffff;
}

.sidebar-nav-btn.active {
    background: var(--color-accent-light);
    border-color: var(--border-accent);
    color: var(--color-accent);
}

.sidebar-employees-section {
    padding: 1.2rem;
    border-top: 1px solid var(--border-light);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-section-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--color-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.employee-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex-grow: 1;
}

.employee-item {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 12px 14px;
    border-radius: var(--radius-ui);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.employee-item:hover {
    border-color: var(--color-accent);
    background: var(--bg-card-hover);
}

.employee-item.selected {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Admin Main Panel */
.admin-main-panel {
    flex-grow: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-navbar {
    height: 70px;
    background: var(--bg-card-solid);
    border-bottom: 1px solid var(--border-light);
    padding: 0 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-title {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-navbar-toggle {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: none; /* Visible on mobile */
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.navbar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 6px 14px;
    border-radius: 14px;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.profile-text {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.role-badge {
    font-size: 10px;
    color: var(--color-accent);
    font-weight: 700;
}

.btn-navbar-logout {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: var(--color-rose);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-navbar-logout:hover {
    background: var(--color-rose);
    color: #ffffff;
}

.admin-workspace {
    flex-grow: 1;
    padding: 1.8rem;
    overflow-y: auto;
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

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

/* Empty Details Placeholder */
.empty-details {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 420px;
}

.placeholder-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: var(--color-accent-light);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--color-accent);
    margin-bottom: 1.2rem;
}

.welcome-placeholder h3 {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.welcome-placeholder p {
    font-size: 14px;
    color: var(--color-muted);
}

/* Employee Workspace Details */
.employee-details-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.details-header-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.details-title h3 {
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
}

.details-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.employee-role-badge, .employee-shift-badge, .employee-duration-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--color-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.stat-card {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-ui);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.stat-attendance .stat-icon-bg { background: var(--color-accent-light); color: var(--color-accent); }
.stat-warnings .stat-icon-bg { background: var(--color-rose-light); color: var(--color-rose); }
.stat-bonuses .stat-icon-bg { background: var(--color-emerald-light); color: var(--color-emerald); }

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

.stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--color-muted);
    font-weight: 700;
    margin-top: 2px;
}

/* Attendance Table */
.details-attendance-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.details-section-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-ui);
    border: 1px solid var(--border-light);
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: right;
}

.log-table th {
    background: #0f172a;
    color: var(--color-muted);
    font-weight: 800;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}

.log-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.4);
}

.log-table tr:hover td {
    background: rgba(30, 41, 59, 0.7);
}

.action-tag {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-block;
}

.action-tag.in {
    background: var(--color-emerald-light);
    color: var(--color-emerald);
}

.action-tag.out {
    background: var(--color-rose-light);
    color: var(--color-rose);
}

/* Admin Form Actions Grid */
.admin-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 850px) {
    .admin-actions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.action-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.action-card h4 {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Tabs: Add User & Settings Panels */
.view-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 2rem;
    max-width: 520px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.panel-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--color-accent-light);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.panel-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}

.panel-header p {
    font-size: 13px;
    color: var(--color-muted);
}

.form-responsive-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.select-wrapper {
    position: relative;
}

.custom-select {
    width: 100%;
    height: var(--height-input);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-ui);
    padding: 12px 14px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.select-chevron {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    pointer-events: none;
}

/* Overlay for Mobile Drawer */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 101;
    display: none;
}

.sidebar-overlay.visible {
    display: block;
}

/* ==========================================================================
   Responsive Viewports Configuration
   ========================================================================== */

@media (max-width: 900px) {
    .btn-navbar-toggle {
        display: flex;
    }
    
    .btn-close-sidebar {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        right: 0;
        top: 0;
        transform: translateX(100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }
}
