:root {
  color-scheme: light;
  --ink: #25251f;
  --soft: #625f55;
  --paper: #fffdf8;
  --bg: #f5f2e9;
  --line: #dcd6c8;
  --fire: #a03c23;
  --dark-fire: #803019;
  --sage: #e3eddf;
  font: 16px/1.5 "DM Sans","Segoe UI",Arial,sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p, ul, dl, dd { margin: 0; }
button, input { font: inherit; }
a { color: inherit; text-underline-offset: .18em; }
button { cursor: pointer; }
button:disabled { opacity: .62; cursor: wait; }
button, input, summary, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #087883; outline-offset: 3px; }
.skip { position: fixed; top: -6rem; left: 1rem; z-index: 5; padding: .75rem; background: white; }
.skip:focus { top: 1rem; }
.mast { background: var(--ink); color: #fffaf1; }
.mast-inner, #contenido { max-width: 1216px; margin-inline: auto; }
.mast-inner { min-height: 70px; padding: .65rem clamp(16px,4vw,64px); display: flex; gap: clamp(14px,3vw,40px); align-items: center; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.45rem/1 Georgia,serif; letter-spacing: -.04em; text-decoration: none; }
.seal { display: inline-grid; place-items: center; width: 30px; height: 31px; border: 1px solid #e7a857; border-radius: 50% 50% 35% 35%; font-size: 1.05rem; color: #ffc579; }
.mast nav { display: flex; gap: 1rem; align-items: center; }
.mast nav a, .back, .exit { padding-block: .5rem; font-size: .87rem; }
.mast nav a { text-decoration: none; color: #dedbcf; }
.mast nav a[aria-current="page"] { color: #ffce86; box-shadow: inset 0 -2px #e3a053; }
.back, .exit { margin-left: auto; color: #f6ede0; }
.exit { appearance: none; border: 0; background: none; padding-inline: 0; text-decoration: underline; text-underline-offset: .2em; }
#contenido { padding: clamp(22px,4vw,54px) clamp(16px,4vw,64px) 4rem; }
.opening, .compact { max-width: 48rem; margin: 2rem auto; }
.login-wrap { max-width: 840px; margin: clamp(16px,6vh,72px) auto; }
.login-panel { display: grid; grid-template-columns: .77fr 1.23fr; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); }
.login-cover { min-height: 400px; background: #383226 url('/marca.jpg') center / cover no-repeat; }
.login-body { padding: clamp(22px,4.5vw,54px); }
.overline { margin-bottom: .45rem; font-size: .72rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--fire); }
h1, h2, .dialog-amount { font-family: "Gloock",Georgia,"Times New Roman",serif; }
h1 { font-size: clamp(2rem,4.8vw,3.65rem); font-weight: 500; line-height: 1.06; letter-spacing: -.043em; }
.login-body h1 { font-size: clamp(2rem,3.4vw,2.85rem); }
.lede { margin-top: .6rem; color: var(--soft); max-width: 57ch; }
form { display: grid; gap: .4rem; margin-top: 1.5rem; }
form label { font-size: .89rem; font-weight: 650; }
form input { min-width: 0; width: 100%; height: 45px; margin-bottom: .55rem; border: 1px solid #a49b8b; border-radius: 7px; padding: .5rem .7rem; background: white; color: var(--ink); }
form button { margin-top: .35rem; }
.primary, .secondary, .subtle { min-height: 44px; padding: .58rem 1rem; border-radius: 7px; border: 1px solid transparent; font-weight: 650; font-size: .92rem; }
.primary { background: var(--fire); color: white; }
.primary:hover:not(:disabled) { background: var(--dark-fire); }
.secondary, .subtle { background: var(--paper); border-color: #b9ae9c; color: var(--ink); }
.secondary:hover:not(:disabled), .subtle:hover:not(:disabled) { background: #f0eadc; }
.subtle { margin-left: .5rem; }
.desk-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.session-block { display: flex; align-items: end; flex-direction: column; gap: .45rem; }
.session-block span, #sync, .meta { color: var(--soft); font-size: .82rem; }
.toolbar { margin-block: 1.6rem 1rem; padding-block: .7rem; border-block: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.views { display: flex; flex-wrap: wrap; gap: .45rem; }
.views button { min-height: 42px; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 600; font-size: .89rem; }
.views button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.views button span { font-variant-numeric: tabular-nums; font-size: .8rem; opacity: .85; }
.grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,300px),1fr)); gap: 1rem; align-items: start; }
.card, .empty { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; }
.card { min-width: 0; overflow-wrap: anywhere; border-top: 3px solid #ae7232; }
.card[data-state="paid"], .card[data-state="ready"] { border-top-color: #527543; }
.card[data-state="preparing"] { border-top-color: #596d75; }
.card[data-state="history"] { border-top-color: #a69e8e; }
.row, .item, .amount { display: flex; justify-content: space-between; align-items: baseline; gap: .65rem; }
.row { align-items: start; }
.card h2 { font-size: 1.45rem; line-height: 1.15; font-weight: 600; }
.tag { display: inline-block; flex: none; padding: .2rem .53rem; border-radius: 4px; font-size: .72rem; font-weight: 700; color: #744619; background: #f6e7cb; }
.tag.paid, .tag.ready { background: var(--sage); color: #344f30; }
.tag.preparing { background: #e3e9ec; color: #3e535c; }
.tag.history { background: #e9e6df; color: #514d45; }
.meta { margin-top: .35rem; }
.amount { align-items: center; margin-top: .95rem; }
.value, .dialog-amount { font-variant-numeric: tabular-nums; }
.amount .value { white-space: nowrap; font-weight: 650; }
.items { padding: 0; list-style: none; display: grid; gap: .39rem; margin-block: .6rem; }
.item .value { white-space: nowrap; font-size: .85rem; color: var(--soft); }
.qty { display: inline-block; margin-right: .38rem; font-weight: 750; color: var(--fire); }
.details { border-top: 1px solid var(--line); margin-top: .75rem; }
.details summary { min-height: 42px; padding-block: .6rem; cursor: pointer; color: var(--fire); font-size: .9rem; font-weight: 650; }
.facts { margin-block: .65rem; display: grid; gap: .4rem; }
.facts dt { color: var(--soft); font-size: .79rem; }
.facts dd { font-size: .93rem; }
.note { margin-top: .65rem; padding: .6rem .7rem; background: #f7ecd7; border-radius: 6px; font-size: .92rem; }
.actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .8rem; }
.action-link { display: inline-flex; align-items: center; min-height: 44px; color: #35573a; font-size: .87rem; font-weight: 650; }
.empty { grid-column: 1 / -1; padding: 1.7rem; }
.empty h2 { font-size: 1.4rem; font-weight: 500; }
.empty p { margin-top: .3rem; color: var(--soft); }
.notice { padding: .7rem .85rem; margin-block: .65rem; border: 1px solid #c89076; border-radius: 7px; background: #fcece3; color: #75381e; }
.notice.success { border-color: #95b08d; color: #304c31; background: #e8f1e3; }
dialog { width: min(440px,calc(100% - 32px)); max-height: 88dvh; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); padding: 0; }
dialog::backdrop { background: rgba(32,29,22,.52); }
.dialog-inner { padding: 1.4rem; }
dialog h2 { font-size: 1.7rem; line-height: 1.15; }
.dialog-amount { font-size: 2rem; margin: .6rem 0; }
dialog .actions { justify-content: end; }
@media (max-width: 680px) {
  .mast-inner { flex-wrap: wrap; row-gap: 0; min-height: 60px; }
  .mast nav { order: 3; width: 100%; }
  .mast nav a { padding-block: .6rem; }
  .login-panel { grid-template-columns: 1fr; }
  .login-cover { min-height: 0; height: 105px; background-position: center 42%; }
  .login-wrap { margin-top: 0; }
  .toolbar { flex-direction: column; align-items: start; margin-top: 1.05rem; }
  .session-block span { max-width: 20ch; overflow-wrap: anywhere; }
}
@media (max-width: 440px) {
  .desk-head { align-items: start; flex-direction: column; }
  .session-block { flex-direction: row-reverse; align-items: center; gap: .7rem; }
  .card { padding: .95rem; }
  .views button { padding-inline: .65rem; }
}
