@import url('https://fonts.googleapis.com/css2?family=Syne:wght@800&display=swap');

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

/* ── Variables ── */
:root {
  --brand:      #ff2d55;
  --brand-dark: #cc1f42;
  --bg:         #f7f7f7;
  --card:       #ffffff;
  --border:     #e0e0e0;
  --text:       #1a1a1a;
  --muted:      #6b6b6b;
  --radius:     12px;
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
}

/* ── Base ── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Card ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  max-width: 680px;
  margin: 0 auto 20px;
}

/* ── Form elements ── */
label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

label .opt {
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
  font-size: 0.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group:last-child { margin-bottom: 0; }

input[type="email"],
input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: #fafafa;
  transition: border-color 0.15s;
  outline: none;
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  background: #fff;
}

textarea { resize: vertical; min-height: 100px; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6b6b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { opacity: 1; }

/* ── Error message ── */
.error-msg {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: none;
}

.error-msg.visible { display: block; }

/* ── Primary button ── */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.02em;
}

.btn-submit:hover  { background: var(--brand-dark); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; }

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  display: inline-block;
  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;
  vertical-align: middle;
  margin-right: 8px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1a1a;
  color: #fff;
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.3s ease;
  z-index: 999;
  white-space: nowrap;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Login page ── */
.brand-logo {
  text-align: center;
  margin-bottom: 28px;
  font-family: 'Syne', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--brand);
}

.brand-logo span {
  color: var(--text);
}

.login-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 16px 64px;
}

.login-header {
  text-align: center;
  margin-bottom: 8px;
}

.login-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.login-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}

.login-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 20px;
}

.divider {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 16px;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}

.divider::before { left: 0; }
.divider::after  { right: 0; }

.google-btn {
  width: 100%;
  padding: 12px;
  background: var(--card);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 20px;
}

.google-btn:hover    { background: #f9f9f9; border-color: #bbb; }
.google-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.login-alt {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.login-alt p { margin-bottom: 4px; }

.login-alt a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 6px;
}

.login-alt a:hover { text-decoration: underline; }