/* ═══════════════════════════════════════════════════════════════════
   verisq-page.css — CP 7H.11

   Brand-aligned utility classes for page-internal content. Builds on
   the tokens defined in verisq-hub-chrome.css; provides reusable
   class building blocks that any page can adopt incrementally.

   Adoption pattern: a page replaces its custom `.my-card` class with
   `.vsq-card`. Page-specific tweaks layer ON TOP via more-specific
   selectors. No page is forced to migrate — existing pages keep
   working unchanged.

   Sections:
     1. Page header chrome (.vsq-page-title, .vsq-page-eyebrow)
     2. Cards + sections (.vsq-card, .vsq-section)
     3. Buttons (.vsq-btn family)
     4. Tables (.vsq-table)
     5. Form controls (.vsq-input, .vsq-select, .vsq-textarea)
     6. Badges + tags (.vsq-tag, .vsq-badge)
     7. Empty states (.vsq-empty)

   All classes default to LIGHT mode and pick up DARK overrides via
   the html.dark-mode contract from verisq-hub-chrome.css.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Page header chrome ─────────────────────────────────────── */

.vsq-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
}

.vsq-page-header-left { flex: 1; min-width: 0; }

.vsq-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: var(--vsq-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}
.vsq-page-eyebrow-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--vsq-gold);
    box-shadow: 0 0 0 3px var(--vsq-gold-soft);
}

.vsq-page-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--vsq-text);
    margin: 0 0 4px;
    line-height: 1.2;
    text-transform: uppercase;
}

.vsq-page-subtitle {
    font-size: 13px;
    color: var(--vsq-text-mid);
    line-height: 1.55;
    margin: 0;
    max-width: 640px;
}

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

/* ── 2. Cards + sections ────────────────────────────────────────── */

.vsq-card {
    background: var(--vsq-surface);
    border: 1px solid var(--vsq-border);
    border-radius: var(--vsq-radius-lg);
    padding: 18px 20px;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.vsq-card.vsq-card--hoverable {
    cursor: pointer;
}
.vsq-card.vsq-card--hoverable:hover {
    border-color: var(--vsq-gold);
    box-shadow: var(--vsq-shadow-md), 0 0 0 1px var(--vsq-gold-soft);
}
.vsq-card--sunken {
    background: var(--vsq-surface-sunken);
    border-color: var(--vsq-border-soft);
}

.vsq-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--vsq-border-soft);
}
.vsq-card-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--vsq-text);
    margin: 0;
    letter-spacing: 0.005em;
    text-transform: uppercase;
}
.vsq-card-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--vsq-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.vsq-section {
    margin-bottom: 28px;
}
.vsq-section-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--vsq-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 14px;
}
.vsq-section-title::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--vsq-gold);
    box-shadow: 0 0 8px var(--vsq-gold);
}

/* ── 3. Buttons ─────────────────────────────────────────────────── */

.vsq-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 7px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.08s;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}
.vsq-btn:active:not(:disabled) { transform: scale(0.985); }
.vsq-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.vsq-btn svg { width: 13px; height: 13px; }

/* Primary — gold with DARK text (never white on gold) */
.vsq-btn-primary {
    background: var(--vsq-gold);
    color: #0A0A0B;
    border-color: var(--vsq-gold);
}
.vsq-btn-primary:hover:not(:disabled) {
    background: var(--vsq-gold-deep);
    border-color: var(--vsq-gold-deep);
    color: #0A0A0B;
}

/* Ghost — outlined neutral */
.vsq-btn-ghost {
    background: transparent;
    color: var(--vsq-text-mid);
    border-color: var(--vsq-border);
}
.vsq-btn-ghost:hover:not(:disabled) {
    background: var(--vsq-surface-sunken);
    color: var(--vsq-text);
    border-color: var(--vsq-border-strong);
}

/* Secondary — filled surface, used for less-emphatic actions */
.vsq-btn-secondary {
    background: var(--vsq-surface);
    color: var(--vsq-text);
    border-color: var(--vsq-border);
}
.vsq-btn-secondary:hover:not(:disabled) {
    background: var(--vsq-surface-sunken);
    border-color: var(--vsq-border-strong);
}

/* Danger — destructive actions */
.vsq-btn-danger {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}
.vsq-btn-danger:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
}

/* Sizes */
.vsq-btn-sm { padding: 5px 10px; font-size: 11px; }
.vsq-btn-sm svg { width: 11px; height: 11px; }
.vsq-btn-lg { padding: 11px 22px; font-size: 13px; }
.vsq-btn-lg svg { width: 15px; height: 15px; }

