/* ==========================================================================
   COSTA URBANA · POS — Design System
   Operate surface · premium retail point-of-sale
   ========================================================================== */

:root {
  /* Brand */
  --brand: #16a34a;
  --brand-600: #12803a;
  --brand-700: #0e6a30;
  --brand-soft: #e7f6ee;
  --lime: #68c900;

  /* Ink (deep teal-navy) */
  --ink: #0d1b22;
  --ink-2: #3d4e58;
  --muted: #7c8b94;

  /* Surfaces */
  --bg: #f5f7f6;
  --card: #ffffff;
  --border: #e3eae7;
  --border-strong: #d2ddda;

  /* Semantic */
  --danger: #e11d48;
  --danger-soft: #fdecef;
  --amber: #b45309;
  --amber-soft: #fdf3d8;
  --blue: #2563eb;
  --blue-soft: #e8f0fe;

  /* Shape & depth */
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 9px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(13, 27, 34, .05);
  --shadow-md: 0 6px 18px -4px rgba(13, 27, 34, .10);
  --shadow-lg: 0 20px 45px -12px rgba(13, 27, 34, .22);

  --ring: rgba(22, 163, 74, .35);

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--brand-soft); color: var(--brand-700); }

.num, .price, .money {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  white-space: nowrap;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease,
              border-color .15s ease;
}
.btn:hover { background: var(--brand-600); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn.ghost {
  background: var(--card);
  color: var(--ink-2);
  border-color: var(--border-strong);
}
.btn.ghost:hover { background: var(--bg); border-color: var(--muted); color: var(--ink); }

.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #be123c; }

.btn.ink { background: var(--ink); }
.btn.ink:hover { background: #1b2f3a; }

.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 14px 20px; font-size: 16px; border-radius: var(--r-md); }

.btn svg { width: 18px; height: 18px; flex: none; }
.btn.sm svg { width: 16px; height: 16px; }

.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field { margin-bottom: 16px; }

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: .01em;
}
label .req { color: var(--danger); }

input[type="text"], input[type="password"], input[type="number"],
input[type="search"], input[type="date"], input[type="email"],
select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-family: inherit;
  background: var(--card);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c8b94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
}

textarea { resize: vertical; min-height: 80px; }

.checkbox-row { display: flex; align-items: center; gap: 9px; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--brand); }
.checkbox-row label { margin: 0; cursor: pointer; font-size: 14px; color: var(--ink); }

.field-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Flash / alerts
   -------------------------------------------------------------------------- */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin: 14px auto;
  max-width: 640px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
}
.flash.error { background: var(--danger-soft); color: #9f1239; border-color: #f6c9d3; }
.flash.ok    { background: var(--brand-soft); color: var(--brand-700); border-color: #bfe7cf; }
.flash svg { width: 18px; height: 18px; flex: none; }

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 62px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.04), var(--shadow-sm);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 16.5px;
  letter-spacing: -0.01em;
  margin-right: 10px;
}
.brand .logo { height: 38px; width: auto; }
.brand .dot { color: var(--lime); font-weight: 800; }
.brand small {
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lime);
  background: rgba(104, 201, 0, .12);
  padding: 3px 8px;
  border-radius: var(--r-pill);
}

.topnav { display: flex; align-items: center; gap: 3px; }
.topnav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,.72);
  transition: background .15s ease, color .15s ease;
}
.topnav a svg { width: 17px; height: 17px; }
.topnav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.topnav a.active { background: rgba(104, 201, 0, .16); color: #d6f5a4; }

.spacer { flex: 1; }

.topbar .user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,.12);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--lime));
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.topbar .user .meta { line-height: 1.2; text-align: right; }
.topbar .user .meta b { display: block; font-size: 13px; font-weight: 700; }
.topbar .user .meta span { font-size: 11px; color: rgba(255,255,255,.55); }

