:root {
  --bg-main: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-label: #334155;
  --input-bg: #f8fafc;
  --input-border: #cbd5e1;
  --input-focus: #0284c7;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --danger: #ef4444;
  --success: #10b981;
  --radius: 8px;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

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

html, body {
  height: 100%;
}

body.account-page {
  background-color: var(--bg-main);
  background-image: radial-gradient(ellipse at 50% 20%, #ffffff 0%, #f1f5f9 60%, #e2e8f0 100%);
  color: var(--text-main);
  font-family: var(--font-family);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh;
  padding: 24px 16px;
}

.auth-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.auth-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  max-height: 44px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto 12px auto;
  display: block;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

form.account-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}

form.account-form.is-active {
  display: flex;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-label);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

input, select {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
}

select option {
  background-color: #ffffff;
  color: var(--text-main);
}

.input-wrap svg.chevron {
  position: absolute;
  right: 12px;
  pointer-events: none;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

input::placeholder {
  color: #94a3b8;
}

input:focus, select:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
  background-color: #ffffff;
}

.input-wrap button.eye {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  padding: 6px;
  display: flex;
  color: var(--text-muted);
  cursor: pointer;
}

.input-wrap button.eye:hover {
  color: var(--text-main);
}

.input-wrap button.eye svg {
  width: 18px;
  height: 18px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-label);
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

a.link {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

a.link:hover {
  text-decoration: underline;
}

.consent {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

button.submit {
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

button.submit:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

button.submit:active {
  transform: translateY(1px);
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
}

.mode-toggle {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.mode-toggle strong {
  color: var(--primary);
  font-weight: 600;
}

.mode-toggle:hover strong {
  text-decoration: underline;
}

.form-note {
  font-size: 13px;
  color: var(--success);
  margin-top: 4px;
  text-align: center;
}

.form-note.has-message {
  padding: 8px 12px;
  background-color: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius);
}

.form-note.error {
  color: var(--danger);
  background-color: rgba(239, 68, 68, 0.1);
}

.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 2px;
}
