/* PrimeZone — core stylesheet
   Dark premium theme, emerald accent, mobile-first (360/390/412/430 -> 768/1024 -> 1280/1440/1920) */

:root {
  --bg: #0b0f14;
  --bg-elevated: #121822;
  --bg-card: #141b25;
  --border: #1f2b26;
  --text: #e6f1ea;
  --text-muted: #9fb3ab;
  --text-faint: #5c6b66;
  --accent: #10b981;
  --accent-light: #34d399;
  --accent-dark: #059669;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius-card: 16px;
  --radius-btn: 10px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #04140d;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #17202b; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text);
  font-size: 15px;
  min-height: 44px;
  transition: border-color 0.15s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
}
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.3); color: #fca5a5; }
.alert-success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--accent-light); }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 24px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.auth-logo span { color: var(--accent); }
.auth-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-footer a { color: var(--accent-light); font-weight: 600; }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 32px);
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  box-shadow: var(--shadow-card);
  animation: slideIn 0.2s ease;
}
.toast.error { border-left-color: var(--danger); }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- Responsive helpers ---------- */
@media (min-width: 768px) {
  .auth-card { padding: 40px; }
}
