/* ── GPMI Market Intelligence — Global Styles ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --gp-green:      #2e7d32;
  --gp-green-dark: #1b5e20;
  --gp-green-light:#e8f5e9;
  --gp-gold:       #f9a825;
  --danger:        #c62828;
  --warn:          #e65100;
  --text:          #1a1a1a;
  --text-muted:    #666;
  --border:        #d0d0d0;
  --bg:            #f5f5f5;
  --white:         #ffffff;
  --radius:        8px;
  --shadow:        0 2px 12px rgba(0,0,0,0.10);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Auth card layout ────────────────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo .badge {
  background: var(--gp-green);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.auth-logo .title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

/* ── Form elements ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
  background: var(--white);
}

input:focus {
  outline: none;
  border-color: var(--gp-green);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gp-green);
  color: white;
  width: 100%;
}
.btn-primary:hover { background: var(--gp-green-dark); }
.btn-primary:disabled { background: #aaa; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  color: var(--gp-green);
  border: 1px solid var(--gp-green);
}
.btn-outline:hover { background: var(--gp-green-light); }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert-error   { background: #ffebee; color: var(--danger); border: 1px solid #ffcdd2; }
.alert-success { background: #e8f5e9; color: var(--gp-green-dark); border: 1px solid #c8e6c9; }
.alert-warn    { background: #fff3e0; color: var(--warn); border: 1px solid #ffe0b2; }

/* ── Links ───────────────────────────────────────────────────────────────── */
.auth-links { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }
.auth-links a { color: var(--gp-green); text-decoration: none; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }

/* ── Password strength ───────────────────────────────────────────────────── */
.pw-strength { margin-top: 6px; height: 4px; border-radius: 2px; background: #e0e0e0; overflow: hidden; }
.pw-strength-bar { height: 100%; border-radius: 2px; transition: width 0.3s, background 0.3s; width: 0; }

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}
.spinner.show { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Expiry warning banner ───────────────────────────────────────────────── */
.expiry-banner {
  background: #fff3e0;
  border: 1px solid #ffcc02;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--warn);
  margin-bottom: 16px;
  display: none;
}
.expiry-banner.show { display: block; }

/* ── Region badges (shared across all pages) ─────────────────────────────── */
/*
 * Usage: <span class="region-badge region-Africa">Africa</span>
 * In JS: class="region-badge ${regionClass(row.region)}"
 * regionClass() is exported from app.js
 */
.region-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.region-Africa         { background: #fff3e0; color: #e65100; }
.region-Asia-Pacific   { background: #e3f2fd; color: #1565c0; }
.region-Europe         { background: #f3e5f5; color: #6a1b9a; }
.region-Latin-America  { background: #e8f5e9; color: #2e7d32; }
.region-Middle-East    { background: #fce4ec; color: #880e4f; }
.region-North-America  { background: #e0f7fa; color: #006064; }
.region-Other          { background: #f5f5f5; color: #616161; }
