/* =============================================
   PHATHABUILD - Construction Workforce App
   High-contrast design for tablet use on construction sites
   ============================================= */

/* CSS Variables */
:root {
    /* Primary Colors - Construction Blue */
    --primary: #1a365d;
    --primary-dark: #0f2341;
    --primary-light: #2c5282;

    /* Accent Colors - Safety Orange */
    --accent: #ed8936;
    --accent-dark: #c05621;
    --accent-light: #f6ad55;

    /* Status Colors */
    --success: #38a169;
    --success-light: #48bb78;
    --warning: #d69e2e;
    --warning-light: #ecc94b;
    --danger: #e53e3e;
    --danger-light: #fc8181;
    --info: #3182ce;
    --info-light: #63b3ed;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --gray-900: #171923;

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

a {
    text-decoration: none;
    color: var(--primary);
}

/* =============================================
   BUTTONS - Large tap targets for gloved hands
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px; /* Touch-friendly */
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #2f855a;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 40px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    min-height: 56px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    transition: var(--transition);
    min-height: 48px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.form-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.input-with-icon input {
    padding-left: 2.75rem;
}

/* Toggle Switch */
.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: 28px;
    transition: var(--transition);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* =============================================
   AUTHENTICATION PAGES
   ============================================= */

.auth-container {
    display: none;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.auth-container.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-branding {
    flex: 1;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.auth-branding-content {
    text-align: center;
}

.auth-logo {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.auth-logo i {
    font-size: 3rem;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-branding h1 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-branding p {
    opacity: 0.9;
    font-size: 1.0625rem;
    max-width: 280px;
    margin: 0 auto;
}

.auth-features {
    margin-top: 2rem;
    text-align: left;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.auth-feature i {
    width: 24px;
    font-size: 1.25rem;
}

.auth-forms {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-page {
    display: none;
}

.auth-page.active {
    display: block;
}

.auth-page h2 {
    margin-bottom: 0.5rem;
}

.auth-page > p {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--gray-600);
}

.remember-me input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.forgot-link {
    color: var(--accent);
    font-weight: 500;
}

.auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--gray-600);
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.back-link:hover {
    color: var(--primary);
}

/* =============================================
   MAIN APP LAYOUT
   ============================================= */

.app-container {
    display: none;
}

.app-container.active {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-slow);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.sidebar-logo i {
    color: var(--accent);
}

.sidebar-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
}

.sidebar-user {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

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

.user-name {
    font-weight: 600;
    font-size: 1rem;
}

.user-role {
    font-size: 0.8125rem;
    opacity: 0.7;
}

.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    list-style: none;
}

.menu-section {
    padding: 0.75rem 1.5rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    font-weight: 500;
}

.menu-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.menu-item.active a {
    background: var(--accent);
    color: var(--white);
}

.menu-item i {
    width: 24px;
    font-size: 1.125rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bibc-week-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

.bibc-label {
    font-size: 0.8125rem;
    opacity: 0.7;
}

.bibc-week {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.5rem;
}

.header-title {
    flex: 1;
}

.header-title h1 {
    font-size: 1.5rem;
}

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

.header-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-weight: 500;
}

.header-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    color: var(--gray-600);
    font-size: 1.125rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.header-btn:hover {
    background: var(--gray-200);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.header-user:hover {
    background: var(--gray-100);
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Dropdown Menu */
.header-user-wrapper {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    min-width: 220px;
    z-index: 1000;
    display: none;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.user-dropdown-name {
    font-weight: 600;
    color: var(--gray-800);
}

.user-dropdown-email {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--gray-100);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
}

.user-dropdown-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.user-dropdown-item i {
    width: 20px;
    text-align: center;
}

.page-content {
    flex: 1;
    padding: 1.5rem;
}

/* =============================================
   PAGE LAYOUTS
   ============================================= */

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
}

.filter-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 0.9375rem;
    min-width: 150px;
}

/* =============================================
   CARDS
   ============================================= */

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.0625rem;
}

.card-header h3 i {
    color: var(--primary);
}

.card-badge {
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-full {
    grid-column: 1 / -1;
}

/* =============================================
   DASHBOARD
   ============================================= */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.stat-primary .stat-icon {
    background: rgba(26, 54, 93, 0.1);
    color: var(--primary);
}

.stat-success .stat-icon {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success);
}

.stat-warning .stat-icon {
    background: rgba(214, 158, 46, 0.1);
    color: var(--warning);
}

.stat-info .stat-icon {
    background: rgba(49, 130, 206, 0.1);
    color: var(--info);
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1;
}

.stat-label {
    font-size: 0.9375rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Activity List */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.activity-icon.clock-in {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success);
}

.activity-icon.clock-out {
    background: rgba(214, 158, 46, 0.1);
    color: var(--warning);
}

.activity-content {
    flex: 1;
}

.activity-name {
    font-weight: 600;
    color: var(--gray-800);
}

.activity-detail {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.activity-time {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Worker List */
.worker-list {
    max-height: 300px;
    overflow-y: auto;
}

.worker-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.worker-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.worker-info {
    flex: 1;
}

.worker-name {
    font-weight: 600;
}

.worker-site {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.worker-since {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-align: right;
}

/* BIBC Status Banner */
.bibc-status-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary);
}

.bibc-status-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.bibc-status-banner.warning {
    border-left-color: var(--warning);
}

.bibc-status-banner.warning .bibc-status-icon {
    background: var(--warning);
}

.bibc-status-banner.danger {
    border-left-color: var(--danger);
}

.bibc-status-banner.danger .bibc-status-icon {
    background: var(--danger);
}

.bibc-status-text {
    flex: 1;
}

.bibc-status-text strong {
    color: var(--gray-800);
}

.bibc-status-text p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-400);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.empty-cell {
    text-align: center;
    padding: 3rem 1rem !important;
    color: var(--gray-400);
}

.empty-cell i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* =============================================
   CLOCKING PAGE
   ============================================= */

.clocking-container {
    max-width: 900px;
    margin: 0 auto;
}

.clocking-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.clocking-option {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: var(--shadow);
}

.clocking-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.clocking-option:active {
    transform: translateY(0);
}

.option-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.clocking-option h3 {
    margin-bottom: 0.5rem;
}

.clocking-option p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.foreman-only {
    display: none;
}

.role-foreman .foreman-only,
.role-admin .foreman-only {
    display: block;
}

/* Clocking Option Badges */
.option-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.75rem;
    background: var(--gray-200);
    color: var(--gray-600);
}

.option-badge.recommended {
    background: rgba(56, 161, 105, 0.15);
    color: var(--success);
}

/* Location Card Styles */
.clocking-location-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gray-300);
    transition: var(--transition);
}

