/* ============================================================
   CHITRASA — Register Page Styles
   OWASP: No sensitive data in CSS; no user-controlled values
   ============================================================ */

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

:root {
  --bg-primary:    #F4F3EF;
  --bg-secondary:  #ffffff;
  --bg-tertiary:   #f0f2eb;
  --bg-elevated:   #e8ebe3;
  --text-primary:  #2d3b2d;
  --text-secondary:#4a5a4a;
  --text-muted:    #6b7a6b;
  --text-light:    #8a9a8a;
  --accent:        #3D5A3E;
  --accent-hover:  #2e4530;
  --accent-muted:  rgba(61, 90, 62, 0.10);
  --gold:          #C5A649;
  --danger:        #a65d57;
  --danger-muted:  rgba(166, 93, 87, 0.10);
  --success:       #5a7a52;
  --success-muted: rgba(90, 122, 82, 0.10);
  --border:        rgba(45, 59, 45, 0.08);
  --border-strong: rgba(45, 59, 45, 0.15);
  --shadow-sm:     0 2px 12px rgba(45, 59, 45, 0.07);
  --shadow-lg:     0 8px 40px rgba(45, 59, 45, 0.12);
  --radius-md:     12px;
  --radius-xl:     24px;
  --radius-pill:   100px;
  --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── PILL HEADER ─────────────────────────────────────────── */

.page-wrap {
  padding: 20px 24px 0;
}

.header-pill {
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);       /* ← oval pill shape */
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.header-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.header-link:hover { color: var(--accent); }

.header-link svg {
  width: 16px;
  height: 16px;
}

/* ── MAIN LAYOUT ─────────────────────────────────────────── */

.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-container {
  width: 100%;
  max-width: 480px;
}

.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);    /* sharp-ish corners, NOT pill */
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

/* ── AUTH HEADER ─────────────────────────────────────────── */

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

.auth-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--text-muted);
}

/* ── ALERTS ──────────────────────────────────────────────── */

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 24px;
  display: none;
  align-items: flex-start;
  gap: 12px;
}
.alert.show { display: flex; }
.alert-error   { background: var(--danger-muted);  color: var(--danger);  border: 1px solid rgba(166,93,87,0.2); }
.alert-success { background: var(--success-muted); color: var(--success); border: 1px solid rgba(90,122,82,0.2); }
.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

/* ── FORM ELEMENTS ───────────────────────────────────────── */

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-label .optional { color: var(--text-muted); font-weight: 400; font-size: 13px; }

.form-input {
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  transition: var(--transition);
  /* No border-radius: pill — sharp form inputs, pill is header-only */
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-input::placeholder { color: var(--text-light); }

/* Remove number input spinners — we have the GB label */
.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.form-input[type="number"] { -moz-appearance: textfield; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── STORAGE FIELD ───────────────────────────────────────── */

.storage-group { position: relative; }

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

.storage-input {
  padding-right: 52px; /* room for "GB" label */
}

.storage-unit {
  position: absolute;
  right: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  pointer-events: none;
  letter-spacing: 0.5px;
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── PASSWORD ────────────────────────────────────────────── */

.password-wrapper { position: relative; }

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: var(--transition);
}
.password-toggle:hover { color: var(--text-primary); }
.password-toggle svg { width: 20px; height: 20px; }

.password-strength { display: flex; gap: 4px; margin-top: 8px; }
.password-strength-bar {
  flex: 1; height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  transition: var(--transition);
}
.password-strength-bar.weak   { background: var(--danger); }
.password-strength-bar.medium { background: #f59e0b; }
.password-strength-bar.strong { background: var(--success); }

.password-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── CHECKBOX ────────────────────────────────────────────── */

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 20px;
}
.checkbox-wrapper input { display: none; }
.checkbox-custom {
  width: 20px; height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  margin-top: 2px;
}
.checkbox-wrapper input:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-custom svg { width: 12px; height: 12px; color: white; opacity: 0; transition: var(--transition); }
.checkbox-wrapper input:checked + .checkbox-custom svg { opacity: 1; }
.checkbox-label { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.checkbox-label a { color: var(--accent); text-decoration: none; }
.checkbox-label a:hover { text-decoration: underline; }

/* ── BUTTONS ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);   /* pill-shaped buttons */
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  width: 100%;
}
.btn svg { width: 18px; height: 18px; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-social {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.btn-social:hover:not(:disabled) { background: var(--bg-elevated); border-color: var(--border-strong); }

/* ── DIVIDER ─────────────────────────────────────────────── */

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}
.divider-line { flex: 1; height: 1px; background: var(--border); }
.divider-text { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ── SPINNER ─────────────────────────────────────────────── */

.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FOOTER ──────────────────────────────────────────────── */

.auth-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.auth-footer-text { font-size: 14px; color: var(--text-muted); }
.auth-footer-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-footer-link:hover { text-decoration: underline; }

.footer { padding: 24px 40px; text-align: center; }
.footer-text { font-size: 13px; color: var(--text-muted); }
.footer-text a { color: var(--accent); text-decoration: none; }
.footer-text a:hover { text-decoration: underline; }

/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 600px) {
  .page-wrap { padding: 12px 12px 0; }
  .header-pill { padding: 12px 20px; }
  .logo-mark { font-size: 19px; }
  .auth-card { padding: 32px 22px; }
  .auth-title { font-size: 26px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}