.topbar .logout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  transition: background .15s ease, color .15s ease;
}
.topbar .logout svg { width: 17px; height: 17px; }
.topbar .logout:hover { background: rgba(225, 29, 72, .18); color: #ffb3c3; }

@media (max-width: 760px) {
  .brand small { display: none; }
  .topnav a span.txt { display: none; }
  .topbar .user .meta { display: none; }
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.login-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(104, 201, 0, .20), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(22, 163, 74, .22), transparent 55%),
    var(--ink);
  position: relative;
  overflow: hidden;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 22px;
  padding: 40px 36px 32px;
  box-shadow: var(--shadow-lg);
  animation: rise .5s cubic-bezier(.16, 1, .3, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-card .logo { display: block; height: 60px; margin: 0 auto 14px; }
.login-card h1 {
  text-align: center;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.login-card .sub {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin: 4px 0 26px;
}
.login-card .btn { width: 100%; padding: 13px; font-size: 15px; margin-top: 4px; }
.login-foot {
  text-align: center;
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   POS layout
   -------------------------------------------------------------------------- */
.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  padding: 18px;
  max-width: 1600px;
  margin: 0 auto;
}
@media (max-width: 1000px) {
  .pos-layout { grid-template-columns: 1fr; }
  .cart-panel { position: static !important; height: auto !important; }
}

.productos-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.toolbar { display: flex; gap: 10px; align-items: center; }
.searchbox {
  flex: 1;
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
}
.searchbox svg {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.searchbox input {
  padding-left: 42px;
  height: 46px;
  font-size: 15px;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-2);
  transition: all .15s ease;
  user-select: none;
}
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 13px;
}
.prod-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 122px;
  transition: transform .14s cubic-bezier(.16,1,.3,1), box-shadow .16s ease,
              border-color .16s ease;
  user-select: none;
  overflow: hidden;
}
.prod-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand);
  opacity: 0;
  transition: opacity .16s ease;
}
.prod-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}
.prod-card:hover::before { opacity: 1; }
.prod-card:active { transform: translateY(0) scale(.985); }

.prod-card .tipo {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 9px;
  border-radius: var(--r-pill);
}
.prod-card .tipo.promocion { background: var(--amber-soft); color: var(--amber); }
.prod-card .tipo.producto  { background: var(--blue-soft); color: var(--blue); }

.prod-card .nombre {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.28;
  color: var(--ink);
  flex: 1;
}
.prod-card .precio {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-600);
  letter-spacing: -0.02em;
}
.prod-card .stock { font-size: 12px; font-weight: 600; color: var(--muted); }
.prod-card .stock.ok  { color: var(--brand-600); }
.prod-card .stock.bajo { color: var(--amber); }
.prod-card .stock.agotado { color: var(--danger); }
.prod-card.sin-stock { opacity: .55; pointer-events: none; }
.prod-card.sin-stock::after {
  content: "Sin stock";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 247, 246, .65);
  backdrop-filter: blur(1px);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-2);
}

