:root {
  --brand: #0891b2;
  --brand-dark: #0e7490;
  --brand-accent: #0d9488;
  --brand-light: #ecfeff;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-soft: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(7, 25, 41, 0.12);
  --gradient: linear-gradient(135deg, #0e7490 0%, #0891b2 55%, #0d9488 100%);
}

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

html { scroll-behavior: smooth; }

body.auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}

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

@media (max-width: 960px) {
  .auth-layout { grid-template-columns: 1fr; }
}

/* Left panel */
.auth-aside {
  position: relative;
  overflow: hidden;
  background: #071929 url('/images/auth-bg.png') center / cover no-repeat;
}

.auth-aside::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(7, 25, 41, 0.88) 0%, rgba(14, 116, 144, 0.72) 45%, rgba(13, 148, 136, 0.55) 100%);
}

.auth-aside-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 48px 40px;
  color: #fff;
}

@media (max-width: 960px) {
  .auth-aside { min-height: 220px; }
  .auth-aside-inner { padding: 32px 24px; }
  .auth-aside-features { display: none; }
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
}

.auth-brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.auth-aside-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.auth-aside-hero p {
  margin: 0;
  max-width: 420px;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.auth-aside-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
  padding-top: 40px;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.88);
}

.auth-feature-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
}

/* Right panel */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.auth-card-wrap {
  width: 100%;
  max-width: 440px;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}

@media (max-width: 960px) {
  .auth-mobile-brand { display: flex; }
}

.auth-mobile-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.auth-alert {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-alert--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-alert--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.auth-card .auth-subtitle {
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.auth-checkbox label {
  font-size: 0.9rem;
  color: var(--ink-muted);
  cursor: pointer;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 12px 30px rgba(8, 145, 178, 0.28);
  transition: transform 0.15s, box-shadow 0.15s;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(8, 145, 178, 0.34);
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.auth-footer a {
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }
