/* Custom CSS for Salary Verification Web Application */

/* CSS Reset & Variable Definitions */
:root {
    /* Fonts */
    --font-primary: 'Prompt', 'Sarabun', sans-serif;

    /* Dark Theme Default Values */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-sidebar: #0b1329;
    --card-bg: rgba(30, 41, 59, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --hover-bg: #334155;
    
    /* Semantic Colors */
    --primary: #6366f1;
    --primary-light: rgba(99, 102, 241, 0.15);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --info: #06b6d4;
    --info-light: rgba(6, 182, 212, 0.15);
    --purple: #a855f7;
    --purple-light: rgba(168, 85, 247, 0.15);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --transition-speed: 0.3s;
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-sidebar: #0f172a; /* Keep sidebar dark for premium contrast */
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --hover-bg: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.04), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

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

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: #ffffff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--primary);
}

.sidebar-logo h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: left;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: #ffffff;
    background-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Main Content Styling */
.main-content {
    margin-left: 260px;
    flex-grow: 1;
    padding: 30px;
    min-height: 100vh;
}

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

.topbar h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.subtitle {
    margin-top: 4px;
}

.employee-meta-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--primary);
    animation: pulse 2s infinite;
}

/* Tab Content Visibility */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

/* Cards & Layout Grids */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 24px;
}

/* Border Left Colors for Status Cards */
.border-left-primary { border-left: 5px solid var(--primary); }
.border-left-success { border-left: 5px solid var(--success); }
.border-left-warning { border-left: 5px solid var(--warning); }
.border-left-danger { border-left: 5px solid var(--danger); }

/* Utility Classes */
.flex-row { display: flex; gap: 12px; }
.flex-column { display: flex; flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-fill { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.pb-2 { padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 24px; padding-bottom: 24px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.ml-3 { margin-left: 12px; }
.mr-2 { margin-right: 8px; }
.d-block { display: block; }
.d-none { display: none; }
.border { border: 1px solid var(--border-color); }
.rounded { border-radius: 8px; }
.p-2 { padding: 8px; }
.w-full { width: 100%; }

.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-weight-bold { font-weight: 600; }
.text-uppercase { text-transform: uppercase; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-purple { color: var(--purple); }

.bg-primary-light { background-color: var(--primary-light); }
.bg-success-light { background-color: var(--success-light); }
.bg-warning-light { background-color: var(--warning-light); }
.bg-danger-light { background-color: var(--danger-light); }
.bg-info-light { background-color: var(--info-light); }
.bg-purple-light { background-color: var(--purple-light); }
.bg-dark-2 { background-color: rgba(15, 23, 42, 0.4); }

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* Grid helper layout */
.row {
    display: flex;
    margin-right: -10px;
    margin-left: -10px;
}

.col-8 {
    width: 66.66667%;
    padding-right: 10px;
    padding-left: 10px;
}

.col-4 {
    width: 33.33333%;
    padding-right: 10px;
    padding-left: 10px;
}

.col-6 {
    width: 50%;
    padding-right: 10px;
    padding-left: 10px;
}

/* Switch Toggle Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--primary);
}

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

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.form-control[readonly] {
    background-color: rgba(15, 23, 42, 0.2);
    cursor: not-allowed;
}

.form-control-sm {
    padding: 6px 10px;
    font-size: 0.85rem;
}

.card-checkbox {
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
    background-color: var(--bg-primary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

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

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

.btn-outline-primary:hover, .btn-outline-primary.active {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-outline-success {
    background-color: transparent;
    border: 1px solid var(--success);
    color: var(--success);
}

.btn-outline-success:hover {
    background-color: var(--success);
    color: #ffffff;
}

.btn-outline-danger {
    background-color: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background-color: var(--danger);
    color: #ffffff;
}

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

.btn-success:hover {
    background-color: #059669;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Tabs & Custom Boxes */
.tabs-buttons {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    background-color: var(--bg-primary);
}

.tabs-buttons .btn {
    border: none;
    border-radius: 6px;
    padding: 8px;
}

.shift-settings-box {
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid transparent;
}

.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-primary {
    background-color: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
    color: var(--text-main);
    border-left: 4px solid var(--primary);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.15);
    color: var(--text-main);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.15);
    color: var(--text-main);
    border-left: 4px solid var(--info);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
    color: var(--text-main);
    border-left: 4px solid var(--danger);
}

/* Insight Lists */
.insight-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.insight-list li {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.insight-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.insight-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.insight-value {
    font-size: 1rem;
    font-weight: 500;
}

.highlight-success-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px dashed var(--success);
    border-radius: 12px;
    padding: 12px !important;
    border-bottom: none !important;
}

/* Table Styling */
.table-responsive {
    width: 100%;
    margin-bottom: 1rem;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-main);
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 16px;
    vertical-align: middle;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.05);
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1;
}

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

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Badges for status */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: capitalize;
}

