/* ==========================================================================
   Normalize.css & Modern CSS Reset
   ========================================================================== */

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
}

body {
    margin: 0;
}

main {
    display: block;
}

hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
}

pre {
    font-family: monospace, monospace;
    font-size: 1em;
}

a {
    background-color: transparent;
    -webkit-text-decoration-skip: objects;
}

abbr[title] {
    border-bottom: none;
    text-decoration: underline;
    text-decoration: underline dotted;
}

b, strong {
    font-weight: bolder;
}

code, kbd, samp {
    font-family: monospace, monospace;
    font-size: 1em;
}

small {
    font-size: 80%;
}

sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

audio, video {
    display: inline-block;
}

audio:not([controls]) {
    display: none;
    height: 0;
}

img {
    border-style: none;
}

svg:not(:root) {
    overflow: hidden;
}

button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button, input {
    overflow: visible;
}

button, select {
    text-transform: none;
}

button, [type="button"], [type="reset"], [type="submit"] {
    -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

fieldset {
    padding: 0.35em 0.75em 0.625em;
}

legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal;
}

progress {
    display: inline-block;
    vertical-align: baseline;
}

textarea {
    overflow: auto;
}

[type="checkbox"], [type="radio"] {
    box-sizing: border-box;
    padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

[type="search"] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

details {
    display: block;
}

summary {
    display: list-item;
}

template {
    display: none;
}

[hidden] {
    display: none;
}

:root {
    --neon-blue: #0ea5e9;
    --neon-cyan: #06b6d4;
    --neon-green: #10b981;
    --neon-purple: #8b5cf6;
    --dark-bg: #030712;
    --dark-card: #0b1329;
    --card-bg: #0b1329;
    --bg-surface: rgba(2, 6, 23, 0.3);
    --glass-bg: rgba(2, 6, 23, 0.45);
    --glass-border: rgba(56, 189, 248, 0.1);
    --glass-border-hover: rgba(56, 189, 248, 0.4);
    
    /* Text Variables - Dark Mode (Default) */
    --text-primary: #ffffff;
    --text-secondary: #f3f4f6;
    --text-medium: #9ca3af;
    --text-dim: #6b7280;
    --text-muted: #374151;
    
    /* Legacy variables for compatibility */
    --text-light: var(--text-secondary);
    
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --border-subtle: rgba(255, 255, 255, 0.06);
}

body.light-mode {
    --dark-bg: #f8fafc;
    --dark-card: #ffffff;
    --card-bg: #ffffff;
    --bg-surface: rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(56, 189, 248, 0.15);
    --glass-border-hover: rgba(56, 189, 248, 0.4);
    
    /* Text Variables - Light Mode */
    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --text-medium: #475569;
    --text-dim: #64748b;
    --text-muted: #94a3b8;

    /* Legacy variables for compatibility */
    --text-light: var(--text-primary);
    
    --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    --border-subtle: rgba(0, 0, 0, 0.05);
}

/* Theme-Aware Text Helpers */
.theme-text-primary { color: var(--text-primary); }
.theme-text-secondary { color: var(--text-secondary); }
.theme-text-medium { color: var(--text-medium); }
.theme-text-dim { color: var(--text-dim); }
.theme-text-muted { color: var(--text-muted); }


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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
    position: relative;
    -webkit-transition: background-color 0.3s ease, color 0.3s ease;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
    font-family: 'Tajawal', sans-serif;
}

/* Global Placeholder Styling */
::placeholder { color: var(--text-muted); opacity: 0.7; }
:-ms-input-placeholder { color: var(--text-muted); }
::-ms-input-placeholder { color: var(--text-muted); }

body.light-mode ::placeholder { color: var(--text-dim); opacity: 0.6; }

/* Global Input Visibility */
input, textarea, select {
    color: var(--text-primary);
}

body.light-mode input::placeholder, 
body.light-mode textarea::placeholder {
    color: var(--text-dim) !important;
}

[dir="rtl"] body {
    font-family: 'Tajawal', sans-serif;
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.6);
}

/* Animations */
@-webkit-keyframes fadeUp {
    from { opacity: 0; -webkit-transform: translateY(20px); transform: translateY(20px); }
    to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

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

.animate-fade-up {
    -webkit-animation: fadeUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation: fadeUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Utility Classes */
.phone-fix {
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: embed;
}

.title-glow-effect {
    background: linear-gradient(135deg, #fff 30%, var(--neon-blue) 70%, var(--neon-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200%;
}

body.light-mode .title-glow-effect {
    background: linear-gradient(135deg, #0f172a 30%, var(--neon-blue) 70%, var(--neon-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Common Components */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-completed {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.loader {
    border: 3px solid rgba(56, 189, 248, 0.1);
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
}

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

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

/* WhatsApp FAB */
.whatsapp-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
    color: white !important;
    font-size: 28px;
    text-decoration: none;
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.whatsapp-fab:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.5);
}

/* Theme Toggle styles */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

body.light-mode .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #475569;
}

body.light-mode .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

/* Floating Theme Toggle (Bottom Left by default) */
.theme-toggle-btn-fixed {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.theme-toggle-btn-fixed:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--glass-border-hover);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.2);
}

