/* ════════════════════════════════════════════════════════════════
   OmeChat — Master Style Sheet
   #0B0F19 Dark Navy · Neon Blue/Purple · Glassmorphism · 2026 UI
════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg: #0B0F19;
  --bg1: #0f1420;
  --bg2: #141924;
  --sf: #1a2035;
  --sf2: #202840;
  --glass: rgba(26, 32, 53, 0.72);
  --glass2: rgba(255, 255, 255, 0.05);

  --blue: #0070f3;
  --purple: #7928ca;
  --grad: linear-gradient(135deg, #0070f3 0%, #7928ca 100%);
  --neon: #00cffd;
  --glow: 0 0 24px rgba(0, 112, 243, .45), 0 0 60px rgba(121, 40, 202, .2);

  --green: #10b981;
  --green-d: rgba(16, 185, 129, .14);
  --red: #ef4444;
  --red-d: rgba(239, 68, 68, .13);
  --yellow: #f59e0b;
  --ylw-d: rgba(245, 158, 11, .14);

  --txt: #e2e8f0;
  --txt-m: #94a3b8;
  --txt-d: #475569;
  --bdr: rgba(255, 255, 255, .07);
  --bdr-hi: rgba(0, 112, 243, .35);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-f: 9999px;
  --sh: 0 4px 20px rgba(0, 0, 0, .45);
  --sh-lg: 0 16px 48px rgba(0, 0, 0, .6);
  --sh-xl: 0 32px 80px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --t: .22s;
}

.light {
  --bg: #f0f4ff;
  --bg1: #e8eeff;
  --bg2: #dde5ff;
  --sf: #fff;
  --sf2: #f0f4ff;
  --glass: rgba(255, 255, 255, .7);
  --glass2: rgba(0, 0, 0, .04);
  --bdr: rgba(0, 0, 0, .08);
  --txt: #0f172a;
  --txt-m: #475569;
  --txt-d: #94a3b8;
}

/* ── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  height: 100%
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t), color var(--t);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none
}

input,
select,
textarea {
  font-family: inherit
}

video {
  display: block;
  background: #020408
}

::-webkit-scrollbar {
  width: 4px
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 4px
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 112, 243, .5)
}

/* ── Gradient text ──────────────────────────────────────────── */
.g-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

/* ── Glass ──────────────────────────────────────────────────── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--bdr);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 48px;
  border-radius: var(--r-f);
  font-size: .92rem;
  font-weight: 600;
  transition: all var(--t) var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--t)
}

.btn:hover::after {
  background: rgba(255, 255, 255, .07)
}

.btn:active {
  transform: scale(.96)
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--glow)
}

.btn-primary:hover {
  box-shadow: 0 0 36px rgba(0, 112, 243, .6), 0 0 80px rgba(121, 40, 202, .3);
  transform: translateY(-2px)
}

.btn-secondary {
  background: var(--glass2);
  color: var(--txt);
  border: 1px solid var(--bdr)
}

.btn-secondary:hover {
  border-color: var(--bdr-hi);
  background: rgba(0, 112, 243, .08)
}

.btn-ghost {
  background: transparent;
  color: var(--txt-m);
  border: 1px solid transparent;
  height: 40px;
  padding: 0 16px
}

.btn-ghost:hover {
  background: var(--glass2);
  color: var(--txt);
  border-color: var(--bdr)
}

.btn-danger {
  background: var(--red-d);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, .22)
}

.btn-danger:hover {
  background: var(--red);
  color: #fff
}

.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: .84rem
}

/* ── Chip ───────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--r-f);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase
}

.chip-blue {
  background: rgba(0, 112, 243, .12);
  color: #60a5fa;
  border: 1px solid rgba(0, 112, 243, .25)
}

.chip-green {
  background: var(--green-d);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, .25)
}

.chip-red {
  background: var(--red-d);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, .22)
}

.chip-yellow {
  background: var(--ylw-d);
  color: var(--yellow);
  border: 1px solid rgba(245, 158, 11, .25)
}

/* ── Selects ────────────────────────────────────────────────── */
.sel {
  appearance: none;
  background: var(--glass2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 13px center;
  background-size: 16px;
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 11px 42px 11px 16px;
  color: var(--txt);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  min-width: 170px;
  transition: all var(--t);
}

.sel:focus {
  outline: none;
  border-color: var(--bdr-hi)
}

.sel option {
  background: #1a2035
}

/* ── Toggle ─────────────────────────────────────────────────── */
.toggle {
  position: relative;
  width: 48px;
  height: 27px;
  flex-shrink: 0
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0
}

.tg-track {
  position: absolute;
  inset: 0;
  border-radius: var(--r-f);
  background: var(--sf2);
  border: 1px solid var(--bdr);
  cursor: pointer;
  transition: all var(--t)
}

.tg-track::after {
  content: '';
  position: absolute;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  background: var(--txt-m);
  transition: all var(--t) var(--ease)
}

.toggle input:checked~.tg-track {
  background: rgba(0, 112, 243, .25);
  border-color: rgba(0, 112, 243, .4)
}

.toggle input:checked~.tg-track::after {
  transform: translateX(21px);
  background: var(--blue);
  box-shadow: 0 0 10px rgba(0, 112, 243, .6)
}

/* ════════════════════════════════════════════════════════════════
   BACKGROUND DECORATIONS
════════════════════════════════════════════════════════════════ */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
  background-size: 52px 52px
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(90px);
  animation: orb-drift 14s ease-in-out infinite alternate
}

