/* CountMaster Dashboard — estilos consolidados */

:root {
    --bg:       #0a0c13;
    --bg2:      #10131d;
    --bg3:      #161a28;
    --bg4:      #1d2132;
    --border:   rgba(255,255,255,0.08);
    --accent:   #5865F2;
    --accent2:  #7c86ff;
    --accent3:  #4b54d6;
    --gold:     #f5c518;
    --green:    #22c55e;
    --red:      #ef4444;
    --orange:   #f59e0b;
    --cyan:     #22d3ee;
    --purple:   #a855f7;
    --pink:     #ec4899;
    --text:     #eef0ff;
    --text2:    #c6cbe8;
    --muted:    #8288a8;
    --font:     'Syne', sans-serif;
    --mono:     'Space Mono', monospace;
    --radius:   14px;
    --radius-sm: 10px;
    --shadow:   0 8px 30px rgba(0,0,0,0.35);
    --glow:     0 0 0 1px rgba(88,101,242,0.35);
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html, body {
    height: 100%; color: var(--text); font-family: var(--font); overflow-x: hidden;
    background: var(--bg);
    background-image:
      radial-gradient(circle at 15% -20%, rgba(88,101,242,0.12) 0%, transparent 45%),
      radial-gradient(circle at 100% 0%, rgba(34,211,238,0.06) 0%, transparent 40%),
      radial-gradient(circle at 50% 120%, rgba(168,85,247,0.08) 0%, transparent 50%);
    background-attachment: fixed;
  }

  /* ── SCROLLBAR ── */
  ::-webkit-scrollbar { width: 9px; height: 9px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 9px; border: 2px solid transparent; background-clip: content-box; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); background-clip: content-box; }

  /* ── LAYOUT ── */
  #app { display: flex; height: 100vh; }

  /* ── SIDEBAR ── */
  #sidebar {
    width: 232px; min-width: 232px;
    background: linear-gradient(180deg, var(--bg2), #0d101a);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    padding: 18px 0; gap: 2px;
    position: relative; z-index: 10;
  }
  .sidebar-logo {
    padding: 0 20px 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 12px;
  }
  .sidebar-logo .logo-mark {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 800; color: #fff;
    box-shadow: 0 4px 14px rgba(88,101,242,0.4);
  }
  .sidebar-logo h1 { font-size: 14px; font-weight: 800; letter-spacing: 1px; color: #fff; line-height: 1.1; }
  .sidebar-logo h1 b { background: linear-gradient(135deg, #fff, var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .sidebar-logo span { font-size: 10px; color: var(--muted); font-family: var(--mono); letter-spacing: .5px; }

  .nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; margin: 0 10px; cursor: pointer;
    font-size: 13px; font-weight: 600; color: var(--muted);
    border-radius: var(--radius-sm);
    border-left: none;
    transition: all .18s;
    user-select: none; position: relative;
  }
  .nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
  .nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(88,101,242,0.22), rgba(88,101,242,0.05));
    box-shadow: inset 0 0 0 1px rgba(88,101,242,0.25);
  }
  .nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
    border-radius: 3px; background: linear-gradient(180deg, var(--accent2), var(--purple));
  }
  .nav-icon {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); color: var(--muted);
    transition: all .18s;
  }
  .nav-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
  .nav-item:hover .nav-icon { color: var(--accent2); }
  .nav-item.active .nav-icon { background: rgba(88,101,242,0.25); color: var(--accent2); }

  .sidebar-footer {
    margin-top: auto;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.15);
  }
  .user-chip {
    display: flex; align-items: center; gap: 10px;
  }
  .user-chip img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--accent); box-shadow: 0 0 12px rgba(88,101,242,0.35); }
  .user-chip .name { font-size: 13px; font-weight: 700; }
  .user-chip .tag  { font-size: 10px; color: var(--muted); font-family: var(--mono); }
  .logout-btn {
    margin-top: 12px; width: 100%; padding: 8px;
    background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25);
    color: #ff8a8a; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px;
    font-family: var(--font); font-weight: 700; transition: all .15s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
  }
  .logout-btn:hover { background: rgba(239,68,68,0.22); }

  /* ── MAIN ── */
  #main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

  #topbar {
    padding: 16px 30px; border-bottom: 1px solid var(--border);
    background: rgba(16,19,29,0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; position: sticky; top: 0; z-index: 5;
  }
  #topbar h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
  .badge-admin {
    background: linear-gradient(135deg,#f5c518,#eeaa2b);
    color: #241a00; font-size: 10px; font-weight: 800;
    padding: 4px 10px; border-radius: 20px; letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(245,197,24,0.35);
  }

  /* ── PAGES ── */
  .page { display: none; padding: 28px 30px; flex: 1; }
  .page.active { display: block; animation: pageIn .3s ease; }
  @keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

  /* ── STAT GRID ── */
  .stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 16px; margin-bottom: 28px; }
  .stat-card {
    background: linear-gradient(160deg, var(--bg4), var(--bg3));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; display: flex; flex-direction: column; gap: 8px;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    position: relative; overflow: hidden;
  }
  .stat-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent2), transparent);
    opacity: 0; transition: opacity .2s;
  }
  .stat-card:hover { transform: translateY(-3px); border-color: rgba(88,101,242,0.4); box-shadow: var(--shadow); }
  .stat-card:hover::after { opacity: 1; }
  .stat-icon { font-size: 22px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border-radius: 10px; }
  .stat-val  { font-size: 27px; font-weight: 800; font-family: var(--mono); line-height: 1; }
  .stat-lbl  { font-size: 12px; color: var(--muted); font-weight: 600; }
  .stat-card.green .stat-val { color: var(--green); }
  .stat-card.gold  .stat-val { color: var(--gold); }
  .stat-card.red   .stat-val { color: var(--red); }
  .stat-card.blue  .stat-val { color: var(--accent2); }
  .stat-card.orange .stat-val { color: var(--orange); }

  /* ── TABLE ── */
  .section { margin-bottom: 28px; }
  .section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
  .section-title  { font-size: 13px; font-weight: 700; color: var(--accent2); letter-spacing: .6px; text-transform: uppercase; }

  .table-wrap {
    background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: auto; -webkit-overflow-scrolling: touch; box-shadow: var(--shadow);
  }

  /* ── SERVER CARD GRID ── */
  .server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
  .server-card {
    background: linear-gradient(160deg, var(--bg4), var(--bg3));
    border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
    display: flex; flex-direction: column; gap: 12px;
    transition: transform .15s, border-color .15s, box-shadow .15s;
  }
  .server-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
  .server-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .server-avatar {
    width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 17px; color: #fff;
    object-fit: cover; background: var(--bg2); border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .server-card-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
  .server-card-role { font-size: 12px; color: var(--muted); }
  .server-card-chips { display: flex; gap: 6px; flex-wrap: wrap; }
  .server-card-stat { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
  .server-card-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
  .server-card-actions .btn { flex: 1; }
  table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
  th { padding: 12px 14px; text-align: left; color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.12); }
  td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
  tr:last-child td { border-bottom: none; }
  tr:hover td { background: rgba(88,101,242,0.04); }

  /* ── CHIPS ── */
  .chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  }
  .chip.green  { background: rgba(34,197,94,.14);   color: #4ade80; }
  .chip.gold   { background: rgba(245,197,24,.12);  color: var(--gold); }
  .chip.red    { background: rgba(239,68,68,.14);   color: #f87171; }
  .chip.blue   { background: rgba(88,101,242,.16);  color: var(--accent2); }
  .chip.orange { background: rgba(245,158,11,.14);  color: var(--orange); }
  .chip.gray   { background: rgba(255,255,255,.07); color: var(--muted); }

  .mode-chip { font-family: var(--mono); font-size: 10px; }

  /* ── BUTTONS ── */
  .btn {
    padding: 7px 14px; border-radius: var(--radius-sm); border: none; cursor: pointer;
    font-family: var(--font); font-size: 12px; font-weight: 700;
    transition: all .15s; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  }
  .btn:active { transform: scale(.96); }
  .btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent3)); color: #fff; box-shadow: 0 4px 14px rgba(88,101,242,0.35); }
  .btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(88,101,242,0.5); }
  .btn-green { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.35); }
  .btn-green:hover { background: rgba(34,197,94,.25); }
  .btn-gold  { background: rgba(245,197,24,.1); color: var(--gold); border: 1px solid rgba(245,197,24,.35); }
  .btn-gold:hover { background: rgba(245,197,24,.2); }
  .btn-red   { background: rgba(239,68,68,.12); color: #f87171; border: 1px solid rgba(239,68,68,.35); }
  .btn-red:hover { background: rgba(239,68,68,.22); }
  .btn-ghost { background: rgba(255,255,255,0.03); color: var(--muted); border: 1px solid var(--border); }
  .btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.06); }
  .btn-sm { padding: 4px 10px; font-size: 11px; }

  /* ── SEARCH ── */
  .search-box {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
  }
  .search-box input {
    flex: 1; min-width: 160px; background: var(--bg3); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-sm); padding: 10px 15px;
    font-family: var(--font); font-size: 13px; outline: none;
    transition: border-color .15s, box-shadow .15s;
  }
  .search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88,101,242,0.15); }
  .search-box input::placeholder { color: var(--muted); }

  /* ── PAGINATION ── */
  .pagination { display: flex; align-items: center; gap: 8px; margin-top: 14px; justify-content: flex-end; }
  .pagination span { font-size: 12px; color: var(--muted); }

  /* ── LOGS ── */
  #log-box {
    background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
    padding: 14px; height: 420px; overflow-y: auto; font-family: var(--mono);
    font-size: 12px; line-height: 1.7;
  }
  .log-line { display: flex; gap: 10px; }
  .log-ts   { color: var(--muted); min-width: 70px; }
  .log-lv   { min-width: 58px; font-weight: 700; }
  .log-lv.info    { color: var(--accent2); }
  .log-lv.success { color: var(--green); }
  .log-lv.warn    { color: var(--orange); }
  .log-lv.error   { color: var(--red); }
  .log-lv.debug   { color: var(--muted); }
  .log-msg  { color: var(--text); word-break: break-all; }

  /* ── LANDING / LOGIN SCREEN ── */
  #login-screen {
    position: fixed; inset: 0;
    background: radial-gradient(circle at 50% -10%, rgba(88,101,242,0.22) 0%, transparent 60%),
                radial-gradient(circle at 90% 25%, rgba(0,200,83,0.14) 0%, transparent 45%),
                radial-gradient(circle at 10% 80%, rgba(255,215,0,0.08) 0%, transparent 40%),
                #07080d;
    overflow-y: auto; overflow-x: hidden;
    z-index: 100;
    display: flex; flex-direction: column;
    min-height: 100vh; width: 100%;
    color: var(--text);
  }

  .login-glow {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: .25; pointer-events: none;
  }
  .login-glow.one { width: 400px; height: 400px; background: var(--accent); top: -120px; left: -100px; animation: loginFloat 14s ease-in-out infinite; }
  .login-glow.two { width: 340px; height: 340px; background: var(--green); top: 30%; right: -120px; animation: loginFloat 18s ease-in-out infinite reverse; }
  @keyframes loginFloat { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(25px,20px); } }

  .landing-nav {
    width: 100%; position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 36px;
    background: rgba(11, 13, 20, 0.82);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .landing-logo {
    font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 10px;
    white-space: nowrap; text-decoration: none; color: var(--text);
  }
  .landing-logo img { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid rgba(88,101,242,0.5); }
  .landing-logo .brand-grad {
    background: linear-gradient(135deg, #fff 30%, var(--accent2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .landing-nav-links {
    display: flex; align-items: center; gap: 24px;
  }
  .landing-nav-links a {
    color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none;
    transition: color .18s;
  }
  .landing-nav-links a:hover { color: var(--text); }
  .landing-nav-actions { display: flex; align-items: center; gap: 12px; }

  .landing-container {
    max-width: 1240px; margin: 0 auto; width: 100%; padding: 0 24px;
    position: relative; z-index: 2;
  }

  .landing-hero {
    padding: clamp(40px, 7vw, 84px) 0 clamp(40px, 6vw, 70px);
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(32px, 5vw, 64px); align-items: center;
    animation: loginCardIn .5s ease both;
  }
  @keyframes loginCardIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

  .landing-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(88,101,242,0.12); border: 1px solid rgba(88,101,242,0.3);
    color: #c7d2fe; font-size: 12px; font-weight: 700; margin-bottom: 22px;
    box-shadow: 0 0 20px rgba(88,101,242,0.15);
  }
  .landing-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

  .landing-title {
    font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; line-height: 1.12;
    margin-bottom: 20px; letter-spacing: -0.02em;
  }
  .landing-title .grad-neon {
    background: linear-gradient(135deg, #7983ff 0%, #00e676 55%, #ffd700 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .landing-sub {
    color: #9ca3af; font-size: clamp(15px, 1.8vw, 17px); line-height: 1.65;
    max-width: 540px; margin-bottom: 32px;
  }

  .landing-cta {
    display: flex; align-items: center; gap: 14px; margin-bottom: 36px; flex-wrap: wrap;
  }
  .discord-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--accent); color: #fff; border: none; border-radius: 12px;
    padding: 13px 24px; font-size: 14px; font-weight: 700;
    cursor: pointer; font-family: var(--font); text-decoration: none;
    transition: all .2s; box-shadow: 0 6px 20px rgba(88,101,242,0.35);
  }
  .discord-btn:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(88,101,242,0.5); }
  .discord-btn:active { transform: translateY(0); }
  .discord-btn.small { padding: 9px 18px; font-size: 13px; border-radius: 10px; }
  .discord-btn svg { width: 20px; height: 20px; fill: currentColor; }

  .btn-outline-glow {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 22px; border-radius: 12px; font-size: 14px; font-weight: 700;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
    color: var(--text); text-decoration: none; cursor: pointer; transition: all .2s;
    font-family: var(--font);
  }
  .btn-outline-glow:hover {
    background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px); color: #fff;
  }
  .btn-outline-glow svg { width: 18px; height: 18px; stroke: currentColor; }

  .landing-trust {
    display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: #9ca3af;
  }
  .landing-trust-item {
    display: flex; align-items: center; gap: 6px; white-space: nowrap;
  }
  .landing-trust-item svg { width: 14px; height: 14px; stroke: var(--green); }

  /* ── DISCORD LIVE MOCKUP ── */
  .landing-visual-wrap {
    display: flex; flex-direction: column; gap: 18px;
  }
  .discord-mockup {
    background: #1e1f29; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 20px 48px rgba(0,0,0,0.45), 0 0 30px rgba(88,101,242,0.12);
  }
  .discord-mockup-header {
    background: #14151e; padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700;
  }
  .mockup-channel { display: flex; align-items: center; gap: 8px; color: #fff; }
  .mockup-channel svg { width: 16px; height: 16px; stroke: var(--muted); }
  .mockup-live-badge {
    font-size: 11px; color: var(--green); background: rgba(0,200,83,0.12);
    padding: 3px 8px; border-radius: 20px; font-weight: 700;
  }
  .discord-mockup-body {
    padding: 16px; display: flex; flex-direction: column; gap: 14px;
    background: #11131c; font-size: 13px;
  }
  .mockup-msg {
    display: flex; gap: 12px; align-items: flex-start;
  }
  .mockup-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
  }
  .mockup-msg-content { flex: 1; min-width: 0; }
  .mockup-msg-author {
    display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin-bottom: 2px;
  }
  .mockup-bot-badge {
    background: var(--accent); color: #fff; font-size: 10px; font-weight: 800;
    padding: 1px 5px; border-radius: 4px; text-transform: uppercase;
  }
  .mockup-number {
    font-size: 18px; font-weight: 800; font-family: var(--mono); color: #fff;
    display: inline-block; padding: 2px 0;
  }
  .mockup-reactions {
    display: flex; gap: 6px; margin-top: 6px;
  }
  .mockup-reaction {
    background: rgba(88,101,242,0.15); border: 1px solid rgba(88,101,242,0.3);
    border-radius: 6px; padding: 2px 8px; font-size: 12px; display: flex; align-items: center; gap: 4px;
    font-weight: 700; color: #c7d2fe;
  }
  .mockup-embed {
    margin-top: 6px; background: rgba(255,255,255,0.03); border-left: 4px solid var(--gold);
    border-radius: 4px 8px 8px 4px; padding: 10px 14px; font-size: 12px;
  }
  .mockup-embed-title { font-weight: 800; color: var(--gold); margin-bottom: 2px; }

  .landing-top {
    background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px;
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
  }
  .landing-top h4 {
    font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
    margin-bottom: 12px; display: flex; align-items: center; gap: 6px; font-weight: 700;
  }
  .landing-top-row {
    display: flex; justify-content: space-between; gap: 10px; font-size: 13px;
    padding: 9px 0; border-bottom: 1px solid var(--border); align-items: center;
  }
  .landing-top-row:last-child { border-bottom: none; }
  .landing-top-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .landing-top-row b { color: var(--gold); font-family: var(--mono); flex-shrink: 0; }
  .landing-top-empty { font-size: 13px; color: var(--muted); padding: 8px 0; }

  /* ── STATS STRIP ── */
  .landing-stats-strip {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
    padding: 24px; background: var(--bg2); border: 1px solid var(--border);
    border-radius: 18px; margin: 20px 0 60px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  }
  .landing-stat-col {
    display: flex; flex-direction: column; gap: 4px;
    padding: 0 12px; border-right: 1px solid var(--border);
  }
  .landing-stat-col:last-child { border-right: none; }
  .landing-stat-col b {
    font-size: clamp(24px, 3vw, 34px); font-weight: 800; font-family: var(--mono);
    color: #fff; letter-spacing: -0.02em;
  }
  .landing-stat-col b.stat-green { color: var(--green); }
  .landing-stat-col b.stat-blue  { color: var(--accent2); }
  .landing-stat-col b.stat-gold  { color: var(--gold); }
  .landing-stat-col span {
    font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  }

  /* ── FEATURES SECTION ── */
  .landing-section {
    padding: 40px 0 60px;
  }
  .landing-section-head {
    text-align: center; max-width: 620px; margin: 0 auto 40px;
  }
  .landing-tag {
    display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; color: var(--accent2); background: rgba(88,101,242,0.1);
    padding: 4px 12px; border-radius: 20px; margin-bottom: 12px; border: 1px solid rgba(88,101,242,0.25);
  }
  .landing-section-title {
    font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; margin-bottom: 12px;
  }
  .landing-section-sub {
    color: var(--muted); font-size: 15px; line-height: 1.6;
  }
  .landing-features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px;
  }
  .landing-feat-card {
    background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
    padding: 26px; display: flex; flex-direction: column; gap: 14px;
    transition: all .25s ease;
  }
  .landing-feat-card:hover {
    border-color: rgba(88,101,242,0.4); transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  }
  .landing-feat-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(88,101,242,0.12); color: var(--accent2);
    border: 1px solid rgba(88,101,242,0.25); flex-shrink: 0;
  }
  .landing-feat-icon.green  { background: rgba(0,200,83,0.12); color: var(--green); border-color: rgba(0,200,83,0.25); }
  .landing-feat-icon.gold   { background: rgba(255,215,0,0.12); color: var(--gold); border-color: rgba(255,215,0,0.25); }
  .landing-feat-icon.orange { background: rgba(255,140,0,0.12); color: var(--orange); border-color: rgba(255,140,0,0.25); }
  .landing-feat-icon.red    { background: rgba(255,59,59,0.12); color: var(--red); border-color: rgba(255,59,59,0.25); }
  .landing-feat-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
  .landing-feat-title { font-size: 16px; font-weight: 700; color: #fff; }
  .landing-feat-desc { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

  /* ── BANNER DE SECCIÓN ── */
  .landing-section-banner {
    position: relative; overflow: hidden;
    border-radius: 20px; padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 48px);
    margin-bottom: 36px;
    background: linear-gradient(135deg, rgba(88,101,242,0.18), rgba(0,200,83,0.10));
    border: 1px solid rgba(88,101,242,0.3);
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  }
  .landing-section-banner::before {
    content: ''; position: absolute; top: -60%; right: -10%;
    width: 340px; height: 340px; border-radius: 50%;
    background: radial-gradient(circle, rgba(88,101,242,0.35), transparent 70%);
    pointer-events: none;
  }
  .landing-section-banner.alt {
    background: linear-gradient(135deg, rgba(255,215,0,0.12), rgba(255,140,0,0.08));
    border-color: rgba(255,215,0,0.28);
  }
  .landing-section-banner.alt::before {
    background: radial-gradient(circle, rgba(255,215,0,0.30), transparent 70%);
  }
  .landing-banner-icon {
    font-size: clamp(40px, 6vw, 60px); filter: drop-shadow(0 6px 18px rgba(0,0,0,0.4));
    z-index: 1;
  }
  .landing-banner-text { flex: 1; min-width: 220px; z-index: 1; }
  .landing-banner-title { font-size: clamp(22px, 3vw, 34px); font-weight: 800; color: #fff; letter-spacing: -0.02em; }
  .landing-banner-title .grad { background: linear-gradient(135deg, #7983ff, #00e676); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .landing-banner-sub { font-size: 14.5px; color: var(--muted); margin-top: 6px; line-height: 1.55; }
  .landing-banner-cta { z-index: 1; }

  /* ── PÁGINA LEGAL (Términos / Privacidad) ── */
  .legal-page {
    padding: clamp(40px, 6vw, 70px) 0 60px;
    animation: loginCardIn .45s ease both;
  }
  .legal-hero {
    position: relative; overflow: hidden; border-radius: 22px;
    padding: clamp(30px, 5vw, 56px); margin-bottom: 32px;
    background: linear-gradient(135deg, rgba(88,101,242,0.22), rgba(0,200,83,0.10));
    border: 1px solid rgba(88,101,242,0.32);
  }
  .legal-hero::before {
    content: ''; position: absolute; top: -70%; right: -10%;
    width: 360px; height: 360px; border-radius: 50%;
    background: radial-gradient(circle, rgba(88,101,242,0.4), transparent 70%);
  }
  .legal-hero-icon { font-size: 46px; margin-bottom: 14px; }
  .legal-hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: #fff; }
  .legal-hero p { color: #9ca3af; font-size: 15px; line-height: 1.6; max-width: 620px; margin-top: 12px; }
  .legal-body {
    background: var(--bg2); border: 1px solid var(--border); border-radius: 18px;
    padding: clamp(24px, 4vw, 40px); font-size: 15px; line-height: 1.75; color: var(--text);
  }
  .legal-body h3 { color: #fff; font-size: 18px; font-weight: 700; margin: 26px 0 10px; }
  .legal-body h3:first-child { margin-top: 0; }
  .legal-body p { margin-bottom: 12px; }
  .legal-body a { color: var(--accent2); text-decoration: none; }
  .legal-body a:hover { text-decoration: underline; }

  /* ── PARTNERS SHOWCASE SECTION ── */
  .landing-partners-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
  }
  .landing-partner-card {
    background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
    padding: 22px; display: flex; flex-direction: column; gap: 14px;
    transition: all .2s;
  }
  .landing-partner-card:hover { border-color: rgba(88,101,242,0.4); transform: translateY(-3px); }
  .landing-partner-top { display: flex; align-items: center; gap: 14px; }
  .landing-partner-logo {
    width: 48px; height: 48px; border-radius: 12px; object-fit: cover;
    background: var(--bg3); border: 1px solid var(--border); flex-shrink: 0;
  }
  .landing-partner-info { flex: 1; min-width: 0; }
  .landing-partner-name { font-size: 15px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .landing-partner-badge { font-size: 11px; color: var(--accent2); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
  .landing-partner-desc { font-size: 13px; color: var(--muted); line-height: 1.5; min-height: 38px; }
  .landing-partner-btn {
    margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 700;
    background: rgba(88,101,242,0.12); border: 1px solid rgba(88,101,242,0.25);
    color: var(--accent2); text-decoration: none; transition: all .15s;
  }
  .landing-partner-btn:hover { background: var(--accent); color: #fff; }
  .landing-partner-cta-card {
    background: linear-gradient(135deg, rgba(88,101,242,0.08), rgba(0,200,83,0.06));
    border: 1px dashed rgba(88,101,242,0.35); border-radius: 16px;
    padding: 24px; display: flex; flex-direction: column; justify-content: center;
    align-items: center; text-align: center; gap: 10px;
  }

  /* ── LANDING FOOTER ── */
  .landing-footer {
    border-top: 1px solid var(--border); padding: 44px 0 28px; margin-top: auto;
    background: rgba(11, 13, 20, 0.95);
  }
  .landing-footer-inner {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px;
  }
  .landing-footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
  .landing-footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
  .landing-footer-tagline { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.6; max-width: 320px; }
  .landing-footer-col-title { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
  .landing-footer-links { display: flex; flex-direction: column; gap: 10px; }
  .landing-footer-links a { color: var(--muted); font-size: 13.5px; text-decoration: none; transition: color .15s; }
  .landing-footer-links a:hover { color: var(--text); }
  .landing-footer-bottom {
    grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 22px;
  }
  .landing-footer-copy { font-size: 12px; color: var(--muted); }
  .landing-footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
  .landing-footer-legal a { color: var(--muted); font-size: 12px; text-decoration: none; transition: color .15s; }
  .landing-footer-legal a:hover { color: var(--text); }
  .landing-footer-heart { color: #ff3b5c; }

  /* ── PARTNERS DASHBOARD PAGE STYLES ── */
  .partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-bottom: 28px; }
  .partner-dash-card {
    background: var(--bg3); border: 1px solid var(--border); border-radius: 14px;
    padding: 20px; display: flex; flex-direction: column; gap: 14px;
    transition: border-color .15s;
  }
  .partner-dash-card:hover { border-color: var(--accent); }
  .partner-dash-head { display: flex; align-items: center; gap: 14px; }
  .partner-dash-avatar {
    width: 46px; height: 46px; border-radius: 12px; object-fit: cover;
    background: var(--bg2); border: 1px solid var(--border); flex-shrink: 0;
  }
  .partner-dash-details { flex: 1; min-width: 0; }
  .partner-dash-name { font-weight: 800; font-size: 16px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .partner-dash-id { font-size: 11px; color: var(--muted); font-family: var(--mono); }
  .partner-status-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; width: fit-content;
  }
  .partner-status-pill.active { background: rgba(0,200,83,0.12); color: var(--green); border: 1px solid rgba(0,200,83,0.3); }
  .partner-status-pill.pending { background: rgba(255,140,0,0.12); color: var(--orange); border: 1px solid rgba(255,140,0,0.3); }
  .pending-diff-card {
    background: rgba(255,140,0,0.06); border: 1px solid rgba(255,140,0,0.25);
    border-radius: 12px; padding: 14px; margin-top: 8px; font-size: 12.5px;
  }
  .pending-diff-row {
    display: flex; gap: 8px; margin-bottom: 6px; align-items: baseline; flex-wrap: wrap;
  }
  .pending-diff-label { font-weight: 700; color: var(--muted); min-width: 80px; }
  .pending-diff-val { color: var(--text); }
  .pending-diff-val b { color: var(--green); }

  /* ── SVG ICONS STYLES ── */
  .nav-icon {
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--muted); transition: color .18s;
  }
  .nav-item:hover .nav-icon, .nav-item.active .nav-icon { color: var(--accent2); }
  .nav-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }

  @media (max-width: 960px) {
    .landing-hero { grid-template-columns: 1fr; }
    .landing-stats-strip { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .landing-stat-col:nth-child(2) { border-right: none; }
    .landing-nav-links { display: none; }
  }
  @media (max-width: 640px) {
    .landing-nav { padding: 12px 18px; }
    .landing-hero { padding: 32px 0 40px; }
    .landing-stats-strip { grid-template-columns: 1fr; }
    .landing-stat-col { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
    .landing-stat-col:last-child { border-bottom: none; }
    .landing-cta { flex-direction: column; align-items: stretch; }
    .landing-cta .discord-btn, .landing-cta .btn-outline-glow { width: 100%; }
    .landing-footer-inner { grid-template-columns: 1fr; text-align: left; gap: 24px; }
    .landing-footer-bottom { flex-direction: column; align-items: flex-start; }
  }

  /* ── MODAL ── */
  .modal-bg {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65);
    display: flex; align-items: center; justify-content: center; z-index: 50;
    opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .modal-bg.open { opacity: 1; pointer-events: all; }
  .modal {
    background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
    padding: 28px; max-width: 500px; width: 90%;
    transform: translateY(12px); transition: transform .2s;
    max-height: 85vh; overflow-y: auto;
  }
  .modal-bg.open .modal { transform: translateY(0); }
  .modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
  .modal-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
  .modal-row label { font-size: 12px; color: var(--muted); font-weight: 700; }
  .modal-row input, .modal-row select {
    background: var(--bg3); border: 1px solid var(--border);
    color: var(--text); border-radius: 9px; padding: 9px 14px;
    font-family: var(--font); font-size: 13px; outline: none;
  }
  .modal-row input:focus, .modal-row select:focus { border-color: var(--accent); }
  .modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

  .cfg-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    font-size: 13px; color: var(--text); padding: 14px 16px; background: var(--bg3);
    border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
    transition: all .2s ease; user-select: none;
  }
  .cfg-toggle:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,0.03); }
  .cfg-toggle-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .cfg-toggle-title { font-weight: 600; font-size: 13px; color: var(--text); }
  .cfg-toggle-desc { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
  .switch-box {
    position: relative; width: 42px; height: 24px; flex-shrink: 0;
  }
  .switch-box input {
    opacity: 0; width: 0; height: 0; position: absolute;
  }
  .switch-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg2); border: 1px solid var(--border);
    transition: .25s cubic-bezier(.4,0,.2,1); border-radius: 24px;
  }
  .switch-slider:before {
    position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px;
    background-color: #a0a5ba; transition: .25s cubic-bezier(.4,0,.2,1); border-radius: 50%;
  }
  .switch-box input:checked + .switch-slider {
    background-color: var(--accent); border-color: var(--accent);
  }
  .switch-box input:checked + .switch-slider:before {
    transform: translateX(18px); background-color: #fff;
  }
  .switch-box input:disabled + .switch-slider {
    opacity: 0.5; cursor: not-allowed;
  }

  /* ── IMPERSONATION BANNER ── */
  #impersonation-bar {
    display: none; align-items: center; justify-content: space-between; gap: 12px;
    background: linear-gradient(90deg, rgba(255, 140, 0, 0.22), rgba(255, 77, 77, 0.22));
    border-bottom: 1px solid rgba(255, 140, 0, 0.45);
    padding: 10px 20px; font-size: 13px; color: #ffca7b; font-weight: 600;
  }
  #impersonation-bar .imp-actions { display: flex; gap: 8px; align-items: center; }
  #impersonation-bar .btn-stop-imp {
    background: #ff5252; color: #fff; border: none; padding: 5px 12px; border-radius: 6px;
    font-weight: 700; font-size: 12px; cursor: pointer; transition: background .15s;
  }
  #impersonation-bar .btn-stop-imp:hover { background: #ff3333; }

  /* ── TOAST ── */
  #toast {
    position: fixed; bottom: 24px; right: 24px; left: auto;
    background: var(--bg3); border: 1px solid var(--border);
    color: var(--text); border-radius: 12px; padding: 12px 18px;
    font-size: 13px; font-weight: 600; z-index: 200;
    max-width: min(320px, calc(100vw - 48px));
    transform: translateY(60px); opacity: 0; transition: all .25s;
    pointer-events: none;
  }
  #toast.show { transform: translateY(0); opacity: 1; }
  #toast.success { border-color: rgba(0,200,83,.4); color: var(--green); }
  #toast.error   { border-color: rgba(255,59,59,.4);  color: var(--red); }

  /* ── LOADING ── */
  .spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  .empty-state { padding: 40px; text-align: center; color: var(--muted); font-size: 14px; }

  /* ── TOP PANEL TOP ── */
  .top-podium { display: flex; gap: 14px; margin-bottom: 28px; }
  .top-entry {
    flex: 1; background: var(--bg3); border: 1px solid var(--border);
    border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 12px;
  }
  .top-entry.first { border-color: rgba(255,215,0,.35); }
  .top-rank { font-size: 22px; font-weight: 800; font-family: var(--mono); min-width: 36px; }
  .top-info .name { font-size: 14px; font-weight: 700; }
  .top-info .pts  { font-size: 12px; color: var(--muted); font-family: var(--mono); }

  .chart-card {
    background: var(--bg3); border: 1px solid var(--border); border-radius: 18px;
    padding: 18px; min-height: 260px; display: flex; flex-direction: column; gap: 12px;
  }
  .chart-title { font-size: 12px; font-weight: 700; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; }

  .medal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 28px; }
  .medal-card {
    background: linear-gradient(135deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
    border: 1px solid var(--border); border-radius: 18px; padding: 18px;
    display: flex; flex-direction: column; gap: 8px;
  }
  .medal-rank { font-size: 18px; font-weight: 800; font-family: var(--mono); }
  .medal-name { font-size: 14px; font-weight: 700; }
  .medal-detail { font-size: 12px; color: var(--muted); }

  .alert-list { display: grid; gap: 10px; }
  .alert-card {
    background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px;
    padding: 14px; display: flex; justify-content: space-between; gap: 12px;
  }
  .alert-card.red { border-color: rgba(255,59,59,.25); }
  .alert-card.orange { border-color: rgba(255,140,0,.25); }
  .alert-card span { font-size: 12px; }

  .table-skeleton td {
    background: rgba(255,255,255,.04); color: transparent; border-color: transparent;
  }

  @media (max-width: 700px) {
    #sidebar { width: 60px; min-width: 60px; }
    .sidebar-logo, .nav-item span, .sidebar-footer .name, .sidebar-footer .tag, .logout-btn { display: none; }
    .nav-item { justify-content: center; padding: 12px; }
    .top-podium { flex-direction: column; }
    .page { padding: 16px; }
    #topbar { padding: 12px 16px; }
    #topbar h2 { font-size: 15px; }
  }

  @media (max-width: 460px) {
    .stat-grid { grid-template-columns: repeat(auto-fill, minmax(135px,1fr)); gap: 10px; }
    .section-header { flex-wrap: wrap; gap: 10px; }
    .modal { padding: 20px; }
    #toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: .01ms !important; animation-iteration-count: 1 !important;
      transition-duration: .01ms !important; scroll-behavior: auto !important;
    }
  }

#page-discord { display: none; flex-direction: column; gap: 12px; }
  #page-discord.active { display: flex !important; }

  /* Layout principal */
  .dc-layout { display: flex; height: calc(100vh - 170px); min-height: 500px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg1); }

  /* Columna guilds */
  .dc-guilds { width: 62px; background: var(--bg1); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; overflow-y: auto; flex-shrink: 0; }
  .dc-guild-icon { width: 42px; height: 42px; border-radius: 50%; cursor: pointer; transition: border-radius .15s, border-color .15s; border: 2px solid transparent; object-fit: cover; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: var(--text); flex-shrink: 0; user-select: none; }
  .dc-guild-icon:hover { border-radius: 14px; border-color: rgba(88,101,242,.5); }
  .dc-guild-icon.active { border-radius: 14px; border-color: var(--accent); background: rgba(88,101,242,.15); }

  /* Columna canales */
  .dc-sidebar { width: 220px; background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; overflow: hidden; }
  .dc-guild-header { padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .dc-guild-title { font-weight: 700; font-size: 13px; color: var(--accent2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dc-guild-meta { font-size: 10px; color: var(--muted); margin-top: 2px; }
  .dc-search-ch { margin: 6px 8px; padding: 5px 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 12px; width: calc(100% - 16px); }
  .dc-search-ch:focus { outline: none; border-color: var(--accent); }
  .dc-channels { flex: 1; overflow-y: auto; padding: 4px 0; }
  .dc-ch-header { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 8px 12px 3px; }
  .dc-ch-item { display: flex; align-items: center; gap: 5px; padding: 4px 12px; cursor: pointer; border-radius: 5px; margin: 0 4px; font-size: 12.5px; color: var(--muted); transition: background .1s, color .1s; }
  .dc-ch-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
  .dc-ch-item.active { background: rgba(88,101,242,.18); color: var(--accent2); }
  .dc-ch-item.counting { color: #57f287; }
  .dc-ch-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dc-ch-unread { font-size: 10px; background: var(--red); color: white; border-radius: 10px; padding: 0 5px; }

  /* Área principal */
  .dc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg3); }

  /* Header del canal */
  .dc-chan-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg2); flex-shrink: 0; }
  .dc-chan-icon { font-size: 16px; }
  .dc-chan-name { font-weight: 700; font-size: 14px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dc-chan-badge { font-size: 10px; background: rgba(88,101,242,.2); color: var(--accent2); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
  .dc-header-actions { display: flex; gap: 4px; flex-shrink: 0; }
  .dc-hbtn { background: rgba(255,255,255,.06); border: none; color: var(--muted); cursor: pointer; border-radius: 6px; padding: 5px 8px; font-size: 13px; transition: background .15s, color .15s; }
  .dc-hbtn:hover { background: rgba(255,255,255,.12); color: var(--text); }
  .dc-hbtn.active { background: rgba(88,101,242,.2); color: var(--accent2); }

  /* Mensajes */
  .dc-messages { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; }
  .dc-msg { display: flex; gap: 8px; padding: 3px 5px; border-radius: 5px; position: relative; }
  .dc-msg:hover { background: rgba(255,255,255,.03); }
  .dc-msg:hover .dc-msg-actions { display: flex; }
  .dc-msg.mine { background: rgba(88,101,242,.05); }
  .dc-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; margin-top: 1px; }
  .dc-msg-body { min-width: 0; flex: 1; }
  .dc-msg-meta { display: flex; align-items: baseline; gap: 6px; margin-bottom: 1px; }
  .dc-msg-author { font-size: 13px; font-weight: 700; }
  .dc-msg-author.is-bot { color: #5865f2; }
  .dc-msg-author.is-mine { color: #57f287; }
  .dc-msg-author.is-user { color: var(--accent2); }
  .dc-bot-tag { font-size: 9px; background: #5865f2; color: white; border-radius: 3px; padding: 1px 4px; font-weight: 700; vertical-align: middle; }
  .dc-msg-time { font-size: 10px; color: var(--muted); }
  .dc-msg-content { font-size: 13px; color: var(--text); word-break: break-word; line-height: 1.5; white-space: pre-wrap; }
  .dc-msg-actions { display: none; position: absolute; right: 6px; top: 3px; gap: 3px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 2px; }
  .dc-msg-act-btn { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 13px; padding: 2px 5px; border-radius: 4px; }
  .dc-msg-act-btn:hover { background: rgba(255,255,255,.08); color: var(--text); }

  /* Embeds */
  .dc-embed { border-left: 3px solid #5865f2; background: rgba(88,101,242,.07); border-radius: 4px; padding: 8px 10px; margin-top: 4px; max-width: 450px; }
  .dc-embed-title { font-size: 13px; font-weight: 700; color: var(--accent2); margin-bottom: 4px; }
  .dc-embed-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
  .dc-embed-field { margin-top: 6px; }
  .dc-embed-field-name { font-size: 11px; font-weight: 700; color: var(--text); }
  .dc-embed-field-val { font-size: 12px; color: var(--muted); }
  .dc-embed-footer { font-size: 10px; color: var(--muted); margin-top: 6px; border-top: 1px solid var(--border); padding-top: 4px; }
  .dc-embed-img { max-width: 100%; border-radius: 4px; margin-top: 6px; }

  /* Input area */
  .dc-input-area { padding: 8px 12px; border-top: 1px solid var(--border); background: var(--bg2); flex-shrink: 0; }
  .dc-input-row { display: flex; gap: 6px; align-items: flex-end; }
  .dc-input { flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; color: var(--text); font-size: 13px; resize: none; min-height: 36px; max-height: 120px; font-family: inherit; line-height: 1.4; }
  .dc-input:focus { outline: none; border-color: var(--accent); }
  .dc-input:disabled { opacity: .4; cursor: not-allowed; }
  .dc-send-btn { background: var(--accent); color: white; border: none; border-radius: 8px; padding: 8px 13px; cursor: pointer; font-size: 15px; transition: background .15s; flex-shrink: 0; height: 36px; }
  .dc-send-btn:hover:not(:disabled) { background: var(--accent2); }
  .dc-send-btn:disabled { opacity: .4; cursor: not-allowed; }
  .dc-input-hint { font-size: 10px; color: var(--muted); margin-top: 3px; }

  /* Edit mode */
  .dc-edit-bar { background: rgba(255,200,0,.08); border-top: 1px solid rgba(255,200,0,.2); padding: 5px 12px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: #ffd700; }
  .dc-edit-bar button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; }

  /* Live dot */
  .dc-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #57f287; display: inline-block; margin-right: 3px; animation: pulse 1.5s infinite; }

  /* Buscador de servidor */
  .dc-guild-search { margin: 6px; }
  .dc-guild-search input { width: 100%; padding: 5px 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 11px; }
  .dc-guild-search input:focus { outline: none; border-color: var(--accent); }

  /* Panel info servidor */
  .dc-server-info { padding: 14px; border-bottom: 1px solid var(--border); display: none; }
  .dc-server-info.open { display: block; }
  .dc-server-info h4 { font-size: 13px; margin: 0 0 8px; color: var(--accent2); }
  .dc-info-row { display: flex; justify-content: space-between; font-size: 11px; padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
  .dc-info-label { color: var(--muted); }
  .dc-info-val { color: var(--text); font-weight: 600; }

  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

  /* Móvil */
  @media (max-width: 768px) {
    .dc-layout { flex-direction: column; height: auto; min-height: 0; }
    .dc-guilds { width: 100%; height: 54px; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 6px 8px; gap: 5px; border-right: none; border-bottom: 1px solid var(--border); }
    .dc-guild-icon { width: 36px; height: 36px; flex-shrink: 0; font-size: 13px; }
    .dc-sidebar { width: 100%; max-height: 140px; border-right: none; border-bottom: 1px solid var(--border); }
    .dc-channels { display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 4px 8px; gap: 5px; }
    .dc-ch-header { display: none; }
    .dc-ch-item { white-space: nowrap; flex-shrink: 0; padding: 4px 10px; border-radius: 20px; background: var(--bg2); margin: 0; }
    .dc-main { min-height: 400px; }
    .dc-messages { max-height: 45vh; }
    .dc-guild-header, .dc-search-ch, .dc-guild-search, .dc-server-info { display: none !important; }
  }

.ap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
  .ap-stat { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 14px; text-align: center; }
  .ap-stat-val { font-size: 26px; font-weight: 800; color: var(--accent2); }
  .ap-stat-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }
  .ap-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
  .ap-tab { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--muted); cursor: pointer; font-size: 12px; transition: all .15s; }
  .ap-tab:hover { color: var(--text); }
  .ap-tab.active { background: var(--accent); color: white; border-color: var(--accent); }
  .ap-section { display: none; }
  .ap-section.active { display: block; }
  .ap-table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .ap-table th { text-align: left; padding: 6px 10px; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 11px; text-transform: uppercase; }
  .ap-table td { padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,.04); }
  .ap-table tr:hover td { background: rgba(255,255,255,.02); }
  .ap-badge { font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 700; }
  .ap-badge.gold { background: rgba(255,215,0,.15); color: #ffd700; }
  .ap-badge.green { background: rgba(87,242,135,.15); color: #57f287; }
  .ap-badge.red { background: rgba(255,80,80,.15); color: #ff5050; }
  .ap-badge.blue { background: rgba(88,101,242,.2); color: var(--accent2); }
  .ap-search { display: flex; gap: 8px; margin-bottom: 12px; }
  .ap-search input { flex: 1; padding: 7px 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 12px; }
  .ap-search input:focus { outline: none; border-color: var(--accent); }
  .ap-form { display: grid; gap: 10px; }
  .ap-form label { font-size: 11px; color: var(--muted); display: block; margin-bottom: 3px; }
  .ap-form input, .ap-form select, .ap-form textarea { width: 100%; padding: 7px 10px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 12px; }
  .ap-form input:focus, .ap-form select:focus, .ap-form textarea:focus { outline: none; border-color: var(--accent); }
  .ap-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
  .ap-card h4 { font-size: 13px; margin: 0 0 12px; color: var(--accent2); }
  .ap-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 12px; gap: 10px; }
  .ap-row:last-child { border-bottom: none; }
  .ap-row-label { color: var(--muted); flex-shrink: 0; }
  .ap-row-val { color: var(--text); font-weight: 600; text-align: right; word-break: break-all; }
  .ap-actions { display: flex; gap: 5px; flex-wrap: wrap; }