/* ====== Vazirmatn (Local) ====== */
@font-face{
  font-family: 'Vazirmatn';
  src: url('/public/fonts/vazirmatn/Vazirmatn[wght].woff2') format('woff2');
  font-weight: 100 900;   /* Variable weights */
  font-style: normal;
  font-display: swap;
}

/* ====== Base ====== */
*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

html, body{
  background: var(--bg);
  color: var(--text);
}

body{
  margin: 0;
  font-family: "Vazirmatn", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Tahoma", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{ color: var(--accent-2); text-decoration: none; }

a:hover{ color: var(--accent); }

/* ====== Layout ====== */
.wrap{
  max-width: 920px;
  margin: 56px auto;
  padding: 0 20px;
}

.page-header{
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}

h1{ margin: 0 0 16px; font-size: 1.6rem; letter-spacing: -.2px; }

h2{ margin: 20px 0 12px; font-size: 1.2rem; color: var(--text); }

/* نوار ثابت */
.topbar{
  position: fixed; inset: 0 0 auto 0; height: var(--topbar-h); z-index: 1030;
  background: linear-gradient(180deg, #0f172a, #0b1224);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}

.topbar-inner{
  max-width: 920px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}

.topbar-right{ display: flex; align-items: center; gap: 10px; }

.topbar-left { display: flex; align-items: center; gap: 12px; }

.topbar-user{ color: var(--text); opacity: .95; }

.topbar-date{ color: var(--muted); }

.topbar-link{
  color: var(--accent-2); text-decoration: none; border: 1px solid var(--border);
  padding: 6px 10px; border-radius: 10px; background: #121c35;
}

.topbar-link:hover{ border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(56,189,248,.12); }

/* ====== Cards / Sections ====== */
.card{
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

/* ====== Forms ====== */
.form label{
  display:block; margin-top: 10px; margin-bottom: 6px; color: var(--muted); font-size: .92rem;
}

.form input,
.form select,
.form textarea,
button{
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #0b142c;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .02s ease;
}

.form textarea{ resize: vertical; }

.form input::placeholder,
.form textarea::placeholder{ color: #6b7a95; }

.form input:focus,
.form select:focus,
.form textarea:focus{
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(56,189,248,.18);
}

button{
  cursor: pointer;
  background: linear-gradient(180deg, #17233f, #0f1a34);
  border: 1px solid var(--border);
  margin-top: 10px;
}

button:hover{ border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(56,189,248,.12); }

button:active{ transform: translateY(1px); }

.btn, .links a{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #141f3b;
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform .05s ease, border-color .15s ease, box-shadow .15s ease;
}

.links{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 12px; }

.links a:hover{ border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(56,189,248,.12); }

.links a:active{ transform: translateY(1px); }

/* ====== Tables ====== */
.table{
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0c1630;
  box-shadow: var(--shadow-sm);
}

.table thead th{
  position: sticky; top: 0;
  background: #101a34;
  color: var(--muted);
  font-weight: 600;
  text-align: right;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}

.table tbody td{
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: .98rem;
}

.table tbody tr:nth-child(even){
  background: #0a152d;
}

.table tbody tr:hover{
  background: #0d1a35;
}

.table tbody tr[onclick]{ cursor: pointer; }

/* ====== Alerts ====== */
.ok{
  background: var(--ok-bg);
  border: 1px solid var(--ok-br);
  color: var(--ok-tx);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.err{
  background: var(--err-bg);
  border: 1px solid var(--err-br);
  color: var(--err-tx);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.warn{
  background: var(--warn-bg);
  border: 1px solid var(--warn-br);
  color: var(--warn-tx);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* ====== Footer ====== */
.footer{
  opacity: .65;
  font-size: .88rem;
  margin-top: 28px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

/* ====== Media ====== */
img{
  max-width: 100%;
  height: auto;
  display: block;
}

img[alt="image"]{
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ====== Small niceties ====== */
::selection{ background: rgba(56,189,248,.35); color: #071020; }

::-webkit-scrollbar{ width: 10px; height: 10px; }

::-webkit-scrollbar-track{ background: #0a1327; }

::-webkit-scrollbar-thumb{
  background: #1a2747; border: 1px solid var(--border); border-radius: 10px;
}

.lightbox-backdrop.hidden{ display: none; }

.lightbox-img{
  max-width: 92vw; max-height: 92vh;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #0b142c;
}

.lightbox-close{
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border);
  background: #121c35; color: var(--text);
  font-size: 22px; line-height: 38px; text-align: center;
  cursor: pointer;
}

/* Lightbox (باز کردن عکس پروسیجر/نسخه) */
.lightbox-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.lightbox-backdrop.hidden{ display: none; }
.lightbox-img{
  max-width: 95vw; max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
  background: #000;
}
.lightbox-close{
  position: absolute; top: 14px; right: 14px; /* راست برای RTL */
  width: 40px; height: 40px; border: 0; cursor: pointer;
  border-radius: 10px;
  font-size: 26px; line-height: 1; color: #fff; background: rgba(0,0,0,.6);
}
.lightbox-close:hover{ background: rgba(0,0,0,.8); }

.lightbox-close:hover{ border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(56,189,248,.12); }

.btn-danger{
  background: linear-gradient(180deg, #3a0f16, #2a0b11);
  border-color: #6b0615;
  color: #fee2e2;
}

.btn-danger:hover{
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.18);
}

.field-err{ color: #fecaca; margin-top: 6px; font-size: .9rem; display:none; }

.pager{ display:flex; flex-wrap:wrap; gap:8px; }

.pager-btn{
  width:auto; min-width: 42px;
  padding: 8px 12px;
}

.pager-btn.active{
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(56,189,248,.12);
}

/* Grid دو ستونه روی دسکتاپ */
.grid-two{
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr; /* موبایل: یکی زیرِ یکی */
}

@media (min-width: 1024px){
.grid-two{ grid-template-columns: 1fr 1fr; }
/* دسکتاپ: دو ستون */
}

/* کارت‌های فرم: مرز و سایه مشخص‌تر */
.form-card{
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border-radius: var(--radius);
  padding: 16px;
}

.form-card h2{
  margin: 0 0 10px;
  font-size: 1.15rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}

.footer { text-align: center; }

/* ===== Auth (Login) ===== */
.auth-wrap{
  min-height: calc(100vh - (var(--topbar-h, 0px)));
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card{
  width: 100%;
  max-width: 420px;
  padding: 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(180deg, var(--card), var(--card-2));
}

.auth-title{
  margin: 0 0 14px;
  text-align: center;
  font-size: 1.5rem;
}

/* ===== Utilities (margins, layout, helpers) ===== */
.mt-8{ margin-top: 8px; }

.mb-8{ margin-bottom: 8px; }

.mt-10{ margin-top: 10px; }

.mt-12{ margin-top: 12px; }

.mb-12{ margin-bottom: 12px; }

.mt-16{ margin-top: 16px; }

.mb-16{ margin-bottom: 16px; }

.mt-28{ margin-top: 28px; }

.text-muted{ color: var(--muted); }

.flex-between{ display:flex; align-items:center; justify-content:space-between; gap:12px; }

.table-wrap{ overflow: auto; }

/* Grid helpers */
.grid{ display: grid; gap: 12px; }

.grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }

@media (max-width: 640px){
.grid-2{ grid-template-columns: 1fr; }
}

/* Thumbs / images */
.proc-thumb{
  max-width: 140px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

/* ===== Form layout (narrow, responsive grid) ===== */
.form-card{
  max-width: 880px;
  margin: 0 auto;
}

.form-grid{
  display: grid;
  gap: 12px;
}

@media (min-width: 900px){
.form-grid.cols-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.cols-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

.span-2{ grid-column: 1 / -1; }

/* سطر تمام‌عرض (مثلاً برای آدرس) */

/* مطمئن شو کنترل‌ها عرض ستون خود را پر کنند */
.form .form-grid input,
.form .form-grid select,
.form .form-grid textarea{
  width: 100%;
}

/* سه‌ستونه‌کردن کارت‌های فرم در صفحات عریض */
@media (min-width: 1200px){
  .triple-grid{
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

.badge{
  display:inline-block; padding:2px 8px; border-radius:999px; font-size:.85rem; line-height:1.6; border:1px solid var(--border);
}

.badge-pending{ background:#1e293b; color:#e2e8f0; }

.badge-done{ background:#14532d; color:#dcfce7; }

.badge-canceled{ background:#7f1d1d; color:#fee2e2; }

/* ------ Unified sub navigation ------ */
.subnav{
  position: sticky; top: 56px; z-index: 8;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:#0f172a; border:1px solid #334155; border-radius:12px;
  padding:8px 12px; margin:8px 0 12px;
}

.crumbs{ display:flex; align-items:center; gap:8px; color:#cbd5e1; font-size:13px; }

.crumbs a{ color:#e2e8f0; text-decoration:none; }

.crumbs a:hover{ text-decoration:underline; }

.crumbs .sep{ opacity:.5; }

.crumbs .current{ color:#f1f5f9; font-weight:600; }

.page-actions .btn{ margin-inline-start:8px; }

.page-title{ margin:30px 0 30px; font-size:26px; }

/* ----------------------------------- */

/* -------- Actionbar -------- */
.actionbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:#0b1222; border:1px solid #334155; border-radius:12px;
  padding:10px 12px; margin:8px 0 14px;
}

.ab-left,.ab-right{ display:flex; align-items:center; gap:8px; }

.ab-more-btn{ min-width:130px; }

.ab-menu{
  position:absolute; margin-top:6px; right:auto; inset-inline-end:12px;
  background:#0f172a; border:1px solid #334155; border-radius:10px;
  min-width:220px; box-shadow:0 10px 30px rgba(0,0,0,.4); padding:6px;
}

.ab-menu.hidden{ display:none; }

.ab-menu ul{ list-style:none; margin:0; padding:4px 0; }

.ab-menu li{ margin:0; padding:0; }

.ab-menu li.sep{ height:1px; background:#253044; margin:6px 0; }

.ab-menu a, .ab-menu button{
  display:block; width:100%; text-align:right; padding:8px 10px; border:0; background:transparent;
  color:#e2e8f0; text-decoration:none; border-radius:8px; cursor:pointer; font:inherit;
}

.ab-menu a:hover, .ab-menu button:hover{ background:#12203a; }

.ab-menu .danger{ color:#ff6b6b; }

.btn{ padding:8px 12px; border-radius:10px; border:1px solid #3b4a65; text-decoration:none; display:inline-flex; align-items:center; gap:6px; }

.btn-primary{ background:#2563eb; border-color:#2563eb; color:#fff; }

.btn-outline{ background:transparent; color:#e2e8f0; }

.btn-danger{ background:#b91c1c; border-color:#b91c1c; color:#fff; }

/* --------------------------- */

.ui-select{ /* همان‌ها، فقط سِلکتور عوض شده */
  height:40px; padding:0 12px 0 40px;
  border:1px solid #334155; border-radius:10px; background:#0b1222; color:#e2e8f0;
  font:inherit; line-height:40px; outline:0; -webkit-appearance:none; -moz-appearance:none; appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg fill='%23cbd5e1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5.5 7.5l4.5 4.5 4.5-4.5' /></svg>");
  background-repeat:no-repeat; background-size:14px; background-position:left 12px center;
  transition:border-color .15s, box-shadow .15s;
}

.ui-select:focus{ border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,.25); }

.ui-select:disabled{ opacity:.6; cursor:not-allowed; }

.ui-select.is-invalid{ border-color:#b91c1c; box-shadow:0 0 0 3px rgba(185,28,28,.25); }

.ui-select[multiple]{ height:auto; padding:8px 12px; background-image:none; line-height:1.5; }

@media print{
/* هر چیزی که نباید چاپ شود */
  .no-print,
  h1,
  .topbar,
  #topbar,
  nav,
  header,
  footer,
  .actionbar,
  .breadcrumbs,
  .sidebar,
  .links,
  .btn,
  .subnav {
    display: none !important;
  }
/* چاپ تمیزتر */
  body {
    background: #fff !important;
    margin: 0;
  }
}

/* ===== Unified App Form Styles (patients/show) ===== */
:root{
  --bg:#0b1220;         /* پس‌زمینهٔ تیره فعلی اپ */
  --card:#111827;
  --muted:#9aa3b2;
  --text:#e5e7eb;
  --primary:#22c55e;     /* سبز هماهنگ اپ */
  --primary-600:#16a34a;
  --danger:#ef4444;
  --ring:#3b82f6;        /* آبی فوکِس */
  --border:#263245;
  --border-2:#334155;
  --shadow: 0 6px 18px rgba(0,0,0,.25);
}

.form-grid{
  display:grid; gap:16px;
}

@media (min-width: 992px){
.form-grid.cols-2{ grid-template-columns: 1fr 1fr; }
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow);
  padding:16px;
}

.card-title{
  font-weight:700; font-size:18px; margin:0 0 12px;
}

.card-actions{ display:flex; gap:8px; flex-wrap:wrap; }

.form-row{ display:grid; gap:12px; }

.form-row.cols-2{ grid-template-columns: 1fr 1fr; }

@media (max-width: 576px){
.form-row.cols-2{ grid-template-columns: 1fr; }
}

.form-group label{
  display:block; margin-bottom:6px; color:var(--muted); font-size:12px;
}

/* Inputs */
.form-control, .form-select, .form-textarea{
  width:100%;
  background:#0f172a;
  color:var(--text);
  border:1px solid var(--border-2);
  border-radius:10px;
  padding:10px 12px;
  outline:0;
  transition:.16s border-color, .16s box-shadow, .16s background-color;
}

.form-control::placeholder,
.form-textarea::placeholder{ color:#718096; }

.form-control:focus, .form-select:focus, .form-textarea:focus{
  border-color:var(--ring);
  box-shadow:0 0 0 3px rgba(59,130,246,.25);
}

.form-textarea{ min-height:88px; resize:vertical; }

/* Select (فلش) */
.form-select{
  background-image:
    linear-gradient(45deg, transparent 50%, #9aa3b2 50%),
    linear-gradient(135deg, #9aa3b2 50%, transparent 50%),
    linear-gradient(to right, #9aa3b2, #9aa3b2);
  background-position:
    calc(12px) calc(50% - 3px),
    calc(12px) calc(50% + 3px),
    calc(12px) 50%;
  background-size:6px 6px, 6px 6px, 2px 12px;
  background-repeat:no-repeat;
  padding-right:34px; /* RTL: فلش سمت راست */
  -webkit-appearance:none; -moz-appearance:none; appearance:none;
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px; padding:10px 14px; border-radius:10px;
  border:1px solid transparent; cursor:pointer;
  color:#0b1220; background:#e5e7eb; font-weight:600;
  transition:.18s transform,.18s background-color,.18s border-color,.18s color,.18s opacity;
}

.btn:hover{ transform:translateY(-1px); }

.btn:active{ transform:translateY(0); }

.btn-primary{ background:var(--primary); color:#041018; }

.btn-primary:hover{ background:var(--primary-600); }

.btn-light{ background:#1f2a3a; color:#e5e7eb; border-color:var(--border-2); }

.btn-light:hover{ background:#243344; }

.btn-danger{ background:var(--danger); color:#fff; }

.btn-sm{ padding:7px 10px; font-size:12px; border-radius:8px; }

.help{ font-size:12px; color:var(--muted); }

/* ---------- Invoice builder (form-like rows) ---------- */
.invoice-builder { margin-top: 4px; }

.invoice-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* هماهنگی با استایل عمومی فرم‌ها */
.invoice-row .form-control,
.invoice-row .form-select{
  height: 36px;
  line-height: 34px;
  padding: 6px 10px;
}

/* ابزارک‌های جمع کل */
.totals{ display:flex; flex-wrap:wrap; gap:16px; }

.totals > div{ background:#0f172a0f; border:1px solid #33415540; border-radius:8px; padding:6px 10px; }

/* Utility widths (ساده و پاسخ‌گرا) */
.w-16{ min-width: 72px;  max-width: 90px; }

.w-24{ min-width: 96px;  max-width: 130px; }

.w-28{ min-width: 112px; max-width: 160px; }

.w-32{ min-width: 128px; max-width: 200px; }

.w-64{ min-width: 260px; flex: 1 1 320px; }

/* فاصله بین دکمه‌های بالای لیست ردیف‌ها */
.flex-gap{ display:flex; gap:8px; flex-wrap:wrap; }

@media (max-width: 640px){
.w-64{ min-width: 100%; flex: 1 0 100%; }
}

/* ==== Payments Card ==== */
.payments-card { margin-top: 16px; }

.payments-card .card-title {
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 16px;
}

.payments-card .table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

/* جدول پرداخت‌ها */
.payments-card table.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.payments-card table.table th,
.payments-card table.table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.payments-card table.table thead th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #e5e7eb;
}

.payments-card table.table tbody tr:hover {
  background: #fafafa;
}

/* فرم افزودن پرداخت – فقط استایل، نه منطق */
.payments-card .payment-form {
  margin-top: 14px;
  padding: 12px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
}

/* اگر فرم‌ات را در قالب سطر/ستون گذاشتی: */
.payments-card .form-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 1024px){
.payments-card .form-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px){
.payments-card .form-row { grid-template-columns: 1fr; }
}

.payments-card .form-group label {
  display: block;
  font-size: 12px;
  color: #475569;
  margin-bottom: 6px;
}

/* یکدست‌سازی کنترل‌ها با استایل اپ */
.payments-card .form-control,
.payments-card .form-select,
.payments-card input[type="text"],
.payments-card input[type="number"],
.payments-card input[type="date"],
.payments-card textarea,
.payments-card select {
  width: 100%;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-size: 14px;
}

.payments-card .form-control:focus,
.payments-card .form-select:focus,
.payments-card input:focus,
.payments-card textarea:focus,
.payments-card select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

/* اکشن‌های فرم */
.payments-card .card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 10px;
}

/* دکمه‌ها هماهنگ با سراسری اپ – اگر موجودند، نیازی به زیر نیست */
.payments-card .btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.payments-card .btn:hover { background: #f3f4f6; }

.payments-card .btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.payments-card .btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }

.payments-card .btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.payments-card .btn-danger:hover { background: #dc2626; border-color: #dc2626; }

/* خلاصه پرداخت/مانده */
.payments-card .payments-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0 0;
}

.payments-card .payments-summary .pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

/* کمک‌کننده برای اعداد ریالی */
.payments-card .toman { font-variant-numeric: tabular-nums; direction: ltr; }

/* ===== Auth (Login) – scoped styles ===== */
.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(34,211,238,.10), transparent 60%),
    radial-gradient(1000px 500px at -10% 110%, rgba(59,130,246,.10), transparent 60%),
    #0b1320;
}

.auth-card.card{
  width:100%;
  max-width:520px;
  border-radius:16px;
  padding:28px 24px;
  background: rgba(15,23,42,.9);          /* slate-900 */
  border:1px solid rgba(148,163,184,.10); /* slate-400/10 */
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
}

.auth-title{
  text-align:center;
  font-size:24px;
  font-weight:800;
  color:#e5e7eb; /* text-slate-200 */
  margin:0 0 6px;
}

.auth-desc{
  text-align:center;
  color:#94a3b8; /* text-slate-400 */
  margin:0 0 16px;
  font-size:14px;
}

.auth-form .form-group{ margin-bottom:14px; }

.auth-form label{
  display:block;
  font-size:.92rem;
  color:#cbd5e1; /* slate-300 */
  margin-bottom:6px;
}

.auth-form .form-control{
  height:44px;
  border-radius:12px;
  padding-inline:12px 44px;
  background: rgba(148,163,184,.08);
  color:#e5e7eb;
  border:1px solid rgba(148,163,184,.25);
  outline:none;
  transition: box-shadow .2s, border-color .2s, background .2s;
}

.auth-form .form-control::placeholder{ color:#94a3b8; }

.auth-form .form-control:focus{
  border-color:#22d3ee;                   /* cyan-400 */
  box-shadow:0 0 0 3px rgba(34,211,238,.25);
  background: rgba(148,163,184,.10);
}

.password-wrap{ position:relative; }

.auth-actions{ margin-top:10px; }

.btn-block{ width:100%; }

.btn.btn-primary{
  height:46px; border-radius:12px; font-weight:700;
}

.form-hint{
  background: rgba(239,68,68,.12);        /* red-500/12 */
  border:1px solid rgba(239,68,68,.25);
  color:#fecaca;                          /* red-200 */
  padding:10px 12px; border-radius:12px;
  margin-bottom:12px; line-height:1.6;
}

.no-bullet{ list-style:none; padding:0; margin:0; }

.muted-center{ text-align:center; color:#94a3b8; font-size:.85rem; margin-top:12px; }



/* دکمه نمایش/عدم نمایش رمز داخل .password-wrap */
.password-wrap { position: relative; }
.password-toggle{
  position: absolute;
  inset-inline-start: 8px;           /* RTL: سمت چپِ فیلد */
  top: 23px;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(148,163,184,.10);
  color: #cbd5e1;                     /* slate-300 */
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.password-toggle:hover{
  border-color: #22d3ee;              /* cyan-400 */
  box-shadow: 0 0 0 3px rgba(34,211,238,.18);
  background: rgba(148,163,184,.16);
}


  /* زبرا استرایپ */
  #todayListsRow table tbody tr { 
    transition: background-color .15s ease, box-shadow .15s ease;
    cursor: pointer;
  }
  #todayListsRow table tbody tr:nth-child(odd)  { background: rgba(255,255,255,.03); }
  #todayListsRow table tbody tr:nth-child(even) { background: rgba(255,255,255,.08); }

  /* Hover عمومی */
  #todayListsRow table tbody tr:hover {
    background: rgba(255,255,255,.14);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  }

  /* پیش‌فاکتور: زرد کم‌رنگ + Hover */
  #todayListsRow table tbody tr[data-status="draft"] {
    background: rgba(255, 215, 0, 0.14) !important; /* زرد لطیف */
  }
  #todayListsRow table tbody tr[data-status="draft"]:hover {
    background: rgba(255, 215, 0, 0.22) !important;
  }

  /* لینک‌شدن محتوا داخل سلول‌ها */
  .rowlink a { 
    display:block; 
    color:inherit; 
    text-decoration:none; 
    padding:6px 4px; 
  }
  .rowlink a:focus { outline: 2px solid rgba(255,255,255,.25); outline-offset: 2px; }

  .alerts{ margin:12px 0 16px; display:grid; gap:8px; }
  .alert{ padding:14px 16px; border-radius:12px; font-size:1rem; line-height:1.8; border:1px solid transparent; }
  .alert-success{ background:rgba(34,197,94,.12); border-color:rgba(34,197,94,.35); color:#0f5132; }
  .alert-error{   background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.35); color:#842029; }