/* Status Legend */
.status-legend {
    gap: 16px;
}

.legend-item {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-zone:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.upload-zone h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.file-name-display {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

/* Payslip Wrapper OCR view */
.payslip-data-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Loading overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.85);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.loader {
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loader-text {
    font-weight: 500;
    font-size: 1.1rem;
    color: #ffffff;
}

/* Keyframes */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

/* Responsive Overrides */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 16px;
    }
    .sidebar-logo {
        margin-bottom: 16px;
    }
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .row {
        flex-direction: column;
    }
    .col-8, .col-4, .col-6 {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
}

/* History Panel Styles */
.history-list {
    display: flex;
    flex-direction: column;
}

.history-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

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

.history-item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.history-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.history-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.history-item-salary {
    font-weight: 700;
    font-size: 0.9rem;
    text-align: right;
    margin-right: 12px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* Modal Overlay and Modal Card Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.75);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-card {
    width: 90%;
    max-width: 500px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-body {
    margin-top: 16px;
}

.modal-footer {
    display: flex;
    gap: 12px;
}

.justify-end {
    justify-content: flex-end;
}

@keyframes zoomIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Auth Gate and Password Change Modals CSS */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-primary);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.4s ease-out;
}

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

.auth-header h2 {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* User Session Badge Styles */
.user-session-badge {
    background-color: var(--hover-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 4px 12px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.8rem;
}

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

@media (max-width: 768px) {
    /* Mobile General Layout & Navigation */
    .sidebar {
        padding: 10px 14px !important;
        background-color: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    .sidebar-logo {
        margin-bottom: 4px !important;
        justify-content: space-between;
        width: 100%;
    }
    .sidebar-logo h2 {
        font-size: 1rem !important;
    }
    .logo-icon {
        font-size: 1.4rem !important;
    }
    .sidebar-nav {
        flex-direction: row !important;
        gap: 4px !important;
        overflow-x: auto !important;
        width: 100%;
        padding-bottom: 4px !important;
        scrollbar-width: none;
    }
    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }
    .nav-item {
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
        white-space: nowrap;
        gap: 6px !important;
    }
    .sidebar-footer {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 12px !important;
        margin-top: 0 !important;
        border-top: 1px solid var(--border-color);
        padding-top: 8px !important;
    }
    #load-demo-btn {
        width: auto !important;
        padding: 4px 10px !important;
        font-size: 0.75rem !important;
        margin-bottom: 0 !important;
    }
    .theme-toggle {
        font-size: 0.75rem !important;
        gap: 6px !important;
    }

    /* Topbar adjustments */
    .topbar {
        padding: 10px 14px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    .topbar-title h1 {
        font-size: 1.15rem !important;
    }
    .topbar-title .subtitle {
        font-size: 0.7rem !important;
        margin-top: 2px !important;
    }
    .topbar .flex-row {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px !important;
    }
    .employee-meta-badge, .user-session-badge {
        font-size: 0.75rem !important;
        padding: 4px 8px !important;
    }

    /* Content & Cards */
    .main-content {
        padding: 10px !important;
    }
    .card {
        border-radius: 12px !important;
        margin-bottom: 16px !important;
    }
    .card-header {
        padding: 10px 14px !important;
    }
    .card-header h3 {
        font-size: 0.95rem !important;
    }
    .card-body {
        padding: 10px 14px !important;
    }

    /* Config Panel & Form Adjustments */
    .form-group {
        margin-bottom: 12px !important;
    }
    .form-group label {
        font-size: 0.8rem !important;
    }
    .form-control {
        font-size: 0.8rem !important;
        padding: 6px 8px !important;
        height: auto !important;
    }

    /* Attendance Table Responsiveness */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #attendance-table {
        width: 100%;
        min-width: 900px !important;
    }
    #attendance-table th, #attendance-table td {
        font-size: 0.75rem !important;
        padding: 6px 4px !important;
    }
    #attendance-table select.form-control, 
    #attendance-table input.form-control {
        font-size: 0.75rem !important;
        padding: 2px 4px !important;
        height: 30px !important;
        line-height: 1 !important;
    }
}