.theme-toggle-btn-fixed i {
    font-size: 1.25rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Safe Area / Notch Support */
.theme-toggle-btn-fixed {
    bottom: calc(24px + var(--safe-area-bottom));
    left: calc(24px + var(--safe-area-left));
}

/* Media query for larger screen adjustments */
@media (min-width: 768px) {
    .theme-toggle-btn-fixed {
        width: 54px;
        height: 54px;
        bottom: calc(32px + var(--safe-area-bottom));
        left: calc(32px + var(--safe-area-left));
    }
}

/* ── MOBILE COMPATIBILITY LAYER ── */

/* Handle Safe Areas (Notches) and ensure full-height behavior */
:root {
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

/* Base mobile improvements */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling on rotation */
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* Disable default browser tap highlighting for a cleaner mobile experience */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Ensure interactive elements have sufficient tap targets */
button, a, input, select {
    min-height: 44px; /* Apple recommendation */
    touch-action: manipulation;
}

/* Mobile Input Fixes */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important; /* Prevent iOS zoom on focus */
    }
    
    .container {
        padding-left: calc(1.25rem + var(--safe-area-left));
        padding-right: calc(1.25rem + var(--safe-area-right));
    }
}

/* Fix for fixed elements and safe areas */
.whatsapp-fab, .whatsapp-float, .whatsapp-float-btn {
    bottom: calc(24px + var(--safe-area-bottom)) !important;
}

/* Fix for portal bottom nav */
.bottom-nav {
    padding-bottom: calc(10px + var(--safe-area-bottom)) !important;
    height: calc(70px + var(--safe-area-bottom)) !important;
}

/* Fix for fixed headers */
nav, header.glass {
    padding-top: var(--safe-area-top) !important;
}

/* Fix for back buttons and top-fixed elements */
.back-btn {
    top: calc(20px + var(--safe-area-top)) !important;
}

/* Theme-aware scrollbar for mobile */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
}

/* ── GLOBAL TOAST NOTIFICATION ── */
#app-toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 380px;
    width: calc(100% - 4rem);
}

.toast-item {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    -webkit-animation: toast-in 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    animation: toast-in 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.toast-item.hide {
    opacity: 0;
    -webkit-transform: translateX(100px);
    transform: translateX(100px);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon.info { background: rgba(56, 189, 248, 0.1); color: var(--neon-blue); }
.toast-icon.success { background: rgba(52, 211, 153, 0.1); color: var(--neon-green); }
.toast-icon.error { background: rgba(239, 68, 68, 0.1); color: #f87171; }

.toast-content {
    flex-grow: 1;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.toast-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.5;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
    color: var(--text-medium);
}

.toast-close:hover { opacity: 1; }

@-webkit-keyframes toast-in {
    from { opacity: 0; -webkit-transform: translateX(50px); transform: translateX(50px); }
    to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

@keyframes toast-in {
    from { opacity: 0; -webkit-transform: translateX(50px); transform: translateX(50px); }
    to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

@media (max-width: 640px) {
    #app-toast {
        top: auto;
        bottom: calc(2rem + var(--safe-area-bottom));
        right: 1rem;
        left: 1rem;
        width: calc(100% - 2rem);
    }
}

/* ── LIGHT MODE VISIBILITY OVERRIDES ── */

/* Modal Containers */
body.light-mode #quickBookModal .qbm-box,
body.light-mode #detailsModal #modalContainer {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

body.light-mode #quickBookModal .qbm-header,
body.light-mode #detailsModal #modalContainer > div:first-child,
body.light-mode #detailsModal #modalActions {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-mode #quickBookModal .qbm-title {
    color: var(--text-primary) !important;
}

body.light-mode #quickBookModal .qbm-close,
body.light-mode #detailsModal button[onclick*="closeModal"] {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: var(--text-medium) !important;
}

body.light-mode #quickBookModal .qbm-close:hover,
body.light-mode #detailsModal button[onclick*="closeModal"]:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: var(--text-primary) !important;
}

body.light-mode #quickBookModal .qbm-label {
    color: var(--text-medium) !important;
}

body.light-mode #quickBookModal .qbm-input {
    background: #f8fafc !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: var(--text-primary) !important;
}

body.light-mode #quickBookModal .qbm-input::placeholder {
    color: var(--text-dim) !important;
}

body.light-mode #quickBookModal .qbm-input:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12) !important;
}

/* Details Modal Body Elements */
body.light-mode #detailsModal #modalBody p.text-white {
    color: var(--text-primary) !important;
}

body.light-mode #detailsModal #modalBody p.text-slate-500,
body.light-mode #detailsModal #modalBody h4.text-slate-500,
body.light-mode #detailsModal #modalBody p.text-slate-300 {
    color: var(--text-medium) !important;
}

body.light-mode #detailsModal #modalBody .bg-black\/20,
body.light-mode #detailsModal #modalBody .bg-black\/30 {
    background-color: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

body.light-mode #detailsModal #modalBody .border-white\/5 {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Contrast adjustment for sky-400 (mobile numbers and links) */
body.light-mode .text-sky-400 {
    color: #0284c7 !important;
}

/* Sidebar styling for light mode */
body.light-mode aside#sidebar nav a.bg-sky-500\/10 {
    background-color: rgba(2, 132, 199, 0.08) !important;
    color: #0284c7 !important;
    border-color: rgba(2, 132, 199, 0.15) !important;
}

body.light-mode aside#sidebar nav a.text-slate-400 {
    color: var(--text-medium) !important;
}

body.light-mode aside#sidebar nav a.text-slate-400:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
    color: var(--text-primary) !important;
}

/* ── ADDITIONAL GLOBAL LIGHT MODE VISIBILITY OVERRIDES ── */

/* Preserve light text in dark containers during light mode */
body.light-mode .service-card,
body.light-mode .service-card h1,
body.light-mode .service-card h2,
body.light-mode .service-card h3,
body.light-mode .service-card h4,
body.light-mode .stats-bar,
body.light-mode .stats-bar .stat-num,
body.light-mode .stats-bar .stat-label {
    color: #ffffff !important;
}

body.light-mode .service-card .text-slate-400 {
    color: #94a3b8 !important;
}

body.light-mode .service-card .text-slate-300 {
    color: #cbd5e1 !important;
}

