/* ==========================================================================
   NexusAI Token Store — Clean Developer Console UI (Opsi 1)
   Aesthetic: Monochrome High-Craft (Vercel / GitHub / Cloudflare)
   Surface:   #FFFFFF & #FAFAFA | Borders: #E4E4E7 | Ink: #09090B
   Type:      Inter (UI & Display), JetBrains Mono (Codes, Prices, Snippets)
   ========================================================================== */

:root {
    --bg-canvas: #FAFAFA;
    --bg-surface: #FFFFFF;
    --bg-muted: #F4F4F5;
    --bg-code: #09090B;

    --ink-primary: #09090B;
    --ink-secondary: #52525B;
    --ink-muted: #71717A;

    --border: #E4E4E7;
    --border-hover: #D4D4D8;
    --border-focus: #18181B;

    --btn-dark: #09090B;
    --btn-dark-hover: #27272A;

    --ok: #059669;
    --ok-bg: #ECFDF5;
    --ok-border: #A7F3D0;
    --ok-text: #065F46;

    --warn: #D97706;
    --warn-bg: #FFFBEB;
    --warn-border: #FDE68A;
    --warn-text: #92400E;

    --danger: #DC2626;
    --danger-bg: #FEF2F2;
    --danger-border: #FECACA;
    --danger-text: #991B1B;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --radius: 6px;
    --radius-lg: 8px;
    --max-w: 1280px;
}

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

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg-canvas);
    color: var(--ink-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--ink-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

.wrap {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   CONSOLE HEADER (Sticky Topbar + Horizontal Sub-Nav Tabs)
   ========================================================================== */

.console-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-top {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.02em;
    color: var(--ink-primary);
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: var(--ink-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
}

.brand-slash {
    color: var(--border-hover);
    font-weight: 300;
    margin: 0 2px;
}

.brand-scope {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-surface);
    font-size: 13px;
}

.user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--ink-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.user-pill-name {
    font-weight: 500;
    color: var(--ink-primary);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-tabs-wrap {
    border-top: 1px solid #F4F4F5;
    overflow-x: auto;
    scrollbar-width: none;
}

.header-tabs-wrap::-webkit-scrollbar {
    display: none;
}

.header-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 44px;
}

.tab-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.12s ease;
}

.tab-link:hover {
    color: var(--ink-primary);
    text-decoration: none;
}

.tab-link.active {
    color: var(--ink-primary);
    font-weight: 600;
}

.tab-link.active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    background: var(--ink-primary);
}

.tab-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 6px;
    flex-shrink: 0;
}

/* Main Content Area */
.main-content {
    padding: 28px 0 64px;
    min-height: calc(100vh - 102px);
}

/* ==========================================================================
   PAGE HEADER & SECTION TITLES
   ========================================================================== */

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
    color: var(--ink-primary);
}

.page-subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--ink-secondary);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.section-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 12px;
}

.section-heading {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink-primary);
}

.section-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-secondary);
}

.section-link:hover {
    color: var(--ink-primary);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--btn-dark);
    color: #FFFFFF;
    border-color: var(--btn-dark);
}

.btn-primary:hover:not(:disabled) {
    background: var(--btn-dark-hover);
    border-color: var(--btn-dark-hover);
    color: #FFFFFF;
}

.btn-secondary,
.btn-ghost {
    background: var(--bg-surface);
    color: var(--ink-primary);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled),
.btn-ghost:hover:not(:disabled) {
    background: var(--bg-muted);
    border-color: var(--border-hover);
    color: var(--ink-primary);
}

.btn-subtle {
    background: transparent;
    color: var(--ink-secondary);
    border-color: transparent;
}

.btn-subtle:hover:not(:disabled) {
    background: var(--bg-muted);
    color: var(--ink-primary);
}

.btn-danger {
    background: var(--bg-surface);
    color: var(--danger);
    border-color: var(--danger-border);
}

.btn-danger:hover:not(:disabled) {
    background: var(--danger);
    border-color: var(--danger);
    color: #FFFFFF;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12.5px;
}

