/* =========================================================
   Triplet Panel — modern light UI
   Brand: #dd4a1f · #ffdd08 · #232338 · #f7f7fb
   ========================================================= */
:root {
  --orange: #dd4a1f;
  --yellow: #ffdd08;
  --ink: #1a1a1a;
  --muted: #6b6c7c;
  --line: rgba(26, 26, 26, 0.08);
  --line-2: rgba(26, 26, 26, 0.12);
  --bg: #f5f5f7;
  --card: #ffffff;
  --soft-o: rgba(221, 74, 31, 0.1);
  --soft-y: rgba(255, 221, 8, 0.28);
  --ok: #0d8a5b;
  --ok-bg: #e7f7f0;
  --danger: #c62828;
  --danger-bg: #fdeceb;
  --warn: #a16207;
  --warn-bg: #fff8e1;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(26,26,26,.04), 0 10px 28px rgba(26,26,26,.05);
  --shadow-lg: 0 8px 36px rgba(26,26,26,.08);
  --font: "Vazirmatn", Tahoma, sans-serif;
  --nav-h: 64px;
  --bottom-h: 70px;
  --side-w: 320px;
  --side-bg: #1c1c24;
  --side-bg-2: #121218;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: var(--font) !important;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, button, input, select, textarea, .btn, .form-control, .form-select {
  font-family: var(--font) !important;
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: #c03e16; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger) !important; }

/* ---------- forms ---------- */
.form-label { font-weight: 600; font-size: .88rem; margin-bottom: .4rem; color: var(--ink); }

.form-control, .form-select {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: .78rem 1rem;
  background: #fff;
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--soft-o);
  outline: none;
}

.form-check-input:checked { background-color: var(--orange); border-color: var(--orange); }

.btn {
  border-radius: 14px;
  font-weight: 700;
  padding: .72rem 1.2rem;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, #f06135, var(--orange) 60%, #c03e16);
  border: 0;
  color: #fff;
  box-shadow: 0 10px 24px rgba(221, 74, 31, .28);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #f5744c, #dd4a1f 55%, #b83714);
  color: #fff;
  border: 0;
}

.btn-outline-secondary, .btn-outline-light {
  border: 1px solid var(--line-2);
  color: var(--ink);
  background: #fff;
}
.btn-outline-secondary:hover, .btn-outline-light:hover {
  background: var(--soft-y);
  border-color: #efd000;
  color: var(--ink);
}
.btn-sm { padding: .42rem .8rem; font-size: .82rem; }

.alert { border-radius: var(--r-sm); border: 1px solid transparent; padding: .85rem 1rem; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #b6e6d0; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: #f3c0bc; }
.alert-warning { background: var(--warn-bg); color: var(--warn); border-color: #f0d78a; }

.table { --bs-table-bg: transparent; margin: 0; }
.table thead th {
  font-size: .78rem;
  font-weight: 700;
  color: #3a3100;
  border: 0;
  background: linear-gradient(180deg, #fff9c4, #fff18a);
  padding: .85rem 1rem;
}
.table td {
  vertical-align: middle;
  border-color: #eef0f5;
  padding: .9rem 1rem;
}
.table-responsive {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}

/* =========================================================
   AUTH
   ========================================================= */
.auth-body {
  min-height: 100%;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(255,221,8,.35), transparent 55%),
    radial-gradient(55% 45% at 0% 100%, rgba(221,74,31,.14), transparent 50%),
    linear-gradient(165deg, #fff 0%, #f7f7fb 50%, #fff6e8 100%);
  position: relative;
  overflow: hidden;
}

.auth-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(28,28,40,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,28,40,.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 70% 25%, #000 15%, transparent 70%);
  pointer-events: none;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}

.auth-visual {
  padding: clamp(32px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-visual-top { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--yellow), var(--orange));
  display: grid;
  place-items: center;
  color: #1a1a24;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 12px 28px rgba(221,74,31,.28);
}

.brand-word {
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -.03em;
  color: var(--ink);
}

.auth-hero-copy { max-width: 520px; margin-top: 8vh; }

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .4rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  color: var(--orange);
  font-weight: 700;
  font-size: .8rem;
  margin-bottom: 16px;
}

.auth-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.3;
  font-weight: 800;
  margin: 0 0 16px;
}
.auth-hero-title span {
  background: linear-gradient(120deg, var(--orange), #ff9a4a 45%, #c9a000);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.9;
  margin: 0;
  max-width: 440px;
}

.auth-orbit {
  margin-top: 40px;
  width: min(400px, 100%);
  aspect-ratio: 1.45;
  border-radius: 28px;
  border: 1px solid rgba(221,74,31,.12);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,221,8,.4), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(221,74,31,.2), transparent 40%),
    #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: floatSoft 7s ease-in-out infinite;
}
.auth-orbit::before, .auth-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(221,74,31,.2);
  border-radius: 50%;
}
.auth-orbit::before { inset: 16%; animation: spinSlow 20s linear infinite; }
.auth-orbit::after {
  inset: 30%;
  border-style: dashed;
  border-color: rgba(201,164,0,.4);
  animation: spinSlow 28s linear infinite reverse;
}
.auth-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 6px rgba(221,74,31,.12);
}
.auth-node:nth-child(1) { top: 22%; right: 28%; }
.auth-node:nth-child(2) { bottom: 26%; left: 24%; background: var(--yellow); }
.auth-node:nth-child(3) { top: 48%; left: 46%; width: 14px; height: 14px; background: var(--ink); }

