:root {
  --gold: #b8891a;
  --gold-2: #d9b44a;
  --bg: #faf7f0;
  --card: #ffffff;
  --line: rgba(184, 137, 26, .22);
  --text: #1a1a1a;
  --muted: #6b7280;
}

* { box-sizing: border-box; }
html, body {
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
a { color: inherit; text-decoration: none; }
.container { width: min(1100px, 92%); margin: 0 auto; }

.header-bar { position: relative; }
.header-actions {
  display:flex;
  align-items:center;
  gap:10px;
  position: relative;
}
.login-icon { font-size: 14px; margin-right: 4px; }

/* Header base */
header {
  position: sticky;
  top:0;
  z-index:40;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,.85);
  border-bottom: 1px solid var(--line);
}
header .wrap {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 700;
  letter-spacing:.02em;
}
.brand img {
  height:36px;
  width:36px;
  object-fit:cover;
  border-radius:999px;
  box-shadow: 0 0 0 1px var(--line);
}

.muted { color: var(--muted); }

/* Buttons / chip */
.btn {
  display:inline-block;
  font-weight:700;
  padding:12px 16px;
  border-radius:12px;
  border:1px solid transparent;
  transition:.2s transform ease, .2s box-shadow ease;
  background:#fff;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color:#111;
  border-color: var(--line);
}
.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: #4b5563;
}
.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 999px;
}

.chip {
  font-size:12px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  color:#5b5b5b;
  background:#fff;
}

/* Flyout */
.login-flyout {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity .18s ease, transform .18s ease;
}
.login-flyout.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.login-flyout-card {
  width: 290px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(0,0,0,.20);
  padding: 14px 16px 16px;
  position: relative;
  overflow: hidden;
}
.login-flyout-card::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 40px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.login-flyout-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(217,180,74,.18), transparent 55%);
  pointer-events: none;
}
.login-flyout-card > * { position: relative; z-index: 1; }

.login-flyout-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.login-flyout-title strong {
  display:block;
  font-size:14px;
  margin-bottom:2px;
}
.login-flyout-title span {
  display:block;
  font-size:11px;
  color: var(--muted);
}
.login-flyout-badge {
  display:inline-block;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color: var(--muted);
  background: #f9fafb;
  border-radius:999px;
  padding:3px 8px;
  border: 1px solid var(--line);
  margin-bottom:4px;
}

.login-flyout-close {
  border:none;
  background:rgba(0,0,0,0.02);
  cursor:pointer;
  font-size:18px;
  line-height:1;
  padding:2px 8px;
  border-radius:999px;
  color:#6b7280;
}
.login-flyout-close:hover { background:rgba(0,0,0,0.05); }

.login-field { margin-bottom:8px; }
.login-field label {
  font-size:12px;
  font-weight:600;
  display:block;
  margin-bottom:3px;
}
.login-field input {
  width:100%;
  padding:8px 9px;
  border-radius:10px;
  border:1px solid #d1d5db;
  font-size:13px;
  background:#ffffff;
}
.login-field input:focus {
  outline:2px solid var(--gold-2);
  outline-offset:1px;
  border-color: var(--gold-2);
}

.login-submit-btn { width:100%; margin-top:6px; font-size:13px; }

.login-flyout-error {
  background:#fef2f2;
  border:1px solid #fecaca;
  color:#b91c1c;
  font-size:11px;
  border-radius:9px;
  padding:6px 8px;
  margin-bottom:8px;
}

.login-hint {
  font-size:11px;
  color: var(--muted);
  margin-top:8px;
  text-align:center;
}