/* style.css - Style utama aplikasi absensi (Modern UI) */
/* Light theme default - KONTRAS TINGGI */

:root {
    --primary-color: #4f46e5;
    --accent-color: #0ea5e9;
    --primary-rgb: 79, 70, 229;
    --accent-rgb: 14, 165, 233;

    /* Background - putih bersih untuk kontras maksimal */
    --bg-app: #f5f7fb;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-input: #f9fafb;
    --bg-hover: #f3f4f6;

    /* Text - kontras tinggi di light mode */
    --text-primary: #0f172a;      /* Dark slate - hampir hitam */
    --text-secondary: #475569;    /* Slate 600 - lebih gelap dari sebelumnya */
    --text-muted: #64748b;        /* Slate 500 - lebih gelap */
    --text-inverse: #ffffff;

    /* Border - lebih visible */
    --border-color: #cbd5e1;      /* Slate 300 - lebih tegas */
    --border-input: #94a3b8;      /* Slate 400 */

    /* v48: warna aksen utk teks berwarna inline — aman di light, dioverride dark.css */
    --success-strong: #047857;
    --warning-strong: #b45309;
    --danger-strong: #b91c1c;
    --danger-accent: #dc2626;
    --accent-strong: #4f46e5;

    /* Status */
    --success: #059669;
    --success-bg: #d1fae5;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --info: #2563eb;
    --info-bg: #dbeafe;

    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 0;
    --topbar-height: 60px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);

    /* Transition */
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-app);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    transition: var(--transition);
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--topbar-height);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.sidebar-logo-text {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-top: 20px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--accent-rgb), 0.1));
    color: var(--primary-color);
    font-weight: 600;
}

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

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin-bottom: 8px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: capitalize;
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--danger-bg);
    color: var(--danger);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

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

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

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.btn-toggle-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-primary);
}

.page-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.server-time {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-input);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.server-time .time-icon {
    font-size: 14px;
}

