:root{
  --font: "IRANYekanX", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
}

@font-face{
  font-family:"IRANYekanX";
  src:url("fonts/IRANYekanX-Regular.ttf") format("truetype");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"IRANYekanX";
  src:url("fonts/IRANYekanX-Regular.ttf") format("truetype");
  font-weight:500;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"IRANYekanX";
  src:url("fonts/IRANYekanX-Regular.ttf") format("truetype");
  font-weight:600;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"IRANYekanX";
  src:url("fonts/IRANYekanX-Black.ttf") format("truetype");
  font-weight:700;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"IRANYekanX";
  src:url("fonts/IRANYekanX-Black.ttf") format("truetype");
  font-weight:800;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"IRANYekanX";
  src:url("fonts/IRANYekanX-Black.ttf") format("truetype");
  font-weight:900;
  font-style:normal;
  font-display:swap;
}

:root{
  --page:#f6f6f5;
  --surface:#fff;
  --line:#e6e6e3;
  --line-strong:#d8d8d3;
  --text:#141414;
  --muted:#5f5f5c;
  --muted-2:#8a8a86;
  --orange:#ff7a18;
  --orange-600:#e8680f;
  --orange-tint:#fff3ea;
  --focus-ring: 0 0 0 3px rgba(255,122,24,.18);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 24px rgba(0,0,0,.05);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: var(--font);
  font-size:15px;
  line-height:1.5;
  color:var(--text);
  background: var(--page);
  -webkit-font-smoothing:antialiased;
}

