/**
 * Main Stylesheet - DigiTech Service Center
 * Core Colors: White (#ffffff) primary bg, Orange (#ff6b35) accent, Semi-Black (#1e1e2e) text
 * Red (#ef4444) delete/urgent only, Green (#22c55e) success indicators only
 */

/* ===============================================
   CSS VARIABLES
   =============================================== */
:root {
    --primary: #ff6b35;
    --primary-dark: #e55a28;
    --primary-light: rgba(255, 107, 53, 0.08);
    --primary-lighter: rgba(255, 107, 53, 0.04);
    --dark: #1e1e2e;
    --dark-soft: #2d2d3f;
    --white: #ffffff;
    --light: #f7f8fa;
    --border: #e8eaed;
    --border-light: #f0f1f3;
    --text: #1e1e2e;
    --text-secondary: #4a4a5a;
    --text-muted: #7c7c8a;
    --text-light: #a0a0ae;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --danger-light: rgba(239, 68, 68, 0.06);
    --success: #22c55e;
    --success-light: rgba(34, 197, 94, 0.08);
    --warning-bg: #fef9ee;
    --warning-text: #92400e;
    --sidebar-width: 250px;
    --sidebar-collapsed: 68px;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.10);
    --radius: 10px;
    --radius-lg: 14px;
}

/* Dark theme variables applied when body has class 'dark' */
body.dark {
    --primary: #ff8a65;
    --primary-dark: #ff7043;
    --primary-light: rgba(255, 138, 101, 0.08);
    --primary-lighter: rgba(255, 138, 101, 0.04);
    --dark: #dbe6f3;
    --dark-soft: #c7d6e8;
    --white: #1f2937; /* semi-black grey for surfaces */
    --light: #0f1724; /* page background (semi-black) */
    --border: #334155; /* softer border in dark mode */
    --border-light: #111827;
    --text: #e6eef8;
    --text-secondary: #c6d2e6;
    --text-muted: #9aa8bf;
    --text-light: #7f8fa3;
    --danger-light: rgba(239,68,68,0.08);
}

/* Generic toggle-switch control used across settings and homepage */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e0; transition: 0.25s; border-radius: 26px;
}
.toggle-slider:before {
    position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px;
    background-color: white; transition: 0.25s; border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider { background-color: var(--primary); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(24px); }


/* ===============================================
   RESET & BASE
   =============================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Auth pages: force pure white background and remove layout wrappers' backgrounds */
body.auth-page {
    background: var(--white) !important;
}
body.auth-page .login-content,
body.auth-page .main-content,
body.auth-page .content-wrapper {
    background: transparent !important;
}
body.sidebar-collapsed .sidebar-nav a { padding: 9px; margin: 1px 8px; justify-content: center; }
.sidebar-nav a:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-nav a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sidebar-nav a.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 55%; background: var(--primary); border-radius: 0 3px 3px 0;
}
body.sidebar-collapsed .sidebar-nav a.active::before { display: none; }

.sidebar-nav a i { width: 20px; min-width: 20px; text-align: center; font-size: 14px; flex-shrink: 0; }
.sidebar-nav a span {
    white-space: nowrap; overflow: hidden; opacity: 1; max-width: 180px;
    transition: opacity 0.2s, max-width 0.3s;
}
body.sidebar-collapsed .sidebar-nav a span { opacity: 0; max-width: 0; }

/* Sidebar Footer */
.sidebar-footer { padding: 10px 8px; border-top: 1px solid var(--border); flex-shrink: 0; }
.logout-btn {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 16px; color: var(--danger);
    text-decoration: none; border-radius: 8px;
    transition: all 0.2s; font-size: 13px; font-weight: 500;
}
body.sidebar-collapsed .logout-btn { padding: 9px; justify-content: center; }
.logout-btn:hover { background: var(--danger-light); color: var(--danger-dark); }
.logout-btn i { width: 20px; min-width: 20px; text-align: center; font-size: 14px; flex-shrink: 0; }
.logout-btn span {
    white-space: nowrap; overflow: hidden; opacity: 1; max-width: 180px;
    transition: opacity 0.2s, max-width 0.3s;
}
body.sidebar-collapsed .logout-btn span { opacity: 0; max-width: 0; }

