:root { --accent: #8a3b12; --ink: #232323; --muted: #6b6b6b; --line: #e3e3e3; }
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: #f6f5f2; }

.topbar { display: flex; align-items: baseline; gap: 14px; padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; text-decoration: none; color: var(--accent); font-size: 18px; }
.tag { color: var(--muted); font-size: 13px; }

.container { max-width: 920px; margin: 26px auto; padding: 0 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px; }
h1 { margin-top: 0; }
h2 { margin-top: 26px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.warn { color: #b00; }
hr { border: none; border-top: 1px solid var(--line); margin: 22px 0; }

.flash { background: #fff3cd; border: 1px solid #ffe08a; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }

.btn { display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; font-size: 14px; }
.btn:hover { background: #f0efec; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; margin-top: 22px; }

/* Upload */
.upload { margin: 20px 0; }
.filezone { display: block; border: 2px dashed #cfcabf; border-radius: 10px; padding: 26px; text-align: center; color: var(--muted); cursor: pointer; margin-bottom: 14px; }
.filezone:hover { border-color: var(--accent); }
.filezone input { display: block; margin: 0 auto 10px; }

/* Review form */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 4px; }
.grid2 .span2 { grid-column: 1 / -1; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #cfcabf; border-radius: 7px; color: var(--ink); background: #fff; }

table.items { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.items th, table.items td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.items th { color: var(--muted); font-weight: 600; }
table.items input, table.items select { width: 100%; }
tr.unmatched td { background: #fff6f6; }

/* Deliverable cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.deliverable { border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.deliverable h3 { margin: 0 0 6px; font-size: 16px; }
.deliverable .btn { margin-top: 8px; margin-right: 6px; }
.ok { font-size: 11px; background: #e3f5e6; color: #1b7a33; padding: 2px 8px; border-radius: 20px; vertical-align: middle; }
.soon { font-size: 11px; background: #eee; color: #777; padding: 2px 8px; border-radius: 20px; vertical-align: middle; }

/* Top nav */
.topnav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topnav a { color: var(--ink); text-decoration: none; font-size: 14px; }
.topnav a:hover { color: var(--accent); }
.btn.sm { padding: 6px 12px; font-size: 13px; }

/* Dashboard restaurant cards */
.restaurant { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 16px; text-decoration: none; color: var(--ink); background: #fff; }
.restaurant:hover { border-color: var(--accent); background: #fbfaf8; }
.restaurant h3 { margin: 0 0 4px; font-size: 16px; }
.restaurant .count { display: inline-block; margin-top: 8px; font-size: 12px; background: #f0efec; color: var(--muted); padding: 2px 10px; border-radius: 20px; }

/* Orders table */
table.orders { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.orders th, table.orders td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.orders th { color: var(--muted); font-weight: 600; }
table.orders tbody tr { cursor: pointer; }
table.orders tbody tr:hover { background: #fbfaf8; }

/* Status / type pills */
.pill { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 20px; text-transform: capitalize; background: #eee; color: #555; }
.pill.package { background: #e7eefc; color: #2a4b9b; }
.pill.alacarte { background: #fdeede; color: #9a5a12; }
.pill.status-new { background: #e3f5e6; color: #1b7a33; }
.pill.status-modified { background: #fff3cd; color: #8a6d1b; }
.pill.evt-created { background: #e3f5e6; color: #1b7a33; }
.pill.evt-modified { background: #fff3cd; color: #8a6d1b; }
.pill.evt-email { background: #e7eefc; color: #2a4b9b; }

/* Order detail header */
.detailhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.headactions { display: flex; gap: 8px; align-items: center; }

/* Order-form add-ons (utensils + client logo) */
.addons { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf8; }
.addons .check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.addons .logofield { display: flex; flex-direction: column; gap: 6px; }
.addons .logolabel { font-size: 13px; color: var(--muted); }
.addons .logoprev { max-height: 70px; max-width: 180px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 4px; }

/* Email preview */
table.emailhead { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
table.emailhead th { text-align: left; width: 130px; color: var(--muted); font-weight: 600; font-size: 13px; padding: 6px 10px 6px 0; vertical-align: top; white-space: nowrap; }
table.emailhead td { padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.emailbody { width: 100%; height: 460px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 8px; }
.emailtodo { margin-top: 14px; }

/* History */
ul.history { list-style: none; padding: 0; margin: 10px 0 0; }
ul.history li { border-left: 2px solid var(--line); padding: 4px 0 12px 14px; margin-left: 6px; }
ul.history li div { margin-top: 3px; font-size: 14px; }
