/* ==========================================================================
   PLANOO ROOT CONTROL SYSTEM — SUPER ADMIN FRONTEND STYLES
   Design System: iOS 27 Liquid Glass / Planoo Native
   Strict adherence to DESIGN_SYSTEM.md: Translucent frosted glass surfaces,
   physical springs, crisp white typography, dynamic wallpaper passthrough.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Settings Menu Integration: Strictly Hidden for Regular Users
   -------------------------------------------------------------------------- */
#settingsCategoryRootAdmin {
    display: none !important;
}

#settingsCategoryRootAdmin.is-visible {
    display: flex !important;
}

/* --------------------------------------------------------------------------
   1. Root Screen Container & Layout (Liquid Glass Passthrough)
   -------------------------------------------------------------------------- */

#rootAdminScreen,
.root-admin-screen {
    display: none;
    flex-direction: column;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    min-height: 100% !important;
    min-height: 100dvh !important;
    position: fixed !important;
    inset: 0 !important;
    box-sizing: border-box !important;
    background: transparent !important;
    color: #ffffff;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding-bottom: 0 !important;
    margin: 0 !important;
    z-index: 100;
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#rootAdminScreen::-webkit-scrollbar,
.root-admin-screen::-webkit-scrollbar {
    display: none !important;
}

#rootAdminScreen.is-active,
.root-admin-screen.is-active {
    display: flex !important;
}

/* Super Admin Desktop Expansion: unlock full dashboard width */
body.is-root-admin .mobile-app,
.mobile-app.is-root-admin,
body:has(.root-admin-screen.is-active) .mobile-app,
.mobile-app:has(.root-admin-screen.is-active) {
    max-width: 1200px !important;
    width: 100% !important;
}

body.is-root-admin #react-bottom-nav-root,
body.is-root-admin .bottom-nav,
body:has(.root-admin-screen.is-active) #react-bottom-nav-root,
body:has(.root-admin-screen.is-active) .bottom-nav,
.mobile-app:has(.root-admin-screen.is-active) #react-bottom-nav-root,
.mobile-app:has(.root-admin-screen.is-active) .bottom-nav {
    display: none !important;
}

/* Scroll Container */
.root-admin-scroll {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    container-type: inline-size;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0 16px calc(env(safe-area-inset-bottom, 16px) + 24px) !important;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.root-admin-scroll::-webkit-scrollbar {
    display: none !important;
}

/* --------------------------------------------------------------------------
   2. Header & Top Controls
   -------------------------------------------------------------------------- */

.root-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(env(safe-area-inset-top, 16px) + 8px) 16px 14px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 30;
    background: transparent;
}

.root-admin-title-col {
    display: flex;
    flex-direction: column;
}

.root-admin-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.15;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.root-admin-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 3px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.root-admin-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.root-glass-circle-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform 0.15s cubic-bezier(0.23, 1, 0.32, 1), background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.root-glass-circle-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   3. Segmented Control Switcher (Planoo Capsule)
   -------------------------------------------------------------------------- */

.root-nav-capsule {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    margin-bottom: 20px;
    box-sizing: border-box;
    width: 100%;
}

.root-nav-capsule .root-nav-btn {
    flex: 1;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    white-space: nowrap;
    padding: 0 8px;
    -webkit-tap-highlight-color: transparent;
}

.root-nav-capsule .root-nav-btn:active {
    transform: scale(0.96);
}

.root-nav-capsule .root-nav-btn.is-active {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.root-badge-count {
    background: #ff453a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 2px;
}

/* --------------------------------------------------------------------------
   4. Tab Panels Animation & Layout
   -------------------------------------------------------------------------- */

.root-tab-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.root-tab-panel.is-active {
    display: flex;
    animation: fadeInTab 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}

#rootTab-support {
    flex: 1 1 0% !important;
    min-height: calc(100dvh - 160px) !important;
    height: calc(100dvh - 160px) !important;
    gap: 0 !important;
    display: none;
    flex-direction: column !important;
}

#rootTab-support.is-active {
    display: flex !important;
}

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