.btn-block {
    width: 100%;
}

/* Badges & Status Dots */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid var(--border);
    background: var(--bg-muted);
    color: var(--ink-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-ok {
    background: var(--ok-bg);
    border-color: var(--ok-border);
    color: var(--ok-text);
}

.badge-warn {
    background: var(--warn-bg);
    border-color: var(--warn-border);
    color: var(--warn-text);
}

.badge-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger-text);
}

.badge-dark {
    background: var(--ink-primary);
    border-color: var(--ink-primary);
    color: #FFFFFF;
}

.badge-code {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-primary);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    display: inline-block;
    flex-shrink: 0;
}

.dot-ok {
    background: var(--ok);
}

.dot-warn {
    background: var(--warn);
}

.dot-danger {
    background: var(--danger);
}

/* ==========================================================================
   ALERTS
   ========================================================================== */

.alert {
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 18px;
    font-size: 13.5px;
    background: var(--bg-surface);
}

.alert ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.alert-success {
    background: var(--ok-bg);
    border-color: var(--ok-border);
    color: var(--ok-text);
}

.alert-error {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger-text);
}

/* ==========================================================================
   KPI CARDS
   ========================================================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.kpi-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.kpi-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-secondary);
}

.kpi-val {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--ink-primary);
    font-variant-numeric: tabular-nums;
}

.kpi-val.sm {
    font-size: 22px;
}

.kpi-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-muted);
    padding-top: 8px;
    border-top: 1px solid #F4F4F5;
}

.kpi-foot a {
    color: var(--ink-primary);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   CARDS / PANELS / TOOLBAR
   ========================================================================== */

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.toolbar input[type="text"],
.toolbar select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--ink-primary);
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.12s ease;
}

.toolbar input[type="text"] {
    flex: 1 1 260px;
    min-width: 200px;
}

.toolbar select {
    min-width: 175px;
}

.toolbar input[type="text"]:focus,
.toolbar select:focus {
    border-color: var(--border-focus);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.12s ease;
}

.filter-pill:hover {
    border-color: var(--border-hover);
    color: var(--ink-primary);
    text-decoration: none;
}

.filter-pill.active {
    background: var(--ink-primary);
    border-color: var(--ink-primary);
    color: #FFFFFF;
}

/* ==========================================================================
   TABLES
   ========================================================================== */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

table.data-table thead th {
    background: var(--bg-canvas);
    color: var(--ink-muted);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #F4F4F5;
    vertical-align: middle;
    font-size: 13.5px;
}

table.data-table tbody tr:last-child td {
    border-bottom: none;
}

table.data-table tbody tr:hover td {
    background: #FAFAFA;
}

.cell-mono {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

.cell-price {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cell-title {
    font-weight: 500;
    color: var(--ink-primary);
}

.cell-sub {
    display: block;
    font-size: 12px;
    color: var(--ink-muted);
    margin-top: 2px;
}

.cell-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 1px solid var(--border);
    display: block;
}

.thumb-empty {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-muted);
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--ink-muted);
    font-size: 13.5px;
}

/* ==========================================================================
   CATALOG / GALLERY PRODUCT CARDS (Opsi 1 Clean Console Grid)
   ========================================================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.token-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.14s ease;
}

.token-card:hover {
    border-color: #A1A1AA;
}

.token-card-img {
    width: 100%;
    height: 136px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.token-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.token-provider {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-secondary);
}

.token-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: var(--ink-primary);
}

.token-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ink-secondary);
}

.token-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ink-secondary);
    white-space: nowrap;
}

.token-card-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #F4F4F5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.token-price {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-primary);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 680px) minmax(240px, 1fr);
    gap: 20px;
    align-items: start;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-primary);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field input[type="file"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--ink-primary);
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.12s ease;
}

.field input:focus,
.field select:focus {
    border-color: var(--border-focus);
}

.field .error {
    color: var(--danger);
    font-size: 12px;
}

.form-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #F4F4F5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-list {
    margin: 10px 0 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-secondary);
}

/* ==========================================================================
   PAGINATION (CodeIgniter 4 Pager)
   ========================================================================== */

