/* GALAXY BOSS · owner sign in — glass theme */
:root {
  --bg: #08090c;
  --ink: #f4f6fa;
  --text: #c8d0dd;
  --muted: #9ba5b6;
  --faint: #7f8a9c;
  --crimson: #e02434;
  --crimson-hi: #ff5061;
  --crimson-soft: rgba(224, 36, 52, .16);
  --crimson-line: rgba(224, 36, 52, .38);
  --stroke: rgba(255, 255, 255, .085);
  --stroke-soft: rgba(255, 255, 255, .055);
  --stroke-strong: rgba(255, 255, 255, .16);
  --field: rgba(8, 10, 15, .55);
  --glass: linear-gradient(163deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .022) 46%, rgba(255, 255, 255, .012));
  --glass-flat: rgba(255, 255, 255, .04);
  --ok: #4fd6a4;
  --danger: #ff7a82;
  --font: "Geist", "Noto Sans Khmer", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, "Cascadia Code", Consolas, monospace;
  --shadow: 0 40px 90px -44px rgba(0, 0, 0, 1), 0 8px 24px -16px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--text);
  font: 400 14.5px/1.62 var(--font);
  background:
    radial-gradient(1000px 620px at 10% -10%, rgba(224, 36, 52, .18), transparent 62%),
    radial-gradient(820px 520px at 96% 8%, rgba(196, 208, 228, .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: rgba(224, 36, 52, .35); color: #fff; }
:focus-visible { outline: 2px solid rgba(255, 96, 110, .9); outline-offset: 2px; border-radius: 8px; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .13); border-radius: 9px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ambient span { position: absolute; border-radius: 50%; filter: blur(96px); opacity: .55; }
.ambient span:nth-child(1) { width: 480px; height: 480px; left: -140px; top: -170px; background: rgba(224, 36, 52, .30); animation: drift 28s ease-in-out infinite alternate; }
.ambient span:nth-child(2) { width: 360px; height: 360px; right: -120px; top: 12%; background: rgba(170, 190, 218, .13); animation: drift 34s ease-in-out infinite alternate-reverse; }
.ambient span:nth-child(3) { width: 520px; height: 520px; left: 30%; bottom: -340px; background: rgba(224, 36, 52, .13); animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(40px, 30px, 0) scale(1.07); } }

.auth {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
}

/* ── showcase ──────────────────────────────────────────── */
.showcase {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 26px;
  padding: 40px 48px 36px;
  border-right: 1px solid var(--stroke);
  background:
    linear-gradient(180deg, rgba(20, 23, 31, .55), rgba(9, 11, 16, .25)),
    radial-gradient(720px 520px at 34% 30%, rgba(224, 36, 52, .10), transparent 64%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.showcase::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(700px 520px at 32% 26%, #000 18%, transparent 78%);
  -webkit-mask-image: radial-gradient(700px 520px at 32% 26%, #000 18%, transparent 78%);
}

.brand { position: relative; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px; flex: none; border-radius: 14px; object-fit: cover;
  border: 1px solid var(--stroke-strong);
  box-shadow: 0 14px 30px -16px rgba(224, 36, 52, .85), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.brand-name strong {
  display: block; font-size: 14px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink);
}
.brand-name span { display: block; margin-top: 2px; font-size: 11px; color: var(--faint); }

.art { position: relative; display: flex; justify-content: center; align-items: center; flex: 1 1 auto; min-height: 0; padding: 10px 0; }
.art::before {
  content: ""; position: absolute; width: min(62%, 420px); aspect-ratio: 1;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(224, 36, 52, .34), transparent 72%);
  filter: blur(18px);
}
.art img {
  position: relative; width: min(78%, 420px); height: auto; aspect-ratio: 1/1;
  border-radius: 26px; object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .95), 0 24px 50px -30px rgba(224, 36, 52, .7);
}

.pitch { position: relative; max-width: 470px; }
.eyebrow {
  margin: 0 0 12px; display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: #f0a2aa;
}
.eyebrow::before { content: ""; width: 16px; height: 1px; background: var(--crimson); }
.pitch h2 {
  margin: 0; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.04;
  font-weight: 600; letter-spacing: -.035em; color: var(--ink);
}
.pitch p { margin: 14px 0 0; max-width: 48ch; color: var(--muted); font-size: 13.5px; line-height: 1.7; }

.meta { position: relative; display: flex; flex-wrap: wrap; gap: 9px; }
.meta .row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 13px; border: 1px solid var(--stroke); border-radius: 10px;
  background: var(--glass-flat);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}
.meta .row b { color: var(--text); font-weight: 500; }
.dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(79, 214, 164, .14); }