/* Cart panel */
.cart-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 98px);
  position: sticky;
  top: 80px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.cart-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-head h2 { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.cart-head .count {
  background: var(--brand-soft);
  color: var(--brand-700);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #fbfcfb;
}
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .info .n {
  font-weight: 600;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.cart-item .info .p { font-size: 12px; color: var(--muted); margin-top: 1px; }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button {
  width: 28px; height: 28px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .12s ease;
}
.qty button:hover { border-color: var(--brand); color: var(--brand-600); }
.qty .val { min-width: 26px; text-align: center; font-weight: 700; font-size: 14px; }
.cart-item .subtotal { font-weight: 800; font-size: 14px; min-width: 58px; text-align: right; }
.cart-item .rm {
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  transition: color .12s ease;
}
.cart-item .rm:hover { color: var(--danger); }
.cart-item .rm svg { width: 16px; height: 16px; }

.cart-foot {
  border-top: 1px solid var(--border);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fbfcfb;
}
.total-row { display: flex; justify-content: space-between; align-items: baseline; }
.total-row .lbl { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.total-row .amt { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }

.pago-methods {
  display: flex;
  gap: 8px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--r-md);
}
.pago-methods .pm {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  background: transparent;
  border: none;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: all .15s ease;
}
.pago-methods .pm.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.cambio-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.cambio-row .cambio { font-size: 20px; font-weight: 800; color: var(--brand-600); }

.btn-cobrar {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  border-radius: var(--r-md);
  box-shadow: 0 8px 20px -6px rgba(22, 163, 74, .5);
}
.btn-cobrar:hover { box-shadow: 0 10px 24px -6px rgba(22, 163, 74, .55); }

.cart-vacio {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}
.cart-vacio svg { width: 40px; height: 40px; color: var(--border-strong); margin: 0 auto 12px; display: block; }
.cart-vacio a { color: var(--brand); font-weight: 700; }

/* --------------------------------------------------------------------------
   Ticket (receipt)
   -------------------------------------------------------------------------- */
.ticket-wrap { display: flex; justify-content: center; padding: 24px; }
.ticket {
  background: var(--card);
  width: 330px;
  padding: 22px 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  color: #1a1a1a;
}
.ticket .t-head { text-align: center; margin-bottom: 14px; }
.ticket .t-head .logo { height: 40px; margin-bottom: 6px; }
.ticket .t-head h2 { font-family: var(--font-sans); font-size: 15px; font-weight: 800; }
.ticket .t-head .sub { font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: .06em; }
.ticket .line { display: flex; justify-content: space-between; gap: 8px; }
.ticket .line .k { color: #555; }
.ticket .sep { border-top: 1px dashed #bbb; margin: 9px 0; }
.ticket .tot { font-size: 15px; font-weight: 700; }
.ticket .tot .amt { font-size: 17px; }
.ticket .anulada { color: var(--danger); font-weight: 700; text-align: center; margin-top: 8px; letter-spacing: .04em; }
.ticket .foot { text-align: center; margin-top: 16px; font-size: 10.5px; color: #777; }
.ticket-actions { display: flex; justify-content: center; gap: 10px; margin: 20px 0 6px; }
@media print {
  body * { visibility: hidden; }
  .ticket, .ticket * { visibility: visible; }
  .ticket { position: absolute; left: 0; top: 0; box-shadow: none; border: none; width: 80mm; }
  .ticket-actions, .topbar { display: none !important; }
}

/* --------------------------------------------------------------------------
   Container / page head
   -------------------------------------------------------------------------- */
.container { max-width: 1080px; margin: 0 auto; padding: 24px 20px; }
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.page-head .actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.card-table {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; font-size: 14px; }
thead th {
  background: var(--bg);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .12s ease; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f9fbfa; }
td .muted { color: var(--muted); }
td .strong { font-weight: 700; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
}
.badge.ok    { background: var(--brand-soft); color: var(--brand-700); }
.badge.error { background: var(--danger-soft); color: #9f1239; }
.badge.info  { background: var(--blue-soft); color: #1d4ed8; }
.badge.warn  { background: var(--amber-soft); color: var(--amber); }

/* --------------------------------------------------------------------------
   Admin sidebar
   -------------------------------------------------------------------------- */
.admin-layout {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: calc(100dvh - 62px);
}
.admin-side {
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-side .side-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
  padding: 0 13px 8px;
}
.admin-side a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-2);
  transition: background .13s ease, color .13s ease;
}
.admin-side a svg { width: 18px; height: 18px; flex: none; }
.admin-side a:hover { background: var(--bg); color: var(--ink); }
.admin-side a.active { background: var(--brand-soft); color: var(--brand-700); }
.admin-side .side-spacer { flex: 1; }
.admin-main { padding: 26px 30px; min-width: 0; }
@media (max-width: 700px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-side .side-label, .admin-side .side-spacer { display: none; }
  .admin-main { padding: 20px; }
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat .ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.stat .ic svg { width: 20px; height: 20px; }
.stat .ic.green  { background: var(--brand-soft); color: var(--brand-600); }
.stat .ic.blue   { background: var(--blue-soft); color: var(--blue); }
.stat .ic.amber  { background: var(--amber-soft); color: var(--amber); }
.stat .ic.ink    { background: #eef1f2; color: var(--ink-2); }
.stat .lbl {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.stat .val { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin-top: 3px; }
.stat .val.green { color: var(--brand-600); }

.section-title { font-size: 16px; font-weight: 700; margin: 26px 0 12px; color: var(--ink); }

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--card);
}
.empty svg { width: 42px; height: 42px; color: var(--border-strong); margin: 0 auto 12px; display: block; }
.empty a { color: var(--brand); font-weight: 700; }

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
