/* Valora Companion — Owner Portal (Void). Graphite glass + gold semantički + lime signal. Bez backdrop-filtera. */
:root {
  --bg: #141416; --bg2: #1a1a1d; --panel: rgba(44,44,48,0.72); --panel2: rgba(34,34,38,0.9);
  --border: rgba(255,255,255,0.10); --edge: rgba(255,255,255,0.16); --well: rgba(255,255,255,0.05);
  --text: #ECEEF2; --dim: rgba(236,238,242,0.74); --mut: rgba(236,238,242,0.48);
  --gold: #c9a227; --gold-soft: #e6c66a; --signal: #9dff57; --danger: #ff6a55; --ok: #57d76a;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--text);
  background: radial-gradient(120% 80% at 50% -10%, #1d1d21 0%, var(--bg) 60%); }
a { color: var(--gold-soft); }
.hidden { display: none !important; }

/* — centriran auth (login/claim) — */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.card { width: 100%; max-width: 420px; padding: 30px 28px; border-radius: 20px;
  background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(0,0,0,0.5), inset 0 1px 0 var(--edge); position: relative; }
.card::before { content: ''; position: absolute; left: 28px; right: 28px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,162,39,0.6), transparent); }
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px rgba(201,162,39,0.6); }
.brand b { font-size: 17px; letter-spacing: 0.2px; } .brand span { color: var(--mut); font-size: 12px; }
.h1 { font-size: 22px; font-weight: 700; margin: 0 0 6px; } .sub { color: var(--dim); font-size: 13.5px; line-height: 1.5; margin-bottom: 22px; }
.btn { width: 100%; padding: 13px; border-radius: 12px; border: 0; font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.btn-discord { background: #5865F2; color: #fff; } .btn-discord:active { filter: brightness(1.08); }
.btn-gold { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #1a1407; }
.btn-ghost { background: var(--well); border: 1px solid var(--border); color: var(--text); }
.field { width: 100%; padding: 12px 13px; border-radius: 11px; background: rgba(0,0,0,0.28); border: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: 13px; margin-bottom: 12px; }
.err { color: var(--danger); font-size: 12.5px; margin-top: 8px; min-height: 16px; }

/* — app shell — */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--panel2), rgba(26,26,30,0.95)); border-right: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; }
.side .brand { margin-bottom: 26px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav button { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 11px; border: 0; background: none; color: var(--dim);
  font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; }
.nav button:hover { background: var(--well); color: var(--text); }
.nav button.on { background: rgba(201,162,39,0.13); color: var(--gold-soft); border: 1px solid rgba(201,162,39,0.28); }
.nav button svg { width: 18px; height: 18px; flex: none; }
.side .foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 4px; color: var(--mut); font-size: 12px; }
.side .foot img { width: 30px; height: 30px; border-radius: 50%; }
.side .foot .lo { margin-left: auto; background: none; border: 0; color: var(--mut); cursor: pointer; font-family: inherit; font-size: 12px; }

.main { padding: 34px 38px; overflow-y: auto; }
.ph { font-size: 24px; font-weight: 700; margin: 0 0 4px; } .psub { color: var(--mut); font-size: 13px; margin-bottom: 26px; }

/* — kartice / grid — */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.kpi { padding: 18px 20px; border-radius: 16px; background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--border); box-shadow: inset 0 1px 0 var(--edge); }
.kpi .l { color: var(--mut); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.kpi .v { font-size: 30px; font-weight: 700; margin-top: 7px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 14px; color: var(--mut); font-weight: 500; }
.panel { padding: 22px 24px; border-radius: 16px; background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--border); margin-top: 18px; }
.panel h3 { margin: 0 0 14px; font-size: 14px; font-weight: 650; }

/* — handshake (onboarding hook) — */
.hs { display: flex; align-items: center; gap: 13px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--well); }
.hs .ring { width: 13px; height: 13px; border-radius: 50%; flex: none; }
.hs.wait .ring { background: var(--gold); animation: pulse 1.3s ease-out infinite; }
.hs.live .ring { background: var(--ok); box-shadow: 0 0 12px rgba(87,215,106,0.6); }
.hs .t { font-weight: 600; font-size: 14px; } .hs .s { color: var(--mut); font-size: 12.5px; margin-top: 2px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201,162,39,0.5); } 100% { box-shadow: 0 0 0 9px rgba(201,162,39,0); } }

.plan { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; background: rgba(201,162,39,0.14); border: 1px solid rgba(201,162,39,0.34); color: var(--gold-soft); font-size: 12px; font-weight: 600; }
.bar { height: 8px; border-radius: 999px; background: rgba(0,0,0,0.3); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width 0.5s ease; }
/* P1e usage meteri (semafor: zdravo zeleno → blizu limita zlatno → preko crveno) */
.meter { margin-top: 15px; } .meter:first-of-type { margin-top: 2px; }
.meter .ml { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--dim); margin-bottom: 1px; }
.meter .ml .mono { color: var(--mut); font-variant-numeric: tabular-nums; }
.meter .bar > i { background: linear-gradient(90deg, #3da34d, var(--ok)); }
.meter .bar.warn > i { background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }
.meter .bar.over > i { background: linear-gradient(90deg, #b83b2c, var(--danger)); }
/* B3 gate-UX upozorenje (blizu/preko kvote, istek) */
.warn-banner { margin-top: 16px; padding: 13px 16px; border-radius: 13px; font-size: 13px; line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.warn-banner.soft { background: rgba(201,162,39,0.10); border: 1px solid rgba(201,162,39,0.32); color: var(--gold-soft); }
.warn-banner.crit { background: rgba(255,106,85,0.10); border: 1px solid rgba(255,106,85,0.35); color: #ffb3a6; }

/* — tabela igrača — */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--mut); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 11px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13.5px; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(160deg, #2e2e32, #18181b); border: 1px solid var(--border); color: var(--gold-soft); font-size: 12px; font-weight: 600; }
.on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; }
.off { background: var(--mut); }
.mono { font-family: var(--mono); font-size: 12.5px; color: var(--dim); }
.tbtn { background: var(--well); border: 1px solid var(--border); color: var(--dim); padding: 5px 11px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 12px; }
.tbtn:hover { border-color: rgba(255,106,85,0.5); color: var(--danger); }
.snippet { font-family: var(--mono); font-size: 12.5px; background: rgba(0,0,0,0.34); border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; white-space: pre-wrap; color: var(--dim); line-height: 1.6; }
