/* Peyda font (place files in: assets/fonts/peyda/) */

/* Adding Vazirmatn font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn&display=swap');

:root{
  --black:#000000;
  --navy:#032238;
  --yellow:#FFB200;
  --white:#FFFFFF;
  --muted:#F3F4F6;
  --muted2:#E5E7EB;
  --text:#0B1B24;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
    font-family: 'Vazirmatn', sans-serif;
  background:var(--white);
  color:var(--text);
}

/* Ensure Peyda applies INSIDE inputs/selects in all browsers */
input, select, textarea, button{
  font-family: inherit;
  font-size: inherit;
}
input::placeholder, textarea::placeholder{ font-family: inherit; }

.topbar{
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 18px;
}
.topbar-left{display:flex; gap:10px; align-items:center}
.icon-btn{
  width:36px;height:36px;border:0;border-radius:10px;
  background:transparent;color:var(--navy);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
}
.icon-btn:hover{background:rgba(3,34,56,.06)}
.brand{display:flex;align-items:center;gap:10px}
.brand-logo{height:42px; width:auto; display:block}
.brand-mark{
  width:40px;height:40px;border-radius:12px;
  border:2px solid rgba(3,34,56,.15);
  position:relative; display:flex; align-items:center; justify-content:center;
}
.brand-dot{
  width:10px;height:10px;border-radius:50%;
  background:var(--yellow);
  display:inline-block;
}
.brand-name{font-weight:700;color:var(--navy); font-size:14px}

.wrap{max-width:980px;margin:0 auto;padding:10px 18px 48px}
.breadcrumb{
  color:#9CA3AF; font-size:12px; margin:6px 0 10px
}
.section-title{
  display:flex;align-items:center;justify-content:flex-start;
  gap:10px;margin:10px 0 14px
}
.section-title .bar{width:4px;height:22px;background:var(--yellow);border-radius:2px}
.section-title h1, .section-title h2{
  margin:0;font-size:18px;color:var(--navy)
}

/* Ensure the yellow bar is always on the RIGHT side of the title (RTL design) */
.section-title .bar{order:0}
.section-title h1, .section-title h2{order:1}
.note-row{
  display:flex;align-items:center;gap:10px;
  color:#111827;font-size:13px;margin:6px 0 18px
}
.note-row .star{color:var(--yellow); font-size:18px}

