:root {
    --sb-primary: #4EC1BD;
    --sb-primary-dark: #359E9A;
    --sb-primary-soft: #EBF9F8;
    --sb-secondary: #64748B;
    --sb-text: #0F172A;
    --sb-bg: #F8FAFC;
    --sb-white: #FFFFFF;
    --sb-border: #E2E8F0;
    --sb-radius: 18px;
}

html, body {
    font-family: 'IBM Plex Sans Arabic', 'Plus Jakarta Sans', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 500;
    font-size: 15.5px;
    background-color: var(--sb-bg);
    color: var(--sb-text);
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.mud-layout, .mud-main-content {
    max-width: 100%;
    overflow-x: clip;
}

.mud-appbar .mud-toolbar {
    padding-inline: 8px !important;
    min-width: 0;
    overflow: hidden;
}

.mud-simple-table, .mud-table-container {
    max-width: 100%;
    overflow-x: auto;
}

.sb-card {
    max-width: 100%;
    overflow-wrap: anywhere;
}

html[lang="en"], html[lang="en"] body {
    font-family: 'Plus Jakarta Sans', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.mud-typography, .mud-button-label, .mud-input-slot, .mud-tab, .mud-nav-link-text, .mud-table-cell {
    font-family: inherit !important;
}

.mud-nav-link-text, .mud-input-label {
    font-weight: 700 !important;
}

.mud-table-head .mud-table-cell {
    font-weight: 800 !important;
    color: #0F172A !important;
    background: #F8FAFC !important;
}

/* Dashboard Bar Chart Columns */
.sb-bar-track {
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    padding: 0 4px;
}

.sb-bar-fill {
    width: 100%;
    max-width: 28px;
    border-radius: 8px 8px 4px 4px;
    transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    min-height: 4px;
}

.sb-lang-btn {
    min-height: 34px !important;
    min-width: 48px !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
    padding: 0 9px !important;
    font-size: 0.8rem !important;
    border: 1.5px solid #E2E8F0 !important;
    color: #0F172A !important;
    background: #F8FAFC !important;
}

.sb-lang-btn:hover {
    border-color: #4EC1BD !important;
    color: #359E9A !important;
    background: #EBF9F8 !important;
}

/* Luxury Coastal Buttons (min 48px touch height for mobile) */
.sb-btn-touch {
    min-height: 48px !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

/* Hero Section */
.sb-hero-signin-btn {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #0F172A !important;
}

.sb-hero-signin-btn .mud-button-label,
.sb-hero-signin-btn .mud-icon-root {
    color: #0F172A !important;
}

html[data-theme="dark"] .sb-hero-signin-btn {
    background: #FFFFFF !important;
    color: #0F172A !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .sb-hero-signin-btn .mud-button-label,
html[data-theme="dark"] .sb-hero-signin-btn .mud-icon-root {
    color: #0F172A !important;
}

.sb-hero {
    position: relative;
    min-height: 82vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    border-radius: 0 0 36px 36px;
}

.sb-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.56) 0%, rgba(15, 23, 42, 0.35) 45%, rgba(21, 94, 99, 0.82) 100%);
}

.sb-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 40px 20px 56px;
}

/* Glass & Coastal Cards */
.sb-card {
    background: var(--sb-white);
    border-radius: var(--sb-radius);
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.sb-stat-card {
    background: var(--sb-white);
    border-radius: 18px;
    padding: 18px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sb-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(78, 193, 189, 0.14);
}

/* Turquoise Digital Pass & Invitation Card */
.sb-turquoise-card {
    background: linear-gradient(145deg, #56CCC7 0%, #4EC1BD 52%, #2D8C89 100%);
    border-radius: 26px;
    padding: 22px 18px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(53, 158, 154, 0.32);
}

.sb-turquoise-card::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -70px;
    left: -50px;
    pointer-events: none;
}

.sb-turquoise-card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -60px;
    right: -40px;
    pointer-events: none;
}

.sb-card-inner {
    background: #FFFFFF;
    color: #1E293B;
    border-radius: 20px;
    padding: 20px 18px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.text-center {
    text-align: center !important;
}

.sb-qr-frame {
    display: inline-flex;
    padding: 12px;
    background: #F8FAFC;
    border: 2.5px solid #4EC1BD;
    border-radius: 18px;
}

.sb-qr-frame img {
    width: 196px;
    height: 196px;
    display: block;
    border-radius: 8px;
}

.sb-short-code {
    display: inline-block;
    max-width: 100%;
    direction: ltr;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: clamp(1.1rem, 4.8vw, 1.5rem);
    font-weight: 800;
    letter-spacing: 2px;
    color: #1E293B;
    background: #EBF9F8;
    border: 1px dashed #4EC1BD;
    padding: 8px 16px;
    border-radius: 12px;
}

/* Gallery Card */
.sb-gallery-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
}

