:root {
  --paper: #f6f1e8;
  --cream: #fffaf2;
  --ink: #171513;
  --copy: #3f3932;
  --muted: #665d53;
  --wine: #74273a;
  --ox: #471721;
  --gold: #b08a57;
  --gold2: #d8b96f;
  --line: #ddd1be;
  --soft: #eee5d7;
  --green: #0b7a5c;
  --dark: #24211e;
  --red: #b83a3a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; line-height: 1.62; }
a { text-decoration: none; color: inherit; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: auto; }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--wine); font-weight: 900; }
.section { padding: 86px 0; border-top: 1px solid var(--line); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: 'Playfair Display', Georgia, serif; letter-spacing: -.04em; }
h1 { font-size: clamp(3.1rem, 6.2vw, 5.45rem); line-height: .98; margin: 18px 0 24px; }
h1 span, h2 span { color: var(--wine); }
h2 { font-size: clamp(2.15rem, 4vw, 3.55rem); line-height: 1.08; margin-bottom: 16px; }
.lead { font-size: 18px; color: var(--copy); max-width: 760px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 13px 21px; border-radius: 12px; font-size: 15px; font-weight: 900; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, var(--wine), var(--ox)); color: #fff; box-shadow: 0 12px 26px rgba(74,23,34,.18); }
.btn-secondary { border-color: var(--gold); background: rgba(255,255,255,.42); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-sm { padding: 8px 12px; font-size: 13px; min-height: 36px; }
.btn-full { width: 100%; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.nav { position: sticky; top: 0; z-index: 80; background: rgba(246,241,232,.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-in { height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 54px; height: 54px; display: grid; place-items: center; background: linear-gradient(135deg, #9a663e, #d6b76e); font-size: 26px; box-shadow: 0 8px 18px rgba(74,23,34,.12); }
.brand strong { display: block; font: 800 21px/1 'Playfair Display', Georgia, serif; }
.brand small { display: block; margin-top: 5px; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--copy); font-weight: 800; }
.links { display: flex; align-items: center; gap: 19px; font-size: 14px; font-weight: 800; color: var(--copy); }
.nav-toggle, .burger { display: none; }
.hero { overflow: hidden; padding: 102px 0 80px; background: radial-gradient(860px 460px at 10% 0, rgba(214,183,110,.22), transparent 64%), radial-gradient(760px 420px at 100% 100%, rgba(116,39,58,.14), transparent 65%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.hero p { font-size: 19px; color: var(--copy); max-width: 650px; }
.hero-note { font-size: 13px !important; font-weight: 800; }
.system-card { background: var(--cream); border: 1px solid var(--line); border-radius: 24px; padding: 25px; box-shadow: 0 34px 80px -46px rgba(29,28,26,.42); }
.system-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.live { font-size: 10px; letter-spacing: .12em; color: var(--green); font-weight: 900; border: 1px solid rgba(11,122,92,.28); padding: 5px 9px; border-radius: 999px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.kpis div, .mini { background: #fff; border: 1px solid var(--soft); border-radius: 13px; padding: 13px; }
.kpis small, .mini small { display: block; color: var(--copy); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.kpis b { font-size: 18px; }
.mini.ticket { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; border-left: 4px solid var(--wine); }
.status { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: rgba(11,122,92,.14); color: var(--green); font-size: 10px; font-weight: 900; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: -28px; position: relative; z-index: 2; }
.pillars div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 14px 32px rgba(74,23,34,.06); }
.pillars b { display: block; }
.pillars span { font-size: 12px; color: var(--copy); }
.features, .pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.feature, .price-card, .calc, .manual-card { background: var(--cream); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.feature .icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: var(--gold2); font-size: 20px; margin-bottom: 16px; }
.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p, .feature li { color: var(--copy); font-size: 14px; }
.feature ul { margin: 12px 0 0; padding-left: 18px; }
.pricing { background: #fff8ee; }
.price-card { background: #fff; display: flex; flex-direction: column; position: relative; }
.price-card.featured { border: 2px solid var(--wine); box-shadow: 0 24px 60px rgba(116,39,58,.12); }
.badge { position: absolute; top: -13px; left: 26px; background: var(--wine); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.amount { font-size: 38px; font-weight: 950; letter-spacing: -.03em; margin: 8px 0; }
.period { color: var(--muted); font-size: 13px; }
.included { color: var(--green); font-size: 12px; font-weight: 900; margin-top: 5px; }
.price-card ul { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; flex: 1; }
.price-card li { color: var(--copy); font-size: 14px; }
.price-card li:before { content: '✓'; color: var(--green); font-weight: 900; margin-right: 8px; }
.small-note { font-size: 12px; color: var(--muted); margin-top: 14px; }
.maintenance { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.box li { color: var(--copy); font-size: 14px; margin: 7px 0; }
.calc { max-width: 760px; margin-top: 30px; }
.calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field label { display: block; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; color: var(--copy); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px 13px; font: inherit; color: var(--ink); }
.result { margin-top: 18px; background: var(--dark); color: #fff; border-radius: 16px; padding: 22px; }
.result b { font-size: 34px; letter-spacing: -.03em; }
.breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; color: #e8ded0; font-size: 13px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.manual-card h3 { font: 800 29px/1.12 'Playfair Display', Georgia, serif; }
.manual-card ul { columns: 2; padding-left: 18px; color: var(--copy); font-size: 13px; }
.final { text-align: center; background: linear-gradient(180deg, var(--paper), #ede1cf); padding: 86px 0; }
.final .lead { margin-left: auto; margin-right: auto; }
.final .actions { justify-content: center; }
.footer { background: var(--cream); border-top: 1px solid var(--line); padding: 34px 0; color: var(--copy); font-size: 12px; }
.footer-in { display: flex; justify-content: space-between; gap: 28px; }
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 70; display: flex; align-items: center; gap: 9px; background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; padding: 12px 17px; border-radius: 999px; font-size: 14px; font-weight: 900; box-shadow: 0 9px 26px rgba(18,140,126,.28); }
.wa-float svg { width: 21px; height: 21px; }
.wa-label { display: inline; }
.modal { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(23,21,19,.62); backdrop-filter: blur(4px); padding: 20px; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-box { position: relative; width: min(520px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 20px; padding: 28px; box-shadow: 0 40px 100px rgba(0,0,0,.28); }
.close { position: absolute; right: 15px; top: 13px; border: 0; background: var(--soft); border-radius: 999px; width: 36px; height: 36px; font-size: 22px; cursor: pointer; }
.form { display: grid; gap: 13px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 12px; padding: 14px 20px; font-weight: 800; opacity: 0; pointer-events: none; transition: .2s; z-index: 300; }
.toast.show { opacity: 1; }
.offline-banner { position: fixed; top: 0; left: 0; right: 0; background: var(--red); color: #fff; text-align: center; padding: 8px; font-weight: 600; z-index: 1000; display: none; }

/* Dashboard */
.dashboard { min-height: 100vh; }
.dash-header { background: var(--cream); border-bottom: 1px solid var(--line); padding: 16px 0; position: sticky; top: 0; z-index: 50; }
.dash-actions { display: flex; align-items: center; gap: 12px; }
.outlet-badge { background: var(--wine); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.dash-main { padding: 24px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--ink); }
.dash-sections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dash-section { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-head h2 { font-size: 18px; margin: 0; }
.btn-sm { padding: 8px 12px; font-size: 13px; min-height: 36px; }
.order-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.order-row:last-child { border-bottom: none; }
.status-badge { padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.status-badge.NEW { background: #e0e7ff; color: #3730a3; }
.status-badge.IN_PROGRESS { background: #fef3c7; color: #a8842f; }
.status-badge.READY { background: #d1fae5; color: #0d3b2e; }
.status-badge.SERVED { background: #e0e7ff; color: #3730a3; }
.status-badge.SETTLED { background: #d1fae5; color: #0d3b2e; }
.status-badge.VOIDED { background: #fee2e2; color: #b83a3a; }
.status-badge.REFUNDED { background: #fee2e2; color: #b83a3a; }
.shift-info { padding: 12px; background: var(--cream); border-radius: 12px; }
.shift-info p { margin: 4px 0; }
.empty { color: var(--muted); text-align: center; padding: 24px; }

/* Auth pages */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: 0 20px 40px rgba(74,23,34,.08); }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header .mark { width: 64px; height: 64px; margin: 0 auto 16px; font-size: 32px; }
.auth-header h1 { font-size: 28px; margin-bottom: 8px; }
.auth-header p { color: var(--copy); }
.auth-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--copy); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px 13px; font: inherit; color: var(--ink); }
.flex { display: flex; gap: 8px; }
.slug-suffix { display: flex; align-items: center; padding: 0 12px; background: var(--soft); border-radius: 8px; color: var(--copy); font-size: 13px; }
.auth-footer { text-align: center; margin-top: 20px; color: var(--copy); font-size: 14px; }
.auth-footer a { color: var(--wine); font-weight: 600; }

/* Page layout */
.page { padding: 32px 0; }
.page h1 { margin-bottom: 24px; }

/* Mobile nav */
@media (max-width: 980px) {
  .links { display: none; }
  .burger { display: block; font-size: 26px; }
  .nav-toggle:checked ~ .links { display: flex; position: absolute; top: 82px; left: 0; right: 0; flex-direction: column; align-items: flex-start; padding: 16px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .hero-grid, .split, .maintenance, .pricing-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); margin-top: 0; padding-top: 18px; }
  .calc-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-sections { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wrap { width: min(100% - 32px, 1180px); }
  .nav-in { height: 74px; }
  .brand strong { font-size: 17px; }
  .brand small { font-size: 9px; }
  .nav-toggle:checked ~ .links { top: 74px; }
  .hero { padding: 70px 0 55px; }
  h1 { font-size: 3.05rem; }
  .actions { display: grid; }
  .btn { width: 100%; }
  .pillars, .features { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .manual-card ul { columns: 1; }
  .footer-in { display: grid; }
  .wa-float { width: 54px; height: 54px; padding: 0; justify-content: center; }
  .wa-label { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}