.auth-panel { display: grid; place-items: center; padding: clamp(24px, 4vw, 48px); }

.auth-card {
  width: min(440px, 100%);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
  animation: riseIn .5s var(--ease) both;
}

.auth-card-brand { font-weight: 800; font-size: 1.5rem; margin-bottom: 4px; }
.auth-card-title { font-size: 1.15rem; font-weight: 800; margin: 0 0 6px; }
.auth-card-sub { color: var(--muted); margin: 0 0 22px; font-size: .92rem; line-height: 1.7; }
.auth-submit { width: 100%; margin-top: 8px; padding: .9rem; }
.auth-meta { margin-top: 18px; text-align: center; color: var(--muted); font-size: .8rem; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,221,8,.55), 0 12px 28px rgba(255,221,8,.35); }
  50% { box-shadow: 0 0 0 12px rgba(255,221,8,0), 0 14px 32px rgba(255,221,8,.45); }
}

/* =========================================================
   APP — permanent RIGHT dark sidebar + light content
   ========================================================= */
.app-body {
  min-height: 100%;
  background:
    radial-gradient(900px 380px at 0% -5%, rgba(255,221,8,.14), transparent 55%),
    radial-gradient(700px 360px at 100% 100%, rgba(221,74,31,.06), transparent 50%),
    var(--bg);
}

/* RTL flex-row: first child sits on the RIGHT */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.app-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Permanent dark sidebar (right) ---------- */
.app-sidebar {
  width: var(--side-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%);
  color: #fff;
  border-left: 1px solid rgba(255,255,255,.06);
  z-index: 60;
  overflow: hidden;
}

.side-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 14px;
}

.side-brand-link {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}

.side-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,221,8,.25);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.side-logo img { width: 28px; height: auto; display: block; }

.side-brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.side-brand-text strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
}
.side-brand-text small {
  font-size: .7rem;
  color: rgba(255,255,255,.55);
}

.side-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,221,8,.35) transparent;
}

.side-sep {
  margin: 12px 8px 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(255,221,8,.75);
  text-transform: none;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: .7rem .8rem;
  border-radius: 12px;
  color: rgba(255,255,255,.82);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: background .15s, color .15s, transform .15s;
}

.side-nav a:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.side-nav a.active {
  background: linear-gradient(135deg, rgba(255,221,8,.95), #f0c800);
  color: #1a1a24;
  box-shadow: 0 8px 20px rgba(255, 221, 8, 0.22);
  font-weight: 800;
}

.side-nav .nav-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  display: grid;
  place-items: center;
  color: var(--yellow);
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.side-nav .nav-ico svg { width: 16px; height: 16px; }

.side-nav a.active .nav-ico {
  background: rgba(26,26,36,.12);
  color: #1a1a24;
}

.side-nav .nav-badge {
  margin-inline-start: auto;
  background: var(--orange);
  box-shadow: 0 0 0 2px rgba(43,43,54,.5);
}
.side-nav a.active .nav-badge {
  background: var(--orange);
  color: #fff;
}

.side-foot {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 14px;
  display: grid;
  gap: 10px;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

.side-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--yellow), var(--orange));
  color: #1a1a24;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: .85rem;
  flex-shrink: 0;
}

