:root {
  --bg: #020817;
  --cyan: #24ECFF;
  --blue: #0095FF;
  --green: #2CF586;
  --green-deep: #00C95A;
  --gold: #FFC928;
  --red: #FF5B77;
  --white: #F4FAFF;
  --muted: #9FC0E4;
  --glass: rgba(5, 21, 48, 0.74);
  --glass-strong: rgba(5, 22, 52, 0.88);
  --border: rgba(36, 236, 255, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--white);
  font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 85% -8%, rgba(0, 195, 255, 0.2), transparent 62%),
    radial-gradient(850px 520px at 12% 108%, rgba(36, 245, 134, 0.14), transparent 60%),
    url('/bg.svg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 20px 18px 42px; }

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow:
    0 0 32px rgba(0, 170, 255, 0.2),
    inset 0 1px 0 rgba(128, 244, 255, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.pad { padding: 22px 24px; }
.spacer { height: 18px; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.hidden { display: none !important; }

h1 { font-size: 24px; font-weight: 900; line-height: 1.25; }
h1 span, .accent { color: var(--cyan); text-shadow: 0 0 16px rgba(36, 236, 255, 0.72); }
h2 { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.sub { color: var(--muted); font-size: 13px; line-height: 1.8; }

/* ---- Top header ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-en {
  font-size: 21px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.2px;
  line-height: 1.1;
  color: #fff;
}
.brand-en span { color: var(--cyan); text-shadow: 0 0 14px rgba(36, 236, 255, 0.75); }
.brand-fa { font-size: 15px; font-weight: 800; color: #E6F6FF; line-height: 1.3; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.logo-box {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(10, 77, 255, 0.35), rgba(0, 229, 255, 0.28));
  border: 1.5px solid rgba(56, 242, 255, 0.85);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.55), inset 0 0 14px rgba(0, 229, 255, 0.28);
  color: #E9FFFF;
}
.logo-box svg { width: 28px; height: 28px; filter: drop-shadow(0 0 6px rgba(36, 236, 255, 0.9)); }
.logo-box.lg { width: 64px; height: 64px; border-radius: 18px; }
.logo-box.lg svg { width: 36px; height: 36px; }

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(5, 22, 52, 0.78);
  border: 1px solid rgba(36, 236, 255, 0.42);
  color: #DDF5FF;
  backdrop-filter: blur(10px);
}
.pill svg { width: 15px; height: 15px; flex-shrink: 0; }
.pill.green { border-color: rgba(44, 245, 134, 0.55); color: #A6FFD0; background: rgba(6, 48, 34, 0.65); }
.pill.green svg { color: var(--green); }
.pill.cyan { border-color: rgba(36, 236, 255, 0.52); color: #B4F4FF; }
.pill.cyan svg { color: var(--cyan); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.badge.ok { background: rgba(0, 240, 120, 0.16); color: #8BFFCA; border: 1px solid rgba(0, 240, 120, 0.52); }
.badge.warn { background: rgba(255, 201, 40, 0.15); color: #FFE18A; border: 1px solid rgba(255, 201, 40, 0.5); }
.badge.bad { background: rgba(255, 91, 119, 0.16); color: #FFA2B4; border: 1px solid rgba(255, 91, 119, 0.55); }

/* ---- Inputs & Buttons ---- */
label { display: block; font-size: 12.5px; color: #C2DCFA; margin: 12px 0 6px; font-weight: 700; }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .in-ico {
  position: absolute;
  right: 13px;
  width: 18px;
  height: 18px;
  color: #82B7E8;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.input-wrap .in-ico svg { width: 18px; height: 18px; }

.input-wrap .eye-btn {
  position: absolute;
  left: 10px;
  background: transparent;
  border: 0;
  color: #8FC0EC;
  cursor: pointer;
  padding: 5px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  transition: color 0.15s;
}
.input-wrap .eye-btn:hover { color: var(--cyan); }
.input-wrap .eye-btn svg { width: 18px; height: 18px; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(36, 236, 255, 0.42);
  background: rgba(3, 14, 34, 0.85);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  direction: ltr;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder { color: #6E91B8; }
input.rtl-input, select { direction: rtl; text-align: right; }
.input-wrap input { padding-right: 42px; }
.input-wrap input.has-left { padding-left: 46px; }
.input-wrap select { padding-right: 42px; }

input:focus, select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(36, 236, 255, 0.42);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 11px 22px;
  border-radius: 12px;
  border: 1px solid rgba(110, 240, 255, 0.8);
  background: linear-gradient(135deg, #0A4DFF 0%, #00A8FF 60%, #24ECFF 100%);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(0, 180, 255, 0.45);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(36, 236, 255, 0.78); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn.green {
  background: linear-gradient(90deg, #17D96D 0%, #4AFF9E 50%, #19DC70 100%);
  color: #022411;
  border: 1px solid #A4FFD0;
  box-shadow: 0 0 24px rgba(44, 245, 134, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn.green:hover {
  box-shadow: 0 0 34px rgba(44, 245, 134, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  filter: brightness(1.04);
}
.btn.ghost {
  background: rgba(7, 26, 58, 0.82);
  border-color: rgba(36, 236, 255, 0.42);
  color: #E2F4FF;
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--cyan); box-shadow: 0 0 16px rgba(36, 236, 255, 0.35); }
.btn.danger { background: rgba(153, 27, 27, 0.85); border-color: #F87171; box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.btn.full { width: 100%; padding: 13px 20px; font-size: 15px; border-radius: 13px; }

.msg { margin-top: 14px; padding: 11px 14px; border-radius: 12px; font-size: 13px; line-height: 1.8; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(255, 91, 119, 0.16); border: 1px solid rgba(255, 91, 119, 0.6); color: #FFC6D0; }
.msg.ok { background: rgba(0, 240, 120, 0.14); border: 1px solid rgba(0, 240, 120, 0.55); color: #B8FFDC; }
.msg.warn { background: rgba(255, 201, 40, 0.14); border: 1px solid rgba(255, 201, 40, 0.55); color: #FFE8A3; }

/* ---- Login page ---- */
.login-stage {
  display: flex;
  justify-content: center;
  padding: 28px 0 18px;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 455px;
  padding: 46px 28px 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(6, 26, 62, 0.84) 0%, rgba(4, 17, 42, 0.88) 100%);
  border: 1.5px solid rgba(45, 232, 255, 0.62);
  box-shadow:
    0 0 42px rgba(0, 196, 255, 0.28),
    inset 0 0 28px rgba(0, 175, 255, 0.12);
}

.login-float-logo {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
}

.login-title-en {
  font-size: 30px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.3px;
  line-height: 1.15;
}
.login-title-en span { color: var(--cyan); text-shadow: 0 0 18px rgba(36, 236, 255, 0.85); }

.login-title-fa {
  font-size: 26px;
  font-weight: 900;
  margin-top: 2px;
  color: #fff;
}

.login-sub-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 16px;
  color: #BBD8F6;
  font-size: 13px;
}
.login-sub-line::before, .login-sub-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(36, 236, 255, 0.55), transparent);
}

.secure-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  background: rgba(5, 34, 68, 0.72);
  border: 1px solid rgba(36, 236, 255, 0.36);
  font-size: 13px;
  color: #DDF4FF;
}
.secure-banner svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; }

.login-opts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 18px;
  font-size: 12.5px;
}

.rem-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #C7E0F8;
  cursor: pointer;
  font-weight: 600;
}
.rem-check input { width: 16px; height: 16px; accent-color: var(--green); color-scheme: dark; }

.link-btn {
  background: none;
  border: 0;
  color: var(--cyan);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.link-btn:hover { color: #8EF6FF; }

.tg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 16px;
}
.tg-row::before, .tg-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(36, 236, 255, 0.45), transparent);
}

.tg-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(5, 28, 60, 0.85);
  border: 1px solid rgba(36, 236, 255, 0.55);
  color: #EAF8FF;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s;
  white-space: nowrap;
}
.tg-pill svg { width: 18px; height: 18px; color: var(--cyan); }
.tg-pill .tg-id { color: var(--cyan); font-weight: 800; }
.tg-pill:hover {
  background: rgba(10, 48, 92, 0.92);
  box-shadow: 0 0 20px rgba(36, 236, 255, 0.5);
  transform: translateY(-1px);
}

.tg-caption {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: -8px;
  margin-bottom: 14px;
}

.login-feats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(36, 236, 255, 0.22);
  text-align: center;
}
.feat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #C2DFF8;
  line-height: 1.5;
}
.feat-item svg { width: 22px; height: 22px; color: var(--green); filter: drop-shadow(0 0 6px rgba(44, 245, 134, 0.5)); }
.feat-item.cyan svg { color: var(--cyan); filter: drop-shadow(0 0 6px rgba(36, 236, 255, 0.55)); }

/* ---- Panel Hero ---- */
.hero {
  text-align: center;
  margin: 6px 0 24px;
}
.hero-title {
  font-size: clamp(22px, 3.6vw, 34px);
  font-weight: 900;
  line-height: 1.4;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}
.hero-title .hl-green {
  color: var(--green);
  text-shadow: 0 0 20px rgba(44, 245, 134, 0.65);
}
.hero-sub {
  margin-top: 8px;
  font-size: 14.5px;
  color: #CBE4FD;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--green);
  background: rgba(14, 72, 48, 0.55);
  border: 1px solid rgba(44, 245, 134, 0.55);
}

/* ---- Carrier Cards ---- */
.carriers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 640px) { .carriers { grid-template-columns: 1fr; } }

.carrier {
  padding: 24px 22px;
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(6, 26, 62, 0.78) 0%, rgba(4, 17, 42, 0.84) 100%);
  border: 1.5px solid rgba(36, 236, 255, 0.48);
  box-shadow: 0 0 26px rgba(0, 165, 255, 0.18), inset 0 1px 0 rgba(120, 242, 255, 0.25);
  backdrop-filter: blur(14px);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.carrier.on:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 34px rgba(36, 236, 255, 0.42), inset 0 1px 0 rgba(155, 248, 255, 0.4);
  transform: translateY(-3px);
}
.carrier.off { opacity: 0.68; }

