/* Modern Color Palette & Variables */
:root {
    --primary-color: #E02440;
    /* Custom Red Theme */
    --primary-hover: #c01f35;
    --success-color: #42b72a;
    /* Facebook Green */
    --success-hover: #36a420;
    --background-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #1c1e21;
    --text-muted: #606770;
    --border-color: #dddfe2;
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .1), 0 8px 16px rgba(0, 0, 0, .1);
    --radius: 8px;
    --font-family: 'SFProDisplay-Regular', Helvetica, Arial, sans-serif;
    --font-kanit: 'Kanit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Login Page specific */
.login-page {
    background-color: #f0f2f5;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center vertically specifically for the lockup */
    max-width: 1600px;
    /* Increased to fill more space */
    width: 95%;
    /* Use almost full width */
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    padding-bottom: 80px;
    padding-top: 80px;
}

/* Corner Logo */
.logo-corner {
    position: absolute;
    top: 30px;
    left: 40px;
    z-index: 1000;
}

.logo-corner img {
    height: 80px;
    /* Adjusted size again for larger screens */
    width: auto;
}

/* Left Side: Hero */
.login-hero {
    flex: 1;
    /* Take up available space */
    padding-right: 80px;
    /* More spacing */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Center horizontally */
    align-items: center;
    /* Center horizontally */

}

.hero-text-content {
    text-align: left;
    /* Left align the text block */
}

.hero-title {
    font-family: var(--font-kanit);
    color: var(--primary-color);
    font-size: 80px;
    /* Even bigger */
    font-weight: 700;
    line-height: 1.1;
    /* Tighter line height for large text */
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-family: var(--font-kanit);
    font-size: 32px;
    /* Bigger subtitle */
    line-height: 1.4;
    color: #1c1e21;
    font-weight: 400;
    margin-bottom: 30px;
}

/* ... existing styles ... */

/* Right Side: Form */
.login-form-container {
    flex: 0 0 550px;
    /* Fixed wider width for form area */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 80px;
    /* More spacing */
}

.login-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 30px 24px;
    /* Increased padding */
    width: 100%;
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
    /* More space between fields */
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    /* Larger inputs */
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 18px;
    /* Larger text */
    line-height: normal;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px #e7f3ff;
}

.btn {
    border: none;
    border-radius: 6px;
    font-size: 22px;
    /* Larger button text */
    font-weight: 700;
    cursor: pointer;
    line-height: 52px;
    /* Taller button */
    padding: 0 16px;
    transition: background-color 0.2s;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    width: auto;
    /* Create account button is usually not full width */
    padding: 0 16px;
    font-size: 17px;
    line-height: 48px;
    margin-top: 6px;
}

.btn-success:hover {
    background-color: var(--success-hover);
}

/* Fix global .btn styles breaking small table action buttons */
.btn-sm,
.btn-success.btn-sm,
.btn-primary.btn-sm,
.btn-danger.btn-sm,
.btn-warning.btn-sm,
.btn-secondary.btn-sm {
    width: auto !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    padding: 5px 9px !important;
    border-radius: 4px !important;
    margin-top: 0 !important;
}

/* Override focus border color to grey (not red) for all inputs */
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: #adb5bd !important;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25) !important;
    outline: none !important;
}

