/* =========================================================
   HALF BROTHER - Workforce & Attendance System Stylesheet
   Theme: Sleek Dark / Industrial Modern & Gold Accent
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --hb-bg-dark: #0f1216;
    --hb-bg-card: #171b21;
    --hb-bg-card-hover: #1f242c;
    --hb-bg-sidebar: #13171d;
    --hb-border: #262c36;
    --hb-border-light: #323a47;
    --hb-gold: #e5a93c;
    --hb-gold-hover: #c98e27;
    --hb-gold-light: rgba(229, 169, 60, 0.12);
    --hb-text: #e2e8f0;
    --hb-text-muted: #8b949e;
    --hb-primary: #3b82f6;
    --hb-success: #10b981;
    --hb-warning: #f59e0b;
    --hb-danger: #ef4444;
    --hb-info: #06b6d4;
    --hb-radius: 12px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--hb-bg-dark);
    color: var(--hb-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography & Brand */
.brand-title {
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fff;
    text-transform: uppercase;
}

.brand-accent {
    color: var(--hb-gold);
}

.brand-badge {
    background: var(--hb-gold);
    color: #0f1216;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
}

/* Cards & Containers */
.card-hb {
    background-color: var(--hb-bg-card);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-hb:hover {
    border-color: var(--hb-border-light);
}

.card-hb-gold {
    border-top: 3px solid var(--hb-gold);
}

/* Stat Cards */
.stat-card {
    background: linear-gradient(145deg, #171b21 0%, #1c2129 100%);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.4);
    border-color: var(--hb-border-light);
}

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

/* Sidebar Layout */
#wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

#sidebar {
    width: 260px;
    min-width: 260px;
    background-color: var(--hb-bg-sidebar);
    border-right: 1px solid var(--hb-border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
}

#sidebar .sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--hb-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

#sidebar .nav-item {
    margin: 4px 12px;
}

#sidebar .nav-link {
    color: var(--hb-text-muted);
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

#sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

#sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

#sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(229, 169, 60, 0.2) 0%, rgba(229, 169, 60, 0.05) 100%);
    border-left: 3px solid var(--hb-gold);
    font-weight: 600;
}

#sidebar .nav-link.active i {
    color: var(--hb-gold);
}

#content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--hb-bg-dark);
}

/* Top Navbar */
.top-navbar {
    background-color: var(--hb-bg-sidebar);
    border-bottom: 1px solid var(--hb-border);
    padding: 0.75rem 1.5rem;
}

/* Form Controls */
.form-control, .form-select {
    background-color: #12151a;
    border: 1px solid var(--hb-border);
    color: #f1f5f9;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    background-color: #161a20;
    border-color: var(--hb-gold);
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(229, 169, 60, 0.15);
}

.form-control::placeholder {
    color: #525c6c;
}

.form-label {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

/* Buttons */
.btn-gold {
    background-color: var(--hb-gold);
    color: #0f1216;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-gold:hover, .btn-gold:focus {
    background-color: var(--hb-gold-hover);
    color: #0f1216;
    box-shadow: 0 4px 12px rgba(229, 169, 60, 0.3);
}

.btn-outline-gold {
    border: 1px solid var(--hb-gold);
    color: var(--hb-gold);
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-outline-gold:hover {
    background-color: var(--hb-gold);
    color: #0f1216;
}

.btn-dark-subtle {
    background-color: #21262d;
    border: 1px solid var(--hb-border);
    color: var(--hb-text);
    border-radius: 8px;
}

.btn-dark-subtle:hover {
    background-color: #2b313a;
    color: #fff;
}

/* Tables */
.table-hb {
    width: 100%;
    color: var(--hb-text);
    vertical-align: middle;
    border-collapse: separate;
    border-spacing: 0;
}

.table-hb thead th {
    background-color: #12161c;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--hb-border);
}

.table-hb tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #1e242d;
    font-size: 0.92rem;
}

.table-hb tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge-status {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
}

.badge-present { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-late { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-sick { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-leave { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-alpha { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Camera Viewport */
.camera-container {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--hb-gold);
    box-shadow: 0 0 25px rgba(229, 169, 60, 0.2);
    background: #000;
}

.camera-container video, .camera-container canvas {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect for selfie */
}

.camera-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.camera-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 270px;
    border: 2px dashed rgba(229, 169, 60, 0.5);
    border-radius: 50%;
    pointer-events: none;
}

/* Digital Clock Widget */
.digital-clock {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 15px rgba(229, 169, 60, 0.4);
    font-variant-numeric: tabular-nums;
}

/* Mobile Sidebar Toggle */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -260px;
    }
    #sidebar.show {
        left: 0;
    }
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(2px);
        z-index: 999;
        display: none;
    }
    .sidebar-backdrop.show {
        display: block;
    }
}

