/* Danlo shared styles: used by danlo-home.html, danlo-movie.html and danlo-series.html */
:root {
  --bg:#0b0b12;
  --surface:#14141e;
  --line:#22222e;
  --accent:#8b5cf6;
  --accent-soft:#a78bfa;
  --text:#f4f4f8;
  --muted:#9a9aaa;
  --container:1280px;
}
* {
  box-sizing:border-box;
  margin:0;
  padding:0;
}
html {
  scroll-behavior:smooth;
  overflow-x:hidden;
}
body {
  overflow-x:clip;
  font-family:"Vazirmatn",Tahoma,system-ui,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
}
a {
  color:inherit;
  text-decoration:none;
}
button, input {
  font:inherit;
  color:inherit;
  background:none;
  border:0;
  outline:none;
}
button {
  cursor:pointer;
}
input::placeholder {
  color:var(--muted);
}
svg {
  width:1.2em;
  height:1.2em;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0;
}
:focus-visible {
  outline:2px solid var(--accent-soft);
  outline-offset:2px;
}
img {
  max-width:100%;
}
.container {
  max-width:var(--container);
  margin-inline:auto;
  padding-inline:24px;
}
.logo-mark {
  width:34px;
  height:34px;
  fill:var(--accent);
  stroke:none;
}

/* Header */
.header {
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(11,11,18,.85);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.header-inner {
  display:flex;
  align-items:center;
  gap:20px;
  height:72px;
}
.logo {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:1.45rem;
  font-weight:900;
  line-height:1.1;
  flex-shrink:0;
}
.logo h1 {
  font:inherit;
}
.logo small {
  display:block;
  font-size:.6rem;
  font-weight:400;
  color:var(--muted);
}
.nav {
  display:flex;
  gap:22px;
  font-size:.92rem;
  color:var(--muted);
}
.nav a {
  position:relative;
  padding:6px 0;
}
.nav a:hover, .nav a.active {
  color:var(--text);
}
.nav a.active::after {
  content:"";
  position:absolute;
  inset-inline:0;
  bottom:-6px;
  height:2px;
  background:var(--accent);
  border-radius:2px;
}
.search {
  position:relative;
  flex:1;
  max-width:340px;
  margin-inline-start:auto;
}
.search input {
  width:100%;
  height:42px;
  background:var(--surface);
  border-radius:10px;
  padding:0 42px 0 16px;
  font-size:.88rem;
}
.search svg {
  position:absolute;
  inset-inline-start:14px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  color:var(--accent-soft);
}
.actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.btn-ghost {
  height:40px;
  padding:0 16px;
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  font-size:.85rem;
}
.menu-btn {
  display:none;
  width:40px;
  height:40px;
  border-radius:10px;
  border:1px solid var(--line);
  background:var(--surface);
  place-items:center;
  flex-shrink:0;
}

/* Buttons and tags */
.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:46px;
  padding:0 24px;
  border-radius:10px;
  background:var(--accent);
  font-weight:700;
  font-size:.92rem;
  white-space:nowrap;
  transition:background .2s;
}
.btn:hover, .news-btn:hover {
  background:#9d74ff;
}
.btn.ghost {
  background:rgba(11,11,18,.45);
  border:1px solid rgba(255,255,255,.25);
  font-weight:500;
}
.btn.ghost:hover {
  background:rgba(255,255,255,.08);
}
.btn.sm {
  height:38px;
  padding:0 18px;
  font-size:.85rem;
}
.tag {
  display:inline-block;
  background:var(--accent);
  font-size:.76rem;
  font-weight:700;
  padding:2px 12px;
  border-radius:6px;
  margin-bottom:12px;
}
.cta {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:26px;
}

/* Sections */
.section {
  margin-top:44px;
}
.section.divided, .section:has(> .cast-list), .section:has(> #genres) {
  padding-top:40px;
  border-top:1px solid var(--line);
}
.section h2 {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:1.25rem;
  font-weight:700;
  margin-bottom:16px;
}
.section p {
  color:#d6d6e0;
  max-width:72ch;
}
.section-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}
.section-head h2 {
  margin-bottom:0;
  font-size:1.22rem;
}
.section-head h2 svg {
  color:var(--accent-soft);
  width:22px;
  height:22px;
}
.ico {
  color:var(--accent-soft);
}
.more {
  font-size:.84rem;
  color:var(--accent-soft);
}