.carrier .ico {
  width: 66px;
  height: 66px;
  margin-bottom: 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(36, 236, 255, 0.26) 0%, rgba(4, 18, 44, 0.92) 72%);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 22px rgba(36, 236, 255, 0.55);
  color: #fff;
}
.carrier .ico svg { width: 32px; height: 32px; filter: drop-shadow(0 0 6px rgba(36, 236, 255, 0.85)); }
.carrier h3 { font-size: 19px; font-weight: 900; margin-bottom: 6px; color: #fff; }
.carrier .c-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.7; min-height: 22px; }
.carrier .btn.green { min-width: 176px; border-radius: 13px; }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
  justify-content: center;
  cursor: pointer;
}
.check input { width: 17px; height: 17px; accent-color: var(--cyan); color-scheme: dark; }

/* ---- 3-Step Visual Guide ---- */
.guide-card { padding: 20px 22px; }
.guide-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}
.guide-head svg { width: 22px; height: 22px; color: var(--cyan); filter: drop-shadow(0 0 8px rgba(36, 236, 255, 0.7)); }
.guide-head h2 { margin: 0; font-size: 17px; }

.guide-body {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.guide-steps {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
}
.step-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(4, 19, 44, 0.78);
  border: 1px solid rgba(36, 236, 255, 0.36);
  font-size: 12.8px;
  line-height: 1.75;
  color: #D6ECFF;
}
.step-num {
  position: absolute;
  top: 7px;
  right: 9px;
  font-size: 11px;
  font-weight: 900;
  color: var(--cyan);
  opacity: 0.9;
}
.step-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(36, 236, 255, 0.12);
  border: 1px solid rgba(36, 236, 255, 0.38);
  color: var(--green);
}
.step-ico.cyan { color: var(--cyan); }
.step-ico svg { width: 20px; height: 20px; }
.step-arrow {
  display: grid;
  place-items: center;
  color: var(--cyan);
  opacity: 0.75;
}
.step-arrow svg { width: 18px; height: 18px; }

