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

:root {
  --teal: #00B8A9;
  --teal-d: #009E91;
  --coral: #F6416C;
  --navy: #2D3561;
  --white: #fff;
  --gray: #6B7280;
  --gray-l: #9CA3AF;
  --light: #F8FAFC;
  --border: #E5E7EB;
  --success: #10B981;
  --error: #EF4444;
}

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

body {
  margin: 0;
  font-family: 'Archivo', sans-serif;
  background: var(--light);
  color: var(--navy);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'DM Serif Display', serif;
}

button, input, textarea, select {
  font-family: 'Archivo', sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

/* Sidebar */
.sidebar {
  width: 400px;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--navy) 0%, #1a2a5e 50%, #0d6e68 100%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246,65,108,.2), transparent 70%);
  pointer-events: none;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.sidebar-logo svg {
  width: 40px;
  height: 40px;
}

.sidebar-logo-text {
  color: var(--white);
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
}

.sidebar-content {
  position: relative;
  z-index: 1;
}

.sidebar-content h2 {
  font-size: 2rem;
  color: var(--white);
  margin: 0 0 16px;
  line-height: 1.2;
}

.sidebar-content p {
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  font-size: .95rem;
  margin: 0 0 28px;
}

.sidebar-points {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.72);
  font-size: .86rem;
  line-height: 1.5;
}

.sidebar-bottom {
  color: rgba(255,255,255,.45);
  font-size: .85rem;
  position: relative;
  z-index: 1;
}

.sidebar-bottom a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

/* Main */
.main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 48px 24px;
}

.form-container {
  width: 100%;
  max-width: 480px;
  padding-top: 8px;
}

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

.form-header h1 {
  font-size: 2.15rem;
  margin: 0 0 8px;
}

.form-header p {
  margin: 0;
  color: var(--gray);
  line-height: 1.6;
}

/* Alert */
.alert {
  display: none;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: .9rem;
  gap: 10px;
  align-items: flex-start;
}

.alert.visible {
  display: flex;
}

.alert-error {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.24);
  color: #B91C1C;
}

.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--navy);
}

.field-input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: 14px;
  font-size: .95rem;
  outline: none;
  transition: .2s ease;
  background: #fff;
  color: var(--navy);
}

.field-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0,184,169,.1);
}

.password-wrap {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray);
}

.btn-submit {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal), #009E91);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 10px 28px rgba(0,184,169,.3);
  transition: .2s ease;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,184,169,.38);
}

.btn-submit:disabled {
  background: #D1D5DB;
  box-shadow: none;
  cursor: not-allowed;
}

.terms-note {
  margin-top: 16px;
  font-size: .85rem;
  color: var(--gray);
  line-height: 1.6;
  text-align: center;
}

.terms-note a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

.login-link {
  margin-top: 18px;
  text-align: center;
  color: var(--gray);
  font-size: .9rem;
}

.login-link a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 900px) {
  body {
    flex-direction: column;
    overflow: auto;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    position: static;
    padding: 30px 22px;
  }

  .main {
    padding: 28px 18px;
  }
}