.bg-orb-1 {
  width: 800px;
  height: 800px;
  top: -300px;
  left: -300px;
  background: radial-gradient(circle, rgba(0, 112, 243, .18) 0%, transparent 60%)
}

.bg-orb-2 {
  width: 600px;
  height: 600px;
  bottom: -200px;
  right: -200px;
  background: radial-gradient(circle, rgba(121, 40, 202, .16) 0%, transparent 60%);
  animation-duration: 11s;
  animation-direction: alternate-reverse
}

@keyframes orb-drift {
  from {
    transform: translate(0, 0) scale(1)
  }

  to {
    transform: translate(40px, 30px) scale(1.08)
  }
}

/* ════════════════════════════════════════════════════════════════
   PAGES
════════════════════════════════════════════════════════════════ */
.page {
  display: none;
  position: relative;
  z-index: 1;
  flex-direction: column
}

.page.active {
  display: flex
}

.page-full {
  min-height: 100vh
}

.page-viewport {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden
}

/* ════════════════════════════════════════════════════════════════
   LANDING
════════════════════════════════════════════════════════════════ */
.land-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--bdr);
}

.land-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, .75);
  backdrop-filter: blur(20px);
  z-index: -1
}

.logo {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 680px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--r-f);
  background: var(--green-d);
  border: 1px solid rgba(16, 185, 129, .25);
  font-size: .76rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 28px
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: bdot 2s ease-in-out infinite
}

@keyframes bdot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: .4;
    transform: scale(.65)
  }
}

.hero-title {
  font-size: clamp(2.6rem, 7.5vw, 5rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.07;
  margin-bottom: 22px
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--txt-m);
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: 44px
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 36px
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 26px
}

.hero-note {
  font-size: .8rem;
  color: var(--txt-d);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: center
}

.note-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--txt-d)
}

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 0 24px 64px;
  position: relative;
  z-index: 1
}

.stat-card {
  text-align: center;
  padding: 28px 40px;
  border-radius: var(--r-lg);
  min-width: 150px
}

.stat-num {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.stat-lbl {
  font-size: .73rem;
  color: var(--txt-d);
  margin-top: 6px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600
}

.land-footer {
  text-align: center;
  padding: 24px;
  font-size: .8rem;
  color: var(--txt-d);
  border-top: 1px solid var(--bdr);
  position: relative;
  z-index: 1
}

.land-footer a {
  color: var(--txt-m);
  margin: 0 8px
}

/* ════════════════════════════════════════════════════════════════
   CHAT PAGE
════════════════════════════════════════════════════════════════ */
.chat-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--bdr);
  background: rgba(11, 15, 25, .9);
  backdrop-filter: blur(20px);
  z-index: 50
}

.chat-bar .logo {
  font-size: 1rem
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--r-f);
  background: var(--glass2);
  border: 1px solid var(--bdr);
  font-size: .72rem;
  font-weight: 700;
  color: var(--txt-m);
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: all var(--t)
}

.s-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  transition: background var(--t), box-shadow var(--t);
  animation: sdot 1.8s ease-in-out infinite
}

@keyframes sdot {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .4
  }
}