.guide-art {
  width: 104px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(36, 236, 255, 0.2), rgba(4, 18, 44, 0.8));
  border: 1px solid rgba(36, 236, 255, 0.35);
  color: var(--cyan);
}
.guide-art svg { width: 64px; height: 64px; filter: drop-shadow(0 0 10px rgba(36, 236, 255, 0.6)); }

@media (max-width: 860px) {
  .guide-body { flex-direction: column; }
  .guide-steps { grid-template-columns: 1fr; }
  .step-arrow { display: none; }
  .guide-art { display: none; }
}

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 8, 23, 0.72);
  backdrop-filter: blur(8px);
}
.modal-backdrop.open { display: flex; }

.modal {
  width: 100%;
  max-width: 550px;
  max-height: 94vh;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(6, 27, 64, 0.94) 0%, rgba(4, 17, 42, 0.96) 100%);
  border: 1.5px solid rgba(48, 236, 255, 0.72);
  box-shadow: 0 0 46px rgba(0, 200, 255, 0.38), inset 0 1px 0 rgba(160, 248, 255, 0.35);
}

.modal-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
}
.modal-grid2 label { margin-top: 10px; line-height: 1.4; }
.modal-grid2 label .sub { line-height: 1.2; font-size: 11.5px; }
@media (max-width: 540px) {
  .modal-grid2 { grid-template-columns: 1fr; }
}

