/* FA Online — dark theme, vapour gradient (blue → purple → magenta) from the logo. */
:root {
  --bg: #0c0e15;
  --bg-2: #12151f;
  --panel: #171b28;
  --panel-2: #1e2433;
  --line: #2a3145;
  --text: #e8ebf5;
  --muted: #8b93ab;
  --brand-blue: #2ea8e5;
  --brand-purple: #7a3fb0;
  --brand-pink: #e5417e;
  --grad: linear-gradient(120deg, var(--brand-blue), var(--brand-purple) 55%, var(--brand-pink));
  --ok: #36c98e;
  --warn: #e8b341;
  --bad: #e5557a;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, rgba(122,63,176,.18), transparent 60%),
              radial-gradient(900px 500px at -10% 10%, rgba(46,168,229,.12), transparent 55%),
              var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--brand-blue); text-decoration: none; }
img { max-width: 100%; display: block; }
.brandgrad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 18px; }
header.site { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(10px);
  background: rgba(12,14,21,.82); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .3px; }
.logo img { width: 38px; height: 38px; }
.nav .spacer { flex: 1; }
.nav a.navlink { color: var(--muted); font-weight: 600; }
.nav a.navlink:hover { color: var(--text); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 10px 16px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: .15s; }
.btn:hover { border-color: #3a4166; transform: translateY(-1px); }
.btn.primary { background: var(--grad); border: none; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* cards / panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 16px; }
.products { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .18s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); border-color: #38406a; box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 1/1; background: var(--bg-2) center/cover; display: grid; place-items: center; }
.card .thumb .ph { font-size: 40px; opacity: .25; }
.card .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .name { font-weight: 650; font-size: 14.5px; }
.card .price { font-weight: 700; }
.muted { color: var(--muted); }
.pill { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); display: inline-block; }
.pill.ok { color: var(--ok); border-color: rgba(54,201,142,.4); }
.pill.bad { color: var(--bad); border-color: rgba(229,85,122,.4); }

/* hero */
.hero { padding: 46px 0 30px; }
.hero h1 { font-size: 38px; margin: 0 0 10px; line-height: 1.1; }
.hero p { color: var(--muted); max-width: 560px; font-size: 16px; }
.cats { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.chip.active { background: var(--grad); color: #fff; border: none; }

/* forms */
input, select, textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); padding: 11px 13px; border-radius: 10px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-purple); }
label { font-size: 13px; color: var(--muted); display: block; margin: 12px 0 5px; font-weight: 600; }

/* modal / drawer */
.overlay { position: fixed; inset: 0; background: rgba(4,5,9,.62); backdrop-filter: blur(3px);
  z-index: 60; display: none; align-items: center; justify-content: center; padding: 18px; }
.overlay.open { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  width: 100%; max-width: 460px; padding: 24px; box-shadow: var(--shadow); }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: 400px; max-width: 92vw;
  background: var(--panel); border-left: 1px solid var(--line); z-index: 60; transform: translateX(100%);
  transition: .25s; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer header { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.drawer .items { flex: 1; overflow: auto; padding: 12px 18px; }
.drawer footer { border-top: 1px solid var(--line); padding: 16px 18px; }

.row { display: flex; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.right { margin-left: auto; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
tr:hover td { background: rgba(255,255,255,.02); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 10px;
  box-shadow: var(--shadow); z-index: 90; opacity: 0; transition: .2s; }
.toast.show { opacity: 1; }

/* admin shell */
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: var(--bg-2); border-right: 1px solid var(--line); padding: 18px 14px; }
.side .item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); cursor: pointer; font-weight: 600; margin-bottom: 2px; }
.side .item:hover { background: var(--panel); color: var(--text); }
.side .item.active { background: var(--grad); color: #fff; }
.main { padding: 22px 26px; overflow: auto; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat .v { font-size: 26px; font-weight: 750; }
.stat .l { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; }
h2.section { font-size: 20px; margin: 6px 0 16px; }
.hidden { display: none !important; }
@media (max-width: 720px) {
  .admin { grid-template-columns: 1fr; }
  .side { display: flex; gap: 6px; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .hero h1 { font-size: 30px; }
}