.status-pill.connected .s-dot {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: none
}

.status-pill.connected .s-txt {
  color: var(--green)
}

.status-pill.disconnected .s-dot {
  background: var(--red);
  animation: none
}

.status-pill.disconnected .s-txt {
  color: var(--red)
}

.chat-layout {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden
}

/* Video */
.video-sec {
  flex: 1;
  position: relative;
  background: #020408;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden
}

#remoteVideo {
  width: 100%;
  height: 100%;
  object-fit: cover
}

/* PiP self */
.pip {
  position: absolute;
  bottom: 90px;
  right: 16px;
  width: 160px;
  height: 120px;
  border-radius: var(--r);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .12);
  box-shadow: var(--sh-xl);
  z-index: 20;
  transition: all var(--t) var(--ease);
  cursor: pointer
}

.pip:hover {
  transform: scale(1.04);
  border-color: rgba(0, 112, 243, .5)
}

.pip video {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.pip-off {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #020408;
  font-size: 1.6rem;
  gap: 4px
}

.pip-off span {
  font-size: .7rem;
  color: var(--txt-d);
  font-weight: 500
}

.pip-off.show {
  display: flex
}

/* State overlay */
.vid-ov {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: rgba(2, 4, 8, .88);
  backdrop-filter: blur(10px);
  transition: opacity var(--t), visibility var(--t)
}

.vid-ov.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none
}

.ov-spinner {
  width: 72px;
  height: 72px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center
}

.ov-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent
}

.ov-ring:nth-child(1) {
  border-color: var(--bdr)
}

.ov-ring:nth-child(2) {
  border-top-color: var(--blue);
  border-right-color: var(--purple);
  animation: spin 1s linear infinite
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.ov-ico {
  position: absolute;
  font-size: 1.8rem
}

.ov-pings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none
}

.ov-ping {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 112, 243, .3);
  animation: ping 2.4s ease-out infinite;
  opacity: 0
}

.ov-ping:nth-child(1) {
  width: 90px;
  height: 90px
}

.ov-ping:nth-child(2) {
  width: 130px;
  height: 130px;
  animation-delay: .7s
}

.ov-ping:nth-child(3) {
  width: 170px;
  height: 170px;
  animation-delay: 1.4s
}

@keyframes ping {
  0% {
    transform: scale(.7);
    opacity: .5
  }

  100% {
    transform: scale(1.1);
    opacity: 0
  }
}

.ov-title {
  font-size: 1.2rem;
  font-weight: 700
}

.ov-sub {
  font-size: .85rem;
  color: var(--txt-m)
}

.vid-lbl {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 5;
  padding: 4px 12px;
  border-radius: var(--r-f);
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .07);
  font-size: .7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .8);
  letter-spacing: .06em;
  text-transform: uppercase
}

/* ── Floating control bar ───────────────────────────────────── */
.ctrl-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-f);
  background: rgba(11, 15, 25, .72);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh-xl);
  transition: border-color var(--t);
}

.ctrl-bar:hover {
  border-color: rgba(0, 112, 243, .2)
}

.ctrl-sep {
  width: 1px;
  height: 32px;
  background: var(--bdr);
  margin: 0 2px
}

.ctrl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 52px;
  height: 52px;
  border-radius: var(--r-f);
  background: transparent;
  border: 1px solid transparent;
  color: var(--txt-m);
  transition: all var(--t) var(--ease);
  cursor: pointer
}

.ctrl-btn .ico {
  font-size: 1.15rem;
  line-height: 1
}

.ctrl-btn .lbl {
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase
}

.ctrl-btn:hover {
  background: var(--glass2);
  border-color: var(--bdr);
  color: var(--txt);
  transform: translateY(-2px)
}

.ctrl-btn:active {
  transform: scale(.92)
}

.ctrl-btn.on {
  background: rgba(0, 112, 243, .14);
  border-color: rgba(0, 112, 243, .35);
  color: #60a5fa
}

.ctrl-btn.off {
  background: var(--red-d);
  border-color: rgba(239, 68, 68, .2);
  color: var(--red)
}

.ctrl-btn.rep {
  color: var(--yellow)
}

.ctrl-btn.rep:hover {
  background: var(--ylw-d);
  border-color: rgba(245, 158, 11, .25)
}

