/* VCUBE Portal v2.01 design layer (Phase 4). Loaded after portal.css and Studio's polish.
   Switch it off with 'v2_look' => false in v2/lib/settings.php. Same brand and colours: only softer cards,
   clearer headings, friendlier empty states, smooth page changes and a nicer phone tab bar. */

/* ---------- Type ---------- */
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; }
.page-head p { font-size: 15px; }
.card-head h3 { font-size: 15.5px; letter-spacing: -.01em; }
.stat-value, .chip, .count, .table td { font-variant-numeric: tabular-nums; }

/* ---------- Cards ---------- */
.card { box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px -12px rgba(15, 23, 42, .12); }
:root[data-theme="dark"] .card { box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -16px rgba(0, 0, 0, .7); }
.card-head { border-bottom-color: color-mix(in srgb, var(--border) 70%, transparent); }
.list-item { transition: background .15s; }
.list-item:hover { background: var(--surface-2); }

/* ---------- Empty states ---------- */
.empty { padding: 40px 24px; }
.empty .empty-icon { box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand-soft) 50%, transparent); }
.empty h3 { font-size: 17px; }
.empty p { line-height: 1.55; }

/* ---------- Smooth page changes ---------- */
@view-transition { navigation: auto; } /* browsers that support it cross-fade between pages; others ignore it. No fade on the page itself, so nothing flickers */

/* ---------- Phone tab bar: a soft pill behind the open tab ---------- */
@media (max-width: 1024px) {
  .tabbar { box-shadow: 0 -10px 30px -18px rgba(15, 23, 42, .35); }
  .tabbar a, .tabbar .stp-more-tab { margin: 2px; transition: background .2s, color .2s; }
  .tabbar a.active { background: var(--brand-soft); }
  .tabbar a.active::before { display: none; }
  .tabbar a.active .icon { transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .list-item, .tabbar a { transition: none; }
}

/* ---------- Touch screens: lift the portal's few 36-43px controls to 44px ---------- */
@media (pointer: coarse) {
  .topbar .mobile-brand, .stp-search-btn { min-height: 44px; }
  .status-select { min-height: 44px !important; } /* the old page sets 36px inline */
  a.row { min-height: 44px; }
  a.small[href$="forgot_password.php"] { display: inline-flex; align-items: center; min-height: 44px; }
  label.check { min-height: 44px; display: flex; align-items: center; gap: 8px; }
  input[type=file] { min-height: 44px; max-width: 100%; }
}