/* ── 4. Tables ──────────────────────────────────────────────────── */

.vsq-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    color: var(--vsq-text);
}
.vsq-table thead th {
    text-align: left;
    padding: 11px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: var(--vsq-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--vsq-surface-sunken);
    border-bottom: 1px solid var(--vsq-border);
    white-space: nowrap;
}
.vsq-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--vsq-border-soft);
    vertical-align: middle;
}
.vsq-table tbody tr:last-child td { border-bottom: 0; }
.vsq-table tbody tr:hover { background: var(--vsq-surface-sunken); }
.vsq-table tbody tr.is-selected { background: var(--vsq-gold-soft); }

.vsq-table--compact tbody td { padding: 8px 12px; }
.vsq-table--compact thead th { padding: 8px 12px; }

/* ── 5. Form controls ───────────────────────────────────────────── */

.vsq-input,
.vsq-select,
.vsq-textarea {
    width: 100%;
    padding: 9px 12px;
    background: var(--vsq-surface);
    border: 1px solid var(--vsq-border);
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    color: var(--vsq-text);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    outline: none;
    box-sizing: border-box;
}
.vsq-input:focus,
.vsq-select:focus,
.vsq-textarea:focus {
    border-color: var(--vsq-gold);
    box-shadow: 0 0 0 3px var(--vsq-gold-soft);
}
.vsq-input:disabled,
.vsq-select:disabled,
.vsq-textarea:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--vsq-surface-sunken);
}
.vsq-input::placeholder,
.vsq-textarea::placeholder {
    color: var(--vsq-text-muted);
}

.vsq-textarea {
    min-height: 88px;
    resize: vertical;
    line-height: 1.5;
}

.vsq-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: var(--vsq-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.vsq-field { margin-bottom: 14px; }
.vsq-field-hint {
    font-size: 11px;
    color: var(--vsq-text-muted);
    margin-top: 5px;
}
.vsq-field-error {
    font-size: 11px;
    color: #dc2626;
    margin-top: 5px;
    font-weight: 500;
}

/* ── 6. Badges + tags ───────────────────────────────────────────── */

.vsq-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 600;
    color: var(--vsq-text-muted);
    background: var(--vsq-surface-sunken);
    border: 1px solid var(--vsq-border);
    padding: 3px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.vsq-tag--gold {
    color: #6B5A14;
    background: var(--vsq-gold-soft);
    border-color: var(--vsq-gold-soft);
}
html.dark-mode .vsq-tag--gold { color: var(--vsq-gold); }
.vsq-tag--success { color: #047857; background: rgba(16, 185, 129, 0.10); border-color: rgba(16, 185, 129, 0.20); }
.vsq-tag--warning { color: #B45309; background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.22); }
.vsq-tag--danger  { color: #B91C1C; background: rgba(239, 68, 68, 0.10);  border-color: rgba(239, 68, 68, 0.22); }
.vsq-tag--info    { color: #1D4ED8; background: rgba(59, 130, 246, 0.10); border-color: rgba(59, 130, 246, 0.20); }

.vsq-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: #0A0A0B;
    background: var(--vsq-gold);
    border-radius: 100px;
    line-height: 1;
}

/* ── 7. Empty states ────────────────────────────────────────────── */

.vsq-empty {
    text-align: center;
    padding: 56px 24px;
    color: var(--vsq-text-mid);
}
.vsq-empty-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--vsq-gold-soft);
    color: var(--vsq-gold-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
html.dark-mode .vsq-empty-icon { color: var(--vsq-gold); }
.vsq-empty-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--vsq-text);
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.005em;
}
.vsq-empty-meta {
    font-size: 13px;
    color: var(--vsq-text-mid);
    line-height: 1.55;
    margin: 0 0 16px;
    max-width: 420px;
    display: inline-block;
}

/* ── 8. Loading + skeleton ──────────────────────────────────────── */

.vsq-spinner {
    width: 22px; height: 22px;
    border: 2px solid var(--vsq-gold-soft);
    border-top-color: var(--vsq-gold);
    border-radius: 50%;
    animation: vsqSpin 0.7s linear infinite;
    display: inline-block;
}
@keyframes vsqSpin { to { transform: rotate(360deg); } }

.vsq-skeleton {
    background: linear-gradient(90deg,
        var(--vsq-surface-sunken) 0%,
        var(--vsq-surface) 50%,
        var(--vsq-surface-sunken) 100%);
    background-size: 200% 100%;
    animation: vsqSkel 1.4s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes vsqSkel {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