.clocking-location-card.location-verified {
    border-left-color: var(--success);
    background: linear-gradient(135deg, rgba(56, 161, 105, 0.05) 0%, var(--white) 100%);
}

.clocking-location-card.location-warning {
    border-left-color: var(--warning);
    background: linear-gradient(135deg, rgba(214, 158, 46, 0.05) 0%, var(--white) 100%);
}

.clocking-location-card.location-error {
    border-left-color: var(--danger);
    background: linear-gradient(135deg, rgba(229, 62, 62, 0.05) 0%, var(--white) 100%);
}

.location-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.location-header > i {
    font-size: 1.5rem;
    color: var(--primary);
}

.location-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.location-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.location-site {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.location-status {
    font-size: 1.25rem;
}

.location-details {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Site Selection Card */
.site-selection-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.site-selection-card label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.site-selection-card select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
}

.site-verification {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.site-verification.verified {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success);
}

.site-verification.warning {
    background: rgba(237, 137, 54, 0.1);
    color: var(--warning);
}

.site-verification.error {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger);
}

.verification-status i {
    margin-right: 0.5rem;
}

/* Clocked In List */
.clocking-summary-card {
    margin-top: 1.5rem;
}

.clocked-in-list {
    max-height: 400px;
    overflow-y: auto;
}

.clocked-in-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}

.clocked-in-item:last-child {
    border-bottom: none;
}

.clocked-in-item:hover {
    background: var(--gray-50);
}

.clocked-in-item .employee-info {
    flex: 1;
}

.clocked-in-item .clock-time {
    font-size: 0.875rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Manual Clocking Modal */
.clocking-location-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.clocking-location-info i {
    color: var(--primary);
}

.modal-instructions {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.manual-employee-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
}

.manual-employee-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
}

.manual-employee-item:last-child {
    border-bottom: none;
}

.manual-employee-item:hover {
    background: var(--gray-50);
}

.manual-employee-item:active {
    background: var(--gray-100);
}

.manual-employee-item .employee-info {
    flex: 1;
}

.manual-employee-item .employee-detail {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.clock-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.clock-status.clocked-in {
    background: rgba(56, 161, 105, 0.15);
    color: var(--success);
}

.clock-status.clocked-out {
    background: var(--gray-200);
    color: var(--gray-500);
}

/* Batch Clocking Modal */
.batch-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

.batch-selection-info {
    color: var(--gray-700);
}

.batch-quick-actions {
    display: flex;
    gap: 0.5rem;
}

.batch-employee-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
}