.sb-gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sb-gallery-card:hover img {
    transform: scale(1.06);
}

.sb-gallery-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 18px 16px 14px;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.78) 100%);
    color: #FFFFFF;
}

/* Scanner Viewport */
.sb-scanner-box {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 22px;
    overflow: hidden;
    background: #0F172A;
    border: 3px solid #4EC1BD;
    min-height: 280px;
    position: relative;
}

.sb-scan-badge-green {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.sb-scan-badge-red {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.sb-scan-badge-amber {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

/* Mobile Bottom Navigation Bar */
.sb-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1200;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.06);
}

.sb-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748B;
    font-size: 0.62rem;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    min-height: 52px;
    border-radius: 10px;
    padding: 4px 2px;
    text-align: center;
    line-height: 1.15;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.sb-bottom-nav-item.active {
    color: #359E9A;
    background: #EBF9F8;
}

.sb-bottom-nav-item .mud-icon-root {
    font-size: 1.35rem;
    margin-bottom: 2px;
}

/* Add bottom spacing on mobile when bottom nav is visible */
@media (max-width: 959px) {
    .sb-main-with-bottom-nav {
        padding-bottom: 88px !important;
    }
}

@media (min-width: 960px) {
    .sb-bottom-nav {
        display: none !important;
    }
}

/* LTR numeric values inside RTL UI */
.ltr-num {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

/* Smooth focus & highlight when QR scan populates customer info */
#sb-scan-result-card {
    scroll-margin-top: 82px;
    outline: none;
}

@keyframes sbResultPulse {
    0% { box-shadow: 0 0 0 0 rgba(78, 193, 189, 0.55); border-color: #4EC1BD; }
    60% { box-shadow: 0 0 0 12px rgba(78, 193, 189, 0); border-color: #4EC1BD; }
    100% { box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05); border-color: rgba(226, 232, 240, 0.85); }
}

.sb-result-pulse {
    animation: sbResultPulse 0.9s ease-out;
}

/* PWA Floating Install Banner */
.sb-pwa-banner {
    position: fixed;
    bottom: 80px;
    left: 12px;
    right: 12px;
    max-width: 520px;
    margin: 0 auto;
    z-index: 1300;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    border: 1.5px solid #4EC1BD;
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
}

@media (min-width: 960px) {
    .sb-pwa-banner {
        bottom: 22px;
    }
}

/* ============================================================
   Management-Only Background (Staff & Admin Pages)
   Light Mode = Bright Daytime Beachfront | Dark Mode = Night Pool
   NEVER applied to Members or Public Guests
   ============================================================ */
.sb-admin-bg {
    position: relative;
    background-image:
        linear-gradient(160deg, rgba(248, 252, 253, 0.64) 0%, rgba(235, 249, 248, 0.54) 50%, rgba(241, 248, 250, 0.70) 100%),
        url('/images/admin-bg-light.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
}

.sb-admin-bg .sb-card,
.sb-admin-bg .sb-stat-card {
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
}

.sb-admin-bg .mud-tabs {
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Crisp readable dark headings directly over the bright daytime backdrop (Light Mode) */
.sb-admin-bg > .mud-container > div:first-child .mud-typography-h5,
.sb-admin-bg > .mud-container > div:first-child .mud-typography-h4,
.sb-admin-bg > .mud-container > div:first-child .mud-typography-h6,
.sb-admin-bg > .mud-container > .mud-grid > .mud-grid-item > .text-center .mud-typography-h5 {
    color: #0F172A !important;
    text-shadow: 0 1px 10px rgba(255, 255, 255, 0.9);
}

.sb-admin-bg > .mud-container > div:first-child .mud-typography-body2,
.sb-admin-bg > .mud-container > div:first-child .mud-typography-caption,
.sb-admin-bg > .mud-container > .mud-grid > .mud-grid-item > .text-center .mud-typography-body2 {
    color: #1E293B !important;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.85);
}

/* Dark Mode + Management Night Pool Glassmorphism */
html[data-theme="dark"] .sb-admin-bg {
    background-image:
        linear-gradient(160deg, rgba(6, 13, 25, 0.72) 0%, rgba(10, 26, 40, 0.64) 50%, rgba(6, 13, 25, 0.78) 100%),
        url('/images/admin-bg.jpg?v=2') !important;
}

html[data-theme="dark"] .sb-admin-bg > .mud-container > div:first-child .mud-typography-h5,
html[data-theme="dark"] .sb-admin-bg > .mud-container > div:first-child .mud-typography-h4,
html[data-theme="dark"] .sb-admin-bg > .mud-container > div:first-child .mud-typography-h6,
html[data-theme="dark"] .sb-admin-bg > .mud-container > .mud-grid > .mud-grid-item > .text-center .mud-typography-h5 {
    color: #FFFFFF !important;
    text-shadow: 0 2px 10px rgba(7, 15, 28, 0.65);
}

html[data-theme="dark"] .sb-admin-bg > .mud-container > div:first-child .mud-typography-body2,
html[data-theme="dark"] .sb-admin-bg > .mud-container > div:first-child .mud-typography-caption,
html[data-theme="dark"] .sb-admin-bg > .mud-container > .mud-grid > .mud-grid-item > .text-center .mud-typography-body2 {
    color: rgba(241, 245, 249, 0.92) !important;
    text-shadow: 0 1px 6px rgba(7, 15, 28, 0.65);
}

html[data-theme="dark"] .sb-admin-bg .sb-card,
html[data-theme="dark"] .sb-admin-bg .sb-stat-card {
    background: rgba(15, 26, 44, 0.86) !important;
    border: 1px solid rgba(78, 193, 189, 0.24) !important;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.42) !important;
}

html[data-theme="dark"] .sb-admin-bg .mud-tabs {
    background: rgba(15, 26, 44, 0.88) !important;
    border-color: rgba(78, 193, 189, 0.24) !important;
}

/* ============================================================
   Theme Toggle Button & AppBar Helpers
   ============================================================ */
.sb-theme-btn {
    min-width: 34px !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--sb-border) !important;
    background: var(--sb-bg) !important;
    color: var(--sb-text) !important;
}

.sb-theme-btn:hover {
    border-color: #4EC1BD !important;
    color: #4EC1BD !important;
}

.sb-appbar {
    border-bottom: 1px solid var(--sb-border) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sb-public-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sb-border);
    max-width: 100%;
    overflow: hidden;
}

.sb-drawer-header {
    background: linear-gradient(135deg, #EBF9F8, #FFFFFF);
    border-bottom: 1px solid var(--sb-border);
}

/* ============================================================
   Dark Mode Theme Variables & Clean Surface Overrides
   ============================================================ */
html[data-theme="dark"] {
    --sb-primary: #4EC1BD;
    --sb-primary-dark: #5FD3CF;
    --sb-primary-soft: rgba(78, 193, 189, 0.16);
    --sb-secondary: #94A3B8;
    --sb-text: #F1F5F9;
    --sb-bg: #0B1322;
    --sb-white: #131F33;
    --sb-border: #23334D;
    color-scheme: dark;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .mud-main-content:not(.sb-admin-bg) {
    background-color: #0B1322 !important;
    color: #F1F5F9 !important;
}

html[data-theme="dark"] .sb-appbar,
html[data-theme="dark"] .sb-public-header {
    background: rgba(14, 24, 42, 0.94) !important;
    border-bottom-color: #23334D !important;
}

html[data-theme="dark"] .sb-drawer-header {
    background: linear-gradient(135deg, #12243B, #0E182A) !important;
    border-bottom-color: #23334D !important;
}

html[data-theme="dark"] .sb-lang-btn,
html[data-theme="dark"] .sb-theme-btn {
    background: #18263D !important;
    border-color: #2A3F5F !important;
    color: #F1F5F9 !important;
}

html[data-theme="dark"] .sb-lang-btn:hover,
html[data-theme="dark"] .sb-theme-btn:hover {
    border-color: #4EC1BD !important;
    color: #7AD4D1 !important;
    background: rgba(78, 193, 189, 0.14) !important;
}

html[data-theme="dark"] .sb-card,
html[data-theme="dark"] .sb-stat-card {
    background: #131F33;
    border-color: #23334D;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    color: #F1F5F9;
}

html[data-theme="dark"] .sb-bottom-nav {
    background: rgba(14, 24, 42, 0.96);
    border-top-color: #23334D;
    box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .sb-bottom-nav-item {
    color: #94A3B8;
}

html[data-theme="dark"] .sb-bottom-nav-item.active {
    color: #7AD4D1;
    background: rgba(78, 193, 189, 0.16);
}

html[data-theme="dark"] .sb-pwa-banner {
    background: rgba(19, 31, 51, 0.96);
    border-color: #4EC1BD;
    color: #F1F5F9;
}

html[data-theme="dark"] .mud-table-head .mud-table-cell {
    color: #F1F5F9 !important;
    background: #18263D !important;
}

html[data-theme="dark"] .mud-table-row:hover {
    background-color: rgba(78, 193, 189, 0.08) !important;
}

/* Harmonize inline light-mode styles cleanly in dark mode (excluding white QR pass cards) */
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="color:#0F172A"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="color: #0F172A"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="color:#1E293B"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="color:#334155"] {
    color: #F1F5F9 !important;
}

html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="color:#475569"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="color: #475569"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="color:#64748B"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="color: #64748B"] {
    color: #94A3B8 !important;
}

html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="background:#FFFFFF"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="background: #FFFFFF"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="background-color: #F8FAFC"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="background:#F8FAFC"] {
    background: #18263D !important;
    background-color: #18263D !important;
}

html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="background:#EBF9F8"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="background: #EBF9F8"] {
    background: rgba(78, 193, 189, 0.14) !important;
}

html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="border:1px solid #E2E8F0"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="border:1.5px solid #E2E8F0"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="border-top:1px solid #F1F5F9"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="border-top:1px solid #E2E8F0"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="border-bottom:1px solid #F1F5F9"],
html[data-theme="dark"] :not(.sb-turquoise-card):not(.sb-card-inner):not(.sb-card-inner *)[style*="border-bottom:1px solid #E2E8F0"] {
    border-color: #263A57 !important;
}

