:root { color-scheme: light; font: 16px/1.5 system-ui, sans-serif; color: #402419; background: #faf4ec; }
* { box-sizing: border-box; }
main { max-width: 850px; margin: auto; padding: 1.5rem 1rem 3rem; }
main:has(#gestao:not([hidden])) { max-width: 1180px; }
header, nav, .actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
header img { border-radius: 50%; }
h1, h2 { font-family: Georgia, serif; line-height: 1.15; }
h1 { margin: 0; font-size: clamp(1.55rem, 4vw, 2.45rem); }
.notice { padding: .65rem .9rem; background: #f7e5ca; border-radius: .5rem; }
nav a, button, .actions a { display: inline-block; padding: .65rem .9rem; border: 1px solid #713b20; border-radius: .5rem; color: #713b20; font: inherit; font-weight: 650; text-decoration: none; background: #fff; cursor: pointer; }
nav a[aria-current], button { color: white; background: #713b20; }
button:disabled { color: #595959; background: #eee; border-color: #aaa; cursor: not-allowed; }
section, .order-card { border-radius: .75rem; border: 1px solid #e6d3c3; background: #fff; padding: 1.1rem; margin-top: 1rem; }
section h2, .order-card h3 { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
label { display: block; font-weight: 600; }
[hidden] { display: none; }
#login { display: grid; gap: .75rem; width: min(100%, 360px); margin: 2rem auto; padding: 1rem; background: white; border-radius: .75rem; }
#login[hidden], #order-nav [hidden], #session-info[hidden] { display: none; }
#edit-order-dialog { width: min(95vw, 720px); max-height: 90vh; padding: 1rem; border: 1px solid #e6d3c3; border-radius: .75rem; color: inherit; }
#edit-order-dialog::backdrop { background: rgb(64 36 25 / .45); }
#edit-order-dialog > .actions { justify-content: space-between; }
#cancel-order { color: #8b2525; border-color: #8b2525; background: #fff; }
input, select, textarea { display: block; width: 100%; padding: .6rem; margin-top: .2rem; border: 1px solid #a58b7d; border-radius: .4rem; font: inherit; color: inherit; background: white; }
fieldset { margin: 1rem 0; border: 1px solid #e6d3c3; border-radius: .5rem; }
legend { font-weight: 700; }
.product { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.5rem; align-items: center; gap: .6rem; padding: .3rem 0; }
.product input { margin: 0; }
#order > label + label { margin-top: .8rem; }
.total output { margin-left: .5rem; font-weight: 750; }
.order-card p { overflow-wrap: anywhere; }
.kitchen-table { width: 100%; border-collapse: collapse; }
.kitchen-table caption { text-align: left; font-weight: 700; }
.kitchen-table th, .kitchen-table td { padding: .5rem; border-bottom: 1px solid #e6d3c3; text-align: left; }
.kitchen-table :is(th, td):last-child { text-align: right; }
.management-scroll { overflow-x: auto; }
.management-table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: .8rem; }
.management-table :is(th, td) { padding: .4rem; border-bottom: 1px solid #e6d3c3; text-align: center; }
.management-table .management-product { width: 7%; padding-inline: .2rem; font-size: .69rem; line-height: 1.2; overflow-wrap: anywhere; }
.management-table thead { background: #f7e5ca; }
.management-table tbody tr:nth-child(even) { background: #faf4ec; }
.management-table :is(th, td):nth-child(-n+2) { text-align: left; }
.management-table td:nth-child(2) { white-space: nowrap; }
.date-calendar summary { cursor: pointer; border: 1px solid #a58b7d; border-radius: .4rem; padding: .6rem; margin-top: .2rem; }
.calendar { padding: .5rem 0; }
.calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .2rem; text-align: center; }
.calendar-days span { font-size: .75rem; }
.calendar-days button { padding: .35rem 0; color: #713b20; background: white; }
.calendar-days button:disabled { color: #595959; background: #eee; text-decoration: line-through; }
.calendar-clear { margin-top: .5rem; }
#receipt { display: none; }
@media (max-width: 550px) { .grid { grid-template-columns: 1fr; } }
@media print {
  :root { color: #222; background: #fff; }
  main { display: none; }
  #receipt { display: block; overflow-wrap: anywhere; }
  @page { margin: 18mm; }
}