.side-user-name {
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.side-user-role {
  font-size: .72rem;
  color: rgba(255,255,255,.5);
}

.side-logout {
  width: 100%;
  border: 1px solid rgba(255,221,8,.35);
  background: rgba(255,221,8,.1);
  color: var(--yellow);
  font-family: var(--font);
  font-weight: 700;
  font-size: .82rem;
  padding: .65rem .9rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.side-logout:hover {
  background: rgba(255,221,8,.2);
  border-color: var(--yellow);
}

/* ---------- Top bar (content area) ---------- */
.tp-topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(14px, 2.5vw, 28px);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.tp-top-title {
  flex: 1;
  min-width: 0;
}
.tp-top-title strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.tp-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-inline-start: auto;
}

.tp-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  text-decoration: none;
}
.tp-icon-btn:hover { box-shadow: var(--shadow); color: var(--ink); }
.tp-icon-btn svg { width: 18px; height: 18px; }

.tp-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  max-width: 220px;
}

.tp-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--yellow), var(--orange));
  color: #1a1a24;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: .85rem;
}

.tp-user-meta { min-width: 0; }
.tp-user-name {
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tp-user-role { font-size: .68rem; color: var(--muted); }

.app-main {
  flex: 1;
  padding: 22px clamp(14px, 3vw, 32px) 40px;
  min-width: 0;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Backdrop only for mobile overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(28, 28, 40, .4);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s;
}
.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile bottom nav */
.tp-bottomnav {
  display: none;
  position: fixed;
  inset-inline: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 50;
  height: var(--bottom-h);
  padding: 6px;
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 16px 40px rgba(28,28,40,.14);
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.tp-bottomnav a,
.tp-bottomnav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: transparent;
  border-radius: 16px;
  color: var(--muted);
  font-family: var(--font);
  font-size: .66rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  padding: 6px 2px;
  transition: background .15s, color .15s, transform .15s var(--ease);
}
.tp-bottomnav a.active,
.tp-bottomnav button.active {
  background: linear-gradient(160deg, #fff6a8, #ffe27a);
  color: var(--ink);
  transform: translateY(-1px);
}
.tp-bottomnav svg { width: 20px; height: 20px; }
.tp-bottomnav .nav-badge {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-120%);
  margin: 0;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 .28rem;
  margin-inline-start: .25rem;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
}

.desktop-only { display: inline-flex !important; }
.mobile-only { display: none !important; }

/* =========================================================
   PAGE / DASHBOARD
   ========================================================= */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  animation: riseIn .4s var(--ease) both;
}
.page-head h1 {
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  font-weight: 800;
  margin: 0 0 4px;
}
.page-kicker { color: var(--muted); margin: 0; font-size: .88rem; }

/* ---------- Luxury Dashboard (LIGHT · minimal) ---------- */
.lx-dash {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1080px;
  padding-block: 4px 12px;
}

.dash-reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: riseIn .7s var(--ease) both;
  animation-delay: var(--d, 0s);
}
.dash-reveal.is-in { opacity: 1; }

.lx-hero {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: end;
  padding: clamp(8px, 1.5vw, 12px) 0 8px;
  border-bottom: 1px solid var(--line);
}

.lx-kicker {
  margin: 0 0 10px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9a9aab;
}

.lx-title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.15;
  color: var(--ink);
}
.lx-title em {
  font-style: normal;
  font-weight: 700;
  color: var(--orange);
}

.lx-lead {
  margin: 0 0 22px;
  max-width: 36ch;
  font-size: .98rem;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 500;
}