/* Keep QR pass inner white card crisp & scannable even in Dark Mode */
html[data-theme="dark"] .sb-card-inner {
    background: #FFFFFF !important;
    color: #0F172A !important;
}

/* Home page upcoming events gradient in Dark Mode */
html[data-theme="dark"] section[style*="#EBF9F8"] {
    background: linear-gradient(180deg, #0E1B2E 0%, #0B1322 100%) !important;
}

/* ============================================================
   Live Animated QR Pass Frame (Anti-Screenshot Visual Security)
   Unmistakable orbiting glowing beam + pulsing live clock badge
   ============================================================ */
.sb-qr-live-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 26px;
    overflow: hidden;
    background: #CBD5E1;
    box-shadow: 0 0 0 2px rgba(78, 193, 189, 0.3), 0 14px 34px rgba(15, 23, 42, 0.18);
    isolation: isolate;
}

.sb-qr-live-wrap::before {
    content: "";
    position: absolute;
    width: 180%;
    height: 180%;
    top: -40%;
    left: -40%;
    background: conic-gradient(
        from 0deg,
        rgba(78, 193, 189, 0.12) 0deg,
        rgba(78, 193, 189, 0.12) 85deg,
        #0284C7 140deg,
        #10B981 190deg,
        #4EC1BD 240deg,
        #F59E0B 295deg,
        #10B981 335deg,
        rgba(78, 193, 189, 0.12) 360deg
    );
    animation: sbQrOrbitSpin 2.2s linear infinite;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.sb-qr-live-inner {
    position: relative;
    z-index: 1;
    background: #FFFFFF;
    border-radius: 19px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.sb-qr-live-inner img {
    width: 210px;
    height: 210px;
    max-width: 100%;
    display: block;
    border-radius: 8px;
}

@keyframes sbQrOrbitSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sb-live-clock-bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ECFDF5 0%, #EBF9F8 100%);
    border: 1.5px solid #10B981;
    color: #065F46;
    font-weight: 800;
    font-size: 0.85rem;
}

.sb-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: sbLivePulse 1.3s ease-out infinite;
    flex-shrink: 0;
}