/* Text Contrast Overrides */
body.light-mode .text-white:not(button):not(a.btn-gradient):not(.qbm-submit):not(.whatsapp-float):not(.whatsapp-fab):not(.status-badge):not(#notifBadge):not(.bg-red-500):not(.bg-green-500):not(.bg-emerald-500):not(.bg-sky-500):not(.bg-red-600) {
    color: var(--text-primary) !important;
}
body.light-mode .text-slate-200 { color: var(--text-primary) !important; }
body.light-mode .text-slate-300 { color: var(--text-secondary) !important; }
body.light-mode .text-slate-400 { color: var(--text-medium) !important; }
body.light-mode .text-slate-500 { color: var(--text-dim) !important; }
body.light-mode .text-slate-600 { color: var(--text-dim) !important; }
body.light-mode .text-gray-300 { color: var(--text-secondary) !important; }
body.light-mode .text-gray-400 { color: var(--text-medium) !important; }
body.light-mode .text-zinc-300 { color: var(--text-secondary) !important; }
body.light-mode .text-zinc-400 { color: var(--text-medium) !important; }

/* Darker accent colors for readability in light mode */
body.light-mode .text-sky-400 { color: #0284c7 !important; }
body.light-mode .text-green-300,
body.light-mode .text-green-400 { color: #16a34a !important; }
body.light-mode .text-yellow-400 { color: #d97706 !important; }
body.light-mode .text-emerald-400 { color: #059669 !important; }

/* Background Overrides */
body.light-mode .bg-white\/5 { background-color: rgba(0, 0, 0, 0.03) !important; }
body.light-mode .bg-white\/10 { background-color: rgba(0, 0, 0, 0.07) !important; }
body.light-mode .bg-white\/\[0\.015\] { background-color: rgba(0, 0, 0, 0.01) !important; }
body.light-mode .bg-black\/20 { background-color: rgba(0, 0, 0, 0.03) !important; }
body.light-mode .bg-black\/30 { background-color: rgba(0, 0, 0, 0.05) !important; }
body.light-mode .bg-black\/40 { background-color: rgba(0, 0, 0, 0.08) !important; }
body.light-mode .bg-sky-500\/10 { background-color: rgba(2, 132, 199, 0.08) !important; }
body.light-mode .bg-sky-500\/20 { background-color: rgba(2, 132, 199, 0.15) !important; }
body.light-mode .bg-green-500\/10 { background-color: rgba(22, 163, 74, 0.08) !important; }
body.light-mode .bg-green-500\/20 { background-color: rgba(22, 163, 74, 0.15) !important; }
body.light-mode .bg-yellow-500\/10 { background-color: rgba(217, 119, 6, 0.08) !important; }
body.light-mode .bg-yellow-500\/20 { background-color: rgba(217, 119, 6, 0.15) !important; }
body.light-mode .bg-red-500\/10 { background-color: rgba(220, 38, 38, 0.08) !important; }
body.light-mode tbody tr:hover { background-color: rgba(2, 132, 199, 0.04) !important; }

/* Border Overrides */
body.light-mode .border-white\/5 { border-color: rgba(0, 0, 0, 0.05) !important; }
body.light-mode .border-white\/10 { border-color: rgba(0, 0, 0, 0.08) !important; }
body.light-mode .border-sky-500\/10 { border-color: rgba(2, 132, 199, 0.1) !important; }
body.light-mode .border-sky-500\/15 { border-color: rgba(2, 132, 199, 0.15) !important; }
body.light-mode .border-sky-500\/20 { border-color: rgba(2, 132, 199, 0.2) !important; }
body.light-mode .border-sky-500\/30 { border-color: rgba(2, 132, 199, 0.25) !important; }

/* Specific Components */
body.light-mode .sc-brands-label {
    color: rgba(0, 0, 0, 0.45) !important;
}
body.light-mode .sc-brand-pill {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: rgba(0, 0, 0, 0.6) !important;
}
body.light-mode .sc-brand-pill:hover,
body.light-mode .sc-card:hover .sc-brand-pill {
    color: var(--text-primary) !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Auth Navigation Buttons */
body.light-mode #authBtn {
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.25) !important;
    color: #0284c7 !important;
    box-shadow: 0 0 20px rgba(2, 132, 199, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}
body.light-mode #authBtn:hover {
    background: rgba(2, 132, 199, 0.15) !important;
    color: #0369a1 !important;
}
body.light-mode #logoutBtn {
    background: rgba(239, 68, 68, 0.06) !important;
    border-color: rgba(239, 68, 68, 0.15) !important;
    color: #dc2626 !important;
}
body.light-mode #logoutBtn:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1) !important;
    color: #b91c1c !important;
}

/* --- MORE ACCESSIBILITY & HOVER OVERRIDES --- */
body.light-mode .text-yellow-200 { color: #b45309 !important; } /* Dark warning text */
body.light-mode .text-red-400 { color: #dc2626 !important; }
body.light-mode .text-purple-400 { color: #7c3aed !important; }

body.light-mode .bg-purple-500\/20 { background-color: rgba(124, 58, 237, 0.12) !important; }
body.light-mode .bg-emerald-500\/20 { background-color: rgba(5, 150, 105, 0.12) !important; }
body.light-mode .bg-emerald-500\/30 { background-color: rgba(5, 150, 105, 0.18) !important; }

body.light-mode .border-green-500\/20 { border-color: rgba(22, 163, 74, 0.2) !important; }
body.light-mode .border-green-500\/30 { border-color: rgba(22, 163, 74, 0.3) !important; }
body.light-mode .border-red-500\/10 { border-color: rgba(220, 38, 38, 0.15) !important; }
body.light-mode .border-red-500\/20 { border-color: rgba(220, 38, 38, 0.25) !important; }
body.light-mode .border-red-500\/30 { border-color: rgba(220, 38, 38, 0.35) !important; }
body.light-mode .border-yellow-500\/30 { border-color: rgba(217, 119, 6, 0.35) !important; }

/* Precise Hover Overrides for Light Mode */
body.light-mode .hover\:text-white:hover:not(.hover\:bg-red-500):not(.hover\:bg-green-500):not(.hover\:bg-emerald-500):not(.hover\:bg-sky-500):not(.btn-gradient):not(.qbm-submit):not(.whatsapp-float):not(.whatsapp-fab) {
    color: var(--text-primary) !important;
}
body.light-mode .hover\:text-sky-400:hover { color: #0284c7 !important; }
body.light-mode .hover\:text-red-400:hover { color: #b91c1c !important; }
body.light-mode .hover\:bg-white\/5:hover { background-color: rgba(0, 0, 0, 0.05) !important; }
body.light-mode .hover\:bg-white\/10:hover { background-color: rgba(0, 0, 0, 0.08) !important; }

/* Precise Group Hover Overrides for Light Mode */
body.light-mode .group:hover .group-hover\:text-white { color: var(--text-primary) !important; }
body.light-mode .group:hover .group-hover\:text-sky-400 { color: #0284c7 !important; }
body.light-mode .group:hover .group-hover\:text-green-200 { color: #15803d !important; }
body.light-mode .group:hover .group-hover\:text-pink-200 { color: #be185d !important; }


/* ═══════════════════════════════════════════════════════
   DEVICE COMPATIBILITY — All Screens (2026 Update)
   ══════════════════════════════════════════════════════= */

/* ── 3D Carousel Mobile Adaptations ────────────────── */
@media (max-width: 640px) {
    #rv-stage {
        height: 260px;
        -webkit-perspective: 900px;
        perspective: 900px;
    }
    .rv-card-3d {
        width: 220px;
        height: 180px;
        margin: -90px 0 0 -110px;
        padding: 14px;
        border-radius: 16px;
        -webkit-transform-style: preserve-3d;
        -webkit-backface-visibility: hidden;
    }
    .rv-card-stars { font-size: 11px; letter-spacing: 1px; }
    .rv-card-title { font-size: 12px; }
    .rv-card-body  { font-size: 10.5px; -webkit-line-clamp: 2; }
    .rv-card-name  { font-size: 10px; }
    #rv-stage::before, #rv-stage::after { width: 60px; }
    .rv-avg-score  { font-size: 52px; }
    .rv-summary    { padding: 18px 16px; }
    .rv-bar-track  { min-width: 70px; }
    /* Controls bigger tap area on mobile */
    .rv-ctrl-btn   { width: 42px; height: 42px; font-size: 16px; }
    .rv-dot        { width: 8px; height: 8px; }
}

@media (min-width: 641px) and (max-width: 1024px) {
    #rv-stage { height: 310px; -webkit-perspective: 1100px; perspective: 1100px; }
    .rv-card-3d {
        width: 250px;
        height: 190px;
        margin: -95px 0 0 -125px;
        -webkit-transform-style: preserve-3d;
        -webkit-backface-visibility: hidden;
    }
    #rv-stage::before, #rv-stage::after { width: 100px; }
}

/* Disable 3D on very old/low-power devices that don't support preserve-3d */
@media (prefers-reduced-motion: reduce) {
    #rv-cylinder { animation: none !important; transition: none !important; }
    .rv-orb      { animation: none !important; }
    .rv-card-3d  { transition: none !important; }
}

/* Light mode: review summary & card overrides */
body.light-mode .rv-summary {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(14, 165, 233, 0.15);
}
body.light-mode .rv-bar-track { background: rgba(0,0,0,0.07); }
body.light-mode #rv-stage::before {
    background: linear-gradient(90deg, #f8fafc 0%, transparent 100%);
}
body.light-mode #rv-stage::after {
    background: linear-gradient(-90deg, #f8fafc 0%, transparent 100%);
}
body.light-mode .rv-ctrl-btn {
    border-color: rgba(14, 165, 233, 0.25);
    background: rgba(14, 165, 233, 0.06);
    color: #0284c7;
}
body.light-mode .rv-dot        { background: rgba(14, 165, 233, 0.2); }
body.light-mode .rv-dot.active { background: #0284c7; }
body.light-mode .rv-verified   { color: #16a34a; background: rgba(22,163,74,0.1); border-color: rgba(22,163,74,0.25); }
body.light-mode .rv-label      { background: rgba(14,165,233,0.08); border-color: rgba(14,165,233,0.2); color: #0284c7; }

/* ── Admin Panel Mobile ─────────────────────────────── */
@media (max-width: 767px) {
    /* Admin sidebar overlay on mobile */
    #sidebar {
        position: fixed;
        top: 0; left: 0;
        height: 100vh;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.23,1,0.32,1);
        box-shadow: 4px 0 40px rgba(0,0,0,0.6);
    }
    #sidebar.open {
        transform: translateX(0);
        display: flex !important;
    }
    /* Overlay backdrop */
    #sidebarBackdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 59;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    #sidebarBackdrop.open { display: block; }

    /* Admin table: horizontal scroll with sticky first column */
    .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-table-wrap table { min-width: 700px; }

    /* Reduce padding in main content area on mobile */
    .admin-content-pad { padding: 1rem !important; }

    /* Stat cards: 2 columns on tablet-small */
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Staff Portal Mobile ────────────────────────────── */
@media (max-width: 640px) {
    .staff-job-card-actions {
        flex-direction: column;
        gap: 8px;
    }
    .staff-job-card-actions button {
        width: 100%;
    }
}

/* ── Customer Dashboard Mobile ──────────────────────── */
@media (max-width: 640px) {
    .customer-pipeline {
        font-size: 10px;
    }
    .step-circle {
        width: 22px !important;
        height: 22px !important;
        font-size: 9px !important;
    }
}

/* ── Form Input Focus Fix (iOS safari zoom prevention) ─ */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="url"],
    select,
    textarea {
        font-size: 16px !important;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
}

/* ── WhatsApp FAB: safe-area aware on all devices ────── */
.whatsapp-fab {
    bottom: calc(25px + var(--safe-area-bottom)) !important;
    right: calc(25px + var(--safe-area-right)) !important;
}

/* ── Navigation: prevent text overflow on narrow screens  */
@media (max-width: 380px) {
    .nav-brand-text  { display: none !important; }
    .nav-compact-gap { gap: 8px !important; }
}

/* ── Smooth scrolling performance ───────────────────── */
.overflow-y-auto, main, body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* ── Fix Tailwind h-full on iOS safari ──────────────── */
@supports (-webkit-touch-callout: none) {
    .h-screen, .min-h-screen {
        height: -webkit-fill-available;
    }
    .flex.h-screen {
        height: -webkit-fill-available;
    }
}

/* ── Review section responsive padding ──────────────── */
@media (max-width: 640px) {
    #reviews-section { padding-top: 4rem; padding-bottom: 4rem; }
    #rvLoadingOverlay { gap: 8px; }
    #rvLoadingOverlay .rv-shimmer-card:nth-child(2),
    #rvLoadingOverlay .rv-shimmer-card:nth-child(3) { display: none; }
}

/* ── Prevent horizontal overflow globally ───────────── */
body { overflow-x: clip; }
section, .max-w-7xl, .max-w-4xl, .max-w-2xl {
    max-width: 100%;
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════
   MOBILE-FIRST PANEL OPTIMIZATIONS (v1.0.8)
   ══════════════════════════════════════════════════════= */

/* ── Admin / Staff Panel Bottom Navigation ─────────── */
#adminBottomNav,
#staffBottomNav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom, 8px);
    padding-top: 6px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
}
@media (min-width: 768px) {
    #adminBottomNav,
    #staffBottomNav { display: none !important; }
}

/* Bottom nav buttons */
.mbn-btn, .sbn-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    border-radius: 12px;
    min-width: 56px;
    min-height: 48px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}
.mbn-btn i, .sbn-btn i {
    font-size: 19px;
    transition: transform 0.2s ease;
}
.mbn-btn.active, .sbn-btn.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}
.mbn-btn.active i, .sbn-btn.active i {
    transform: scale(1.15);
}
body.light-mode .mbn-btn,
body.light-mode .sbn-btn { color: var(--text-dim); }
body.light-mode .mbn-btn.active,
body.light-mode .sbn-btn.active {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.1);
}
body.light-mode #adminBottomNav,
body.light-mode #staffBottomNav {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.08);
}

/* ── Main content: padding for bottom nav ──────────── */
/* Applied via pb-24 md:pb-8 utility in HTML */

/* ── Touch Targets: min 44x44px ─────────────────────── */
button, a, [role="button"] {
    min-height: 44px;
    touch-action: manipulation;
}
/* Exception: inline/decorative links don't need touch target */
a.inline-link { min-height: unset; }

/* ── Input font-size: prevents iOS auto-zoom ────────── */
@media (max-width: 768px) {
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* ── Mobile modal: bottom sheet style ───────────────── */
@media (max-width: 639px) {
    .mobile-sheet-modal {
        align-items: flex-end !important;
    }
    .mobile-sheet-modal .modal-inner {
        border-radius: 1.5rem 1.5rem 0 0 !important;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        width: 100% !important;
        max-width: 100% !important;
    }
    /* Drag handle indicator */
    .mobile-sheet-modal .modal-inner::before {
        content: '';
        display: block;
        width: 40px; height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
        margin: 10px auto 4px;
    }
}

/* ── Admin stats grid: 2 cols on mobile ─────────────── */
@media (max-width: 639px) {
    .admin-stats-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
}

/* ── Tables: horizontal scroll container ────────────── */
.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Gradient fade on right to hint there's more content */
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
            mask-image: linear-gradient(to right, black 80%, transparent 100%);
}
.table-scroll-wrapper:hover,
.table-scroll-wrapper:focus-within {
    -webkit-mask-image: none;
            mask-image: none;
}

/* ── Mobile history cards (staff portal) ────────────── */
.history-card {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    transition: background 0.2s ease;
}
.history-card:last-child { border-bottom: none; }
.history-card:hover { background: rgba(56, 189, 248, 0.03); }
body.light-mode .history-card { border-color: rgba(0, 0, 0, 0.06); }
body.light-mode .history-card:hover { background: rgba(2, 132, 199, 0.04); }

/* ── Customer mobile cards (admin portal) ───────────── */
.customer-mobile-card {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}
.customer-mobile-card:last-child { border-bottom: none; }
body.light-mode .customer-mobile-card { border-color: rgba(0, 0, 0, 0.06); }

/* ── Presence/job cards: responsive grid ────────────── */
@media (max-width: 480px) {
    .job-card {
        border-radius: 16px;
        padding: 1rem;
    }
    /* Staff presence card: full width on very small screens */
    #staffPresenceContainer {
        grid-template-columns: 1fr !important;
    }
}

/* ── Status badges: always readable ─────────────────── */
.status-badge {
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Line clamp for card descriptions ───────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Safe area helpers ───────────────────────────────── */
.safe-top    { padding-top:    env(safe-area-inset-top,    0px); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0px); }
.safe-left   { padding-left:   env(safe-area-inset-left,  0px); }
.safe-right  { padding-right:  env(safe-area-inset-right, 0px); }

/* ── Form labels: bigger on mobile ──────────────────── */
@media (max-width: 480px) {
    form label { font-size: 11px; }
    form input, form select, form textarea {
        padding: 14px 12px;
    }
}

/* ── Overflow fix for whitespace-nowrap tables ────────── */
@media (max-width: 767px) {
    table.whitespace-nowrap { white-space: normal; }
    table.whitespace-nowrap td,
    table.whitespace-nowrap th {
        padding: 0.6rem 0.75rem;
        font-size: 11px;
    }
}

/* ── Fab buttons: clear bottom nav area ─────────────── */
@media (max-width: 767px) {
    .theme-toggle-btn-fixed {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .whatsapp-fab {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* ═══════════════════════════════════════════════════════
   LIGHT MODE COLOR SCHEME & THEME STANDARDIZATION
   ═══════════════════════════════════════════════════════ */

/* Global Body Override */
body.light-mode {
    background-color: var(--dark-bg) !important;
    color: var(--text-secondary) !important;
}

/* Overriding tailwind hardcoded dark background classes in light mode */
body.light-mode .bg-\[\#020617\],
body.light-mode .bg-\[\#060d1f\],
body.light-mode .bg-slate-950,
body.light-mode .bg-gray-950,
body.light-mode .bg-zinc-950 {
    background-color: var(--dark-bg) !important;
}

/* Modals & Dialog Box Overrides */
body.light-mode .bg-\[\#0d1a2e\],
body.light-mode .modal-inner,
body.light-mode .modal-box,
body.light-mode #dispatchModal > div,
body.light-mode #editStaffModal > div,
body.light-mode #detailsModal > div {
    background-color: var(--card-bg) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

/* Force dark text inside light-themed modal boxes */
body.light-mode #dispatchModal h3,
body.light-mode #editStaffModal h3,
body.light-mode #detailsModal h3,
body.light-mode #dispatchModal label,
body.light-mode #editStaffModal label,
body.light-mode #detailsModal label,
body.light-mode #dispatchModal select,
body.light-mode #editStaffModal select {
    color: var(--text-primary) !important;
}

/* Override all tailwind transparent dark overlays/backgrounds to light equivalent */
body.light-mode .bg-black\/20,
body.light-mode .bg-black\/25,
body.light-mode .bg-black\/30,
body.light-mode .bg-black\/40,
body.light-mode .bg-black\/50,
body.light-mode .bg-slate-900\/50,
body.light-mode .bg-gray-900\/50 {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

/* Table border overrides */
body.light-mode .border-white\/5,
body.light-mode .border-white\/10,
body.light-mode .border-slate-800,
body.light-mode .border-gray-800 {
    border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Global Form Input Standardizations for Light Mode */
body.light-mode input[type="text"],
body.light-mode input[type="email"],
body.light-mode input[type="tel"],
body.light-mode input[type="password"],
body.light-mode select,
body.light-mode textarea {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: var(--text-primary) !important;
}

body.light-mode input[type="text"]:focus,
body.light-mode input[type="email"]:focus,
body.light-mode input[type="tel"]:focus,
body.light-mode input[type="password"]:focus,
body.light-mode select:focus,
body.light-mode textarea:focus {
    background-color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12) !important;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
    color: var(--text-dim) !important;
    opacity: 0.7 !important;
}

/* Google Sign-In Button Light Mode Override */
body.light-mode .google-btn {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .google-btn:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.25) !important;
}

/* Service Login Tab Switcher Light Mode Overrides */
body.light-mode #loginTabs {
    background-color: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-mode #loginTabs button {
    color: var(--text-medium) !important;
}

body.light-mode #loginTabs button.active,
body.light-mode #loginTabs button[style*="background: rgba(255, 255, 255, 0.1)"] {
    background-color: #ffffff !important;
    color: var(--text-primary) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

/* Active tab background variable for compatibility with JavaScript switchTab */
:root {
    --tab-active-bg: rgba(255, 255, 255, 0.1);
}
body.light-mode {
    --tab-active-bg: #ffffff;
}

/* Scrollbar styling for Light Mode */
body.light-mode ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(2, 132, 199, 0.2);
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(2, 132, 199, 0.4);
}

/* ==========================================================================
   GLASSMORPHISMOverhaul (Target Reference UI Design)
   ========================================================================== */

/* Premium Grid Background Overlay */
.premium-grid-bg {
    position: relative;
    background-color: var(--dark-bg);
    background-image: 
        linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: center center;
}
.premium-grid-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}
body.light-mode .premium-grid-bg {
    background-image: 
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
}

/* Redefined Glass Overlays */
.glass, .glass-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), 
                inset 0 1px 0 0 rgba(255, 255, 255, 0.15), 
                inset 0 -1px 0 0 rgba(0, 0, 0, 0.25) !important;
}
body.light-mode .glass, body.light-mode .glass-card {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06), 
                inset 0 1px 0 0 rgba(255, 255, 255, 0.45), 
                inset 0 -1px 0 0 rgba(0, 0, 0, 0.05) !important;
}

/* Glass Capsule Buttons */
.glass-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px !important;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 
                inset 0 1.5px 0 rgba(255, 255, 255, 0.25), 
                inset 0 -1px 1px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    min-height: 44px;
}
.glass-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.25), 
                inset 0 1.5px 0 rgba(255, 255, 255, 0.35), 
                inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    border-color: rgba(56, 189, 248, 0.4);
}
.glass-btn:active {
    transform: translateY(0) scale(0.98);
}
body.light-mode .glass-btn {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.45);
    color: #0f172a;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05), 
                inset 0 1.5px 0 rgba(255, 255, 255, 0.75), 
                inset 0 -1px 1px rgba(0, 0, 0, 0.05);
}
body.light-mode .glass-btn:hover {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.15), 
                inset 0 1.5px 0 rgba(255, 255, 255, 0.85), 
                inset 0 -1px 1px rgba(0, 0, 0, 0.05);
}