.lx-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.lx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: .7rem 1.2rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.lx-btn--primary {
  border: 0;
  background: var(--orange);
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(221,74,31,.18);
}
.lx-btn--primary:hover {
  color: #fff !important;
  transform: translateY(-1px);
  background: #c9411a;
  box-shadow: 0 14px 28px rgba(221,74,31,.22);
}
.lx-btn--ghost {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink) !important;
}
.lx-btn--ghost:hover {
  border-color: rgba(28,28,40,.22);
  background: #fff;
  color: var(--ink) !important;
}
.lx-btn--text {
  border: 0;
  background: transparent;
  color: var(--muted) !important;
  padding-inline: .6rem;
  box-shadow: none;
}
.lx-btn--text:hover { color: var(--ink) !important; }

.lx-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}
.lx-stat {
  padding: 18px 16px;
  text-align: center;
  border-inline-start: 1px solid var(--line);
}
.lx-stat:first-child { border-inline-start: 0; }
.lx-stat span {
  display: block;
  margin-bottom: 8px;
  font-size: .75rem;
  font-weight: 600;
  color: #9a9aab;
}
.lx-stat strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.lx-section { display: flex; flex-direction: column; gap: 14px; }
.lx-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.lx-section-head h2 {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}

.lx-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.lx-metric {
  padding: 20px 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.lx-metric:hover {
  border-color: rgba(28,28,40,.14);
  transform: translateY(-2px);
}
.lx-metric--accent {
  border-color: rgba(221,74,31,.2);
  background: linear-gradient(180deg, #fff 60%, rgba(221,74,31,.04));
}
.lx-metric-label {
  display: block;
  margin-bottom: 12px;
  font-size: .78rem;
  font-weight: 600;
  color: #9a9aab;
}
.lx-metric-value {
  display: block;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}

.lx-ops {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.lx-op {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}
.lx-op-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #c8c8d2;
}
.lx-op-dot--amber { background: #e8a317; }
.lx-op-dot--ok { background: #2f9e6b; }
.lx-op-dot--danger { background: #d64545; }
.lx-op span {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #9a9aab;
  margin-bottom: 6px;
}
.lx-op strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.lx-op strong em {
  font-style: normal;
  margin: 0 .25rem;
  color: #c0c0cb;
  font-weight: 500;
}

.lx-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lx-split--3 { grid-template-columns: repeat(3, 1fr); }

.lx-panel {
  padding: 20px 20px 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
}
.lx-feed { padding-top: 18px; }

.lx-kpi { display: grid; gap: 14px; margin-top: 4px; }
.lx-kpi-row { padding: 0; }
.lx-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.lx-kpi-top strong {
  font-weight: 700;
  color: var(--ink);
}
.lx-kpi-top span {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--orange);
  font-size: .92rem;
}
.lx-kpi-meta {
  font-size: .78rem;
  color: #9a9aab;
  margin-bottom: 10px;
}

.lx-meter {
  height: 3px;
  border-radius: 99px;
  background: rgba(28,28,40,.06);
  overflow: hidden;
}
.lx-meter > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--orange);
  transition: width 1s var(--ease);
}
.dash-reveal.is-in .lx-meter > span { width: var(--p, 0%); }

.lx-empty {
  padding: 20px 4px;
  color: #9a9aab;
  font-size: .9rem;
  font-weight: 500;
}
.lx-member-stat {
  margin: 8px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.lx-link {
  font-size: .86rem;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
}
.lx-link:hover { color: #c9411a; }

.lx-feed-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.lx-feed-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.lx-feed-list li:last-child { border-bottom: 0; padding-bottom: 2px; }
.lx-feed-list strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--ink);
}
.lx-feed-list p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.65;
}
.lx-feed-list small {
  color: #b0b0bc;
  font-size: .75rem;
}

@media (max-width: 960px) {
  .lx-hero { grid-template-columns: 1fr; align-items: start; gap: 22px; }
  .lx-metrics { grid-template-columns: 1fr 1fr; }
  .lx-ops { grid-template-columns: 1fr 1fr; }
  .lx-split, .lx-split--3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lx-hero-stats { grid-template-columns: 1fr; }
  .lx-stat { border-inline-start: 0; border-top: 1px solid var(--line); text-align: start; }
  .lx-stat:first-child { border-top: 0; }
  .lx-metrics, .lx-ops { grid-template-columns: 1fr 1fr; }
  .lx-actions { width: 100%; }
  .lx-btn--primary, .lx-btn--ghost { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .dash-reveal { animation: none !important; opacity: 1; transform: none; }
  .lx-meter > span { transition: none; width: var(--p, 0%); }
}


/* ---------- shared cards / stats (other pages) ---------- */
.dash-page { position: relative; }
.dash-cta-badge {
  display: inline-flex;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: rgba(255,221,8,.18);
  border: 1px solid rgba(255,221,8,.45);
  color: #7a4a00;
  font-size: .75rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.btn-upload-glow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: .95rem 1.35rem;
  border-radius: 16px;
  border: 0;
  background: linear-gradient(135deg, #ffe566, #ffdd08 45%, #f0c400);
  color: #1a1a24 !important;
  font-weight: 800;
  font-size: 1.02rem;
  box-shadow: 0 0 0 0 rgba(255,221,8,.55), 0 12px 28px rgba(255,221,8,.35);
  animation: pulseGlow 2.2s ease-in-out infinite;
  text-decoration: none;
}
.btn-upload-glow:hover {
  color: #1a1a24 !important;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card, .content-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s, border-color .22s;
  animation: riseIn .55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * .06s + var(--d, 0s));
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(221,74,31,.22);
}
.stat-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--yellow), var(--orange));
}
.stat-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,221,8,.22), transparent 70%);
  transition: transform .35s var(--ease);
}
.stat-card:hover::after { transform: scale(1.15); }
.stat-card--accent { background: linear-gradient(160deg, #fff 40%, #fff8d6); }
.stat-card--warn { background: linear-gradient(160deg, #fff 45%, #fff4e8); }
.stat-card--warn::before { background: linear-gradient(180deg, #ffb020, var(--orange)); }
.stat-card--danger { background: linear-gradient(160deg, #fff 45%, #ffeceb); }
.stat-card--danger::before { background: linear-gradient(180deg, #ff8a80, var(--danger)); }
.stat-card--live::before { background: linear-gradient(180deg, #5eead4, var(--ok)); }

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--soft-y), var(--soft-o));
  color: var(--orange);
  margin-bottom: 12px;
  transition: transform .25s var(--ease);
}
.stat-card:hover .stat-icon { transform: scale(1.06) rotate(-4deg); }
.stat-icon svg { width: 18px; height: 18px; }

.stat-label {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(120deg, var(--ink) 15%, var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-split {
  margin: 0 .15rem;
  opacity: .45;
  background: none;
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
}

.stat-meter {
  margin-top: 12px;
  height: 7px;
  border-radius: 99px;
  background: rgba(28,28,40,.06);
  overflow: hidden;
}
.stat-meter > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
  transition: width 1.1s var(--ease);
}
.dash-reveal.is-in .stat-meter > span,
.stat-card .stat-meter > span {
  width: var(--p, 0%);
}

.dash-panel { position: relative; overflow: hidden; }
.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dash-panel-head h2 { margin: 0; }
.dash-panel-tag {
  font-size: .72rem;
  font-weight: 700;
  color: #7a4a00;
  background: var(--soft-y);
  border: 1px solid rgba(255,221,8,.45);
  padding: .22rem .6rem;
  border-radius: 999px;
}
.dash-panel-link { font-size: .86rem; font-weight: 700; }
.dash-kpi-list { display: grid; gap: 14px; }
.dash-kpi-row {
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fafafc, #fff);
  border: 1px solid var(--line);
}
.dash-kpi-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.dash-kpi-top span {
  font-weight: 800;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.dash-kpi-meta {
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: 8px;
}

.notif-list--modern li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
}
.notif-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--yellow), var(--orange));
  box-shadow: 0 0 0 4px rgba(255,221,8,.22);
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(221,74,31,.5); }
  70% { box-shadow: 0 0 0 10px rgba(221,74,31,0); }
  100% { box-shadow: 0 0 0 0 rgba(221,74,31,0); }
}


.content-card {
  padding: 18px;
  animation: riseIn .55s var(--ease) both;
}
.content-card h2,
.content-card > h1 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.content-card h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--yellow), var(--orange));
  box-shadow: 0 0 0 4px rgba(255,221,8,.28);
}

.panel-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--soft-y), var(--soft-o));
  border: 1px solid rgba(255,221,8,.4);
}
.panel-note-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--orange);
  font-weight: 800;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .28rem .7rem;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
}
.status-pill.ok { background: var(--ok-bg); color: var(--ok); }
.status-pill.off { background: #f1f2f6; color: var(--muted); }

.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif-list li:last-child { border-bottom: 0; padding-bottom: 0; }

.empty-state { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 4px; }

.upload-busy .btn[type=submit] { pointer-events: none; opacity: .7; }
.upload-busy .btn[type=submit]::after { content: " …"; }

/* =========================================================
   SMART UPLOAD WIZARD
   ========================================================= */
.wizard-shell {
  max-width: 980px;
  margin: 0 auto 24px;
  animation: riseIn .45s var(--ease) both;
}
.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: .88rem;
}
.wizard-step span {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f1f2f6;
  font-size: .8rem;
  flex-shrink: 0;
}
.wizard-step.is-active {
  border-color: rgba(255,221,8,.55);
  background: linear-gradient(135deg, #fffef5, #fff8d6);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.wizard-step.is-active span {
  background: linear-gradient(145deg, var(--yellow), #f0c400);
  color: #1a1a24;
}
.wizard-step.is-done {
  color: var(--ok);
  border-color: #b6e6d0;
  background: var(--ok-bg);
}
.wizard-step.is-done span { background: #c8f0dc; color: var(--ok); }

.wizard-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 28px);
}
.wizard-card-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 800;
}
.wizard-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.wizard-dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  padding: 42px 20px;
  border-radius: 22px;
  border: 2px dashed rgba(221,74,31,.35);
  background:
    radial-gradient(420px 160px at 50% 0%, rgba(255,221,8,.22), transparent 60%),
    #fafafc;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  margin-bottom: 16px;
}
.wizard-dropzone:hover,
.wizard-dropzone.is-drag {
  border-color: var(--orange);
  background: #fff8ef;
  transform: translateY(-1px);
}
.wizard-drop-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--yellow), var(--orange));
  color: #1a1a24;
  margin-bottom: 6px;
  box-shadow: 0 12px 28px rgba(221,74,31,.25);
}
.wizard-dropzone strong { font-size: 1.05rem; color: var(--ink); }
.wizard-dropzone span { color: var(--muted); font-size: .88rem; }
.wizard-submit {
  padding: 1rem !important;
  font-size: 1.02rem !important;
}