.ctrl-next {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-f);
  background: var(--grad);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--t) var(--ease);
  box-shadow: 0 0 20px rgba(0, 112, 243, .3)
}

.ctrl-next:hover {
  box-shadow: 0 0 32px rgba(0, 112, 243, .55), 0 0 60px rgba(121, 40, 202, .25)
}

.ctrl-next:active {
  transform: scale(.95)
}

.ctrl-stop {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-f);
  background: var(--red-d);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, .22);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t) var(--ease)
}

.ctrl-stop:hover {
  background: var(--red);
  color: #fff
}

.ctrl-stop:active {
  transform: scale(.95)
}

/* ── Chat sidebar ───────────────────────────────────────────── */
.chat-side {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--bdr);
  background: var(--bg1)
}

.side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--bdr);
  flex-shrink: 0;
  background: rgba(11, 15, 25, .5)
}

.side-head h3 {
  font-size: .9rem;
  font-weight: 700
}

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.sys-msg {
  text-align: center;
  color: var(--txt-d);
  font-size: .75rem;
  padding: 4px 0;
  font-style: italic
}

.msg-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: msg-in .18s var(--ease)
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(6px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.msg-row.mine {
  align-items: flex-end
}

.msg-row.theirs {
  align-items: flex-start
}

.bubble {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: var(--r);
  word-break: break-word;
  font-size: .88rem;
  line-height: 1.55
}

.bubble.mine {
  background: var(--grad);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 112, 243, .2)
}

.bubble.theirs {
  background: var(--sf);
  color: var(--txt);
  border: 1px solid var(--bdr);
  border-bottom-left-radius: 4px
}

.msg-time {
  font-size: .68rem;
  color: var(--txt-d);
  padding: 0 4px
}

.typing-row {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0 14px 8px
}

.typing-row.show {
  display: flex
}

.typing-bub {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 13px;
  border-radius: var(--r);
  border-bottom-left-radius: 4px;
  background: var(--sf);
  border: 1px solid var(--bdr)
}

.t-d {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--txt-m)
}

.t-d:nth-child(1) {
  animation: tb 1.2s ease-in-out infinite
}

.t-d:nth-child(2) {
  animation: tb 1.2s .2s ease-in-out infinite
}

.t-d:nth-child(3) {
  animation: tb 1.2s .4s ease-in-out infinite
}

@keyframes tb {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: .4
  }

  40% {
    transform: translateY(-5px);
    opacity: 1
  }
}

.typing-lbl {
  font-size: .73rem;
  color: var(--txt-d);
  font-style: italic
}

.chat-input {
  padding: 12px 14px;
  border-top: 1px solid var(--bdr);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
  background: rgba(11, 15, 25, .5)
}

.chat-input textarea {
  flex: 1;
  background: var(--glass2);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  color: var(--txt);
  padding: 10px 14px;
  font-size: .88rem;
  resize: none;
  min-height: 42px;
  max-height: 110px;
  line-height: 1.5;
  transition: border-color var(--t)
}

.chat-input textarea:focus {
  outline: none;
  border-color: var(--bdr-hi)
}

.chat-input textarea::placeholder {
  color: var(--txt-d)
}

.chat-input textarea:disabled {
  opacity: .4;
  cursor: not-allowed
}

.send-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--r);
  background: var(--grad);
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  transition: all var(--t);
  box-shadow: 0 2px 12px rgba(0, 112, 243, .3)
}

.send-btn:hover {
  box-shadow: var(--glow);
  transform: scale(1.07)
}

.send-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
  transform: none
}

/* ════════════════════════════════════════════════════════════════
   MODALS
════════════════════════════════════════════════════════════════ */
.modal-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t)
}

.modal-veil.open {
  opacity: 1;
  visibility: visible
}

.modal-box {
  width: 100%;
  max-width: 460px;
  background: var(--sf);
  border: 1px solid var(--bdr);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-xl);
  transform: scale(.93) translateY(16px);
  transition: transform .28s var(--ease)
}

.modal-veil.open .modal-box {
  transform: scale(1) translateY(0)
}

.modal-head {
  padding: 24px 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.modal-head h2 {
  font-size: 1.1rem;
  font-weight: 800
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--r-f);
  background: var(--glass2);
  border: 1px solid var(--bdr);
  color: var(--txt-m);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t)
}

