:root {
  --bg: #fcfcfa;
  --side: #f0f2ed;
  --card: #fff;
  --text: #26322d;
  --muted: #718076;
  --line: #e4e8e1;
  --accent: #326b50;
  --soft: #e7eee3;
  --hover: #e5e9e1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.55 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
[hidden] {
  display: none !important;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: -60px;
  left: 10px;
  padding: 9px 12px;
  background: var(--card);
  color: var(--accent);
}
.skip-link:focus {
  top: 8px;
}
.isolation-banner {
  height: 36px;
  padding: 8px 20px;
  text-align: center;
  color: #596b51;
  background: #e5eadd;
  font-size: 11px;
}
.isolation-banner span {
  color: #6d7b68;
}
.login-state {
  min-height: calc(100dvh - 36px);
  display: grid;
  place-items: center;
  padding: 25px;
}
.login-card {
  width: min(480px, 100%);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 12px 35px #26322d0b;
}
.brand-mark,
.hero-mark {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font:
    30px Georgia,
    serif;
  letter-spacing: -3px;
}
.brand-mark {
  width: 35px;
  height: 35px;
  border-radius: 11px;
}
.login-card .brand-mark {
  margin-bottom: 22px;
}
.eyebrow {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 2px;
}
.login-card h1,
.section-intro h1 {
  margin: 12px 0;
  font-weight: 500;
  letter-spacing: -1.3px;
}
.login-card h1 {
  font-size: 32px;
}
.login-card p,
.section-intro p {
  color: var(--muted);
  font-size: 13px;
}
.button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.secondary {
  background: var(--card);
  color: var(--text);
}
.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: calc(100dvh - 36px);
  min-height: 560px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 30px 18px 18px;
  border-right: 1px solid var(--line);
  background: var(--side);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 12px 29px;
  color: var(--text);
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -1px;
  text-decoration: none;
}
.brand > span:last-child span {
  margin-left: 3px;
  color: var(--muted);
  font-weight: 400;
}
.new-chat {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #ccd8c6;
  border-radius: 10px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}
.new-chat > span {
  font-size: 22px;
}
.new-chat kbd {
  margin-left: auto;
  font: 10px inherit;
  opacity: 0.65;
}
.main-nav {
  display: grid;
  gap: 4px;
  margin: 22px 0 28px;
}
.main-nav button,
.settings-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  padding: 11px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  text-align: left;
}
.main-nav button:hover,
.main-nav button.active,
.settings-link:hover {
  background: var(--hover);
}
[data-icon] {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
[data-icon] svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.main-nav small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.history-label {
  padding: 0 13px 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.6px;
}
.history {
  flex: 1;
  min-height: 45px;
  overflow: auto;
}
.history button {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 9px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history button:hover,
.history button.selected {
  background: var(--hover);
}
.history p {
  padding: 8px 13px;
  color: var(--muted);
  font-size: 11px;
}
.sidebar-bottom {
  padding-top: 12px;
}
.offline-note {
  padding: 13px 12px;
  border: 1px solid #d7e1d1;
  border-radius: 9px;
  background: var(--soft);
  font-size: 11px;
}
.offline-note strong {
  margin-left: 7px;
}
.offline-note p {
  margin: 5px 0 0 14px;
  color: var(--muted);
  font-size: 10px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6f9369;
}
.settings-link {
  width: 100%;
  margin-top: 8px;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 16px 3px 0;
  border-top: 1px solid var(--line);
}
.account > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.account strong,
.account small {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #d9e4d3;
  color: #36503d;
  font-size: 11px;
  font-weight: 650;
}
.quiet-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.quiet-icon:hover {
  background: var(--hover);
}
.main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 75px;
  padding: 0 37px;
  border-bottom: 1px solid var(--line);
}
.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.header-left {
  font-size: 12px;
}
.header-right {
  flex-shrink: 0;
}
.menu {
  display: none;
}
.restaurant-badge,
.mode-badge {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  overflow: hidden;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--accent);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mode-badge {
  color: #657060;
  background: #f1f2ef;
  font-size: 9px;
  letter-spacing: 0.4px;
}
.status {
  flex-shrink: 0;
  margin: 12px 24px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font-size: 12px;
}
.status.error {
  background: #f8ebe5;
  color: #8b3f2d;
}
.view {
  flex: 1;
  min-height: 0;
}
.chat-view {
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.hero {
  width: min(780px, 100%);
  margin: auto;
  padding: clamp(38px, 8vh, 85px) 24px 25px;
  text-align: center;
}
.hero-mark {
  width: 59px;
  height: 59px;
  margin: 0 auto 23px;
  border-radius: 19px;
  background: var(--soft);
  color: var(--accent);
  font-size: 43px;
}
.hero h1 {
  margin: 18px auto;
  max-width: 690px;
  font-size: clamp(30px, 3.3vw, 45px);
  font-weight: 500;
  letter-spacing: -1.8px;
  line-height: 1.2;
}
.hero h1 em {
  color: var(--accent);
  font-style: normal;
}
.hero > p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
}
.overview-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 34px 0 22px;
  text-align: left;
}
.overview-card {
  position: relative;
  padding: 18px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}