.glass-btn-primary {
    background: rgba(14, 165, 233, 0.15) !important;
    border-color: rgba(14, 165, 233, 0.35) !important;
    color: #38bdf8 !important;
}
.glass-btn-primary:hover {
    background: rgba(14, 165, 233, 0.25) !important;
    color: #ffffff !important;
}
body.light-mode .glass-btn-primary {
    background: rgba(14, 165, 233, 0.08) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    color: #0284c7 !important;
}
body.light-mode .glass-btn-primary:hover {
    background: rgba(14, 165, 233, 0.18) !important;
}

.glass-btn-success {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #34d399 !important;
}
.glass-btn-success:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    color: #ffffff !important;
}

.glass-btn-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #f87171 !important;
}
.glass-btn-danger:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #ffffff !important;
}

/* Circular Buttons */
.glass-circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.glass-circle-btn:hover {
    transform: scale(1.1) rotate(9deg);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
}
body.light-mode .glass-circle-btn {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(255, 255, 255, 0.45);
    color: #0f172a;
}

/* Glass Inputs */
.glass-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    padding: 0.75rem 1rem !important;
    color: #ffffff !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
body.light-mode .glass-input {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}
.glass-input:focus {
    border-color: var(--neon-blue) !important;
    background: rgba(14, 165, 233, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
body.light-mode .glass-input:focus {
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
}

/* Glass Slider Track and Thumb */
.glass-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 0;
}
.glass-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 16px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    position: relative;
}
body.light-mode .glass-slider {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}
.glass-slider.slider-blue {
    background: linear-gradient(90deg, #0284c7 0%, rgba(255,255,255,0.05) 60%);
}
.glass-slider.slider-rainbow {
    background: linear-gradient(90deg, #00c6ff 0%, #0072ff 20%, #f72585 40%, #ff007f 60%, #ffbe0b 80%, #3a0ca3 100%);
}
body.light-mode .glass-slider.slider-blue {
    background: linear-gradient(90deg, #0ea5e9 0%, rgba(0,0,0,0.04) 60%);
}
.glass-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 20px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.5), 
                inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.glass-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.6);
    border-color: #ffffff;
}
.glass-slider::-moz-range-thumb {
    width: 32px;
    height: 20px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.5), 
                inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}