.modal-close:hover {
  background: var(--red-d);
  color: var(--red)
}

.modal-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px
}

.modal-foot {
  padding: 0 26px 26px;
  display: flex;
  gap: 12px
}

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px
}

.set-label {
  font-size: .9rem;
  font-weight: 600
}

.set-hint {
  font-size: .78rem;
  color: var(--txt-m);
  margin-top: 2px
}

.set-sep {
  height: 1px;
  background: var(--bdr)
}

.modal-sel {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--r);
  border: 1px solid var(--bdr);
  background: var(--sf2);
  color: var(--txt);
  font-size: .9rem;
  font-weight: 500;
  transition: border-color var(--t)
}

.modal-sel:focus {
  outline: none;
  border-color: var(--bdr-hi)
}

.modal-sel option {
  background: #1a2035
}

.reason-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.reason-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: var(--sf2);
  border: 1px solid var(--bdr);
  cursor: pointer;
  font-size: .86rem;
  font-weight: 500;
  transition: all var(--t)
}

.reason-opt:hover {
  border-color: var(--bdr-hi);
  background: rgba(0, 112, 243, .07)
}

.reason-opt input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  cursor: pointer
}

/* ════════════════════════════════════════════════════════════════
   ADMIN PANEL
════════════════════════════════════════════════════════════════ */
.admin-wrap {
  display: flex;
  height: 100dvh;
  overflow: hidden
}

.admin-nav {
  width: 230px;
  flex-shrink: 0;
  background: var(--bg1);
  border-right: 1px solid var(--bdr);
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  overflow-y: auto
}

.admin-logo {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 0 24px 28px;
  border-bottom: 1px solid var(--bdr);
  margin-bottom: 12px
}

.adm-section-lbl {
  font-size: .67rem;
  color: var(--txt-d);
  padding: 12px 24px 6px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase
}

.adm-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--txt-m);
  cursor: pointer;
  transition: all var(--t);
  border-left: 2px solid transparent
}

.adm-link:hover {
  color: var(--txt);
  background: var(--glass2)
}

.adm-link.active {
  color: var(--txt);
  background: rgba(0, 112, 243, .08);
  border-left-color: var(--blue)
}

.adm-link .badge {
  margin-left: auto
}

.admin-user {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--bdr);
  margin-top: auto
}

.av {
  width: 36px;
  height: 36px;
  border-radius: var(--r-f);
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .88rem;
  color: #fff;
  flex-shrink: 0
}

.av-name {
  font-size: .84rem;
  font-weight: 700
}

.av-role {
  font-size: .7rem;
  color: var(--txt-d)
}

.admin-main {
  flex: 1;
  overflow-y: auto;
  background: var(--bg)
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--bdr);
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 15, 25, .85);
  backdrop-filter: blur(20px)
}

.admin-topbar h2 {
  font-size: 1rem;
  font-weight: 800
}

.admin-topbar p {
  font-size: .78rem;
  color: var(--txt-d);
  margin-top: 2px
}

.admin-content {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px
}

.stat-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px
}

.bento-card {
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: var(--sf);
  border: 1px solid var(--bdr);
  position: relative;
  overflow: hidden;
  transition: transform var(--t), border-color var(--t)
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 112, 243, .2)
}

.bento-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: .07
}

.bc-b::before {
  background: var(--blue)
}

.bc-p::before {
  background: var(--purple)
}

.bc-r::before {
  background: var(--red)
}

.bento-icon {
  font-size: 1.2rem;
  margin-bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center
}

.bc-b .bento-icon {
  background: rgba(0, 112, 243, .12)
}

.bc-p .bento-icon {
  background: rgba(121, 40, 202, .12)
}

.bc-r .bento-icon {
  background: var(--red-d)
}

.bento-num {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -.04em;
  margin-bottom: 4px
}

.bento-lbl {
  font-size: .73rem;
  color: var(--txt-d);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600
}

.bento-tag {
  position: absolute;
  top: 16px;
  right: 16px
}

.table-card {
  border-radius: var(--r-lg);
  background: var(--sf);
  border: 1px solid var(--bdr);
  overflow: hidden
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--bdr)
}

.table-head h3 {
  font-size: .95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px
}

.tbl-accent {
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--grad)
}

table {
  width: 100%;
  border-collapse: collapse
}

thead tr {
  background: rgba(11, 15, 25, .5)
}