/* ---- Interactive iPhone Model Picker ---- */
.model-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 6px;
}
.mp-label {
  margin: 0;
  font-size: 12.5px;
  color: #C2DCFA;
  font-weight: 700;
}
.mp-selected {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(5, 24, 56, 0.85);
  border: 1px solid rgba(36, 236, 255, 0.32);
  direction: ltr;
}
.mp-selected.picked {
  color: #032613;
  background: linear-gradient(90deg, #2CF586, #24ECFF);
  border-color: #B4FFE0;
  box-shadow: 0 0 14px rgba(44, 245, 134, 0.48);
}

.model-picker {
  padding: 10px;
  border-radius: 14px;
  background: rgba(3, 15, 38, 0.84);
  border: 1px solid rgba(36, 236, 255, 0.4);
  box-shadow: inset 0 0 18px rgba(0, 165, 255, 0.1);
}

.mp-series {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
}
@media (max-width: 500px) {
  .mp-series { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.mp-tab {
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 10px;
  border: 1px solid rgba(36, 236, 255, 0.25);
  background: rgba(6, 24, 56, 0.72);
  color: #A8CBEB;
  font-family: inherit;
  font-size: 11.8px;
  font-weight: 800;
  transition: 0.16s;
  position: relative;
}
.mp-tab:hover {
  border-color: rgba(36, 236, 255, 0.65);
  color: #fff;
}
.mp-tab.active {
  background: linear-gradient(135deg, rgba(10, 77, 255, 0.55), rgba(36, 236, 255, 0.32));
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 14px rgba(36, 236, 255, 0.42);
}
.mp-tab.has-sel::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.mp-variants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 7px;
}

.mp-card {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid rgba(36, 236, 255, 0.28);
  background: rgba(5, 22, 52, 0.85);
  color: #DCF1FF;
  font-family: inherit;
  font-size: 12.2px;
  font-weight: 700;
  transition: transform 0.14s, border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.mp-card:hover {
  border-color: var(--cyan);
  background: rgba(8, 34, 76, 0.94);
  transform: translateY(-1px);
}
.mp-card.selected {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(12, 76, 52, 0.88), rgba(6, 46, 56, 0.92));
  color: #B8FFDC;
  box-shadow: 0 0 16px rgba(44, 245, 134, 0.44), inset 0 1px 0 rgba(164, 255, 208, 0.35);
}
.mp-ico {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  flex-shrink: 0;
}
.mp-card.selected .mp-ico { color: var(--green); }
.mp-ico svg { width: 16px; height: 16px; }
.mp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Shortcut Bar (Main Panel) & Drawer Shortcut ---- */
.shortcut-bar {
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(6, 34, 68, 0.86), rgba(5, 44, 48, 0.78));
  border: 1px solid rgba(44, 245, 134, 0.45);
  box-shadow: 0 0 20px rgba(36, 236, 255, 0.14);
}
.shortcut-info {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 220px;
}
.shortcut-ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(44, 245, 134, 0.14);
  border: 1px solid rgba(44, 245, 134, 0.52);
  color: var(--green);
}
.shortcut-ico svg { width: 21px; height: 21px; }
.shortcut-title { font-size: 13.5px; font-weight: 800; color: #EAFFF4; margin-bottom: 2px; }
.shortcut-btn { white-space: nowrap; }

.drawer-shortcut-wrap {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed rgba(36, 236, 255, 0.28);
}
.shortcut-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(10, 68, 86, 0.9), rgba(10, 86, 56, 0.86));
  border: 1px solid rgba(44, 245, 134, 0.62);
  color: #C4FFE0;
  font-size: 12.2px;
  font-weight: 800;
  text-decoration: none;
  transition: 0.16s;
}
.shortcut-link svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }
.shortcut-link:hover {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(44, 245, 134, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-title-wrap h2 { margin-bottom: 2px; font-size: 19px; }
.modal-title-wrap .sub { font-size: 12px; line-height: 1.5; }
.modal-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(36, 236, 255, 0.14);
  border: 1.5px solid rgba(56, 240, 255, 0.72);
  box-shadow: 0 0 18px rgba(36, 236, 255, 0.4);
  color: var(--green);
}
.modal-ico svg { width: 26px; height: 26px; }

.hint { margin-top: 8px; font-size: 12px; }
.modal-check {
  justify-content: flex-start;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(3, 18, 44, 0.72);
  border: 1px solid rgba(36, 236, 255, 0.28);
  color: #D2ECFF;
  font-size: 12.2px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn.green { flex: 1; }

.guide-drawer {
  margin: 10px 0 4px;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(3, 18, 44, 0.82);
  border: 1px solid rgba(36, 236, 255, 0.42);
}
.guide-drawer summary {
  cursor: pointer;
  font-size: 12.8px;
  font-weight: 800;
  color: var(--cyan);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.guide-drawer summary::-webkit-details-marker { display: none; }
.guide-sum-text { flex: 1; }
.guide-sum-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(36, 236, 255, 0.14);
  border: 1px solid rgba(36, 236, 255, 0.44);
  color: #B4F6FF;
  white-space: nowrap;
}
.guide-drawer summary::after { content: '▾'; font-size: 14px; transition: transform 0.2s; }
.guide-drawer:not([open]) summary::after { transform: rotate(90deg); }
.modal-guide-list {
  margin-top: 9px;
  padding-right: 18px;
  font-size: 12.2px;
  line-height: 1.85;
  color: #CFE6FF;
}
.modal-guide-list li { margin-bottom: 4px; }

/* ---- Admin Table ---- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: rgba(0, 140, 255, 0.24); color: var(--cyan); padding: 10px 8px; text-align: center; }
td { padding: 10px 8px; text-align: center; border-bottom: 1px solid rgba(36, 236, 255, 0.14); }
td.name { direction: ltr; font-weight: 800; }
td.phone { direction: ltr; font-family: Consolas, monospace; font-size: 12.5px; color: #A6FFD0; white-space: nowrap; }
td.serial { direction: ltr; font-family: Consolas, monospace; font-size: 12px; color: #B9DCFF; white-space: pre-line; line-height: 1.5; }
.actions { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.secret {
  white-space: pre;
  direction: ltr;
  font-family: Consolas, monospace;
  background: rgba(2, 11, 28, 0.9);
  border: 1px dashed var(--cyan);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  word-break: break-all;
  user-select: all;
}

/* ---- Full Mobile & Tablet Responsive Overrides (iPhone / Android) ---- */
@media (max-width: 820px) {
  body { background-attachment: scroll; }

  /* Transform 10-column admin table into sleek glassmorphic mobile cards */
  .table-wrap { overflow-x: visible; }
  table, tbody { display: block; width: 100%; }
  thead { display: none; }
  tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 14px 13px;
    margin-bottom: 12px;
    border-radius: 15px;
    background: rgba(4, 19, 44, 0.86);
    border: 1px solid rgba(36, 236, 255, 0.34);
    box-shadow: 0 0 18px rgba(0, 150, 255, 0.12);
  }
  tbody td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 4px 2px;
    text-align: right;
    border-bottom: 0;
    min-width: 0;
    word-break: break-word;
  }
  tbody td[data-label]::before {
    content: attr(data-label);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
    opacity: 0.9;
  }
  tbody td.name, tbody td.phone, tbody td.serial {
    direction: rtl;
    text-align: right;
  }
  tbody td.cell-head {
    grid-column: 1 / 2;
    font-size: 15px;
    color: var(--cyan);
  }
  tbody td.cell-status {
    grid-column: 2 / 3;
    align-items: flex-end;
  }
  tbody td.cell-full,
  tbody td.cell-actions {
    grid-column: 1 / -1;
  }
  tbody td.cell-actions {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed rgba(36, 236, 255, 0.24);
  }
  tbody td.cell-actions .actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }
  tbody td.cell-actions .btn.small {
    flex: 1 1 auto;
    padding: 8px 10px;
    font-size: 12px;
  }
  tbody tr td[colspan] {
    grid-column: 1 / -1;
    align-items: center;
    text-align: center;
    padding: 16px 8px;
  }
}