.glass-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.6);
    border-color: #ffffff;
}

/* Glass Checkboxes & Radio Controls */
.glass-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    color: var(--text-primary);
    font-size: 14px;
}
.glass-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: inline-grid;
    place-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}
body.light-mode .glass-checkbox {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
}
.glass-checkbox::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--neon-blue);
    background-color: var(--neon-blue);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.glass-checkbox:checked {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--neon-blue);
}
.glass-checkbox:checked::before {
    transform: scale(1);
}

.glass-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    display: inline-grid;
    place-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}
body.light-mode .glass-radio {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
}
.glass-radio::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: var(--neon-blue);
}
.glass-radio:checked {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--neon-blue);
}
.glass-radio:checked::before {
    transform: scale(1);
}

/* Glass overrides for touch-inputs */
.touch-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
body.light-mode .touch-input {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}
.touch-input:focus {
    border-color: var(--neon-blue) !important;
    background: rgba(14, 165, 233, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
body.light-mode .touch-input:focus {
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
}

/* Glass overrides for tailwind background color buttons */
button.bg-sky-500, a.bg-sky-500,
button.bg-blue-500, a.bg-blue-500 {
    background: rgba(14, 165, 233, 0.18) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid rgba(14, 165, 233, 0.4) !important;
    color: #38bdf8 !important;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.15), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2), 
                inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
}
button.bg-sky-500:hover, a.bg-sky-500:hover,
button.bg-blue-500:hover, a.bg-blue-500:hover {
    background: rgba(14, 165, 233, 0.28) !important;
    border-color: rgba(56, 189, 248, 0.6) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}
body.light-mode button.bg-sky-500, body.light-mode a.bg-sky-500,
body.light-mode button.bg-blue-500, body.light-mode a.bg-blue-500 {
    background: rgba(14, 165, 233, 0.12) !important;
    color: #0284c7 !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08) !important;
}
body.light-mode button.bg-sky-500:hover, body.light-mode a.bg-sky-500:hover,
body.light-mode button.bg-blue-500:hover, body.light-mode a.bg-blue-500:hover {
    background: rgba(14, 165, 233, 0.22) !important;
    color: #0369a1 !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15) !important;
}

button.bg-green-500, a.bg-green-500,
button.bg-emerald-500, a.bg-emerald-500 {
    background: rgba(16, 185, 129, 0.18) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2), 
                inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
}
button.bg-green-500:hover, a.bg-green-500:hover,
button.bg-emerald-500:hover, a.bg-emerald-500:hover {
    background: rgba(16, 185, 129, 0.28) !important;
    border-color: rgba(52, 211, 153, 0.6) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}
body.light-mode button.bg-green-500, body.light-mode a.bg-green-500,
body.light-mode button.bg-emerald-500, body.light-mode a.bg-emerald-500 {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08) !important;
}
body.light-mode button.bg-green-500:hover, body.light-mode a.bg-green-500:hover,
body.light-mode button.bg-emerald-500:hover, body.light-mode a.bg-emerald-500:hover {
    background: rgba(16, 185, 129, 0.22) !important;
    color: #047857 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15) !important;
}

