:root {
    --ink: #22252a;
    --dark: #202226;
    --honey: #f5c64d;
    --honey-dark: #765100;
    --canvas: #f6f7f9;
    --line: #e7e8ec;
    --muted: #5e646e;
    --sidebar: 244px;
    --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 84px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 15px/1.48 system-ui, -apple-system, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #b8810b; outline-offset: 3px; }
svg.lucide { width: 19px; height: 19px; flex-shrink: 0; vertical-align: middle; stroke-width: 1.8; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); line-height: 1.11; letter-spacing: -.05em; font-weight: 790; margin-bottom: .45rem; }
h2 { font-size: 1.13rem; letter-spacing: -.02em; font-weight: 760; margin-bottom: .25rem; }
h3 { font-size: 1rem; font-weight: 730; margin: 0; }
p { margin-bottom: .8rem; }
.sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; width: var(--sidebar); background: var(--dark); color: #fff; display: flex; flex-direction: column; padding: 24px 16px 15px; overflow-y: auto; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 6px; font-weight: 800; font-size: 1.07rem; letter-spacing: .065em; white-space: nowrap; }
.brand strong { color: var(--honey); }
.brand small { display: block; margin-top: 2px; color: #bbbfc7; font-size: .6rem; font-weight: 640; letter-spacing: .10em; }
.brand-mark { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 12px; background: var(--honey); color: #252526; }
.brand-mark svg { width: 24px; height: 24px; stroke-width: 2.3; }
.nav-caption { color: #adb2bc; font-size: .66rem; font-weight: 700; letter-spacing: .15em; margin: 39px 10px 11px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 10px 11px; border-radius: 10px; color: #e2e5e9; }
.sidebar nav a:hover { background: #34363c; }
.sidebar nav a[aria-current] { background: #40382a; color: #ffda78; font-weight: 730; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 12px 3px 0; border-top: 1px solid #41434a; }
.sidebar-footer div { min-width: 0; flex: 1; }
.sidebar-footer b, .sidebar-footer small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer small { color: #bec1c7; }
.operator-icon { display: grid; place-items: center; border-radius: 50%; width: 36px; height: 36px; background: #373b42; }
.main { margin-left: var(--sidebar); min-width: 0; }
.topbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: white; padding: 8px clamp(16px,3vw,38px); border-bottom: 1px solid var(--line); }
.topbar div { display: flex; align-items: center; gap: 9px; }
.topbar span, .topbar small { color: var(--muted); }
.topbar svg { width: 16px; height: 16px; }
.page { max-width: 1510px; margin: auto; padding: 30px clamp(16px,3vw,38px) 48px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-heading p, .section-head p { color: var(--muted); margin-bottom: 0; }
.eyebrow { color: var(--honey-dark); letter-spacing: .15em; font-weight: 800; font-size: .66rem; margin-bottom: .48rem; }
.panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 4px #171b2205; min-width: 0; }
.padded, .metric { padding: clamp(15px, 2vw, 22px); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.section-head > svg { color: var(--honey-dark); }
.section-head p { font-size: .86rem; }
.metrics, .two-col, .tab-grid { display: grid; gap: 15px; }
.metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); margin: 0 0 16px; }
.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
.tab-grid { grid-template-columns: minmax(0,1.6fr) minmax(260px,1fr); align-items: start; }
.metric { display: grid; justify-items: start; gap: 5px; }
.metric > span:not(.metric-icon) { color: var(--muted); font-weight: 650; }
.metric strong { font-size: clamp(1.4rem,2.3vw,1.85rem); letter-spacing: -.04em; overflow-wrap: anywhere; line-height: 1.2; }
.metric small, .muted, .list-line small, .order-heading small, .product-pick small { color: var(--muted); }
.metric-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; margin-bottom: 6px; }
.honey { background: #fff3cc; color: #765100; }
.rose { background: #fff0f1; color: #943b43; }
.mint { background: #e9f8ee; color: #22633d; }
.lilac { background: #f2edff; color: #66438c; }
.filter-panel { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 13px 15px; margin-bottom: 16px; }
.filter, .filter-dates, .button-group, .tags, .legend { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.filter label { flex: 0 1 auto; min-width: 0; }
.filter input, .filter select { max-width: 100%; }
.stack { display: grid; gap: 12px; align-content: start; }
.stack > .bee-btn { justify-self: start; }
.spaced { margin-top: 16px; }
.action-stack { margin-top: 12px; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
label { display: grid; min-width: 0; gap: 5px; font-size: .83rem; font-weight: 660; }
input:not([type=checkbox]), textarea, select { display: block; width: 100%; min-width: 0; color: var(--ink); background: white; border: 1px solid #d8dbe2; border-radius: 8px; min-height: 43px; padding: 8px 10px; font-size: .95rem; }
input[readonly] { background: #f1f2f4; }
.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 530; }
input[type=checkbox] { accent-color: #805600; width: 18px; height: 18px; flex-shrink: 0; }
.bee-btn, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; min-height: 43px; padding: 8px 13px; color: var(--ink); font-size: .89rem; font-weight: 730; line-height: 1.2; text-align: center; }
.primary { background: var(--honey); }
.primary:hover:not(:disabled) { background: #eeb636; color: #171717; }
.secondary { background: #fff; border-color: #dce0e6; }
.secondary:hover:not(:disabled), .row-link:hover { background: #f6f7f9; }
.bee-btn.danger { background: #fff1f1; color: #912b32; border-color: #f3c7cb; }
.icon-button { background: transparent; color: inherit; padding: 7px; width: 40px; }
.icon-button:hover { background: #9992; }
.menu-toggle { display: none; }
.full { width: 100%; }
.notice { display: flex; align-items: center; gap: 8px; border-radius: 9px; padding: 11px 13px; margin-bottom: 14px; background: #eaf8ef; color: #145b33; }
.notice.error { background: #fff0f1; color: #87262d; }
.notice a, .text-link { color: #6c4900; font-weight: 710; text-decoration: underline; text-underline-offset: 3px; }
.empty { display: flex; align-items: center; gap: 9px; padding: 15px; color: var(--muted); background: #f8f9fb; border-radius: 10px; margin-top: 8px; }
.list-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 11px 0; overflow-wrap: anywhere; }
.list-line:first-child { border-top: 0; }
.list-line small, .order-heading small, .product-pick small { display: block; font-size: .78rem; }
.list-line > :last-child { text-align: right; }
.summary { font-weight: 730; }
.dot { display: inline-block; vertical-align: .15em; width: 7px; height: 7px; background: #c18a14; margin: 0 .45em; border-radius: 50%; }
.pill { display: inline-block; padding: 4px 9px; border-radius: 20px; font-size: .75rem; font-weight: 740; }
.pill.free, .table-tile.free { color: #135938; background: #eaf8ef; border-color: #cdebd7; }
.pill.open, .table-tile.open { color: #694600; background: #fff4cf; border-color: #efdc9e; }
.pill.payment, .pill.danger, .table-tile.payment { color: #852631; background: #fcecef; border-color: #efc8ce; }
.pill.closed, .pill.void { color: #444a53; background: #edf0f3; }
.legend { margin-bottom: 13px; }
.table-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(146px,1fr)); gap: 12px; margin-bottom: 18px; }
.table-tile { display: grid; width: 100%; height: 100%; min-height: 120px; justify-items: start; align-content: center; gap: 5px; border: 1px solid; border-radius: 13px; padding: 14px; text-align: left; }
.table-tile b { font-size: 1.16rem; }
.table-tile span { font-size: .8rem; }
.table-tile:hover { filter: brightness(.97); }
.breadcrumb-line { margin-bottom: 12px; color: var(--muted); font-size: .87rem; }
.product-picker { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; padding: 2px; margin: 10px 0 16px; }
.product-pick { display: flex; align-items: center; text-align: left; gap: 9px; border: 1px solid var(--line); border-radius: 9px; min-height: 54px; background: #fafafb; color: var(--ink); padding: 8px; }
.product-pick:hover { background: #fff7df; }
.product-pick span { flex: 1; overflow-wrap: anywhere; }
.product-pick strong { font-size: .88rem; white-space: nowrap; }
.product-pick img { width: 38px; height: 38px; object-fit: cover; border-radius: 7px; }
.cart-heading, .cart-item-heading, .order-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cart-heading { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 10px; }
.cart-fields { display: grid; grid-template-columns: 95px minmax(0,1fr); gap: 8px; margin-top: 7px; }
.cart-line, .order { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; overflow-wrap: anywhere; }
.order-heading { margin-bottom: 9px; flex-wrap: wrap; }
.subtle-details { margin: 8px 0; font-size: .84rem; }
.subtle-details summary { color: var(--honey-dark); cursor: pointer; padding: 6px 0; font-weight: 650; }
.tabs-nav { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs-nav a { padding: 10px; border-bottom: 3px solid transparent; color: var(--muted); }
.tabs-nav a[aria-current] { border-color: #c78e17; color: var(--ink); font-weight: 730; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .78rem; background: #f8f9fb; }
td { font-size: .88rem; }
.tags { margin-top: 12px; }
.public-page { min-height: 100dvh; display: grid; place-items: center; background: radial-gradient(ellipse at 35% 15%,#41403b,#202226 55%); }
.public-main { width: min(100% - 32px, 440px); padding: 24px 0; }
.login-card { padding: clamp(20px, 6vw, 34px); }
.login-card h1 { font-size: 1.9rem; }
.login-brand { padding: 0; margin-bottom: 24px; }
.login-brand strong { color: #765100; }
.login-brand small { color: var(--muted); }
.login-card .bee-btn { justify-self: stretch; margin-top: 3px; }
@media (max-width: 900px) {
    :root { --sidebar: 202px; }
    .tab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 730px) {
    .sidebar { display: none; width: 235px; top: 57px; box-shadow: 12px 10px 28px #15171930; }
    .menu-open .sidebar { display: flex; }
    .main { margin-left: 0; }
    .topbar { min-height: 57px; position: sticky; top: 0; z-index: 11; }
    .menu-toggle { display: inline-flex; }
    .topbar span, .topbar div > svg { display: none; }
    .topbar small { white-space: nowrap; font-size: .76rem; }
    .page { padding-top: 17px; }
    .two-col { grid-template-columns: 1fr; }
    input:not([type=checkbox]), textarea, select { font-size: 16px; }
}
@media (max-width: 400px) {
    .table-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .fields { grid-template-columns: 1fr; }
    .section-head { flex-wrap: wrap; }
}
@media print {
    .sidebar, .topbar, .tabs-nav, .no-print, .notice { display: none !important; }
    body, .panel { background: white; box-shadow: none; }
    .main { margin: 0; }
    .page { padding: 0; }
    .table-wrap { overflow: visible; }
    thead { display: table-header-group; }
    tr { break-inside: avoid; }
}

/* Área de toque e navegação da operação móvel. */
.connection { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.connection::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #987309; }
.connection[data-state="ok"]::before { background: #238449; }
.connection[data-state="error"]::before { background: #b73040; }
.mobile-nav { display: none; }
.cart-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.print-job { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px 8px; padding: 8px; margin: 8px 0; border-radius: 9px; background: #f6f7f9; }
.print-job small { grid-column: 1 / -1; color: var(--muted); overflow-wrap: anywhere; }
.print-job small:empty { display: none; }
.print-job form { grid-row: 1; grid-column: 2; }
.subtle-details form { margin: 7px 0 12px; }
.subtle-details summary { min-height: 45px; display: list-item; padding: 12px 0; }
@media (max-width: 730px) {
    .page { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
    .mobile-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); position: fixed; z-index: 12;
        bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line);
        padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -3px 18px #18191a13; }
    .mobile-nav a { display: flex; align-items: center; justify-content: center; flex-direction: column;
        gap: 3px; min-height: 54px; color: #505762; font-size: .76rem; font-weight: 720; border-radius: 9px; }
    .mobile-nav a[aria-current] { background: #fff3ce; color: #654600; }
    .sidebar { bottom: calc(63px + env(safe-area-inset-bottom)); }
    .bee-btn, input:not([type=checkbox]):not([type=hidden]), textarea, select { min-height: 48px; }
    .cart-actions { display: grid; grid-template-columns: 1fr; }
    .cart-actions .primary { grid-row: 1; }
    .print-job { grid-template-columns: minmax(0,1fr); }
    .print-job form { grid-row: auto; grid-column: 1; }
    .print-job .bee-btn { width: 100%; }
    .list-line { min-width: 0; }
    .list-line > * { min-width: 0; }
    .section-head { flex-wrap: wrap; }
    .filter, .filter-dates { width: 100%; }
    .filter label { flex: 1 1 135px; }
    .filter .bee-btn { flex: 0 0 auto; }
}
@media print { .mobile-nav { display: none !important; } }
