:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18322f;
  background: #f6f7f3;
  --navy: #102630;
  --navy-soft: #193842;
  --cream: #f7f5ed;
  --white: #fff;
  --green: #148765;
  --green-dark: #0d6e50;
  --mint: #d9f4e6;
  --ink: #18322f;
  --muted: #647771;
  --line: #dee7e1;
  --danger: #a63c3c;
  --amber: #ad741b;
  --gold: #e6ac43;
  --shadow: 0 20px 55px rgba(20, 49, 43, .09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #e6ac43; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.045em; }
p { line-height: 1.6; }
svg { display: block; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 11px 15px; border-radius: 9px; background: white; color: var(--ink); text-decoration: none; }
.skip:focus { top: 10px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 850; letter-spacing: -.06em; font-size: 22px; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--green); color: white; }
.brand strong { color: var(--green); font-weight: 850; }
.brand .brand-mark svg { width: 27px; height: 27px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; background: var(--green); color: white; text-decoration: none; font-weight: 750; font-size: 13px; transition: background .16s, transform .16s, box-shadow .16s; }
.button:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(14, 125, 88, .16); }
.button:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }
.button.secondary { background: #ebf4ed; color: #155b43; }
.button.secondary:hover { background: #dcefe0; }
.button.ghost { background: white; color: var(--ink); border-color: #ceddd2; }
.button.ghost:hover { background: #f3f8f3; }
.button.danger { background: #fff1ef; color: var(--danger); border-color: #f0c5c2; }
.button.danger:hover { background: #ffe5e1; }
.button.small { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.button.icon { width: 40px; min-width: 40px; min-height: 40px; padding: 0; font-size: 19px; }
.muted { color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--green); font-size: 11px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow:before { content: ""; width: 7px; height: 7px; background: #20ad73; border-radius: 50%; box-shadow: 0 0 0 4px #e0f5e8; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { color: #33544b; font-size: 12px; font-weight: 800; }
.field-label { color: #33544b; font-size: 12px; font-weight: 800; }
.receipt-cost { display: flex; align-items: center; min-height: 43px; color: var(--ink); font-size: 15px; }
.field input, .field select, .field textarea { width: 100%; min-height: 43px; border: 1px solid #cbdad1; border-radius: 9px; background: #fff; color: var(--ink); outline: none; padding: 10px 12px; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px #d9f1e3; }
.field input::placeholder, .field textarea::placeholder { color: #9eaeb0; }
.field small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid > .feedback, .form-grid > .form-actions, .form-grid > .info-strip { grid-column: 1 / -1; }
.form-grid .checkbox-field { align-self: end; display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 43px; }
.form-grid .checkbox-field label { order: 1; }
.business-hours-fieldset { grid-column: 1 / -1; display:grid; gap:9px; margin:0; padding:16px; border:1px solid #d8e6de; border-radius:12px; background:#fbfefc; }
.business-hours-fieldset legend { padding:0 5px; color:#244c3d; font-size:13px; font-weight:850; }
.business-hours-fieldset > small { color:var(--muted); font-size:11px; line-height:1.5; }
.business-hours-row { display:grid; grid-template-columns:minmax(130px,1fr) 130px auto 130px; align-items:center; gap:9px; }
.business-hours-day { display:flex; align-items:center; gap:8px; color:#33544b; font-size:12px; font-weight:750; }
.business-hours-day input { width:16px; height:16px; accent-color:var(--green); }
.business-hours-row input[type=time] { min-height:38px; border:1px solid #cbdad1; border-radius:8px; padding:7px 9px; background:#fff; color:var(--ink); }
.business-hours-separator { color:var(--muted); font-size:11px; text-align:center; }
.checkbox-line { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 750; color: var(--ink); }
.checkbox-line input { width: 17px; height: 17px; accent-color: var(--green); }
.role-set { display: grid; gap: 10px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.role-set legend { color: #33544b; font-size: 12px; font-weight: 850; padding: 0 5px; }
.pairing-code { width: max-content; max-width: 100%; margin: 15px 0; padding: 16px 22px; border: 1px dashed #6cbf88; border-radius: 12px; background: #e9f8ee; color: #145a3c; font-size: clamp(20px, 3vw, 29px); font-weight: 850; letter-spacing: .06em; overflow-wrap: anywhere; user-select: all; }
.terminal-state { display: grid; gap: 4px; justify-items: start; }
.terminal-state small { color: #885b17; font-size: 11px; font-weight: 700; white-space: nowrap; }
.recovery-steps { margin: 16px 0; padding-left: 20px; color: var(--ink); font-size: 13px; line-height: 1.7; }
.backup-key-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.connection-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 19px; }
.connection-field { min-width: 0; display: grid; align-content: start; gap: 7px; }
.connection-field > strong { font-size: 12px; color: var(--ink); }
.connection-field > small { font-size: 11px; color: var(--muted); line-height: 1.5; }
.connection-value { display: flex; gap: 7px; min-width: 0; }
.connection-value input { flex: 1; min-width: 0; min-height: 37px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f7faf7; color: #23553d; font: 700 12px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace; }
.connection-value .button { flex: none; }
.connection-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.dialog .connection-grid { grid-template-columns: 1fr; }
.feature-list { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.feedback { padding: 12px 14px; border-radius: 9px; font-size: 13px; line-height: 1.5; }
.feedback.error { color: #8e3131; background: #ffefec; border: 1px solid #f5cdc6; }
.feedback.success { color: #0c6143; background: #e7f6eb; border: 1px solid #c2e9d1; }
.feedback.info { color: #395c66; background: #edf6f8; border: 1px solid #cde3e7; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 100px; background: #e8f6ed; color: #0d6847; font-size: 11px; font-weight: 750; white-space: nowrap; }
.badge.warn { color: #885b17; background: #fff2d9; }
.badge.neutral { color: #52635e; background: #edf1ee; }
.badge.danger { color: #943d3d; background: #ffece9; }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 48px 20px; border: 1px dashed #cbdcd0; border-radius: 14px; background: #fafcf9; }
.empty-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: #e8f6ed; color: var(--green); font-size: 22px; }
.empty h3 { margin: 8px 0 0; font-size: 17px; }
.empty p { color: var(--muted); font-size: 13px; margin: 0; max-width: 440px; }
.skeleton { background: linear-gradient(100deg, #edf1ed 5%, #f7faf7 35%, #edf1ed 65%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 7px; }
@keyframes shimmer { to { background-position-x: -200%; } }

/* Access */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(350px, 48%) 1fr; background: #fbfcf9; }
.auth-aside { display: flex; flex-direction: column; justify-content: space-between; gap: 70px; padding: clamp(28px, 5vw, 70px); background: radial-gradient(circle at 85% 24%, #29635d 0, transparent 43%), linear-gradient(155deg, #102630, #143b38); color: white; overflow: hidden; position: relative; }
.auth-aside:after { content: ""; position: absolute; width: 470px; height: 470px; border-radius: 50%; border: 1px solid #ffffff16; right: -190px; bottom: -250px; pointer-events: none; }
.auth-aside .brand { color: white; }
.auth-aside .brand strong { color: #8ee0ad; }
.auth-aside-content { position: relative; z-index: 1; max-width: 540px; }
.auth-aside-content h1 { font-size: clamp(38px, 4vw, 64px); line-height: 1.07; margin: 22px 0; }
.auth-aside-content h1 em { font-style: normal; color: #a2eab7; }
.auth-aside-content p { color: #c4d8d1; font-size: 16px; max-width: 480px; }
.auth-preview { display: grid; gap: 12px; margin-top: 32px; padding: 20px; border: 1px solid #ffffff38; border-radius: 18px; background: #ffffff10; backdrop-filter: blur(9px); max-width: 420px; }
.auth-preview-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.auth-preview-bars { display: flex; align-items: end; gap: 9px; height: 68px; padding-top: 12px; }
.auth-preview-bars span { flex: 1; min-height: 22%; border-radius: 5px 5px 2px 2px; background: #7ed5a1; }
.auth-preview-bars span:nth-child(2) { height: 45%; }
.auth-preview-bars span:nth-child(3) { height: 66%; }
.auth-preview-bars span:nth-child(4) { height: 48%; }
.auth-preview-bars span:nth-child(5) { height: 80%; background: #bbebc8; }
.auth-aside-foot { color: #9fbfb3; font-size: 11px; }
.auth-main { display: flex; flex-direction: column; padding: 30px clamp(24px, 5vw, 90px); }
.auth-back { align-self: flex-end; color: #5c756a; font-size: 12px; font-weight: 750; text-decoration: none; }
.auth-back:hover { color: var(--green); }
.auth-center { width: min(440px, 100%); margin: auto; padding: 50px 0; }
.auth-center h2 { font-size: 34px; margin: 0 0 9px; line-height: 1.2; }
.auth-center>p { color: var(--muted); font-size: 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; margin: 26px 0; border-radius: 11px; background: #eaf0eb; }
.auth-tabs button { border: 0; border-radius: 8px; padding: 12px; background: transparent; color: #637a6a; font-weight: 800; font-size: 13px; }
.auth-tabs button[aria-selected="true"] { background: white; color: var(--ink); box-shadow: 0 4px 12px #163a2511; }
.auth-form { display: grid; gap: 17px; }
.auth-form .button { margin-top: 5px; width: 100%; }
.auth-footnote { padding-top: 18px; margin-top: 22px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.auth-footnote a { color: var(--green-dark); font-weight: 800; }
.auth-message { margin: 16px 0 0; }
.account-choice-copy { margin-bottom: 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.account-choice-list { display: grid; gap: 11px; }
.account-choice-card { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; text-decoration: none; box-shadow: 0 8px 24px #163a250b; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.account-choice-card:hover { border-color: #7ab58f; box-shadow: 0 12px 28px #163a2514; transform: translateY(-1px); }
.account-choice-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: #176344; background: #e7f5e9; font-size: 18px; }
.account-choice-card strong, .account-choice-card small { display: block; }
.account-choice-card strong { font-size: 13px; }
.account-choice-card small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.account-choice-arrow { color: var(--green-dark); font-size: 18px; font-weight: 800; }
.profile-menu-section-title { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.profile-menu-switch { padding: 8px 10px; }
.profile-menu-link-note { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.auth-secret { display: block; margin-top: 10px; padding: 10px 12px; overflow-wrap: anywhere; border-radius: 8px; background: #fff; color: #173f48; font-size: 14px; letter-spacing: .08em; }
.auth-secret-uri { display: block; margin-top: 8px; overflow-wrap: anywhere; color: #56747a; }
.auth-recovery-codes { display: block; margin-top: 9px; color: #124e38; white-space: pre-line; line-height: 1.6; letter-spacing: .06em; }
.password-toggle { display: flex; align-items: center; gap: 7px; margin-top: 7px; border: 0; background: transparent; color: var(--green-dark); padding: 0; font-size: 11px; font-weight: 750; }
.auth-privacy { display: flex; align-items: start; gap: 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.auth-privacy input { margin-top: 2px; }
.auth-privacy a { color: var(--green-dark); }

/* Console shell */
.console { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0,1fr); background: #f5f7f4; }
.sidebar { display: flex; flex-direction: column; background: var(--navy); color: #d8e6df; min-height: 100vh; position: sticky; top: 0; height: 100vh; }
.sidebar-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 24px 20px 18px; }
.sidebar .brand { color: #fff; font-size: 20px; }
.sidebar .brand strong { color: #a6edbe; }
.sidebar .brand-mark { width: 36px; height: 36px; }
.sidebar-close { display: none; }
.sidebar-tenant { margin: 6px 14px 22px; padding: 11px 13px; border: 1px solid #ffffff2a; border-radius: 10px; background: #ffffff0c; }
.sidebar-tenant small { display: block; color: #a7c2b5; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 5px; }
.sidebar-tenant select { width: 100%; background: transparent; color: white; border: 0; font-weight: 750; font-size: 13px; outline: none; }
.sidebar-tenant option { color: #17352c; }
.sidebar-scroll { overflow: auto; padding: 0 12px 25px; flex: 1; }
.nav-group { padding: 0 8px; margin: 22px 0 7px; color: #85a59a; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 9px; background: transparent; color: #c1d6ca; text-align: left; text-decoration: none; font-size: 12px; font-weight: 700; }
.nav-item:hover { color: white; background: #ffffff17; }
.nav-item.active { color: white; background: #1e7358; }
.nav-glyph { display: grid; place-items: center; flex: none; width: 20px; height: 20px; font-size: 17px; font-weight: 650; }
.sidebar-foot { border-top: 1px solid #ffffff1f; padding: 17px 18px; }
.sidebar-foot .user-name { color: white; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.sidebar-foot .user-role { color: #9fbaa9; font-size: 11px; margin-top: 4px; }
.sidebar-foot button { width: 100%; margin-top: 13px; }
.brand-lockup { display: grid; line-height: 1; }
.brand-lockup small { margin-top: 5px; color: #9fbaa9; font-size: 10px; font-weight: 650; letter-spacing: .01em; }
.sidebar-signature { display: grid; gap: 2px; margin-top: 14px; color: #9fbaa9; font-size: 10px; line-height: 1.5; }
.sidebar-signature b { color: var(--gold); font-weight: 800; }
.sidebar-foot .sidebar-about { width: auto; margin: 0; padding: 0; border: 0; background: transparent; color: #d8e6df; font-size: 10px; font-weight: 750; text-decoration: underline; }
.console-main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; padding: 14px clamp(22px, 3vw, 42px); background: #fff; border-bottom: 1px solid var(--line); }
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.menu-button { display: none; }
.breadcrumb { color: #83948a; font-size: 11px; }
.breadcrumb strong { color: var(--ink); font-weight: 750; }
.topbar-right { display: flex; gap: 14px; align-items: center; }
.topbar-right .environment { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 100px; background: #eaf6ee; color: #176444; font-size: 11px; font-weight: 800; }
.topbar-right .environment:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2cab6c; }
.topbar-date { color: #6c8173; font-size: 11px; }
.page { width: min(1320px, 100%); margin-inline: auto; padding: 34px clamp(22px, 3vw, 42px) 80px; }
.page-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-head h1 { margin: 8px 0 6px; font-size: clamp(27px, 2.5vw, 36px); line-height: 1.15; }
.page-head p { color: var(--muted); font-size: 13px; margin-bottom: 0; max-width: 710px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: end; }
.surface { border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 8px 26px rgba(22, 54, 40, .035); }
.surface.pad { padding: 23px; }
.surface h2 { font-size: 16px; margin: 0 0 8px; }
.surface h3 { font-size: 14px; margin: 0 0 7px; }
.surface p { color: var(--muted); font-size: 12px; }
.surface + .surface { margin-top: 16px; }
.section-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metric { position: relative; overflow: hidden; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.metric:after { content: ""; position: absolute; width: 94px; height: 94px; right: -42px; top: -39px; border-radius: 50%; background: #e9f7ed; }
.metric .label { display: block; position: relative; color: var(--muted); font-size: 11px; font-weight: 750; }
.metric strong { display: block; position: relative; font-size: 26px; letter-spacing: -.045em; margin: 13px 0 4px; overflow-wrap: anywhere; }
.metric small { position: relative; font-size: 11px; color: #82958a; }
.toolbar { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.toolbar .field { min-width: min(270px,100%); }
.toolbar .field input, .toolbar .field select { min-height: 38px; font-size: 12px; }
.toolbar-meta { font-size: 11px; color: var(--muted); }
.toolbar .checkbox-line { margin-top: 0; min-height: 38px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { white-space: nowrap; color: #70857a; background: #fafcf9; font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; padding: 13px 17px; }
td { border-top: 1px solid #edf1ed; padding: 14px 17px; color: #3b5448; font-size: 12px; line-height: 1.5; vertical-align: middle; }
td strong { color: var(--ink); }
td small { display: block; color: #829488; }
tr:hover td { background: #fcfefb; }
td.actions { white-space: nowrap; text-align: right; }
.table-action { border: 0; border-radius: 7px; background: #ecf7ee; color: #116b47; padding: 7px 10px; margin-left: 4px; font-size: 11px; font-weight: 800; }
.table-action:hover { background: #d9f0e0; }
.table-action.danger { background: #fff0ed; color: #9d4242; }
.table-action:disabled { opacity: .5; cursor: wait; }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.table-footer .button { min-height: 32px; }
.info-strip { display: flex; gap: 12px; align-items: start; padding: 15px 17px; border: 1px solid #cfe3d6; border-radius: 11px; background: #f1faf3; color: #3e6550; font-size: 12px; line-height: 1.6; margin-bottom: 18px; }
.info-strip.warn { border-color: #f1ddad; background: #fffaf0; color: #785b27; }
.info-strip strong { color: #174c37; }
.detail-list { display: grid; gap: 0; }
.detail-row { display: flex; justify-content: space-between; gap: 22px; padding: 13px 0; border-bottom: 1px solid #edf2ed; font-size: 12px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row span:first-child { color: var(--muted); }
.detail-row span:last-child { text-align: right; font-weight: 750; overflow-wrap: anywhere; }
.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: grid; gap: 8px; max-width: min(380px,calc(100vw - 44px)); }
.toast { border-radius: 11px; border: 1px solid #cce8d4; padding: 13px 17px; background: #f1fcf3; box-shadow: var(--shadow); color: #115a3d; font-size: 12px; font-weight: 750; }
.toast.error { border-color: #ecc6c2; background: #fff1ef; color: #9b3737; }
.dialog-backdrop { position: fixed; z-index: 80; inset: 0; background: #0c252aba; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog { width: min(670px,100%); max-height: min(90vh,900px); overflow: auto; background: white; border-radius: 19px; box-shadow: 0 30px 90px #0004; }
.dialog-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; padding: 25px 28px 19px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 22px; margin: 0 0 6px; }
.dialog-head p { font-size: 12px; color: var(--muted); margin: 0; }
.dialog-body { padding: 25px 28px 29px; }
.dialog-close { border: 0; background: #f0f3ef; color: #50665a; width: 32px; height: 32px; border-radius: 8px; font-size: 21px; line-height: 1; }
.dialog-close:hover { background: #e3ebe4; }
.dialog-message { margin-top: 15px; }
.label-print-form { display: grid; gap: 18px; }
.label-print-form > .info-strip, .label-print-form > .form-actions, .label-print-form > .feedback { margin: 0; }
.label-print-size { display: flex; align-items: center; min-height: 43px; font-size: 15px; }
.label-print-preview { display: grid; justify-items: center; gap: 12px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f2f5f2; }
.label-print-preview figcaption { font-size: 12px; font-weight: 750; color: var(--muted); }
.label-print-sheet { box-shadow: 0 0 0 1px #cbd6cd, 0 5px 15px #18322f12; }
.label-print-preview .feedback { margin: 0; }
.label-print-help { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.mobile-scrim { display: none; }
.chart-bars { display: flex; align-items: end; gap: 8px; min-height: 150px; padding: 10px 0 0; }
.chart-bars .bar { flex: 1; min-height: 3px; border-radius: 5px 5px 2px 2px; background: #bde7c8; }
.chart-bars .bar:last-child { background: var(--green); }
.chart-labels { display: flex; justify-content: space-between; color: #90a198; font-size: 10px; margin-top: 11px; }
.app-loading { display: grid; place-items: center; min-height: 100vh; color: var(--muted); font-size: 13px; background: #f6f8f5; }
.app-loading strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 7px; }
.app-loading small { display: block; margin-top: 10px; font-size: 10px; }
.profile-menu-wrap { position: relative; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border: 0; cursor: pointer; background: #e4f5e9; color: #137450; border-radius: 10px; font-size: 13px; font-weight: 900; }
.avatar:hover, .avatar[aria-expanded="true"] { background: #ccebd7; }
.profile-menu { position: absolute; z-index: 70; top: calc(100% + 10px); right: 0; width: min(280px, calc(100vw - 28px)); padding: 14px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 45px #163b2726; }
.profile-menu[hidden] { display: none; }
.profile-menu-name { display: block; color: var(--ink); font-size: 13px; }
.profile-menu-email { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.profile-menu-divider { height: 1px; margin: 12px 0; background: var(--line); }
.profile-menu-link, .profile-menu-logout { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; color: var(--ink); background: transparent; font: inherit; font-size: 12px; font-weight: 750; text-align: left; text-decoration: none; cursor: pointer; }
.profile-menu-link:hover, .profile-menu-logout:hover { background: #eef7ef; color: var(--green-dark); }

@media (max-width: 1160px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .console { grid-template-columns: 224px minmax(0,1fr); }
}
@media (max-width: 850px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { min-height: 245px; padding: 25px; gap: 28px; }
  .auth-aside-content h1 { font-size: 32px; margin: 13px 0; }
  .auth-aside-content p { font-size: 13px; }
  .auth-preview, .auth-aside-foot { display: none; }
  .auth-main { min-height: calc(100vh - 245px); }
  .console { display: block; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: min(290px,83vw); transform: translateX(-102%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close, .menu-button { display: inline-flex; }
  .mobile-scrim.open { display: block; position: fixed; z-index: 50; inset: 0; background: #0e262daa; }
  .topbar { min-height: 64px; }
}
@media (max-width: 650px) {
  .container { width: min(100% - 28px,560px); }
  .auth-center { padding: 30px 0 55px; }
  .auth-center h2 { font-size: 29px; }
  .topbar { padding: 12px 15px; }
  .topbar-date { display: none; }
  .page { padding: 26px 15px 70px; }
  .page-head { flex-direction: column; gap: 14px; }
  .page-actions { justify-content: start; width: 100%; }
  .page-actions .button { flex: 1; }
  .section-grid, .metric-grid { grid-template-columns: 1fr; }
  .metric { padding: 18px; }
  .metric strong { font-size: 24px; }
  .form-grid, .field-row { grid-template-columns: 1fr; }
  .connection-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .dialog-backdrop { align-items: end; padding: 0; }
  .dialog { width: 100%; border-radius: 17px 17px 0 0; max-height: 94vh; }
  .dialog-head, .dialog-body { padding-left: 19px; padding-right: 19px; }
  .toolbar .field { width: 100%; }
  th, td { padding: 12px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .sidebar { transition: none; }
  .skeleton { animation: none; }
}
:root{--product-thumb-size:42px}
.product-thumb{display:block;width:var(--product-thumb-size);height:var(--product-thumb-size);object-fit:cover;border-radius:10px;border:1px solid #dce9e6;background:#f3faf7}
.products-page{width:100%;max-width:none;margin-inline:0}
.products-page .page-head{margin-bottom:20px}
.products-page .page-head h1{font-size:clamp(30px,3vw,42px)}
.products-page .page-head p{max-width:820px;font-size:14px}
.products-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 20px}
.products-overview .metric{padding:18px 20px;border-radius:15px;box-shadow:0 8px 22px rgba(22,54,40,.045)}
.products-overview .metric strong{font-size:27px;margin-top:10px}
.products-surface{overflow:hidden;border-radius:18px;box-shadow:0 12px 34px rgba(22,54,40,.06)}
.products-page .toolbar{padding:19px 22px;background:linear-gradient(180deg,#fff,#fbfdfb)}
.products-page .toolbar .field{min-width:min(380px,100%)}
.products-page .toolbar .field input{min-height:44px;font-size:13px}
.products-content .table-wrap{overflow-x:auto;padding:0 8px 8px}
.products-content table{width:100%;min-width:0;table-layout:fixed;border-collapse:separate;border-spacing:0 8px}
.products-content thead th{padding:11px 13px;border:0;background:transparent;color:#819287;font-size:10px;letter-spacing:.09em}
.products-content tbody tr{background:#fff;box-shadow:0 3px 13px rgba(22,54,40,.045)}
.products-content tbody tr:hover td{background:#fbfefb}
.products-content tbody td{padding:13px;border-top:1px solid #e3ece5;border-bottom:1px solid #e3ece5;background:#fff;vertical-align:middle}
.products-content tbody td:first-child{width:23%;border-left:1px solid #e3ece5;border-radius:12px 0 0 12px}
.products-content tbody td:nth-child(2){width:13%}
.products-content tbody td:nth-child(3){width:10%;color:#426556;font-size:11px;font-weight:750}
.products-content tbody td:nth-child(4){width:22%}
.products-content tbody td:nth-child(5){width:8%;font-size:14px;font-weight:850;color:#20734d;white-space:nowrap}
.products-content tbody td:nth-child(6){width:9%}
.products-content tbody td.actions{width:15%;border-right:1px solid #e3ece5;border-radius:0 12px 12px 0;white-space:normal;text-align:right}
.products-content .table-action{margin:2px 0 2px 4px}
.product-identity{display:flex;align-items:center;gap:12px;min-width:0}
.product-thumb-large{--product-thumb-size:56px;width:56px;height:56px;border-radius:13px;box-shadow:0 5px 12px rgba(28,67,47,.09)}
.product-identity-copy{display:grid;gap:5px;min-width:0}
.product-identity-copy strong{color:var(--ink);font-size:13px;overflow-wrap:anywhere}
.product-identity-copy small{color:var(--muted);font-size:11px;line-height:1.35;overflow-wrap:anywhere}
.product-code-stack{display:grid;gap:4px;color:#365a4d;font-size:11px;line-height:1.35}
.product-code-stack small{color:var(--green-dark);font-size:10px;font-weight:750}
.product-financial-stack{display:grid;gap:5px}
.product-financial-line{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#7a8b81;font-size:10px}
.product-financial-line strong{color:#385c4c;font-size:11px;white-space:nowrap}
.product-financial-line.highlight{padding-bottom:5px;border-bottom:1px solid #e5eee7}
.product-financial-line.highlight strong{color:var(--green-dark);font-size:14px}
.product-status-stack{display:grid;gap:6px;justify-items:start}
.product-status-stack small{color:#83948a;font-size:10px;line-height:1.3}
@media (max-width:900px){.products-overview{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:1100px){.products-content tbody td{padding:11px 9px}.products-content .table-action{font-size:10px;padding:6px 8px}}
@media (max-width:650px){.products-overview{grid-template-columns:1fr 1fr;gap:10px}.products-overview .metric{padding:15px}.products-overview .metric strong{font-size:22px}.products-page .toolbar{padding:16px}.products-content .table-wrap{padding-inline:3px}.products-content table{min-width:760px}.product-thumb-large{width:48px;height:48px;--product-thumb-size:48px}}
.business-hours-row { min-width:0; }
.mfa-qr { display:block; width:190px; height:190px; margin:12px auto; padding:10px; border:1px solid #d7e6dc; border-radius:12px; background:#fff; image-rendering:pixelated; }
.mfa-qr-help { display:block; margin:5px 0 10px; color:var(--muted); font-size:11px; line-height:1.45; }
@media (max-width: 620px) {
  .business-hours-row { grid-template-columns:minmax(105px,1fr) 1fr auto 1fr; gap:6px; }
  .business-hours-row input[type=time] { min-width:0; width:100%; }
}

/* Importação de NF-e */
.nfe-line { border: 1px solid var(--line, #e0e8e3); border-radius: 12px; padding: 12px; margin-top: 10px; display: grid; gap: 8px; }
.nfe-line-head { display: grid; gap: 2px; }
.nfe-line-head small, .nfe-hint { color: var(--muted, #6b7f78); }
.nfe-line-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.nfe-line-controls label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; }
.nfe-line-controls select, .nfe-line-controls input { width: 100%; min-height: 36px; }
.checkbox-line { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.nfe-line-controls label[hidden] { display: none; }

/* Inventário (pensado para celular) */
.inventory-scanner { display: grid; grid-template-columns: 2fr 1fr 1.3fr auto; gap: 10px; align-items: end; }
.inventory-scanner label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; }
.inventory-scanner input, .inventory-scanner select { min-height: 48px; font-size: 18px; }
.inventory-scanner .button { min-height: 48px; }
.inventory-feedback { min-height: 24px; margin: 10px 0; font-weight: 600; }
.inventory-feedback.ok { color: #0d8a6a; }
.inventory-feedback.error { color: #b24a50; }
.inventory-camera { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; margin-top: 10px; background: #000; }
.inventory-list { display: grid; gap: 6px; }
.inventory-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line, #e0e8e3); border-radius: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .inventory-scanner { grid-template-columns: 1fr 1fr; }
  .inventory-scanner label:first-child, .inventory-scanner .button { grid-column: 1 / -1; }
}
.transfer-lines { display: grid; gap: 8px; margin: 12px 0; }
.transfer-line { display: grid; grid-template-columns: 2fr 1fr auto; gap: 8px; }
.transfer-line select, .transfer-line input { min-height: 38px; }
@media (max-width: 640px) { .transfer-line { grid-template-columns: 1fr 1fr; } .transfer-line .combo { grid-column: 1 / -1; } }

.inventory-actions { padding: 0 18px 18px; }
.field[hidden] { display: none !important; }

/* Combobox com busca no servidor */
.combo { position: relative; min-width: 0; }
.combo input[type="search"] { width: 100%; min-height: 43px; border: 1px solid #cbdad1; border-radius: 9px; background: #fff; color: var(--ink); outline: none; padding: 10px 12px; }
.combo input[type="search"]:focus { border-color: var(--green); box-shadow: 0 0 0 3px #d9f1e3; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 232px; overflow-y: auto; margin: 0; padding: 5px; list-style: none; border: 1px solid #cbdad1; border-radius: 10px; background: #fff; box-shadow: 0 14px 34px rgba(20, 49, 43, .16); }
.combo-option { padding: 9px 10px; border-radius: 7px; color: var(--ink); font-size: 12px; line-height: 1.4; cursor: pointer; overflow-wrap: anywhere; }
.combo-option:hover, .combo-option.active { background: var(--mint); }
.combo-option.combo-clear { color: var(--muted); font-style: italic; }
.combo-note { padding: 9px 10px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.transfer-line .combo input[type="search"] { min-height: 38px; }

/* Sobre */
.about-lockup { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.about-lockup strong { color: var(--navy); font-size: 30px; letter-spacing: -.05em; }
.about-lockup small { color: var(--muted); font-size: 13px; font-weight: 650; }
.about a { color: var(--green-dark); font-weight: 800; }
.about-foot { margin: 16px 0 0; color: var(--muted); font-size: 11px; }
.conflict-items { margin: 12px 0 0; padding-left: 18px; color: var(--ink); font-size: 12px; line-height: 1.6; }
.conflict-payload { margin: 12px 0 0; font-size: 12px; }
.conflict-payload summary { color: var(--green-dark); font-weight: 750; cursor: pointer; }
.conflict-payload pre { max-height: 240px; margin: 8px 0 0; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: #f6f8f5; font-size: 11px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