.overview-card:hover {
  border-color: #9cba91;
  transform: translateY(-2px);
}
.overview-card > [data-icon] {
  width: 29px;
  height: 29px;
  margin-bottom: 14px;
  padding: 5px;
  border-radius: 8px;
  background: var(--side);
  color: var(--accent);
}
.overview-card strong,
.overview-card small,
.overview-card b {
  display: block;
}
.overview-card strong {
  font-size: 12px;
}
.overview-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.overview-card b {
  margin-top: 13px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 550;
}
.synthetic-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 10px !important;
}
.messages {
  flex: 1;
  overflow: auto;
  width: 100%;
  padding: 32px max(25px, calc((100% - 730px) / 2));
}
.message {
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.7;
}
.message.user {
  margin-left: 11%;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 4px 15px;
  background: var(--side);
}
.message strong {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 11px;
}
.message p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.message small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}
.answer-pdf-button {
  margin-top: 13px;
}
.product-action-card {
  margin: 20px 0 28px;
  padding: 20px;
  border: 1px solid #abc3a4;
  border-radius: 14px;
  background: var(--soft);
  overflow-wrap: anywhere;
}
.product-action-card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--accent);
}
.product-action-details {
  display: grid;
  grid-template-columns: minmax(95px, 1fr) minmax(0, 2fr);
  gap: 7px 15px;
  font-size: 13px;
}
.product-action-details dt {
  color: var(--muted);
}
.product-action-details dd {
  margin: 0;
  white-space: pre-wrap;
}
.product-action-card p {
  font-size: 12px;
}
.product-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}
.product-action-buttons .button {
  min-height: 44px;
}
#chat-progress {
  width: min(730px, calc(100% - 36px));
  flex-shrink: 0;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
}
.composer-wrap {
  width: min(820px, 100%);
  flex-shrink: 0;
  margin: auto auto 0;
  padding: 16px 34px 20px;
}
.composer {
  padding: 15px 16px 10px;
  border: 1px solid #dbe2d6;
  border-radius: 17px;
  background: var(--card);
  box-shadow: 0 8px 25px #25322d05;
}
.composer:focus-within {
  border-color: #98b48e;
}
.composer textarea {
  width: 100%;
  min-height: 62px;
  max-height: 170px;
  padding: 3px 3px 14px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}
