:root {
  --bg: #000;
  --panel: #0e0e12;
  --red: #E11E26;
  --red-d: #c4181f;
  --yellow: #FFC400;
  --text: #fff;
  --muted: #a8a8b3;
  --line: rgba(255, 255, 255, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'TikTok Sans', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.auth {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 100vh;
}

.auth.reverse { grid-template-columns: .95fr 1.05fr; }
.auth.reverse .media { order: 2; }
.auth.reverse .form-side { order: 1; }

/* Media (video) */
.media { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 48px; }
.media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.media .ov {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.86)),
              radial-gradient(80% 60% at 30% 20%, rgba(225,30,38,.28), transparent);
}
.media .inner { position: relative; z-index: 2; max-width: 460px; }
.media .tag {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: rgba(255,255,255,.06);
  color: var(--yellow); font-weight: 700; font-size: 12px;
  padding: 8px 14px; border-radius: 100px; margin-bottom: 22px;
}
.media h2 { font-size: clamp(34px, 4.2vw, 56px); font-weight: 900; letter-spacing: -1.5px; line-height: 1; }
.media h2 .duo {
  background: linear-gradient(95deg, var(--red), var(--yellow));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.media p { color: #d8d8e0; margin-top: 16px; font-size: 16px; font-weight: 500; line-height: 1.5; }

/* Form */
.form-side { display: flex; align-items: center; justify-content: center; padding: 40px 28px; position: relative; }
.card { width: 100%; max-width: 400px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 900; font-size: 21px; letter-spacing: -.5px; margin-bottom: 32px; }
.brand img { height: 38px; width: 38px; border-radius: 10px; }
h1 { font-size: 28px; font-weight: 900; letter-spacing: -1px; margin-bottom: 6px; }
.muted { color: var(--muted); font-size: 15px; margin-bottom: 26px; font-weight: 500; }
label { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 7px; font-weight: 600; }

.field { position: relative; }
.field i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 19px; color: var(--muted); transition: color .2s; }
.field:focus-within i { color: var(--red); }
input {
  width: 100%; padding: 14px 14px 14px 44px; background: var(--panel);
  border: 1.5px solid var(--line); border-radius: 12px; color: var(--text);
  font-family: inherit; font-size: 15px; font-weight: 500; transition: border-color .2s, background .2s;
}
input::placeholder { color: #6b6b78; }
input:focus { outline: none; border-color: var(--red); background: #121218; }

.btn {
  width: 100%; border: none; border-radius: 12px; padding: 15px; font-family: inherit;
  font-weight: 700; font-size: 16px; cursor: pointer; margin-top: 24px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .18s, transform .18s, color .18s;
}
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 8px 30px -10px rgba(225,30,38,.6); }
.btn-red:hover { background: var(--red-d); transform: translateY(-1px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.btn i { font-size: 20px; }

.msg { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 14px; display: none; font-weight: 500; }
.msg.err { display: flex; gap: 8px; align-items: center; background: rgba(225,30,38,.14); color: #ff9a9d; border: 1px solid rgba(225,30,38,.4); }
.msg.ok { display: flex; gap: 8px; align-items: center; background: rgba(52,211,96,.14); color: #86efac; border: 1px solid rgba(52,211,96,.4); }

.foot { text-align: center; margin-top: 24px; color: var(--muted); font-size: 14px; font-weight: 500; }
.foot a { color: var(--yellow); font-weight: 700; text-decoration: none; }
.back { position: absolute; top: 22px; right: 26px; color: var(--muted); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.back:hover { color: var(--yellow); }

/* Home / dashboard */
.home-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.home-card { width: 100%; max-width: 520px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 36px; }
.home-card .avatar { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--red), var(--yellow)); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 900; }
.kv { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv span:first-child { color: var(--muted); font-weight: 600; }
.pill { display: inline-block; background: rgba(255,196,0,.14); color: var(--yellow); border: 1px solid rgba(255,196,0,.4); border-radius: 100px; padding: 3px 12px; font-size: 13px; font-weight: 700; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .media { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