button.bg-red-500, a.bg-red-500,
button.bg-red-600, a.bg-red-600 {
    background: rgba(239, 68, 68, 0.18) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2), 
                inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
}
button.bg-red-500:hover, a.bg-red-500:hover,
button.bg-red-600:hover, a.bg-red-600:hover {
    background: rgba(239, 68, 68, 0.28) !important;
    border-color: rgba(248, 113, 113, 0.6) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}
body.light-mode button.bg-red-500, body.light-mode a.bg-red-500,
body.light-mode button.bg-red-600, body.light-mode a.bg-red-600 {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.06) !important;
}
body.light-mode button.bg-red-500:hover, body.light-mode a.bg-red-500:hover,
body.light-mode button.bg-red-600:hover, body.light-mode a.bg-red-600:hover {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #b91c1c !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12) !important;
}

/* Base Tailwind shadow override for light mode (uniform soft slate shadows) */
body.light-mode .shadow-2xl {
    --tw-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08) !important;
    --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color) !important;
}
body.light-mode .shadow-xl {
    --tw-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.06) !important;
    --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color) !important;
}
body.light-mode .shadow-lg {
    --tw-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.05) !important;
    --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;
}
body.light-mode .shadow-md {
    --tw-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.04) !important;
    --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;
}
body.light-mode .shadow-sm {
    --tw-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03) !important;
    --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;
}
body.light-mode .shadow {
    --tw-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04) !important;
    --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;
}

