/* Renegade OS · interfaz (brandbook renegademakers v1.0: Tinta, Papel, Lima, Inter; tema claro) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #0D0E0C; --ink2: #1A1B18; --ink3: #2A2B27;
  --paper: #F1F1EC; --paper2: #E4E4DD; --white: #FFFFFF;
  --graphite: #3E413B; --grey: #5B5E57; --stone: #B4B6AD;
  --lime: #C8FF2B; --lime-dark: #3D5E00; --signal: #C0392B;
  --r-s: 6px; --r-m: 16px; --pill: 999px;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --side: 256px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); font-feature-settings: "cv11", "ss01"; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
small, .muted { color: var(--grey); }
code, .mono { font-family: var(--mono); font-size: .9em; }
.ic { flex: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--white); display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: -.02em; padding: 4px 8px 14px; }
.brand img { width: 30px; height: 30px; }
.brand b { font-weight: 800; }
.brand span { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--grey); margin-left: auto; }
.ws-switch { margin: 0 0 10px; }
.ws-switch select, .ws-switch .ws-one { width: 100%; font: inherit; font-weight: 650; padding: 9px 12px; border-radius: var(--r-s); background: var(--paper); border: 0; color: var(--ink); appearance: none; }
.ws-switch select { cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-s); text-decoration: none; font-weight: 550; color: var(--graphite); }
.nav a .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a.on { background: var(--ink); color: var(--white); }
.nav a.on .dot { background: var(--lime); color: var(--ink); }
.nav a .tag { margin-left: auto; }
.nav a.locked { color: var(--grey); }
.nav a.on.locked { color: var(--white); }
.side-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.side-foot form { margin: 0; }
.side-foot button { width: 100%; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 18px 36px; }
.top .menu-btn { display: none; }
.top h1 { margin: 0; font-size: 22px; }
.top .who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--graphite); text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--lime); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.content { padding: 4px 36px 56px; max-width: 1240px; width: 100%; }

/* ---------- Avisos ---------- */
.notice { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--r-m); margin: 0 0 20px; background: var(--white); }
.notice p { margin: 0; }
.notice .grow { flex: 1; }
.notice.ok { background: var(--ink); color: var(--white); }
.notice.ok .ic { color: var(--lime); }
.notice.err { background: #F6DCD8; color: #5c1a12; }
.notice.trial { background: var(--lime); color: var(--ink); }
.notice.warn { background: var(--paper2); }

/* ---------- Tarjetas y rejillas ---------- */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--white); border-radius: var(--r-m); padding: 22px; min-width: 0; }
.card.ink { background: var(--ink); color: var(--white); }
.card.ink .muted, .card.ink small { color: var(--stone); }
.card.flat { background: transparent; padding: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .end { margin-left: auto; }
.section { margin: 34px 0 14px; display: flex; align-items: end; gap: 12px; }
.section h2 { margin: 0; }
.section .end { margin-left: auto; }
.kicker { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lime-dark); margin: 0 0 8px; }
.card.ink .kicker { color: var(--lime); }
.big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat .muted { font-size: 13px; }

/* App tiles */
.app-tile { display: flex; flex-direction: column; gap: 12px; text-decoration: none; transition: transform .15s; }
.app-tile:hover { transform: translateY(-2px); }
.app-ico { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--lime); display: grid; place-items: center; }
.app-tile.locked .app-ico { background: var(--paper); color: var(--ink); }
.app-tile h3 { margin: 0; }
.app-tile p { margin: 0; color: var(--graphite); font-size: 14px; }
.app-tile .foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 6px; font-size: 13px; }

/* Pasos de inicio */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r-m); background: var(--white); text-decoration: none; }
.step .n { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--paper); }
.step.done .n { background: var(--lime); }
.step b { display: block; font-size: 14px; }
.step span { font-size: 13px; color: var(--grey); }
.step.done b { text-decoration: line-through; text-decoration-thickness: 2px; }

/* Uso / medidores */
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter .row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.meter .row b { font-weight: 650; }
.bar { height: 8px; border-radius: var(--pill); background: var(--paper); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: var(--pill); }
.bar.full i { background: var(--signal); }

