@import url("../styles.css");

body.panel { min-height: 100vh; }
/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.login-wrap::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(600px 320px at 50% 0%, rgba(255, 61, 154, .2), transparent 70%);
}
.login { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.login .logo { justify-content: center; margin-bottom: 6px; }
.login h1 { font-size: 22px; text-align: center; margin: 14px 0 4px; }
.login p.sub { text-align: center; color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
label.f { display: block; font-size: 13.5px; font-weight: 600; color: #c9cfdd; margin: 14px 0 6px; }
.in {
  width: 100%; background: #0f1219; border: 1px solid var(--line); color: var(--text); border-radius: 10px;
  padding: 11px 12px; font: inherit; font-size: 15px; outline: none; transition: .15s;
}
.in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 61, 154, .18); }
select.in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.login .btn { width: 100%; margin-top: 20px; }
.msg { margin-top: 14px; font-size: 14px; padding: 10px 12px; border-radius: 10px; display: none; }
.msg.err { display: block; background: rgba(255, 77, 77, .1); border: 1px solid rgba(255, 77, 77, .35); color: #ffb3b3; }
.msg.ok { display: block; background: rgba(61, 220, 132, .1); border: 1px solid rgba(61, 220, 132, .35); color: #a6f0c6; }
.link { color: var(--brand); font-weight: 600; font-size: 14px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.login .bottom { display: flex; justify-content: space-between; margin-top: 16px; font-size: 14px; color: var(--muted); }
.demo-banner { background: rgba(255, 196, 0, .1); border: 1px solid rgba(255, 196, 0, .35); color: #ffe08a; font-size: 13.5px; padding: 9px 12px; border-radius: 10px; margin-bottom: 14px; }

/* ---------- app ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .logo { padding: 4px 8px 16px; }
.side .srv { margin: 0 8px 14px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; color: var(--muted); }
.side .srv b { display: block; color: var(--text); font-size: 14.5px; }
.tab {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #b8c0d2; font-weight: 600;
  font-size: 14.5px; background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit; width: 100%;
}
.tab:hover { background: var(--card); color: var(--text); }
.tab.on { background: rgba(255, 61, 154, .12); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.tab .n { margin-left: auto; font-size: 12px; background: var(--card2); color: var(--muted); padding: 1px 8px; border-radius: 99px; }
.side .grow { flex: 1; }
.main { padding: 26px 30px 50px; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.top h1 { font-size: 24px; letter-spacing: -.3px; }
.top .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; border: 1px solid var(--line); background: var(--card); }
.pill .d { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.on .d { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 132, .2); }
.pill.off .d { background: var(--enemy); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.kpi small { color: var(--muted); font-weight: 600; font-size: 13px; }
.kpi div { font-size: 26px; font-weight: 800; margin-top: 4px; }
.panelbox { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.panelbox h2 { font-size: 16.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.panelbox h2 .cnt { color: var(--muted); font-weight: 600; font-size: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.addrow { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.addrow .in { flex: 1; min-width: 140px; }
.list { display: grid; gap: 6px; max-height: 460px; overflow: auto; }
.item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #11151e; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; }
.item .nm { font-weight: 700; }
.item .nt { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .x { margin-left: auto; background: none; border: 0; color: #8790a3; cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.item .x:hover { color: var(--enemy); background: rgba(255, 77, 77, .1); }
.empty { color: var(--muted); font-size: 14px; padding: 10px 2px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.t td { padding: 9px 10px; border-bottom: 1px solid #1d2230; }
.tag2 { font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.tag2.ENEMY { background: rgba(255, 77, 77, .14); color: #ff8080; }
.tag2.FRIEND { background: rgba(61, 220, 132, .14); color: #7fe7ad; }
.tag2.HUNTED { background: rgba(255, 140, 0, .14); color: #ffb35c; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.help { color: var(--muted); font-size: 13px; margin-top: 4px; }
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.subtabs button { background: var(--card); border: 1px solid var(--line); color: #b8c0d2; padding: 8px 14px; border-radius: 10px; font-weight: 700; cursor: pointer; font-family: inherit; }
.subtabs button.on { border-color: var(--brand); color: #fff; background: rgba(255, 61, 154, .12); }
.toast { position: fixed; bottom: 22px; right: 22px; background: #1d2333; border: 1px solid #343c52; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14.5px; opacity: 0; transform: translateY(10px); transition: .25s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: none; }
.mtop { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: .25s; }
  .side.open { transform: none; box-shadow: var(--shadow); }
  .mtop { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); position: sticky; top: 0; z-index: 20; }
  .mtop button { background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; }
  .main { padding: 18px 16px 40px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .two, .form-grid { grid-template-columns: 1fr; }
}

/* que nada se salga por los lados */
.two > *, .panelbox, .kpi, .main { min-width: 0; }
.item { min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.item .nm { white-space: nowrap; }
@media (max-width: 900px) {
  .kpi div { font-size: 21px; }
  .item .nt[style*="margin-left:auto"] { margin-left: 0 !important; }
}

/* ---------- v2: funciones tipo x3tbot ---------- */
section.vista { padding: 0; }
.tabs { display: flex; flex-direction: column; gap: 4px; }
.side { overflow-y: auto; }
.srv select.in { margin-top: 6px; padding: 8px 30px 8px 10px; font-size: 14px; font-weight: 700; }
.in.num { flex: 0 0 104px; min-width: 0; }
textarea.in { resize: vertical; min-height: 120px; line-height: 1.45; }
.tools { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.tools .in { max-width: 320px; }
.tscroll { overflow: auto; max-height: 560px; }
.t td .x { margin: 0; }
.t .nota { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t.mini td { padding: 6px 8px; font-size: 13.5px; }
.t code { font-size: 13px; color: #d7dcef; background: #11151e; border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #4a5266; vertical-align: middle; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 132, .18); }
.up { color: var(--ok); font-weight: 700; } .down { color: var(--enemy); font-weight: 700; }
.subtabs .n { font-size: 12px; color: var(--muted); margin-left: 4px; }
.lgrid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.lgrid > * { min-width: 0; }
/* guilds con miembros */
.gitem { background: #11151e; border: 1px solid var(--line); border-radius: 10px; }
.gitem summary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; list-style: none; flex-wrap: wrap; row-gap: 2px; font-size: 14.5px; }
.gitem summary::-webkit-details-marker { display: none; }
.gitem summary::before { content: "▸"; color: var(--muted); transition: .15s; }
.gitem[open] summary::before { transform: rotate(90deg); }
.gitem .nm { font-weight: 700; }
.gitem .nt { color: var(--muted); font-size: 13px; }
.gitem .badge-on { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #c9cfdd; }
.gitem .x { margin-left: auto; background: none; border: 0; color: #8790a3; cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.gitem .x:hover { color: var(--enemy); background: rgba(255, 77, 77, .1); }
.gitem > .tscroll, .gitem > .empty { border-top: 1px solid var(--line); padding: 6px 10px 10px; max-height: 320px; }
/* plan / cuenta regresiva */
.plancard { border-radius: 14px; padding: 18px; margin-bottom: 18px; color: #fff; border: 1px solid transparent; text-align: center; }
.plancard small { font-weight: 700; opacity: .9; font-size: 13.5px; }
.plancard .cd { font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; margin: 4px 0; }
.plancard .cd span { font-size: 18px; font-weight: 700; letter-spacing: 0; opacity: .9; }
.plancard .vence { font-size: 13.5px; opacity: .9; margin-bottom: 12px; }
.plancard .btn { background: rgba(0, 0, 0, .25); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.plancard .btn:hover { background: rgba(0, 0, 0, .4); }
.plancard.ok { background: linear-gradient(135deg, #12804a, #1fae64); }
.plancard.warn { background: linear-gradient(135deg, #a86a00, #d99a12); }
.plancard.bad { background: linear-gradient(135deg, #9b1c2c, #d1344a); }
.planes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.planopt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #11151e; color: var(--text); text-decoration: none; transition: .15s; }
.planopt:hover { border-color: #3a4256; transform: translateY(-2px); }
.planopt.top { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 61, 154, .12); }
.planopt b { font-size: 16px; }
.planopt .precio { font-size: 30px; font-weight: 800; }
.planopt .precio small { font-size: 13px; color: var(--muted); font-weight: 600; }
.planopt .pop { position: absolute; top: -10px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.planopt .btn { width: 100%; }
/* avisos */
.avgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.avgrid .panelbox { margin-bottom: 0; }
.avgrid ~ .panelbox { margin-top: 18px; }
.avcard label.f { margin-top: 10px; }
.avcard h2 { font-size: 15px; flex-wrap: wrap; }
.colorrow { display: flex; align-items: center; gap: 10px; }
.colorrow input[type=color] { width: 44px; height: 36px; border: 1px solid var(--line); background: #0f1219; border-radius: 8px; padding: 3px; cursor: pointer; }
.colorrow .muestra { font-weight: 700; font-size: 13.5px; background: #fff; padding: 4px 8px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag2.ALLY { background: rgba(61, 220, 132, .14); color: #7fe7ad; }
.tag2.NEUTRAL { background: rgba(192, 198, 212, .14); color: #c9cfdd; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14.5px; cursor: pointer; }
.chk input { width: 17px; height: 17px; accent-color: var(--brand); }
.chks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; margin-top: 12px; }
.cmds { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: #c9cfdd; background: #11151e; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 1100px) { .lgrid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .planes { grid-template-columns: 1fr; }
  .plancard .cd { font-size: 34px; }
  .tools .in { max-width: none; }
  .in.num { flex: 1 1 100px; }
}
[hidden] { display: none !important; }
@media (min-width: 901px) { .app { background: linear-gradient(to right, var(--bg2) 250px, transparent 250px); } }
.gform .in[name=nombre], .gform .in[name=url] { flex: 1 1 42%; }
.gform .in.num { flex: 1 1 90px; }
.avgrid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.t .x { background: none; border: 0; color: #8790a3; cursor: pointer; font-size: 17px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.t .x:hover { color: var(--enemy); background: rgba(255, 77, 77, .1); }
@media (max-width: 600px) { #t-pj th:nth-child(6), #t-pj td:nth-child(6) { display: none; } }
.muted{color:var(--muted,#8b93a7);font-size:.9em}
.fila-btn{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px}