th {
  padding: 12px 20px;
  text-align: left;
  font-size: .69rem;
  font-weight: 700;
  color: var(--txt-d);
  letter-spacing: .1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--bdr)
}

td {
  padding: 14px 20px;
  font-size: .87rem;
  border-bottom: 1px solid rgba(255, 255, 255, .03);
  color: var(--txt-m)
}

tbody tr {
  transition: background var(--t)
}

tbody tr:hover {
  background: rgba(255, 255, 255, .02)
}

tbody tr:last-child td {
  border-bottom: none
}

.td-id {
  font-family: monospace;
  font-size: .8rem;
  color: var(--blue);
  font-weight: 700
}

.tbl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--r-f);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--t)
}

.tbl-danger {
  background: var(--red-d);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, .2)
}

.tbl-danger:hover {
  background: var(--red);
  color: #fff
}

.tbl-view {
  background: var(--glass2);
  color: var(--txt-m);
  border: 1px solid var(--bdr)
}

.tbl-view:hover {
  background: rgba(0, 112, 243, .1);
  color: var(--txt)
}

/* ── Toasts ─────────────────────────────────────────────────── */
.toast-shelf {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--r);
  background: var(--sf);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh-lg);
  font-size: .85rem;
  font-weight: 500;
  max-width: 340px;
  animation: toast-in .28s var(--ease);
  transition: opacity .25s, transform .25s
}

.toast.out {
  opacity: 0;
  transform: translateX(20px)
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(20px)
  }

  to {
    opacity: 1;
    transform: translateX(0)
  }
}

.toast.info {
  border-color: rgba(0, 112, 243, .3)
}

.toast.success {
  border-color: rgba(16, 185, 129, .3)
}

.toast.error {
  border-color: rgba(239, 68, 68, .2)
}

/* ── Utility ────────────────────────────────────────────────── */
.hidden {
  display: none !important
}

.flex-auto {
  flex: 1
}

/* ════════════════════════════════════════════════════════════════
   MOBILE
════════════════════════════════════════════════════════════════ */
@media(max-width:768px) {
  .land-nav {
    padding: 14px 20px
  }

  .nav-right .btn-ghost {
    display: none
  }

  .hero-title {
    font-size: 2.5rem
  }

  .chat-layout {
    flex-direction: column
  }

  .video-sec {
    height: 55dvh;
    flex-shrink: 0
  }

  .pip {
    width: 110px;
    height: 84px;
    bottom: 80px;
    right: 10px
  }

  .ctrl-bar {
    bottom: 10px;
    padding: 8px 12px;
    gap: 6px;
    border-radius: var(--r-xl)
  }

  .ctrl-btn {
    width: 44px;
    height: 44px
  }

  .ctrl-next,
  .ctrl-stop {
    height: 38px;
    padding: 0 14px;
    font-size: .82rem
  }

  .chat-side {
    width: 100%;
    height: 45dvh;
    border-left: none;
    border-top: 1px solid var(--bdr)
  }

  .admin-wrap {
    flex-direction: column
  }

  .admin-nav {
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--bdr);
    overflow-x: auto
  }

  .admin-logo,
  .adm-section-lbl,
  .admin-user {
    display: none
  }

  .adm-link {
    white-space: nowrap;
    padding: 14px 18px;
    border-left: none;
    border-bottom: 2px solid transparent
  }

  .adm-link.active {
    border-bottom-color: var(--blue);
    border-left-color: transparent;
    background: transparent
  }

  .stat-bento {
    grid-template-columns: repeat(3, 1fr)
  }

  .admin-content {
    padding: 16px
  }

  .admin-topbar {
    padding: 14px 16px
  }
}

@media(max-width:500px) {
  .hero-title {
    font-size: 2rem
  }

  .cta-row {
    flex-direction: column;
    align-items: center
  }

  .cta-row .btn {
    width: 100%;
    max-width: 300px
  }

  .filter-row {
    flex-direction: column;
    align-items: center
  }

  .sel {
    width: 100%;
    max-width: 300px;
    min-width: unset
  }

  .stat-bento {
    grid-template-columns: 1fr 1fr
  }

  .reason-grid {
    grid-template-columns: 1fr
  }

  .ctrl-bar {
    width: calc(100% - 24px);
    justify-content: center
  }
}