/* Etiquetas (JetBrains Mono, mayúsculas, contorno 1,5 px) */
.tag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--pill); border: 1.5px solid currentColor; white-space: nowrap; line-height: 1.3; }
.tag.fill { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.tag.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.tag.soft { border-color: var(--stone); color: var(--graphite); }
.tag.bad { color: var(--signal); }
.nav a.on .tag { color: var(--lime); }

/* Botones (principal: píldora Tinta con texto Lima; verbo primero) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 14.5px; padding: 10px 18px; border-radius: var(--pill); border: 2px solid var(--ink); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--paper); }
.btn.primary { background: var(--ink); color: var(--lime); }
.btn.primary:hover { background: var(--ink3); }
.btn.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.card.ink .btn { border-color: var(--white); color: var(--white); }
.card.ink .btn.lime { border-color: var(--lime); color: var(--ink); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.ghost { border-color: transparent; }
.btn.danger { border-color: var(--signal); color: var(--signal); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: inherit; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Formularios */
form { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .label { font-weight: 650; font-size: 14px; }
.field small { font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=search], select, textarea {
  font: inherit; color: var(--ink); width: 100%; padding: 11px 13px; border-radius: var(--r-s); border: 1.5px solid var(--stone); background: var(--white);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(200, 255, 43, .55); }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 12px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input, .inline select { width: auto; }

/* Tablas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); padding: 10px 12px; border-bottom: 1.5px solid var(--paper2); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--paper); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.yes { color: var(--ink); }
.no { color: var(--stone); }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; gap: 12px; }
.plan.hl { background: var(--ink); color: var(--white); }
.plan.hl .muted, .plan.hl small { color: var(--stone); }
.plan.hl .btn.primary { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.plan.hl .btn { border-color: var(--white); color: var(--white); }
.plan .price { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.plan .price.tbd { font-size: 15px; font-weight: 650; color: var(--grey); }
.plan.hl .price.tbd { color: var(--stone); }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li .ic { margin-top: 2px; }
.plan li.off { color: var(--stone); }
.plan .cta { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

/* Código de emparejado */
.pair-code { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: .06em; background: var(--ink); color: var(--lime); padding: 16px 20px; border-radius: var(--r-m); display: inline-block; user-select: all; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: var(--mono); font-size: 13px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: 8px 14px; border-radius: var(--pill); text-decoration: none; font-weight: 650; font-size: 14px; background: var(--white); }
.tabs a.on { background: var(--ink); color: var(--lime); }
ol.howto { padding-left: 20px; margin: 0 0 16px; }
ol.howto li { margin-bottom: 8px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.products > p { grid-column: 1 / -1; margin: 0; }
.product { background: var(--paper); border-radius: var(--r-s); padding: 10px; font-size: 13px; }
.product .img { aspect-ratio: 1; border-radius: 4px; background: var(--white) center/contain no-repeat; margin-bottom: 8px; }
.product b { display: block; font-weight: 650; line-height: 1.3; margin-bottom: 4px; }

details.confirm summary { list-style: none; cursor: pointer; }
details.confirm summary::-webkit-details-marker { display: none; }
details.confirm[open] summary { display: none; }
details.confirm .ask { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.empty { text-align: center; padding: 34px 20px; color: var(--graphite); }
.empty .app-ico { margin: 0 auto 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 14px; margin: 0; }
.kv dt { color: var(--grey); }
.kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--paper); font-size: 14px; }
.feed li:last-child { border-bottom: 0; }
.feed time { color: var(--grey); font-size: 12.5px; white-space: nowrap; margin-left: auto; }

/* ---------- Páginas de acceso (cuadrícula de taller sobre Papel) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--paper); }
.auth-side { background: var(--ink); color: var(--white); padding: 48px; display: flex; flex-direction: column; gap: 22px; position: relative; overflow: hidden; }
.auth-side .brand { color: var(--white); padding: 0; }
.auth-side h2 { font-size: clamp(34px, 4.2vw, 56px); font-weight: 850; letter-spacing: -.035em; line-height: 1; margin-top: auto; }
.auth-side h2 mark { background: var(--lime); color: var(--ink); padding: 0 .12em; }
.auth-side p { color: var(--stone); max-width: 440px; font-size: 16px; }
.auth-side .ribbon { position: absolute; right: -30px; top: 70px; background: var(--lime); color: var(--ink); font-weight: 900; padding: 8px 60px; transform: rotate(-3deg); font-size: 15px; letter-spacing: -.01em; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.auth-side li { display: flex; gap: 10px; align-items: center; color: var(--paper); }
.auth-side li .ic { color: var(--lime); }
.auth-main { display: grid; place-items: center; padding: 40px 24px;
  background-image: linear-gradient(rgba(13, 14, 12, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(13, 14, 12, .055) 1px, transparent 1px); background-size: 58px 58px; }
.auth-box { width: 100%; max-width: 430px; background: var(--white); border-radius: var(--r-m); padding: 32px; }
.auth-box h1 { font-size: 26px; }
.auth-box .alt { text-align: center; margin-top: 18px; font-size: 14px; }
.hp { position: absolute; left: -9999px; }
.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

/* ---------- Admin ---------- */
.admin .side { background: var(--ink); color: var(--white); }
.admin .brand { color: var(--white); }
.admin .nav a { color: var(--stone); }
.admin .nav a .dot { background: var(--ink3); color: var(--paper); }
.admin .nav a:hover { background: var(--ink2); color: var(--white); }
.admin .nav a.on { background: var(--lime); color: var(--ink); }
.admin .nav a.on .dot { background: var(--ink); color: var(--lime); }
.admin .nav-label { color: var(--stone); }
.admin .ws-switch .ws-one { background: var(--ink2); color: var(--white); }
.admin .side-foot .btn { border-color: var(--ink3); color: var(--paper); }

/* ---------- Móvil ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; left: 0; top: 0; width: 86vw; max-width: 300px; transform: translateX(-105%); transition: transform .2s; }
  body.menu-open .side { transform: none; box-shadow: 8px 0 0 rgba(13, 14, 12, .12); }
  .top { padding: 14px 18px; }
  .top .menu-btn { display: inline-flex; }
  .top .who span:not(.avatar) { display: none; }
  .content { padding: 4px 18px 40px; }
  .g2, .g3, .g4, .row2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 22px; }
  .auth-side h2 { font-size: 34px; margin-top: 12px; }
  .auth-side ul, .auth-side .ribbon { display: none; }
  h1 { font-size: 24px; }
}