.btn-google {
    background-color: #ffffff;
    color: #757575;
    border: 1px solid #ddd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    font-size: 18px;
    font-weight: 500;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn-google:hover {
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.forgot-password {
    margin: 16px 0 20px;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.create-account {
    text-align: center;
    padding-top: 6px;
}

.login-footer-text {
    font-size: 14px;
    color: #1c1e21;
    text-align: center;
    font-family: 'SFProDisplay-Regular', Helvetica, Arial, sans-serif;
}

.error-message {
    color: #f02849;
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
    border: 1px solid #f02849;
    padding: 8px;
    border-radius: 4px;
    background: #ffebe8;
}

.demo-creds {
    margin-top: 15px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Footer */
.main-footer {
    background: #fff;
    padding: 20px;
    color: #737373;
    font-size: 12px;
    text-align: center;
    /* Centered for mobile, adjusted below */
}

.footer-lang span,
.footer-links span {
    margin: 0 5px;
    cursor: pointer;
}

.footer-lang span:hover,
.footer-links span:hover {
    text-decoration: underline;
}

.footer-lang {
    margin-bottom: 10px;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-copy {
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .logo-corner {
        display: none;
    }

    .login-wrapper {
        flex-direction: column;
        width: 100%;
        /* Full width on mobile */
        max-width: 400px;
        margin: 0 auto;
        padding-top: 20px;
        text-align: center;
    }

    .login-hero {
        flex: 1;
        /* Reset flex */
        padding-right: 0;
        margin-bottom: 40px;
        align-items: center;
        text-align: center;
        border-right: none;
        /* Remove divider on mobile */
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .login-form-container {
        flex: 1;
        /* Reset flex */
        width: 100%;
        padding-left: 0;
    }
}

/* Mobile Sidebar / Bottom Navigation */
@media (max-width: 900px) {
    .app-layout {
        flex-direction: column !important;
    }

    .sidebar {
        width: 100% !important;
        height: auto !important;
        position: fixed !important;
        bottom: 0 !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        flex-direction: row !important;
        border-right: none !important;
        border-top: none !important;
        z-index: 1000 !important;
        padding-bottom: 50px !important;
        background-color: var(--primary-color) !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2) !important;
    }

    .sidebar-header,
    .sidebar-profile-section {
        display: none !important;
    }

    .sidebar-nav {
        flex-direction: row !important;
        overflow-y: hidden !important;
        overflow-x: auto !important;
        padding: 0 !important;
        width: 100% !important;
        justify-content: space-between !important;
        display: flex !important;
    }

    .nav-link {
        flex-direction: column !important;
        padding: 15px 5px !important;
        font-size: 10px !important;
        text-align: center !important;
        flex: 1 !important;
        justify-content: center !important;
        border-left: none !important;
        border-top: none !important;
        border-radius: 0 !important;
        display: flex !important;
        color: rgba(255, 255, 255, 0.85) !important;
        transition: all 0.2s ease !important;
        border-right: 1px solid rgba(255,255,255,0.15) !important;
        background-color: transparent !important;
    }

    .nav-link:last-child {
        border-right: none !important;
    }

    .nav-link i {
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        font-size: 24px !important;
        display: block !important;
        width: 100% !important;
    }

    .nav-link span {
        display: none !important;
    }

    .nav-link:hover,
    .nav-link.active {
        background-color: #fff !important;
        color: var(--primary-color) !important;
        border-left-color: transparent !important;
        border-top-color: transparent !important;
        font-weight: 700 !important;
    }

    /* Hide group labels and dividers in mobile bottom nav */
    .nav-group-label,
    .nav-divider,
    .nav-link .badge {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding-bottom: 100px !important;
        /* Space for bottom nav */
        width: 100% !important;
    }

    .mobile-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Stack Check-In/Out Buttons on Mobile */
    .check-in-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .action-btn-card {
        min-height: 100px !important;
        padding: 20px !important;
    }

    .action-btn-card div:first-child {
        font-size: 30px !important;
        /* Smaller icon */
        margin-bottom: 5px !important;
    }

    .action-btn-card div:nth-child(2) {
        font-size: 18px !important;
        /* Smaller title */
    }

    /* Stack Location Info on Mobile */
    .user-location-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .user-location-info>div {
        width: 100% !important;
    }

    .user-location-info i {
        font-size: 16px !important;
    }

    /* Responsive Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================
    Application Layout (Dashboard & Sidebar)
    ========================================= */

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--primary-color);
    border-right: none;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    z-index: 100;
    transition: transform 0.3s ease;
    color: #fff;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    height: auto;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
    background: #fff;
}

.sidebar-profile-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.sidebar-profile-role {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 4px solid transparent;
    font-size: 15px;
}

.nav-link i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    font-style: normal;
    font-size: 18px;
}

.nav-link:hover,
.nav-link.active {
    background-color: #fff;
    color: var(--primary-color) !important;
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* Sidebar group labels */
.nav-group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #ffffff;
    padding: 14px 24px 4px;
}

/* Sidebar divider */
.nav-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 8px 16px;
}

/* Logout link */
.nav-logout {
    margin-top: auto;
    color: #ff8a80 !important;
}

.nav-logout:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-left-color: #ff8a80;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    /* Width of sidebar */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f9fafb;
}

/* Top Navbar */
.top-navbar {
    height: 70px;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-menu {
    display: none;
    /* Hidden on desktop */
    font-size: 24px;
    cursor: pointer;
    margin-right: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-left: 10px;
}

.avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.content-wrapper {
    padding: 30px;
    flex: 1;
}

/* Container Utility */
.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Card Utility */
.card {
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 24px;
}


/* Dashboard Specifics */
.dashboard-header {
    margin-bottom: 30px;
}

.stats-card-gradient {
    border-radius: 15px;
    color: white;
    padding: 20px;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stats-card-gradient::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #B388FF 0%, #7C4DFF 100%);
}

.bg-gradient-green {
    background: linear-gradient(135deg, #26C6DA 0%, #00BCD4 100%);
    /* Teal actually */
}

.bg-gradient-pink {
    background: linear-gradient(135deg, #FF80AB 0%, #FF4081 100%);
}

.bg-gradient-blue {
    background: linear-gradient(135deg, #64B5F6 0%, #2196F3 100%);
}

.card-icon-top {
    font-size: 24px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* Circle icon background */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    margin-top: 5px;
}

.clock-container {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.digital-clock {
    font-size: 64px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    /* Use Inter for numbers */
    line-height: 1;
    margin-bottom: 10px;
    color: #1c1e21;
}

.date-display {
    font-size: 18px;
    color: #606770;
    margin-bottom: 20px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    color: #606770;
    margin-bottom: 15px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #4CAF50;
    /* Active green */
    border-radius: 50%;
    margin-right: 8px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.check-in-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.action-btn-card {
    padding: 30px;
    border-radius: 12px;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.action-btn-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-check-in {
    background: linear-gradient(135deg, #4CAF50 0%, #43A047 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-check-out {
    background: linear-gradient(135deg, #80DEEA 0%, #4DD0E1 100%);
    box-shadow: 0 4px 15px rgba(128, 222, 234, 0.3);
    color: white;
}

.location-check {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #606770;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Override Sidebar Profile */
.sidebar-profile-section {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.sidebar-profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid white;
}

.sidebar-profile-name {
    color: white;
    font-weight: 600;
    font-size: 18px;
    display: block;
}

.sidebar-profile-role {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Charts Placeholder */
.chart-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
    min-height: 300px;
    /* Placeholder height */
}
 / *   A u t o   A t t e n d a n c e   S e c t i o n   o n   L o g i n   P a g e   * / 
 . a t t e n d a n c e - s e c t i o n   { 
         b a c k g r o u n d :   w h i t e ; 
         b o r d e r - r a d i u s :   1 5 p x ; 
         p a d d i n g :   2 0 p x ; 
         m a r g i n - b o t t o m :   2 5 p x ; 
         b o x - s h a d o w :   0   4 p x   6 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
         t e x t - a l i g n :   c e n t e r ; 
 } 
 
 . a t t e n d a n c e - c l o c k   { 
         f o n t - s i z e :   3 r e m ; 
         f o n t - w e i g h t :   7 0 0 ; 
         c o l o r :   # 1 a 1 a 1 a ; 
         m a r g i n - b o t t o m :   5 p x ; 
 } 
 
 . a t t e n d a n c e - d a t e   { 
         c o l o r :   # 6 6 6 ; 
         m a r g i n - b o t t o m :   2 0 p x ; 
 } 
 
 . v i d e o - w r a p   { 
         p o s i t i o n :   r e l a t i v e ; 
         w i d t h :   1 0 0 % ; 
         m a x - w i d t h :   4 0 0 p x ; 
         m a r g i n :   0   a u t o   2 0 p x ; 
         b o r d e r - r a d i u s :   1 2 p x ; 
         o v e r f l o w :   h i d d e n ; 
         b a c k g r o u n d :   # 0 0 0 ; 
         a s p e c t - r a t i o :   4 / 3 ; 
 } 
 
 # a t t e n d a n c e V i d e o   { 
         w i d t h :   1 0 0 % ; 
         h e i g h t :   1 0 0 % ; 
         o b j e c t - f i t :   c o v e r ; 
 } 
 
 # f a c e C a n v a s   { 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   0 ; 
         l e f t :   0 ; 
         w i d t h :   1 0 0 % ; 
         h e i g h t :   1 0 0 % ; 
 } 
 
 . g p s - i n f o - b o x   { 
         b a c k g r o u n d :   # f 8 f 9 f a ; 
         b o r d e r :   1 p x   s o l i d   # e e e ; 
         p a d d i n g :   1 2 p x ; 
         b o r d e r - r a d i u s :   8 p x ; 
         f o n t - s i z e :   0 . 9 r e m ; 
         m a r g i n - t o p :   1 5 p x ; 
 } 
 
 . s t a t u s - v a l i d   {   c o l o r :   # 2 8 a 7 4 5 ;   f o n t - w e i g h t :   6 0 0 ;   } 
 . s t a t u s - i n v a l i d   {   c o l o r :   # d c 3 5 4 5 ;   f o n t - w e i g h t :   6 0 0 ;   } 
 . s t a t u s - p e n d i n g   {   c o l o r :   # f f c 1 0 7 ;   f o n t - w e i g h t :   6 0 0 ;   } 
 
 . f a c e - m a t c h i n g - o v e r l a y   { 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   5 0 % ; 
         l e f t :   5 0 % ; 
         t r a n s f o r m :   t r a n s l a t e ( - 5 0 % ,   - 5 0 % ) ; 
         c o l o r :   w h i t e ; 
         b a c k g r o u n d :   r g b a ( 0 , 0 , 0 , 0 . 5 ) ; 
         p a d d i n g :   1 0 p x   2 0 p x ; 
         b o r d e r - r a d i u s :   2 0 p x ; 
         d i s p l a y :   n o n e ; 
         z - i n d e x :   1 0 ; 
 } 
  
 