/* تیکت مهمان — the guest support page. The home page's colours (/v2/). */
:root {
  --background: #050812;
  --foreground: #eaf0fa;
  --muted: #97a6bf;
  --faint: #66758f;
  --neon: #22d3ee;
  --neon-soft: #67e8f9;
  --violet: #7c5cff;
  --amber: #fbbf24;
  --green: #34d399;
  --rose: #fb7185;
  --border: rgba(148, 163, 184, 0.14);
  --line: rgba(148, 163, 184, 0.09);
  --grad: linear-gradient(135deg, #22d3ee 0%, #7c5cff 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 15.5px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--neon-soft);
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(880px, calc(100% - 32px));
  margin-inline: auto;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #070c1a, #050812);
}

.sky > div {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.sky__a {
  top: -30vmax;
  right: -14vmax;
  width: 60vmax;
  height: 60vmax;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 65%);
  animation: drift 24s ease-in-out infinite alternate;
}

.sky__b {
  bottom: -30vmax;
  left: -20vmax;
  width: 55vmax;
  height: 55vmax;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 65%);
  animation: drift 28s ease-in-out infinite alternate-reverse;
}

.sky .sky__stars {
  inset: 0;
  border-radius: 0;
  filter: none;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, 0.7) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 34% 9%, rgba(186, 230, 253, 0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 28%, rgba(255, 255, 255, 0.5) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 79% 14%, rgba(196, 181, 253, 0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 61%, rgba(255, 255, 255, 0.45) 50%, transparent 51%);
  background-size: 480px 400px;
  animation: twinkle 6s ease-in-out infinite;
}

@keyframes drift {
  to {
    transform: translate3d(-6vw, 5vh, 0) scale(1.1);
  }
}

@keyframes twinkle {
  50% {
    opacity: 0.4;
  }
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 18, 0.75);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.top__in {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 30px;
  object-fit: contain;
}

.brand b {
  display: block;
  font-weight: 900;
  line-height: 1.2;
}

.brand small {
  color: var(--faint);
  font-size: 11px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}

.nav a {
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.nav a:hover {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .top__in > .btn {
    margin-inline-start: auto;
  }
}

.main {
  padding: 40px 0 60px;
}

.intro {
  margin-bottom: 26px;
}

.eyebrow {
  color: var(--neon);
  font-size: 13px;
  font-weight: 800;
}

.intro h1 {
  margin: 6px 0 10px;
  font-family: "Lalezar", "Vazirmatn", sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.3;
}

.intro p {
  margin: 0 0 8px;
  color: var(--muted);
}

.intro__alt {
  font-size: 14px;
}

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(17, 27, 50, 0.88), rgba(10, 16, 31, 0.92));
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

.card h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 900;
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.foot {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

.row .input {
  flex: 1 1 220px;
}

.stack {
  display: grid;
  gap: 14px;
}

.stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(6, 10, 20, 0.75);
  color: var(--foreground);
  font: inherit;
  font-size: 15px;
}

.input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

textarea.input {
  resize: vertical;
}

.input--code {
  max-width: 220px;
  font-size: 22px;
  letter-spacing: 0.4em;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn--primary {
  background: var(--grad);
  color: #041019;
  box-shadow: 0 12px 34px -14px rgba(34, 211, 238, 0.8);
}

.btn--ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--foreground);
}

.btn--sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--neon-soft);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:disabled {
  color: var(--faint);
  cursor: default;
  text-decoration: none;
}

.error {
  margin: 10px 0 0;
  color: var(--rose);
  font-size: 14px;
  font-weight: 700;
}

.error:empty {
  display: none;
}

.tickets {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticket {
  position: relative;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.ticket:hover {
  border-color: rgba(34, 211, 238, 0.35);
}

.ticket.is-unread {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.05);
}

.ticket__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket__meta {
  color: var(--faint);
  font-size: 13px;
}

.ticket__new {
  position: absolute;
  top: -9px;
  inset-inline-start: 14px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--grad);
  color: #041019;
  font-size: 11px;
  font-weight: 900;
}

.badge {
  flex: none;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge--open {
  background: rgba(251, 191, 36, 0.14);
  color: var(--amber);
}

.badge--answered {
  background: rgba(52, 211, 153, 0.14);
  color: var(--green);
}

.badge--closed {
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
}

.empty {
  color: var(--muted);
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 56vh;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(3, 6, 14, 0.5);
  overflow-y: auto;
}

.msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.msg--me {
  align-self: flex-start;
  border-start-start-radius: 4px;
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.08);
}

.msg--admin {
  align-self: flex-end;
  border-start-end-radius: 4px;
  border-color: rgba(124, 92, 255, 0.35);
  background: rgba(124, 92, 255, 0.1);
}

.msg--auto {
  align-self: flex-end;
  border-start-end-radius: 4px;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

.msg__head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--faint);
  font-size: 12px;
}

.msg__head b {
  color: var(--neon-soft);
  font-size: 13px;
}

.msg--admin .msg__head b {
  color: #b9a6ff;
}

.msg--auto .msg__head b {
  color: #f59e0b;
}

