/* ================= AxTracker theme (blue) ================= */
:root {
  /* surfaces */
  --bg: #070b16;
  --surface: #0f1730;
  --surface-2: #16213f;
  --surface-3: #1d2c52;
  --border: #243357;
  --border-strong: #35487a;
  /* text */
  --text: #e9eefb;
  --text-dim: #96a3c6;
  --text-faint: #63709a;
  /* accents */
  --blue: #3b82f6;
  --blue-soft: #60a5fa;
  --cyan: #22d3ee;
  --gold: #ffcb45;
  --green: #4ade80;
  --purple: #c4a7ff;
  --red: #ff6b6b;
  /* misc */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 34px rgba(0, 0, 0, .5);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 620px at 78% -12%, rgba(59, 130, 246, .18), transparent 60%),
    radial-gradient(1000px 560px at 0% 0%, rgba(34, 211, 238, .10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

.wrap { max-width: 1300px; margin: 0 auto; padding: 22px 22px 64px; }

/* ---------- brand / logo ---------- */
.logo-mark {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #06122e;
  font-family: var(--mono); letter-spacing: -1px;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 6px 18px rgba(59, 130, 246, .45), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.brand-name { font-weight: 800; letter-spacing: -.02em; }
.brand-name .ax { color: var(--blue-soft); }

/* ================= HOME ================= */
.home {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 40px 20px;
}
.home .hero-logo {
  width: 84px; height: 84px; border-radius: 22px; font-size: 34px; margin-bottom: 22px;
}
.home h1 { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -.03em; }
.home h1 .ax { color: var(--blue-soft); }
.home .tagline { margin: 12px 0 40px; color: var(--text-dim); font-size: 16px; max-width: 460px; }
.home-buttons { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.home-btn {
  width: 230px; padding: 28px 24px; border-radius: 20px; cursor: pointer;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  transition: transform .18s, border-color .18s, box-shadow .18s;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.home-btn:hover { transform: translateY(-4px); border-color: var(--blue-soft); box-shadow: 0 16px 40px rgba(59, 130, 246, .35); }
.home-btn .ico { font-size: 40px; }
.home-btn .title { font-size: 20px; font-weight: 700; }
.home-btn .sub { font-size: 12.5px; color: var(--text-faint); }
.home-footer { margin-top: 40px; color: var(--text-faint); font-size: 12px; display: flex; align-items: center; gap: 8px; }

/* ================= TOP NAV (sub-pages) ================= */
.topnav {
  display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.topnav .home-link { display: flex; align-items: center; gap: 11px; font-size: 17px; }
.nav-tabs { display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.nav-tabs a {
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-dim);
  transition: all .15s;
}
.nav-tabs a:hover { color: var(--text); }
.nav-tabs a.active { background: linear-gradient(135deg, #3b82f6, #22d3ee); color: #06122e; }
.topnav .status-pill { margin-left: auto; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.status-pill.live { color: var(--green); border-color: rgba(74, 222, 128, .3); }
.status-pill.live .dot { background: var(--green); animation: pulse 2s infinite; }
.status-pill.down { color: var(--red); border-color: rgba(255, 107, 107, .3); }
.status-pill.down .dot { background: var(--red); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .5); }
  70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.page-head { margin-bottom: 18px; }
.page-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.page-head p { margin: 4px 0 0; color: var(--text-faint); font-size: 13px; }

/* ================= CONTROLS ================= */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.field input, .field select {
  background: var(--bg); border: 1px solid var(--border-strong); color: var(--text);
  padding: 9px 11px; font-family: var(--sans); font-size: 13px; border-radius: var(--radius-sm);
  min-width: 130px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--text-faint); }
.field input:focus, .field select:focus { border-color: var(--blue-soft); box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.field select { cursor: pointer; }
.field input[type="number"] { min-width: 90px; }
.field.grow { flex: 1; min-width: 220px; }
.field.grow input { width: 100%; }
.search-field { position: relative; }
.search-field input { padding-left: 34px; }
.search-field .icon { position: absolute; left: 11px; bottom: 10px; color: var(--text-faint); pointer-events: none; font-size: 14px; }
/* chips */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-dim);
  padding: 8px 14px; font-size: 12.5px; font-weight: 600; border-radius: 999px; cursor: pointer;
  transition: all .15s; user-select: none;
}
.chip:hover { border-color: var(--blue-soft); color: var(--blue-soft); transform: translateY(-1px); }
.chip.active { background: linear-gradient(135deg, #3b82f6, #22d3ee); color: #06122e; border-color: var(--blue-soft); box-shadow: 0 4px 14px rgba(59, 130, 246, .35); }
.chip.reset { margin-left: auto; }
.chip.reset:hover { border-color: var(--red); color: var(--red); }

.count-bar { font-size: 12.5px; color: var(--text-dim); margin-bottom: 14px; }
.count-bar b { color: var(--blue-soft); font-family: var(--mono); }

/* ================= MINECRAFT SLOT ================= */
.slot {
  position: relative; width: 54px; height: 54px; flex-shrink: 0; border-radius: 11px;
  background: #2b3a63; cursor: help;
  display: grid; place-items: center;
  box-shadow:
    inset 2px 2px 0 rgba(0, 0, 0, .38),
    inset -2px -2px 0 rgba(255, 255, 255, .12),
    0 1px 2px rgba(0, 0, 0, .4);
}
.slot .icon { width: 40px; height: 40px; image-rendering: pixelated; }
.slot .icon-fallback {
  width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: #0a1226;
}
.slot .count {
  position: absolute; right: 3px; bottom: 1px; font-family: var(--mono); font-weight: 700;
  font-size: 14px; color: #fff; line-height: 1;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .85);
}

/* ================= ITEM / ORDER CARDS ================= */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px;
  display: flex; gap: 14px; transition: border-color .15s, transform .12s, box-shadow .15s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.card .body { flex: 1; min-width: 0; }
.card .title {
  font-weight: 700; font-size: 14.5px; color: var(--gold); margin: 0 0 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .subid { font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.kv { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0; }
.kv .k { color: var(--text-faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; min-width: 62px; }
.kv .v { font-family: var(--mono); }
.kv .v.price { color: var(--green); font-weight: 600; }
.kv .v.each { color: var(--cyan); font-weight: 600; }
.kv .v.time { font-family: var(--sans); font-weight: 500; color: var(--text-dim); }

.person { font-weight: 600; }

.badge-soon {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 107, 107, .13); color: var(--red); border: 1px solid rgba(255, 107, 107, .28);
  font-size: 12.5px; font-weight: 600; font-family: var(--sans);
}
.badge-done {
  display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(74, 222, 128, .13); color: var(--green); border: 1px solid rgba(74, 222, 128, .28);
}

/* progress bars (orders) */
.progress { margin: 8px 0 2px; }
.progress .plabel { display: flex; justify-content: space-between; font-size: 11.5px; margin-bottom: 4px; }
.progress .plabel .pk { color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.progress .plabel .pv { font-family: var(--mono); color: var(--text-dim); }
.progress .track { height: 7px; border-radius: 999px; background: var(--bg); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
.progress .fill { height: 100%; border-radius: 999px; transition: width .3s; }
.progress.deliver .fill { background: linear-gradient(90deg, #22d3ee, #3b82f6); }
.progress.paid .fill { background: linear-gradient(90deg, #4ade80, #22d3ee); }

/* ================= HOVER TOOLTIP ================= */
.tooltip {
  position: absolute; z-index: 1000; max-width: 400px;
  background: #0a1226; border: 1px solid var(--border-strong); border-radius: 11px;
  padding: 11px 13px; box-shadow: 0 12px 34px rgba(0, 0, 0, .65); pointer-events: none;
  font-size: 12.5px;
}
.tt-name { font-weight: 700; color: var(--gold); }
.tt-count { color: var(--text-dim); font-family: var(--mono); font-weight: 600; }
.tt-id { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); margin-top: 1px; }
.tt-sec { margin-top: 8px; }
.tt-sec .tt-h { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 3px; }
.tt-line { line-height: 1.5; }
.tt-sec.ench .tt-line { color: var(--purple); }
.tt-sec.eff .tt-line { color: var(--cyan); }

/* in-game-style shulker/bundle contents preview (canvas, rendered client-side) */
.tt-sec.cont .shulker-canvas { display: block; margin-top: 3px; image-rendering: pixelated; }

/* empty state */
.empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--text-faint); }
.empty .big { font-size: 42px; margin-bottom: 12px; opacity: .5; }
.empty p { margin: 0; font-size: 14px; }

/* ================= RESPONSIVE ================= */
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .field, .field.grow { flex: 1 1 100%; min-width: 0; }
  .home h1 { font-size: 34px; }
}

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #45599a; }
