:root {
  --brand: #f0b429;
  --brand-dark: #e8a317;
  --ink: #172033;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f5f7fb;
  --danger: #ef4444;
  --success: #22c55e;
  --blue: #2563eb;
  --cream: #fff6e3;
  --cream-2: #ffe9c2;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100vw; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; padding: 10px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity .15s;
}
.btn:hover { opacity: .9; }
.btn-primary { background: var(--brand); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Landing page (index.php) ---------- */
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand .logo-emoji { font-size: 22px; }
.brand .tagline { font-size: 11px; color: var(--muted); font-weight: 500; display: block; }
.nav-actions { display: flex; gap: 10px; }

.hero {
  max-width: 960px; margin: 0 auto; padding: 72px 24px 40px; text-align: center;
}
.hero h1 { font-size: 40px; font-weight: 800; margin: 0 0 16px; line-height: 1.15; }
.hero h1 span { color: var(--brand-dark); }
.hero p { font-size: 16px; color: var(--muted); max-width: 560px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features {
  max-width: 1000px; margin: 48px auto 80px; padding: 0 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px;
}
.feature-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.feature-card .f-icon { font-size: 26px; margin-bottom: 10px; }
.feature-card h3 { font-size: 15px; margin: 0 0 6px; }
.feature-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.site-footer { text-align: center; font-size: 12px; color: var(--muted); padding: 24px; }

/* ---------- Plain auth forms (admin login, staff login) ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 420px; background: #fff; border-radius: 20px;
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.05); padding: 32px;
}
.auth-card .auth-logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 6px; font-weight: 700; font-size: 18px; }
.auth-card h2 { text-align: center; font-size: 22px; margin: 12px 0 4px; }
.auth-card .sub { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 24px; }

.field { display: block; margin-bottom: 16px; }
.field span { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border-radius: 10px; border: 1px solid var(--border); padding: 11px 12px;
  outline: none; font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.alert { border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.auth-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.auth-foot a { color: var(--blue); font-weight: 600; }

/* ---------- Hero-style shop login/register ---------- */
.auth2-shell { min-height: 100vh; display: flex; flex-direction: column; }
.auth2-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; background: #fff;
}
.auth2-header .brand { min-width: 0; }
.auth2-header .brand .name { font-size: 16px; }
.auth2-header .brand .tag { font-size: 11px; }
.auth2-header .header-action { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.auth2-header .header-action .btn { padding: 9px 16px; font-size: 13px; }

.auth2-hero {
  background: linear-gradient(135deg, var(--cream), var(--cream-2));
  padding: 28px 20px 64px; position: relative; overflow: hidden;
}
.auth2-hero.dark { background: linear-gradient(135deg, #172033, #2a3548); }
.auth2-hero.dark .auth2-eyebrow { color: rgba(255,255,255,.55); }
.auth2-hero.dark .auth2-heading { color: #fff; }
.auth2-hero.dark .auth2-sub { color: rgba(255,255,255,.65); }
.auth2-hero-inner { max-width: 460px; margin: 0 auto; position: relative; }
.auth2-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #92400e; margin: 0; }
.auth2-heading { font-size: 30px; font-weight: 800; line-height: 1.15; margin: 8px 0 8px; color: var(--ink); }
.auth2-heading .accent { color: var(--brand-dark); }
.auth2-sub { font-size: 13px; color: #78716c; margin: 0; max-width: 320px; }
.auth2-badge {
  position: absolute; top: -6px; right: 6px; background: #fff; border-radius: 14px;
  padding: 10px 12px; box-shadow: 0 8px 20px rgba(0,0,0,.08); font-size: 11px; font-weight: 700;
  color: #92400e; display: none;
}
.auth2-illustration { text-align: right; font-size: 64px; margin-top: -20px; opacity: .9; }
.auth2-checklist { background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 10px 24px rgba(0,0,0,.08); margin-top: 12px; max-width: 220px; }
.auth2-checklist .row { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #334155; padding: 4px 0; }
.auth2-checklist .row .dot { width: 16px; height: 16px; border-radius: 50%; background: #22c55e; color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.auth2-card-wrap { flex: 1; padding: 0 20px 32px; margin-top: -40px; position: relative; z-index: 5; }
.auth2-card { max-width: 460px; margin: 0 auto; background: #fff; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.08); padding: 28px 24px; }
.auth2-card h2 { font-size: 20px; font-weight: 800; text-align: center; margin: 0 0 4px; }
.auth2-card .sub2 { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 22px; }

.icon-field { display: block; margin-bottom: 14px; }
.icon-field span.fi-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: #334155; }
.icon-field .fi-row { position: relative; display: block; }
.icon-field .fi-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; display: flex; pointer-events: none; }
.icon-field input {
  display: block; width: 100%; border-radius: 12px; border: 1px solid var(--border); background: #f8fafc;
  padding: 12px 14px 12px 40px; outline: none; font-size: 14px;
}
.icon-field input:focus { border-color: var(--blue); background: #fff; }
.icon-field .fi-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #94a3b8; padding: 6px; border-radius: 6px; }
.icon-field .fi-toggle:hover { background: #f1f5f9; }
.icon-field.with-toggle input { padding-right: 40px; }

.auth2-row-between { display: flex; align-items: center; justify-content: space-between; margin: -2px 0 18px; font-size: 12px; }
.auth2-remember { display: flex; align-items: center; gap: 6px; color: #334155; font-weight: 600; }
.auth2-remember input { width: 15px; height: 15px; accent-color: var(--brand); }
.auth2-row-between a { color: var(--blue); font-weight: 600; }

.auth2-terms { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #334155; margin: 4px 0 18px; }
.auth2-terms input { width: 15px; height: 15px; margin-top: 1px; accent-color: var(--brand); flex-shrink: 0; }
.auth2-terms a { color: var(--blue); font-weight: 600; }

.auth2-btn { width: 100%; background: var(--brand); color: var(--ink); border: none; border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth2-btn:hover { opacity: .92; }
.auth2-btn:disabled { opacity: .6; }

.auth2-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; font-size: 12px; color: #94a3b8; }
.auth2-divider::before, .auth2-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth2-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.auth2-foot a { color: var(--brand-dark); font-weight: 700; }

.auth2-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 460px; margin: 0 auto; padding: 0 4px; }
.auth2-badge-item { text-align: center; padding: 6px 2px; }
.auth2-badge-item .bi { font-size: 18px; margin-bottom: 4px; }
.auth2-badge-item .bt { font-size: 10.5px; font-weight: 700; color: #334155; line-height: 1.2; }
.auth2-badge-item .bs { font-size: 9.5px; color: #94a3b8; line-height: 1.3; margin-top: 1px; }

@media (min-width: 640px) {
  .auth2-hero { padding: 40px 20px 90px; }
  .auth2-heading { font-size: 36px; }
  .auth2-card-wrap { margin-top: -56px; }
  .auth2-card { padding: 36px 40px; }
}
