:root {
  --navy: #0c1f3f;
  --navy-soft: #16294d;
  --orange: #ff6a34;
  --bg: #f6f7fb;
  --border: #e4e7ef;
  --muted: #6b7280;
  --danger: #c62828;
  --danger-bg: #fdecea;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--navy);
  min-height: 100vh;
}
h1,
h2,
h3 {
  font-family: "Sora", sans-serif;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.brand img {
  height: 28px;
  width: 28px;
  object-fit: contain;
}
.back-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover {
  color: var(--navy);
}

.center-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 16px 64px;
}
.card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 12px 32px rgba(12, 31, 63, 0.06);
}
.card h1 {
  font-size: 22px;
  margin: 0 0 6px;
}
.card .sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
  line-height: 1.5;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
}
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: #fbfbfd;
}
input:focus {
  border-color: var(--orange);
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 10px;
  border: none;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn:not(:disabled):hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--navy);
  color: #fff;
  margin-top: 22px;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
}

.error-text {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-top: 14px;
  line-height: 1.4;
}
.success-text {
  background: #e9f8ee;
  color: #1e7a37;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-top: 14px;
  line-height: 1.4;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f8f9fc;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 22px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.account-row .email {
  font-weight: 600;
  font-size: 14px;
  word-break: break-all;
}
.account-row .uid {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.warning-box {
  background: #fff7ed;
  border: 1px solid #fde3c3;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #7a4a05;
  margin-bottom: 18px;
}
.warning-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.warning-box li {
  margin-bottom: 4px;
}

.confirm-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 4px;
}
.confirm-row input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.confirm-row label {
  margin: 0;
  font-weight: 400;
  font-size: 13.5px;
  line-height: 1.5;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.btn-row .btn {
  margin-top: 0;
}

.logout-link {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
}
.logout-link:hover {
  color: var(--navy);
}

.hidden {
  display: none !important;
}

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

/* modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 31, 63, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 26px 24px;
}
.modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--danger);
}
.modal p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.modal input[type="text"] {
  width: 100%;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
}