.batch-employee-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}

.batch-employee-item:last-child {
    border-bottom: none;
}

.batch-employee-item:hover {
    background: var(--gray-50);
}

.batch-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.batch-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
    cursor: pointer;
}

.batch-employee-item .employee-info {
    flex: 1;
}

.batch-employee-item .clock-status {
    min-width: 40px;
    text-align: center;
}

/* =============================================
   DATA TABLES
   ============================================= */

.table-responsive {
    overflow-x: auto;
}

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

.data-table th {
    text-align: left;
    padding: 1rem;
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tr:hover {
    background: var(--gray-50);
}

.employee-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.employee-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.employee-name {
    font-weight: 600;
}

.employee-id {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.benefit-code {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 4px;
    font-weight: 700;
    font-family: monospace;
    font-size: 0.9375rem;
}

.status-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-active {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success);
}

.status-inactive {
    background: rgba(160, 174, 192, 0.2);
    color: var(--gray-500);
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--gray-200);
    color: var(--primary);
}

.action-btn.danger:hover {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger);
}

/* =============================================
   BIBC RETURN GENERATOR
   ============================================= */

.bibc-generator {
    max-width: 1200px;
}

.period-selector {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.period-selector .form-group {
    margin-bottom: 0;
    min-width: 150px;
}

.bibc-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-800);
}

.summary-total {
    background: var(--primary);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    margin: -0.5rem;
}

.summary-total .summary-label {
    color: rgba(255, 255, 255, 0.8);
}

.summary-total .summary-value {
    color: var(--white);
}

.bibc-table th,
.bibc-table td {
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.bibc-table th:first-child,
.bibc-table td:first-child,
.bibc-table th:nth-child(2),
.bibc-table td:nth-child(2),
.bibc-table th:nth-child(3),
.bibc-table td:nth-child(3) {
    text-align: left;
}

.bibc-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.bibc-period {
    font-size: 0.9375rem;
    color: var(--gray-600);
    font-weight: 500;
}

.warning-list {
    list-style: none;
}

.warning-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--warning);
}

.warning-list li i {
    margin-top: 0.125rem;
}

/* Benefit Code Preview */
.benefit-code-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
}

.benefit-code-preview label {
    color: var(--gray-600);
    font-weight: 500;
}

.benefit-code-preview .benefit-code {
    font-size: 1.25rem;
    padding: 0.5rem 1rem;
}

/* =============================================
   SITES GRID
   ============================================= */

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.site-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.site-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 1.25rem;
}

.site-card-header h3 {
    color: var(--white);
    margin-bottom: 0.25rem;
}

.site-card-header p {
    opacity: 0.8;
    font-size: 0.875rem;
}

.site-card-body {
    padding: 1.25rem;
}

.site-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.site-stat:last-child {
    border-bottom: none;
}

.site-stat-label {
    color: var(--gray-500);
}

.site-stat-value {
    font-weight: 600;
}

.site-card-actions {
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    display: flex;
    gap: 0.5rem;
}

/* =============================================
   SETTINGS PAGE
   ============================================= */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

/* =============================================
   MODALS
   ============================================= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-lg {
    max-width: 700px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Camera Container */
.camera-container {
    position: relative;
    background: var(--gray-900);
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.camera-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.face-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 260px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.5);
}