/* Colored shadow softeners for light mode */
body.light-mode .shadow-sky-500\/20,
body.light-mode .shadow-sky-500\/30,
body.light-mode .shadow-sky-500\/40 {
    --tw-shadow-color: rgba(14, 165, 233, 0.06) !important;
}
body.light-mode .shadow-amber-500\/20 {
    --tw-shadow-color: rgba(217, 119, 6, 0.06) !important;
}
body.light-mode .shadow-emerald-500\/20 {
    --tw-shadow-color: rgba(16, 185, 129, 0.06) !important;
}
body.light-mode .shadow-emerald-950\/20 {
    --tw-shadow-color: rgba(15, 23, 42, 0.04) !important;
}
body.light-mode .shadow-amber-950\/20 {
    --tw-shadow-color: rgba(15, 23, 42, 0.04) !important;
}
body.light-mode .shadow-red-500\/20 {
    --tw-shadow-color: rgba(239, 68, 68, 0.06) !important;
}

/* Light mode overrides for transparent dark container backgrounds */
body.light-mode .bg-slate-900\/40 {
    background-color: #ffffff !important;
}
body.light-mode .bg-slate-900\/60 {
    background-color: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
body.light-mode .bg-slate-900\/60:hover {
    background-color: rgba(0, 0, 0, 0.06) !important;
}

/* ═══════════════════════════════════════════════════════
   COMPACT UI & TABLE ADJUSTMENTS (2026 Update)
   ═══════════════════════════════════════════════════════ */

/* Make all table columns/rows more compact (adjust column height) */
table th, 
table td {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
}

/* Make table header text slightly smaller to fit better */
table th {
    font-size: 0.65rem !important;
    letter-spacing: 0.05em !important;
}

/* Compact Table Action Buttons */
table td button,
table td a.btn,
table td .flex button {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.65rem !important;
    border-radius: 6px !important;
}

/* Make square action buttons in tables smaller and clean */
table td button.w-9,
table td .w-9 {
    width: 1.65rem !important; /* ~26px */
    height: 1.65rem !important;
    border-radius: 6px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
table td button.w-9 i,
table td .w-9 i {
    font-size: 0.7rem !important;
}

/* Make control bar and filter row buttons smaller */
button.px-3.py-2,
button.px-4.py-2,
button.px-4.py-2\.5 {
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
    font-size: 0.65rem !important;
    border-radius: 6px !important;
}

/* Light mode overrides for Why Choose Us feature cards */
body.light-mode .feature-item {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03) !important;
}
body.light-mode .feature-item:hover {
    background: #ffffff !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.08) !important;
}
body.light-mode .feature-item h4 {
    color: var(--text-primary) !important;
}
body.light-mode .feature-item p {
    color: var(--text-medium) !important;
}

/* ═══════════════════════════════════════════════════════
   AUTO-HIDE TABLE ROW ACTION BUTTONS (Hover to reveal)
   ═══════════════════════════════════════════════════════ */

/* Hide action button groups inside table rows by default */
table tbody tr td .row-actions,
table tbody tr td > div > div.flex.items-center:last-child {
    opacity: 0;
    transform: translateX(4px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Reveal on row hover */
table tbody tr:hover td .row-actions,
table tbody tr:hover td > div > div.flex.items-center:last-child {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Specifically hide icon action button containers in table cells */
table tbody tr td button.w-9,
table tbody tr td .w-9.rounded-xl {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Show on row hover with a spring animation */
table tbody tr:hover td button.w-9,
table tbody tr:hover td .w-9.rounded-xl {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Stagger each button appearance for a polished effect */
table tbody tr:hover td button.w-9:nth-child(1) { transition-delay: 0ms; }
table tbody tr:hover td button.w-9:nth-child(2) { transition-delay: 30ms; }
table tbody tr:hover td button.w-9:nth-child(3) { transition-delay: 60ms; }
table tbody tr:hover td button.w-9:nth-child(4) { transition-delay: 90ms; }

/* Also hide text action buttons (like Promote, Delete Customer) */
table tbody tr td button.px-2\.5,
table tbody tr td button.px-2 {
    opacity: 0;
    transform: translateY(2px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
table tbody tr:hover td button.px-2\.5,
table tbody tr:hover td button.px-2 {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Keep buttons always visible when focused or active (accessibility) */
table tbody tr td button:focus,
table tbody tr td button:focus-visible,
table tbody tr td button:active {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
}

/* Always show on touch devices (no hover support) */
@media (hover: none) {
    table tbody tr td button.w-9,
    table tbody tr td .w-9.rounded-xl,
    table tbody tr td button.px-2\.5,
    table tbody tr td button.px-2 {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }
}
