html { font-size: 15px; }
* { user-select: text; -webkit-user-select: text; }
button, nav, .btn, .kbd, th { user-select: none; -webkit-user-select: none; }
body { background: radial-gradient(1200px 600px at 80% -10%, rgba(225,29,46,.10), transparent 60%), var(--bg-0); overflow: auto; }
html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
.panel { background: var(--panel-2); }
button { font-family: inherit; color: inherit; cursor: pointer; }

/* Login */
#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.box { max-width: 28rem; padding: 2rem; }
.box p { color: var(--text-2); line-height: 1.55; margin-top: 1rem; }
.brand-lg { font-size: 2.2rem; line-height: 1; } .brand-lg span, .brand span { color: var(--red-hi); }

/* Layout */
#app { display: flex; min-height: 100vh; }
aside { width: 15rem; flex: none; padding: 1.4rem 1rem; border-right: 1px solid var(--line); background: rgba(10,10,13,.7); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { font-size: 1.6rem; padding: 0 .6rem 1.2rem; }
nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
nav a { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: var(--r-sm); border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .95rem; cursor: pointer; transition: var(--t); }
nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
nav a.on { color: var(--text); background: var(--red-dim); border-left-color: var(--red); }
.me { border-top: 1px solid var(--line); padding-top: 1rem; display: flex; flex-direction: column; gap: .6rem; font-size: .85rem; color: var(--text-2); word-break: break-word; }
main { flex: 1; min-width: 0; padding: 1.8rem 2.2rem 3rem; }
main header { margin-bottom: 1.4rem; } main h1 { font-size: 1.9rem; line-height: 1; } main header .bar { margin-top: .6rem; }

/* Controles */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; font-size: .85rem; font-weight: 600; background: rgba(255,255,255,.06); border: 1px solid var(--line-strong); border-radius: var(--r-sm); transition: var(--t); }
.btn:hover { background: rgba(255,255,255,.12); }
.btn.primary { background: var(--red); border-color: var(--red-hi); } .btn.primary:hover { background: var(--red-hi); box-shadow: 0 0 1rem var(--red-glow); }
.btn.danger { color: var(--red-hi); border-color: rgba(255,59,77,.4); } .btn.danger:hover { background: var(--red-dim); }
.btn.ghost { background: none; } .btn.sm { padding: .28rem .6rem; font-size: .78rem; }
input, select { background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--text); font-family: inherit; font-size: .92rem; padding: .5rem .7rem; outline: none; transition: var(--t); }
input:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-dim); }
select option { background: #15151a; }
.toolbar { display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; } .toolbar input { flex: 1; min-width: 14rem; }

/* Tarjetas / tablas */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .9rem; margin-bottom: 1.4rem; }
.card { padding: 1rem 1.1rem; } .card .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
.card .v { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.1; margin-top: .25rem; } .card .v small { font-size: 1rem; color: var(--text-3); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } @media (max-width: 1100px) { .two { grid-template-columns: 1fr; } }
.sect { padding: 1.1rem 1.2rem; margin-bottom: 1rem; } .sect h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: 1rem; margin-bottom: .8rem; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 600; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.tbl td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255,255,255,.025); }
.tblwrap { overflow-x: auto; } .tbl .acts { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.who { display: flex; align-items: center; gap: .6rem; } .who .nm { font-weight: 600; } .who .sub { font-size: .72rem; color: var(--text-3); }
.av { width: 1.9rem; height: 1.9rem; border-radius: 50%; object-fit: cover; background: var(--panel-solid); border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: var(--text-2); flex: none; }
.tag { display: inline-block; padding: .1rem .5rem; border-radius: 99px; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--line-strong); color: var(--text-2); }
.tag.red { color: var(--red-hi); border-color: rgba(255,59,77,.4); background: var(--red-dim); } .tag.ok { color: var(--ok); border-color: rgba(61,220,132,.35); }
.dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; }
.empty { padding: 2rem; text-align: center; color: var(--text-3); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; color: var(--text-2); }
.num { font-family: var(--font-display); font-weight: 700; }
.gangs { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .9rem; }
.gang { padding: 1rem 1.1rem; cursor: pointer; border-left: 3px solid var(--c, var(--red)); transition: var(--t); } .gang:hover { background: rgba(255,255,255,.05); transform: translateY(-2px); }
.gang .nm { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: .04em; } .gang .sub { color: var(--text-2); font-size: .85rem; margin-top: .2rem; }
.feed { display: flex; flex-direction: column; gap: .3rem; max-height: 34rem; overflow-y: auto; }
.ev { display: flex; gap: .7rem; align-items: baseline; padding: .4rem .5rem; border-radius: var(--r-sm); font-size: .88rem; } .ev:hover { background: rgba(255,255,255,.03); }
.ev time { color: var(--text-3); font-size: .72rem; width: 3.6rem; flex: none; }
.ev .kind { width: .5rem; height: .5rem; border-radius: 50%; flex: none; align-self: center; }
.k-join .kind { background: var(--ok); } .k-leave .kind { background: var(--text-3); } .k-kill .kind { background: var(--red); } .k-staff .kind { background: var(--warn); }
.annc { display: flex; gap: .6rem; } .annc input { flex: 1; }

/* Modal / avisos */
#modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 20; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dlg { width: 100%; max-width: 30rem; padding: 1.4rem; max-height: 90vh; overflow-y: auto; } .dlg h2 { font-size: 1.4rem; } .dlg .bar { margin: .5rem 0 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; } .field label { font-size: .75rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; } .field input, .field select { width: 100%; }
.actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
#toasts { position: fixed; right: 1.2rem; bottom: 1.2rem; display: flex; flex-direction: column; gap: .5rem; z-index: 30; }
.toast { padding: .7rem 1rem; border-radius: var(--r); background: var(--panel-solid); border: 1px solid var(--line-strong); border-left: 3px solid var(--ok); font-size: .88rem; animation: tIn .25s var(--ease); max-width: 22rem; }
.toast.err { border-left-color: var(--err); } @keyframes tIn { from { opacity: 0; transform: translateY(.6rem); } to { opacity: 1; transform: none; } }

@media (max-width: 800px) { #app { flex-direction: column; } aside { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem; } nav { flex-direction: row; flex-wrap: wrap; } .me { border: 0; padding: 0; flex-direction: row; align-items: center; } main { padding: 1.2rem 1rem 2rem; } }

.box .err { color: var(--red-hi); background: var(--red-dim); border: 1px solid rgba(255,59,77,.4); border-radius: var(--r-sm); padding: .6rem .8rem; font-size: .88rem; }
.btn.discord { margin-top: 1.4rem; padding: .7rem 1.2rem; font-size: .95rem; text-decoration: none; color: #fff; }
.me .who .av { width: 1.7rem; height: 1.7rem; }
