[hidden] { display: none !important; }

/* صفحة تعديل الأسعار — بسيطة قد ما تقدر: سعر + سويتش + حفظ */

body.admin { padding-bottom: 96px; }

.adm-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, #B41C24 0%, #A8171F 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.adm-head-in {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
}
.adm-head h1 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.2px;
  color: #FFFFFF;
}
.adm-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--red-deep);
  background: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  padding: 5px 10px 5px 6px;
}
.adm-back svg { width: 15px; height: 15px; }
.adm-updated {
  margin-inline-start: auto;
  font-size: .72rem;
  color: rgba(255, 255, 255, .8);
  font-variant-numeric: tabular-nums;
}

.adm-main { padding-top: 16px; }
.adm-intro {
  font-size: .88rem;
  color: var(--ink-soft);
  line-height: 1.8;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.adm-intro b { color: var(--ink); }

.adm-missing {
  margin-top: 10px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--red-deep);
  background: var(--red-tint);
  border: 1px solid #F1CDD0;
  border-radius: 10px;
  padding: 8px 12px;
}
.adm-missing.is-done { color: #16603C; background: #EAF6EE; border-color: #C6E4D1; }

.adm-note {
  margin-top: 14px;
  background: #EAF6EE;
  border: 1px solid #C6E4D1;
  border-radius: 14px;
  padding: 14px;
}
.adm-note-title {
  font-weight: 800;
  color: #16603C;
  font-size: .95rem;
}
.adm-note p + p { margin-top: 4px; font-size: .84rem; color: #2C6A4A; line-height: 1.7; }
.adm-note-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.adm-note-actions .btn { padding: 10px 16px; font-size: .88rem; border-radius: 12px; }

.acat {
  margin-top: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.acat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--red-tint-2);
  border-bottom: 1px solid var(--line-soft);
}
.acat-head .bar {
  width: 3px; height: 16px; border-radius: 2px; background: var(--red);
}
.acat-head h2 { font-size: 1rem; font-weight: 800; }
.acat-head .n { margin-inline-start: auto; font-size: .72rem; color: var(--muted); }

.arow {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.arow:last-child { border-bottom: 0; }
.arow-name {
  font-size: .95rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.arow-name .u { font-size: .7rem; color: var(--muted); font-weight: 500; }

.pfield {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 4px 8px;
  width: 118px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pfield:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(176, 27, 34, .12);
}
.pfield input {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.pfield input::-webkit-outer-spin-button,
.pfield input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pfield .c { font-size: .7rem; color: var(--muted); font-weight: 600; }
.pfield.is-bad { border-color: #C0392B; background: #FDF1EF; }

.switch {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  width: fit-content;
  padding: 2px 0;
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: #E6DADA;
  transition: background .18s ease;
  flex: 0 0 auto;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(60, 40, 15, .3);
  transition: transform .18s ease;
}
.switch input:checked + .track { background: var(--red); }
.switch input:checked + .track::after { transform: translateX(-17px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(176, 27, 34, .22); }
.switch .st {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
}
.switch input:checked ~ .st { color: var(--red-deep); font-weight: 700; }

.adm-more {
  margin-top: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
}
.adm-more summary {
  cursor: pointer;
  padding: 13px 0;
  font-size: .86rem;
  font-weight: 700;
  color: var(--ink-soft);
  list-style: none;
}
.adm-more summary::-webkit-details-marker { display: none; }
.adm-more summary::after { content: "＋"; float: left; color: var(--muted); font-weight: 400; }
.adm-more[open] summary::after { content: "－"; }
.adm-more-body { padding-bottom: 14px; font-size: .82rem; color: var(--muted); line-height: 1.8; }
.adm-file {
  display: inline-flex;
  align-items: center;
  margin: 8px 0;
  background: var(--red-tint-2);
  border: 1px dashed #E3C6C8;
  border-radius: 11px;
  padding: 9px 14px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}
.adm-file input { display: none; }
.adm-hint { margin-top: 6px; }
.adm-reset {
  margin-top: 6px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--red);
  cursor: pointer;
}

.save-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -20px rgba(60, 15, 20, .5);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}
.save-bar-in {
  display: flex;
  align-items: center;
  gap: 12px;
}
.save-state {
  font-size: .78rem;
  color: var(--muted);
  flex: 1 1 auto;
  line-height: 1.5;
}
.save-state.is-bad { color: #A93226; font-weight: 700; }
.save-btn {
  flex: 0 0 auto;
  padding: 14px 26px;
  font-size: 1rem;
  border-radius: 14px;
}

@media (min-width: 700px) {
  .adm-main { max-width: 720px; }
  .arow { grid-template-columns: 1fr 130px auto; }
  .switch { grid-column: auto; }
}