.wizard-detect-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .wizard-detect-grid { grid-template-columns: 1fr; }
  .wizard-steps { grid-template-columns: 1fr; }
}

.detect-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 14px;
}
.detect-chip {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7f7fb;
  border: 1px solid var(--line);
}
.detect-chip span {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.detect-chip strong { font-size: .95rem; }

.detect-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.detect-metrics > div {
  text-align: center;
  padding: 12px 8px;
  border-radius: 14px;
  background: linear-gradient(160deg, #fff9d6, #ffe9c8);
  border: 1px solid rgba(255,221,8,.4);
}
.detect-metrics span {
  display: block;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
}
.detect-metrics strong {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(120deg, var(--ink), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 520px) {
  .detect-chips, .detect-metrics { grid-template-columns: 1fr 1fr; }
}

.match-list { display: grid; gap: 10px; }
.match-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.match-item:hover {
  border-color: rgba(221,74,31,.35);
  box-shadow: var(--shadow);
}
.match-item.is-best {
  border-color: rgba(255,221,8,.7);
  background: linear-gradient(135deg, #fffef2, #fff6c8);
}
.match-item:has(input:checked) {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--soft-o);
}
.match-item input { margin-top: 4px; accent-color: var(--orange); }
.match-body { flex: 1; min-width: 0; }
.match-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 2px;
}
.match-score {
  font-size: .75rem;
  font-weight: 800;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(221,74,31,.1);
  color: var(--orange);
}
.match-reason {
  margin-top: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: #8a6d00;
}

/* ---------- Match form (simple + modern) ---------- */
.match-shell { max-width: 1080px; }
.match-card {
  position: relative;
  overflow: hidden;
  animation: riseIn .5s var(--ease) both;
  border: 1px solid rgba(255,221,8,.28);
}
.match-card--detect {
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(255,221,8,.22), transparent 55%),
    radial-gradient(320px 160px at 0% 100%, rgba(221,74,31,.08), transparent 55%),
    #fff;
}
.match-card--action { animation-delay: .08s; }
.match-card-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  inset-inline-end: -40px;
  top: -50px;
  background: radial-gradient(circle, rgba(255,221,8,.35), transparent 70%);
  animation: floatSoft 6s ease-in-out infinite;
  pointer-events: none;
}
.match-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .32rem .75rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--soft-y), var(--soft-o));
  border: 1px solid rgba(255,221,8,.5);
  color: #7a4a00;
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.match-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(221,74,31,.45);
  animation: livePulse 1.8s ease-out infinite;
}
.match-conf {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: .84rem;
  color: var(--muted);
}
.match-conf b { color: var(--ok); }
.match-conf-bar {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: rgba(28,28,40,.08);
  overflow: hidden;
  max-width: 180px;
}
.match-conf-bar > span {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #5eead4, var(--ok));
  animation: riseIn .8s var(--ease) both;
}
.match-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.match-section-title {
  font-size: .92rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.match-section-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--yellow), var(--orange));
  box-shadow: 0 0 0 4px rgba(255,221,8,.25);
}
.match-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.match-req {
  font-size: .72rem;
  font-weight: 800;
  color: #fff;
  background: var(--orange);
  padding: .15rem .45rem;
  border-radius: 999px;
}
.match-soft {
  font-size: .72rem;
  font-weight: 700;
  color: #7a4a00;
  background: var(--soft-y);
  border: 1px solid rgba(255,221,8,.45);
  padding: .15rem .45rem;
  border-radius: 999px;
}
.match-hint {
  margin-top: 6px;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.5;
}
.match-input {
  font-size: 1.02rem !important;
  min-height: 50px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.match-input--num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.match-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--soft-o);
}

