:root {
  --bg:     #11140f;
  --panel:  #181d14;
  --usd:    #7fae84;
  --ars:    #c97b4a;
  --alert:  #c4574a;
  --text:   #ede8de;
  --muted:  #8d9a87;
  --border: #2a342b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; font-size: 14px; min-height: 100vh; }

header { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; border-bottom: 1px solid var(--border); }
header h1 { font-family: Lora, serif; font-size: 18px; }
#btn-admin { background: none; border: 1px solid var(--border); color: var(--muted); cursor: pointer; padding: 6px 10px; border-radius: 6px; font-size: 18px; }
#btn-admin:hover { color: var(--alert); border-color: var(--alert); }

nav { display: flex; gap: 2px; padding: 0 24px; border-bottom: 1px solid var(--border); overflow-x: auto; }
nav button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 10px 16px; font-size: 13px; white-space: nowrap; border-bottom: 2px solid transparent; font-family: inherit; }
nav button.active { color: var(--text); border-bottom-color: var(--usd); }
nav button:hover:not(.active) { color: var(--text); }

main { padding: 24px; max-width: 1200px; margin: 0 auto; }
.tab { display: none; }
.tab.active { display: block; }

.cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px; flex: 1; min-width: 150px; }
.card .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.card .value { font-family: "IBM Plex Mono", monospace; font-size: 20px; font-weight: 600; }
.usd { color: var(--usd); }
.ars { color: var(--ars); }
.alert-c { color: var(--alert); }

.sec { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; margin-top: 24px; }
.sec:first-child { margin-top: 0; }
.sec h2 { font-family: Lora, serif; font-size: 15px; }

.btn { background: var(--panel); border: 1px solid var(--border); color: var(--text); cursor: pointer; padding: 7px 14px; border-radius: 6px; font-size: 13px; font-family: inherit; }
.btn:hover { border-color: var(--usd); }
.btn.sm { padding: 3px 8px; font-size: 11px; }
.btn.danger { border-color: var(--alert); color: var(--alert); }
.btn.danger:hover { background: #2a1414; }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--border); }
td { padding: 9px 12px; border-bottom: 1px solid var(--border); font-family: "IBM Plex Mono", monospace; font-size: 13px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }
td.t { font-family: inherit; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge.fijo { background: #1e2a1f; color: var(--usd); }
.badge.variable { background: #2a1e14; color: var(--ars); }
.badge.cat { background: #1a1e2a; color: #8aaecc; font-size: 14px; }

.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 50; align-items: center; justify-content: center; }
.modal-bg.open { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 24px; width: 100%; max-width: 440px; }
.modal h3 { font-family: Lora, serif; margin-bottom: 18px; }
.modal label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; margin-top: 12px; }
.modal input, .modal select { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 8px 10px; border-radius: 6px; font-size: 13px; font-family: "IBM Plex Mono", monospace; }
.modal input:focus, .modal select:focus { outline: none; border-color: var(--usd); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

#admin-panel { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100; align-items: flex-start; justify-content: center; padding-top: 60px; }
#admin-panel.open { display: flex; }
.admin-box { background: var(--panel); border: 1px solid var(--alert); border-radius: 10px; padding: 24px; max-width: 700px; width: 100%; max-height: 80vh; overflow-y: auto; }
.admin-box > h2 { font-family: Lora, serif; color: var(--alert); margin-bottom: 6px; }
.admin-box > p { color: var(--muted); font-size: 12px; margin-bottom: 20px; }

.mono-bar-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.mono-bar-labels { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.mono-track { background: var(--border); border-radius: 4px; height: 10px; overflow: hidden; }
.mono-fill { height: 100%; border-radius: 4px; transition: width .4s; background: var(--usd); }
.mono-fill.warn { background: var(--ars); }
.mono-fill.over { background: var(--alert); }
.mono-track-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }

.empty { color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center; }

@media (max-width: 600px) {
  nav { padding: 0 12px; }
  main { padding: 14px; }
  .cards { flex-direction: column; }
}