.msg__body {
  margin: 4px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reply {
  display: grid;
  gap: 10px;
}

.closed {
  color: var(--muted);
}

.foot-bar {
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .sky > div {
    animation: none !important;
  }
}

/* ---------------------------------------------------------------------------
   The panel's tokens, so the code field (otp.css, from the panel) wears this
   page's colours: the «فرماندهی» console's navy, cyan and violet.
   --------------------------------------------------------------------------- */
:root {
  --surface: #0c1324;
  --surface-raised: #111a30;
  --surface-sunken: #070c18;
  --text: #e8eef8;
  --text-muted: #96a5bf;
  --border-line: rgba(148, 163, 184, 0.09);
  --border-strong: rgba(34, 211, 238, 0.4);
  --accent: #22d3ee;
  --accent-hover: #67e8f9;
  --accent-soft: rgba(34, 211, 238, 0.16);
  --on-accent: #041019;
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.18);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.16);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  --blur-card: 0px;
}

/* While the page asks whether somebody is signed in to the panel. */
body.is-checking [data-view] {
  display: none !important;
}

.otp-view {
  max-width: 480px;
  margin-inline: auto;
}

.otp-view__change {
  margin-top: 12px;
  text-align: center;
}

/* --------------------------------------------------------- the files */
.attach {
  display: grid;
  gap: 8px;
}

.attach__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.attach__note {
  color: var(--faint);
  font-size: 12px;
}

.attach__mic.is-recording {
  border-color: rgba(251, 113, 133, 0.6);
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
  animation: rec-pulse 1.2s ease-in-out infinite;
}

@keyframes rec-pulse {
  50% {
    box-shadow: 0 0 0 6px rgba(251, 113, 133, 0.12);
  }
}

.attach__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.attach__list:empty,
.attach__err:empty {
  display: none;
}

.attach__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.attach__name {
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.attach__size {
  color: var(--faint);
  font-size: 12px;
}

.attach__x {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--foreground);
  cursor: pointer;
}

.attach__err {
  margin: 0;
  color: var(--rose);
  font-size: 13px;
}

.msg__files {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.file__pic {
  display: block;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  cursor: zoom-in;
}

.file__pic img {
  display: block;
  max-width: min(240px, 60vw);
  max-height: 200px;
  object-fit: cover;
}

.file audio {
  width: min(280px, 64vw);
}

.file video {
  max-width: min(320px, 70vw);
  max-height: 240px;
  border-radius: 12px;
}

.file__lost {
  color: var(--faint);
  font-size: 13px;
}

/* A picture, large, over everything. */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 4, 10, 0.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.viewer[hidden] {
  display: none;
}

.viewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}

.viewer__close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* «رسیدگی تمام شد»'s button, the moved-section line, the stars (2026-10-20). */
.msg--system {
  align-self: center;
  max-width: 92%;
  border: 1px solid rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.07);
  text-align: center;
}

.msg__finish {
  margin-top: 10px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #052e16;
  font-weight: 900;
}

.rate {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: 14px;
  background: rgba(250, 204, 21, 0.06);
}

.rate p {
  margin: 0;
  opacity: 0.8;
}

.rate__stars {
  display: inline-flex;
  gap: 4px;
  direction: ltr;
}

.rate__stars button {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.2);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.rate__stars button.is-on {
  color: #facc15;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.55);
}

.rate__form {
  display: grid;
  gap: 8px;
  width: 100%;
}

.rate__form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
}

.ask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(3, 5, 12, 0.7);
  backdrop-filter: blur(4px);
}

.ask__box {
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: #0d111c;
  color: #eaf0fa;
}

.ask__box h3 {
  margin: 0 0 8px;
}

.ask__box p {
  margin: 0 0 16px;
  line-height: 1.9;
  color: #c9d1de;
}

.ask__row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ask__yes {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
}

/* Formatted messages (2026-10-20), as in the panels. */
.msg__md {
  white-space: normal;
}
.msg__md p,
.msg__md h3,
.msg__md h4,
.msg__md ul,
.msg__md ol,
.msg__md blockquote {
  margin: 2px 0;
}
.msg__md h3 {
  font-size: 1.1em;
}
.msg__md h4 {
  font-size: 1em;
}
.msg__md ul,
.msg__md ol {
  padding-inline-start: 22px;
}
.msg__md blockquote {
  padding: 2px 10px;
  border-inline-start: 3px solid var(--accent, #22d3ee);
  opacity: 0.9;
}
.msg__md .md-gap {
  height: 8px;
}
.msg__md code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.92em;
}
.msg__md mark {
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(250, 204, 21, 0.75);
  color: #111;
}
.msg__md a {
  color: var(--accent, #22d3ee);
}
.md-spoiler {
  padding: 0 4px;
  border-radius: 4px;
  background: currentColor;
  cursor: pointer;
}
.md-spoiler.is-open {
  background: rgba(255, 255, 255, 0.1);
}
/* «---»: a thin line, brightest in the middle in the theme's colour, fading at both ends. */
.msg__md hr {
  height: 2px;
  margin: 14px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.55) 50%, transparent);
}

/* «بستن تیکت»: glass that catches the light on hover. */
.msg__finish {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 10px 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 8px 22px -12px #22c55e;
  transition:
    transform 0.2s,
    box-shadow 0.25s;
}
.msg__finish::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%);
}
.msg__finish::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -70%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
}
.msg__finish:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 12px 30px -10px #22c55e,
    0 0 0 3px rgba(34, 197, 94, 0.18);
}
.msg__finish:hover::after {
  opacity: 1;
  animation: msg-finish-shine 0.9s ease-out;
}
@keyframes msg-finish-shine {
  from {
    left: -70%;
  }
  to {
    left: 130%;
  }
}
