/* Shared styles for the login and register pages (user, host and admin).
   Phone first; the two-column layout is added at 900px.
   Host and admin pages add class="dark" on <body>. */

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

:root {
  --pink: #ff4f87;
  --grad: linear-gradient(135deg, #ff2d75, #ff7b54);
  --bg: #fff7f9;
  --surface: #ffffff;
  --field: #fff7f9;
  --text: #1d1522;
  --muted: #8a7f8d;
  --border: #f3e3ea;
  --green: #16a34a;
  --red: #e5484d;
  --shadow: 0 24px 60px rgba(60, 20, 40, 0.1);
  --shadow-pink: 0 14px 30px rgba(255, 79, 135, 0.32);
}

body.dark {
  --bg: #0b1020;
  --surface: #141a2e;
  --field: #1a2138;
  --text: #e8ebf3;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --green: #4ade80;
  --red: #f87171;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input { font-family: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; touch-action: manipulation; }
a { color: var(--pink); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; }
em { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 800; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ── BRAND PANEL ── */
.auth-side {
  background: var(--grad);
  color: #fff;
  padding: calc(28px + env(safe-area-inset-top)) 22px 56px;
  position: relative;
  overflow: hidden;
}
.auth-side::before, .auth-side::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.13); }
.auth-side::before { width: 260px; height: 260px; right: -90px; top: -110px; }
.auth-side::after { width: 180px; height: 180px; left: -70px; bottom: -90px; }
.auth-side > * { position: relative; z-index: 1; }

.brand { display: inline-block; font-size: 24px; font-weight: 800; letter-spacing: -0.8px; color: #fff; margin-bottom: 18px; }
.brand:hover { text-decoration: none; }

.tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.500px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.auth-side h1 { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.12; margin-bottom: 10px; }
.auth-side > p { font-size: 14.500px; opacity: 0.94; max-width: 440px; }

/* the longer supporting content only shows on wide screens */
.side-extra { display: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 700;
}

.features { display: grid; gap: 14px; }
.feature { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.feature-icon {
  width: 40px; height: 40px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.notice { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 18px; padding: 18px 20px; max-width: 440px; }
.notice h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.notice p { font-size: 13.500px; opacity: 0.92; }

/* ── FORM ── */
.auth-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
  margin-top: -32px;
  position: relative;
  z-index: 2;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 28px 22px 26px;
  box-shadow: var(--shadow);
  align-self: flex-start;
  animation: rise 0.45s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.card-icon {
  width: 54px; height: 54px;
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-pink);
}

.auth-card h2 { font-size: 25px; font-weight: 800; letter-spacing: -0.7px; line-height: 1.15; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin: 4px 0 22px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }

.control { position: relative; }
.control > svg {
  position: absolute;
  left: 15px; top: 50%;
  width: 19px; height: 19px;
  margin-top: -9.500px;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.2s;
}
.control:focus-within > svg { color: var(--pink); }

.control input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 46px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--field);
  /* 16px stops phones zooming in when a field is tapped */
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.control input::placeholder { color: var(--muted); opacity: 0.75; }
.control input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 79, 135, 0.14); background: var(--surface); }
.control.has-toggle input { padding-right: 54px; }

/* show / hide password */
.toggle-password {
  position: absolute;
  right: 5px; top: 5px;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.toggle-password:hover { color: var(--pink); background: rgba(255, 79, 135, 0.1); }
.toggle-password svg { width: 21px; height: 21px; }
.toggle-password .eye-off { display: none; }
.toggle-password.showing { color: var(--pink); }
.toggle-password.showing .eye { display: none; }
.toggle-password.showing .eye-off { display: block; }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 20px; font-size: 13.500px; }

.check { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.500px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--pink); flex-shrink: 0; }
.check.terms { margin: 2px 0 20px; align-items: flex-start; line-height: 1.5; }
.check.terms input { margin-top: 2px; }

.form-message {
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.500px;
  font-weight: 600;
  margin-bottom: 16px;
  background: rgba(229, 72, 77, 0.1);
  color: var(--red);
}
.form-message.show { display: block; }
.form-message.ok { background: rgba(22, 163, 74, 0.12); color: var(--green); }

.submit {
  width: 100%;
  height: 56px;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: var(--shadow-pink);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, filter 0.2s;
}
.submit:hover { filter: brightness(1.06); }
.submit:active { transform: scale(0.98); }
.submit:disabled { opacity: 0.7; cursor: default; }
.submit::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: shine 3.600s infinite;
}
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }

.switch { text-align: center; color: var(--muted); font-size: 14px; margin-top: 20px; }
.footnote { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
.back-home { display: block; text-align: center; margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* ── SMALL PHONES ── */
@media (max-width: 350px) {
  .auth-side { padding-left: 16px; padding-right: 16px; }
  .auth-side h1 { font-size: 26px; }
  .auth-main { padding-left: 10px; padding-right: 10px; }
  .auth-card { padding: 22px 16px; }
}

/* ── DESKTOP: brand panel on the left, form on the right ── */
@media (min-width: 900px) {
  .auth { flex-direction: row; }

  .auth-side {
    flex: 1 1 46%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px clamp(40px, 6vw, 90px);
  }
  .auth-side::before { width: 460px; height: 460px; right: -160px; top: -160px; }
  .auth-side::after { width: 340px; height: 340px; left: -130px; bottom: -150px; }
  .brand { font-size: 28px; position: absolute; top: 40px; left: clamp(40px, 6vw, 90px); margin: 0; }
  .auth-side h1 { font-size: clamp(38px, 4vw, 54px); letter-spacing: -1.800px; margin-bottom: 16px; }
  .auth-side > p { font-size: 17px; }
  .side-extra { display: block; margin-top: 34px; }

  .auth-main { flex: 1 1 54%; align-items: center; margin-top: 0; padding: 40px; }
  .auth-card { padding: 40px 38px; align-self: center; }
  .auth-card h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
