/* Delta Lucrum Cloud — panel. Colores en /theme.css */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 20px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--surface); border-bottom: 1px solid var(--line); }
.mark { width: 28px; height: 28px; color: var(--accent); flex: none; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-size: 17px; }
.brand small { color: var(--muted); font-size: 12px; font-weight: 600; }
.view { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; }

.btn { min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--text); transition: transform .08s ease; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }

h1 { font-size: 26px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; font-weight: 800; }
.head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.head .sub { width: 100%; color: var(--muted); margin-top: -8px; }

/* inicio: tarjetas de restaurante */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.rcard { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color .15s ease, transform .1s ease; }
.rcard:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.rcard:active { transform: scale(.99); }
.rcard .rname { font-size: 20px; font-weight: 800; line-height: 1.2; }
.rcard .raddr { color: var(--muted); font-size: 13px; }
.rcard .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 10px; }
.stat .l { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat.hero { background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); }
.dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.dot::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.dot.on { color: var(--green); }
.dot.on::before { background: var(--green); }
.rrow { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; font-size: 13px; letter-spacing: .08em; }

/* detalle */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi.hero { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.bars div { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars div:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 3px 7px; border-radius: 6px; font-size: 12px; white-space: nowrap; margin-bottom: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
details.fold { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--surface-2); }
details.fold > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; justify-content: space-between; font-weight: 700; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > div { padding: 0 14px 10px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface-3); color: var(--muted); }
.b-ok { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.b-bad { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }

/* formularios y modal */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.input { min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); width: 100%; font-size: 16px; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.login { max-width: 400px; margin: 8vh auto 0; }
.login .card { padding: 26px; }
dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); padding: 0; width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(5, 7, 10, .65); }
.mh { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.mh h3 { margin: 0; font-size: 19px; }
.mb { padding: 16px 20px; }
.mf { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); }
.secret { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; word-break: break-all; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px;
  font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 56px 16px; }
@media (max-width: 600px) { .view { padding: 16px 14px 48px; } .rcard .stats { grid-template-columns: repeat(3, 1fr); } }

/* Delta Lucrum: el nombre de la marca va en Cinzel (solo en la firma), cifras en Bodoni */
.brand b { font-family: var(--font-logo); letter-spacing: 2px; text-transform: uppercase; font-size: 16px; color: var(--ivory); }
h1, .rcard .rname, .stat .v, .kpi .v { font-family: var(--font-display); }
.stat.hero .v, .kpi.hero .v { color: var(--gold); }
.btn, .rcard, .card, .kpi, .stat, .input, details.fold, dialog, .secret, .code { border-radius: 2px; }
.btn.primary { box-shadow: inset 0 0 0 1px var(--gold-soft), 0 6px 16px rgba(0,0,0,.45); }
.btn.primary:hover { background: #D3AE38; }
h2 { color: var(--gold-light); }
.rcard { border-top: 1px solid var(--gold); }