/* Home hero slider */
.hero {
  position:relative;
  margin-top:24px;
  height:clamp(260px,34vw,400px);
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--line);
  background:#0e0e16;
}
.track {
  position:absolute;
  inset:0;
}
.slide {
  position:absolute;
  inset:0;
  opacity:0;
  visibility:hidden;
  transition:opacity .8s ease,visibility .8s;
  background:radial-gradient(60% 90% at 75% 30%,var(--c1),transparent 70%),linear-gradient(110deg,var(--c2),var(--c3));
}
.slide.active {
  opacity:1;
  visibility:visible;
}
.slide::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(90deg,rgba(11,11,18,.92) 8%,rgba(11,11,18,.35) 55%,transparent);
}
.slide-img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 20%;
  z-index:0;
}
.slide-body {
  position:absolute;
  z-index:2;
  top:50%;
  left:7%;
  width:min(44%,440px);
  transform:translateY(-50%);
  text-align:right;
}
.slide-body h2 {
  font-size:clamp(1.9rem,4.2vw,3.1rem);
  font-weight:900;
  line-height:1.3;
  margin-bottom:8px;
}
.slide-body p {
  color:#d6d6e0;
  font-size:clamp(.82rem,1.3vw,.98rem);
  margin-bottom:22px;
}
.slide-body .cta {
  margin-top:0;
  justify-content:flex-end;
}
.arrow {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:3;
  width:40px;
  height:40px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:rgba(11,11,18,.6);
  border:1px solid rgba(255,255,255,.15);
}
.arrow.next {
  left:16px;
}
.arrow.prev {
  right:16px;
}
.dots {
  position:absolute;
  bottom:18px;
  left:50%;
  transform:translateX(-50%);
  z-index:3;
  display:flex;
  gap:8px;
}
.dots button {
  width:8px;
  height:8px;
  border-radius:99px;
  background:rgba(255,255,255,.3);
  transition:width .3s,background .3s;
}
.dots button.on {
  width:22px;
  background:var(--accent);
}

/* Posters and cards */
.grid {
  direction:ltr;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:24px 18px;
}
.card {
  direction:rtl;
  min-width:0;
}
.poster, .poster-sm {
  position:relative;
  display:block;
  aspect-ratio:2/3;
  border-radius:14px;
  overflow:hidden;
  isolation:isolate;
  background:linear-gradient(160deg,var(--a,#0ea5e9),var(--b,#1e3a8a));
  border:1px solid var(--line);
  transition:border-color .25s,transform .25s;
}
.card:hover .poster, .card:hover .poster-sm {
  border-color:var(--accent);
  transform:translateY(-3px);
}
.poster img, .poster-sm img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:1;
}
.poster::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:2;
  background:linear-gradient(to top,rgba(0,0,0,.45),transparent 45%);
}
.ph {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:12px;
  text-align:center;
  font-weight:900;
  font-size:1.05rem;
  line-height:1.5;
  text-shadow:0 2px 10px rgba(0,0,0,.5);
  z-index:0;
}
.badge {
  position:absolute;
  top:10px;
  left:10px;
  z-index:3;
  background:rgba(0,0,0,.6);
  font-size:.68rem;
  font-weight:700;
  padding:2px 7px;
  border-radius:6px;
}
.imdb {
  position:absolute;
  top:10px;
  right:10px;
  z-index:3;
  background:#f5c518;
  color:#000;
  font-size:.7rem;
  font-weight:900;
  padding:2px 7px;
  border-radius:6px;
  line-height:1.4;
}
.card h3 {
  margin-top:12px;
  text-align:center;
  font-size:.9rem;
  font-weight:700;
  line-height:1.6;
  min-height:3.2em;
}
.card h3 small {
  display:block;
  font-size:.76rem;
  font-weight:400;
  color:var(--muted);
}
.card p, .meta {
  text-align:center;
  color:var(--muted);
  font-size:.78rem;
}
.meta {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
}
.dl {
  color:var(--accent-soft);
  margin-inline-start:4px;
  display:inline-flex;
}
.dl svg {
  width:17px;
  height:17px;
}

/* Genres */
.genres {
  direction:ltr;
  display:grid;
  grid-template-columns:repeat(8,1fr);
  gap:14px;
}
.genre {
  direction:rtl;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding:22px 6px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  font-weight:700;
  font-size:.88rem;
  transition:border-color .2s;
}
.genre svg {
  width:28px;
  height:28px;
  color:var(--accent-soft);
}
.genre:hover {
  border-color:var(--accent);
}