ul.pagination {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    gap: 6px;
}

ul.pagination li a,
ul.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: var(--radius);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--ink-primary);
    font-size: 13px;
    text-decoration: none;
}

ul.pagination li a:hover {
    background: var(--bg-muted);
    border-color: var(--border-hover);
}

ul.pagination li.active a,
ul.pagination li.active span {
    background: var(--ink-primary);
    border-color: var(--ink-primary);
    color: #FFFFFF;
}

/* ==========================================================================
   AUTH PAGES (Clean Centered Console Card — ala Vercel / GitHub)
   ========================================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-canvas);
}

.auth-topbar {
    height: 56px;
    padding: 0 24px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.auth-box {
    width: 100%;
    max-width: 400px;
}

.auth-heading {
    text-align: center;
    margin-bottom: 20px;
}

.auth-heading h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.auth-heading p {
    margin: 0;
    font-size: 13.5px;
    color: var(--ink-secondary);
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--ink-secondary);
}

.auth-switch a {
    color: var(--ink-primary);
    font-weight: 600;
}

/* ==========================================================================
   PUBLIC STOREFRONT (Clean Monochrome Developer Landing)
   ========================================================================== */

.store-hero {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 56px 0;
}

.store-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
    align-items: center;
}

.store-headline {
    margin: 12px 0 14px;
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.12;
    color: var(--ink-primary);
}

.store-lead {
    margin: 0 0 24px;
    font-size: 15px;
    color: var(--ink-secondary);
    max-width: 540px;
}

.store-terminal {
    background: var(--bg-code);
    color: #E4E4E7;
    border: 1px solid #27272A;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #27272A;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: #A1A1AA;
}

.terminal-dots {
    display: inline-flex;
    gap: 6px;
}

.terminal-dots span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #3F3F46;
}

.store-terminal pre {
    margin: 0;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.65;
    overflow-x: auto;
}

.store-stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #27272A;
}

.store-stat-cell {
    padding: 12px 14px;
    border-right: 1px solid #27272A;
}

.store-stat-cell:last-child {
    border-right: none;
}

.store-stat-k {
    display: block;
    font-size: 11px;
    color: #A1A1AA;
}

.store-stat-v {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
}

.store-section {
    padding: 44px 0;
}

.store-section-alt {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.store-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 20px 0;
    color: var(--ink-muted);
    font-size: 12.5px;
}

.store-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ==========================================================================
   SLIDE-OVER INSPECTOR DRAWER, CODE BOX, KEY PILL & TOAST
   ========================================================================== */

.key-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.key-pill code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--ink-primary);
}

.inline-role-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.inline-role-form select {
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    font-size: 12.5px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    margin-bottom: 24px;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mini-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.mini-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.mini-card p {
    margin: 0;
    font-size: 12.5px;
    color: var(--ink-secondary);
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(9, 9, 11, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    z-index: 60;
}

.drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.inspector-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(480px, 100vw);
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.18s ease;
    z-index: 70;
    display: flex;
    flex-direction: column;
}

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

.drawer-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.drawer-title {
    margin: 2px 0 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drawer-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.drawer-spec-cell {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-canvas);
}

.drawer-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.code-box {
    margin: 0;
    padding: 12px 14px;
    background: var(--bg-code);
    color: #E4E4E7;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.drawer-order-form {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    background: var(--bg-canvas);
}

.drawer-total-box {
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-primary);
}

.toast-msg {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: var(--ink-primary);
    color: #FFFFFF;
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 90;
}

.toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

.muted {
    color: var(--ink-muted);
    font-size: 13px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-hero-grid,
    .form-layout,
    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .wrap {
        padding: 0 16px;
    }

    .kpi-grid,
    .kpi-grid.cols-3,
    .form-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .user-pill-name,
    .brand-slash,
    .brand-scope {
        display: none;
    }
}
