/* styles.css — Profit Forge UI styles, extracted from index.html */
:root {
  --bg: #0b0a08; --bg-2: #15120d; --bg-3: #1e1a12; --bg-card: #18150f;
  --gold: #d4a955; --gold-light: #f0c878; --gold-dark: #8a6a2e;
  --crimson: #c43b3b; --crimson-dark: #7a2424;
  --green: #5fb35f; --green-dark: #2d6e2d;
  --blue-safe: #4a90c4; --yellow-safe: #d4b54a;
  --red-danger: #c43b3b; --black-danger: #4a4a4a;
  --text: #e8e2d0; --text-muted: #8b8470; --text-dim: #5c5747;
  --border: #2a2519; --border-gold: #4a3f28;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  background-image: 
    radial-gradient(ellipse at 15% 0%, rgba(212, 169, 85, 0.10) 0px, transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(196, 59, 59, 0.07) 0px, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(212, 169, 85, 0.03) 0px, transparent 70%);
  min-height: 100vh; background-attachment: fixed;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.83 0 0 0 0 0.66 0 0 0 0 0.33 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.4; mix-blend-mode: overlay;
}
.font-display { font-family: 'Cinzel', serif; letter-spacing: 0.02em; }
.card { background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-2) 100%); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(212,169,85,0.05); }
.card-gold { border-color: var(--border-gold); box-shadow: 0 4px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(212,169,85,0.1), 0 0 0 1px rgba(212,169,85,0.1); }
.ornate-border { position: relative; }
.ornate-border::before, .ornate-border::after { content: ''; position: absolute; width: 12px; height: 12px; border: 1px solid var(--gold); opacity: 0.6; }
.ornate-border::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.ornate-border::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 6px; font-weight: 600; font-size: 0.875rem; transition: all 0.15s ease; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn-gold { background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%); color: #1a1408; border-color: var(--gold-dark); box-shadow: 0 2px 8px rgba(212,169,85,0.25), inset 0 1px 0 rgba(255,255,255,0.3); text-shadow: 0 1px 0 rgba(255,255,255,0.2); }
.btn-gold:hover { background: linear-gradient(180deg, #ffd87a 0%, var(--gold-light) 50%, var(--gold) 100%); box-shadow: 0 4px 16px rgba(212,169,85,0.4), inset 0 1px 0 rgba(255,255,255,0.4); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-gold); }
.btn-ghost:hover { background: var(--bg-3); border-color: var(--gold); color: var(--gold-light); }
.btn-ghost.active { background: rgba(212,169,85,0.12); border-color: var(--gold); color: var(--gold-light); }
.input, .select { width: 100%; background: var(--bg); border: 1px solid var(--border-gold); color: var(--text); padding: 0.5rem 0.75rem; border-radius: 5px; font-size: 0.875rem; font-family: inherit; transition: all 0.15s; }
.input:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,169,85,0.15); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23d4a955'%3E%3Cpath d='M5.5 7l4.5 4.5L14.5 7z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.5rem center; background-size: 1.25rem; padding-right: 2rem; }
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-safe { background: rgba(95,179,95,0.15); color: var(--green); border: 1px solid rgba(95,179,95,0.3); }
.badge-danger { background: rgba(196,59,59,0.15); color: var(--crimson); border: 1px solid rgba(196,59,59,0.3); }
.badge-tier { background: var(--bg-3); color: var(--gold-light); border: 1px solid var(--border-gold); }
.badge-enc { background: rgba(146,101,196,0.15); color: #c4a0e8; border: 1px solid rgba(146,101,196,0.3); }
.badge-quality { background: rgba(74,144,196,0.15); color: #6ab4e8; border: 1px solid rgba(74,144,196,0.3); }
.zone-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 3px; border: 1px solid rgba(0,0,0,0.4); vertical-align: middle; }
.zone-blue { background: #4a90c4; box-shadow: 0 0 6px rgba(74,144,196,0.6); }
.zone-yellow { background: #d4b54a; box-shadow: 0 0 6px rgba(212,181,74,0.6); }
.zone-red { background: #c43b3b; box-shadow: 0 0 6px rgba(196,59,59,0.6); }
.zone-black { background: #2a2a2a; box-shadow: 0 0 6px rgba(0,0,0,0.8); }
.zone-portal { background: linear-gradient(135deg, #9265c4, #4a90c4); box-shadow: 0 0 6px rgba(146,101,196,0.6); }
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 600; padding: 0.75rem 0.75rem; border-bottom: 1px solid var(--border-gold); background: var(--bg-2); cursor: pointer; user-select: none; white-space: nowrap; }
th:hover { color: var(--gold-light); }
th.sorted { color: var(--gold); }
td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.85rem; vertical-align: middle; }
tr.row-craft { cursor: pointer; transition: background 0.1s; }
tr.row-craft:hover { background: rgba(212,169,85,0.06); }
.loader { width: 18px; height: 18px; border: 2px solid var(--border-gold); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.shimmer { background: linear-gradient(90deg, transparent, rgba(212,169,85,0.15), transparent); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.profit-positive { color: var(--green); font-weight: 600; }
.profit-negative { color: var(--crimson); font-weight: 600; }
.profit-neutral { color: var(--text-muted); }
.slider { -webkit-appearance: none; appearance: none; height: 4px; background: var(--bg-3); border-radius: 2px; border: 1px solid var(--border-gold); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); border-radius: 50%; cursor: pointer; border: 1px solid var(--gold-dark); box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal { background: var(--bg-2); border: 1px solid var(--border-gold); border-radius: 10px; max-width: 900px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,169,85,0.1); transform: scale(0.95); transition: transform 0.2s; }
.modal-backdrop.open .modal { transform: scale(1); }
.scrollbar::-webkit-scrollbar { width: 8px; height: 8px; }
.scrollbar::-webkit-scrollbar-track { background: var(--bg); }
.scrollbar::-webkit-scrollbar-thumb { background: var(--border-gold); border-radius: 4px; }
.toast { position: fixed; bottom: 5.25rem; right: 1.5rem; background: var(--bg-2); border: 1px solid var(--border-gold); border-left: 3px solid var(--gold); padding: 0.85rem 1.1rem; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 100; display: flex; align-items: center; gap: 0.6rem; font-size: 0.875rem; transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); max-width: 360px; }
.toast.show { transform: translateX(0); }
.toast.error { border-left-color: var(--crimson); }
.toast.success { border-left-color: var(--green); }
.filter-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.6rem; background: var(--bg-3); border: 1px solid var(--border-gold); border-radius: 4px; font-size: 0.75rem; color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.filter-chip:hover { color: var(--text); border-color: var(--gold-dark); }
.filter-chip.active { background: rgba(212,169,85,0.15); color: var(--gold-light); border-color: var(--gold); }
.filter-chip.excluded { background: rgba(196,59,59,0.15); color: var(--crimson); border-color: var(--crimson); text-decoration: line-through; }
.glow-text { text-shadow: 0 0 20px rgba(212,169,85,0.5); }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] .chev { transform: rotate(180deg); }
.chev { transition: transform 0.2s; }
.role-badge, .role-user { background: var(--bg-3); color: var(--text-muted); border-color: var(--border-gold); }
.role-admin { background: rgba(212,169,85,0.15); color: var(--gold-light); border-color: var(--gold); }
@media (max-width: 1024px) { .filter-grid { grid-template-columns: 1fr !important; } }

/* Self-hosted floating Donate button — first-party (always renders; no
   third-party loader). z-index 110 sits above the z-50 login overlay +
   z-50 modals + z-100 toast, so it's visible on the login screen and in-app
   for every role. Repoint the link in index.html (#donateBtn href). */
.pf-donate-btn {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 110;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.1rem; border-radius: 999px;
  font-weight: 700; font-size: 0.85rem; text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, #8a5fd6 0%, #794bc4 60%, #5e3899 100%);
  border: 1px solid #5e3899;
  box-shadow: 0 6px 20px rgba(121, 75, 196, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.pf-donate-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(121,75,196,0.6); filter: brightness(1.08); }
.pf-donate-btn:active { transform: translateY(0); }
@media (max-width: 480px) {
  .pf-donate-btn { right: 1rem; bottom: 1rem; padding: 0.55rem 0.9rem; }
}