/* Cast */
.cast-list {
  direction:rtl;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:18px;
  justify-items:center;
}
.cast-card {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  text-align:center;
  min-width:0;
  width:100%;
}
.cast-avatar {
  width:100%;
  max-width:150px;
  aspect-ratio:1/1;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:1.5rem;
  font-weight:900;
  letter-spacing:.04em;
  color:#fff;
  border:2px solid var(--line);
  transition:border-color .25s;
}
.cast-card:hover .cast-avatar {
  border-color:var(--accent);
}
.cast-card strong {
  font-size:.9rem;
  font-weight:700;
  margin-top:6px;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cast-card span {
  font-size:.76rem;
  color:var(--muted);
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.avatar-one {
  background:linear-gradient(135deg,#7c3aed,#1e1b4b);
}
.avatar-two {
  background:linear-gradient(135deg,#db2777,#4c1d95);
}
.avatar-three {
  background:linear-gradient(135deg,#0284c7,#0f172a);
}
.avatar-four {
  background:linear-gradient(135deg,#ea580c,#1c1917);
}
.avatar-five {
  background:linear-gradient(135deg,#16a34a,#052e16);
}
.avatar-six {
  background:linear-gradient(135deg,#eab308,#422006);
}
.avatar-seven {
  background:linear-gradient(135deg,#e11d48,#4c0519);
}

/* Detail pages (movie and series) */
.hero-wrap {
  position:relative;
  isolation:isolate;
}
.backdrop {
  position:absolute;
  inset:0 0 auto 0;
  height:620px;
  z-index:-1;
  background:radial-gradient(60% 80% at 80% 10%,var(--glow,#1e3a8a) 0%,transparent 70%),linear-gradient(180deg,var(--tone,#0f172a),var(--bg));
}
.backdrop img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.3;
}
.backdrop::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(11,11,18,.2),var(--bg) 95%);
}
.crumbs {
  padding-top:24px;
  font-size:.84rem;
  color:var(--muted);
}
.crumbs a:hover {
  color:var(--text);
}
.crumbs span {
  color:var(--text);
}
.movie-top, .show-top {
  display:grid;
  grid-template-columns:280px 1fr;
  gap:44px;
  padding-top:28px;
  align-items:start;
}
.movie-top .poster, .show-top .poster {
  aspect-ratio:2/3;
  border-radius:16px;
  box-shadow:0 30px 60px -20px rgba(0,0,0,.7);
}
.movie-top .poster .ph, .show-top .poster .ph {
  font-size:1.5rem;
}
.movie-top .poster .imdb, .show-top .poster .imdb {
  top:12px;
  right:12px;
  font-size:.8rem;
  padding:3px 9px;
}
.info h1 {
  font-size:clamp(2rem,4vw,3rem);
  font-weight:900;
  line-height:1.3;
}
.orig {
  color:var(--muted);
  font-size:.95rem;
  margin-top:4px;
  direction:ltr;
  text-align:right;
}
.chips {
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:18px 0;
}
.chips li {
  background:var(--surface);
  border:1px solid var(--line);
  padding:4px 12px;
  border-radius:999px;
  font-size:.84rem;
}
.lead {
  color:#d6d6e0;
  font-size:1.02rem;
  max-width:62ch;
}
.facts {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}
.facts div {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px 16px;
}
.facts dt {
  color:var(--muted);
  font-size:.8rem;
}
.facts dd {
  font-weight:700;
  font-size:.95rem;
}
.trailer {
  aspect-ratio:16/9;
  border-radius:16px;
  border:1px dashed #33334a;
  display:grid;
  place-items:center;
  color:var(--muted);
  background:var(--surface);
}
.dl-list {
  display:grid;
  gap:10px;
}
.dl-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  padding:16px 20px;
}
.dl-row strong {
  display:block;
  font-size:.98rem;
}
.dl-row span {
  color:var(--muted);
  font-size:.82rem;
}

/* Seasons and episodes (series) */
.season {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  margin-bottom:10px;
  padding:0 20px;
}
.season>summary {
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 0;
  font-weight:700;
}
.season>summary::-webkit-details-marker {
  display:none;
}
.season>summary small {
  color:var(--muted);
  font-weight:400;
  font-size:.84rem;
  margin-inline-start:auto;
}
.season>summary::after {
  content:"+";
  color:var(--accent-soft);
  font-size:1.3rem;
  line-height:1;
}
.season[open]>summary::after {
  content:"−";
}
.season-body {
  padding-bottom:18px;
  display:grid;
  gap:14px;
}
.pack {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px 14px;
}
.pack-title {
  font-weight:700;
  font-size:.92rem;
}
.ep-list {
  list-style:none;
  display:grid;
  gap:8px;
}
.ep {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 14px;
}
.ep b {
  font-weight:700;
  font-size:.92rem;
}
.qs {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.q {
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:96px;
  padding:6px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  line-height:1.35;
  transition:border-color .2s,background .2s;
}
.q span {
  font-weight:700;
  font-size:.86rem;
}
.q small {
  color:var(--muted);
  font-size:.74rem;
}
.q:hover {
  border-color:var(--accent);
  background:rgba(139,92,246,.12);
}
.pack-qs .q {
  min-width:120px;
  padding:8px 14px;
}

/* Footer */
.footer {
  margin-top:80px;
  border-top:1px solid var(--line);
  padding:40px 0 0;
}
.footer-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:32px;
}
.footer h2 {
  font-size:1rem;
  font-weight:700;
  margin-bottom:12px;
}
.footer p, .footer li {
  color:var(--muted);
  font-size:.88rem;
  line-height:1.9;
}
.footer ul {
  list-style:none;
  display:grid;
  gap:10px;
}
.footer a:hover {
  color:var(--text);
}
.brand .logo {
  margin-bottom:12px;
}
.news-box {
  display:flex;
  margin-top:14px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
}
.news-box input {
  flex:1;
  min-width:0;
  padding:11px 14px;
  font-size:.86rem;
}
.news-btn {
  padding:0 22px;
  background:var(--accent);
  font-weight:700;
  font-size:.88rem;
}
.socials {
  display:flex;
  gap:18px;
  margin-top:20px;
  color:var(--muted);
}
.socials svg {
  width:20px;
  height:20px;
}
.socials a:hover {
  color:var(--text);
}
.copy {
  margin-top:44px;
  padding:22px 0;
  border-top:1px solid var(--line);
  text-align:center;
  color:var(--muted);
  font-size:.8rem;
}

/* Responsive */
@media (max-width:1100px) {
  .genres {
    grid-template-columns:repeat(4,1fr);
  }
}
@media (max-width:860px) {
  .menu-btn {
    display:grid;
  }
  .nav {
    display:none;
    position:absolute;
    top:100%;
    inset-inline:0;
    flex-direction:column;
    gap:0;
    padding:6px 24px 14px;
    background:rgba(11,11,18,.97);
    border-bottom:1px solid var(--line);
  }
  .nav.open {
    display:flex;
  }
  .nav a {
    padding:14px 0;
    border-bottom:1px solid var(--line);
  }
  .nav a:last-child {
    border-bottom:0;
  }
  .nav a.active {
    color:var(--accent-soft);
  }
  .nav a.active::after {
    display:none;
  }
  .movie-top, .show-top {
    grid-template-columns:1fr;
    justify-items:center;
    text-align:center;
  }
  .movie-top .poster, .show-top .poster {
    width:min(260px,70%);
  }
  .info {
    width:100%;
  }
  .lead {
    margin-inline:auto;
  }
  .orig {
    text-align:center;
  }
  .cta, .chips {
    justify-content:center;
  }
  .facts {
    grid-template-columns:repeat(2,1fr);
  }
  .cast-list {
    direction:ltr;
    display:flex;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    gap:18px;
    padding-bottom:8px;
  }
  .cast-card {
    direction:rtl;
    flex:0 0 130px;
    scroll-snap-align:start;
  }
}
@media (max-width:640px) {
  .header-inner {
    flex-wrap:wrap;
    height:auto;
    padding-block:14px;
    gap:12px;
  }
  .logo {
    font-size:1.3rem;
  }
  .logo small {
    display:none;
  }
  .actions {
    margin-inline-start:auto;
  }
  .btn-ghost {
    height:38px;
    padding:0 12px;
    font-size:.8rem;
  }
  .search {
    order:3;
    flex-basis:100%;
    max-width:none;
    margin:0;
  }
  .grid {
    grid-template-columns:repeat(2,1fr);
    gap:24px 14px;
  }
  .genres {
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
  }
  .genre {
    font-size:.78rem;
    padding:18px 2px;
  }
  .slide-body {
    width:72%;
  }
  .slide-body h2 {
    font-size:1.7rem;
  }
  .footer-grid {
    grid-template-columns:1fr;
  }
  .qs .q {
    min-width:0;
    flex:1 1 0;
    padding:6px 8px;
  }
  .pack {
    justify-content:center;
    text-align:center;
  }
}
@media (prefers-reduced-motion:reduce) {
  * {
    transition:none!important;
    scroll-behavior:auto!important;
  }
}

/* Catalog, account and info pages */
.page-head {
  padding-top:28px;
}
.page-head h1 {
  font-size:clamp(1.8rem,3.5vw,2.5rem);
  font-weight:900;
  line-height:1.3;
}
.page-head p {
  color:var(--muted);
  font-size:.9rem;
}
.filters {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:22px 0 26px;
}
.filters button {
  height:36px;
  padding:0 16px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--surface);
  font-size:.86rem;
  transition:background .2s,border-color .2s;
}
.filters button:hover {
  border-color:var(--accent);
}
.filters button.on {
  background:var(--accent);
  border-color:var(--accent);
  font-weight:700;
}
.auth {
  max-width:440px;
  margin:48px auto 0;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  padding:28px;
}
.tabs {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:12px;
  padding:4px;
  margin-bottom:22px;
}
.tabs button {
  height:40px;
  border-radius:9px;
  font-weight:700;
  color:var(--muted);
}
.tabs button.on {
  background:var(--accent);
  color:#fff;
}
.field {
  display:grid;
  gap:6px;
  margin-bottom:14px;
}
.field label {
  font-size:.85rem;
  color:var(--muted);
}
.field input, .contact-form input, .contact-form textarea {
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:10px;
  padding:0 14px;
  font:inherit;
  color:inherit;
}
.field input, .contact-form input {
  height:46px;
  font-size:.95rem;
}
.contact-form textarea {
  min-height:120px;
  padding:12px 14px;
  resize:vertical;
}
.field input:focus, .contact-form input:focus, .contact-form textarea:focus {
  border-color:var(--accent);
  outline:none;
}
.check {
  display:flex;
  gap:8px;
  align-items:center;
  font-size:.85rem;
  color:var(--muted);
  margin:6px 0 16px;
}
.check a, .auth-note a, .prose a {
  color:var(--accent-soft);
}
.block {
  width:100%;
}
.auth-note {
  font-size:.84rem;
  color:var(--muted);
  text-align:center;
  margin-top:16px;
}
.hidden {
  display:none!important;
}
.prose {
  max-width:76ch;
  padding-top:28px;
}
.prose h1 {
  font-size:clamp(1.8rem,3.5vw,2.4rem);
  font-weight:900;
  line-height:1.3;
  margin-bottom:8px;
}
.prose h2 {
  font-size:1.15rem;
  font-weight:700;
  margin:28px 0 10px;
}
.prose p, .prose li {
  color:#d6d6e0;
}
.prose p {
  margin-bottom:12px;
}
.prose ol {
  padding-inline-start:22px;
  display:grid;
  gap:8px;
  margin-bottom:12px;
}
.contact-form {
  display:grid;
  gap:12px;
  margin-top:18px;
  max-width:520px;
}
@media (max-width:640px) {
  .auth {
    padding:22px;
  }
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
}
[hidden] {
  display:none!important;
}

/* Dashboard and admin panel */
.app {
  display:grid;
  grid-template-columns:240px 1fr;
  gap:28px;
  padding-top:28px;
  align-items:start;
}
.side {
  position:sticky;
  top:96px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  display:grid;
  gap:4px;
}
.side button {
  text-align:right;
  padding:11px 14px;
  border-radius:10px;
  color:var(--muted);
  font-weight:500;
  font-size:.92rem;
}
.side button:hover {
  color:var(--text);
  background:var(--bg);
}
.side button.on {
  background:var(--accent);
  color:#fff;
  font-weight:700;
}
.app-main {
  min-width:0;
}
.app-main h1 {
  font-size:clamp(1.6rem,3vw,2.1rem);
  font-weight:900;
  margin-bottom:6px;
}
.sub {
  color:var(--muted);
  font-size:.9rem;
  margin-bottom:22px;
}
.view {
  display:none;
}
.view.on {
  display:block;
}
.cards {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:14px;
  margin-bottom:22px;
}
.stat {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  padding:18px;
}
.stat b {
  display:block;
  font-size:1.4rem;
  font-weight:900;
  margin-top:4px;
}
.stat small {
  color:var(--muted);
  font-size:.8rem;
}
.box {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  padding:20px;
  margin-bottom:22px;
}
.box h2 {
  font-size:1.05rem;
  font-weight:700;
  margin-bottom:14px;
}
.bar {
  height:8px;
  background:var(--bg);
  border-radius:99px;
  overflow:hidden;
  margin-top:12px;
}
.bar i {
  display:block;
  height:100%;
  background:var(--accent);
  border-radius:99px;
}
.plans {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}
.plan {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.plan.hot {
  border-color:var(--accent);
}
.plan .price {
  font-size:1.5rem;
  font-weight:900;
}
.plan ul {
  list-style:none;
  display:grid;
  gap:6px;
  color:var(--muted);
  font-size:.88rem;
  flex:1;
  margin-bottom:6px;
}
.plan li::before {
  content:"✓ ";
  color:var(--accent-soft);
}
.table {
  width:100%;
  border-collapse:collapse;
  font-size:.88rem;
}
.table th, .table td {
  text-align:right;
  padding:11px 10px;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
}
.table th {
  color:var(--muted);
  font-weight:500;
}
.wrap {
  overflow-x:auto;
}
.pill {
  display:inline-block;
  padding:2px 10px;
  border-radius:999px;
  font-size:.78rem;
  background:var(--bg);
  border:1px solid var(--line);
}
.pill.ok {
  color:#4ade80;
  border-color:#14532d;
}
.pill.bad {
  color:#f87171;
  border-color:#7f1d1d;
}
.btn-s {
  height:34px;
  padding:0 12px;
  border-radius:9px;
  background:var(--bg);
  border:1px solid var(--line);
  font-size:.82rem;
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  color:inherit;
}
.btn-s:hover {
  border-color:var(--accent);
}
.btn-s:disabled {
  opacity:.5;
  cursor:not-allowed;
}
.inp {
  height:40px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:10px;
  padding:0 12px;
  font:inherit;
  color:inherit;
}
.row {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.modal {
  border:0;
  border-radius:18px;
  background:var(--surface);
  color:var(--text);
  padding:24px;
  width:min(460px,92vw);
}
.modal::backdrop {
  background:rgba(0,0,0,.6);
}
.toast {
  position:fixed;
  bottom:20px;
  left:50%;
  transform:translateX(-50%);
  background:var(--accent);
  color:#fff;
  padding:10px 18px;
  border-radius:10px;
  font-weight:700;
  z-index:99;
}
.bars {
  display:flex;
  align-items:flex-end;
  gap:12px;
  height:170px;
}
.bars div {
  flex:1;
  background:var(--accent);
  border-radius:8px 8px 0 0;
  position:relative;
  min-height:4px;
}
.bars span {
  position:absolute;
  bottom:-24px;
  left:0;
  right:0;
  text-align:center;
  font-size:.74rem;
  color:var(--muted);
}
@media (max-width:860px) {
  .app {
    grid-template-columns:1fr;
  }
  .side {
    position:static;
    grid-auto-flow:column;
    overflow-x:auto;
  }
}
.form2 {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
}
.form2 .field {
  margin-bottom:0;
}
.dl-edit {
  margin-bottom:8px;
}

/* Admin mobile menu: the three-line button opens the section list */
@media (max-width:860px) {
  .app .side.collapsible {
    display:none;
    grid-auto-flow:row;
    overflow:visible;
  }
  .app .side.collapsible.open {
    display:grid;
  }
}

/* Dashboard: on phones and tablets the four sections sit above the content as a two-row menu */
@media (max-width:860px) {
  .app .side.side-top {
    grid-auto-flow:row;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    overflow:visible;
    padding:10px;
  }
  .app .side.side-top button {
    text-align:center;
    background:var(--bg);
    border:1px solid var(--line);
    padding:12px 8px;
    font-size:.88rem;
  }
}

/* Utilities: single-purpose classes used instead of repeated inline styles */
.between{justify-content:space-between}
.mb-14{margin-bottom:14px}
.mt-14{margin-top:14px}
.mt-18{margin-top:18px}
.muted{color:var(--muted)}
