/* Compact phone layout. Loaded only on screens up to 760px. */
body { background: #f7f5f8; }
.topbar { height: 50px; padding: 0 10px; gap: 9px; }
.mobile-toggle { width: 36px; height: 36px; padding: 7px; }
.global-search { min-width: 0; }
.global-search:after { font-size: 18px; white-space: nowrap; }
.profile { min-width: 36px; min-height: 36px; justify-content: center; }
.main { padding: 10px 10px 82px; min-height: calc(100dvh - 50px); }
.page-head { gap: 8px; margin-bottom: 10px; align-items: center; }
.page-head > div:first-child { min-width: 0; }
.page-head h1 { font-size: 18px; line-height: 1.25; letter-spacing: -.5px; }
.page-head p, .page-head .eyebrow { display: none; }
.page-head > .actions { gap: 5px; flex-shrink: 0; }
.page-head > .actions .btn { min-height: 36px; }
.page-head > .actions .btn.primary { padding: 7px 9px; font-size: 11px; }
.page-head > .actions .btn:not(.primary) { padding: 8px; }
.actions { gap: 6px; }
.btn { min-height: 36px; padding: 7px 10px; font-size: 12px; border-radius: 8px; }
.btn.small { min-height: 32px; padding: 5px 8px; font-size: 11px; }
.btn.icon { min-width: 36px; min-height: 36px; }
.mt { margin-top: 10px; }
.mb { margin-bottom: 10px; }
.subtle { font-size: 11px; }
.empty { padding: 20px 12px; }

/* Keep the visual identity while putting today's work higher on the screen. */
.hero { min-height: 144px; padding: 14px 16px; border-radius: 12px; }
.hero h1, .hero h2 { font-size: 24px; line-height: 1.08; margin: 0 0 10px; max-width: 245px; }
.hero-label, .hero-copy > p { display: none; }
.hero .btn { margin-top: 0; padding: 7px 10px; min-height: 34px; font-size: 11px; }
.metric-grid { gap: 7px; margin: 9px 0 11px; }
.metric { padding: 9px 10px; border-radius: 10px; }
.metric-label { font-size: 11px; line-height: 1.35; padding-right: 23px; }
.metric-symbol { width: 22px; height: 22px; top: 8px; right: 8px; border-radius: 6px; }
.metric-symbol svg { width: 13px; height: 13px; }
.metric-value { font-size: 21px; line-height: 1.2; margin: 5px 0 3px; }
.metric-foot { font-size: 10px; line-height: 1.35; }
.dashboard-grid, .dashboard-lower { gap: 10px; }
.dashboard-lower { margin-top: 10px; }
.panel { border-radius: 11px; }
.panel-head { padding: 11px 12px 8px; gap: 8px; }
.panel-head h2 { font-size: 13px; line-height: 1.3; }
.panel-head p { margin-top: 3px; font-size: 11px; line-height: 1.4; }
.panel-body { padding: 11px 12px; }
.panel-head + .panel-body { padding-top: 5px; }
.chart { height: auto; padding: 0 12px; }
.chart > svg, .dashboard-grid .chart > svg { height: 130px; }
.chart-label { padding: 3px 12px 10px; font-size: 10px; }
.collection-row, .dashboard-grid > .panel:last-child .collection-row { padding: 8px 0; gap: 9px; }
.collection-row strong { font-size: 12px; margin-bottom: 3px; }
.collection-row small { font-size: 10px; }
.goal-strip { padding: 12px; gap: 12px; }
.goal-ring { width: 60px; height: 60px; flex: none; }
.quick-actions { padding: 10px 0 0; gap: 8px; }
.quick-action { padding: 10px 8px; gap: 5px; }

/* Horizontal tables retain every field; actions no longer inflate each row. */
.table { font-size: 13px; }
.table th, .table.dense th { padding: 8px 10px; font-size: 11px; }
.table td, .table.dense td { padding: 8px 10px; font-size: 13px; }
.table strong, .table.dense strong { font-size: 13px; }
.table small { font-size: 10px; margin-top: 3px; }
.table td > .actions { flex-wrap: nowrap; }
.table td:last-child { white-space: nowrap; }
.table.dense td:nth-child(2), .table.dense th:nth-child(2) { display: table-cell; }
.table .product-cell { gap: 8px; min-width: 175px; }
.table-foot { padding: 9px 12px; font-size: 11px; }
.table-wrap { overscroll-behavior-x: contain; }
.toolbar { margin-bottom: 9px; gap: 6px; }
.toolbar .search-box { min-width: 0; flex-basis: 145px; }
.toolbar .btn { padding: 7px 8px; font-size: 11px; }
.toolbar .segmented { flex: none; padding: 2px; }
.toolbar .segmented .btn { min-width: 31px; min-height: 31px; padding: 5px; }
.search-box { padding: 0 8px; min-height: 36px; }
.search-box input { min-width: 0; font-size: 16px; min-height: 36px; padding: 6px 0; }
.search-box svg { width: 15px; }
.chips { gap: 5px; margin-bottom: 8px; }
.chips .chip { padding: 6px 10px; min-height: 34px; font-size: 11px; }
.filters { gap: 8px; padding: 10px; margin-bottom: 10px; }
.filters label { min-width: 120px; }
.page-tabs { gap: 3px; margin-bottom: 10px; }
.page-tabs button { padding: 8px 10px; min-height: 36px; font-size: 12px; }
.panel > .toolbar { padding: 8px 10px; }

/* Products and point of sale: less photo height, more items in view. */
.catalog-grid { gap: 8px; }
.product-card { padding: 6px; border-radius: 10px; }
.product-card .photo { aspect-ratio: 1.5; border-radius: 6px; }
.product-card .product-copy { padding: 6px 2px 2px; }
.product-copy > strong { font-size: 13px; min-height: 0; line-height: 1.35; margin-top: 3px; }
.product-card small { font-size: 10px; margin-top: 0; }
.product-card .price-row { margin-top: 6px; gap: 4px; }
.product-card .price { font-size: 13px; font-weight: 650; white-space: nowrap; }
.product-card .stock-label { top: 10px; left: 10px; font-size: 9px; padding: 3px 5px; }
.product-card .add { width: 26px; height: 26px; }
.pdv .panel-body { padding: 10px; }
.pdv .catalog-grid { gap: 6px; padding-bottom: 50px; }
.pdv .product-card { grid-template-columns: 48px minmax(0,1fr); gap: 8px; padding: 7px; min-height: 66px; }
.pdv .product-card .photo { width: 48px; height: 52px; }
.pdv .product-copy { min-width: 0; grid-template-columns: minmax(0,1fr) auto; gap: 2px 5px; padding: 0; }
.pdv .product-copy > strong { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.pdv .product-copy > small { font-size: 10px; line-height: 1.3; }
.pdv .product-copy .price-row { gap: 4px; }
.pdv .product-copy .price { font-size: 12px; }
.mobile-cart-button { left: 10px; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); padding: 11px 13px; min-height: 43px; font-size: 12px; }
.cart-open .pdv .cart, .pdv .cart.mobile-open { top: 50px; border-radius: 12px 12px 0 0; }
.cart-open .mobile-cart-button { display: none; }
.cart-header { padding: 10px 12px; }
.cart-client { padding: 8px 12px; }
.cart-client input { font-size: 16px; }
.cart-seller { padding: 6px 12px; }
.cart-seller .field { flex-direction: row; align-items: center; gap: 8px; }
.cart-seller .field > span { flex: none; }
.cart-seller select { min-width: 0; min-height: 36px; width: auto; }
.cart-lines { min-height: 88px; max-height: calc(100dvh - 410px); }
.cart-line { padding: 9px 12px; gap: 6px 9px; }
.cart-line-title { font-size: 13px; line-height: 1.35; }
.cart-line-sub { font-size: 10px; }
.cart-line-bottom { margin-top: 2px; padding-left: 0; flex-wrap: wrap; gap: 6px; }
.cart-line-bottom > strong { margin-left: auto; white-space: nowrap; }
.qty button { width: 30px; height: 30px; }
.cart-line .remove { width: 30px; min-height: 30px; }
.cart-footer { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
.cart-row { margin: 7px 0; font-size: 12px; }
.cart-total { margin: 10px 0; }
.cart-total strong { font-size: 23px; }

/* Forms keep readable inputs without the large desktop spacing. */
.form-grid, .form-grid.three { gap: 10px; }
.field { gap: 4px; }
.field > span { font-size: 12px; line-height: 1.35; }
input, select, textarea, .field input, .field select, .field textarea { min-height: 38px; padding: 7px 9px; font-size: 16px; }
input[type=checkbox] { min-height: 0; padding: 0; }
textarea { min-height: 64px; }
.form-section { padding: 12px; }
.form-section h3 { margin-bottom: 10px; font-size: 13px; }
.form-actions { padding: 11px 12px; gap: 6px; flex-wrap: wrap; }
.form-note, .fine { font-size: 11px; line-height: 1.5; }
.notice { padding: 10px 12px; font-size: 12px; line-height: 1.5; }
.overlay { padding: 8px; }
.modal { max-height: calc(100dvh - 16px); border-radius: 13px; }
.modal-head { padding: 12px 14px; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 12px 14px; }
.modal-footer { padding: 10px 14px; gap: 6px; }
.modal-footer .btn { font-size: 12px; min-height: 40px; }
.modal-body > .field + .field { margin-top: 10px; }
.variant-hero { grid-template-columns: 76px minmax(0,1fr); gap: 12px; margin-bottom: 12px; }
.variant-hero .photo { width: 76px; height: 76px; }
.variant-hero h2 { font-size: 20px; margin-bottom: 6px; }
.variant-block { margin: 12px 0; }
.variant-options { gap: 6px; margin-top: 6px; }
.variant-option { padding: 8px 10px; min-height: 36px; font-size: 12px; }
.checkout-payments { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.payment-choice { font-size: 11px; padding: 10px 5px; gap: 6px; }
.payment-summary { font-size: 26px; margin: 12px 0; }
.checkout-summary { padding: 10px 12px; }
.detail-summary { padding: 12px; }
.detail-summary dl { gap: 9px; font-size: 12px; }
.detail-summary .total { padding-top: 12px; margin-top: 12px; }
.settings-nav { margin-bottom: 10px; }
.settings-nav .btn { min-height: 36px; font-size: 12px; padding: 7px 9px; }
.settings-grid .panel-body > p { font-size: 12px; line-height: 1.5; }
.report-metrics { gap: 10px 18px; padding: 10px 12px; margin-bottom: 10px; }
.report-metrics > span { min-width: 0; font-size: 11px; }
.report-metrics strong { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.report-metrics.colorful { gap: 7px; }
.report-metrics.colorful > span { padding: 8px 10px; }
.toolbar[data-form=report] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; }
.toolbar[data-form=report] > button { grid-column: 1/-1; }
.retail-period { gap: 7px; }
.retail-period .field { min-width: 0; flex: 1 1 140px; }
.credit-history-head { gap: 8px; margin-bottom: 12px; }
.credit-history-head > div:last-child { padding: 9px 12px; }
.credit-history-head > div:last-child strong { font-size: 22px; }
.collection-cover .photo { max-height: 125px; }
.collection-copy { padding: 12px; }
.collection-cover h2 { font-size: 22px; }
.inbox .thread { padding: 9px 10px; }
.inbox .chat-body { height: calc(100dvh - 345px); min-height: 170px; padding: 12px; }
.chat-head { padding: 10px 12px; }
.chat-compose { padding: 9px 10px; }

/* Navigation and login use the same compact scale. */
.sidebar { width: min(280px,85vw); padding: 14px 12px 10px; }
.sidebar .brand { padding: 0 8px 14px; }
.nav-group { padding: 10px 10px 5px; font-size: 10px; letter-spacing: 1px; }
.nav-link { padding: 8px 10px; min-height: 36px; margin: 1px 0; font-size: 13px; }
.sidebar-footer { padding-top: 6px; }
.store-selector { padding: 8px 6px; }
.bottom-nav { padding: 5px 4px calc(5px + env(safe-area-inset-bottom)); }
.bottom-nav a, .bottom-nav button { min-height: 44px; min-width: 50px; gap: 3px; justify-content: center; font-size: 10px; }
.bottom-nav a svg, .bottom-nav button svg { width: 20px; height: 20px; }
.login-visual { min-height: 158px; padding: 64px 20px 16px; gap: 0; }
.login-visual > .brand { top: 16px; left: 20px; }
.login-visual h1 { font-size: 24px; line-height: 1.1; margin: 0; max-width: 310px; }
.login-visual .eyebrow { display: none; }
.login-main { padding: 20px; }
.login-card h1 { font-size: 23px; }
.login-card > p { margin: 8px 0 17px; font-size: 12px; line-height: 1.5; }
.login-card .field { margin-bottom: 12px; }
.login-card .local-login { margin-top: 16px; padding-top: 14px; }
.login-card .local-login p { margin: 6px 0 12px; font-size: 12px; }
.company-gate { padding: 24px 18px; }
#toast { bottom: calc(72px + env(safe-area-inset-bottom)); font-size: 12px; }

@media (max-width: 359px) {
 .page-head { flex-wrap: wrap; }
 .page-head > .actions { width: 100%; }
 .hero h1 { font-size: 22px; }
 .metric-foot { font-size: 9px; }
 .product-card .price { font-size: 12px; }
 .pdv .product-copy .add { display: none; }
 .toolbar .search-box { flex-basis: 100%; }
}