.camera-status {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Enrollment Steps */
.enrollment-steps {
    text-align: center;
    margin-bottom: 1.5rem;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.step-indicator .step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step-indicator .step.active {
    background: var(--primary);
    color: var(--white);
}

.step-indicator .step.complete {
    background: var(--success);
    color: var(--white);
}

.enrollment-instruction {
    color: var(--gray-600);
}

.captured-photos {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.captured-photo {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 3px solid var(--success);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.captured-photo img {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.captured-photo span {
    font-size: 0.7rem;
    color: var(--gray-600);
    padding: 2px 0;
    background: var(--gray-100);
    width: 100%;
    text-align: center;
}

.photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    border: 2px dashed var(--gray-300);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    gap: 4px;
}

.photo-placeholder i {
    font-size: 1.5rem;
}

.photo-placeholder span {
    font-size: 0.7rem;
}

/* Face Status Badges */
.face-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.face-status.face-enrolled {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success);
}

.face-status.face-pending {
    background: rgba(160, 174, 192, 0.2);
    color: var(--gray-500);
}

/* Enhanced Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 1rem;
}

.step-indicator .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.step-indicator .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}

.step-indicator .step-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.step-indicator .step.active .step-number {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(26, 54, 93, 0.2);
}

.step-indicator .step.completed .step-number {
    background: var(--success);
    color: var(--white);
}

.step-indicator .step-line {
    width: 40px;
    height: 3px;
    background: var(--gray-200);
    margin: 0 0.5rem;
    margin-bottom: 20px;
}

.step-indicator .step.completed + .step-line {
    background: var(--success);
}

/* Face Detection Status */
.face-detection-status {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.face-detection-status i {
    font-size: 1.1rem;
}

/* Enrollment Employee Info */
.enrollment-employee-info {
    text-align: center;
    padding: 0.75rem;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

.enrollment-employee-info strong {
    color: var(--gray-500);
    font-weight: 500;
}

/* Enrollment Camera */
.enrollment-camera {
    max-width: 480px;
    margin: 0 auto;
}

/* Enrollment Tips */
.enrollment-tips {
    background: rgba(49, 130, 206, 0.08);
    border: 1px solid rgba(49, 130, 206, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.enrollment-tips h4 {
    font-size: 0.9rem;
    color: var(--info);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.enrollment-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.enrollment-tips li {
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.enrollment-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--info);
}

/* Action Buttons Group */
.action-btns {
    display: flex;
    gap: 0.35rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.action-btn.action-success {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success);
}

.action-btn.action-success:hover {
    background: rgba(56, 161, 105, 0.2);
}

.action-btn.action-danger:hover {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger);
}

/* View Employee Details */
.employee-details {
    padding: 1rem 0;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.detail-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.detail-name h2 {
    margin-bottom: 0.25rem;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h4 {
    color: var(--gray-500);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

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

.detail-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.detail-item span {
    font-weight: 500;
    color: var(--gray-800);
}

/* Modal Small */
.modal-sm .modal-content {
    max-width: 400px;
}

/* Benefit Code Preview */
.benefit-code-preview {
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.benefit-code-preview label {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.benefit-code-preview small {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
}

/* Form Hints */
.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Filter Group */
.filter-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filter-group select {
    min-width: 140px;
}

/* Clocking Result */
.clocking-result {
    text-align: center;
    padding: 2rem;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
}

.result-icon.success {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success);
}

.result-icon.error {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger);
}

.result-time {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    min-width: 300px;
    max-width: 400px;
}

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

.toast-icon {
    font-size: 1.25rem;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
}

/* =============================================
   LOADING OVERLAY
   ============================================= */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.loading-spinner p {
    color: var(--gray-600);
    font-weight: 500;
}

/* Card Loading State */
.card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.card-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--gray-500);
}

.card-loading i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.card-loading p {
    font-size: 0.875rem;
}

/* Toast Retry Button */
.toast-retry {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

.toast-retry:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Skeleton Loading Animation */
@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .sidebar-toggle {
        display: block;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
        max-width: 100%;
    }

    .auth-branding {
        padding: 2rem;
    }

    .auth-features {
        display: none;
    }

    .auth-forms {
        padding: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
    }

    .bibc-actions {
        flex-direction: column;
    }

    .bibc-status-banner {
        flex-direction: column;
        text-align: center;
    }

    .header-date {
        display: none;
    }

    .clocking-options {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .stat-icon {
        margin: 0 auto 0.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .top-header {
        padding: 0 1rem;
    }

    .page-content {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    /* Touch-friendly buttons */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    /* Better table on mobile */
    .employee-table {
        font-size: 0.875rem;
    }

    .employee-table th,
    .employee-table td {
        padding: 0.5rem;
    }

    /* Activity items on mobile */
    .activity-item {
        padding: 0.75rem;
    }

    .activity-icon {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .activity-name {
        font-size: 0.875rem;
    }

    .activity-time {
        font-size: 0.75rem;
    }

    /* Worker list on mobile */
    .worker-item {
        padding: 0.75rem;
    }

    /* Card improvements */
    .card {
        margin-bottom: 1rem;
    }

    .card-header h3 {
        font-size: 1rem;
    }

    /* Clocking page on mobile */
    .clocking-container {
        padding: 1rem;
    }

    .camera-preview {
        height: 300px;
    }

    /* Modal on mobile */
    .modal-content {
        max-height: 90vh;
        margin: 5vh 0.5rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-header,
    .btn,
    .modal {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .page-content {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