/* --------------------------------------------------------------------------
   5. Dashboard Metric Cards (iOS 27 Liquid Glass)
   -------------------------------------------------------------------------- */

.root-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.root-kpi-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.root-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.root-kpi-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.65);
}

.root-kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.root-kpi-value {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.1;
    color: #ffffff;
    margin: 4px 0 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.root-kpi-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    flex-wrap: wrap;
}

.root-kpi-tag {
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
}

.tag-green {
    background: rgba(48, 209, 88, 0.2);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.3);
}

.tag-orange {
    background: rgba(255, 159, 10, 0.2);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.3);
}

.tag-red {
    background: rgba(255, 69, 58, 0.2);
    color: #ff453a;
    border: 1px solid rgba(255, 69, 58, 0.3);
}

/* --------------------------------------------------------------------------
   6. Tenants Directory (Liquid Glass Cards & Inputs)
   -------------------------------------------------------------------------- */

.root-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

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

.root-search-input-wrapper i,
.root-search-input-wrapper svg {
    position: absolute;
    left: 14px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.root-search-input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 42px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease;
    font-family: inherit;
}

.root-search-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.root-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.root-filter-select {
    height: 44px;
    padding: 0 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13.5px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.root-filter-select option {
    background: #1c2533;
    color: #ffffff;
}

.root-tenants-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.root-tenant-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.root-tenant-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.root-tenant-name {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
}

.status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
}

.status-active {
    background: rgba(48, 209, 88, 0.2);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.3);
}

.status-blocked {
    background: rgba(255, 69, 58, 0.2);
    color: #ff453a;
    border: 1px solid rgba(255, 69, 58, 0.3);
}

.status-suspended {
    background: rgba(255, 159, 10, 0.2);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.3);
}

.root-tenant-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.7);
}

.root-tenant-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.root-tenant-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.btn-root-secondary {
    height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-root-secondary:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.18);
}

.btn-root-impersonate {
    height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    background: rgba(10, 132, 255, 0.3);
    border: 1px solid rgba(10, 132, 255, 0.5);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(10, 132, 255, 0.25);
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-root-impersonate:active {
    transform: scale(0.96);
    background: rgba(10, 132, 255, 0.45);
}

/* --------------------------------------------------------------------------
   7. Support Inbox & Chat Layout
   -------------------------------------------------------------------------- */

.root-support-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 14px;
    flex: 1 1 0% !important;
    min-height: calc(100dvh - 165px) !important;
    height: calc(100dvh - 165px) !important;
    max-height: calc(100dvh - 165px) !important;
    background: rgba(22, 30, 42, 0.65) !important;
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
}

.root-support-inbox {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.12);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.root-support-inbox-header {
    flex-shrink: 0;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.root-support-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.root-support-item {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid transparent;
}

.root-support-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.root-support-item.is-selected {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.2);
}

.root-support-item-header,
.root-support-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.root-support-item-name,
.root-support-user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
}

.root-support-salon-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.root-support-item-time,
.root-support-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.root-support-item-preview,
.root-support-snippet {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.root-support-chat {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.08);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.root-support-chat-header {
    flex-shrink: 0;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 52px;
    gap: 12px;
    box-sizing: border-box;
}

.root-support-chat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.root-support-chat-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.root-support-chat-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.root-support-messages-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.support-bubble-user {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.support-bubble-support {
    align-self: flex-end;
    background: rgba(10, 132, 255, 0.4);
    color: #ffffff;
    border: 1px solid rgba(10, 132, 255, 0.5);
}

.support-bubble-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    text-align: right;
}

/* Support Attachments & Media Previews */
.root-support-attachments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    max-width: 420px;
}

.root-support-img-thumb {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.2s, border-color 0.2s;
    user-select: none;
    flex-shrink: 0;
}

.root-support-img-thumb.is-single {
    width: 220px;
    height: 180px;
}