/* ===============================================
   TOPBAR
   =============================================== */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; height: 70px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Floating effect */
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; z-index: 999;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-logo { width: 34px; height: 34px; object-fit: contain; }
.topbar-brand-text { font-size: 16px; font-weight: 700; color: var(--primary); }
.mobile-toggle {
    display: none; width: 36px; height: 36px; background: none; border: none;
    color: var(--text); font-size: 17px; cursor: pointer; border-radius: 8px; transition: background 0.2s;
}
.mobile-toggle:hover { background: var(--light); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-date { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 12.5px; font-weight: 500; }
.topbar-date i { color: var(--primary); }

/* User Dropdown */
.user-dropdown { position: relative; }
.user-dropdown-toggle {
    display: flex; align-items: center; gap: 8px; padding: 5px 12px;
    background: var(--white); border: 1.5px solid var(--border);
    border-radius: 50px; cursor: pointer; transition: all 0.2s;
}
.user-dropdown-toggle:hover { border-color: var(--primary); }
.user-dropdown.active .user-dropdown-toggle { border-color: var(--primary); }
.user-avatar {
    width: 30px; height: 30px; background: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 14px;
}
.user-name { font-weight: 600; font-size: 12.5px; color: var(--text); }
.user-dropdown-toggle .fa-chevron-down { font-size: 10px; color: var(--text-light); transition: transform 0.2s; }
.user-dropdown.active .user-dropdown-toggle .fa-chevron-down { transform: rotate(180deg); }

.user-dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 230px;
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    border: 1px solid var(--border); opacity: 0; visibility: hidden;
    transform: translateY(-8px); transition: all 0.2s; z-index: 1000;
}
.user-dropdown.active .user-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-header {
    padding: 14px 16px; background: var(--light); border-radius: var(--radius) var(--radius) 0 0;
    display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border);
}
.dropdown-avatar {
    width: 38px; height: 38px; background: var(--primary-light); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--primary);
}
.dropdown-user-info strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 1px; }
.dropdown-user-info small { display: block; color: var(--text-muted); font-size: 11.5px; }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 16px;
    color: var(--text-secondary); text-decoration: none; transition: background 0.15s; font-size: 13px;
}
.dropdown-item:hover { background: var(--light); }
.dropdown-item i { width: 16px; text-align: center; font-size: 13px; color: var(--text-muted); }
.dropdown-item.text-danger { color: var(--danger); }
.dropdown-item.text-danger i { color: var(--danger); }
.dropdown-item.text-danger:hover { background: var(--danger-light); }