/* ── form panel ────────────────────────────────────────── */
.panel { display: flex; flex-direction: column; padding: 38px 32px; }
.auth-wrap { width: 100%; max-width: 384px; margin: auto; }
.auth-brand { display: none; align-items: center; gap: 11px; margin-bottom: 20px; }
.auth-brand .brand-mark { width: 40px; height: 40px; border-radius: 12px; }

.auth-card {
  width: 100%; padding: 32px 30px 26px;
  border: 1px solid var(--stroke-strong); border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.auth-card h1 { margin: 0; font-size: 27px; line-height: 1.08; font-weight: 600; letter-spacing: -.03em; color: var(--ink); }
.sub { margin: 9px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }

label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 500; color: var(--muted); }
.field { min-width: 0; }
.field + .field { margin-top: 15px; }
input {
  width: 100%; min-height: 44px; padding: 11px 13px;
  border: 1px solid var(--stroke-strong); border-radius: 12px;
  background: var(--field); color: var(--ink);
  font: inherit; font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder { color: var(--faint); }
input:hover { border-color: rgba(255, 255, 255, .24); }
input:focus { border-color: rgba(255, 96, 110, .7); box-shadow: 0 0 0 4px rgba(224, 36, 52, .16); background: rgba(10, 12, 18, .72); }

button {
  width: 100%; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--stroke-strong); border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  color: var(--ink); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s, opacity .15s, box-shadow .15s;
}
button:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06)); border-color: rgba(255, 255, 255, .22); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; }
button.primary, #submit {
  margin-top: 22px;
  border-color: rgba(255, 110, 122, .55);
  background: linear-gradient(180deg, #f03a4b, #bf1322); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 16px 30px -18px rgba(224, 36, 52, .95);
}
button.primary:hover, #submit:hover { background: linear-gradient(180deg, #ff5364, #cb1828); border-color: rgba(255, 130, 140, .7); }
.link-btn {
  min-height: 36px; margin-top: 9px;
  border: 1px dashed var(--stroke); background: transparent; color: var(--faint);
  font-size: 12px; font-weight: 500;
}
.link-btn:hover { color: var(--text); border-color: var(--stroke-strong); background: rgba(255, 255, 255, .04); }

/* telegram panel */
.tg-panel { margin-top: 4px; padding: 17px; border: 1px solid var(--stroke); border-radius: 14px; background: rgba(8, 10, 15, .4); }
.tg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tg-icon {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border-radius: 10px; color: #8fbcff;
  background: rgba(90, 150, 240, .14); border: 1px solid rgba(120, 170, 245, .32);
}
.tg-icon svg { width: 19px; height: 19px; }
.tg-head strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.tg-head span:not(.tg-icon) { display: block; margin-top: 2px; font-size: 11px; color: var(--faint); }
.hint { margin: 0 0 12px; color: var(--faint); font-size: 11.5px; line-height: 1.65; }
/* Telegram's "large" OAuth button is exactly 238x40; sizing the frame to it
   avoids the white gutter and clipped corners seen with a stretched iframe. */
.tg-slot { position: relative; display: flex; align-items: center; justify-content: center; width: 238px; height: 40px; margin: 0 auto; }
.tg-slot iframe { width: 238px; height: 40px; border: 0; border-radius: 10px; background: transparent; color-scheme: normal; opacity: 0; transition: opacity .2s; }
.tg-slot.ready iframe { opacity: 1; }
.tg-skeleton {
  position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(100deg, rgba(255,255,255,.05) 20%, rgba(255,255,255,.13) 40%, rgba(255,255,255,.05) 60%);
  background-size: 200% 100%; animation: tgShimmer 1.3s linear infinite;
}
@keyframes tgShimmer { 0% { background-position: 150% 0; } 100% { background-position: -50% 0; } }

.error { margin-top: 13px; min-height: 18px; color: var(--danger); font-size: 12.5px; line-height: 1.5; }
.foot {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--stroke-soft);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); text-align: center;
}
.page-note {
  margin: 16px 0 0; text-align: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 1040px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); }
  .showcase { padding: 32px 34px 30px; }
  .art img { width: min(72%, 340px); }
}
@media (max-width: 900px) {
  input, textarea { font-size: 16px; }
  .auth { grid-template-columns: 1fr; }
  .showcase { display: none; }
  .panel { padding: 26px max(20px, env(safe-area-inset-left)) calc(26px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-right)); }
  .auth-wrap { max-width: 420px; }
  .auth-brand { display: flex; }
  .auth-card { border-radius: 18px; padding: 26px 22px 22px; }
}
@media (max-width: 359px) {
  .panel { padding-left: 12px; padding-right: 12px; }
  .auth-card { padding-left: 15px; padding-right: 15px; }
  .tg-panel { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
