/* Palette of the RCG News portal (site/public_html/news/index.html): deep green-black, gold, RCG red, cream. */
:root {
  --bg: #070b0a; --bg2: #0d1613; --panel: #111c18; --panel2: #16241f; --line: #ffffff18; --line2: #ffffff2e;
  --gold: #d8b46b; --gold2: #f0cf86; --gold-soft: #d8b46b22; --red: #c51c26; --red2: #8e1016; --red-soft: #c51c2626;
  --txt: #f4f1e8; --muted: #b9b4a6; --dim: #8a877c; --green: #1f4a38; --green2: #2c6b51; --green-soft: #1f4a3866;
  --tg: #4fb3e8; --sms: #b3a6f2; --wa: #5fd08f; --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--txt); background: var(--bg);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(1200px 600px at 80% -10%, #1c3b2e55, transparent 60%), var(--bg); color: var(--txt); min-height: 100vh; }
[hidden] { display: none !important; }
h1 { font-size: 24px; margin: 0 0 4px; font-family: Georgia, "Times New Roman", serif; letter-spacing: .2px; }
h2 { font-size: 15px; margin: 0 0 12px; color: var(--gold2); font-weight: 600; letter-spacing: .3px; }
h3 { font-size: 14px; margin: 16px 0 8px; }
a { color: var(--gold2); }
.muted { color: var(--muted); font-size: 13px; }
.error { color: #ffb3b6; min-height: 1.2em; font-size: 14px; }

.btn { border: 1px solid var(--line2); background: var(--panel2); color: var(--txt); border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; }
.btn:hover { border-color: var(--gold); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #16130b; font-weight: 600; }
.btn.primary:hover { background: var(--gold2); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }

.brand { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 18px; color: var(--txt); }
.logo { background: linear-gradient(180deg, var(--red), var(--red2)); color: #fff; border-radius: 6px; padding: 2px 8px; letter-spacing: .5px; box-shadow: 0 0 0 1px #d8b46b55; }

.login { min-height: 100vh; display: grid; place-items: center; }
.login-card { background: var(--panel); border: 1px solid #d8b46b44; border-radius: 16px; padding: 30px; width: min(370px, 92vw); display: grid; gap: 14px; box-shadow: 0 20px 60px #0009; }
.login-card label, .form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg2); color: var(--txt); }
input:focus, select:focus, textarea:focus { outline: 2px solid #d8b46b88; outline-offset: 1px; }
textarea { resize: vertical; min-height: 64px; width: 100%; }

.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.side { background: #070b0acc; border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
#nav { display: grid; gap: 2px; }
#nav a { color: var(--muted); text-decoration: none; padding: 9px 10px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
#nav a:hover { background: var(--panel); color: var(--txt); }
#nav a.on { background: var(--panel2); color: var(--gold2); font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
#nav .soon-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--gold); border: 1px solid #d8b46b66; border-radius: 999px; padding: 0 6px; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.side-foot .muted { color: var(--dim); }
.switch { font-size: 13px; display: flex; gap: 6px; align-items: center; color: var(--muted); }
.switch input { accent-color: var(--gold); }
.badge { background: var(--red); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; font-weight: 700; }

main { padding: 26px 30px 60px; min-width: 0; }
.test-banner { background: var(--gold-soft); color: var(--gold2); border: 1px solid #d8b46b55; border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600; margin-bottom: 14px; display: inline-block; letter-spacing: .4px; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .n { font-size: 30px; font-weight: 700; margin-top: 4px; font-family: Georgia, serif; }
.kpi.alert { border-color: #c51c2688; background: linear-gradient(180deg, #c51c2622, var(--panel)); }
.kpi.alert .n { color: #ffb3b6; }
.kpi .sub { font-size: 12px; color: var(--dim); margin-top: 2px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--dim); font-weight: 600; padding: 10px; border-bottom: 1px solid var(--line2); text-transform: uppercase; letter-spacing: .4px; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--panel2); }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #ffffff12; color: var(--txt); margin: 0 4px 4px 0; white-space: nowrap; }
.chip.tg { background: #4fb3e822; color: var(--tg); } .chip.sms { background: #b3a6f222; color: var(--sms); } .chip.whatsapp { background: #5fd08f22; color: var(--wa); }
.chip.mail { background: #f2c66d22; color: var(--gold2); }
.chip.off { text-decoration: line-through; opacity: .5; }
.chip.esc { background: var(--red-soft); color: #ffb3b6; font-weight: 600; }
.chip.pause { background: var(--red-soft); color: #ffb3b6; }
.chip.ok { background: var(--green-soft); color: #9fe0bf; }
.chip.test { background: var(--gold-soft); color: var(--gold2); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { min-width: 260px; }
.filters button { border-radius: 999px; }
.filters button.on { background: var(--gold); border-color: var(--gold); color: #16130b; font-weight: 600; }

.esc-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.esc-item:last-child { border-bottom: 0; }
.esc-item .reason { font-weight: 600; margin-top: 2px; }
.esc-item .last { color: var(--muted); font-size: 14px; margin-top: 4px; font-style: italic; }
.empty { color: var(--muted); padding: 24px; text-align: center; }

.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(580px, 100vw); background: var(--bg2); border-left: 1px solid #d8b46b44; box-shadow: -20px 0 50px #000a; overflow-y: auto; padding: 20px 22px 40px; z-index: 10; }
.drawer .close { float: right; }
dl.facts { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14px; margin: 12px 0; }
dl.facts dt { color: var(--dim); }
dl.facts dd { margin: 0; }

.chat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; }
.msg { max-width: 82%; padding: 8px 11px; border-radius: 12px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.msg .t { display: block; font-size: 11px; color: var(--dim); margin-top: 3px; }
.msg.client { background: var(--panel2); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.bot { background: var(--green); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.bot .t { color: #b6d6c6; }
.msg.human { background: #3a2f17; border: 1px solid #d8b46b55; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.human .t { color: var(--gold); }
.conv-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 8px; }
.reply { display: grid; gap: 8px; margin-top: 10px; }
.reply .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.alertbox { background: var(--red-soft); border: 1px solid #c51c2688; color: #ffd6d8; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }

.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 150px 1fr 40px; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.bar b { color: var(--txt); }
.bar .track { display: block; background: #ffffff10; border-radius: 4px; height: 12px; overflow: hidden; }
.bar .fill { display: block; background: linear-gradient(90deg, var(--gold), var(--gold2)); height: 100%; width: 0; }

.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.form .full { grid-column: 1 / -1; }
.pad { padding: 12px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--gold); color: var(--txt); padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 20; box-shadow: 0 10px 30px #0009; }

/* Próximamente */
.soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.soon { position: relative; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px dashed #d8b46b66; border-radius: var(--radius); padding: 18px; }
.soon .ribbon { display: inline-block; margin-bottom: 10px; font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: #16130b; background: var(--gold); border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.soon h3 { margin: 0 0 6px; font-size: 16px; color: var(--txt); }
.soon p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.soon .when { font-size: 12px; color: var(--gold); }
.soon .preview { margin-top: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.soon .preview b { color: var(--txt); }
.soon .preview .tgline { display: flex; gap: 8px; align-items: flex-start; }
.soon .preview .dot { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, var(--red), var(--red2)); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.soon-hint { background: var(--gold-soft); border: 1px solid #d8b46b44; border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--gold2); margin-bottom: 16px; }

@media (min-width: 761px) and (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; }
  #nav { display: flex; flex-wrap: wrap; }
  .side-foot { margin: 0; display: flex; flex-wrap: wrap; align-items: center; }
  main { padding: 16px; }
  dl.facts { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 100px 1fr 32px; }
}

/* Agenda */
.week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; }
.day { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 13px; min-height: 120px; }
.day.today { border-color: var(--gold); box-shadow: inset 0 2px 0 var(--gold); }
.day .dname { font-weight: 600; margin-bottom: 6px; color: var(--gold2); }
.day .game { margin: 4px 0; color: var(--txt); line-height: 1.3; }
.day .game .h { color: var(--gold); font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .week { grid-template-columns: repeat(7, 150px); } }

/* Mensaje semanal */
.lines { display: grid; gap: 8px; }
.line { display: grid; grid-template-columns: 150px 44px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.line.ok { border-color: #2c6b5199; }
.line input { width: 100%; }
.line .k { font-size: 13px; color: var(--gold2); }
.line .acts { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.phone { background: var(--bg); border: 1px solid var(--line2); border-radius: 14px; padding: 12px; font-size: 13px; white-space: pre-wrap; line-height: 1.45; min-height: 80px; }
.phone.sms { border-color: #b3a6f255; } .phone.telegram { border-color: #4fb3e855; }
.prev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.switchbig { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.state-on { color: #9fe0bf; font-weight: 700; } .state-off { color: #ffb3b6; font-weight: 700; }
@media (max-width: 800px) { .line { grid-template-columns: 1fr; } }

/* Respuestas rápidas */
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.quick .muted { width: 100%; font-size: 12px; }
.quick .btn { border-radius: 999px; }

/* Barra superior: solo en celular */
.mobile-top { display: none; }
.more summary { cursor: pointer; list-style: none; color: var(--gold2); font-size: 14px; padding: 6px 10px; border: 1px solid var(--line2); border-radius: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more[open] #more-body { position: absolute; right: 12px; top: 54px; background: var(--panel); border: 1px solid #d8b46b44; border-radius: 12px; padding: 14px; z-index: 30; box-shadow: 0 12px 40px #000c; min-width: 240px; }

/* Celular */
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; padding: 0; gap: 0; z-index: 20; border-right: 0; border-top: 1px solid #d8b46b44; background: #070b0af2; backdrop-filter: blur(6px); }
  .side > .brand { display: none; }
  #nav { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 0; scrollbar-width: none; padding-bottom: env(safe-area-inset-bottom); }
  #nav::-webkit-scrollbar { display: none; }
  #nav a { flex: 0 0 auto; flex-direction: column; justify-content: center; font-size: 12px; padding: 10px 12px; border-radius: 0; min-height: 52px; white-space: nowrap; }
  #nav a.on { box-shadow: inset 0 3px 0 var(--gold); }
  #nav .soon-tag { display: none; }
  main { padding: 0 14px 90px; }
  .mobile-top { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 15; margin: 0 -14px 14px; padding: 10px 14px; background: #070b0af2; border-bottom: 1px solid var(--line); }
  h1 { font-size: 21px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi { padding: 12px; } .kpi .n { font-size: 26px; }
  .toolbar input[type=search] { min-width: 0; width: 100%; }
  .filters { display: flex; overflow-x: auto; gap: 6px; flex-wrap: nowrap; }
  .filters button { flex: 0 0 auto; }
  .esc-item { grid-template-columns: 1fr; }
  .esc-item .btn { width: 100%; padding: 10px; }
  /* Jugadores: cada fila es una tarjeta */
  .table-wrap { background: transparent; border: 0; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap thead { display: none; }
  .table-wrap tr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 4px; }
  .table-wrap td { border: 0; padding: 4px 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; }
  .table-wrap td br { display: none; }
  .table-wrap td:first-child { display: block; font-size: 15px; }
  .table-wrap td:nth-child(2)::before { content: "Canales"; } .table-wrap td:nth-child(3)::before { content: "Intereses"; }
  .table-wrap td:nth-child(4)::before { content: "Origen"; } .table-wrap td:nth-child(5)::before { content: "Sala"; }
  .table-wrap td:nth-child(6)::before { content: "Último"; }
  .table-wrap td::before { color: var(--dim); font-size: 12px; flex: 0 0 84px; }
  .drawer { width: 100vw; padding: 14px 14px 100px; border-left: 0; z-index: 25; }
  .drawer .close { position: sticky; top: 0; z-index: 2; background: var(--bg2); }
  dl.facts { grid-template-columns: 96px 1fr; }
  .chat { max-height: 52vh; }
  .msg { max-width: 92%; }
  .reply textarea { min-height: 90px; font-size: 16px; }
  .reply .row { flex-direction: column; align-items: stretch; }
  .reply .row > span:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
  .reply .btn.primary { flex: 1; padding: 10px; }
  input, select, textarea { font-size: 16px; }
}
@media (max-width: 760px) { .bar { grid-template-columns: 100px 1fr 32px; } .line { grid-template-columns: 1fr; } }
.open-banner { background: var(--red-soft); color: #ffd6d8; border: 1px solid #c51c2688; border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600; margin: 0 8px 14px 0; display: inline-block; letter-spacing: .3px; }
.today { list-style: none; margin: 0; padding: 0; }
.today li { padding: 6px 0; border-bottom: 1px solid #ffffff10; }
.today li:last-child { border-bottom: 0; }

/* Recorrido demo */
.seg { display: flex; gap: 6px; }
.tour-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; overflow-x: auto; }
.tour-steps button { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; font: inherit; cursor: pointer; white-space: nowrap; }
.tour-steps button.done { border-color: var(--green2); color: var(--txt); }
.tour-steps button.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold2); }
.tour { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tour-title { font-size: 20px; font-family: Georgia, serif; color: var(--txt); margin: 6px 0 10px; }
.tour-text p { line-height: 1.55; }
.tour-phone { min-height: 180px; font-size: 14px; }
.tour-nav { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
@media (max-width: 760px) { .tour { grid-template-columns: 1fr; } }