/* Notification Dropdown */
.notification-dropdown { position: relative; }
.notification-toggle {
    width: 36px; height: 36px; background: var(--primary-light); border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--primary); font-size: 15px;
    transition: background 0.2s; position: relative;
}
.notification-toggle:hover { background: rgba(255,107,53,0.15); }
.notification-badge {
    position: absolute; top: -2px; right: -2px; background: var(--danger); color: var(--white);
    font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--white);
}
.notification-menu {
    position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-height: 460px;
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    border: 1px solid var(--border); opacity: 0; visibility: hidden;
    transform: translateY(-8px); transition: all 0.2s; z-index: 1000; overflow: hidden;
}
.notification-dropdown.active .notification-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.notification-header {
    padding: 12px 16px; background: var(--white); border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.notification-header strong { font-size: 14px; color: var(--text); }
.mark-all-read {
    background: var(--primary-light); border: none; color: var(--primary);
    padding: 4px 10px; border-radius: 6px; font-size: 11px; cursor: pointer;
    transition: background 0.2s; font-weight: 600;
}
.mark-all-read:hover { background: rgba(255,107,53,0.15); }
.notification-list { max-height: 380px; overflow-y: auto; }
.notification-item {
    padding: 12px 16px; border-bottom: 1px solid var(--border-light);
    cursor: pointer; transition: background 0.15s; display: flex; gap: 10px;
}
.notification-item:hover { background: var(--light); }
.notification-item.unread { background: var(--primary-lighter); }
.notification-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px;
}
.notification-icon.password-request { background: var(--primary-light); color: var(--primary); }
.notification-icon.service-update { background: var(--primary-light); color: var(--primary); }
.notification-icon.booking-new { background: var(--primary-light); color: var(--primary); }
.notification-content { flex: 1; }
.notification-content strong { display: block; color: var(--text); font-size: 12.5px; margin-bottom: 2px; }
.notification-content p { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.notification-time { font-size: 11px; color: var(--text-light); margin-top: 3px; }
.notification-empty { padding: 40px 20px; text-align: center; color: var(--text-light); }
.notification-empty i { font-size: 36px; margin-bottom: 10px; opacity: 0.3; }
.notification-empty p { margin: 0; font-size: 12.5px; }
.notification-actions { display: flex; gap: 6px; margin-top: 8px; }
.notification-actions button {
    padding: 4px 10px; border: none; border-radius: 6px; font-size: 11px;
    cursor: pointer; transition: opacity 0.2s; font-weight: 600;
}
.notification-actions .btn-approve { background: var(--primary); color: var(--white); }
.notification-actions .btn-reject { background: var(--danger); color: var(--white); }
.notification-actions .btn-view { background: var(--text-muted); color: var(--white); }

/* ===============================================
   MAIN LAYOUT
   =============================================== */
.main-layout { display: flex; min-height: 100vh; }
.main-content {
    flex: 1; width: 100%; margin-left: 0;
    background: var(--light); min-height: 100vh;
    padding-top: 80px; /* Space for fixed header */
}
.content-wrapper {
    padding: 22px;
    max-width: 1400px; /* Limit width for better readability */
    margin: 0 auto; /* Center the content */
    width: 100%;
}

.page-header {
    background: var(--white); padding: 20px 24px; border-radius: var(--radius);
    margin-bottom: 22px; box-shadow: var(--shadow-sm); /* Increased shadow */
    display: flex; justify-content: space-between; align-items: center;
    border-left: 4px solid var(--primary);
}
.page-header h1 {
    font-size: 20px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 10px; margin: 0;
}
.page-header h1 i { color: var(--primary); font-size: 18px; }
.page-header p { color: var(--text-muted); font-size: 12.5px; margin: 4px 0 0 30px; }

/* ===============================================
   CARDS
   =============================================== */
.card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-xs); margin-bottom: 18px; overflow: hidden;
    border: 1px solid var(--border-light);
}
.card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-header h3 {
    font-size: 15px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px; margin: 0;
}
.card-header h3 i { color: var(--primary); }
.card-body { padding: 20px; }

/* Stats Grid */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px; margin-bottom: 22px;
}
.stat-card {
    background: var(--white); padding: 18px; border-radius: var(--radius);
    box-shadow: var(--shadow-xs); text-align: center; position: relative;
    overflow: hidden; border: 1px solid var(--border-light);
    border-top: 3px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.stat-icon.primary { color: var(--primary); }
.stat-icon.success { color: var(--primary); }
.stat-icon.warning { color: var(--primary-dark); }
.stat-icon.danger { color: var(--danger); }
.stat-card h3, .stat-card h4 {
    font-size: 11px; color: var(--text-muted); margin: 0 0 5px 0;
    text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600;
}
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-card .stat-label { font-size: 11.5px; color: var(--text-light); margin-top: 4px; }

/* ===============================================
   BUTTONS
   =============================================== */
.btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.2s; text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.10); }
.btn:active { transform: translateY(0); }
.btn i { font-size: 13px; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(255,107,53,0.30); }
.btn-success { background: var(--primary); color: var(--white); }
.btn-warning { background: var(--primary-dark); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: var(--danger-dark); box-shadow: 0 4px 12px rgba(239,68,68,0.25); }
.btn-info { background: var(--text-secondary); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--light); border-color: var(--text-light); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 11px 24px; font-size: 14.5px; }
.btn-block { width: 100%; justify-content: center; }

/* ===============================================
   FORMS
   =============================================== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; color: var(--text); font-size: 13px; }
.form-group label i { margin-right: 4px; color: var(--primary); }
.form-control, .form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 9px 13px; border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 13.5px; transition: all 0.2s; font-family: inherit; background: var(--white); color: var(--text);
}
.form-control:focus, .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(255,107,53,0.06);
}
.form-group input:disabled, .form-group select:disabled, .form-group textarea:disabled {
    background: var(--light); cursor: not-allowed; opacity: 0.6;
}
.form-group textarea { resize: vertical; min-height: 70px; }
.form-group small { display: block; margin-top: 4px; font-size: 11px; color: var(--text-muted); }

/* ===============================================
   TABLES — LIGHT HEADER
   =============================================== */
