/* ============================================================
   PANEL PAGE KIT (.cqp-*)  linked from v2/layout/app.blade.php

   The parts every v2 panel page is built from, so no page has to
   invent its own: the page header (v2/partials/page-head.blade.php),
   the card, the meter cells, a two-column grid.

   Cut from the pages that already "speak the panel's language"
   (/home, dash-console.css): Inter on headings, 8px corners, the
   theme's own border and surface tokens, so light and dark both come
   from the theme. Brand blue only.
   ============================================================ */

/* ---------- Page header ---------- */
.cqp-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: .75rem 1.25rem; flex-wrap: wrap;
    margin: 0 0 1.5rem;
}
.cqp-head-l { min-width: 0; }
.cqp-title {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.6rem; font-weight: 600; line-height: 1.2; letter-spacing: -.01em;
    color: var(--mono, #18181b);
}
.cqp-note {
    margin-inline-start: .6rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: .8125rem; font-weight: 450; letter-spacing: 0;
    color: var(--secondary-foreground, #71717a);
}
.cqp-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }

/* ---------- Meter cells (the balances in a header, as on /home) ---------- */
.cqp-meter {
    display: inline-flex; align-items: stretch;
    border: 1px solid var(--border, #e4e4e7); border-radius: 8px;
    background: var(--background, #fff); overflow: hidden;
}
.cqp-meter-cell {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
    min-width: 6.25rem; padding: .45rem .95rem;
    background: transparent; border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left;
}
.cqp-meter-cell + .cqp-meter-cell { border-left: 1px solid var(--border, #e4e4e7); }
.cqp-meter-cell:hover { background: var(--accent, #f4f4f5); }
.cqp-meter-cell:focus-visible { outline: 2px solid var(--primary, #1379F0); outline-offset: -2px; }
.cqp-meter-n { font-size: 1.15rem; line-height: 1.1; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--mono, #18181b); }
.cqp-meter-k { font-size: .6875rem; color: var(--secondary-foreground, #71717a); }
.cqp-meter-cell.is-empty .cqp-meter-n { color: #d97706; }

/* ---------- Card ---------- */
.cqp-card {
    background: var(--background, #fff);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    min-width: 0;
}
.cqp-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .9rem 1.15rem;
    border-bottom: 1px solid var(--border, #e4e4e7);
}
.cqp-card-title {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem; font-weight: 600; letter-spacing: -.005em; line-height: 1.3;
    color: var(--mono, #18181b);
}
.cqp-card-sub { font-size: .75rem; color: var(--secondary-foreground, #71717a); }
.cqp-card-body { padding: 1.15rem; }
.cqp-card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
    padding: .85rem 1.15rem; border-top: 1px solid var(--border, #e4e4e7);
}

/* ---------- Grid: main column + side column, the same split everywhere ---------- */
.cqp-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.cqp-stack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
@media (max-width: 1100px) { .cqp-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Phone ---------- */
@media (max-width: 640px) {
    .cqp-head { align-items: flex-start; margin-bottom: 1.1rem; }
    .cqp-title { font-size: 1.4rem; }
    .cqp-note { display: block; margin: .2rem 0 0; font-size: .78rem; }
    .cqp-actions { width: 100%; }
    .cqp-meter { width: 100%; }
    .cqp-meter-cell { flex: 1 1 0; min-width: 0; }
}