@keyframes sbLivePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.75);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 9px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.sb-live-clock-time {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-flex;
    align-items: baseline;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 900;
    color: #0F172A;
    font-size: 0.98rem;
    letter-spacing: 0.4px;
}

.sb-live-clock-ms {
    color: #059669;
    font-size: 0.88rem;
    font-weight: 900;
    min-width: 3.2ch;
    display: inline-block;
    text-align: left;
}

.sb-live-clock-ampm {
    font-family: 'Cairo', 'Plus Jakarta Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 900;
    color: #065F46;
    margin-inline-start: 4px;
}

/* Clickable Top-Bar User Profile Avatar + Name */
.sb-appbar-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px 3px 4px;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    border: 1.5px solid rgba(78, 193, 189, 0.35);
    background: rgba(78, 193, 189, 0.08);
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
    cursor: pointer;
}

[dir="rtl"] .sb-appbar-profile-btn {
    padding: 3px 4px 3px 10px;
}

.sb-appbar-profile-btn:hover {
    background: rgba(78, 193, 189, 0.18);
    border-color: #4EC1BD;
    transform: translateY(-1px);
}

.sb-appbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4EC1BD;
    flex-shrink: 0;
    display: block;
}

.sb-appbar-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4EC1BD, #2D8C89);
    color: #FFFFFF;
    font-weight: 900;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(78, 193, 189, 0.4);
}