@media (max-width: 640px) {
  .wrap { padding: 14px 12px 32px; }
  .pad { padding: 16px 14px; }
  .glass { border-radius: 17px; }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
  }
  .brand { gap: 10px; }
  .logo-box { width: 44px; height: 44px; border-radius: 12px; }
  .logo-box svg { width: 24px; height: 24px; }
  .brand-en { font-size: 18px; }
  .brand-fa { font-size: 13.5px; }
  .brand-sub { font-size: 11px; }

  .topbar .row {
    gap: 6px;
    justify-content: space-between;
  }
  .pill, .badge {
    font-size: 11px;
    padding: 4px 10px;
    gap: 5px;
  }

  /* Prevent iOS Safari auto-zoom when focusing inputs */
  input, select, textarea {
    font-size: 16px;
    padding: 11px 12px;
  }
  .input-wrap input { padding-right: 40px; }
  .input-wrap input.has-left { padding-left: 44px; }

  /* Login mobile polish */
  .login-stage { padding: 26px 0 12px; }
  .login-card { padding: 42px 18px 20px; border-radius: 20px; }
  .logo-box.lg { width: 56px; height: 56px; border-radius: 15px; }
  .logo-box.lg svg { width: 31px; height: 31px; }
  .login-float-logo { top: -28px; }
  .login-title-en { font-size: 25px; }
  .login-title-fa { font-size: 21px; }
  .login-sub-line { font-size: 12px; }
  .secure-banner { font-size: 12px; padding: 9px 11px; }
  .login-opts { flex-wrap: wrap; gap: 8px; }
  .tg-pill { padding: 7px 14px; font-size: 12.2px; }
  .login-feats { gap: 6px; padding-top: 14px; }
  .feat-item { font-size: 10.8px; }

  /* Panel hero, carrier cards & shortcut bar */
  .hero { margin: 2px 0 16px; }
  .hero-title { font-size: 20px; }
  .hero-sub { font-size: 12.8px; gap: 5px; }
  .chip { font-size: 11.8px; padding: 2px 8px; }

  .carriers { gap: 12px; }
  .carrier { padding: 18px 15px; border-radius: 17px; }
  .carrier .ico { width: 54px; height: 54px; margin-bottom: 10px; }
  .carrier .ico svg { width: 26px; height: 26px; }
  .carrier h3 { font-size: 17px; }
  .carrier .c-sub { font-size: 12px; margin-bottom: 13px; }
  .carrier .btn.green { width: 100%; min-width: 0; }

  .guide-card { padding: 16px 14px; }
  .guide-head h2 { font-size: 15.5px; }
  .step-box { padding: 12px 13px; font-size: 12.2px; }
  .shortcut-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 13px;
    gap: 10px;
  }
  .shortcut-info { min-width: 0; }
  .shortcut-btn { width: 100%; padding: 10px 14px; font-size: 13px; }

  /* Modal & iPhone Model Picker on mobile (use dvh for iOS Safari bar) */
  .modal-backdrop {
    padding: 10px;
    align-items: center;
  }
  .modal {
    max-width: 100%;
    max-height: 90dvh;
    padding: 16px 14px;
    border-radius: 18px;
  }
  .modal-head { gap: 8px; margin-bottom: 8px; }
  .modal-ico { width: 40px; height: 40px; border-radius: 11px; }
  .modal-ico svg { width: 22px; height: 22px; }
  .modal-title-wrap h2 { font-size: 16.5px; }
  .modal-title-wrap .sub { font-size: 11.5px; }
  .guide-drawer { padding: 8px 11px; }
  .guide-drawer summary { font-size: 12px; flex-wrap: wrap; }
  .shortcut-link { width: 100%; justify-content: center; font-size: 12px; }
  .mp-variants { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .mp-card { padding: 8px 6px; font-size: 11.8px; gap: 5px; }
  .modal-check { font-size: 11.5px; padding: 8px 10px; }
  .modal-actions { gap: 8px; margin-top: 12px; }
  .modal-actions .btn { padding: 11px 14px; font-size: 13.5px; }

  /* Admin create-user form on mobile */
  .grid2 { grid-template-columns: 1fr; gap: 8px; }
  #create { width: 100%; }
}
