/* ============================================================
   Saphirex Panel - stil minimal inspirat de evolved.ro:
   fundal aproape negru, accent portocaliu, navbar-pastila,
   carduri discrete, titluri cu majuscule si spatiere.
   ============================================================ */
:root {
  --bg:      #0a0a0b;
  --bg-2:    #0f0f11;
  --card:    #141416;
  --card-2:  #1a1a1d;
  --line:    rgba(255,255,255,.08);
  --line-2:  rgba(255,255,255,.16);
  --text:    #f1f1f3;
  --muted:   #8b8b93;
  --acc:     #ff7a18;   /* portocaliu evolved */
  --acc-2:   #ff9444;
  --purple:  #ff7a18;
  --pink:    #ff7a18;
  --grad:    linear-gradient(135deg, #ff7a18 0%, #ff9a3c 100%);
  --ok:      #37d68a;
  --bad:     #ff5468;
  --gold:    #ffc83d;
  --radius:  14px;
  --disp:    "Space Grotesk", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(900px 500px at 50% -5%, rgba(255,122,24,.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 14.5px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--acc); }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; display: block; }
.r { text-align: right; }
.mt { margin-top: 22px; }
.accent { color: var(--acc); font-weight: 700; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #262629; border: 3px solid var(--bg); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #34343a; }

/* ---------- Navbar pastila ---------- */
.nav { position: sticky; top: 0; z-index: 40; padding: 14px 0; background: linear-gradient(180deg, var(--bg) 60%, transparent); }
.nav-pill { width: min(1180px, 100% - 32px); margin: 0 auto; display: flex; align-items: center; gap: 16px;
  background: rgba(20,20,23,.8); border: 1px solid var(--line); border-radius: 16px; padding: 9px 12px 9px 14px; backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); flex: none; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand span { font-family: var(--disp); font-weight: 700; font-size: 17px; letter-spacing: .14em; text-transform: uppercase; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav-links a { padding: 7px 12px; border-radius: 9px; color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; transition: color .14s, background .14s; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-links a.on { color: var(--acc); background: rgba(255,122,24,.1); }
.nav-right { display: flex; align-items: center; gap: 10px; flex: none; padding-left: 8px; }
.acct { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.acct-name { font-weight: 700; font-size: 13px; }
.acct-sub { font-size: 11px; color: var(--muted); }

.burger { display: none; flex-direction: column; gap: 4px; width: 38px; height: 34px; margin-left: auto; border: 1px solid var(--line); border-radius: 9px; align-items: center; justify-content: center; cursor: pointer; }
.burger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.navtog:checked ~ .nav .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.navtog:checked ~ .nav .burger span:nth-child(2) { opacity: 0; }
.navtog:checked ~ .nav .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Continut ---------- */
.main { min-height: calc(100vh - 68px); position: relative; }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 26px 0 40px; }
.page-head { margin-bottom: 24px; }
.kicker { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 8px; }
.page-head h1 { font-family: var(--disp); font-size: 30px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.foot { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(90deg, rgba(10,10,11,.92), rgba(10,10,11,.55) 65%, transparent),
              linear-gradient(0deg, rgba(10,10,11,.85), transparent 60%),
              url('hero.jpg') center 30% / cover, #141012;
  border: 1px solid var(--line); border-radius: 18px; padding: 40px 36px; margin-bottom: 22px; min-height: 180px; }
.hero[style*="--fc"] { background: linear-gradient(90deg, rgba(10,10,11,.92), rgba(10,10,11,.5)), linear-gradient(120deg, color-mix(in srgb, var(--fc) 40%, transparent), transparent 70%), url('hero.jpg') center / cover; }
.hero > div:first-child { position: relative; z-index: 1; }
.hero .eyebrow { display: block; color: var(--acc); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px; }
.hero h2 { font-family: var(--disp); font-size: clamp(28px, 4.5vw, 44px); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; line-height: 1.05; }
.hero .muted, .hero p { color: #b4b4bc; margin-top: 8px; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Carduri / statistici ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; }
.card > h3 { color: var(--text); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.card > h3.mt { margin-top: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.bad-card { border-color: rgba(255,84,104,.4); margin-top: 18px; }

.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.stat { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; transition: border-color .14s; }
.stat:hover { border-color: var(--line-2); }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.stat-value { font-family: var(--disp); font-size: 30px; font-weight: 700; line-height: 1.2; margin-top: 6px; }
.stat-value small { font-size: 14px; color: var(--acc); }
.stat-hint { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 2px; background: var(--acc); opacity: .55; }

.eyebrow { color: var(--acc); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }

.who { display: flex; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--card-2); color: #fff; font-family: var(--disp); font-weight: 700; font-size: 24px; }
.avatar.sm { width: 40px; height: 40px; font-size: 17px; border-radius: 11px; background: var(--grad); color: #1a1205; }
.avatar.fac { background: var(--fc, var(--acc)); }

/* ---------- Tabele ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid rgba(255,255,255,.05); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(255,122,24,.05); }
.tbl .rank { color: var(--muted); font-family: var(--disp); font-weight: 700; width: 48px; }
.tbl tr.p1 .rank { color: var(--gold); }
.tbl tr.p2 .rank { color: #cfd6e4; }
.tbl tr.p3 .rank { color: #e0a070; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.kv.compact { grid-template-columns: 120px 1fr; gap: 7px 12px; font-size: 14px; }

.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255,122,24,.16); color: var(--acc-2); vertical-align: middle; }
.pill.ok   { background: rgba(55,214,138,.14); color: var(--ok); }
.pill.off  { background: rgba(139,139,147,.14); color: var(--muted); }
.pill.bad  { background: rgba(255,84,104,.14); color: var(--bad); }
.pill.gold { background: rgba(255,200,61,.16); color: var(--gold); }
.hero .pill { background: rgba(10,10,11,.55); color: #fff; }
.hero .pill.ok { color: #7affc0; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: var(--fc, var(--acc)); }
.dot.big { width: 14px; height: 14px; margin: 0; flex: none; box-shadow: 0 0 0 4px rgba(255,255,255,.05); }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 16px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.tabs a.on { background: var(--grad); color: #1a1205; border-color: transparent; }

/* ---------- Factiuni ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.fcard { position: relative; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); transition: transform .14s, border-color .14s; }
.fcard:hover { transform: translateY(-3px); border-color: var(--line-2); color: var(--text); }
.fcard-top { display: flex; align-items: center; gap: 12px; }
.fcard-name { font-family: var(--disp); font-weight: 700; font-size: 16px; }
.fcard-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.bar { height: 5px; background: rgba(255,255,255,.08); border-radius: 99px; margin-top: 14px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--fc, var(--grad)); border-radius: 99px; }
.fcard-tags { margin-top: 12px; }

/* ---------- Butoane / formulare ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--acc); color: #1a1205; border: 0; border-radius: 10px;
  padding: 11px 22px; font: 700 13.5px "Inter", sans-serif; cursor: pointer; transition: transform .12s, filter .15s, background .15s; }
.btn:hover { filter: brightness(1.06); color: #1a1205; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: rgba(255,255,255,.05); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--line-2); background: rgba(255,255,255,.09); color: var(--text); }
.btn.sm { padding: 7px 14px; font-size: 12.5px; }
.btn.wide { width: 100%; }

input, select { width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font: 500 14px "Inter", sans-serif; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255,122,24,.18); }
label { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
label input, label select { margin-top: 6px; }
.row { display: flex; gap: 10px; }
.row input { flex: 1; }
.stack { display: grid; gap: 14px; }
.target { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 12px; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; font-size: 14px; }
.flash.ok  { background: rgba(55,214,138,.1); color: var(--ok); border: 1px solid rgba(55,214,138,.25); }
.flash.err { background: rgba(255,84,104,.1); color: var(--bad); border: 1px solid rgba(255,84,104,.25); }

/* ---------- Autentificare ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 16px;
  background: linear-gradient(180deg, rgba(10,10,11,.82), rgba(10,10,11,.96)), url('hero.jpg') center / cover fixed, var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: rgba(20,20,23,.9); border: 1px solid var(--line); border-radius: 18px; padding: 34px; display: grid; gap: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.6); backdrop-filter: blur(12px); }
.auth-card p { margin: 0; }
.brand.big { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.brand.big .brand-logo { width: 96px; height: 96px; object-fit: contain; }
.brand.big .brand-text { font-family: var(--disp); font-size: 24px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.brand.big .brand-text small { display: block; font-family: "Inter", sans-serif; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .burger { display: flex; }
  .live-badge { display: none; }
  .nav-links, .nav-right { display: none; width: 100%; flex-direction: column; align-items: stretch; margin: 0; padding: 8px 0 2px; }
  .navtog:checked ~ .nav .nav-links, .navtog:checked ~ .nav .nav-right { display: flex; }
  .nav-pill { flex-wrap: wrap; }
  .nav-links a { font-size: 14px; padding: 10px 12px; }
  .nav-right { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
  .acct { text-align: left; }
  .hero { flex-direction: column; align-items: flex-start; padding: 30px 24px; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .grid4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 24px; }
  .kv { grid-template-columns: 120px 1fr; }
}