/* کارت/باکس: بدون شیشه — فقط سطح سفید و خط نازک */
.shell{max-width:640px; margin:0 auto; padding:32px 20px 48px; position:relative}
.surface{
  background: var(--surface);
  border:1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.header{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 22px; border-radius:10px; margin-bottom:20px;
}
.brand{display:flex; gap:14px; align-items:center}
.logo{
  width:40px; height:40px; border-radius:8px;
  overflow:hidden;
  display:grid; place-items:center;
  background: var(--surface);
  border:1px solid var(--line);
}
.logo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.title{font-size:1.1rem; font-weight:800; color: var(--text); letter-spacing: -.2px; line-height:1.3}
.subtitle{font-size:13px; color: var(--muted-2); margin-top:2px; font-weight:400}
.badge,
.pill{
  font-size:12px; color: var(--muted);
  padding:6px 10px; border-radius:6px;
  border:1px solid var(--line);
  background: var(--page);
}
.card{margin-top:0; border-radius:10px; padding:24px 22px; box-shadow: var(--shadow)}

/* مراحل: مینیمال */
.steps{
  display:flex; gap:0; flex-wrap:wrap; margin-bottom:20px;
  border-bottom:1px solid var(--line);
  padding-bottom:0;
}
.step{
  padding:10px 12px 12px; margin-bottom:-1px;
  border: none; border-bottom:2px solid transparent;
  color: var(--muted-2);
  font-size:12px; font-weight:500;
  background: none; cursor: default; border-radius:0; white-space: nowrap;
}
.step.active{
  color: var(--text);
  border-bottom-color: var(--orange);
  font-weight:700;
}
.alert{
  margin:0 0 16px; padding:12px 14px; border-radius:8px;
  border:1px solid rgba(255,122,24,.3);
  background: var(--orange-tint);
  color: #4a2e1a; font-size: 14px;
}
.alert[data-kind="error"]{
  border-color:#e5cfc9; background:#fdf6f4; color:#5c3d38;
}
.alert.hidden{display:none}
.grid{display:grid; grid-template-columns: 1fr 1fr; gap:14px}
.grid .full{grid-column: 1 / -1}
.field{display:flex; flex-direction:column; gap:6px}
.field.is-hidden{display:none}
.field span{font-size:12px; color: var(--muted); font-weight:500}
input, select{
  width:100%;
  padding:10px 12px;
  border-radius:7px;
  border:1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit; font-size:14px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus{
  border-color: var(--orange);
  box-shadow: var(--focus-ring);
}
.row{display:flex; gap:10px; align-items:center; margin-top:14px; flex-wrap:wrap}
.hint{font-size:12px; color: var(--muted)}
.btn{
  border:1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  padding:10px 16px; font-size: 14px; font-weight: 600; font-family: inherit;
  border-radius:7px; cursor:pointer; transition: background .12s, border-color .12s, color .12s;
}
.btn:hover{background: var(--page); border-color: var(--line)}
.btn:active{transform: translateY(0)}
.btn.primary{
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}
.btn.primary:hover{ background: var(--orange-600); border-color: var(--orange-600); color: #fff }
.btn.ghost{
  background: transparent;
  border-color: transparent; color: var(--muted);
  font-weight: 500;
}
.btn.ghost:hover{ color: var(--text); background: var(--page); border-color: var(--line) }
.btn:disabled{
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}
.btn.is-loading{
  position: relative; color: transparent !important; pointer-events: none;
}
.btn.is-loading::after{
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.1);
  border-top-color: #fff; animation: btnSpin 0.65s linear infinite;
}
.btn:not(.primary).is-loading::after{
  border-color: rgba(0,0,0,.08);
  border-top-color: var(--orange);
}
@keyframes btnSpin{ to { transform: rotate(360deg); } }
.panel.hidden{display:none}
.otp input{letter-spacing: 3px; text-align:center}
.productsHead{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap}
.rows{display:flex; flex-direction:column; gap:10px; margin-top:12px}
.rowItem{
  display:grid;
  grid-template-columns: 1.6fr .8fr .8fr .9fr auto;
  gap:10px; padding:12px; border-radius:8px; align-items:center;
  background: var(--page); border:1px solid var(--line);
  box-shadow: none;
}
.rowItem .qty{min-width:100px}
.iconBtn{
  width:36px; height:36px; border-radius:7px;
  border:1px solid var(--line); background: var(--surface);
  color: var(--muted);
  font-size:18px; line-height:1; cursor:pointer; transition: border-color .12s, color .12s;
}
.iconBtn:hover{border-color: var(--orange); color: var(--orange)}
.muted{color:var(--muted)}
.mono{font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}
.totals{justify-content:space-between}
.totalValue{font-weight:800; color: var(--text)}
.successBox{
  padding:0; border-radius:0; border: none; background: none;
}
.successTitle{font-size:1.1rem; font-weight:800; margin-bottom:12px; color: var(--text)}
.successRow{display:flex; gap:10px; align-items:baseline; margin:8px 0; flex-wrap:wrap}
.link{color: var(--orange); text-decoration: none; font-weight: 600; word-break: break-all }
.link:hover{ text-decoration: underline }
.small{font-size:12px; color: var(--muted)}

/* ادمین */
.adminGrid{display:grid; grid-template-columns: 1fr 1.2fr; gap:16px}
.adminCard{border-radius:8px; padding:18px 16px; border:1px solid var(--line); background: var(--page)}
.table{width:100%; border-collapse: collapse; font-size:13px}
.table th,.table td{border-bottom:1px solid var(--line); padding:10px 8px; text-align:right; vertical-align:top}
.table th{color:var(--muted); font-weight:600}
.table tbody tr:hover{background: rgba(0,0,0,.02)}
.nowrap{white-space:nowrap}
.stack{display:flex; flex-direction:column; gap:10px}
.adminRow{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.right{margin-right:auto}
@media (max-width:900px){.adminGrid{grid-template-columns:1fr}}

@media (max-width:720px){
  .shell{padding: 20px 16px 40px; max-width: 100%;}
  .grid{grid-template-columns: 1fr}
  .rowItem{grid-template-columns: 1fr 1fr; grid-auto-rows:auto}
  .rowItem .price, .rowItem .lineTotal{grid-column: 1 / -1}
  .steps{ gap:0; }
  .step{ font-size: 11px; margin-right: 10px; }
}