.composer-bottom .dot {
  margin-right: 5px;
}
.send {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
}
.composer-hint {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}
.page-view {
  overflow: auto;
  padding: 42px clamp(20px, 4vw, 55px);
}
.section-intro {
  margin-bottom: 29px;
}
.section-intro h1 {
  font-size: 32px;
}
.section-intro p {
  max-width: 700px;
}
.report-grid,
.notes-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.entry-card,
.setting-card {
  display: grid;
  gap: 8px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
}
.entry-card h2,
.setting-card h2,
.report-result h2,
.list-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.entry-card label {
  font-size: 11px;
  font-weight: 600;
}
.entry-card input,
.entry-card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.entry-card textarea {
  resize: vertical;
}
.entry-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.entry-card .button {
  justify-self: start;
  margin-top: 4px;
}
.compact {
  max-width: 760px;
  margin-bottom: 23px;
}
.report-result {
  max-width: 980px;
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
}
.report-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.report-result pre {
  max-height: 600px;
  margin: 17px 0 0;
  overflow: auto;
  color: var(--text);
  font:
    12px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.item-list {
  display: grid;
  gap: 11px;
  max-width: 850px;
}
.item {
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
}
.item-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.item h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.item small {
  color: var(--muted);
  font-size: 10px;
}
.item button {
  flex-shrink: 0;
}
.empty {
  padding: 28px 15px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 900px;
}
.setting-card {
  align-content: start;
  min-height: 175px;
}
.setting-card .mode-badge {
  justify-self: start;
}
.setting-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.logout-button {
  margin-top: 23px;
}
.drawer-overlay {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@media (max-width: 850px) {
  .app {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 12px;
  }
  .header {
    padding-inline: 22px;
  }
  .overview-cards {
    gap: 8px;
  }
  .overview-card {
    padding: 14px 11px;
  }
  .overview-card small {
    font-size: 9px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .setting-card {
    min-height: auto;
  }
}
@media (max-width: 680px) {
  .isolation-banner {
    height: auto;
    min-height: 41px;
    padding: 6px 12px;
    font-size: 9px;
    line-height: 1.5;
  }
  .isolation-banner span {
    display: block;
  }
  .app {
    height: calc(100dvh - 41px);
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    width: min(285px, 85vw);
    padding-top: 28px;
    transform: translateX(-100%);
    transition: transform 200ms ease;
  }
  .app.drawer-open .sidebar {
    transform: translateX(0);
  }
  .drawer-overlay {
    position: fixed;
    z-index: 39;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #15231965;
  }
  .header {
    min-height: 62px;
    padding: 0 14px;
  }
  .menu {
    display: grid;
  }
  .restaurant-badge {
    max-width: 130px;
  }
  .header-right {
    gap: 5px;
  }
  .mode-badge {
    font-size: 8px;
  }
  .status {
    margin: 10px 14px 0;
  }
  .hero {
    padding: 34px 22px 20px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero-mark {
    width: 51px;
    height: 51px;
    margin-bottom: 19px;
    font-size: 37px;
  }
  .overview-cards {
    grid-template-columns: 1fr;
    margin-top: 25px;
    gap: 9px;
  }
  .overview-card {
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 12px;
    align-items: center;
    padding: 13px 15px;
  }
  .overview-card > [data-icon] {
    grid-row: 1/4;
    margin: 0;
  }
  .overview-card b {
    margin-top: 4px;
  }
  .composer-wrap {
    position: sticky;
    bottom: 0;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
    background: var(--bg);
  }
  .composer {
    padding: 12px 10px 8px;
  }
  .composer textarea {
    min-height: 53px;
    padding: 2px 6px 8px;
    font-size: 16px;
  }
  .messages {
    padding: 25px 18px;
  }
  .message.user {
    margin-left: 8%;
  }
  .answer-pdf-button {
    width: 100%;
  }
  .page-view {
    padding: 28px 18px;
  }
  .section-intro h1 {
    font-size: 28px;
  }
  .report-grid,
  .notes-layout {
    grid-template-columns: 1fr;
  }
  .report-head {
    flex-direction: column;
  }
  .report-actions .button {
    flex: 1;
  }
  .entry-card input,
  .entry-card textarea {
    font-size: 16px;
  }
  .login-card {
    padding: 28px;
  }
  .login-card h1 {
    font-size: 27px;
  }
}
@media print {
  .isolation-banner,
  .sidebar,
  .header,
  .status,
  .skip-link,
  .section-intro,
  .report-grid,
  .report-actions {
    display: none !important;
  }
  .app {
    display: block !important;
    height: auto !important;
  }
  .main {
    display: block;
  }
  .page-view {
    display: none !important;
    padding: 0 !important;
  }
  .page-view#printable-report,
  .page-view:has(#report-result:not([hidden])) {
    display: block !important;
  }
  .report-result {
    border: 0 !important;
    box-shadow: none !important;
    max-width: none !important;
  }
  .report-result pre {
    max-height: none !important;
    font-size: 10pt !important;
  }
  body {
    background: #fff !important;
    color: #111 !important;
  }
}
.complete-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
  font-weight: 500 !important;
  line-height: 1.4;
}
.complete-check input {
  width: 17px;
  min-width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}
.report-explanation {
  align-content: start;
}
.payment-report-card {
  margin: 16px 0 24px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid #dbe4de;
  background: #eef3ef;
  color: #345c49;
}
.payment-report-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.payment-report-card p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
}
.payment-report-card button {
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: #416b55;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.payment-report-card button:disabled {
  opacity: 0.55;
  cursor: wait;
}
@media (max-width: 600px) {
  .payment-report-card {
    padding: 16px;
  }
  .payment-report-card button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .overview-card {
    transition: none;
  }
}
