/* ============================================================
   ADMIN PORTAL — REUSABLE UI COMPONENTS (Rule #1 & Rule #2)
   Standardized Buttons, Badges, Tables, Forms, Modals & 5-Tier Grids
   ============================================================ */

/* ─── 1. Buttons (Standardized Design System) ─────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary, #6366f1), var(--primary-hover, #818cf8));
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary, #cbd5e1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #f8fafc);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: var(--danger-bg, rgba(239, 68, 68, 0.15));
    color: var(--danger, #ef4444);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: rgba(16, 185, 129, 0.25);
    color: #ffffff;
}

.btn-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: rgba(245, 158, 11, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 8px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 12px;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    pointer-events: none;
}

/* ─── 2. Badges & Status Indicators ───────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-success, .badge-status.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning, .badge-status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-danger, .badge-status.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-primary, .badge-status.info {
    background: var(--primary-glow, rgba(99, 102, 241, 0.15));
    color: var(--primary-light, #818cf8);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.badge-muted, .badge-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted, #94a3b8);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.text-status-configured {
    color: #34d399;
    font-size: 11px;
    margin-left: 6px;
}

.text-status-unset {
    color: #f87171;
    font-size: 11px;
    margin-left: 6px;
}

/* ─── 3. Form Controls & Inputs ───────────────────────────────── */
.form-group {
    margin-bottom: 16px;
}

.form-group-spaced {
    margin-bottom: 20px;
}

.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-label,
.input-label-semibold {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #cbd5e1);
    margin-bottom: 6px;
}

.form-control,
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary, #f8fafc);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-control:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary, #6366f1);
    box-shadow: 0 0 0 3px var(--primary-glow, rgba(99, 102, 241, 0.15));
}

/* Global Select & Option Styling for Dark Theme */
select {
    color-scheme: dark;
}

select option,
select.form-control option,
select.margin-type-select option,
.margin-type-select option,
.product-filter-select option,
.user-filter-select option,
.user-form-input option,
.val-select-input option,
.topup-select option,
.ws-select option,
.ws-input option {
    background-color: #1e2235 !important;
    color: #f8fafc !important;
    padding: 8px 12px;
}

select option:checked,
select option:hover {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* ─── 4. Tables ───────────────────────────────────────────────── */
.table-wrapper,
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(22, 24, 34, 0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: rgba(255, 255, 255, 0.02);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    color: var(--text-secondary, #cbd5e1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-primary, #f8fafc);
}

/* ─── 5. Modal Dialogs ────────────────────────────────────────── */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.admin-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.admin-modal-dialog {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.1);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal-overlay.active .admin-modal-dialog {
    transform: scale(1);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.admin-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.admin-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.admin-modal-body {
    padding: 1.5rem;
}

.admin-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

/* ─── 6. Stat Cards & Icon Badges ─────────────────────────────── */
.admin-stat-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.admin-stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
}

.admin-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f8fafc;
}

.card-action-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon-badge.gold {
    background: rgba(221, 175, 49, 0.15);
    color: #ddaf31;
}

.card-icon-badge.indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.spinner-accent-ring {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-bottom: 12px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ─── 7. Toast Notifications (Delegated to Core ToastModule.css) ─── */
/* Fully dynamic: positions, themes, animations, durations, progress bars handled by @engine/ToastModule.css */

/* ─── 8. Reusable Grid Utilities & 5-Tier Responsive System ───── */
.content-grid {
    display: grid;
    gap: 24px;
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

/* Tier 1: 4K & Ultra-wide (1920px+) */
@media (min-width: 1920px) {
    .admin-modal-dialog {
        max-width: 680px;
    }
    .admin-stat-value {
        font-size: 2.25rem;
    }
    .grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tier 2: Standard Desktop & Laptop (1280px - 1919px) */
@media (min-width: 1280px) and (max-width: 1919px) {
    /* Handled by base grid classes */
}

/* Tier 3: Tablet Devices (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .admin-modal-dialog {
        max-width: 520px;
    }
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* Tier 4: Mobile Landscape & Small Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .admin-modal-dialog {
        width: 95%;
        margin: 10px;
    }
    .admin-modal-header,
    .admin-modal-body,
    .admin-modal-footer {
        padding: 1rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    .dashboard-grid,
    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* Tier 5: Mobile Portrait (320px - 480px) */
@media (max-width: 480px) {
    .admin-modal-dialog {
        width: 98%;
        border-radius: 12px;
    }
    .admin-modal-footer {
        flex-direction: column;
        width: 100%;
    }
    .admin-modal-footer button {
        width: 100%;
    }
    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}


/* ─── 9. Accessible Command Palette (Ctrl+K / ⌘K) ──────────────── */
.cc-command-palette-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: none;
    padding: 0;
    background: transparent;
    width: 620px;
    max-width: calc(100vw - 32px);
    margin: 10vh auto auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.12);
    color: var(--cc-text-primary, #f8fafc);
    z-index: 1100;
}

.cc-command-palette-dialog::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.cc-palette-shell {
    background: #0f172a;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cc-palette-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(30, 41, 59, 0.6);
}

.cc-palette-search-icon {
    color: #6366f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cc-palette-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #f8fafc;
    font-family: inherit;
}

.cc-palette-input::placeholder {
    color: #64748b;
}

.cc-palette-shortcut-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cc-palette-results-wrapper {
    max-height: 380px;
    overflow-y: auto;
    padding: 8px;
}

.cc-palette-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cc-palette-group-header {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    padding: 10px 14px 4px;
    list-style: none;
}

.cc-palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.12s ease;
    list-style: none;
    color: #e2e8f0;
}

.cc-palette-item:hover,
.cc-palette-item.is-selected {
    background: rgba(99, 102, 241, 0.18);
    color: #ffffff;
}

.cc-palette-item.is-selected .cc-palette-item-icon {
    color: #818cf8;
    transform: scale(1.08);
}

.cc-palette-item-icon {
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.12s ease;
}

.cc-palette-item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cc-palette-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-palette-item-sub {
    font-size: 0.74rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.cc-palette-item-enter {
    opacity: 0;
    color: #818cf8;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.12s ease;
}

.cc-palette-item.is-selected .cc-palette-item-enter {
    opacity: 1;
}

.cc-palette-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 0.88rem;
    text-align: center;
    list-style: none;
}

.cc-palette-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 10px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.8);
    font-size: 0.75rem;
    color: #64748b;
}

