/* ============================================================
   PEDIDOR — design tokens
   Subject: home-cooked food business ordering tickets (marmitarias, bolos, doces, etc).
   Signature element: the perforated "ticket stub" card, used
   for menu picks and the final order confirmation.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root{
  --ink:        #1c2321;
  --pine:       #2f4b3c;
  --pine-light: #416152;
  --paper:      #f6f1e4;
  --paper-dim:  #efe7d3;
  --mustard:    #d9a441;
  --mustard-dk: #b5822f;
  --tomato:     #c1443c;
  --steel:      #8b9a93;
  --steel-light:#dbe3de;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(28,35,33,0.12);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  line-height:1.45;
  min-height:100vh;
}

h1,h2,h3{
  font-family:'Fraunces', serif;
  font-weight:700;
  margin:0 0 .3em 0;
  letter-spacing:-0.01em;
}

.mono{ font-family:'IBM Plex Mono', monospace; letter-spacing:0.02em; }

.site-logo-bar{
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 16px 0;
  background: var(--paper);
}
.site-logo-bar img{
  height: 42px;
  width: auto;
  display:block;
}

.app-shell{
  max-width: 480px;
  margin: 0 auto;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  padding: 0 0 40px 0;
}

.topbar{
  background: var(--pine);
  color: var(--paper);
  padding: 22px 20px 26px;
  border-radius: 0 0 22px 22px;
  box-shadow: var(--shadow);
}
.topbar .eyebrow{
  font-family:'IBM Plex Mono', monospace;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--mustard);
  opacity:.95;
}
.topbar h1{ color:var(--paper); font-size:26px; margin-top:4px; }
.topbar p{ margin:4px 0 0; opacity:.85; font-size:14px; }

.content{ padding: 22px 20px 10px; flex:1; }

/* --- Cards --- */
.card{
  background:#fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

/* --- Ticket stub: signature element ---
   dashed divider with punched circular notches, evoking a
   tiffin-tin order slip. Used for menu picks + confirmation. */
.ticket{
  position:relative;
  background:#fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:visible;
  margin-bottom:18px;
}
.ticket .ticket-top{ padding:18px 20px 16px; }
.ticket .ticket-bottom{ padding:16px 20px 18px; }
.ticket .ticket-divider{
  position:relative;
  border-top: 2px dashed var(--steel-light);
  margin: 0 18px;
}
.ticket .ticket-divider::before,
.ticket .ticket-divider::after{
  content:"";
  position:absolute;
  top:-9px;
  width:18px; height:18px;
  border-radius:50%;
  background: var(--paper);
}
.ticket .ticket-divider::before{ left:-27px; }
.ticket .ticket-divider::after{ right:-27px; }

.price-tag{
  font-family:'IBM Plex Mono', monospace;
  background: var(--paper-dim);
  color: var(--pine);
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 13px;
  font-weight:600;
}

/* --- Form elements --- */
label{ font-size:13px; font-weight:600; color:var(--pine); display:block; margin-bottom:6px; }
input[type=text], input[type=tel], input[type=number], input[type=password], input[type=email], textarea, select{
  width:100%;
  font-family:'Inter', sans-serif;
  font-size:16px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--steel-light);
  background: var(--paper);
  color: var(--ink);
  margin-bottom: 14px;
}
input:focus, textarea:focus, select:focus{
  outline: 3px solid var(--mustard);
  outline-offset: 1px;
  border-color: var(--mustard-dk);
}
textarea{ min-height:80px; resize:vertical; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  font-family:'Inter', sans-serif;
  font-size:16px;
  font-weight:700;
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  cursor:pointer;
  transition: transform .06s ease, opacity .15s ease;
}
.btn:active{ transform: scale(0.98); }
.btn:disabled{ opacity:.45; cursor:not-allowed; }
.btn-primary{ background: var(--pine); color:var(--paper); }
.btn-primary:hover:not(:disabled){ background: var(--pine-light); }
.btn-accent{ background: var(--mustard); color: var(--ink); }
.btn-ghost{ background: transparent; color: var(--pine); border:1.5px solid var(--steel-light); }
.btn-danger{ background:transparent; color:var(--tomato); border:1.5px solid var(--tomato); }

.choice-card{
  border: 2px solid var(--steel-light);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom:10px;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.choice-card.selected{ border-color: var(--pine); background: var(--paper-dim); }
.choice-card h3{ font-size:16px; margin:0; }
.choice-card p{ margin:2px 0 0; font-size:13px; color:var(--steel); }

.checkbox-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  background: var(--paper-dim);
  border-radius: 12px;
  padding: 14px;
  margin-bottom:16px;
}
.checkbox-row input{ width:auto; margin:3px 0 0; }
.checkbox-row label{ margin:0; font-weight:500; color:var(--ink); font-size:14px; }

.alert{
  border-radius:12px;
  padding:12px 14px;
  font-size:14px;
  margin-bottom:14px;
}
.alert-error{ background:#fbe9e7; color:var(--tomato); border:1px solid #f3c6c1; }
.alert-warn{ background:#fdf3e0; color:var(--mustard-dk); border:1px solid #f2ddab; }
.alert-info{ background:var(--paper-dim); color:var(--pine); border:1px solid var(--steel-light); }

.stepper{
  display:flex;
  gap:6px;
  padding: 0 20px 14px;
}
.stepper .dot{
  height:4px; flex:1;
  border-radius:2px;
  background: rgba(246,241,228,0.28);
}
.stepper .dot.done{ background: var(--mustard); }

.muted{ color:var(--steel); font-size:13px; }
a{ color: var(--pine); }

/* --- Admin layout --- */
.admin-shell{ max-width: 880px; margin:0 auto; padding: 24px 20px 60px; }
.admin-header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; flex-wrap:wrap; gap:10px; }
.tabs{ display:flex; gap:8px; margin-bottom:20px; flex-wrap:wrap; }
.tab-btn{
  font-family:'Inter', sans-serif;
  font-weight:600; font-size:14px;
  padding:9px 16px;
  border-radius:20px;
  border:1.5px solid var(--steel-light);
  background:#fff; color:var(--pine);
  cursor:pointer;
}
.tab-btn.active{ background: var(--pine); color:var(--paper); border-color:var(--pine); }

table{ width:100%; border-collapse:collapse; background:#fff; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
th,td{ text-align:left; padding:11px 14px; font-size:14px; border-bottom:1px solid var(--steel-light); }
th{ background: var(--paper-dim); color:var(--pine); font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
tr:last-child td{ border-bottom:none; }

.badge{ font-size:12px; font-weight:700; padding:3px 10px; border-radius:20px; }
.badge-pendente{ background:#fdf3e0; color:var(--mustard-dk); }
.badge-confirmado{ background:var(--steel-light); color:var(--pine); }
.badge-entregue{ background:#e2ede6; color:var(--pine); }
.badge-cancelado{ background:#fbe9e7; color:var(--tomato); }

.inline-form{ display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin-bottom:18px; }
.inline-form > div{ flex:1; min-width:140px; }
.inline-form .btn{ width:auto; padding:13px 20px; }

@media (max-width: 520px){
  table, thead, tbody, tr, th, td{ display:block; }
  thead{ display:none; }
  tr{ margin-bottom:12px; border-radius:12px; overflow:hidden; box-shadow:var(--shadow); }
  td{ display:flex; justify-content:space-between; gap:10px; border-bottom:1px solid var(--steel-light); }
  td::before{ content: attr(data-label); font-weight:700; color:var(--pine); font-size:12px; text-transform:uppercase; }
}
