/* Styles for the support, invite and admin pages. Builds on styles.css tokens — same look, nothing redesigned. */

.page-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 45% at 85% 0%, rgba(124, 34, 208, 0.28), transparent 70%),
              radial-gradient(50% 40% at 0% 100%, rgba(59, 130, 246, 0.16), transparent 70%), var(--bg); }
.subpage main { position: relative; z-index: 2; padding: 128px 0 96px; }
.subpage h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1.04; letter-spacing: -0.04em; margin-top: 14px; }
.subpage .lede { font-size: 18px; margin-top: 16px; }
.stack { display: grid; gap: 16px; }
.two-col { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; align-items: start; margin-top: 48px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.panel h2 { font-size: 24px; letter-spacing: -0.02em; }
.panel > p { margin-top: 8px; }

/* ---------- Form controls ---------- */
.field { display: grid; gap: 8px; margin-top: 20px; }
.field > span, .field legend { font-size: 14px; font-weight: 600; color: var(--ink); padding: 0; }
.field small { color: var(--mute); font-size: 13px; font-weight: 400; }
fieldset.field { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
.input, .textarea, .select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: rgba(255, 255, 255, 0.04); border: 0; border-radius: 14px; padding: 13px 16px;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 150ms ease, background-color 150ms ease;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: 18px 55%, 23px 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 16px; padding-inline-end: 40px; }
[dir="rtl"] .select { background-position: 18px 55%, 23px 55%; }
.input:focus, .textarea:focus, .select:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 4px rgba(163, 91, 240, 0.15); background: rgba(255, 255, 255, 0.06); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #f87171; }
.input.ltr { direction: ltr; text-align: start; }
[dir="rtl"] .input.ltr { text-align: right; }
.mono-in { font-family: var(--mono); letter-spacing: 0.06em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-size: 14px; color: var(--ink-2);
  background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 160ms var(--ease-out); }
.chip input:checked + span { background: rgba(163, 91, 240, 0.22); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--brand); }
.chip input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.chip input:active + span { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .chip:hover span { color: var(--ink); } }

.drop { display: grid; place-items: center; gap: 6px; text-align: center; padding: 22px; border-radius: 16px; cursor: pointer;
  background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.12); border: 0; color: var(--ink-2);
  background-image: repeating-linear-gradient(90deg, transparent 0 8px, transparent 8px 16px); transition: background-color 150ms ease, box-shadow 150ms ease; }
.drop.over { background-color: rgba(163, 91, 240, 0.1); box-shadow: inset 0 0 0 1.5px var(--brand); }
.drop svg { width: 26px; height: 26px; color: var(--brand); }
.drop input { display: none; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb { position: relative; width: 86px; height: 86px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); background: #000; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.7); color: #fff; display: grid; place-items: center; font-size: 16px; line-height: 1; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.form-error { color: #fca5a5; font-size: 14px; min-height: 1.4em; margin-top: 12px; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 600ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* success card */
.done { display: grid; gap: 14px; }
.done .badge-ok { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(74, 222, 128, 0.14); color: #4ade80; }
.done .badge-ok svg { width: 24px; height: 24px; }
.copy-row { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
[dir="rtl"] .copy-row { padding: 10px 16px 10px 10px; }
.copy-row code { flex: 1; font-family: var(--mono); font-size: 15px; letter-spacing: 0.05em; direction: ltr; text-align: start; overflow-wrap: anywhere; }
.copy-row .lbl { font-size: 12px; color: var(--mute); min-width: 92px; }
.warn { font-size: 14px; color: #fcd34d; }

/* ticket timeline (user view) */
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--mute)); }
.s-new { --dot: #60a5fa; } .s-in_review { --dot: #c084fc; } .s-in_progress { --dot: #fbbf24; } .s-resolved { --dot: #4ade80; } .s-closed { --dot: #71717a; }
.steps-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 18px 0 6px; }
.steps-track i { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); }
.steps-track i.on { background: linear-gradient(90deg, var(--brand), var(--cyan)); }
.timeline { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.timeline li { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--line); }
.timeline li.support { background: rgba(163, 91, 240, 0.12); box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.3); }
.timeline .meta { font-size: 12px; color: var(--mute); display: flex; justify-content: space-between; gap: 10px; }
.timeline .body { white-space: pre-wrap; margin-top: 6px; color: var(--ink); overflow-wrap: anywhere; }

/* invite */
.invite-card { max-width: 620px; margin: 40px auto 0; text-align: center; }
.invite-card .code { display: inline-block; font-family: var(--mono); font-size: 28px; letter-spacing: 0.28em; padding: 12px 22px; border-radius: 16px; margin: 18px 0 6px;
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); direction: ltr; }
.invite-card img.logo-big { width: 84px; height: 84px; margin: 0 auto 10px; filter: drop-shadow(0 18px 40px rgba(163, 91, 240, 0.5)); }
.invite-card .btn { margin-top: 26px; }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.5s; } }