.cc-palette-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cc-palette-hint kbd,
.cc-drawer-hint kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.68rem;
    font-family: inherit;
    color: var(--cc-text-primary, #f8fafc);
}

/* ─── 10. Non-Modal Record Inspector Drawer (J/K Ergonomics) ────── */
.cc-inspector-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.cc-inspector-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.cc-inspector-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 540px;
    max-width: 100vw;
    background: var(--cc-bg-surface, #0f172a);
    border-left: 1px solid var(--cc-border, rgba(255, 255, 255, 0.08));
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.7);
    z-index: 1060;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cc-inspector-drawer.is-open {
    transform: translateX(0);
}

body.cc-inspector-open {
    overflow: hidden;
}

.cc-drawer-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.cc-drawer-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--cc-border, rgba(255, 255, 255, 0.08));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.cc-drawer-header-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cc-drawer-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cc-text-primary, #f8fafc);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-drawer-subtitle {
    font-size: 0.78rem;
    color: var(--cc-text-muted, #94a3b8);
    margin-top: 3px;
    font-family: monospace;
}

.cc-drawer-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cc-drawer-nav-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.cc-drawer-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cc-border, rgba(255, 255, 255, 0.08));
    color: var(--cc-text-muted, #94a3b8);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cc-drawer-nav-group .cc-drawer-icon-btn {
    border: none;
    border-radius: 0;
    background: transparent;
}

.cc-drawer-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.cc-drawer-close-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.cc-drawer-tabs {
    display: flex;
    gap: 4px;
    padding: 6px 20px 0;
    border-bottom: 1px solid var(--cc-border, rgba(255, 255, 255, 0.08));
    background: rgba(15, 23, 42, 0.6);
    flex-shrink: 0;
}

.cc-drawer-tab {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--cc-text-muted, #94a3b8);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cc-drawer-tab:hover {
    color: var(--cc-text-primary, #f8fafc);
}

.cc-drawer-tab.is-active {
    color: #818cf8;
    border-bottom-color: #6366f1;
}

.cc-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
}

.cc-drawer-tab-pane {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cc-drawer-fields-list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cc-drawer-field-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cc-drawer-field-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cc-text-muted, #94a3b8);
}

.cc-drawer-field-value {
    font-size: 0.9rem;
    color: var(--cc-text-primary, #f8fafc);
    margin: 0;
    word-break: break-word;
}

.cc-drawer-val-empty {
    color: rgba(148, 163, 184, 0.45);
    font-style: italic;
}

.cc-drawer-inline-json {
    background: rgba(0, 0, 0, 0.35);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.cc-drawer-json-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cc-drawer-json-size {
    font-size: 0.78rem;
    color: #94a3b8;
    font-family: monospace;
}

.cc-drawer-json-code {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--cc-border, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: 16px;
    font-family: monospace;
    font-size: 0.82rem;
    color: #a5b4fc;
    max-height: 520px;
    overflow: auto;
    line-height: 1.55;
    margin: 0;
}

.cc-drawer-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.88rem;
}

.cc-drawer-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cc-drawer-activity-item {
    display: flex;
    gap: 14px;
    position: relative;
}

.cc-drawer-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6366f1;
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.cc-drawer-activity-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.cc-drawer-activity-action {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f8fafc;
}

.cc-drawer-activity-details {
    font-size: 0.8rem;
    color: #94a3b8;
}

.cc-drawer-activity-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
}

.cc-drawer-footer {
    padding: 12px 22px;
    border-top: 1px solid var(--cc-border, rgba(255, 255, 255, 0.08));
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--cc-text-muted, #94a3b8);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .cc-inspector-drawer {
        width: 100vw;
    }
    .cc-command-palette-dialog {
        width: 95vw;
        margin-top: 6vh;
    }
}