/* Mobile live validation */
.match-mobile.is-mobile-empty {
  border-color: var(--line-2);
}
.match-mobile.is-mobile-bad {
  border-color: #e53935 !important;
  background: #fff5f5;
  box-shadow: 0 0 0 4px rgba(229, 57, 53, .15) !important;
  animation: matchShake .35s var(--ease);
}
.match-mobile.is-mobile-ok {
  border-color: #0d8a5b !important;
  background: #f0faf5;
  box-shadow: 0 0 0 4px rgba(13, 138, 91, .16) !important;
}
.match-mobile-status {
  margin-top: 8px;
  font-size: .84rem;
  font-weight: 700;
  color: var(--muted);
  min-height: 1.4em;
}
.match-mobile.is-mobile-bad + .match-mobile-status { color: #c62828; }
.match-mobile.is-mobile-ok + .match-mobile-status { color: #0d8a5b; }

@keyframes matchShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* Persian datepicker */
.tp-pdp-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.tp-pdp-wrap .tp-pdp-input { flex: 1; }
.tp-pdp-btn {
  width: 50px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: linear-gradient(145deg, var(--soft-y), #fff);
  color: var(--orange);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s, border-color .2s;
  flex-shrink: 0;
}
.tp-pdp-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255,221,8,.7);
}
.tp-pdp {
  position: absolute;
  z-index: 40;
  inset-inline-start: 0;
  top: calc(100% + 8px);
  width: min(320px, 92vw);
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(255,221,8,.4);
  box-shadow: 0 18px 40px rgba(28,28,40,.16);
  animation: riseIn .2s var(--ease) both;
}
.tp-pdp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.tp-pdp-title {
  font-weight: 800;
  font-size: .95rem;
}
.tp-pdp-nav {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f7f7fb;
  font-size: 1.1rem;
  cursor: pointer;
}
.tp-pdp-week,
.tp-pdp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.tp-pdp-week {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
}
.tp-pdp-day {
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}
.tp-pdp-day:not(.is-empty):hover {
  background: var(--soft-y);
}
.tp-pdp-day.is-empty { cursor: default; }
.tp-pdp-day.is-today {
  box-shadow: inset 0 0 0 1.5px rgba(221,74,31,.45);
}
.tp-pdp-day.is-selected {
  background: linear-gradient(145deg, #ffe566, var(--orange));
  color: #1a1a24;
}
.tp-pdp-foot {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}
.tp-pdp-foot button {
  border: 0;
  background: var(--soft-o);
  color: var(--orange);
  font-weight: 800;
  border-radius: 999px;
  padding: .4rem 1rem;
  cursor: pointer;
}

.match-alert { animation: riseIn .35s var(--ease) both; }

/* ---------- Body photo multi-upload ---------- */
.body-photo-zone {
  border: 2px dashed rgba(221,74,31,.35);
  border-radius: 22px;
  background:
    radial-gradient(420px 160px at 50% 0%, rgba(255,221,8,.28), transparent 60%),
    linear-gradient(180deg, #fffef8, #fff);
  transition: border-color .2s, background .2s, transform .2s var(--ease), box-shadow .2s;
  outline: none;
}
.body-photo-zone.is-drag,
.body-photo-zone:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--soft-o);
  transform: translateY(-1px);
}
.body-photo-zone.has-files {
  border-style: solid;
  border-color: rgba(255,221,8,.55);
}
.body-photo-zone-inner {
  display: grid;
  place-items: center;
  gap: 6px;
  text-align: center;
  padding: 28px 18px 22px;
  cursor: pointer;
}
.body-photo-zone-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  color: #1a1a24;
  background: linear-gradient(145deg, #ffe566, var(--orange));
  box-shadow: 0 12px 28px rgba(221,74,31,.28);
  animation: floatSoft 4.5s ease-in-out infinite;
}
.body-photo-zone-inner strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}
.body-photo-zone-inner span {
  color: var(--muted);
  font-size: .86rem;
  max-width: 36ch;
  line-height: 1.6;
}
.body-photo-pick {
  margin-top: 10px;
  padding: .7rem 1.2rem !important;
  font-size: .95rem !important;
  animation: none !important;
}
.body-photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-weight: 700;
  color: var(--ink);
}
.body-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.body-photo-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: riseIn .35s var(--ease) both;
  animation-delay: calc(var(--i, 0) * .05s);
}
.body-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.body-photo-remove {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(28,28,40,.72);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.body-photo-angle {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 0;
  border-radius: 12px;
  padding: .45rem .55rem;
  font-weight: 800;
  font-size: .82rem;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

.coach-note-card {
  border: 1px solid rgba(255,221,8,.4);
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(255,221,8,.18), transparent 55%),
    #fff;
}
.coach-note-bubble {
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffef5, #fff8d6);
  border: 1px solid rgba(255,221,8,.45);
  font-size: 1.02rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

@media (prefers-reduced-motion: reduce) {
  .match-card, .match-badge-dot, .match-card-glow, .match-mobile.is-mobile-bad,
  .body-photo-zone-icon, .body-photo-card {
    animation: none !important;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; }

  .desktop-only { display: none !important; }
  .mobile-only { display: inline-flex !important; }

  .app-shell { display: block; }

  .app-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(86vw, 300px);
    height: 100vh;
    z-index: 100;
    transform: translate3d(105%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform .28s var(--ease), visibility .28s;
    box-shadow: -16px 0 40px rgba(0,0,0,.25);
  }
  .app-sidebar.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .tp-topnav { height: 58px; }
  .tp-user-chip { display: none; }

  .app-main { padding: 14px 14px calc(var(--bottom-h) + 28px); }
  .tp-bottomnav { display: grid; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-head .btn { width: 100%; }
}

@media print {
  .tp-topnav, .tp-bottomnav, .app-sidebar, .sidebar-backdrop, .no-print { display: none !important; }
  .app-shell { display: block; }
  .app-main { padding: 0; max-width: none; }
}
