/* WoWs-tracker.html: page-specific styles (tokens.css load first). */
:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --card:      #1c2128;
  --border:    #30363d;
  --accent:    #f0a500;
  --accent-lo: rgba(240,165,0,0.12);
  --text:      #e6edf3;
  --muted:     #8b949e;
  --green:     #3fb950;
  --red:       #f85149;
  --blue:      #58a6ff;
  --purple:    #a371f7;
  --orange:    #f0883e;
  --cyan:      #39d0d8;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 14px; min-height: 100vh; }

/* NAV */
nav { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 0 20px; height: 54px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 200; }
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-back { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }
.nav-back:hover { color: var(--text); border-color: var(--muted); }
.nav-brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; color: var(--text); text-decoration: none; }
.nav-brand:hover { color: var(--accent); }
.nav-logo { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; display: block; }
.nav-brand em { color: var(--accent); font-style: normal; }
.nav-right { display: flex; align-items: center; gap: 8px; }
a.nav-tag { text-decoration: none; cursor: pointer; }
a.nav-tag:hover { border-color: var(--accent); color: var(--accent); }
.nav-tag { background: var(--card); border: 1px solid var(--border); border-radius: 7px; padding: 5px 11px; font-size: 12px; font-weight: 700; color: var(--text); }
.btn { padding: 6px 13px; border-radius: 7px; border: 1px solid var(--border); cursor: pointer; font-size: 12px; font-weight: 600; transition: all .15s; background: transparent; color: var(--muted); }
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn-danger { color: var(--red); border-color: rgba(248,81,73,.4); }
.btn-danger:hover { border-color: var(--red); color: var(--red); }

/* NOTIF BELL */
.notif-btn { position: relative; width: 34px; height: 34px; background: var(--card); border: 1px solid var(--border); border-radius: 7px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; color: var(--muted); transition: all .15s; }
.notif-btn:hover, .notif-btn.active { border-color: var(--accent); color: var(--accent); }
.notif-btn.has-err { border-color: var(--red); color: var(--red); }
.nbadge { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; border-radius: 10px; font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; padding: 0 3px; display: none; align-items: center; justify-content: center; border: 2px solid var(--bg2); }
.nbadge.show { display: flex; }

