/* =====================================================
   Shop.all — Commerce UI (Fashion buy/cart/checkout,
   Cinema checkout, and the management dashboard)
   ===================================================== */

/* ============ FASHION — product buy elements ============ */
.f-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 3px;
}

.f-price b { font-size: 14.5px; font-weight: 700; color: #17140f; }

.f-price s { font-size: 12px; color: #a89f8d; }

.f-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: #17140f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 11px;
  border-radius: 999px;
}

.f-badge.sale { background: #b4231d; }
.f-badge.new { background: #2f6b4f; }

.f-add {
  width: 100%;
  margin-top: 12px;
  height: 40px;
  border-radius: 9px;
  background: #17140f;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 150ms ease;
}

.f-add:hover { background: #2c271f; }

.f-add .icon { width: 16px; height: 16px; }

.f-prod { cursor: pointer; }

.f-prod .f-drop-img { cursor: pointer; }

/* Cart badge on the bag icon */
.f-bag-wrap { position: relative; }

.f-bag-count {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #b4231d;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============ Quick-view modal ============ */
.qv-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 16, 10, 0.55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.qv-overlay.open { display: flex; }

.qv-card {
  width: min(760px, 100%);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: 90vh;
}

.qv-img { background-size: cover; background-position: center; min-height: 360px; }

.qv-body { padding: 30px; display: flex; flex-direction: column; }

.qv-cat { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #a2977f; }

.qv-name { font-size: 24px; font-weight: 700; margin-top: 6px; color: #17140f; }

.qv-price { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; }

.qv-price b { font-size: 22px; font-weight: 800; }

.qv-price s { font-size: 15px; color: #a89f8d; }

.qv-desc { margin-top: 16px; font-size: 13.5px; line-height: 1.7; color: #6d675c; }

.qv-sizes { margin-top: 20px; }

.qv-sizes label { display: block; font-size: 12px; font-weight: 600; color: #6d675c; margin-bottom: 8px; }

.qv-size-row { display: flex; flex-wrap: wrap; gap: 8px; }

.qv-size {
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #ddd5c6;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #33302a;
  transition: all 150ms ease;
}

.qv-size.on { background: #17140f; border-color: #17140f; color: #fff; }

.qv-actions { margin-top: auto; padding-top: 22px; display: flex; gap: 12px; }

.qv-add {
  flex: 1;
  height: 48px;
  border-radius: 10px;
  background: #17140f;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background 150ms ease;
}

.qv-add:hover { background: #2c271f; }

.qv-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #17140f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qv-toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  background: #17140f;
  color: #fff;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 250ms ease;
}

.qv-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ FASHION — cart & checkout pages ============ */
.f-page { max-width: 1180px; margin: 0 auto; padding: 40px 24px 70px; }

.f-page-title { font-size: 30px; font-weight: 700; }
.f-page-title small { font-size: 15px; font-weight: 500; color: #948c7d; margin-inline-start: 8px; }

.f-shop-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 28px;
  margin-top: 26px;
  align-items: start;
}

.f-cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #ece7de;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.f-cart-img { width: 88px; height: 88px; border-radius: 10px; background-size: cover; background-position: center; flex-shrink: 0; }

.f-cart-info { flex: 1; min-width: 0; }

.f-cart-info h4 { font-size: 15px; font-weight: 600; }

.f-cart-info p { font-size: 12.5px; color: #948c7d; margin-top: 3px; }

.f-cart-remove { margin-top: 7px; font-size: 12.5px; font-weight: 600; color: #b4231d; background: none; }

.f-qty { display: inline-flex; align-items: center; border: 1px solid #ddd5c6; border-radius: 9px; overflow: hidden; }

.f-qty button { width: 32px; height: 34px; font-size: 16px; color: #56514a; transition: background 150ms ease; }

.f-qty button:hover { background: #efeae1; }

.f-qty b { width: 34px; text-align: center; font-size: 13.5px; }

.f-cart-price { width: 92px; text-align: end; font-size: 15px; font-weight: 700; flex-shrink: 0; }

.f-empty { text-align: center; padding: 70px 20px; color: #948c7d; }

.f-empty svg { width: 54px; height: 54px; margin-bottom: 16px; color: #cfc6b4; }

.f-empty h3 { font-size: 18px; color: #33302a; margin-bottom: 6px; }

.f-summary {
  background: #fff;
  border: 1px solid #ece7de;
  border-radius: 14px;
  padding: 22px;
}

.f-summary h3 { font-size: 17px; font-weight: 700; margin-bottom: 16px; }

.f-sum-row { display: flex; justify-content: space-between; font-size: 13.5px; color: #6d675c; margin-top: 10px; }

.f-sum-row b { color: #17140f; font-weight: 600; }

.f-sum-total { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid #ece7de; }

.f-sum-total span { font-size: 15px; font-weight: 700; }
.f-sum-total b { font-size: 21px; font-weight: 800; }

.f-btn-full {
  width: 100%;
  height: 50px;
  margin-top: 18px;
  border-radius: 10px;
  background: #17140f;
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background 150ms ease;
}

.f-btn-full:hover { background: #2c271f; }

.f-btn-full.wa { background: #1faf4f; }
.f-btn-full.wa:hover { background: #17963f; }

.f-btn-full .icon { width: 18px; height: 18px; }

.f-btn-ghost {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid #ddd5c6;
  background: none;
  color: #33302a;
  font-size: 13.5px;
  font-weight: 600;
}

.f-btn-ghost:hover { background: #efeae1; }

/* Fashion form fields */
.f-field { margin-bottom: 15px; }
.f-field label { display: block; font-size: 12.5px; font-weight: 600; color: #56514a; margin-bottom: 7px; }
.f-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #ddd5c6;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: #17140f;
  outline: none;
  transition: border-color 150ms ease;
}
.f-input:focus { border-color: #17140f; }
textarea.f-input { height: auto; padding: 12px 14px; resize: vertical; }
.f-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.f-block { background: #fff; border: 1px solid #ece7de; border-radius: 14px; padding: 24px; margin-bottom: 20px; }
.f-block h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

/* ============ Payment method radios (shared, theme via vars) ============ */
.pm-list { display: grid; gap: 12px; }

.pay-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 11px;
  border: 1px solid var(--pm-border, #ddd5c6);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.pay-opt.on { border-color: var(--pm-accent, #17140f); background: var(--pm-on-bg, rgba(23,20,15,0.03)); }

.pay-opt .pm-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--pm-border, #c7bfb0); flex-shrink: 0; position: relative;
}
.pay-opt.on .pm-radio { border-color: var(--pm-accent, #17140f); }
.pay-opt.on .pm-radio::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--pm-accent, #17140f);
}

.pay-opt .pm-name { flex: 1; font-size: 14px; font-weight: 600; }

.pm-brands { display: flex; gap: 5px; align-items: center; }
.pm-tag { font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 4px; letter-spacing: 0.03em; }
.pm-visa { background: #1a1f71; color: #fff; font-style: italic; }
.pm-mc { display: inline-flex; }
.pm-mc i { width: 13px; height: 13px; border-radius: 50%; display: inline-block; }
.pm-mc i:first-child { background: #EB001B; }
.pm-mc i:last-child { background: #F79E1B; margin-inline-start: -5px; }

/* ============ Order success screen ============ */
.ok-screen {
  max-width: 560px;
  margin: 40px auto;
  text-align: center;
  padding: 40px 28px;
  border-radius: 18px;
}

.ok-badge {
  width: 76px; height: 76px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.ok-badge .icon { width: 38px; height: 38px; }

.ok-screen h1 { font-size: 24px; font-weight: 800; }
.ok-screen .ok-ref { margin-top: 8px; font-size: 14px; font-weight: 600; }
.ok-screen p { margin-top: 14px; font-size: 14px; line-height: 1.65; }

.ok-detail {
  text-align: start;
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 22px;
  font-size: 13.5px;
  line-height: 1.7;
}
.ok-detail .r { display: flex; justify-content: space-between; gap: 12px; }
.ok-detail .r + .r { margin-top: 6px; }

/* ============ CINEMA checkout (dark/red) ============ */
.cc-wrap { max-width: 1120px; margin: 0 auto; padding: 40px 24px 70px; }

.cc-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: #a7a7af; margin-bottom: 22px;
}
.cc-back:hover { color: #fff; }
.cc-back .icon { width: 16px; height: 16px; }

.cc-title { font-size: 28px; font-weight: 800; }
.cc-sub { margin-top: 6px; color: #9a9aa2; font-size: 14px; }

.cc-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }

.cc-plan {
  position: relative;
  background: #121214;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px 22px;
  cursor: pointer;
  transition: border-color 200ms ease, transform 200ms ease;
}
.cc-plan:hover { transform: translateY(-3px); }
.cc-plan.on { border-color: #e0414d; }

.cc-plan-badge {
  position: absolute; top: 16px; inset-inline-end: 16px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(224,65,77,0.16); color: #ff6b73;
}

.cc-plan-name { font-size: 16px; font-weight: 700; }
.cc-plan-price { margin-top: 10px; font-size: 30px; font-weight: 900; }
.cc-plan-price span { font-size: 13px; font-weight: 500; color: #9a9aa2; }
.cc-plan-feats { list-style: none; margin-top: 16px; display: grid; gap: 9px; }
.cc-plan-feats li { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: #c9c9d1; }
.cc-plan-feats .icon { width: 14px; height: 14px; color: #ff5a66; flex-shrink: 0; margin-top: 2px; }

.cc-plan-check {
  position: absolute; bottom: 20px; inset-inline-end: 22px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
}
.cc-plan.on .cc-plan-check { border-color: #e0414d; background: #e0414d; }
.cc-plan.on .cc-plan-check::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 6px; height: 3px; border-inline-start: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.cc-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; margin-top: 30px; align-items: start; }

.cc-panel { background: #121214; border: 1px solid rgba(255,255,255,0.07); border-radius: 16px; padding: 24px; margin-bottom: 20px; }
.cc-panel h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

.cc-field { margin-bottom: 15px; }
.cc-field label { display: block; font-size: 12.5px; font-weight: 600; color: #b9b9c1; margin-bottom: 7px; }
.cc-input {
  width: 100%; height: 46px; padding: 0 14px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.12);
  background: #0d0d10; color: #f5f5f7; font-family: inherit; font-size: 14px; outline: none;
  transition: border-color 150ms ease;
}
.cc-input:focus { border-color: #e0414d; }
.cc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.cc-summary { background: #121214; border: 1px solid rgba(255,255,255,0.07); border-radius: 16px; padding: 22px; }
.cc-summary h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.cc-sum-row { display: flex; justify-content: space-between; font-size: 13.5px; color: #9a9aa2; margin-top: 10px; }
.cc-sum-row b { color: #fff; font-weight: 600; }
.cc-sum-total { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.cc-sum-total span { font-size: 15px; font-weight: 700; }
.cc-sum-total b { font-size: 22px; font-weight: 900; }

.cc-btn {
  width: 100%; height: 50px; margin-top: 18px; border-radius: 10px;
  background: #d21f2c; color: #fff; font-size: 14.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: background 150ms ease;
}
.cc-btn:hover { background: #e6303c; }
.cc-btn.wa { background: #1faf4f; }
.cc-btn.wa:hover { background: #17963f; }
.cc-btn .icon { width: 18px; height: 18px; }

.cc-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; font-size: 12px; color: #8a8a93; }
.cc-note .icon { width: 14px; height: 14px; }

/* ============ Responsive (fashion + cinema checkout) ============ */
@media (max-width: 900px) {
  .f-shop-layout, .cc-grid { grid-template-columns: 1fr; }
  .qv-card { grid-template-columns: 1fr; }
  .qv-img { min-height: 220px; }
  .cc-plans { grid-template-columns: 1fr; }
}

/* =====================================================
   DASHBOARD — Shop.all management
   ===================================================== */
.db-body { background: #0f1117; color: #e7e9ee; font-family: 'Inter', system-ui, sans-serif; min-height: 100vh; }

/* Without border-box, width:100% inputs overflow their card by their own
   padding — most visible as horizontal clipping in the phone editor. */
.db-body *, .db-body *::before, .db-body *::after { box-sizing: border-box; }

.db-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.db-side {
  background: #141824;
  border-inline-end: 1px solid rgba(255,255,255,0.06);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.db-brand { font-size: 20px; font-weight: 800; padding: 0 8px 20px; }
.db-brand span { color: #6ea8fe; }

.db-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: 10px;
  color: #9aa3b5; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all 150ms ease;
}
.db-nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.db-nav-item.on { background: #2563eb; color: #fff; font-weight: 600; }
.db-nav-item .icon { width: 18px; height: 18px; }

.db-nav-sep { margin: 14px 8px; border-top: 1px solid rgba(255,255,255,0.07); }

.db-main { padding: 26px 30px; min-width: 0; }

.db-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.db-head h1 { font-size: 22px; font-weight: 800; margin-inline-end: auto; }

.db-btn {
  height: 42px; padding: 0 18px; border-radius: 10px;
  background: #2563eb; color: #fff; font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; transition: background 150ms ease;
}
.db-btn:hover { background: #3b82f6; }
.db-btn .icon { width: 16px; height: 16px; }
.db-btn.ghost { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); }
.db-btn.ghost:hover { background: rgba(255,255,255,0.12); }
.db-btn.danger { background: rgba(239,68,68,0.15); color: #f87171; }
.db-btn.danger:hover { background: rgba(239,68,68,0.25); }

.db-view { display: none; }
.db-view.on { display: block; }

.db-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.db-kpi { background: #171b28; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 20px; }
.db-kpi label { font-size: 12.5px; color: #8a93a6; }
.db-kpi b { display: block; font-size: 26px; font-weight: 900; margin-top: 8px; }

/* Product/plan grid in dashboard */
.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

.db-card { background: #171b28; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; overflow: hidden; }
.db-card-img { height: 140px; background-size: cover; background-position: center; background-color: #222838; }
.db-card-body { padding: 14px 15px; }
.db-card-body h4 { font-size: 14px; font-weight: 700; }
.db-card-body .meta { font-size: 12px; color: #8a93a6; margin-top: 3px; }
.db-card-body .price { font-size: 14px; font-weight: 700; margin-top: 8px; color: #6ea8fe; }
.db-card-actions { display: flex; gap: 8px; padding: 0 15px 15px; }
.db-mini {
  flex: 1; height: 34px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); color: #cfd6e4;
  transition: all 150ms ease; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.db-mini:hover { background: rgba(255,255,255,0.1); }
.db-mini.del { color: #f87171; border-color: rgba(239,68,68,0.3); }
.db-mini .icon { width: 14px; height: 14px; }

/* Dashboard text-editor blocks */
.db-panel { background: #171b28; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 22px; margin-bottom: 20px; max-width: 720px; }
.db-panel h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }

.db-field { margin-bottom: 15px; }
.db-field label { display: block; font-size: 12px; font-weight: 600; color: #9aa3b5; margin-bottom: 7px; }
.db-input {
  width: 100%; min-height: 44px; padding: 11px 13px;
  border-radius: 9px; border: 1px solid rgba(255,255,255,0.12);
  background: #0f1320; color: #e7e9ee; font-family: inherit; font-size: 13.5px; outline: none;
  transition: border-color 150ms ease;
}
.db-input:focus { border-color: #2563eb; }
textarea.db-input { resize: vertical; line-height: 1.5; }
.db-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.db-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* Dashboard modal editor */
.db-modal {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(6,8,14,0.7); backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow: auto;
}
.db-modal.open { display: flex; }
.db-modal-card { width: min(560px, 100%); background: #171b28; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 26px; }
.db-modal-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 18px; }
.db-modal-foot { display: flex; gap: 12px; margin-top: 22px; }
.db-modal-foot .db-btn { flex: 1; justify-content: center; }

.db-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 500; background: #1faf4f; color: #fff; padding: 12px 22px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: all 250ms ease;
}
.db-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.db-locked {
  background: #171b28; border: 1px dashed rgba(255,255,255,0.14); border-radius: 14px;
  padding: 26px; color: #8a93a6; font-size: 13.5px; line-height: 1.7;
}
.db-locked b { color: #cfd6e4; }

/* ---- Device upload field ---- */
.db-up-box {
  display: flex; align-items: center; gap: 14px;
  background: #10131d; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 12px;
}
.db-up-box.dragover { border-color: #3b82f6; background: #131a2b; }

.db-up-thumb {
  width: 68px; height: 48px; flex: none; border-radius: 8px;
  background: #1c2130 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: #5b657a; font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; overflow: hidden;
}
.db-up-thumb .icon { width: 20px; height: 20px; }

.db-up-info { flex: 1; min-width: 0; }
.db-up-name {
  display: block; font-size: 13px; font-weight: 600; color: #dfe5f0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.db-up-name.empty { color: #6f7a8f; font-weight: 500; font-style: italic; }
.db-up-meta { display: block; margin-top: 3px; font-size: 11.5px; color: #8a93a6; }
.db-up-meta.err { color: #f87171; }
.db-up-meta.ok { color: #33d16f; }

.db-up-bar {
  display: none; height: 5px; margin-top: 8px; border-radius: 99px;
  background: rgba(255,255,255,0.09); overflow: hidden;
}
.db-up-bar.on { display: block; }
.db-up-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 150ms linear;
}

.db-up-actions { display: flex; gap: 8px; flex: none; }
.db-up-actions .db-mini { cursor: pointer; }
.db-up-hint { margin-top: 7px; font-size: 11.5px; color: #6f7a8f; }
.db-up .db-up-url { margin-top: 8px; }

/* ---- Statistics ---- */
.db-stat-grid {
  display: grid; gap: 14px; margin-bottom: 22px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.db-stat {
  background: #171b28; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 18px;
}
.db-stat label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #6f7a8f; margin-bottom: 8px;
}
.db-stat b { font-size: 24px; font-weight: 800; color: #eef2f8; }
.db-stat span { display: block; margin-top: 6px; font-size: 12px; color: #8a93a6; }

.db-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.db-table th {
  text-align: left; padding: 9px 10px; color: #6f7a8f; font-weight: 700;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.db-table td {
  padding: 11px 10px; color: #cfd6e4;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.db-table tr:last-child td { border-bottom: 0; }
.db-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.db-table-wrap { overflow-x: auto; }

.db-spark { display: flex; align-items: flex-end; gap: 5px; height: 90px; margin-top: 6px; }
.db-spark-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; }
.db-spark-col i {
  display: block; border-radius: 4px 4px 0 0; min-height: 2px;
  background: linear-gradient(180deg, #3b82f6, #1e478f);
}
.db-spark-col span { font-size: 9.5px; color: #6f7a8f; text-align: center; }

.db-meter { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; margin-top: 10px; }
.db-meter i { display: block; height: 100%; background: #33d16f; }
.db-meter i.warn { background: #fbbf24; }
.db-meter i.bad { background: #f87171; }

/* ---- Live connection chip ---- */
.db-status {
  margin: 14px 8px 0; padding: 7px 11px; border-radius: 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.2px;
  background: rgba(239,68,68,0.12); color: #f87171;
  display: flex; align-items: center; gap: 7px;
}
.db-status::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}
.db-status.live { background: rgba(31,175,79,0.13); color: #33d16f; }
.db-status.live::before { animation: dbPulse 2s ease-in-out infinite; }
@keyframes dbPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- Login gate ---- */
.db-gate {
  position: fixed; inset: 0; z-index: 900; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(9,11,18,0.92); backdrop-filter: blur(6px);
}
.db-gate.open { display: flex; }
.db-gate-card {
  width: min(400px, 100%); background: #171b28;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 30px;
}
.db-gate-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.db-gate-card p { font-size: 13px; color: #8a93a6; line-height: 1.6; margin-bottom: 20px; }
.db-gate-msg { min-height: 18px; margin-top: 12px; font-size: 12.5px; color: #f87171; text-align: center; }

@media (max-width: 820px) {
  .db-shell { grid-template-columns: 1fr; }
  .db-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .db-kpis { grid-template-columns: 1fr; }
  .db-row2, .db-row3 { grid-template-columns: 1fr; }
  .db-status { width: 100%; }
}
