:root { --ink: #17181C; --ink2: #3D3B37; --muted: #5C5A55; --ground: #F4F3EF; --card: #FFFFFF; --line: #E2E0D9; --line2: #EEECE6; --lime: #D7F36B; --green: #1E6B3A; --red: #A3122B; }
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--ink); background: var(--ground); line-height: 1.45; }
h1, h2, h3 { margin: 0; letter-spacing: -.3px; }
h1 { font-size: 28px; font-weight: 800; } h2 { font-size: 19px; font-weight: 800; } h3 { font-size: 16px; font-weight: 800; }
a { color: #1F5C4A; } a:hover { color: #123B30; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 13px; } .strong { font-weight: 700; } .mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
:focus-visible { outline: 3px solid #8FB3FF; outline-offset: 2px; }
input, select, textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #D8D6CF; border-radius: 12px; background: #fff; color: var(--ink); min-height: 44px; width: 100%; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--ink); }
input[type=color] { padding: 4px; }
label { display: grid; gap: 5px; font-weight: 700; font-size: 14px; }
.btn { font: inherit; font-weight: 700; font-size: 14px; border: 1px solid transparent; border-radius: 12px; padding: 0 16px; min-height: 44px; cursor: pointer; background: #EDEBE5; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn.dark { background: var(--ink); color: #fff; } .btn.dark:hover { color: #fff; filter: brightness(1.15); }
.btn.lime { background: var(--lime); color: var(--ink); }
.btn.ghost { background: #fff; border-color: #D8D6CF; }
.btn.danger { background: #fff; color: var(--red); border-color: #E8B4BC; }
.btn.sm { min-height: 38px; font-size: 13px; padding: 0 12px; border-radius: 10px; }
.btn[disabled] { opacity: .6; cursor: wait; }
.link { background: none; border: 0; font: inherit; font-weight: 700; color: #1F5C4A; cursor: pointer; text-decoration: underline; min-height: 44px; padding: 0 4px; }
.link.light { color: #E9E7E1; }
.err { color: var(--red); font-weight: 700; margin: 0; }
.mark { width: 40px; height: 40px; border-radius: 12px; background: var(--lime); color: var(--ink); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mark.big { width: 64px; height: 64px; font-size: 24px; border-radius: 18px; margin: 0 auto; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { background: #fff; border-radius: 24px; padding: 32px 24px; width: min(420px, 100%); display: grid; gap: 14px; box-shadow: 0 20px 50px rgba(23,24,28,.08); text-align: left; }
.login-box h1, .login-box p.muted { text-align: center; margin: 0; }

/* admin */
.admin { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 240px; background: var(--ink); color: #E9E7E1; padding: 22px 16px; display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 900px) { .side { flex: 0 0 250px; position: sticky; top: 0; height: 100vh; } }
.brand, .me { display: flex; align-items: center; gap: 12px; }
.brand span:last-child, .me span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.25; }
.brand small, .me small { color: #A9A7A0; font-size: 12px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav button, .side-nav a { font: inherit; font-weight: 600; font-size: 15px; text-align: left; color: #E9E7E1; background: none; border: 0; border-radius: 10px; padding: 10px 12px; min-height: 44px; cursor: pointer; text-decoration: none; display: flex; align-items: center; }
.side-nav button:hover, .side-nav a:hover { background: #23252B; color: #fff; }
.side-nav button.on { background: var(--lime); color: var(--ink); }
.side-h { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #8D8B84; padding: 14px 12px 4px; }
.me { margin-top: auto; background: #23252B; padding: 10px 12px; border-radius: 12px; flex-wrap: wrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #3A3D45; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.main { flex: 999 1 640px; min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 56px; display: flex; flex-direction: column; gap: 22px; }
.top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.top p { margin: 4px 0 0; }
.top-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.search input { width: 240px; max-width: 100%; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: #fff; border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi span { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi b { font-size: 32px; font-weight: 800; line-height: 1.1; }
.kpi.hl { background: var(--lime); } .kpi.hl span { color: #2E3A0B; font-weight: 700; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cols > .grow { flex: 999 1 560px; }
.side-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.card { background: #fff; border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.dark-card { background: var(--ink); color: #E9E7E1; } .dark-card h2 { color: #fff; } .dark-card .muted { color: #A9A7A0; }
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.ok-dot { color: var(--lime); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.ok-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.bad-dot { color: #FF9AA8; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 680px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; padding: 10px 8px; font-weight: 700; }
.tbl td { padding: 14px 8px; border-top: 1px solid var(--line2); vertical-align: middle; }
.biz { display: flex; align-items: center; gap: 12px; }
.biz-mark { width: 40px; height: 40px; border-radius: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.biz small { display: block; color: var(--muted); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #F1F0EC; color: #6B6963; }
.chip.on { background: #E6F4EA; color: var(--green); }
.st { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st.online { color: var(--green); } .st.en_construccion { color: #8A5A00; } .st.pausado { color: #6B6963; }
.acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.add-row { width: 100%; font: inherit; font-weight: 700; color: var(--muted); background: none; border: 2px dashed #D8D6CF; border-radius: 12px; min-height: 56px; cursor: pointer; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.mini { background: #F7F6F2; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 3px; }
.mini span:first-child { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.mini b { font-size: 16px; }
.mini span:last-child { font-size: 13px; color: var(--muted); }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tasks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.tasks li.done span { text-decoration: line-through; color: var(--muted); }
.tasks small { display: block; color: var(--muted); }
.tasks .x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; min-width: 32px; min-height: 32px; }
.task-add { display: flex; gap: 8px; }
.form { gap: 14px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; } .grid3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } }
.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.checks legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
details summary { cursor: pointer; font-weight: 700; min-height: 32px; }
details .grid2 { margin-top: 10px; }
.access { border-top: 1px solid var(--line2); padding-top: 14px; display: grid; gap: 10px; }
.access p { margin: 0; }
.owners { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.owners li { display: flex; justify-content: space-between; align-items: center; background: #F7F6F2; border-radius: 10px; padding: 6px 6px 6px 12px; font-size: 14px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* cliente */
.c-head { background: #fff; border-bottom: 1px solid var(--line); }
.c-head-in { max-width: 1100px; margin: 0 auto; padding: 10px clamp(16px, 3vw, 32px); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.c-biz { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; gap: 0; }
.c-biz select { border: 0; padding: 0; min-height: 30px; font-weight: 800; font-size: 16px; text-transform: none; letter-spacing: 0; background: transparent; width: auto; }
.c-main { max-width: 1100px; margin: 0 auto; padding: 26px clamp(16px, 3vw, 32px) 56px; display: flex; flex-direction: column; gap: 20px; }
.next { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.datebox { background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 20px; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.datebox small { font-size: 12px; font-weight: 800; letter-spacing: 2px; color: var(--lime); }
.datebox b { font-size: 42px; font-weight: 800; }
.bar { height: 10px; background: #EEECE6; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; }
.next-info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.kpi.warn { background: #FFF4CF; } .kpi.warn span { color: #6E5200; font-weight: 700; }
.empty { text-align: center; padding: 40px 20px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--green); color: #fff; font-weight: 800; padding: 12px 18px; border-radius: 14px; z-index: 50; box-shadow: 0 10px 24px rgba(0,0,0,.2); max-width: calc(100% - 32px); }
.toast.bad { background: var(--red); }
.table-wrap { max-width: 100%; min-width: 0; } .card { min-width: 0; } .cols > * { max-width: 100%; }
.table-wrap, .search { position: relative; }
.card.next { flex-direction: row; flex-wrap: wrap; align-items: center; }
.st { white-space: nowrap; }