.root-support-img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    transition: transform 0.25s ease;
}

.root-support-img-thumb:hover {
    transform: scale(1.03);
    border-color: rgba(100, 210, 255, 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.root-support-img-thumb:hover img {
    transform: scale(1.05);
}

.root-support-img-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s ease;
    color: #ffffff;
}

.root-support-img-thumb:hover .root-support-img-hover-overlay {
    opacity: 1;
}

.root-support-docs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.root-support-doc-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: #64d2ff;
    text-decoration: none;
    font-size: 12.5px;
    max-width: 100%;
    transition: background 0.18s, border-color 0.18s;
}

.root-support-doc-pill:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(100, 210, 255, 0.4);
}

.root-support-doc-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.root-support-doc-size {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

.root-support-reply-bar {
    flex-shrink: 0 !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(16, 22, 32, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-sizing: border-box;
}

.root-support-textarea {
    flex: 1;
    height: 42px;
    min-height: 42px;
    max-height: 120px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 14px;
    outline: none;
    resize: none;
    font-family: inherit;
    box-sizing: border-box;
    line-height: 1.4;
}

.root-support-send-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(10, 132, 255, 0.4);
    border: 1px solid rgba(10, 132, 255, 0.5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.root-support-send-btn:active {
    transform: scale(0.92);
}

.root-support-closed-notice {
    flex-shrink: 0 !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(22, 28, 38, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-sizing: border-box;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.root-support-item.has-unread {
    border-left: 3px solid #0a84ff;
    background: rgba(10, 132, 255, 0.08);
}

.root-support-unread-badge {
    background: #0a84ff;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(10, 132, 255, 0.4);
}

.root-support-status-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
}

.root-support-status-pill.is-closed {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.55);
}

.root-support-status-pill.is-unread {
    background: rgba(10, 132, 255, 0.2);
    color: #64d2ff;
}

.root-support-status-pill.is-open {
    background: rgba(48, 209, 88, 0.18);
    color: #30d158;
}

.root-support-snippet.is-unread {
    font-weight: 600;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   8. System Health & Audit Logs (Liquid Glass)
   -------------------------------------------------------------------------- */

.root-section-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

.root-section-header {
    margin-bottom: 14px;
}

.root-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.root-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.root-health-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.root-health-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.root-health-status {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

.root-audit-table-wrapper {
    overflow-x: auto;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.root-audit-table-wrapper::-webkit-scrollbar {
    display: none !important;
}

.root-audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #ffffff;
}

.root-audit-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.root-audit-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
}

/* --------------------------------------------------------------------------
   9. Modals (Glass Bottom Sheet & Overlays)
   -------------------------------------------------------------------------- */

.root-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.root-modal-overlay.is-open {
    display: flex;
    animation: fadeInModal 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.root-modal-card {
    background: rgba(22, 30, 42, 0.85);
    backdrop-filter: blur(36px) saturate(180%);
    -webkit-backdrop-filter: blur(36px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #ffffff;
}

.root-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.root-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.root-modal-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.root-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 70vh;
}

/* --------------------------------------------------------------------------
   10. Mobile Responsiveness (390px Viewport)
   -------------------------------------------------------------------------- */

.root-support-back-btn {
    display: none;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    margin-right: 8px;
}

@media (max-width: 860px) {
    .root-admin-header {
        padding: calc(env(safe-area-inset-top, 16px) + 6px) 16px 12px;
    }
    .root-admin-title {
        font-size: 26px;
    }
    .root-nav-capsule .root-nav-btn {
        font-size: 12.5px;
        padding: 0 4px;
    }
    .root-metrics-grid {
        grid-template-columns: 1fr;
    }
    .root-support-layout {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
    }
    .root-support-inbox {
        width: 100% !important;
        flex: 1 1 0% !important;
        border-right: none !important;
        display: flex !important;
    }
    .root-support-chat {
        width: 100% !important;
        flex: 1 1 0% !important;
        display: none !important;
    }
    .root-support-layout.is-chat-open .root-support-inbox {
        display: none !important;
    }
    .root-support-layout.is-chat-open .root-support-chat {
        display: flex !important;
    }
    .root-support-back-btn {
        display: inline-flex !important;
    }
    .root-search-bar {
        flex-direction: column;
    }
}

@container (max-width: 720px) {
    .root-support-layout {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
    }
    .root-support-inbox {
        width: 100% !important;
        flex: 1 1 0% !important;
        border-right: none !important;
        display: flex !important;
    }
    .root-support-chat {
        width: 100% !important;
        flex: 1 1 0% !important;
        display: none !important;
    }
    .root-support-layout.is-chat-open .root-support-inbox {
        display: none !important;
    }
    .root-support-layout.is-chat-open .root-support-chat {
        display: flex !important;
    }
    .root-support-back-btn {
        display: inline-flex !important;
    }
}


/* Compact / Mobile Single-Column Support Messenger */
.root-support-layout.is-compact-mode {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
}

.root-support-layout.is-compact-mode .root-support-inbox {
    width: 100% !important;
    flex: 1 1 0% !important;
    height: 100% !important;
    border-right: none !important;
    display: flex !important;
}

.root-support-layout.is-compact-mode .root-support-chat {
    width: 100% !important;
    flex: 1 1 0% !important;
    height: 100% !important;
    display: none !important;
}

.root-support-layout.is-compact-mode.is-chat-open .root-support-inbox {
    display: none !important;
}

.root-support-layout.is-compact-mode.is-chat-open .root-support-chat {
    display: flex !important;
}

.root-support-layout.is-compact-mode .root-support-back-btn {
    display: inline-flex !important;
}

/* --------------------------------------------------------------------------
   GLOBAL STICKY IMPERSONATION BANNER (iOS Liquid Glass Floating Capsule)
   -------------------------------------------------------------------------- */

.impersonation-global-bar {
    position: fixed;
    top: calc(env(safe-area-inset-top, 8px) + 6px);
    left: 12px;
    right: 12px;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px 8px 14px;
    background: rgba(22, 28, 38, 0.9);
    backdrop-filter: blur(32px) saturate(190%);
    -webkit-backdrop-filter: blur(32px) saturate(190%);
    border: 1px solid rgba(255, 69, 58, 0.45);
    border-radius: 9999px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    animation: bannerSlideDown 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.impersonation-global-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.impersonation-shield-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 69, 58, 0.2);
    border: 1px solid rgba(255, 69, 58, 0.4);
    color: #ff453a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.impersonation-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.impersonation-tag {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #ff453a;
    text-transform: uppercase;
    line-height: 1;
}

.impersonation-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.impersonation-global-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 9999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.15s ease;
}

.impersonation-global-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.22);
}

/* Push down screen content so floating banner never obscures header greeting */
body.has-impersonation-banner .screen {
    padding-top: calc(env(safe-area-inset-top, 16px) + 52px) !important;
}

/* Impersonation Modal Custom Elements */
.root-modal-compact {
    max-width: 420px;
    width: calc(100% - 28px);
}

.root-modal-subtext {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.45;
    margin: 0 0 16px;
}

.root-modal-subtext strong {
    color: #ffffff;
}

.root-imp-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.root-imp-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    user-select: none;
}

.root-imp-option:has(input:checked) {
    background: rgba(10, 132, 255, 0.14);
    border-color: rgba(10, 132, 255, 0.5);
}

.root-imp-option input[type="radio"] {
    display: none;
}

.root-imp-radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.root-imp-option:has(input:checked) .root-imp-radio-circle {
    border-color: #0a84ff;
    background-color: #0a84ff;
}

.root-imp-option:has(input:checked) .root-imp-radio-circle::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
}

.root-imp-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.root-imp-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

.root-imp-desc {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.3;
}

.root-btn-full {
    width: 100%;
}

/* Support Items Styling */
.root-support-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.root-support-user-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

.root-support-salon-name {
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
}

.root-support-snippet {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