.btn-theme-toggle {
    background: var(--bg-input);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.btn-theme-toggle:hover {
    background: var(--bg-hover);
    transform: rotate(15deg);
}

/* Page Content */
.page-content {
    padding: 24px;
    flex: 1;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-body {
    padding: 20px;
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-wide {
    grid-column: span 2;
}

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

.stat-icon-blue { background: #dbeafe; }
.stat-icon-green { background: #d1fae5; }
.stat-icon-red { background: #fee2e2; }
.stat-icon-orange { background: #fef3c7; }
.stat-icon-purple { background: #ede9fe; }

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    grid-column: span 3;
    display: flex;
    align-items: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.welcome-content {
    flex: 1;
    z-index: 1;
}

.welcome-title {
    font-size: 24px;
    margin-bottom: 8px;
}

.welcome-date, .welcome-time {
    opacity: 0.9;
    margin-bottom: 4px;
}

.welcome-role {
    margin-top: 8px;
}

.welcome-illustration {
    font-size: 80px;
    opacity: 0.3;
}

.illustration-circle {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

/* Dashboard Columns */
.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Attendance Time Cards */
.attendance-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.time-card {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    display: block;
}

.time-card:hover, .time-card.selectable.selected {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
    transform: translateY(-2px);
}

.time-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.time-card-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.time-card-time {
    color: var(--text-secondary);
    font-size: 12px;
}

.time-card-done {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-card-late {
    font-size: 11px;
    color: var(--warning-strong);
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    background: var(--bg-input);
    color: var(--text-primary);
    white-space: nowrap;
}

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

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

.btn-primary {
    background: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-color);
    filter: brightness(0.9);
}

.btn-success {
    background: #047857; /* v48: emerald-700 — putih di atasnya 4.6:1 (dulu #10b981 = 2.5:1) */
    color: white;
}
.btn-success:hover { filter: brightness(0.9); }

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { filter: brightness(0.9); }

.btn-warning {
    background: var(--warning);
    color: #78350f; /* v48: amber-900 — di atas amber 5:1 (dulu putih = 2.2:1) */
    font-weight: 600;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}

.btn-lg, .btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-block {
    display: flex;
    width: 100%;
    margin-top: 8px;
}

.btn-icon {
    margin-left: 6px;
}

.btn-primary.btn-block {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

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

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    margin-right: 6px;
}

.form-group small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.form-actions {
    padding-top: 16px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 4px;
}

.checkbox-label small {
    margin-top: 4px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: var(--bg-input);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable:hover {
    color: var(--primary-color);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning, .badge-late { background: var(--warning-bg); color: #92400e; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-admin { background: #ede9fe; color: #6d28d9; }
.badge-ketua { background: #fef3c7; color: #92400e; }
.badge-user { background: #dbeafe; color: #1e40af; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-success { background: var(--success-bg); color: #065f46; border-color: var(--success); }
.alert-error, .alert-danger { background: var(--danger-bg); color: #991b1b; border-color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: #92400e; border-color: var(--warning); }
.alert-info { background: var(--info-bg); color: #1e40af; border-color: var(--info); }

/* Alert Prominent (untuk notifikasi penting) */
.alert-prominent {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-left-width: 5px;
    border-radius: var(--radius-md);
}

.alert-icon-large {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
    line-height: 1.6;
}

.alert-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.face-registration-tips {
    background: var(--bg-input);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

.face-registration-tips h4 {
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 8px;
}

.face-registration-tips ul {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 12px;
}

.face-registration-tips li {
    margin-bottom: 4px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    align-items: flex-end;
}

.filter-active-indicator {
    background: rgba(var(--primary-rgb), 0.1);
    border-left: 3px solid var(--primary-color);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-active-indicator strong {
    color: var(--primary-color);
}

.btn-clear-filter {
    background: var(--danger);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    margin-left: auto;
}

.btn-clear-filter:hover {
    filter: brightness(0.9);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    min-width: 120px;
}

.filter-group label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Pagination */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 13px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-controls select {
    padding: 6px 10px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
}

.btn-page {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.btn-page:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.page-info {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 0 8px;
}

/* Login Page */
.login-body {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    padding: 40px;
    animation: fadeInUp 0.5s ease;
}

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

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

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.login-logo-text {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.login-features {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    background: rgba(var(--primary-rgb), 0.08);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}

.login-form {
    margin-bottom: 24px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-wrapper input {
    padding-left: 40px;
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.default-creds {
    background: var(--bg-input);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.default-creds p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 4px 0;
}

.default-creds code {
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary-color);
    font-weight: 600;
}

.copyright {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.server-info {
    color: var(--text-muted);
    font-size: 11px;
}

/* Scan Page */
.scan-container {
    max-width: 1200px;
    margin: 0 auto;
}

.scan-header {
    text-align: center;
    margin-bottom: 24px;
}

.scan-title {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.scan-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.scan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.camera-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
}

#videoElement, #profileVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.face-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    aspect-ratio: 3/4;
    border: 3px dashed rgba(255,255,255,0.5);
    border-radius: 50%;
}

.face-box {
    position: absolute;
    border: 3px solid var(--success);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    transform: scaleX(-1);
}

.face-box.detected {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.camera-status {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
}

.scan-result {
    margin-top: 12px;
}

.geo-info {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.geo-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.geo-row:last-child {
    border-bottom: none;
}

.geo-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.geo-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.scan-action {
    text-align: center;
    padding: 24px;
}

.scan-checklist {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
}

.checklist-item.verified {
    background: var(--success-bg);
    color: #065f46;
}

.checklist-icon {
    font-size: 18px;
}

.btn-success.btn-large {
    padding: 16px 40px;
    font-size: 18px;
    background: linear-gradient(135deg, var(--success), #059669);
}

.btn-success.btn-large.ready {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.server-time-display {
    margin-top: 20px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.server-time-note {
    margin-top: 4px;
    color: var(--warning);
    font-size: 11px;
}

/* Selected Time Info */
.selected-time-info {
    text-align: center;
    padding: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

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

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.activity-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.activity-time {
    color: var(--text-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.stat-summary {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-summary-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

.modal-large {
    max-width: 800px;
}

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

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* FIX v22: container hanya lapisan posisi - TIDAK boleh menelan klik.
       Kalau tidak, container fixed ini menutupi halaman & semua tombol
       tak bisa diklik (bug mobile portrait). Toast-nya tetap interaktif. */
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--info);
}

.toast.toast-show {
    transform: translateX(0);
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--info); }

.toast-icon {
    font-size: 18px;
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 13px;
}

/* Profile Page */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-card {
    height: fit-content;
}

.profile-header {
    text-align: center;
    margin-bottom: 24px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    margin: 0 auto 12px;
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-username {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 13px;
}

.profile-shift {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 8px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.profile-stat {
    text-align: center;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.profile-stat .stat-value {
    font-size: 20px;
}

.profile-stat .stat-label {
    font-size: 11px;
}

.profile-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.face-actions {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.face-tips {
    background: var(--bg-input);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

.face-tips h4 {
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 8px;
}

.face-tips ul {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 12px;
}

.face-tips li {
    margin-bottom: 4px;
}

/* Cell formatting */
.cell-date {
    font-size: 13px;
}

.cell-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cell-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.thumb-photo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.no-photo {
    color: var(--text-muted);
}

.text-muted {
    color: var(--text-muted);
}

.match-score {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}

.match-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--warning), var(--success));
    transition: width 0.3s;
}

.match-text {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 4px;
}

/* Settings Page */
.shifts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-banner {
    background: rgba(var(--primary-rgb), 0.05);
    border-left: 3px solid var(--primary-color);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

.info-banner strong {
    color: var(--text-primary);
}

.info-banner ul {
    margin-left: 16px;
    margin-top: 8px;
}

.info-banner li {
    margin-bottom: 4px;
}

/* Time Item Card */
.time-item-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.time-item-card:hover {
    border-color: var(--primary-color);
}

.time-item-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-item-info {
    flex: 1;
}

.time-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.time-item-details {
    color: var(--text-secondary);
    font-size: 12px;
}

.time-item-actions {
    display: flex;
    gap: 4px;
}

/* Theme Selector */
.theme-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.theme-option {
    cursor: pointer;
    text-align: center;
    display: block;
}

.theme-option input {
    display: none;
}

.theme-preview {
    height: 100px;
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 8px;
    transition: var(--transition);
}

.theme-option input:checked + .theme-preview,
.theme-option.selected .theme-preview {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.theme-preview-light {
    background: #f5f7fb;
}

.theme-preview-dark {
    background: #1a1a2e;
}

.theme-preview-header {
    height: 20px;
    background: rgba(var(--primary-rgb), 0.3);
}

.theme-preview-body {
    display: flex;
    height: 80px;
}

.theme-preview-sidebar {
    width: 30%;
    background: rgba(0,0,0,0.1);
}

.theme-preview-dark .theme-preview-sidebar {
    background: rgba(255,255,255,0.1);
}

.theme-preview-content {
    flex: 1;
    background: rgba(var(--accent-rgb), 0.2);
}

/* Color Picker */
.color-presets {
    margin-bottom: 20px;
}

.form-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.preset-card {
    cursor: pointer;
    text-align: center;
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.preset-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.preset-colors {
    display: flex;
    gap: 2px;
    margin-bottom: 6px;
}

.preset-color {
    flex: 1;
    height: 24px;
    border-radius: 2px;
}

.preset-name {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.color-picker-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-picker-wrapper input[type="color"] {
    width: 50px;
    height: 40px;
    padding: 4px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
}

.color-text {
    flex: 1;
}

.preview-box {
    background: var(--bg-input);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

.preview-box h5 {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 13px;
}

.preview-components {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.preview-card {
    background: var(--bg-card);
    padding: 12px;
    border-radius: var(--radius-sm);
    width: 100%;
    border: 1px solid var(--border-color);
}

.preview-card-header {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    margin: -12px -12px 12px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 12px;
    font-weight: 600;
}

.preview-card-body {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Backup Page */
.backup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.backup-card {
    background: var(--bg-input);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
}

.backup-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.backup-card h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 18px;
}

.backup-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 13px;
}

.backup-card form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.backup-card input[type="file"] {
    padding: 8px;
    background: var(--bg-card);
    border: 1px dashed var(--border-input);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

/* Map Preview */
.map-preview {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.map-placeholder {
    text-align: center;
    padding: 40px 20px;
}

.map-icon {
    font-size: 64px;
    margin-bottom: 12px;
}

.map-coords {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 4px 0;
}

.map-hint {
    color: var(--primary-color);
    font-size: 12px;
    margin-top: 12px;
    background: rgba(var(--primary-rgb), 0.08);
    padding: 8px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.logo-preview {
    margin-bottom: 8px;
}

.logo-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.logo-placeholder {
    width: 80px;
    height: 80px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); font-size: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }

/* =============================================
   BULK OPERATIONS - Multiple User Management
   ============================================= */

.bulk-action-bar {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--accent-rgb), 0.1));
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bulk-action-bar #bulkSelectedCount {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: auto;
}

.bulk-target-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.bulk-tab-content {
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    max-height: 400px;
    overflow-y: auto;
}

.bulk-user-list {
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 8px;
}

.bulk-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
}

.bulk-user-item:hover {
    background: var(--bg-hover);
}

.bulk-user-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

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

.bulk-user-info strong {
    color: var(--text-primary);
    font-size: 13px;
}

.bulk-user-info small {
    color: var(--text-muted);
    font-size: 11px;
}

.bulk-user-current {
    flex-shrink: 0;
}

.bulk-select-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
}

.bulk-select-actions #bulkManualCount {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

.bulk-filter-preview {
    background: var(--bg-card);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    border: 1px solid var(--border-color);
}

.bulk-filter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.bulk-filter-item {
    background: var(--bg-input);
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    display: flex;
    flex-direction: column;
}

.bulk-filter-item small {
    color: var(--text-muted);
    font-size: 10px;
}

.bulk-filter-more {
    grid-column: 1 / -1;
    text-align: center;
    padding: 8px;
    color: var(--text-muted);
    font-style: italic;
    font-size: 12px;
}

.radio-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Custom scrollbar untuk bulk list */
.bulk-user-list::-webkit-scrollbar,
.bulk-tab-content::-webkit-scrollbar {
    width: 8px;
}

.bulk-user-list::-webkit-scrollbar-track,
.bulk-tab-content::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 4px;
}

.bulk-user-list::-webkit-scrollbar-thumb,
.bulk-tab-content::-webkit-scrollbar-thumb {
    background: var(--border-input);
    border-radius: 4px;
}

.bulk-user-list::-webkit-scrollbar-thumb:hover,
.bulk-tab-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Checkbox bigger di tabel user */
.data-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* =============================================
   AUTO-DETECTION SCAN PAGE (simplified flow)
   ============================================= */

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

.info-card {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-card-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-card-content {
    flex: 1;
    min-width: 0;
}

.info-card-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-card-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2px 0;
}

.info-card-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.camera-container-large {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    max-height: 500px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
}

.camera-container-large video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.camera-container-large .camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.face-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    aspect-ratio: 3/4;
    border: 3px dashed rgba(255,255,255,0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.face-guide.disabled {
    opacity: 0.3;
}

.auto-status {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
}

.progress-indicators {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: center;
    gap: 12px;
    background: rgba(0,0,0,0.7);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
    font-size: 12px;
}

.progress-item.verified {
    color: #10b981;
}

.progress-icon {
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-input);
    color: var(--text-secondary);
}

.status-badge.status-scanning {
    background: #fef3c7;
    color: #92400e;
    animation: pulse 1.5s infinite;
}

.status-badge.status-progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-error {
    background: #fee2e2;
    color: #991b1b;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.scan-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.scan-info-item {
    background: var(--bg-input);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.scan-info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.scan-info-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.time-card.done {
    opacity: 0.5;
    background: var(--success-bg);
    border-color: var(--success);
}

.time-card-done-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--success);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.auto-submit-indicator {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-top: 20px;
    border: 2px solid var(--primary-color);
}

.auto-submit-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-input);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.manual-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-pulse {
    animation: btnPulse 1.5s infinite;
}

@keyframes btnPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

.user-marker {
    background: transparent !important;
    border: none !important;
}

/* =============================================
   LIGHT MODE CONTRAST FIXES
   Memastikan semua teks terlihat jelas di light mode
   ============================================= */

/* Body text - pastikan gelap */
body {
    color: #0f172a !important;
}

/* Pastikan teks di card body terlihat (v48: th/td berkelas & elemen berkelas
   dikecualikan — ia punya styling warnanya sendiri; spesifisitas raksasa dari
   rantai :not() ini tak boleh menimpa rule komponen halaman di mode manapun)
   v54: :not([style*="color"]) — elemen dgn warna inline eksplisit (status ✓/❌,
   penanda posisi terakhir GPS) TIDAK dipaksa — warnanya memang disengaja */
.card-body,
.card-body *:not(.btn):not(.badge):not(button):not(input):not(select):not(textarea):not(a):not(.toast-message):not(code):not(strong):not(th):not([class]):not([style*="color"]) {
    color: #0f172a;
}

/* Text muted - lebih gelap agar terbaca */
.text-muted {
    color: #475569 !important;
}

/* Card title - kontras tinggi */
.card-title {
    color: #0f172a !important;
}

/* Page title - kontras tinggi */
.page-title {
    color: #0f172a !important;
}

/* Stat values - pastikan gelap */
.stat-value,
.stat-summary-value,
.profile-name,
.info-card-value {
    color: #0f172a !important;
}

/* Stat labels - lebih gelap */
.stat-label,
.stat-summary-label,
.info-card-label,
.scan-info-label {
    color: #475569 !important;
}

/* Sidebar nav items - pastikan terbaca */
.nav-item {
    color: #475569 !important;
}

.nav-item:hover {
    color: #4f46e5 !important;
    background: #eef2ff !important;
}

.nav-item.active {
    color: #4f46e5 !important;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(14, 165, 233, 0.1)) !important;
}

.nav-section-title {
    color: #64748b !important;
}

/* User info di sidebar */
.user-name {
    color: #0f172a !important;
}

.user-role {
    color: #64748b !important;
}

/* Topbar */
.server-time {
    color: #475569 !important;
}

/* Filter bar - pastikan teks terbaca */
.filter-bar label,
.filter-group label {
    color: #475569 !important;
}

/* Pagination */
.pagination-info,
.page-info {
    color: #475569 !important;
}

/* Data table */
.data-table td {
    color: #0f172a !important;
}

.data-table th {
    color: #475569 !important;
    background: #f1f5f9 !important;
}

.data-table th.sortable:hover {
    color: #4f46e5 !important;
}

/* Empty state text */
.empty-state,
.empty-state p {
    color: #64748b !important;
}

/* Info banner */
.info-banner {
    color: #475569 !important;
}

.info-banner strong {
    color: #0f172a !important;
}

/* Form labels */
.form-group label {
    color: #0f172a !important;
}

.form-group small {
    color: #64748b !important;
}

/* Profile info */
.info-label {
    color: #475569 !important;
}

.info-value {
    color: #0f172a !important;
}

/* Welcome card - text putih di gradient (OK) */
.welcome-card,
.welcome-card * {
    color: white !important;
}

/* Login page */
.login-title {
    color: #0f172a !important;
}

.login-subtitle {
    color: #475569 !important;
}

.login-footer,
.copyright,
.server-info {
    color: #64748b !important;
}

/* Alert - pastikan teks terbaca */
.alert {
    color: #0f172a;
}

.alert-success { color: #065f46 !important; }
.alert-error, .alert-danger { color: #991b1b !important; }
.alert-warning { color: #92400e !important; }
.alert-info { color: #1e40af !important; }

/* Toast - pastikan teks terbaca */
.toast {
    color: #0f172a;
}

.toast-message {
    color: #0f172a !important;
}

/* Modal */
.modal-header h3 {
    color: #0f172a !important;
}

/* Activity items */
.activity-name {
    color: #0f172a !important;
}

.activity-desc {
    color: #475569 !important;
}

/* Time slot cards */
.time-card-name {
    color: #0f172a !important;
}

.time-card-time {
    color: #475569 !important;
}

.selected-time-info {
    color: #475569 !important;
}

.selected-time-info strong {
    color: #4f46e5 !important;
}

/* Bulk operations */
.bulk-user-info strong {
    color: #0f172a !important;
}

.bulk-user-info small {
    color: #64748b !important;
}

/* Map help text */
.map-help,
.map-coords {
    color: #475569 !important;
}

/* Code blocks */
code {
    color: #4f46e5 !important;
    background: #f3f4f6;
}

/* Heading umum */
h1, h2, h3, h4, h5, h6 {
    color: #0f172a;
}

/* Link */
a {
    color: #4f46e5;
}

a:hover {
    color: #4338ca;
}

/* Input placeholder - lebih kontras */
input::placeholder,
textarea::placeholder {
    color: #94a3b8 !important;
}

/* Profile stats */
.profile-stat .stat-value {
    color: #4f46e5 !important;
}

.profile-stat .stat-label {
    color: #475569 !important;
}

/* =============================================
   DARK MODE OVERRIDES — final, paling akhir supaya menang specificity
   Override SEMUA rule !important di atas untuk dark mode.
   ============================================= */

[data-theme="dark"] body { color: #f1f5f9 !important; background: #0f172a !important; }
[data-theme="dark"] .card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .preview-card,
[data-theme="dark"] .toast {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .card-body,
/* v48: :not([class]) — elemen berkelas (badge, chip, td berwarna) TIDAK dipaksa;
   ia mewarisi warna terang .card-body secara default & bisa di-styling komponen.
   :not(th) — header tabel berlatar warna atur warnanya sendiri.
   v54: :not([style*="color"]) — elemen dgn warna inline (❌ gagal GPS merah,
   ✓ dalam area hijau, ⚠ posisi terakhir amber) tidak dipaksa putih —
   warna inline adalah semantic status dari JS, bukan sisa warna light-mode. */
[data-theme="dark"] .card-body *:not(.btn):not(.badge):not(button):not(input):not(select):not(textarea):not(a):not(.toast-message):not(code):not(strong):not([class]):not(th):not([style*="color"]) {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .card-title,
[data-theme="dark"] .page-title,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .stat-summary-value,
[data-theme="dark"] .profile-name,
[data-theme="dark"] .info-card-value,
[data-theme="dark"] .info-value,
[data-theme="dark"] .activity-name,
[data-theme="dark"] .time-card-name,
[data-theme="dark"] .bulk-user-info strong,
[data-theme="dark"] .modal-header h3,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .stat-label,
[data-theme="dark"] .stat-summary-label,
[data-theme="dark"] .info-card-label,
[data-theme="dark"] .scan-info-label,
[data-theme="dark"] .nav-section-title,
[data-theme="dark"] .user-role,
[data-theme="dark"] .server-time,
[data-theme="dark"] .filter-bar label,
[data-theme="dark"] .filter-group label,
[data-theme="dark"] .pagination-info,
[data-theme="dark"] .page-info,
[data-theme="dark"] .data-table th,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .empty-state p,
[data-theme="dark"] .info-banner,
[data-theme="dark"] .form-group small,
[data-theme="dark"] .info-label,
[data-theme="dark"] .activity-desc,
[data-theme="dark"] .time-card-time,
[data-theme="dark"] .selected-time-info,
[data-theme="dark"] .bulk-user-info small,
[data-theme="dark"] .map-help,
[data-theme="dark"] .map-coords,
[data-theme="dark"] .profile-stat .stat-label {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .nav-item {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .nav-item:hover {
    color: #a5b4fc !important;
    background: rgba(79, 70, 229, 0.2) !important;
}

[data-theme="dark"] .nav-item.active {
    color: #a5b4fc !important;
    background: rgba(79, 70, 229, 0.3) !important;
}

[data-theme="dark"] .user-name {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] .topbar {
    background: #1e293b !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .data-table td {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .data-table th {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .data-table th.sortable:hover {
    color: #a5b4fc !important;
}

[data-theme="dark"] .filter-bar {
    background: rgba(30, 41, 59, 0.5) !important;
}

[data-theme="dark"] .form-group label {
    color: #f1f5f9 !important;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
    color-scheme: dark;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #94a3b8 !important;
}

[data-theme="dark"] select option {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .alert {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .alert-success { color: #6ee7b7 !important; background: rgba(16, 185, 129, 0.15) !important; }
[data-theme="dark"] .alert-error,
[data-theme="dark"] .alert-danger { color: #fca5a5 !important; background: rgba(239, 68, 68, 0.15) !important; }
[data-theme="dark"] .alert-warning { color: #fcd34d !important; background: rgba(245, 158, 11, 0.15) !important; }
[data-theme="dark"] .alert-info { color: #93c5fd !important; background: rgba(59, 130, 246, 0.15) !important; }

[data-theme="dark"] .toast-message {
    color: #f1f5f9 !important;
}

[data-theme="dark"] code {
    color: #a5b4fc !important;
    background: #334155 !important;
}

[data-theme="dark"] a:not(.btn):not(.nav-item):not(.pgn-btn) {
    color: #a5b4fc !important;
}

[data-theme="dark"] a:not(.btn):not(.nav-item):not(.pgn-btn):hover {
    color: #818cf8 !important;
}

[data-theme="dark"] .profile-stat .stat-value {
    color: #a5b4fc !important;
}

[data-theme="dark"] .selected-time-info strong {
    color: #a5b4fc !important;
}

[data-theme="dark"] .info-banner strong {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .badge-success { background: rgba(16, 185, 129, 0.2) !important; color: #6ee7b7 !important; }
[data-theme="dark"] .badge-warning { background: rgba(245, 158, 11, 0.2) !important; color: #fbbf24 !important; }
[data-theme="dark"] .badge-danger { background: rgba(239, 68, 68, 0.2) !important; color: #fca5a5 !important; }
[data-theme="dark"] .badge-info { background: rgba(59, 130, 246, 0.2) !important; color: #93c5fd !important; }
[data-theme="dark"] .badge-admin { background: rgba(139, 92, 246, 0.2) !important; color: #c4b5fd !important; }
[data-theme="dark"] .badge-ketua { background: rgba(245, 158, 11, 0.2) !important; color: #fbbf24 !important; }
[data-theme="dark"] .badge-user { background: rgba(59, 130, 246, 0.2) !important; color: #93c5fd !important; }
[data-theme="dark"] .badge-late { background: rgba(245, 158, 11, 0.2) !important; color: #fbbf24 !important; }

/* Stat icon backgrounds — dark mode */
[data-theme="dark"] .stat-icon-blue { background: rgba(59, 130, 246, 0.2) !important; }
[data-theme="dark"] .stat-icon-green { background: rgba(16, 185, 129, 0.2) !important; }
[data-theme="dark"] .stat-icon-red { background: rgba(239, 68, 68, 0.2) !important; }
[data-theme="dark"] .stat-icon-orange { background: rgba(245, 158, 11, 0.2) !important; }
[data-theme="dark"] .stat-icon-purple { background: rgba(139, 92, 246, 0.2) !important; }
[data-theme="dark"] .info-card-icon { background: #334155 !important; }

/* Welcome card - tetap gradient gelap di dark mode */
[data-theme="dark"] .welcome-card {
    background: linear-gradient(135deg, #4f46e5, #0ea5e9) !important;
    color: white !important;
}
[data-theme="dark"] .welcome-card * { color: white !important; }

/* Login page */
[data-theme="dark"] .login-title { color: #f1f5f9 !important; }
[data-theme="dark"] .login-subtitle { color: #cbd5e1 !important; }
[data-theme="dark"] .login-footer,
[data-theme="dark"] .copyright,
[data-theme="dark"] .server-info { color: #94a3b8 !important; }
[data-theme="dark"] .login-body {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.3), rgba(14, 165, 233, 0.3)), #0f172a !important;
}
/* v48b: tombol Masuk — ujung gradient #0ea5e9 -> #0284c7 (teks putih 2.8 -> 3.9:1)
   + background-color cadangan di bawah gradient */
[data-theme="light"] .btn-login {
    background: linear-gradient(135deg, #4f46e5, #0284c7) !important;
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/* Bulk action bar */
[data-theme="dark"] .bulk-action-bar {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(14, 165, 233, 0.2)) !important;
    border-color: #6366f1 !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] .bulk-action-bar #bulkSelectedCount {
    color: #a5b4fc !important;
}

/* Filter active indicator */
[data-theme="dark"] .filter-active-indicator {
    background: rgba(79, 70, 229, 0.2) !important;
    border-left-color: #6366f1 !important;
    color: #f1f5f9 !important;
}

/* Modal backdrop lebih gelap di dark mode */
[data-theme="dark"] .modal {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* Modal footer & header border */
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #334155 !important;
    background: #1e293b !important;
}

/* Nav dropdown menu (sidebar collapsible) */
[data-theme="dark"] .nav-dropdown-menu {
    border-left-color: #475569 !important;
}
[data-theme="dark"] .nav-dropdown-menu .nav-item::before {
    color: #94a3b8 !important;
}
[data-theme="dark"] .nav-chevron {
    color: #94a3b8 !important;
}

/* Stat card hover effect */
[data-theme="dark"] .stat-card:hover {
    background: #243447 !important;
}

/* Pagination buttons */
[data-theme="dark"] .btn-page {
    background: #334155 !important;
    color: #cbd5e1 !important;
    border-color: #475569 !important;
}
[data-theme="dark"] .btn-page:hover:not(:disabled) {
    background: #475569 !important;
}
[data-theme="dark"] .btn-page:disabled {
    opacity: 0.4 !important;
}

/* Toast container background */
[data-theme="dark"] .toast {
    background: #1e293b !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid #334155 !important;
}

/* Empty state icon — masih emoji, OK */

/* Camera container — tetap gelap */
.camera-container, .camera-container-large { background: #000 !important; }

/* Code di alert / info-banner */
[data-theme="dark"] .info-banner code,
[data-theme="dark"] .alert code {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fcd34d !important;
}

/* Thumb photo border */
[data-theme="dark"] .thumb-photo {
    border-color: #475569 !important;
}

/* Match score bar */
[data-theme="dark"] .match-bar {
    background: #334155 !important;
}

/* Sidebar user card */
[data-theme="dark"] .user-card {
    background: rgba(30, 41, 59, 0.5) !important;
    border-color: #334155 !important;
}

/* Btn logout */
[data-theme="dark"] .btn-logout {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

/* Form control focus */
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* Table responsive scrollbar */
[data-theme="dark"] .table-responsive::-webkit-scrollbar-thumb {
    background: #475569 !important;
}
[data-theme="dark"] .table-responsive::-webkit-scrollbar-track {
    background: #1e293b !important;
}

/* Diagnostic panel — tetap dark theme (terminal style) */
#diagPanel {
    background: #1e1e1e !important;
    color: #0f0 !important;
}