.table-container { overflow-x: auto; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: var(--white); }
table thead { background: var(--light); }
table thead th {
    padding: 11px 14px; text-align: left; font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}
table tbody tr { border-bottom: 1px solid var(--border-light); transition: background 0.15s; }
table tbody tr:hover { background: var(--primary-lighter); }
table tbody td { padding: 11px 14px; font-size: 13px; }
table tbody td strong { color: var(--text); font-weight: 600; }
table tbody td small { display: block; color: var(--text-muted); font-size: 11px; margin-top: 2px; }

/* ===============================================
   BADGES & STATUS
   =============================================== */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-pending    { background: #fef3c7; color: #92400e; }
.badge-in_progress { background: #fff3e0; color: #e65100; }
.badge-completed  { background: #e8f5e9; color: #2e7d32; }
.badge-sudah_diambil { background: #e3f2fd; color: #1565c0; }
.badge-cancelled  { background: #ffebee; color: #c62828; }
.badge-success    { background: #e8f5e9; color: #2e7d32; }
.badge-warning    { background: #fef3c7; color: #92400e; }
.badge-danger     { background: #ffebee; color: #c62828; }
.badge-info       { background: #e3f2fd; color: #1565c0; }

/* ===============================================
   ALERTS
   =============================================== */
.alert { padding: 11px 16px; border-radius: 8px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.alert i { font-size: 16px; }
.alert-success { background: #f0fdf4; color: #166534; border-left: 3px solid #22c55e; }
.alert-error { background: #fef2f2; color: #991b1b; border-left: 3px solid var(--danger); }
.alert-warning { background: #fefce8; color: #854d0e; border-left: 3px solid #f59e0b; }
.alert-info { background: #eff6ff; color: #1e40af; border-left: 3px solid #3b82f6; }

/* ===============================================
   MODALS — WHITE HEADER
   =============================================== */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
}
.modal.active { display: flex; align-items: center; justify-content: center; animation: fadeIn 0.2s; }
.modal-content {
    background: var(--white); border-radius: var(--radius-lg);
    max-width: 600px; width: 92%; max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg); animation: slideUp 0.25s;
}
.modal-header {
    padding: 18px 22px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    background: var(--white);
}
.modal-header h2 {
    font-size: 17px; color: var(--text); display: flex; align-items: center; gap: 8px; margin: 0;
}
.modal-header h2 i { color: var(--primary); }
.close-modal {
    background: none; border: none; font-size: 22px; color: var(--text-light);
    cursor: pointer; transition: color 0.2s; line-height: 1;
}
.close-modal:hover { color: var(--text); }
.modal-body { padding: 22px; }

/* ===============================================
   PAGINATION
   =============================================== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination button {
    min-width: 34px; height: 34px; border: 1.5px solid var(--border);
    background: var(--white); border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 12.5px; transition: all 0.2s;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ===============================================
   AUTH PAGES — LIGHT BACKGROUND
   =============================================== */
.auth-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px;
    background: linear-gradient(135deg, var(--light) 0%, #fff5f0 50%, var(--light) 100%);
}
.auth-container { width: 100%; max-width: 420px; }
.auth-box {
    background: var(--white); border-radius: var(--radius-lg); padding: 34px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h2 { font-size: 22px; color: var(--text); margin-bottom: 5px; }
.auth-header p { color: var(--text-muted); font-size: 13.5px; }
.auth-form { margin-bottom: 14px; }
.auth-footer { text-align: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.auth-footer p { color: var(--text-muted); font-size: 12.5px; }
.auth-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* Auth Divider */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px;
    background: var(--border);
}
.auth-divider span {
    color: var(--text-muted); font-size: 12.5px;
    text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500;
}

/* Google Login */
.google-login-section {
    text-align: center; margin-bottom: 8px;
}
.google-login-section .g_id_signin {
    display: flex; justify-content: center;
}
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px 20px;
    background: #fff; color: #3c4043;
    border: 1.5px solid #dadce0; border-radius: 8px;
    font-size: 14px; font-weight: 500; font-family: 'Roboto', 'Inter', sans-serif;
    cursor: pointer; transition: all 0.2s;
    text-decoration: none; box-sizing: border-box;
}
.btn-google:hover {
    background: #f8f9fa; border-color: #c6c9cc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    color: #3c4043; text-decoration: none;
}
.btn-google:active { background: #f1f3f4; }
.btn-google.btn-google-loading { opacity: 0.7; pointer-events: none; }
.btn-google svg { flex-shrink: 0; }
.google-hint {
    font-size: 11.5px; color: var(--text-muted);
    margin: 10px 0 0 0;
}

/* ===============================================
   SEARCH & FILTERS
   =============================================== */
.search-filter-container { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 200px; position: relative; }
.search-box input {
    width: 100%; padding: 9px 13px 9px 38px; border: 1.5px solid var(--border);
    border-radius: 8px; font-size: 13px; transition: all 0.2s;
}
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,53,0.06); }
.search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-light); }
.filter-select {
    padding: 9px 13px; border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 13px; min-width: 140px; cursor: pointer; transition: all 0.2s; background: var(--white);
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* ===============================================
   UTILITIES
   =============================================== */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-dark    { color: var(--text); }
.text-small   { font-size: 12px; }
.font-bold    { font-weight: 600; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.w-100 { width: 100%; }
.hidden { display: none; }

/* ===============================================
   ANIMATIONS
   =============================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200px 100%; animation: shimmer 1.2s ease-in-out infinite; border-radius: 4px; }
.loading-spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; margin: 20px auto; }
.page-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 260px; color: var(--text-muted); font-size: 13px; gap: 10px;
}
.empty-state { text-align: center; padding: 36px 20px; color: var(--text-muted); }
.empty-state i { font-size: 44px; margin-bottom: 10px; opacity: 0.4; }
.empty-state p { font-size: 13.5px; }

.action-buttons { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.action-buttons .btn { padding: 5px 9px; font-size: 12px; }

/* ===============================================
   FINANCE PAGE
   =============================================== */
.finance-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }

/* ===============================================
   CUSTOMER PAGE
   =============================================== */
.booking-steps { display: flex; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.booking-step { flex: 1; min-width: 180px; background: var(--white); border-radius: 8px; padding: 14px; text-align: center; border: 2px solid var(--border); transition: all 0.2s; }
.booking-step.active { border-color: var(--primary); }

.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.service-card {
    background: var(--white); border: 1.5px solid var(--border); border-radius: 8px;
    padding: 14px; cursor: pointer; transition: all 0.2s;
}
.service-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.service-card.selected { border-color: var(--primary); background: var(--primary-lighter); }

.history-card { background: var(--white); border-radius: 8px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--border); }

.diagnosis-container { max-width: 800px; margin: 0 auto; }
.diagnosis-section { background: var(--white); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; border: 1px solid var(--border); }
.diagnosis-result { margin-top: 14px; padding: 14px; background: var(--light); border-radius: 8px; }

.status-timeline { position: relative; padding-left: 28px; }
.status-timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 22px; padding-left: 18px; }
.timeline-item::before {
    content: ''; position: absolute; left: -22px; top: 4px;
    width: 12px; height: 12px; border-radius: 50%; background: var(--border);
}
.timeline-item.active::before { background: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,53,0.15); }
.timeline-item.completed::before { background: var(--primary); }

/* ===============================================
   COUNTER TRANSACTION PAGE MOBILE FIXES
   =============================================== */
.counter-actions { display: flex; gap: 10px; align-items: center; }
.tabs-container { margin-bottom: 0; border-radius: 12px 12px 0 0; }
.tabs-scroll { display: flex; gap: 5px; padding: 10px 15px; border-bottom: 2px solid var(--border); overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; }

@media (max-width: 768px) {
    /* Header Actions */
    .counter-actions { gap: 6px; }
    .counter-actions .btn-text { display: none; } /* Hide button text on mobile */
    .counter-actions .btn { padding: 8px 12px; }
    .counter-actions .date-picker-icon { width: 40px; padding: 4px; text-align: center; }
    
    /* Force date input to look like icon or be small */
    input[type="date"]::-webkit-inner-spin-button,
    input[type="date"]::-webkit-calendar-picker-indicator {
        display: block; opacity: 1; margin: 0 auto; cursor: pointer;
    }
    .date-picker-icon { position: relative; width: 44px; overflow: hidden; padding: 0; }
    .date-picker-icon::-webkit-datetime-edit { display: none; }
    .date-picker-icon::-webkit-calendar-picker-indicator { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
    .date-picker-icon::after {
        content: '\f073'; font-family: 'Font Awesome 5 Free'; font-weight: 900;
        position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
        pointer-events: none; color: var(--text); font-size: 18px;
    }

    /* Stats Grid - 2x2 Layout Mobile */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        overflow: visible !important;
        padding-bottom: 0 !important;
    }
    
    .stat-card {
        padding: 10px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-width: 0 !important;
    }

    /* Reduce dropdown size on mobile */
    .user-dropdown-menu {
        width: 220px !important;
        right: 0 !important;
        left: auto !important;
        position: absolute !important;
        top: 100% !important;
        box-shadow: var(--shadow-lg);
    }

    .tabs-scroll { justify-content: space-between; padding: 8px 10px; }
    .tab-btn { flex: 1; padding: 8px 4px; font-size: 11px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
    .tab-btn i { font-size: 14px; margin: 0; }
}

/* Mobile Only Utilities */
.mobile-only { display: none !important; }
@media (max-width: 768px) {
    .mobile-only { display: flex !important; }
    .desktop-only { display: none !important; }
}

.dropdown-date {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.dropdown-date i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .content-wrapper { max-width: 100%; padding: 20px; }
}

@media (max-width: 768px) {
    .main-content { padding-top: 65px; } /* Adjust for smaller header */
    .topbar { height: 65px; padding: 0 16px; }

    /* Stack stats grid */
    .stats-grid { grid-template-columns: 1fr; gap: 12px; }

    /* Adjust page header */
    .page-header {
        flex-direction: column; align-items: flex-start; gap: 10px;
        padding: 16px; margin-bottom: 16px;
    }
    .page-header > div { width: 100%; }
    .page-header .btn { width: 100%; justify-content: center; }

    /* Hide less important elements */
    .topbar-date { display: none; }
    .topbar-brand-text { font-size: 14px; }
    .topbar-logo { width: 28px; height: 28px; }

    /* Adjust dropdowns for mobile */
    .user-dropdown-menu, .notification-menu {
        position: fixed; top: 65px; left: 0; right: 0; width: 100%;
        max-width: 100%; border-radius: 0 0 10px 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border: none; border-top: 1px solid var(--border);
    }
    .notification-menu { right: 0; left: 0; width: 100%; }

    /* Table adjustments */
    .table-responsive {
        border: 0; overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Content wrapper padding */
    .content-wrapper { padding: 14px; }

    /* Card adjustments */
    .card-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    .card-header .btn, .search-box, .filter-select { width: 100%; }

    /* Grid adjustments */
    .service-grid, .finance-summary { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .topbar { padding: 0 10px; height: 50px; } /* More compact header */
    .main-content { padding-top: 50px; }

    .user-dropdown-toggle { padding: 4px 8px; border: none; background: transparent; }
    .user-name { display: block; font-size: 13px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } 
    .user-dropdown-toggle i { display: block; font-size: 10px; margin-left: 4px; } 
    .user-avatar { width: 28px; height: 28px; }

    .stats-grid { gap: 10px; }
    .stat-card { padding: 12px; }
    .stat-value { font-size: 20px; }

    /* Adjust buttons in counter transaction */
    .action-buttons { gap: 6px; }
    .action-buttons .btn {
        padding: 6px 10px;
        font-size: 11px;
        flex: 1; /* Distribute space evenly */
        white-space: nowrap;
    }

    .page-header { padding: 12px; }
    .page-header h1 { font-size: 16px; }
    .page-header p { margin-left: 0; font-size: 11px; }

    .modal-content {
        width: 100%; margin: 0; position: fixed; bottom: 0;
        border-radius: 16px 16px 0 0; max-height: 85vh;
    }
}

@media print {
    .sidebar, .topbar, .modal, .btn, .pagination { display: none !important; }
    .main-content { margin: 0 !important; padding: 0 !important; }
}
