@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(145deg, #d9ede9 0%, #eef4fb 45%, #e3ecf8 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #111827;
}

/* ── Page layout ── */
.page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

/* ── Card ── */
.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  padding: 48px 48px 44px;
  width: 100%;
  max-width: 480px;
  text-align: center;
}

/* ── Logo ── */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.logo-icon {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.logo-text {
  text-align: left;
  line-height: 1.1;
}

.logo-text span {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.04em;
}

/* ── Headings ── */
.card h1 {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.card .subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 28px;
  line-height: 1.5;
}

.card .subtitle strong {
  color: #374151;
  font-weight: 600;
}

/* ── Form ── */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.form-group label .req {
  color: #ef4444;
  margin-left: 2px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input::placeholder {
  color: #9ca3af;
}

.form-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 5px;
  line-height: 1.5;
}

/* Phone input with flag */
.phone-input-wrapper {
  display: flex;
  gap: 8px;
}

.phone-flag-select {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
  font-family: inherit;
  color: #374151;
}

.phone-flag-select .flag {
  font-size: 18px;
}

.phone-flag-select .caret {
  font-size: 10px;
  color: #6b7280;
}

.phone-input-wrapper input {
  flex: 1;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  text-align: left;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #1e3a8a;
  cursor: pointer;
}

.checkbox-group label {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-group label a {
  color: #2563eb;
  text-decoration: none;
}

.checkbox-group label a:hover {
  text-decoration: underline;
}

/* ── Buttons ── */
.btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: #1e3a8a;
  color: #ffffff;
  margin-bottom: 12px;
}

.btn-primary:hover {
  background: #1d3580;
  opacity: 0.95;
}

.btn-outline {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  margin-bottom: 12px;
}

.btn-outline:hover {
  background: #f9fafb;
}

/* ── Links ── */
.link-row {
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
}

.link-row a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

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

/* ── Code input ── */
.code-input {
  text-align: center;
  font-size: 18px;
  letter-spacing: 0.15em;
}

/* ── Footer ── */
footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 14px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  gap: 12px;
  flex-wrap: wrap;
}

footer .footer-copy {
  white-space: nowrap;
}

footer .footer-note {
  flex: 1;
  text-align: center;
}

footer .footer-note a {
  color: #2563eb;
  text-decoration: none;
}

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

footer .footer-links {
  display: flex;
  gap: 16px;
  white-space: nowrap;
}

footer .footer-links a {
  color: #2563eb;
  text-decoration: none;
}

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

/* ── Utility ── */
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mb-6  { margin-bottom: 24px; }

/* ── User dropdown ── */
.user-menu-wrap {
  position: relative;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  min-width: 160px;
  padding: 4px 0;
  z-index: 100;
}

.user-dropdown.open {
  display: block;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s;
  font-family: 'Inter', sans-serif;
}

.user-dropdown-item:hover {
  background: #f3f4f6;
}

.user-dropdown-item.logout {
  color: #ef4444;
  border-top: 1px solid #f3f4f6;
}

.user-dropdown-item svg {
  flex-shrink: 0;
  color: inherit;
}