.card{
  background:var(--muted);
  border-radius:10px;
  padding:14px;
  margin:10px 0;
}
.form-row{display:grid; grid-template-columns: 1fr; gap:12px}
.input{
  width:100%;
  background:var(--muted);
  border:1px solid var(--muted2);
  border-radius:10px;
  padding:14px 14px;
  font-size:14px;
  outline:none;
}
.input:focus{border-color:rgba(255,178,0,.8); box-shadow:0 0 0 3px rgba(255,178,0,.15)}
.input-wrap{position:relative}
.input-icon{
  position:absolute; left:12px; top:50%; transform:translateY(-50%);
  color:#9CA3AF;
}
.input.pad-left{padding-left:44px}
.small-help{font-size:12px;color:#6B7280;margin-top:6px}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:260px; max-width:100%;
  padding:14px 18px;
  border:0; border-radius:10px;
  background:var(--navy);
  color:var(--white);
  font-weight:700;
  cursor:pointer;
}
.btn:hover{filter:brightness(1.05)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-wrap{margin-top:18px}
.center{display:flex;justify-content:flex-start}

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

.radio-group{
  display:flex; flex-wrap:wrap; gap:10px;
}
.radio-pill{
  display:flex; align-items:center; gap:8px;
  border:1px solid var(--muted2);
  background:var(--muted);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
}
.radio-pill input{accent-color:var(--yellow)}

.alert{
  background:rgba(255,178,0,.12);
  border:1px solid rgba(255,178,0,.35);
  border-radius:10px;
  padding:12px 14px;
  color:#111827;
  font-size:13px;
  margin:12px 0;
}

.seat-legend{display:flex; gap:16px; flex-wrap:wrap; align-items:center; margin:10px 0 14px}
.legend-item{display:flex; gap:8px; align-items:center; font-size:13px; color:#111827}
.swatch{width:14px;height:14px;border-radius:4px}
.swatch.sold{background:#8B0000}
.swatch.hold{background:var(--yellow)}
.swatch.avail{background:#D1D5DB}
.swatch.na{background:#111827}

.seat-board{
  background:var(--muted);
  border:1px solid var(--muted2);
  border-radius:12px;
  padding:14px;
  overflow:auto;
}
.rowline{display:flex; align-items:center; gap:8px; margin:6px 0}
.rowline.aisle{margin:10px 0}
.rowline.aisle .seats{opacity:.35}
.rowlabel{
  width:42px; text-align:center; color:#6B7280; font-size:12px;
}
.seats{
  display:flex; gap:6px; flex-wrap:nowrap;
  direction: rtl;
}
.seat{
  width:22px; height:22px;
  border-radius:6px;
  border:1px solid rgba(3,34,56,.18);
  background:#D1D5DB;
  cursor:pointer;
}
.seat.gap{background:transparent;border:0;cursor:default;width:16px}
.seat.sold{background:#8B0000; cursor:not-allowed}
.seat.hold{background:var(--yellow)}
.seat.hold.other{background:var(--yellow); opacity:.75; cursor:not-allowed}
.seat.na{background:#111827; cursor:not-allowed}
.seat.selected{
  outline:2px solid var(--navy);
  outline-offset:1px;
}

/* Stage label (Step 2) */
.stage-wrap{display:block; margin:6px 0 12px}
.stage{
  width:100%;
  min-width:0;
  text-align:center;
  background:rgba(3,34,56,.08);
  border:1px solid rgba(3,34,56,.12);
  border-radius:10px;
  padding:10px 14px;
  color:var(--navy);
  font-weight:800;
  letter-spacing:.2px;
}

.summary-bar{
  background:rgba(3,34,56,.08);
  border:1px solid rgba(3,34,56,.12);
  border-radius:12px;
  padding:14px;
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:10px;
  font-size:13px;
}
@media(max-width:820px){ .summary-bar{grid-template-columns:1fr} }

/* Flash notices */
.notice{
  border-radius:12px;
  padding:12px 14px;
  font-size:13px;
  margin:12px 0;
  border:1px solid rgba(255,178,0,.35);
  background:rgba(255,178,0,.12);
  color:#111827;
}
.notice.notice-warn{border-color:rgba(220,38,38,.35);background:rgba(220,38,38,.08)}

.addon-table{
  background:var(--muted);
  border:1px solid var(--muted2);
  border-radius:12px;
  overflow:hidden;
}
.addon-row{
  display:grid;
  grid-template-columns: 44px 1fr 180px 180px;
  gap:10px;
  padding:12px 14px;
  border-top:1px solid var(--muted2);
  align-items:center;
}
.addon-row:first-child{border-top:0}
.addon-row .price-old{color:#DC2626; font-weight:700}
.addon-row .price-new{color:#16A34A; font-weight:700}
@media(max-width:820px){
  .addon-row{grid-template-columns:44px 1fr}
}

.rules-box{
  height:260px; overflow:auto;
  background:var(--muted);
  border:1px solid var(--muted2);
  border-radius:12px;
  padding:14px;
  line-height:1.8;
  font-size:13px;
  color:#111827;
}

.checkbox{
  display:flex; align-items:center; gap:10px; margin:12px 0; font-size:13px
}
.checkbox input{accent-color:var(--yellow)}

.hr{height:1px;background:var(--muted2);margin:16px 0}

.kpis{
  display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px;
  margin-top:14px;
}
.kpi{font-size:13px;color:#111827}
.kpi strong{display:block;color:var(--navy);margin-top:4px}

/* =========================
   Step 4 - Cart summary box
   (Keep existing style; add a box under rules)
   ========================= */
.cart-box{padding:14px}
.cart-hd{font-weight:800;color:var(--navy);margin-bottom:10px}
.cart-bd{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.cart-col{background:#fff;border:1px solid var(--muted2);border-radius:12px;padding:12px}
.cart-sub{font-weight:800;color:var(--navy);font-size:13px;margin-bottom:10px}
.cart-list{display:flex;flex-direction:column;gap:10px}
.cart-item{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.cart-item-title{font-size:13px;color:#111827;line-height:1.6}
.cart-item-price{font-size:13px;font-weight:800;color:var(--navy);white-space:nowrap}
.cart-empty{font-size:12px;color:#6B7280;line-height:1.6}
.cart-totals{margin-top:12px;border-top:1px solid var(--muted2);padding-top:12px;display:flex;flex-direction:column;gap:10px}
.cart-row{display:flex;justify-content:space-between;gap:10px;font-size:13px;color:#111827}
.cart-row strong{color:var(--navy)}
.cart-row-total span{font-weight:800;color:#16A34A}
.cart-row-total strong{color:#16A34A}

@media(max-width:820px){
  .cart-bd{grid-template-columns:1fr}
}

/* =========================
   Step 1 UI fidelity fixes
   ========================= */

/* Ensure RTL visual order matches your reference screens (not just text direction). */
.breadcrumb{ text-align:right; }
.section-title{ flex-direction:row-reverse; justify-content:flex-end; }
.section-title .bar{ order:0; }
.section-title h1, .section-title h2{ order:1; }
.note-row{ flex-direction:row-reverse; justify-content:flex-end; }

/* Input icon should sit on the RIGHT in RTL, like the provided design. */
.input-icon{ right:12px; left:auto; }

/* Keep markup stable: pad-left class becomes "pad-right" visually in RTL. */
.input.pad-left{ padding-right:44px; padding-left:14px; }

/* Make fields closer to your screenshot: borderless soft fields + slightly taller. */
.input{
  border:0;
  background:#F3F4F6;
  border-radius:10px;
  padding:16px 16px;
}
.input:focus{ border:0; box-shadow:0 0 0 3px rgba(255,178,0,.18); }

/* File input alignment */
input[type="file"].input{ padding:14px 14px; }

/* Step1: date row (calendar button + date field) */
.date-row{
  display:flex;
  gap:12px;
  align-items:center;
}
.btn-mini{
  border:0;
  background:var(--yellow);
  color:#111827;
  padding:12px 14px;
  border-radius:10px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.btn-mini:hover{filter:brightness(0.97)}

/* Step1: custom file field */
.file-fake{
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
}
.file-fake .file-placeholder{color:#9CA3AF}
.file-fake .file-icon{color:#9CA3AF}

/* =========================
   Jalali (Shamsi) Picker
   ========================= */
.jalali-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.jalali-overlay.is-open{display:flex}
.jalali-modal{
  width:min(460px, calc(100% - 28px));
  background:#fff;
  border-radius:14px;
  box-shadow:0 12px 40px rgba(0,0,0,.22);
  overflow:hidden;
}
.jalali-modal .hd{
  padding:14px 16px;
  background:rgba(3,34,56,.06);
  color:var(--navy);
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.jalali-modal .bd{padding:16px}
.jalali-grid{display:grid; grid-template-columns: 1fr 1fr 1fr; gap:10px}
.jalali-grid select{
  width:100%;
  background:#F3F4F6;
  border:0;
  border-radius:10px;
  padding:14px 14px;
  outline:none;
}
.jalali-actions{display:flex; gap:10px; justify-content:flex-start; margin-top:14px}
.btn-ghost{
  border:1px solid rgba(3,34,56,.15);
  background:transparent;
  color:var(--navy);
  padding:12px 14px;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
}

/* Jalali date modal (simple Shamsi picker) */
.jalali-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:18px;
}
.jalali-overlay.is-open{display:flex}
.jalali-modal{
  width:420px;
  max-width:100%;
  background:#fff;
  border-radius:16px;
  padding:16px;
  box-shadow:0 12px 32px rgba(0,0,0,.18);
}
.jalali-modal .modal-title{font-weight:800;color:var(--navy);margin:0 0 10px}
.jalali-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-top:10px}
.jalali-actions{display:flex;gap:10px;justify-content:flex-start;margin-top:14px}
.btn-ghost{
  border:1px solid var(--muted2);
  background:#fff;
  color:var(--navy);
  padding:12px 14px;
  border-radius:10px;
  font-weight:700;
  cursor:pointer;
}
.btn-ghost:hover{background:rgba(3,34,56,.04)}


/* ------------------------------------------------------------
   Map-like seat layout (fan / blocks / aisles)
   Enabled by JS: .seat-board--map on #seatBoard
------------------------------------------------------------ */
.seat-board.seat-board--map{
  padding: 18px 12px 22px;
}

.seat-board.seat-board--map .rowline{
  justify-content: center;
  gap: 10px;
  padding-left: var(--row-pad, 0px);
  padding-right: var(--row-pad, 0px);
}

.seat-board.seat-board--map .rowlabel{
  width: 34px;
  font-size: 11px;
  opacity: .65;
}

.seat-board.seat-board--map .seats.seats-map{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  direction: ltr; /* visual map left->right */
}

.seat-board.seat-board--map .seat-block{
  display: flex;
  gap: 6px;
  padding: 2px 4px;
  transform: rotate(var(--block-rot, 0deg));
  transform-origin: center center;
  will-change: transform;
}

.seat-board.seat-board--map .gap-run{
  height: 22px; /* match seat height */
  flex: 0 0 auto;
}

@media (max-width: 520px){
  .seat-board.seat-board--map .seat{
    width: 20px;
    height: 20px;
    border-radius: 6px;
  }
  .seat-board.seat-board--map .gap-run{
    height: 20px;
  }
}

/* Stage look more like curved front */
.stage{
  border-radius: 999px;
}


/* ------------------------------------------------------------
   SVG Plan seat layout (closer to architectural seating plan)
   Enabled by JS: .seat-board--svg on #seatBoard
------------------------------------------------------------ */
.seat-board.seat-board--svg{
  padding: 12px;
}

.seat-svg{
  display: block;
}

.seat-map-border{
  fill: rgba(255,255,255,.45);
  stroke: rgba(3,34,56,.14);
  stroke-width: 1;
}

.seat-map-aisle{
  fill: rgba(3,34,56,.06);
  stroke: rgba(3,34,56,.08);
  stroke-dasharray: 6 6;
}

.seat-row-label{
  font-size: 12px;
  fill: rgba(11,27,36,.65);
  font-weight: 800;
}

.seat-rect{
  fill: #D1D5DB;
  stroke: rgba(3,34,56,.18);
  stroke-width: 1;
  cursor: pointer;
}

.seat-rect:hover{ filter: brightness(0.96); }

.seat-rect.sold{
  fill: #8B0000;
  cursor: not-allowed;
}

.seat-rect.na{
  fill: #111827;
  cursor: not-allowed;
}

.seat-rect.hold{ fill: var(--yellow); }
.seat-rect.hold.other{ opacity: .75; cursor: not-allowed; }

.seat-rect.selected{
  stroke: var(--navy);
  stroke-width: 2;
}

.seat-rect[data-disabled="1"]{ cursor: not-allowed; }


/* =========================
   Admin panel styles
   ========================= */
.admin-wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 14px;
}
.admin-topbar{
  background:#fff;
  border:1px solid var(--muted2);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.admin-brand{display:flex;align-items:center;gap:12px}
.admin-brand img{height:42px;width:auto;border-radius:10px}
.admin-brand .title{font-weight:800;color:var(--navy)}
.admin-muted{color:rgba(11,27,36,.65);font-size:13px;line-height:1.6}
.admin-nav{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.admin-nav a{
  text-decoration:none;
  color:var(--navy);
  background:rgba(3,34,56,.06);
  border:1px solid rgba(3,34,56,.10);
  padding:8px 10px;
  border-radius: 12px;
  font-size: 13px;
}
.admin-nav a.active{
  background:var(--navy);
  color:#fff;
  border-color: var(--navy);
}
.admin-card{
  background:#fff;
  border:1px solid var(--muted2);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
  margin-top: 14px;
}
.admin-actions{display:flex;gap:10px;align-items:center}
.admin-btn{
  border:0;
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--navy);
  color:#fff;
  cursor:pointer;
  font-size: 13px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.admin-btn.ghost{
  background: transparent;
  color: var(--navy);
  border:1px solid rgba(3,34,56,.18);
}
.admin-btn:hover{filter: brightness(.97)}
.admin-form label{display:block;font-size:12px;color:rgba(11,27,36,.7);margin-bottom:6px}
.admin-form input, .admin-form select{
  width:100%;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid rgba(0,0,0,.12);
  outline:none;
  font-family: inherit;
}
.admin-form .row{display:flex;gap:12px;flex-wrap:wrap}
.admin-form .row>div{flex:1;min-width:200px}
.admin-table{
  width:100%;
  border-collapse:collapse;
  margin-top:12px;
}
.admin-table th, .admin-table td{
  border:1px solid rgba(0,0,0,.08);
  padding:10px;
  vertical-align:top;
  font-size: 13px;
}
.admin-table th{background:rgba(243,244,246,.65);color:rgba(11,27,36,.9);text-align:right}
.admin-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .admin-grid{grid-template-columns: repeat(2, minmax(0,1fr))}
}
.admin-stat{
  border:1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 12px;
  background: rgba(243,244,246,.35);
}
.admin-stat .k{font-size:12px;color:rgba(11,27,36,.65)}
.admin-stat .v{font-size:16px;font-weight:800;color:var(--navy);margin-top:6px}
.notice-ok, .notice-err{
  margin-top:12px;
  padding:10px 12px;
  border-radius: 14px;
  font-size: 13px;
}
.notice-ok{background:rgba(34,197,94,.12);border:1px solid rgba(34,197,94,.22);color:rgba(13,93,41,1)}
.notice-err{background:rgba(239,68,68,.10);border:1px solid rgba(239,68,68,.22);color:rgba(127,29,29,1)}
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(243,244,246,.7);
  color:rgba(11,27,36,.85);
}
.badge.paid{background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.22)}
.badge.pending{background:rgba(234,179,8,.14);border-color:rgba(234,179,8,.25)}
.badge.failed{background:rgba(239,68,68,.10);border-color:rgba(239,68,68,.22)}
.small{font-size:12px;color:rgba(11,27,36,.7)}
code{background:rgba(3,34,56,.06);padding:2px 6px;border-radius:8px}

