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

:root {
  --brand: #00A8A8;
  --brand-dark: #007A7A;
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --bg: #F5F4F0;
  --sidebar-bg: #111827;
  --border: #E2E0DC;
  --error: #D93025;
  --input-bg: #FFFFFF;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 420px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  position: relative;
  overflow: hidden;
}

.sidebar::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(0, 168, 168, 0.07);
  pointer-events: none;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 48px 48px 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: auto;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.brand-name {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E5E5E5;
}

.sidebar-copy {
  padding: 96px 0 48px;
}

.sidebar-copy h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #F5F4F0;
  margin-bottom: 20px;
}

.sidebar-copy p {
  font-size: 1rem;
  line-height: 1.65;
  color: #9CA3AF;
  max-width: 280px;
}

.sidebar-footer {
  font-size: 0.8rem;
  color: #4B5563;
  letter-spacing: 0.04em;
}

/* ── Main ── */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
}

.form-wrap {
  width: 100%;
  max-width: 400px;
}

.form-header {
  margin-bottom: 36px;
}

.form-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.875rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}

.form-header p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ── Error ── */
.error-msg {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--error);
  font-size: 0.875rem;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 24px;
}

/* ── Fields ── */
.field {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 168, 168, 0.12);
}

input::placeholder { color: #C4C2BC; }

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 48px;
}

.toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.2s;
}

.toggle-pw:hover { color: var(--text); }

/* ── Submit ── */
.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  background: var(--brand);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-submit:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.btn-submit:active { transform: translateY(0); }

/* ── Contact ── */
.contact-hint {
  margin-top: 28px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.contact-hint a {
  color: var(--brand-dark);
  text-decoration: none;
}

.contact-hint a:hover { text-decoration: underline; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .layout { flex-direction: column; }

  .sidebar {
    width: 100%;
    min-height: 0;
  }

  .sidebar-inner {
    padding: 32px 24px 28px;
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .sidebar-copy { padding: 0; }
  .sidebar-copy h1 { font-size: 1.5rem; margin-bottom: 0; }
  .sidebar-copy p { display: none; }
  .sidebar-footer { display: none; }
  .brand { margin-bottom: 0; }
  .sidebar::after { display: none; }

  .main { padding: 32px 24px; align-items: flex-start; }
  .form-wrap { max-width: 100%; }
}

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