/**
 * GilGamez Store Platform — Command Center Styles
 * Adheres strictly to DEVELOPMENT_RULES.md (Rule #6 Responsive Geometry, Rule #18 Modern Ergonomics, Rule #19 Master-Detail Table).
 * Universal 6px Platform Gold Custom Scrollbars (#c5a059).
 */

/* ==========================================================================
   1. Universal Platform-Accent Custom Scrollbars (Rule #18)
   ========================================================================== */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--store-accent-primary, #c5a059) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--store-accent-primary, #c5a059);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--store-accent-hover, #d4af37);
}

/* ==========================================================================
   2. Enterprise Admin Layout & Reset
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background: var(--store-bg-base, #0a0d14);
    color: var(--store-text-primary, #f0f2f5);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.admin-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.admin-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   3. Administrative Header (#admin-header)
   ========================================================================== */
.admin-header {
    height: 64px;
    background: var(--store-surface-1, #111726);
    border-bottom: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--store-text-primary, #f0f2f5);
}

.admin-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-brand-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--store-text-gold, #e5c07b);
}

.version-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(197, 160, 89, 0.15);
    color: var(--store-text-gold, #e5c07b);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.telemetry-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--store-status-success, #2ed573);
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--store-status-success, #2ed573);
    box-shadow: 0 0 8px var(--store-status-success, #2ed573);
    animation: pulse-telemetry 2s infinite ease-in-out;
}

@keyframes pulse-telemetry {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px var(--store-status-success); }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* User identity chip in header */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--store-surface-2, #182032);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    font-size: 13px;
    font-weight: 600;
}

.user-avatar-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--store-accent-primary, #c5a059);
    color: #0a0d14;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

/* ==========================================================================
   4. Administrative Sidebar Navigation (#admin-sidebar)
   ========================================================================== */
.admin-container {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 64px);
    position: relative;
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--store-surface-1, #111726);
    border-right: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    overflow-y: auto;
    position: relative;
    transition: transform 250ms ease;
}

.sidebar-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px 12px;
    border-bottom: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    margin-bottom: 12px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--store-text-muted, #64748b);
    text-transform: uppercase;
}

.sidebar-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--store-text-secondary, #94a3b8);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--store-text-muted, #64748b);
    padding: 6px 10px 2px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--store-radius-sm, 6px);
    font-size: 13px;
    font-weight: 600;
    color: var(--store-text-secondary, #94a3b8);
    text-decoration: none;
    min-height: 44px;
    box-sizing: border-box;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
    border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
    background: var(--store-surface-2, #182032);
    color: var(--store-text-primary, #f0f2f5);
}

.sidebar-nav-item.is-active {
    background: rgba(197, 160, 89, 0.12);
    color: var(--store-text-gold, #e5c07b);
    border-left-color: var(--store-accent-primary, #c5a059);
}

.sidebar-nav-item .icon-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
}

/* ==========================================================================
   5. Main Administrative Workspace (#admin-main)
   ========================================================================== */
.admin-main {
    flex: 1;
    padding: 24px 32px 100px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.admin-app-root {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.admin-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--store-text-muted, #64748b);
    margin-bottom: 12px;
}

.admin-breadcrumbs a {
    color: var(--store-text-secondary, #94a3b8);
    text-decoration: none;
}

.admin-breadcrumbs a:hover {
    color: var(--store-text-gold, #e5c07b);
}

.admin-breadcrumbs .separator {
    color: var(--store-border-medium, rgba(255, 255, 255, 0.15));
}

.admin-breadcrumbs .current {
    color: var(--store-text-primary, #f0f2f5);
    font-weight: 600;
}

.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-page-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--store-text-primary, #f0f2f5);
    margin: 0 0 6px 0;
}

.admin-page-subtitle {
    font-size: 13px;
    color: var(--store-text-secondary, #94a3b8);
    margin: 0;
}

.header-action-deck {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==========================================================================
   6. High-Density Filter Bars & Tabs
   ========================================================================== */
.admin-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--store-surface-1, #111726);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--store-radius-md, 8px);
    padding: 12px 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.filter-group-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    color: var(--store-text-muted, #64748b);
    pointer-events: none;
    display: inline-flex;
}

.search-input-wrapper input {
    background: var(--store-surface-inset, #0c101a);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    color: var(--store-text-primary, #f0f2f5);
    padding: 8px 12px 8px 36px;
    border-radius: var(--store-radius-sm, 6px);
    font-size: 13px;
    min-height: 44px;
    box-sizing: border-box;
    width: 280px;
    transition: border-color 150ms ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--store-accent-primary, #c5a059);
}

.admin-tabs-bar {
    display: inline-flex;
    background: var(--store-surface-inset, #0c101a);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--store-radius-sm, 6px);
    padding: 3px;
    gap: 2px;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.admin-tabs-bar::-webkit-scrollbar {
    display: none;
}

.admin-tab-btn {
    background: transparent;
    border: none;
    color: var(--store-text-secondary, #94a3b8);
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: all 150ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-tab-btn:hover {
    color: var(--store-text-primary, #f0f2f5);
}

.admin-tab-btn.is-active {
    background: var(--store-surface-1, #111726);
    color: var(--store-text-gold, #e5c07b);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   7. Master-Detail Table Accordion Pattern (Rule #18, Rule #19)
   Strictly Zero Horizontal Scroll (overflow-x: visible)
   ========================================================================== */
.table-accordion-wrapper {
    width: 100%;
    background: var(--store-surface-1, #111726);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--store-radius-md, 8px);
    overflow: visible;
    box-sizing: border-box;
}

.table-accordion {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    overflow-x: visible;
    box-sizing: border-box;
}

.table-accordion thead tr {
    background: var(--store-surface-inset, #0c101a);
    border-bottom: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
}

.table-accordion th {
    padding: 10px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--store-text-muted, #64748b);
    text-align: left;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Master row */
.table-row-master {
    height: 56px;
    border-bottom: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    transition: background 150ms ease;
    cursor: pointer;
}

.table-row-master:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table-row-master.is-expanded {
    background: rgba(197, 160, 89, 0.04);
}

.table-accordion th,
.table-accordion td,
.table-row-master td {
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
}

.table-row-master td {
    padding: 10px 6px;
    font-size: 13px;
    vertical-align: middle;
}

.table-accordion .mono {
    display: block;
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.btn-row-expand {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    background: var(--store-surface-inset, #0c101a);
    color: var(--store-text-secondary, #94a3b8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 200ms ease, border-color 150ms ease;
}

.btn-row-expand:hover {
    border-color: var(--store-accent-primary, #c5a059);
    color: var(--store-text-primary, #f0f2f5);
}

.table-row-master.is-expanded .btn-row-expand svg {
    transform: rotate(180deg);
}

/* Detail row */
.table-row-detail {
    display: none;
    background: var(--store-surface-inset, #0c101a);
}

.table-row-detail.is-expanded {
    display: table-row;
}

.table-detail-cell {
    padding: 0 !important;
    border-bottom: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
}

/* CSS Grid 0fr -> 1fr smooth height transition */
.table-detail-collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.table-detail-collapse.is-expanded {
    grid-template-rows: 1fr;
}

.table-detail-inner {
    overflow: hidden;
}

.table-detail-panel {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

.detail-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--store-text-gold, #e5c07b);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.detail-meta-item {
    background: var(--store-surface-1, #111726);
    padding: 12px 16px;
    border-radius: var(--store-radius-sm, 6px);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-meta-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--store-text-muted, #64748b);
}

.detail-meta-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--store-text-primary, #f0f2f5);
    word-break: break-all;
}

.detail-action-deck {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    padding-top: 16px;
}

/* ==========================================================================
   8. Status Badges & Semantic Pills (§5.3)
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.badge-gold {
    background: rgba(197, 160, 89, 0.15);
    color: var(--store-text-gold, #e5c07b);
    border: 1px solid rgba(197, 160, 89, 0.35);
}

.badge-warning {
    background: rgba(230, 126, 34, 0.15);
    color: #f39c12;
    border: 1px solid rgba(230, 126, 34, 0.35);
}

.badge-success {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.35);
}

.badge-cyan {
    background: rgba(0, 210, 211, 0.15);
    color: #00d2d3;
    border: 1px solid rgba(0, 210, 211, 0.35);
}

.badge-neutral {
    background: rgba(149, 165, 166, 0.15);
    color: #bdc3c7;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

.badge-danger {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.35);
}

/* ==========================================================================
   9. Button Tokens & CTAs (<= 24 chars, >= 44px tap target)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--store-radius-sm, 6px);
    font-size: 13px;
    font-weight: 700;
    min-height: 44px;
    box-sizing: border-box;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 150ms ease;
    white-space: nowrap;
}

.btn-sm {
    min-height: 38px;
    padding: 6px 14px;
    font-size: 12px;
}

.btn-xs {
    min-height: 28px;
    padding: 4px 14px;
    font-size: 11px;
    line-height: 20px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--store-accent-primary, #c5a059);
    color: #0a0d14;
    border-color: var(--store-accent-primary, #c5a059);
}

.btn-primary:hover {
    background: var(--store-accent-hover, #d4af37);
    border-color: var(--store-accent-hover, #d4af37);
}

.btn-outline {
    background: transparent;
    border-color: var(--store-border-medium, rgba(255, 255, 255, 0.15));
    color: var(--store-text-primary, #f0f2f5);
}

.btn-outline:hover {
    border-color: var(--store-accent-primary, #c5a059);
    color: var(--store-text-gold, #e5c07b);
}

.btn-danger {
    background: rgba(255, 71, 87, 0.15);
    border-color: rgba(255, 71, 87, 0.4);
    color: #ff4757;
}

.btn-danger:hover {
    background: #ff4757;
    color: #ffffff;
}

/* ==========================================================================
   10. Gateway Console Cards & Routing Policies (/gateways)
   ========================================================================== */
.routing-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.routing-mode-card {
    background: var(--store-surface-1, #111726);
    border: 2px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--store-radius-md, 8px);
    padding: 18px 20px;
    cursor: pointer;
    transition: all 150ms ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

.routing-mode-card:hover {
    border-color: var(--store-border-medium, rgba(255, 255, 255, 0.2));
}

.routing-mode-card.is-selected {
    border-color: var(--store-accent-primary, #c5a059);
    background: rgba(197, 160, 89, 0.05);
}

.mode-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mode-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--store-text-primary, #f0f2f5);
}

.mode-card-desc {
    font-size: 12px;
    color: var(--store-text-secondary, #94a3b8);
    line-height: 1.45;
}

.gateway-failover-deck {
    background: var(--store-surface-1, #111726);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--store-radius-md, 8px);
    padding: 20px;
    margin-bottom: 24px;
}

.gateway-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: var(--store-radius-sm, 6px);
    background: var(--store-surface-inset, #0c101a);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    margin-bottom: 10px;
    gap: 14px;
    flex-wrap: wrap;
}

.gateway-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.priority-rank-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.15);
    color: var(--store-text-gold, #e5c07b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.gateway-title-group {
    display: flex;
    flex-direction: column;
}

.gateway-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--store-text-primary, #f0f2f5);
}

.gateway-meta-sub {
    font-size: 12px;
    color: var(--store-text-muted, #64748b);
}

.gateway-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   11. Provider Saldo & Telemetry Deck (/providers)
   ========================================================================== */
.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.provider-card {
    background: var(--store-surface-1, #111726);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--store-radius-md, 8px);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.provider-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.provider-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--store-text-primary, #f0f2f5);
    margin: 0 0 4px 0;
}

.provider-balance-deck {
    background: var(--store-surface-inset, #0c101a);
    padding: 14px 16px;
    border-radius: var(--store-radius-sm, 6px);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.balance-metric-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--store-text-muted, #64748b);
}

.balance-metric-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--store-text-gold, #e5c07b);
}

.provider-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--store-text-secondary, #94a3b8);
}

/* ==========================================================================
   12. Immutable General Ledger Deck (/ledger)
   ========================================================================== */
.ledger-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.ledger-kpi-card {
    background: var(--store-surface-1, #111726);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--store-radius-md, 8px);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--store-text-muted, #64748b);
}

.kpi-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--store-text-primary, #f0f2f5);
}

/* ==========================================================================
   13. Sticky Command Deck Slot (#admin-footer-slot)
   ========================================================================== */
.admin-footer-slot {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--store-surface-1, #111726);
    border-top: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    z-index: 90;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.footer-status-msg {
    font-size: 13px;
    color: var(--store-text-secondary, #94a3b8);
    margin-right: auto;
}

/* ==========================================================================
   14. Empty States & Feedback Blocks
   ========================================================================== */
.store-empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--store-surface-1, #111726);
    border: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--store-radius-md, 8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--store-text-primary, #f0f2f5);
    margin: 0;
}

.empty-state-desc {
    font-size: 13px;
    color: var(--store-text-secondary, #94a3b8);
    max-width: 440px;
    margin: 0 0 10px 0;
}

/* Monospace font utility */
.mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ==========================================================================
   15. 4-Viewport Responsive Design (Rule #6)
   Breakpoints: 360px, 768px, 1280px, 1920px
   ========================================================================== */

/* Responsive Table Column Utilities */
.col-mobile-hide {
    display: table-cell;
}

.col-tablet-hide {
    display: table-cell;
}

.col-desktop-only {
    display: table-cell;
}

.col-mobile-only {
    display: none !important;
}

.col-tablet-only {
    display: none !important;
}

/* Tablet & Smaller (< 1280px) */
@media (max-width: 1279px) {
    .col-tablet-hide,
    .col-desktop-only {
        display: none !important;
    }

    .col-tablet-only {
        display: block !important;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .col-mobile-hide {
        display: none !important;
    }

    .col-mobile-only {
        display: table-cell !important;
    }

    .table-accordion th,
    .table-row-master td {
        padding: 8px 4px;
    }

    .table-accordion th.col-order-head {
        width: 60% !important;
    }

    .table-accordion th.col-total-head {
        width: 40% !important;
        text-align: right !important;
    }

    .table-accordion th.col-journal-head {
        width: 62% !important;
    }

    .table-accordion th.col-amount-head {
        width: 38% !important;
        text-align: right !important;
    }

    .admin-main {
        padding: 16px 16px 90px;
    }

    .admin-header {
        padding: 0 16px;
    }

    .header-brand-group .admin-brand-title {
        font-size: 14px;
    }

    .telemetry-status-pill .status-label {
        display: none;
    }

    .telemetry-status-pill {
        padding: 6px;
    }

    .admin-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group-left,
    .filter-group-right {
        width: 100%;
    }

    .search-input-wrapper {
        width: 100%;
    }

    .search-input-wrapper input {
        width: 100% !important;
    }

    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .admin-footer-slot {
        padding: 0 16px;
    }
}

/* Tablet & Mobile Off-Canvas Sidebar (< 1024px) */
@media (max-width: 1023px) {
    .sidebar-toggle-btn {
        display: inline-flex;
    }

    .admin-sidebar {
        position: fixed;
        top: 64px;
        bottom: 0;
        left: 0;
        z-index: 1000;
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }
}

/* Wide Desktop (>= 1280px) */
@media (min-width: 1280px) {
    .admin-app-root {
        max-width: 1440px;
    }
}

/* Ultra-Wide (>= 1920px) */
@media (min-width: 1920px) {
    .admin-app-root {
        max-width: 1720px;
    }
}

/* ==========================================================================
   16. Accessible Confirmation Modal & Dialogs (§7.1)
   ========================================================================== */
dialog.cmc-confirm-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    background: var(--store-surface-2, #192237);
    color: var(--store-text-primary, #f0f2f5);
    border: 1px solid var(--store-border-medium, rgba(255, 255, 255, 0.15));
    border-radius: var(--store-radius-lg, 12px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
    width: 90%;
    max-width: 480px;
    z-index: 1100;
    box-sizing: border-box;
    overflow: hidden;
}

dialog.cmc-confirm-dialog::backdrop {
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cmc-confirm-dialog .cmc-modal-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.cmc-confirm-dialog .cmc-modal-header {
    border-bottom: 1px solid var(--store-border-subtle, rgba(255, 255, 255, 0.08));
    padding-bottom: 12px;
}

.cmc-confirm-dialog .cmc-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--store-text-primary, #f0f2f5);
    margin: 0;
}

.cmc-confirm-dialog .cmc-modal-body p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--store-text-secondary, #94a3b8);
    margin: 0;
}

.cmc-confirm-dialog .cmc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.btn-confirm-action {
    font-weight: 700;
}

.btn-cancel-action {
    font-weight: 600;
}