.sb-appbar-profile-name {
    font-size: 0.86rem;
    font-weight: 800;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 599px) {
    .sb-appbar-profile-btn,
    [dir="rtl"] .sb-appbar-profile-btn {
        padding: 2px;
        gap: 0;
    }
}

html.sb-dark .sb-appbar-profile-btn {
    background: rgba(78, 193, 189, 0.14);
    border-color: rgba(86, 204, 199, 0.4);
    color: #F8FAFC;
}

html.sb-dark .sb-appbar-profile-btn:hover {
    background: rgba(78, 193, 189, 0.26);
    border-color: #56CCC7;
}

/* ============================================================
   Distinct Clickable Pill Tabs (Light & Dark Mode)
   Makes every tab unmistakably look like a tappable button
   ============================================================ */
.mud-tabs .mud-tabs-tabbar,
.mud-tabs .mud-tabs-tabbar-primary {
    background: #F1F5F9 !important;
    background-color: #F1F5F9 !important;
    padding: 4px 6px !important;
    border-radius: 16px 16px 0 0 !important;
    border-bottom: 1px solid #E2E8F0 !important;
}

.mud-tabs .mud-tabs-tabbar-content {
    padding: 4px 4px !important;
}

.mud-tabs .mud-tabs-tabbar-wrapper {
    gap: 10px !important;
    align-items: center;
    padding: 2px 2px;
}

.mud-tabs .mud-tab {
    border-radius: 12px !important;
    min-height: 44px !important;
    padding: 8px 18px !important;
    font-weight: 800 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    background: #FFFFFF !important;
    color: #334155 !important;
    border: 1.5px solid #CBD5E1 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

.mud-tabs .mud-tab .mud-icon-root {
    color: #359E9A !important;
    transition: color 0.18s ease !important;
}

.mud-tabs .mud-tab:not(.mud-tab-active):hover {
    background: #EBF9F8 !important;
    border-color: #4EC1BD !important;
    color: #0F766E !important;
    box-shadow: 0 4px 12px rgba(78, 193, 189, 0.2) !important;
    transform: translateY(-1px);
}

.mud-tabs .mud-tab.mud-tab-active,
.mud-tabs .mud-tab.mud-tab-active:hover {
    background: linear-gradient(135deg, #4EC1BD 0%, #359E9A 100%) !important;
    color: #FFFFFF !important;
    border: 1.5px solid #359E9A !important;
    box-shadow: 0 6px 16px rgba(78, 193, 189, 0.34) !important;
}

.mud-tabs .mud-tab.mud-tab-active .mud-icon-root {
    color: #FFFFFF !important;
}

.mud-tabs .mud-tab-slider {
    display: none !important;
}

/* Dark Mode Pill Tabs */
html[data-theme="dark"] .mud-tabs .mud-tabs-tabbar,
html[data-theme="dark"] .mud-tabs .mud-tabs-tabbar-primary {
    background: rgba(11, 19, 34, 0.92) !important;
    background-color: rgba(11, 19, 34, 0.92) !important;
    border-bottom-color: rgba(78, 193, 189, 0.22) !important;
}

html[data-theme="dark"] .mud-tabs .mud-tab {
    background: rgba(24, 38, 61, 0.94) !important;
    color: #E2E8F0 !important;
    border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .mud-tabs .mud-tab .mud-icon-root {
    color: #5FD3CF !important;
}

html[data-theme="dark"] .mud-tabs .mud-tab:not(.mud-tab-active):hover {
    background: rgba(78, 193, 189, 0.16) !important;
    border-color: #4EC1BD !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(78, 193, 189, 0.24) !important;
}

html[data-theme="dark"] .mud-tabs .mud-tab.mud-tab-active,
html[data-theme="dark"] .mud-tabs .mud-tab.mud-tab-active:hover {
    background: linear-gradient(135deg, #4EC1BD 0%, #2D8C89 100%) !important;
    color: #FFFFFF !important;
    border: 1.5px solid #5FD3CF !important;
    box-shadow: 0 6px 18px rgba(78, 193, 189, 0.38) !important;
}

html[data-theme="dark"] .mud-tabs .mud-tab.mud-tab-active .mud-icon-root {
    color: #FFFFFF !important;
}