/* NOTIF PANEL */
.notif-overlay { position: fixed; inset: 0; z-index: 300; display: none; }
.notif-overlay.open { display: block; }
.notif-panel { position: fixed; top: 62px; right: 20px; width: 340px; background: var(--bg2); border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 16px 48px rgba(0,0,0,.6); z-index: 301; overflow: hidden; animation: sdDown .16s ease; }
@keyframes sdDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
.np-header { padding: 13px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.np-header h3 { font-size: 13px; font-weight: 700; }
.np-clear { font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; background: none; border: none; padding: 2px 6px; border-radius: 4px; }
.np-clear:hover { color: var(--red); }
.np-list { max-height: 400px; overflow-y: auto; }
.np-item { padding: 11px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; }
.np-item:last-child { border-bottom: none; }
.np-icon { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.np-icon.warn  { background: rgba(240,165,0,.15); }
.np-icon.error { background: rgba(248,81,73,.15); }
.np-icon.info  { background: rgba(88,166,255,.15); }
.np-icon.ok    { background: rgba(63,185,80,.15); }
.np-title { font-size: 12px; font-weight: 700; line-height: 1.3; }
.np-desc  { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.np-time  { font-size: 10px; color: #30363d; margin-top: 3px; }
.np-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.np-empty .e { font-size: 26px; margin-bottom: 6px; }

/* DASHBOARD */
#dash { padding: 18px 20px; }

/* VIEW TABS (menu) */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 4px 0 14px; }
.tabs-staff { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; border-left: 1px solid var(--border); margin-left: 6px; padding-left: 10px; }
.tab { background: var(--card); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 600; padding: 8px 13px; border-radius: 9px; cursor: pointer; }
.tab:hover { border-color: var(--muted); }
.tab.active { background: var(--accent-lo); color: var(--accent); border-color: rgba(240,165,0,.4); }

/* LEFT MENU LAYOUT */
.layout { display: flex; gap: 16px; align-items: flex-start; }
.sidebar { width: 212px; flex-shrink: 0; position: sticky; top: 16px; }
.side-sec { background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 8px; margin-bottom: 12px; }
.side-head { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 6px 8px 4px; }
.side-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: transparent; border: none; color: var(--text); font-size: 13px; font-weight: 600; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.side-item:hover { background: var(--bg2); }
.side-item.active { background: var(--accent-lo); color: var(--accent); }
.side-item.disabled { color: var(--muted); cursor: default; opacity: .55; }
.side-item.disabled:hover { background: transparent; }
.main { flex: 1; min-width: 0; }
/* RIGHT MEMBER COLUMN */
.memberbar { width: 252px; flex-shrink: 0; position: sticky; top: 16px; }
.onlinebar { width: clamp(340px, 28vw, 480px); flex-shrink: 0; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.onlinebar .side-sec { flex: 1 1 150px; min-width: 0; margin: 0; }
.onlinebar .mb-list { max-height: none; overflow: visible; }
.onlinebar .mb-name { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.2; }
.mb-sec { padding: 0; overflow: hidden; }
.mb-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; }
.mb-meta { font-size: 11px; color: var(--green); font-weight: 700; }
.mb-list { max-height: 80vh; overflow-y: auto; }
.mb-item { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--border); }
.mb-item:last-child { border-bottom: none; }
.mb-item.me { background: var(--accent-lo); }
.mb-item.offline { opacity: .5; }
   /* Lägg till eller ersätt dessa sektioner i wo-tracker.html */
.mb-item.owl { 
  border: 1px solid var(--blue); /* Blå ram för medlemmar */
  background: rgba(88,166,255,0.05); 
}
.mb-item.friend { 
  border: 1px solid var(--red); /* Röd ram/markering för vänner */
  background: rgba(248,81,73,0.05);
}
/* Om du vill att medlemsnamnet ska vara specifikt färgat när de är Owls */
.mb-item.owl .mb-name { color: var(--blue); } 
.mb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.mb-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.mb-dot.idle   { background: #f0b232; }
.mb-dot.dnd    { background: var(--red); }
.mb-dot.offline{ background: var(--border); }
.mb-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; line-height: 0; }
.mb-av img { width: 100%; height: 100%; object-fit: cover; }
.mb-av.noimg { display: flex; align-items: center; justify-content: center; background: var(--accent-lo); color: var(--accent); font-size: 13px; font-weight: 800; line-height: 1; }
.mb-info { min-width: 0; flex: 1; }
  /* Hitta denna del i din stil-sektion */
.mb-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Lägg till denna rad direkt under ovanför */
.mb-name.owl { color: var(--purple); }
.mb-role { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-alt { font-size: 10px; font-weight: 800; color: var(--accent); background: var(--accent-lo); border-radius: 10px; padding: 1px 6px; cursor: help; }
.mb-act  { font-size: 11px; color: var(--green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-divider { padding: 9px 13px 5px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-top: 1px solid var(--border); }
.lang-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 2px 2px; }
.lang-flag { padding: 0; border: 2px solid transparent; border-radius: 5px; background: none; cursor: pointer; line-height: 0; opacity: .55; transition: opacity .15s; }
.lang-flag img { width: 28px; height: 21px; border-radius: 3px; display: block; }
.lang-flag:hover { opacity: 1; }
.lang-flag.active { opacity: 1; border-color: var(--accent); }
@media (max-width: 1080px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; position: static; display: flex; gap: 12px; flex-wrap: wrap; }
  .sidebar .side-sec { flex: 1; min-width: 200px; margin-bottom: 0; }
  .memberbar, .onlinebar { width: 100%; position: static; }
  .mb-list { max-height: 320px; }
  .onlinebar .mb-list { max-height: 50vh; }
}

/* PLAYER HERO */
.hero { background: linear-gradient(135deg, var(--card), color-mix(in srgb,var(--bg) 88%,var(--green))); border: 1px solid var(--border); border-radius: 13px; padding: 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-av { width: 58px; height: 58px; border-radius: 11px; background: var(--accent-lo); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; color: var(--accent); flex-shrink: 0; }
.hero-info h1 { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.hero-info p  { color: var(--muted); font-size: 12px; margin-top: 3px; }
.hero-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 20px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.badge-gold   { background: var(--accent-lo); border: 1px solid var(--accent); color: var(--accent); }
.badge-clan   { background: rgba(88,166,255,.12); border: 1px solid rgba(88,166,255,.4); color: var(--blue); }
.badge-server { background: rgba(63,185,80,.12); border: 1px solid rgba(63,185,80,.4); color: var(--green); }
.hero-clan { display: flex; align-items: center; gap: 11px; padding-left: 18px; border-left: 1px solid var(--border); }
.hero-clan:empty { display: none; }
.hero-clan img, .hero-clan .hc-fallback { width: 44px; height: 44px; border-radius: 9px; object-fit: contain; background: var(--bg2); flex-shrink: 0; }
.hero-clan .hc-fallback { display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--accent); background: var(--accent-lo); border: 1px solid var(--accent); font-size: 13px; }
.hero-clan .hc-tag { font-size: 15px; font-weight: 800; color: var(--purple); letter-spacing: -.3px; }
.hero-clan .hc-line { font-size: 11px; color: var(--muted); margin-top: 2px; }
.hero-clan .hc-line b { color: var(--text); font-weight: 700; }

/* DB STATUS */
.db-bar { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 7px; padding: 7px 13px; margin-bottom: 14px; font-size: 11px; color: var(--muted); }
.db-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.db-dot.ok   { background: var(--green); }
.db-dot.save { background: var(--orange); animation: pulse .8s infinite; }
.db-dot.local{ background: var(--muted); }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.3} }
.db-lbl { font-weight: 700; color: var(--text); }
.db-bar .ml { margin-left: auto; display: flex; gap: 6px; }

/* SECTION TITLE */
.sec { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 9px; }

/* WALLET ROW — matches screenshot exactly */
.wallet-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.w-card { background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; flex: 1; min-width: 130px; position: relative; overflow: hidden; }
.w-card::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; }
.w-card.gold::before    { background: linear-gradient(90deg,#f0a500,#ffd04e); }
.w-card.credits::before { background: linear-gradient(90deg,#58a6ff,#79c0ff); }
.w-card.bonds::before   { background: linear-gradient(90deg,#a371f7,#c9a0f0); }
.w-card.xp::before      { background: linear-gradient(90deg,#3fb950,#56d364); }
.w-card.equip::before   { background: linear-gradient(90deg,#f0883e,#ffa560); }
.w-card.battles::before { background: linear-gradient(90deg,#39d0d8,#6ee7eb); }
.w-card .wi  { font-size: 18px; margin-bottom: 6px; line-height: 1; }
.w-card .wl  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 2px; }
.w-card .wv  { font-size: 22px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.w-card.gold .wv    { color: var(--accent); }
.w-card.credits .wv { color: var(--blue); }
.w-card.bonds .wv   { color: var(--purple); }
.w-card.xp .wv      { color: var(--green); }
.w-card.equip .wv   { color: var(--orange); }
.w-card.battles .wv { color: var(--cyan); }
.w-delta { font-size: 10px; margin-top: 4px; font-weight: 700; }
.w-delta.up   { color: var(--green); }
.w-delta.down { color: var(--red); }
.w-delta.none { color: var(--muted); }

/* STAT PANELS 2-COL */
.panels2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media(max-width:700px){ .panels2{ grid-template-columns:1fr; } }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.ph { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.ph h3 { font-size: 13px; font-weight: 700; }
.ph .ph-meta { font-size: 11px; color: var(--muted); }
.pb { padding: 12px 16px; }

/* BATTLE STATS GRID */
.bsgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.bsi { background: var(--bg2); border-radius: 8px; padding: 10px 12px; }
.bsi .bl { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 3px; }
.bsi .bv { font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.bv.wr  { color: var(--green); }
.bv.wn8 { color: var(--orange); }

/* MASTERY / MOE ROW */
.mastery-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mcard { flex: 1; min-width: 70px; background: var(--bg2); border-radius: 8px; padding: 10px; text-align: center; }
.mcard .micon { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.mcard .mcount { font-size: 20px; font-weight: 800; }
.mcard .mlabel { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* RESERVES / BOOSTERS */
.boost-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.boost-item:last-child { border-bottom: none; }
.boost-ic { width: 32px; height: 32px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.boost-name { font-weight: 600; font-size: 12px; }
.boost-meta { color: var(--muted); font-size: 11px; margin-top: 1px; }
.boost-badge { margin-left: auto; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.bb-active { background: rgba(63,185,80,.15); color: var(--green); }
.bb-ready  { background: var(--accent-lo); color: var(--accent); }
.bb-exp    { background: rgba(139,148,158,.12); color: var(--muted); }

/* ACCESS GATE */
#access-gate { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 36px 30px; max-width: 440px; width: 100%; text-align: center; }
.gate-logo { font-size: 44px; margin-bottom: 10px; }
.gate-card h1 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.gate-sub { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 18px; }
.gate-name { font-size: 13px; color: var(--text); background: var(--bg2); border-radius: 8px; padding: 9px 12px; margin-bottom: 14px; }
.gate-msg { font-size: 13px; line-height: 1.5; margin-bottom: 16px; min-height: 18px; }
.gate-msg.ok   { color: var(--green); }
.gate-msg.warn { color: var(--accent); }
.gate-btn { width: 100%; background: var(--accent); color: #1a1200; border: none; border-radius: 10px; padding: 12px; font-size: 14px; font-weight: 800; cursor: pointer; }
.gate-btn:hover { filter: brightness(1.08); }
.gate-btn:disabled { opacity: .5; cursor: default; }
.gate-logout { width: 100%; margin-top: 10px; background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-size: 13px; cursor: pointer; }

/* ADMIN PANEL */
.admin-input { flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; color: var(--text); font-size: 13px; }
.areq { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.areq:last-child { border-bottom: none; }
.areq-info { flex: 1; min-width: 0; }
.areq-name { font-weight: 700; font-size: 13px; }
.areq-meta { color: var(--muted); font-size: 11px; margin-top: 1px; }
.areq-btn { border: none; border-radius: 7px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.areq-btn.ok  { background: rgba(63,185,80,.15); color: var(--green); }
.areq-btn.no  { background: rgba(248,81,73,.13); color: var(--red); }
.areq-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.areq-badge.pending  { background: var(--accent-lo); color: var(--accent); }
.areq-badge.approved { background: rgba(63,185,80,.15); color: var(--green); }

/* CLAN RESERVES */
.rsv-group-title { font-size: 12px; font-weight: 800; margin: 6px 0 8px; }
.rsv-timer { font-variant-numeric: tabular-nums; }
/* Hero reserve boxes (blue = XP group, red = economy/combat group) */
.hero-reserves { display: flex; gap: 8px; align-items: center; }
.hero-reserves:empty { display: none; }
.hr-box { width: 58px; min-height: 58px; border: 2px solid var(--border); border-radius: 10px; background: var(--bg2); padding: 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.hr-box:hover { background: rgba(255,255,255,.04); }
.hr-box.blue { border-color: var(--blue); }
.hr-box.red  { border-color: var(--red); }
.hr-box.empty { border-style: dashed; }
.hr-box img  { width: 34px; height: 34px; object-fit: contain; }
.hr-box .rsv-emoji { font-size: 28px; line-height: 1; }
.rsv-head .rsv-emoji { font-size: 30px; line-height: 1; width: 36px; text-align: center; flex-shrink: 0; }
.hr-timer    { font-size: 10px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.hr-plus     { font-size: 26px; font-weight: 300; line-height: 1; color: var(--muted); }
.hr-box.blue.empty .hr-plus { color: var(--blue); }
.hr-box.red.empty  .hr-plus { color: var(--red); }
.rsv-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.rsv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rsv-head img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.rsv-name { font-weight: 700; font-size: 14px; }
.rsv-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.rsv-lvl { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.rsv-lvl > div:first-child { flex: 1; min-width: 0; }
.rsv-tag { font-size: 9px; font-weight: 700; background: var(--accent-lo); color: var(--accent); padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.rsv-btn { background: var(--accent); color: #1a1200; border: none; border-radius: 8px; padding: 7px 14px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.rsv-btn:hover { filter: brightness(1.08); }
.rsv-btn:disabled { opacity: .5; cursor: default; }
.rsv-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.rsv-badge.active { background: rgba(63,185,80,.15); color: var(--green); }
.rsv-badge.none { background: rgba(139,148,158,.12); color: var(--muted); }

/* DISCORD OVERRIDE PICKER */
.ov-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ov-col-head { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ov-search { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; color: var(--text); font-size: 12px; text-transform: none; letter-spacing: 0; }
.ov-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--bg2); }
.ov-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 12px; }
.ov-item:last-child { border-bottom: none; }
.ov-item:hover { background: rgba(255,255,255,.03); }
.ov-item.sel { background: var(--accent-lo); }
.ov-item img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ov-item .ov-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ov-item .ov-dot.ok { background: var(--green); } .ov-item .ov-dot.no { background: var(--muted); }
.ov-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.ov-sel { font-size: 12px; color: var(--muted); flex: 1; }
.ov-sel b { color: var(--text); }
.ovc-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.ovc-item:last-child { border-bottom: none; }
.ovc-item .ovc-wot { font-weight: 700; }
.ovc-item .ovc-arrow { color: var(--muted); }
.ovc-item button { margin-left: auto; }
@media (max-width: 640px) { .ov-pick { grid-template-columns: 1fr; } }

/* ACHIEVEMENT MEDAL ICONS */
.ach-ic { background: transparent !important; padding: 0; overflow: hidden; }
.ach-ic img { width: 100%; height: 100%; object-fit: contain; }

/* CLAN ROSTER */
.roster { max-height: 380px; overflow-y: auto; }
.roster-av { padding: 0; overflow: hidden; border-radius: 50%; }
.roster-av img { width: 100%; height: 100%; object-fit: cover; }
.roster-av.noimg { background: var(--accent-lo); color: var(--accent); font-size: 11px; font-weight: 800; border-radius: 50%; }
.roster .boost-item.me { background: var(--accent-lo); border-radius: 8px; }
.roster .boost-item.me .boost-name { color: var(--accent); }

/* RESERVES GRID */
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ri { background: var(--bg2); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.ri-top { display: flex; align-items: center; gap: 7px; }
.ri-ic { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.ri-name { font-size: 11px; font-weight: 700; flex: 1; line-height: 1.3; }
.ri-cnt { background: var(--accent-lo); border: 1px solid rgba(240,165,0,.3); color: var(--accent); border-radius: 20px; padding: 1px 7px; font-size: 10px; font-weight: 800; }
.ri-exp { font-size: 10px; color: var(--muted); }
.ri-exp.urgent { color: var(--red); font-weight: 700; }

/* HISTORY TABLE */
.hist-panel { background: var(--card); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; margin-bottom: 16px; }
.hist-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
thead tr { background: var(--bg2); }
th { padding: 9px 14px; text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 12px; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.015); }
.td-g  { color: var(--accent);  font-weight: 700; }
.td-c  { color: var(--blue);    font-weight: 700; }
.td-b  { color: var(--purple);  font-weight: 700; }
.td-x  { color: var(--green);   font-weight: 700; }
.td-m  { color: var(--muted); }
.dlt   { font-size: 10px; font-weight: 700; }
.dlt.p { color: var(--green); }
.dlt.n { color: var(--red); }

/* TOMATO PANEL */
.tomato-panel { background: linear-gradient(135deg, #1c1e0f, #1a2510); border: 1px solid rgba(240,165,0,.3); border-radius: 11px; padding: 14px 16px; margin-bottom: 16px; }
.tomato-panel h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--accent); }
.tstat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.tstat { background: rgba(0,0,0,.3); border-radius: 8px; padding: 10px 12px; }
.tstat .tl { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 2px; }
.tstat .tv { font-size: 18px; font-weight: 800; }
.tv.wnx  { color: #ff6b35; }
.tv.wn8  { color: var(--orange); }
.tv.wr   { color: var(--green); }
.tv.avg  { color: var(--blue); }
.tomato-link { margin-top: 10px; font-size: 11px; color: var(--muted); }
.tomato-link a { color: var(--accent); text-decoration: none; }
.tomato-link a:hover { text-decoration: underline; }

/* SPINNER */
.loading { display: flex; align-items: center; justify-content: center; padding: 32px; gap: 10px; color: var(--muted); font-size: 13px; }
.spin { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 20px; color: var(--muted); font-size: 12px; }
.empty .ei { font-size: 24px; margin-bottom: 6px; }

/* TOAST */
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 10px 16px; font-size: 12px; font-weight: 700; z-index: 999; display: none; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.toast.show    { display: block; animation: tUp .18s ease; }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }
@keyframes tUp { from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none} }

/* TREND */
#trend-canvas { display: none; width: 100%; height: 160px; padding: 10px 16px; }
