:root {
  --ink: #17201d;
  --muted: #718078;
  --line: #e7ebe8;
  --paper: #f5f7f5;
  --white: #fff;
  --dark: #111b18;
  --lime: #a7ed62;
  --lime-dark: #569c25;
  --orange: #ff9b50;
  --green: #47b979;
  --purple: #8c73e6;
  --shadow: 0 16px 50px rgba(31, 49, 42, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font: 800 21px "Manrope", sans-serif; letter-spacing: -.8px; }
.brand > span:last-child > span { color: #6ba638; }
.brand-mark { width: 33px; height: 33px; border-radius: 10px; background: var(--dark); display: grid; place-items: center; transform: rotate(-3deg); }
.brand-mark span { display: block; width: 15px; height: 9px; border: 3px solid var(--lime); border-top: 0; border-radius: 0 0 9px 9px; transform: rotate(-26deg); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 30; padding: 30px 22px 23px; overflow-y: auto; background: #fbfcfb; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.sidebar nav { display: grid; gap: 7px; margin-top: 42px; }
.sidebar nav a { height: 47px; padding: 0 14px; border-radius: 11px; display: flex; align-items: center; gap: 13px; color: #66736d; font-weight: 600; text-decoration: none; font-size: 14px; }
.sidebar nav a span { width: 22px; text-align: center; font-size: 20px; }
.sidebar nav a b { margin-left: auto; color: #55724a; background: #e7f5dc; min-width: 24px; padding: 3px 6px; text-align: center; border-radius: 7px; font-size: 11px; }
.sidebar nav a.active, .sidebar nav a:hover { color: var(--ink); background: #eaf5e3; }
.sidebar-card { margin-top: auto; padding: 14px; border: 1px solid #dce8d8; border-radius: 12px; background: #f4faef; display: flex; gap: 10px; }
.sidebar-card > span { color: #4fb36e; font-size: 10px; padding-top: 3px; }
.sidebar-card strong, .user-card strong { display: block; font-size: 12px; }
.sidebar-card small, .user-card small { color: var(--muted); font-size: 10px; }
.user-card { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 18px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; background: #d6e7cc; display: grid; place-items: center; color: #557c3f; font-size: 11px; font-weight: 800; }
.user-card button, .logout-link { border: 0; background: none; margin-left: auto; color: #7e8984; text-decoration: none; }
.main { margin-left: 252px; min-height: 100vh; }
.app-footer { margin-left: 252px; padding: 20px 40px 26px; color: #8b9690; text-align: center; font-size: 10px; }
.topbar { padding: 31px 40px 25px; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.72); backdrop-filter: blur(15px); }
.eyebrow { margin: 0 0 5px; color: #6f7e76; letter-spacing: 1.8px; font-size: 10px; font-weight: 800; }
.topbar h1 { margin: 0; font: 700 25px "Manrope"; letter-spacing: -.8px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.live-pill { padding: 9px 13px; border: 1px solid var(--line); border-radius: 20px; background: white; font-size: 11px; font-weight: 600; color: #5b6761; }
.live-pill i, .tracking-header i { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: #55c47e; box-shadow: 0 0 0 4px rgba(85,196,126,.15); animation: live 2s infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 7px rgba(85,196,126,0); } }
.icon-button { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 10px; background: white; position: relative; }
.icon-button span { position: absolute; top: 8px; right: 9px; width: 5px; height: 5px; background: #ee795f; border-radius: 50%; }
.primary-button { border: 0; border-radius: 10px; padding: 11px 18px; background: var(--dark); color: white; font-weight: 700; font-size: 12px; box-shadow: 0 8px 20px rgba(17,27,24,.14); }
.primary-button:hover { background: #24332e; transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; transform: none; }
.menu-button { display: none; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; padding: 24px 40px; }
.metrics article { background: var(--white); border: 1px solid var(--line); border-radius: 14px; min-height: 126px; padding: 22px 20px; display: flex; align-items: flex-start; gap: 15px; box-shadow: 0 6px 26px rgba(35,51,45,.03); }
.metric-icon { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; font-weight: 800; }
.metric-icon.lime { background: #eef9e3; color: #73ac43; }
.metric-icon.orange { background: #fff1e6; color: #f19048; }
.metric-icon.green { background: #e8f7ef; color: #3ca86b; }
.metric-icon.purple { background: #f0edfc; color: #8066d8; }
.metrics small { color: #7a8781; font-size: 9px; letter-spacing: .8px; font-weight: 800; }
.metrics strong { display: block; font: 700 27px "Manrope"; margin: 4px 0 2px; letter-spacing: -1px; }
.metrics strong small { font-size: 13px; letter-spacing: 0; }
.metrics p { margin: 0; color: #909a95; font-size: 10px; }
.metrics em { color: #4caa6c; font-style: normal; font-weight: 700; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 310px); align-items: start; gap: 16px; padding: 0 40px 40px; }
.deliveries-panel, .activity-panel { background: white; border: 1px solid var(--line); border-radius: 15px; min-width: 0; box-shadow: 0 7px 30px rgba(31,49,42,.035); }
.section-head { min-height: 81px; padding: 19px 20px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.section-head h2 { font: 700 15px "Manrope"; margin: 0 0 4px; letter-spacing: -.2px; }
.section-head p { color: #8b9691; font-size: 10px; margin: 0; }
.filters { margin-left: auto; display: flex; gap: 8px; }
.search { width: 220px; height: 36px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); padding: 0 10px; border-radius: 9px; color: #7b8882; }
.search input { border: 0; outline: 0; width: 100%; font-size: 11px; }
.filters select { height: 36px; border: 1px solid var(--line); border-radius: 9px; color: #58665f; background: white; padding: 0 28px 0 10px; font-size: 11px; }
.deliveries-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 16px 4px; border-top: 1px solid #eef1ef; }
.deliveries-pagination > button, .deliveries-page-numbers button { height: 32px; border: 1px solid #dce4df; border-radius: 8px; color: #506058; background: white; font-size: 9px; font-weight: 800; }
.deliveries-pagination > button { min-width: 86px; padding: 0 10px; }
.deliveries-pagination button:disabled { cursor: not-allowed; opacity: .4; }
.deliveries-page-numbers { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.deliveries-page-numbers button { width: 32px; padding: 0; }
.deliveries-page-numbers button.active { color: white; border-color: #438d65; background: #438d65; }
.deliveries-page-numbers span { width: 22px; color: #89958f; text-align: center; font-size: 10px; }
.deliveries-page-info { padding: 5px 16px 13px; color: #84908a; text-align: center; font-size: 8px; }
.table-wrap { width: 100%; overflow-x: auto; overflow-y: visible; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; }
.deliveries-table { min-width: 980px; table-layout: fixed; }
.deliveries-table th:nth-child(1), .deliveries-table td:nth-child(1) { width: 13%; }
.deliveries-table th:nth-child(2), .deliveries-table td:nth-child(2) { width: 27%; }
.deliveries-table th:nth-child(3), .deliveries-table td:nth-child(3) { width: 31%; }
.deliveries-table th:nth-child(4), .deliveries-table td:nth-child(4) { width: 15%; }
.deliveries-table th:nth-child(5), .deliveries-table td:nth-child(5) { width: 8%; }
.deliveries-table th:nth-child(6), .deliveries-table td:nth-child(6) { width: 6%; min-width: 62px; }
.deliveries-table th:last-child, .deliveries-table td:last-child { position: sticky; right: 0; z-index: 2; background: white; border-left: 1px solid #f0f2f0; }
.deliveries-table th:last-child { z-index: 3; background: #fbfcfb; }
.deliveries-table td:last-child { padding-left: 8px; padding-right: 8px; }
.deliveries-table .person { min-width: 0; }
.deliveries-table .person > div { min-width: 0; }
.deliveries-table .person strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deliveries-table td > small, .deliveries-table td div > small { max-width: 100%; }
th { text-align: left; padding: 13px 16px; color: #9aa39f; font-size: 8px; letter-spacing: .7px; background: #fbfcfb; }
td { padding: 15px 16px; border-top: 1px solid #f0f2f0; font-size: 11px; vertical-align: middle; }
td > strong { font-size: 11px; }
td > small, td div > small { display: block; max-width: 160px; color: #929c97; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9px; margin-top: 3px; }
.person { display: flex; align-items: center; gap: 9px; min-width: 145px; }
.person strong { font-size: 11px; }
.mini-avatar { width: 31px; height: 31px; flex: 0 0 auto; border-radius: 9px; background: #eaf1e7; display: grid; place-items: center; color: #647d58; font-size: 9px; font-weight: 800; }
.driver-dot { width: 27px; height: 27px; border-radius: 50%; background: #8da09a; box-shadow: inset 0 0 0 3px white, 0 0 0 1px #dce2df; transition: background .2s, box-shadow .2s; }
.driver-dot.confirmed { background: #4a98d2; box-shadow: inset 0 0 0 3px white, 0 0 0 2px #c9e4f7; }
.driver-dot.preparing { background: #d4a128; box-shadow: inset 0 0 0 3px white, 0 0 0 2px #f6e4a7; }
.driver-dot.route { background: #247bc9; box-shadow: inset 0 0 0 3px white, 0 0 0 2px #c5def6; }
.driver-dot.delivered { background: #34a16c; box-shadow: inset 0 0 0 3px white, 0 0 0 2px #c8ead7; }
.driver-dot.cancelled { background: #cf5757; box-shadow: inset 0 0 0 3px white, 0 0 0 2px #f2cccc; }
.status { display: inline-flex; align-items: center; white-space: nowrap; gap: 6px; padding: 6px 8px; border-radius: 7px; font-size: 9px; font-weight: 700; }
.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.confirmed { color: #2875b8; background: #e4f1fc; }
.status.preparing { color: #a97508; background: #fff3c9; }
.status.route { color: #176bc1; background: #dfeeff; }
.status.delivered { color: #218657; background: #dff4e8; }
.status.cancelled { color: #b63f3f; background: #fde3e3; }
.status.confirmed i { box-shadow: 0 0 0 3px rgba(40,117,184,.13); }
.status.preparing i { box-shadow: 0 0 0 3px rgba(169,117,8,.14); }
.status.route i { box-shadow: 0 0 0 3px rgba(23,107,193,.14); }
.status.delivered i { box-shadow: 0 0 0 3px rgba(33,134,87,.14); }
.status.cancelled i { box-shadow: 0 0 0 3px rgba(182,63,63,.13); }
.driver-dot.sla-overdue { background: #d83f3f; box-shadow: inset 0 0 0 3px white, 0 0 0 2px #f1bcbc; animation: sla-overdue-pulse 1s ease-in-out infinite; cursor: help; }
@keyframes sla-overdue-pulse {
  0%, 100% { opacity: 1; box-shadow: inset 0 0 0 3px white, 0 0 0 2px #f1bcbc, 0 0 0 0 rgba(216,63,63,.45); }
  50% { opacity: .45; box-shadow: inset 0 0 0 3px white, 0 0 0 2px #f1bcbc, 0 0 0 8px rgba(216,63,63,0); }
}
.row-actions { position: relative; display: flex; justify-content: center; gap: 4px; }
.row-actions > a, .row-actions > button { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: #66736d; text-decoration: none; }
.action-menu { display: none; position: absolute; right: 0; top: 34px; z-index: 1000; width: 175px; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.action-menu.open { display: grid; }
.action-menu button { border: 0; border-radius: 7px; background: white; padding: 9px 10px; text-align: left; font-size: 10px; color: #4d5a54; }
.action-menu button:hover { background: #f0f6ec; color: #466f2c; }
.empty-state { display: none; text-align: center; padding: 60px 20px; }
.empty-state.visible { display: block; }
.empty-state span { display: block; font-size: 34px; color: #8cbf68; }
.empty-state h3 { margin: 8px 0 4px; font: 700 15px "Manrope"; }
.empty-state p { color: var(--muted); font-size: 11px; }
.activity-panel { width: 100%; overflow: hidden; }
.activity-panel .section-head button { margin-left: auto; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #6b7972; }
.message-list { max-height: 430px; overflow: auto; }
.message-item { display: flex; gap: 10px; padding: 16px 18px; border-bottom: 1px solid #f0f2f0; }
.message-status { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #4ca969; background: #e8f7ed; font-size: 10px; }
.message-status.failed { color: #c35454; background: #fae7e7; }
.message-item strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 10px; line-height: 1.45; }
.message-item p { margin: 5px 0 0; color: #99a29e; font-size: 9px; }
.message-item p span { color: #4d9b67; font-weight: 700; }
.no-messages { color: #929c97; font-size: 11px; padding: 45px 20px; text-align: center; }
.whatsapp-note { margin: 14px; padding: 13px; border-radius: 11px; background: #f3f9ef; display: flex; gap: 11px; }
.wa-icon { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: #4cb76f; color: white; display: grid; place-items: center; }
.whatsapp-note strong { font-size: 10px; }
.whatsapp-note strong span { color: #4c9c65; }
.whatsapp-note p { color: #77847d; font-size: 9px; line-height: 1.45; margin: 3px 0 0; }
dialog { width: min(600px, calc(100% - 30px)); border: 0; border-radius: 18px; padding: 0; box-shadow: 0 30px 100px rgba(15,25,21,.3); }
dialog::backdrop { background: rgba(12,21,18,.55); backdrop-filter: blur(3px); }
.dialog-head { padding: 24px 26px 18px; display: flex; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font: 700 22px "Manrope"; margin: 0; }
.close-dialog { margin-left: auto; border: 0; background: none; font-size: 24px; color: #7b8681; }
.dialog-head-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.dialog-head-actions .close-dialog { margin-left: 0; }
.pdf-import-button { border: 1px solid #cfe2c5; border-radius: 9px; padding: 9px 12px; color: #477333; background: #eff8e9; font-size: 10px; font-weight: 800; }
.pdf-import-button:hover { background: #e4f3dc; }
.pdf-import-button:disabled { cursor: wait; opacity: .65; }
.pdf-import-status { margin: 14px 26px 0; padding: 10px 12px; border-radius: 9px; font-size: 10px; line-height: 1.45; }
.pdf-import-status.loading { color: #6c7554; background: #f7f5df; }
.order-product-item span s, .order-product-item span b { display: block; }
.order-product-item span s { color: #9b7777; font-size: 7px; }
.order-product-item span b { color: #365f49; font-size: 8px; }
.order-products { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.order-products h3 { margin: 0 0 12px; font-size: 12px; }
.order-product-head, .order-product-item { display: grid; grid-template-columns: minmax(0, 1fr) 75px 55px 100px 100px; align-items: center; gap: 9px; padding: 9px 4px; }
.order-product-head { color: #87928d; border-bottom: 1px solid #e8ece9; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.order-product-item { border-bottom: 1px solid #f0f2f0; font-size: 9px; }
.order-product-item:last-child { border-bottom: 0; }
.order-product-item strong { overflow-wrap: anywhere; }
.order-product-head span:not(:first-child), .order-product-item span { text-align: right; }
.pdf-import-status.success { color: #34774d; background: #e8f6ec; }
.pdf-import-status.warning { color: #916526; background: #fff3df; }
.pdf-import-status.error { color: #a54b4b; background: #fdeaea; }
.branches-dialog { width: min(900px, calc(100% - 30px)); max-height: calc(100vh - 30px); }
.branches-layout { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(320px, 1.15fr); gap: 16px; padding: 20px; background: #f5f7f5; overflow-y: auto; max-height: calc(100vh - 110px); }
.branch-form, .branches-list-section { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.branch-form-title h3, .branches-list-head h3 { margin: 0 0 4px; font: 700 14px "Manrope"; }
.branch-form-title p, .branches-list-head p { margin: 0; color: #87938d; font-size: 10px; }
.branch-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 18px 0; }
.branch-form-grid label { display: grid; gap: 6px; color: #4f5d56; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.branch-form-grid label:nth-child(2), .branch-form-grid label.wide { grid-column: 1/-1; }
.branch-form-grid input { min-width: 0; width: 100%; padding: 11px 12px; border: 1px solid #dfe5e1; border-radius: 10px; outline: 0; color: var(--ink); background: #fbfcfb; font-size: 11px; text-transform: none; }
.branch-form-grid input:focus { border-color: #8fc768; box-shadow: 0 0 0 3px rgba(143,199,104,.13); }
.branches-list-head { display: flex; align-items: center; margin-bottom: 15px; }
.branches-list-head button { margin-left: auto; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; color: #647169; background: white; }
.branches-list { display: grid; gap: 9px; }
.branch-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfb; }
.branch-code { min-width: 60px; padding: 8px 9px; border-radius: 8px; color: #486f34; background: #eaf5e3; text-align: center; font-size: 9px; font-weight: 900; }
.branch-details { min-width: 0; }
.branch-details strong, .branch-details span, .branch-details small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.branch-details strong { font-size: 11px; }
.branch-details span { margin-top: 3px; color: #74817a; font-size: 9px; }
.branch-details small { margin-top: 3px; color: #9aa39f; font-size: 8px; }
.branch-card-actions { display: flex; gap: 5px; }
.branch-card-actions button { width: 28px; height: 28px; border: 0; border-radius: 8px; color: #527344; background: #eaf3e6; font-size: 13px; }
.branch-card-actions button:last-child { color: #a65a5a; background: #fae8e8; font-size: 16px; }
.branch-form-actions { display: flex; gap: 8px; }
.branches-empty { padding: 35px 15px; border: 1px dashed #dce2de; border-radius: 10px; color: #8b9690; text-align: center; font-size: 10px; }
.branches-empty.error { color: #a64f4f; border-color: #edcccc; background: #fff7f7; }
.users-dialog { width: min(920px, calc(100% - 30px)); max-height: calc(100vh - 30px); }
.drivers-dialog { width: min(920px, calc(100% - 30px)); max-height: calc(100vh - 30px); }
.users-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(340px, 1.1fr); gap: 16px; padding: 20px; background: #f5f7f5; overflow-y: auto; max-height: calc(100vh - 110px); }
.user-form, .users-list-section { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.drivers-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(340px, 1.1fr); gap: 16px; padding: 20px; background: #f5f7f5; overflow-y: auto; max-height: calc(100vh - 110px); }
.driver-form, .drivers-list-section { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.driver-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 18px 0 14px; }
.driver-form-grid label { display: grid; gap: 6px; color: #4f5d56; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.driver-form-grid label.wide { grid-column: 1/-1; }
.driver-form-grid input, .driver-form-grid select, .form-grid select { min-width: 0; width: 100%; padding: 11px 12px; border: 1px solid #dfe5e1; border-radius: 10px; outline: 0; color: var(--ink); background: #fbfcfb; font-size: 11px; text-transform: none; }
.driver-form-grid input:focus, .driver-form-grid select:focus, .form-grid select:focus { border-color: #8fc768; box-shadow: 0 0 0 3px rgba(143,199,104,.13); }
.form-grid select:disabled { color: #929c97; background: #f2f4f2; }
.drivers-list { display: grid; gap: 9px; }
.driver-card-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfb; }
.driver-list-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; color: #3f6e2d; background: #e4f1dd; transform: rotate(-20deg); }
.driver-list-details { min-width: 0; }
.driver-list-details > div { display: flex; align-items: center; gap: 6px; }
.driver-list-details strong, .driver-list-details > span, .driver-list-details small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.driver-list-details strong { font-size: 11px; }
.driver-list-details > span { margin-top: 3px; color: #74817a; font-size: 9px; }
.driver-list-details small { margin-top: 3px; color: #9aa39f; font-size: 8px; }
.driver-state { padding: 3px 5px; border-radius: 5px; font-size: 7px; font-weight: 900; }
.driver-state.active { color: #318052; background: #e2f4e8; }
.driver-state.inactive { color: #a15353; background: #f9e3e3; }
.finance-dialog { width: min(1180px, calc(100% - 30px)); max-height: calc(100vh - 30px); }
.finance-export-actions { flex-wrap: wrap; justify-content: flex-end; }
.finance-export-button { border: 1px solid #d8e2dc; border-radius: 9px; padding: 8px 11px; color: #426052; background: #f7faf8; font-size: 9px; font-weight: 800; }
.finance-export-button:hover { border-color: #a9c5b4; background: #edf6f0; }
.finance-export-button.powerpoint { color: #a8482e; border-color: #efd2c8; background: #fff3ef; }
.finance-export-button.powerpoint:hover { color: white; border-color: #c85b3c; background: #c85b3c; }
.finance-filters { display: grid; grid-template-columns: 1fr 145px 145px 1fr 1fr auto; align-items: end; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.finance-filters label { display: grid; gap: 5px; color: #68766f; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.finance-filters input, .finance-filters select { width: 100%; min-width: 0; height: 37px; padding: 0 10px; border: 1px solid #dce4df; border-radius: 9px; outline: 0; color: #34423a; background: white; font-size: 10px; text-transform: none; }
.finance-filters input:focus, .finance-filters select:focus { border-color: #79ae8d; box-shadow: 0 0 0 3px rgba(67,141,101,.11); }
.finance-filter-actions { display: flex; gap: 6px; }
.finance-filter-actions button { height: 37px; padding: 0 12px; border: 1px solid #dce4df; border-radius: 9px; color: #5d6b64; background: white; font-size: 9px; font-weight: 800; white-space: nowrap; }
.finance-filter-actions button[type="submit"] { color: white; border-color: #3f8460; background: #438d65; }
.finance-content { display: grid; gap: 15px; padding: 20px; max-height: calc(100vh - 105px); overflow-y: auto; background: #f5f7f5; }
.kpi-dashboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi-group { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; }
.kpi-group-head { padding: 14px 15px; color: #fff; background: #315b4b; }
.kpi-group.commercial .kpi-group-head { background: #315b7a; }
.kpi-group.operational .kpi-group-head { background: #806525; }
.kpi-group.logistics .kpi-group-head { background: #397450; }
.kpi-group.financial .kpi-group-head { background: #674b78; }
.kpi-group-head strong, .kpi-group-head small { display: block; }
.kpi-group-head strong { font-size: 11px; letter-spacing: .5px; }
.kpi-group-head small { margin-top: 3px; opacity: .75; font-size: 8px; }
.kpi-items { display: grid; padding: 5px 14px 10px; }
.kpi-item { display: flex; align-items: end; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid #edf0ee; }
.kpi-item:first-child { border-top: 0; }
.kpi-item span { color: #78847e; font-size: 9px; font-weight: 700; }
.kpi-item strong { text-align: right; font: 800 16px "Manrope"; }
.kpi-item strong.positive { color: #2e8150; }
.sales-rankings { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.ranking-list { display: grid; gap: 10px; }
.ranking-row { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(90px, 1fr) auto; align-items: center; gap: 10px; }
.ranking-label strong, .ranking-label small { display: block; }
.ranking-label strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.ranking-label small { margin-top: 2px; color: #8c9791; font-size: 8px; }
.ranking-track { height: 9px; overflow: hidden; border-radius: 20px; background: #edf1ee; }
.ranking-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3f8561, #8bc766); }
.ranking-row > strong { min-width: 75px; text-align: right; font-size: 9px; }
.vertical-chart { min-height: 190px; display: flex; align-items: stretch; justify-content: space-around; gap: 12px; padding-top: 8px; overflow-x: auto; }
.vertical-bar-item { min-width: 64px; flex: 1 1 72px; display: grid; grid-template-rows: auto 125px auto auto; align-items: end; gap: 5px; text-align: center; }
.vertical-bar-item > strong { font-size: 8px; }
.vertical-bar-item > div { height: 125px; display: flex; align-items: flex-end; overflow: hidden; border-radius: 8px 8px 3px 3px; background: #edf1ee; }
.vertical-bar-item > div i { width: 100%; min-height: 3px; display: block; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #92d85e, #438d65); }
.vertical-bar-item > span { max-width: 105px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 8px; font-weight: 800; }
.vertical-bar-item > small { color: #8c9791; font-size: 7px; }
.pie-chart-layout { grid-template-columns: minmax(150px, .8fr) minmax(180px, 1.2fr); align-items: center; gap: 20px; }
.pie-chart { width: min(190px, 100%); aspect-ratio: 1; display: grid; place-items: center; justify-self: center; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.pie-chart > span { width: 54%; aspect-ratio: 1; display: grid; place-content: center; text-align: center; border-radius: 50%; background: white; box-shadow: 0 3px 15px rgba(35,55,45,.09); }
.pie-chart strong, .pie-chart small { display: block; }
.pie-chart strong { font-size: 11px; }
.pie-chart small { margin-top: 2px; color: #8c9791; font-size: 7px; }
.pie-legend { display: grid; gap: 8px; }
.pie-legend > div { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.pie-legend i { width: 9px; height: 9px; border-radius: 3px; }
.pie-legend span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; font-weight: 700; }
.pie-legend span small { display: block; margin-top: 2px; color: #8c9791; font-size: 7px; font-weight: 500; }
.pie-legend strong { font-size: 8px; }
.line-chart-layout { display: block; width: 100%; }
.line-chart-scroll { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.line-chart { display: block; width: max(100%, var(--line-chart-width)); height: auto; max-height: 235px; }
.line-grid { stroke: #e2e8e4; stroke-width: 1; stroke-dasharray: 4 4; }
.line-series { fill: none; stroke: #3d9366; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.line-point circle { fill: #fff; stroke: #3d9366; stroke-width: 3; }
.line-axis-value { fill: #8b9690; font-size: 8px; }
.line-axis-label { fill: #34423a; font-size: 9px; font-weight: 800; }
.line-axis-detail { fill: #8b9690; font-size: 7px; }
.line-point-value { fill: #397b59; font-size: 8px; font-weight: 800; }
.gauge-chart-layout { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.gauge-item { min-width: 0; padding: 14px; border: 1px solid #e0e6e2; border-radius: 12px; text-align: center; background: #fbfcfb; }
.gauge-item > strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; text-transform: uppercase; }
.gauge-meter { position: relative; width: min(150px, 100%); aspect-ratio: 2/1; margin: 13px auto 0; overflow: hidden; }
.gauge-fill { position: absolute; inset: 0; border-radius: 150px 150px 0 0; background: conic-gradient(from 270deg at 50% 100%, #dcea31 0deg calc(var(--gauge-value) * 1.8deg), #e8ece9 calc(var(--gauge-value) * 1.8deg) 180deg, transparent 180deg); }
.gauge-fill::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 0; height: 60%; border-radius: 100px 100px 0 0; background: #fbfcfb; }
.gauge-meter > span { position: absolute; left: 0; right: 0; bottom: 2px; z-index: 1; }
.gauge-meter b, .gauge-meter small { display: block; }
.gauge-meter b { color: #17211d; font: 800 20px "Manrope"; }
.gauge-meter small { margin-top: 2px; color: #75827b; font-size: 8px; font-weight: 700; }
.gauge-scale { display: flex; justify-content: space-between; width: min(150px, 100%); margin: 0 auto; color: #929c97; font-size: 7px; }
.gauge-item > p { margin: 7px 0 0; color: #7f8b85; font-size: 8px; }
.finance-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.finance-metrics article { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.finance-metrics small { color: #87928d; letter-spacing: .6px; font-size: 8px; font-weight: 900; }
.finance-metrics strong { display: block; margin-top: 6px; font: 700 20px "Manrope"; }
.negative { color: #b34848 !important; }
.finance-chart-card, .finance-table-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.finance-chart { display: grid; gap: 11px; }
.finance-bar-row { display: grid; grid-template-columns: 145px minmax(100px, 1fr) 90px; align-items: center; gap: 10px; }
.finance-bar-row > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; font-weight: 700; }
.finance-bar-row > div { height: 12px; overflow: hidden; border-radius: 20px; background: #edf1ee; }
.finance-bar-row i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, #74ba4c, #a7ed62); }
.finance-bar-row > strong { text-align: right; font-size: 10px; }
.finance-driver-list { display: grid; }
.finance-driver-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(85px, .55fr)) auto; align-items: center; gap: 12px; padding: 13px 4px; border-top: 1px solid var(--line); }
.finance-driver-row:first-child { border-top: 0; }
.finance-driver-row > div strong, .finance-driver-row > div small, .finance-driver-row > span small, .finance-driver-row > span strong { display: block; }
.finance-driver-row > div strong { font-size: 10px; }
.finance-driver-row > div small, .finance-driver-row > span small { margin-top: 3px; color: #8d9892; font-size: 8px; }
.finance-driver-row > span strong { margin-top: 3px; font-size: 10px; }
.topup-button { border: 0; border-radius: 8px; padding: 8px 10px; color: #356b23; background: #e4f3dc; font-size: 9px; font-weight: 800; }
.finance-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.finance-icon-button { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #dfe5e1; border-radius: 8px; color: #56655d; background: white; font-size: 12px; }
.finance-icon-button.pdf { color: #2f7e50; background: #e7f5eb; border-color: #d5eadb; }
.finance-icon-button.topup { color: #b33f3f; background: #fde7e7; border-color: #f2cccc; font-size: 17px; font-weight: 900; }
.finance-icon-button.topup:hover { color: white; background: #c94d4d; border-color: #c94d4d; }
.finance-icon-button:disabled { cursor: not-allowed; opacity: .4; }
.finance-transactions { display: grid; }
.transaction-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 4px; border-top: 1px solid var(--line); }
.transaction-row:first-child { border-top: 0; }
.transaction-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.transaction-icon.credit { color: #347e50; background: #e2f4e8; }
.transaction-icon.debit { color: #a34d4d; background: #fae5e5; }
.transaction-row > div strong, .transaction-row > div small, .transaction-row > span strong, .transaction-row > span small { display: block; }
.transaction-row > div strong { font-size: 10px; }
.transaction-row > div small, .transaction-row > span small { margin-top: 3px; color: #8c9791; font-size: 8px; }
.transaction-row > span { text-align: right; }
.transaction-row > span strong { font-size: 10px; }
.credit-text { color: #347e50; }
.debit-text { color: #a34d4d; }
.topup-dialog { width: min(460px, calc(100% - 30px)); }
.dialog-head p { margin: 4px 0 0; color: #87928d; font-size: 10px; }
.topup-fields { display: grid; gap: 13px; padding: 22px 26px; }
.topup-fields label { display: grid; gap: 6px; color: #526058; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.topup-fields input { width: 100%; padding: 11px 12px; border: 1px solid #dfe5e1; border-radius: 10px; outline: 0; font-size: 11px; }
.user-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 18px 0 14px; }
.user-form-grid label { display: grid; gap: 6px; color: #4f5d56; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.user-form-grid label.wide { grid-column: 1/-1; }
.user-form-grid input, .user-form-grid select { min-width: 0; width: 100%; padding: 11px 12px; border: 1px solid #dfe5e1; border-radius: 10px; outline: 0; color: var(--ink); background: #fbfcfb; font-size: 11px; text-transform: none; }
.user-form-grid input:focus, .user-form-grid select:focus { border-color: #8fc768; box-shadow: 0 0 0 3px rgba(143,199,104,.13); }
.admin-checkbox { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px; border: 1px solid #dfe6db; border-radius: 11px; background: #f8fbf6; cursor: pointer; }
.admin-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.admin-checkbox > span { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #cdd8c8; border-radius: 7px; color: transparent; background: white; font-size: 11px; font-weight: 900; }
.admin-checkbox input:checked + span { color: white; border-color: #579c38; background: #65aa45; }
.admin-checkbox strong, .admin-checkbox small { display: block; }
.admin-checkbox strong { font-size: 10px; }
.admin-checkbox small { margin-top: 3px; color: #859189; font-size: 8px; }
.admin-branch select { color: #77906c; background: #f2f7ef; }
.users-list { display: grid; gap: 9px; }
.user-card-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfb; }
.user-list-avatar { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; color: #496f39; background: #e5f1df; font-size: 9px; font-weight: 900; }
.user-list-details { min-width: 0; }
.user-list-details > div { display: flex; align-items: center; gap: 6px; }
.user-list-details strong, .user-list-details span, .user-list-details small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-list-details strong { font-size: 11px; }
.user-list-details > span { margin-top: 3px; color: #74817a; font-size: 9px; }
.user-list-details small { margin-top: 3px; color: #9aa39f; font-size: 8px; }
.user-list-details .admin-badge { display: inline-block; padding: 3px 5px; border-radius: 5px; color: #7655bd; background: #eee8fb; font-size: 7px; font-weight: 900; }
.user-card-actions { display: flex; gap: 5px; }
.user-card-actions button { width: 28px; height: 28px; border: 0; border-radius: 8px; font-size: 13px; }
.user-card-actions button[data-edit-user] { color: #397153; background: #e4f3e9; }
.user-card-actions button[data-delete-user] { color: #a65a5a; background: #fae8e8; font-size: 16px; }
.form-grid { padding: 23px 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid label { display: grid; gap: 6px; font-size: 10px; font-weight: 700; color: #5d6963; }
.form-grid label.wide { grid-column: 1/-1; }
.form-grid .wide { grid-column: 1/-1; }
.pickup-option { display: flex !important; align-items: center; gap: 9px !important; min-height: 38px; padding: 10px 11px; border: 1px solid #dfe5e1; border-radius: 9px; background: #fbfcfb; }
.pickup-option input { width: 15px !important; height: 15px; margin: 0; accent-color: #477333; }
.form-grid input { width: 100%; border: 1px solid #dfe5e1; border-radius: 9px; padding: 10px 11px; outline: 0; color: var(--ink); font-size: 12px; }
.form-grid input:focus { border-color: #8fc768; box-shadow: 0 0 0 3px rgba(143,199,104,.13); }
.form-grid input:read-only { color: #65736c; background: #f5f7f5; }
.address-lookup-status { margin-top: -5px; padding: 9px 11px; border-radius: 8px; color: #7c8882; background: #f7f9f7; font-size: 9px; }
.address-lookup-status.loading { color: #806b35; background: #faf4df; }
.address-lookup-status.success { color: #367e50; background: #e7f5eb; }
.address-lookup-status.warning { color: #916526; background: #fff3df; }
.address-lookup-status.error { color: #a54b4b; background: #fdeaea; }
.address-lookup-status.error { overflow-wrap: anywhere; }
.retry-geocoding { justify-self: start; margin-top: -6px; border: 0; padding: 4px 0; color: #527d3b; background: transparent; font-size: 9px; font-weight: 800; }
.retry-geocoding:hover { text-decoration: underline; }
.nearby-branches { padding: 12px; border: 1px solid #dfe6dc; border-radius: 11px; background: #f8faf7; }
.nearby-branches > p { margin: 0; color: #87938d; font-size: 9px; }
.nearby-title { display: block; margin-bottom: 9px; color: #526058; font-size: 10px; }
.nearby-list { display: grid; gap: 7px; }
.nearby-branch { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid #e0e5e2; border-radius: 9px; color: var(--ink); background: white; text-align: left; }
.nearby-branch:hover, .nearby-branch.selected { border-color: #7db657; box-shadow: 0 0 0 3px rgba(125,182,87,.12); }
.nearby-branch.selected { background: #f4faef; }
.nearby-rank { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #567447; background: #e7f1e2; font-size: 9px; font-weight: 900; }
.nearby-branch strong, .nearby-branch small { display: block; }
.nearby-branch strong { font-size: 10px; }
.nearby-branch small { margin-top: 3px; color: #87938d; font-size: 8px; }
.nearby-branch em { padding: 5px 7px; border-radius: 7px; color: #3d7e28; background: #e2f3d8; font-size: 7px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.geocoding-attribution { margin: -4px 0 0; color: #9aa39f; font-size: 8px; }
.dialog-actions { padding: 16px 26px 24px; display: flex; justify-content: flex-end; gap: 9px; }
.secondary-button { border: 1px solid var(--line); background: white; border-radius: 10px; padding: 10px 17px; color: #65716b; font-size: 12px; font-weight: 700; }
.settings-dialog { width: min(720px, calc(100% - 30px)); max-height: calc(100vh - 30px); }
.settings-lock-dialog { width: min(440px, calc(100% - 30px)); }
.pickup-code-dialog { width: min(650px, calc(100% - 30px)); overflow: visible; border-radius: 24px; background: transparent; box-shadow: none; }
.pickup-code-dialog::backdrop { background: rgba(12,21,18,.72); backdrop-filter: blur(5px); }
.settings-lock-content { padding: 25px 26px 8px; text-align: center; }
.settings-lock-icon { width: 48px; height: 48px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 13px; color: #477331; background: #e9f5e2; font-size: 21px; }
.settings-lock-content > p { margin: 0 0 18px; color: #7b8781; font-size: 11px; }
.settings-lock-content label { display: grid; gap: 7px; color: #526058; font-size: 9px; font-weight: 800; text-align: left; text-transform: uppercase; }
.settings-lock-content input { width: 100%; padding: 12px; border: 1px solid #dce3df; border-radius: 10px; outline: 0; font: 800 18px "Manrope"; letter-spacing: 5px; text-align: center; }
.settings-lock-content input:focus { border-color: #7eb75a; box-shadow: 0 0 0 4px rgba(126,183,90,.13); }
.settings-lock-error { margin-top: 11px; padding: 9px; border-radius: 8px; color: #a54848; background: #fdeaea; font-size: 9px; }
.settings-dialog form { max-height: calc(100vh - 30px); display: flex; flex-direction: column; }
.settings-content { display: grid; gap: 12px; padding: 20px 24px 5px; background: #f7f9f7; }
.settings-dialog .settings-content { overflow-y: auto; }
.settings-section { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.settings-title { display: flex; align-items: center; gap: 12px; }
.settings-title h3 { margin: 0 0 3px; font: 700 13px "Manrope"; }
.settings-title p { margin: 0; color: #8a9690; font-size: 10px; }
.settings-icon { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: white; background: #48b56c; }
.settings-icon.neutral { color: #61746a; background: #edf1ee; }
.settings-badge { margin-left: auto; padding: 6px 9px; border-radius: 8px; color: #a36a31; background: #fff0df; white-space: nowrap; font-size: 9px; font-weight: 800; }
.settings-badge.success { color: #378556; background: #e5f5ea; }
.settings-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.settings-info > div { padding: 11px 12px; border-radius: 9px; background: #f7f9f7; }
.settings-info small { display: block; color: #929d97; letter-spacing: .7px; font-size: 8px; font-weight: 800; }
.settings-info strong { display: block; margin-top: 4px; font-size: 11px; }
.online-text { color: #439562; }
.settings-hint { margin: 13px 0 0; color: #78847e; font-size: 10px; line-height: 1.55; }
.danger-zone { border-color: #f0cccc !important; background: #fffafa !important; }
.settings-icon.danger { color: #b84040; background: #fde1e1; }
.danger-button { border: 1px solid #c84545; border-radius: 9px; padding: 9px 13px; color: white; background: #c84545; font-size: 9px; font-weight: 900; }
.danger-button:hover { border-color: #aa3030; background: #aa3030; }
.reset-data-dialog { width: min(500px, calc(100% - 30px)); }
.reset-data-content { display: grid; justify-items: center; gap: 14px; padding: 24px 28px; text-align: center; }
.reset-warning-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: white; background: #c84545; font: 900 25px "Manrope"; box-shadow: 0 0 0 8px #fde9e9; }
.reset-data-content > p { max-width: 390px; margin: 4px 0; color: #69766f; font-size: 11px; line-height: 1.55; }
.reset-login-info { width: 100%; padding: 13px; border: 1px solid #efd7d7; border-radius: 10px; color: #7c3434; background: #fff5f5; }
.reset-login-info small, .reset-login-info strong { display: block; }
.reset-login-info small { margin-bottom: 6px; font-size: 8px; letter-spacing: .7px; }
.reset-login-info strong { font-size: 10px; line-height: 1.6; }
.reset-data-content label { width: 100%; display: grid; gap: 7px; color: #59665f; text-align: left; font-size: 10px; }
.reset-data-content input { width: 100%; padding: 11px 12px; border: 1px solid #e2caca; border-radius: 9px; outline: 0; text-transform: uppercase; }
.reset-data-content input:focus { border-color: #c84545; box-shadow: 0 0 0 3px rgba(200,69,69,.12); }
.danger-text { color: #bd4040 !important; }
.settings-toggle { display: flex; align-items: center; gap: 9px; margin-top: 16px; color: #526058; font-size: 10px; font-weight: 800; }
.settings-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.settings-toggle span { width: 34px; height: 19px; padding: 2px; border-radius: 20px; background: #d9dfdb; transition: .2s; }
.settings-toggle span::after { content: ""; display: block; width: 15px; height: 15px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: .2s; }
.settings-toggle input:checked + span { background: #65b642; }
.settings-toggle input:checked + span::after { transform: translateX(15px); }
.boticario-toggle { width: fit-content; padding: 10px 12px; border: 1px solid #dce5df; border-radius: 12px; background: #f8faf8; }
.orders-dialog { width: min(1180px, calc(100% - 30px)); max-height: calc(100vh - 30px); }
.orders-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 210px 130px; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.orders-toolbar .search, .orders-toolbar select { min-width: 0; height: 39px; border: 1px solid #dce4df; border-radius: 9px; background: white; }
.orders-toolbar .search { display: flex; align-items: center; gap: 7px; padding: 0 11px; color: #7b8781; }
.orders-toolbar input { width: 100%; border: 0; outline: 0; font-size: 10px; }
.orders-toolbar select { padding: 0 10px; color: #4d5b54; font-size: 10px; }
.orders-page-size { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px; color: #75827b; font-size: 9px; font-weight: 800; }
.orders-page-size select { width: 100%; }
.orders-content { padding: 18px 20px 22px; max-height: calc(100vh - 175px); overflow: auto; background: #f5f7f5; }
.orders-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.orders-summary article { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.orders-summary small, .orders-summary strong { display: block; }
.orders-summary small { color: #85918b; font-size: 8px; font-weight: 900; letter-spacing: .5px; }
.orders-summary strong { margin-top: 6px; font: 800 18px "Manrope"; }
.orders-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; background: white; }
.orders-table { min-width: 980px; }
.orders-table th, .orders-table td { padding: 12px 13px; }
.orders-table td { font-size: 9px; }
.orders-table td strong, .orders-table td small { display: block; }
.orders-table td small { margin-top: 3px; color: #89958f; }
.orders-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.orders-pagination button { min-width: 90px; height: 34px; border: 1px solid #dce4df; border-radius: 9px; color: #506058; background: white; font-size: 9px; font-weight: 800; }
.orders-pagination button:disabled { cursor: not-allowed; opacity: .4; }
.orders-page-numbers { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.orders-page-numbers button { min-width: 34px; width: 34px; padding: 0; }
.orders-page-numbers button.active { color: white; border-color: #438d65; background: #438d65; }
.orders-page-numbers span { width: 25px; color: #8a9690; text-align: center; font-size: 10px; }
.orders-page-info { margin-top: 8px; color: #75827b; text-align: center; font-size: 8px; font-weight: 700; }
.freight-ratio { font-weight: 900; color: #477a5d; }
.order-number-button { border: 0; padding: 0; color: #245f45; background: none; text-align: left; font: inherit; font-weight: 900; text-decoration: underline; text-decoration-color: #a8cdb9; text-underline-offset: 3px; cursor: pointer; }
.order-number-button:hover { color: #173f2f; text-decoration-color: currentColor; }
.delivery-simulator-dialog { width: min(720px, calc(100% - 30px)); max-height: calc(100vh - 30px); }
.delivery-simulator-content { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-height: calc(100vh - 180px); padding: 20px; overflow-y: auto; background: #f5f7f5; }
.simulator-address-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.simulator-step { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: white; background: #438d65; font-size: 10px; font-weight: 900; }
.simulator-step.destination { background: #397cc1; }
.simulator-fields { min-width: 0; display: grid; grid-template-columns: 1fr 90px; gap: 9px; }
.simulator-fields h3, .simulator-address-result { grid-column: 1/-1; }
.simulator-fields h3 { margin: 2px 0 3px; font-size: 11px; }
.simulator-fields label, .simulator-km-value { display: grid; gap: 5px; color: #66736d; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.simulator-fields input, .simulator-km-value input { min-width: 0; width: 100%; padding: 10px 11px; border: 1px solid #dce4df; border-radius: 9px; outline: 0; font-size: 10px; text-transform: none; }
.simulator-fields input:focus, .simulator-km-value input:focus { border-color: #79ae8d; box-shadow: 0 0 0 3px rgba(67,141,101,.11); }
.simulator-address-result { min-height: 31px; padding: 8px 9px; border-radius: 8px; color: #7a8780; background: #f5f7f5; font-size: 8px; line-height: 1.45; }
.simulator-address-result.loading { color: #876c2c; background: #faf2d9; }
.simulator-address-result.success { color: #30754b; background: #e4f4e9; }
.simulator-address-result.error { color: #a84646; background: #fdeaea; }
.simulator-km-value { grid-column: 1/-1; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.simulator-result { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 15px; border: 1px solid #d6e6d9; border-radius: 13px; background: #f7fcf5; }
.simulator-result article { padding: 12px; border-radius: 10px; background: white; }
.simulator-result small, .simulator-result strong { display: block; }
.simulator-result small { color: #839088; font-size: 7px; font-weight: 900; letter-spacing: .5px; }
.simulator-result strong { margin-top: 5px; font: 800 18px "Manrope"; }
.simulator-result article.total { color: white; background: #285c43; }
.simulator-result article.total small { color: #cae0d2; }
.simulator-result p { grid-column: 1/-1; margin: 0; color: #7b8781; font-size: 8px; }
.simulator-register-button { color: #285c43 !important; border-color: #a9cbb7 !important; background: #edf7f0 !important; font-weight: 900 !important; }
.simulator-register-button:disabled { cursor: not-allowed; opacity: .45; }
.order-details-dialog { width: min(760px, calc(100% - 30px)); max-height: calc(100vh - 30px); }
.order-details-content { display: grid; gap: 14px; max-height: calc(100vh - 105px); padding: 20px; overflow-y: auto; background: #f5f7f5; }
.order-details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.order-detail-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.order-detail-card.wide { grid-column: 1/-1; }
.order-detail-card small, .order-detail-card strong, .order-detail-card span { display: block; }
.order-detail-card small { color: #87928d; font-size: 8px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; }
.order-detail-card strong { margin-top: 6px; overflow-wrap: anywhere; font-size: 11px; }
.order-detail-card span { margin-top: 4px; color: #75827b; font-size: 9px; line-height: 1.45; }
.order-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.order-values .order-detail-card strong { font: 800 18px "Manrope"; }
.order-events { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.order-events h3 { margin: 0 0 12px; font-size: 12px; }
.order-route-map-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.order-route-map-card h3 { margin: 0 0 4px; font-size: 12px; }
.order-route-map-card > p { margin: 0 0 12px; color: #7b8781; font-size: 8px; }
.order-route-map { width: 100%; height: 270px; overflow: hidden; border-radius: 10px; background: #e9eeeb; }
.order-route-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.order-route-actions span { color: #718078; font-size: 9px; }
.order-route-actions a { padding: 8px 11px; border-radius: 8px; color: white; background: #397cc1; text-decoration: none; font-size: 9px; font-weight: 800; }
.order-event { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 0; border-top: 1px solid #edf0ee; }
.order-event:first-of-type { border-top: 0; }
.order-event i { width: 8px; height: 8px; border-radius: 50%; background: #62a947; }
.order-event strong { font-size: 9px; }
.order-event time { color: #87928d; font-size: 8px; }

body.boticario-layout {
  --lime: #77b82a;
  --ink: #17251c;
  --muted: #718078;
  --line: #dbe5dc;
  background: #f4f7f2;
}
body.boticario-layout .sidebar { background: #0e3b2c; border-color: #0e3b2c; }
body.boticario-layout .brand, body.boticario-layout .sidebar nav a, body.boticario-layout .user-card strong { color: #fff; }
body.boticario-layout .sidebar nav a.active, body.boticario-layout .sidebar nav a:hover { color: #123b2c; background: #dff0cb; }
body.boticario-layout .sidebar-card { border-color: #47715c; background: #174a38; color: white; }
body.boticario-layout .sidebar-card small, body.boticario-layout .user-card small { color: #bdd2c6; }
body.boticario-layout .user-card { border-color: rgba(255,255,255,.18); }
body.boticario-layout .primary-button { background: #123b2c; }
body.boticario-layout .metric-icon.lime, body.boticario-layout .status.route { color: #315f1e; background: #dff0cb; }
body.login-page.boticario-layout { background: #0e3b2c; }
body.login-page.boticario-layout .login-visual { background: radial-gradient(circle at 18% 82%, rgba(168,220,90,.22), transparent 35%), linear-gradient(145deg, #09291f, #0e4a35); }
body.login-page.boticario-layout .login-form-side { background: #f3f7ef; }
.settings-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
.settings-form-grid label { display: grid; gap: 6px; color: #5e6b64; font-size: 9px; font-weight: 800; }
.settings-form-grid label.wide { grid-column: 1/-1; }
.settings-form-grid input, .settings-form-grid select { min-width: 0; width: 100%; padding: 10px 11px; border: 1px solid #dfe5e1; border-radius: 9px; outline: 0; color: #34423a; background: #fbfcfb; font-size: 11px; }
.settings-form-grid input:focus, .settings-form-grid select:focus { border-color: #8fc768; box-shadow: 0 0 0 3px rgba(143,199,104,.13); }
.secret-field { display: flex; }
.secret-field input { border-radius: 9px 0 0 9px; }
.secret-field input:disabled { color: #87928d; background: #f5f7f5; letter-spacing: 2px; opacity: 1; }
.secret-field button { flex: 0 0 auto; border: 1px solid #dfe5e1; border-left: 0; border-radius: 0 9px 9px 0; padding: 0 13px; color: #4d6d3b; background: #eef7e8; font-size: 9px; font-weight: 800; }
.secret-status { color: #8b9690; font-size: 9px; font-weight: 600; }
.secret-status.saved { color: #378b57; }
.secret-status.editing { color: #a16d37; }
.settings-test-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.settings-test-row .secondary-button { padding: 8px 11px; }
.settings-test-row span { color: #8a9690; font-size: 9px; }
.settings-test-row span.is-success { color: #378b57; font-weight: 800; }
.settings-test-row span.is-error { color: #b75858; font-weight: 800; }
.evolution-instances { display: grid; gap: 8px; margin-top: 14px; }
.evolution-instances > p { margin: 0; padding: 14px; border: 1px dashed #d9e0dc; border-radius: 10px; color: #88948e; background: #fafbfa; text-align: center; font-size: 10px; }
.evolution-instances > p.instances-error { color: #aa4f4f; border-color: #edcccc; background: #fff7f7; }
.evolution-instance-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfb; }
.evolution-instance-card.selected { border-color: #84bd5e; box-shadow: 0 0 0 3px rgba(132,189,94,.12); background: #f7fbf4; }
.evolution-instance-card strong { display: block; font: 700 11px "Manrope"; }
.evolution-instance-card small { display: block; margin-top: 3px; color: #87938d; font-size: 9px; }
.instance-actions { display: flex; gap: 6px; }
.evolution-instance-card button { border: 0; border-radius: 8px; padding: 8px 10px; color: white; background: #1596b5; font-size: 9px; font-weight: 800; }
.evolution-instance-card button.connect-instance-button { color: #356124; background: #e6f3dd; }
.instance-state { padding: 5px 8px; border-radius: 20px; font-size: 8px; font-weight: 900; }
.instance-state.online { color: #168042; background: #d9f3e2; }
.instance-state.offline { color: #a64e4e; background: #f8dfdf; }
.evolution-connect-panel { margin-top: 14px; padding: 15px; border: 1px solid #cfe0c7; border-radius: 12px; background: #f7fbf4; }
.evolution-connect-panel[hidden] { display: none; }
.close-connect-panel { margin-left: auto; border: 0; background: none; color: #7a8780; font-size: 20px; }
.pairing-number { display: grid; gap: 6px; margin: 14px 0 9px; color: #5e6b64; font-size: 9px; font-weight: 800; }
.pairing-number input { padding: 10px 11px; border: 1px solid #d8e1d4; border-radius: 9px; outline: 0; background: white; font-size: 11px; }
.evolution-qr { min-height: 110px; margin-top: 12px; padding: 14px; display: grid; place-items: center; gap: 10px; border: 1px dashed #cad8c4; border-radius: 10px; background: white; text-align: center; }
.evolution-qr img { width: min(280px, 100%); border-radius: 8px; }
.evolution-qr p, .evolution-qr strong { margin: 0; color: #718078; font-size: 10px; }
.evolution-qr .pairing-code { color: #17201d; font: 800 24px "Manrope"; letter-spacing: 3px; }
.evolution-qr .connection-success { color: #378b57; }
.test-grid { grid-template-columns: 1fr auto; align-items: end; }
.test-grid .wide { grid-column: 1/2 !important; }
.test-grid .primary-button { height: 37px; }
.settings-field { display: grid; gap: 7px; margin-top: 15px; color: #5e6b64; font-size: 10px; font-weight: 700; }
.settings-field > div { display: flex; }
.settings-field input { min-width: 0; flex: 1; padding: 10px 11px; border: 1px solid #dfe5e1; border-radius: 9px 0 0 9px; outline: 0; color: #526159; background: #fbfcfb; font-size: 11px; }
.settings-field button { border: 1px solid #dfe5e1; border-left: 0; border-radius: 0 9px 9px 0; padding: 0 13px; color: #4d6d3b; background: #eef7e8; font-size: 10px; font-weight: 800; }
.compact-section { margin-bottom: 10px; }
.settings-doc-link { display: inline-flex; align-items: center; text-decoration: none; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 100; max-width: 360px; padding: 13px 17px; border-radius: 10px; background: #18251f; color: white; font-size: 11px; box-shadow: var(--shadow); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #9f4747; }

/* Login */
body.login-page { min-height: 100vh; background: var(--dark); }
.login-footer { position: fixed; z-index: 5; left: 50%; bottom: 14px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); color: #87948e; font-size: 9px; text-align: center; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1fr) minmax(420px, .85fr); }
.login-visual { position: relative; padding: 48px clamp(35px, 6vw, 90px); display: flex; flex-direction: column; overflow: hidden; color: white; background: radial-gradient(circle at 20% 80%, rgba(167,237,98,.17), transparent 34%), linear-gradient(145deg, #101a17, #1c2c26); }
.login-visual::before, .login-visual::after { content: ""; position: absolute; border: 1px solid rgba(167,237,98,.09); border-radius: 50%; }
.login-visual::before { width: 520px; height: 520px; right: -270px; top: -160px; }
.login-visual::after { width: 360px; height: 360px; left: -210px; bottom: -190px; }
.login-visual-copy { position: relative; z-index: 1; max-width: 570px; margin: auto 0; }
.login-visual-copy .eyebrow { color: var(--lime); }
.login-visual-copy h1 { margin: 10px 0 18px; font: 800 clamp(38px, 5vw, 70px)/1.04 "Manrope"; letter-spacing: -3px; }
.login-visual-copy > p:last-child { max-width: 490px; margin: 0; color: #aebbb5; font-size: 15px; line-height: 1.7; }
.login-route-art { position: relative; z-index: 1; width: min(430px, 90%); height: 90px; margin-top: 30px; }
.login-route-art::before { content: ""; position: absolute; left: 8px; right: 28px; top: 44px; border-top: 3px dashed rgba(167,237,98,.35); transform: rotate(-3deg); }
.login-route-art i { position: absolute; top: 38px; width: 14px; height: 14px; border: 3px solid var(--dark); border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(167,237,98,.18); }
.login-route-art i:nth-child(1) { left: 0; }
.login-route-art i:nth-child(2) { left: 44%; top: 29px; }
.login-route-art i:nth-child(3) { right: 22px; top: 23px; }
.login-route-art span { position: absolute; right: 0; top: 8px; color: var(--lime); font-size: 27px; transform: rotate(-28deg); }
.login-form-side { display: grid; place-items: center; padding: 35px; background: #f7f9f7; }
.login-form { width: min(430px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 24px 70px rgba(18,31,26,.12); }
.login-form h2 { margin: 4px 0 8px; font: 800 31px "Manrope"; letter-spacing: -1.2px; }
.login-subtitle { margin: 0 0 28px; color: #7e8a84; font-size: 12px; line-height: 1.55; }
.login-form > label { display: grid; gap: 7px; margin-top: 15px; color: #526058; font-size: 10px; font-weight: 800; }
.login-form input { width: 100%; padding: 13px 14px; border: 1px solid #dce3df; border-radius: 11px; outline: none; color: var(--ink); background: #fbfcfb; font-size: 12px; }
.login-form input:focus { border-color: #82bc5d; box-shadow: 0 0 0 4px rgba(130,188,93,.13); }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-field button { position: absolute; right: 6px; top: 6px; width: 35px; height: 35px; border: 0; border-radius: 8px; color: #77847d; background: transparent; }
.login-submit { width: 100%; margin-top: 22px; padding: 13px 18px; }
.login-alert { margin: 18px 0 4px; padding: 11px 13px; border-radius: 10px; color: #a54848; background: #fdeaea; font-size: 10px; line-height: 1.5; }
.login-alert.success { color: #2d7449; background: #e3f4e8; }
.login-help { margin: 20px 0 0; color: #929c97; text-align: center; font-size: 9px; }

/* Confirmação do entregador */
.confirmation-page { min-height: 100vh; color: white; background: radial-gradient(circle at 50% 15%, rgba(167,237,98,.15), transparent 28%), var(--dark); }
.confirmation-shell { width: min(520px, calc(100% - 28px)); min-height: 100vh; margin: auto; padding: 35px 0 24px; display: flex; flex-direction: column; }
.confirmation-card { margin: auto 0; padding: 34px; border: 1px solid rgba(255,255,255,.1); border-radius: 22px; color: var(--ink); background: white; box-shadow: 0 30px 80px rgba(0,0,0,.28); text-align: center; }
.confirmation-icon { width: 53px; height: 53px; margin: 0 auto 17px; display: grid; place-items: center; border-radius: 50%; color: #315c20; background: var(--lime); font-size: 21px; font-weight: 900; }
.confirmation-card h1 { margin: 5px 0 8px; font: 800 28px "Manrope"; letter-spacing: -1px; }
.confirmation-subtitle { margin: 0 0 25px; color: #7d8882; font-size: 11px; }
.confirmation-card form > label { display: block; color: #5c6962; font-size: 10px; font-weight: 800; text-align: left; }
.confirmation-code { display: grid; grid-template-columns: 58px 1fr; gap: 8px; margin-top: 8px; }
.confirmation-code span, .confirmation-code input { height: 58px; border: 1px solid #dce3df; border-radius: 11px; }
.confirmation-code span { display: grid; place-items: center; color: #315c20; background: #eaf6e2; font: 800 24px "Manrope"; }
.confirmation-code input { min-width: 0; padding: 0 15px; outline: 0; color: var(--ink); background: #fbfcfb; font: 800 25px "Manrope"; letter-spacing: 7px; text-align: center; }
.confirmation-code input:focus { border-color: #80bd57; box-shadow: 0 0 0 4px rgba(128,189,87,.13); }
.confirmation-card form > small { display: block; margin-top: 8px; color: #929c97; font-size: 9px; text-align: left; }
.confirmation-submit { width: 100%; margin-top: 20px; padding: 13px; border: 0; border-radius: 11px; color: white; background: var(--dark); font-size: 12px; font-weight: 800; }
.confirmation-submit:disabled { opacity: .6; }
.confirmation-message { margin-top: 16px; padding: 13px; border-radius: 10px; color: #347c4d; background: #e6f5eb; font-size: 11px; line-height: 1.5; }
.confirmation-message.error { color: #a74848; background: #fde9e9; }
.confirmation-message.warning { color: #8d6427; background: #fff2dc; }
.confirmation-shell > footer { padding-top: 25px; color: #86938d; text-align: center; font-size: 9px; }
.pickup-confirmation-card { position: relative; padding: 44px; border-radius: 24px; color: var(--ink); background: white; box-shadow: 0 30px 80px rgba(0,0,0,.28); text-align: center; }
.pickup-confirmation-card h2 { margin: 5px 0 8px; font: 800 28px "Manrope"; letter-spacing: -1px; }
.pickup-confirmation-card > label { display: block; color: #5c6962; font-size: 10px; font-weight: 800; text-align: left; }
.pickup-confirmation-card .confirmation-message { text-align: left; }
.pickup-code-close { position: absolute; top: 22px; right: 25px; margin: 0; }

/* Avaliacao do cliente */
.feedback-page { min-height: 100vh; color: #202826; background: radial-gradient(circle at 50% 9%, rgba(167,237,98,.18), transparent 32%), #0f1d19; }
.feedback-shell { width: min(520px, 100%); min-height: 100vh; margin: 0 auto; padding: 34px 18px; display: flex; flex-direction: column; }
.feedback-card { margin: auto 0; padding: 26px; border-radius: 24px; background: white; box-shadow: 0 30px 80px rgba(0,0,0,.28); display: flex; flex-direction: column; }
.feedback-banner { margin: 0 0 28px; padding: 26px 20px; border-radius: 17px; color: white; background: linear-gradient(135deg, #111b18, #223f2d); text-align: center; }
.feedback-banner strong { display: block; margin-bottom: 17px; font: 800 26px "Manrope"; letter-spacing: -.7px; }
.feedback-banner strong span { color: #a7ed62; }
.feedback-banner p { margin: 0; font-size: 17px; line-height: 1.3; }
.feedback-order { margin: -10px 0 18px; color: #7b8580; text-align: center; font-size: 11px; }
.feedback-rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 24px; }
.feedback-rating button { display: grid; gap: 6px; justify-items: center; border: 0; color: #9aa29e; background: transparent; font-size: 10px; }
.feedback-rating span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: #5d6a63; background: #eef3ef; font-size: 24px; line-height: 1; }
.feedback-rating button.selected span { color: #0f3d21; background: #a7ed62; box-shadow: 0 0 0 4px rgba(167,237,98,.2); }
.feedback-rating button.selected small { color: #304037; font-weight: 800; }
.feedback-criteria { margin: 0 0 24px; border-top: 1px solid #eceeed; }
.feedback-criteria > div { min-height: 53px; display: grid; grid-template-columns: minmax(0, 1fr) 50px 50px; align-items: center; gap: 8px; border-bottom: 1px solid #eceeed; }
.feedback-criteria span { color: #333c38; font-size: 14px; line-height: 1.35; }
.feedback-criteria button { width: 42px; height: 42px; border: 1px solid #e1e4e2; border-radius: 50%; color: #9f8a90; background: white; font-size: 20px; line-height: 1; display: grid; place-items: center; opacity: .52; filter: grayscale(.25); transition: transform .18s ease, opacity .18s ease, filter .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.feedback-criteria button[data-value="up"] { color: #4c8f64; }
.feedback-criteria button:hover { opacity: .86; transform: translateY(-1px); }
.feedback-criteria button.selected { opacity: 1; filter: none; transform: scale(1.08); }
.feedback-criteria button[data-value="down"].selected { color: white; border-color: #b64c72; background: #b64c72; box-shadow: 0 0 0 5px rgba(182,76,114,.14); }
.feedback-criteria button[data-value="up"].selected { color: #0f3d21; border-color: #a7ed62; background: #a7ed62; box-shadow: 0 0 0 5px rgba(167,237,98,.22); }
.feedback-comment { display: grid; gap: 10px; color: #2f3834; font-size: 14px; font-weight: 800; }
.feedback-comment small { color: #2f3834; font-weight: 700; }
.feedback-comment textarea { min-height: 105px; resize: vertical; border: 0; border-radius: 10px; padding: 13px; outline: 0; color: #202826; background: #eef1ef; font: 14px "DM Sans"; }
.feedback-submit { width: min(260px, 100%); margin: 32px auto 0; display: block; border: 0; border-radius: 28px; padding: 15px 22px; color: #0f1d19; background: #a7ed62; font-size: 14px; font-weight: 900; box-shadow: 0 12px 28px rgba(77,128,46,.2); }
.feedback-submit:disabled { opacity: .65; }
.feedback-message { margin-top: 14px; padding: 12px; border-radius: 10px; color: #a74848; background: #fde9e9; font-size: 11px; }
.feedback-thanks { margin: auto 0; text-align: center; }
.feedback-thanks-icon { width: 128px; height: 128px; margin: 0 auto 28px; display: grid; place-items: center; border-radius: 50%; color: #1d6b42; background: #e9f5e2; font-size: 46px; font-weight: 900; }
.feedback-thanks h1 { margin: 0 0 12px; font: 800 27px "Manrope"; letter-spacing: -.7px; }
.feedback-thanks p { margin: 0; color: #6d7671; font-size: 18px; }
.feedback-shell > footer { margin-top: auto; padding-top: 28px; color: #91a29a; text-align: center; font-size: 13px; }

.feedbacks-dialog { width: min(920px, calc(100% - 30px)); max-height: calc(100vh - 30px); }
.feedbacks-content { display: grid; gap: 14px; padding: 18px; background: #f5f7f5; overflow-y: auto; max-height: calc(100vh - 105px); }
.feedbacks-toolbar { display: flex; align-items: end; gap: 10px; }
.feedbacks-toolbar label { display: grid; gap: 5px; min-width: 230px; color: #68766f; font-size: 8px; font-weight: 900; letter-spacing: .4px; text-transform: uppercase; }
.feedbacks-toolbar select { height: 37px; border: 1px solid #dce4df; border-radius: 9px; padding: 0 10px; outline: 0; color: #34423a; background: white; font-size: 10px; }
.feedbacks-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.feedbacks-summary article { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.feedbacks-summary small { display: block; color: #85918b; font-size: 8px; font-weight: 900; letter-spacing: .7px; }
.feedbacks-summary strong { display: block; margin-top: 5px; font: 800 22px "Manrope"; }
.feedbacks-dashboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feedback-chart-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.feedback-chart-card h3 { margin: 0 0 12px; font: 800 12px "Manrope"; }
.feedback-rating-chart, .feedback-branch-chart, .feedback-criteria-chart { display: grid; gap: 9px; }
.feedback-bar-row, .feedback-branch-row, .feedback-criteria-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 34px; align-items: center; gap: 8px; color: #5d6963; font-size: 9px; }
.feedback-branch-row { grid-template-columns: minmax(80px, 1fr) minmax(0, 1.2fr) 34px; }
.feedback-criteria-row { grid-template-columns: minmax(90px, 1fr) minmax(0, 1.1fr) 38px; }
.feedback-bar-row div, .feedback-branch-row div, .feedback-criteria-row div { height: 9px; overflow: hidden; border-radius: 20px; background: #edf1ee; }
.feedback-bar-row i, .feedback-branch-row i, .feedback-criteria-row i { display: block; height: 100%; border-radius: inherit; background: #62b46c; }
.feedback-branch-row small { display: block; margin-top: 2px; color: #8b9690; font-size: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feedbacks-list { display: grid; gap: 10px; }
.feedback-item { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.feedback-item strong { color: #438d65; font-size: 14px; letter-spacing: 1px; }
.feedback-item small { display: block; margin-top: 4px; color: #87938d; font-size: 9px; }
.feedback-item p { margin: 12px 0; color: #38443e; font-size: 11px; line-height: 1.5; }
.feedback-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.feedback-tags span { padding: 5px 7px; border-radius: 7px; font-size: 8px; font-weight: 900; }
.feedback-tags .up { color: #2f7d50; background: #e3f3e8; }
.feedback-tags .down { color: #9a3f63; background: #fae8ef; }

/* Public tracking */
.tracking-page { min-height: 100vh; background: #f4f6f3; }
.tracking-header { height: 76px; padding: 0 max(24px, calc((100vw - 1180px)/2)); background: var(--dark); display: flex; align-items: center; justify-content: space-between; }
.brand.light { color: white; }
.brand.light .brand-mark { background: var(--lime); }
.brand.light .brand-mark span { border-color: var(--dark); }
.brand.light > span:last-child > span { color: var(--lime); }
.tracking-header > div { color: #c9d3ce; border: 1px solid #33413c; border-radius: 20px; padding: 8px 13px; font-size: 10px; font-weight: 700; }
.tracking-main { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 46px 0 35px; }
.tracking-copy { margin-bottom: 27px; }
.tracking-copy .eyebrow { color: #699e45; }
.tracking-copy h1 { margin: 7px 0 8px; font: 800 clamp(30px, 4vw, 48px) "Manrope"; letter-spacing: -2.2px; }
.tracking-copy h1 span { color: #8ad14f; }
.tracking-copy > p:last-child { color: #77827d; margin: 0; font-size: 13px; }
.tracking-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 18px; }
.map-card { height: 475px; border: 7px solid white; border-radius: 20px; overflow: hidden; position: relative; box-shadow: var(--shadow); background: #dfe8dc; }
#map { height: 100%; width: 100%; z-index: 1; }
.map-status { position: absolute; z-index: 5; left: 17px; bottom: 17px; display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: 10px; background: rgba(255,255,255,.94); box-shadow: 0 5px 20px rgba(26,43,36,.12); font-size: 10px; color: #6c7973; }
.map-status i { width: 7px; height: 7px; background: #65bd48; border-radius: 50%; }
.map-status strong { color: #3f4d46; }
.driver-map-icon span, .destination-map-icon span { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; box-shadow: 0 5px 15px rgba(22,36,30,.25); }
.driver-map-icon span { color: var(--dark); background: var(--lime); border: 5px solid white; font-size: 19px; transform: rotate(-35deg); }
.destination-map-icon span { color: white; background: var(--dark); border: 4px solid white; font-size: 17px; }
.delivery-detail { display: grid; gap: 16px; }
.eta-card { min-height: 176px; color: white; padding: 26px; border-radius: 18px; background: var(--dark); position: relative; overflow: hidden; }
.eta-card::after { content: ""; position: absolute; width: 150px; height: 150px; border: 35px solid rgba(167,237,98,.08); border-radius: 50%; right: -55px; bottom: -80px; }
.eta-card > small, .order-card small { color: #85928c; letter-spacing: 1px; font-size: 8px; font-weight: 800; }
.eta-card > div { display: flex; align-items: baseline; margin: 5px 0 0; }
.eta-card strong { font: 800 62px "Manrope"; letter-spacing: -4px; line-height: 1; color: var(--lime); }
.eta-card div span { margin-left: 8px; color: #bfcbc5; font-size: 18px; font-weight: 700; }
.eta-card p { color: #9da9a3; font-size: 10px; margin: 12px 0 0; }
.order-card { background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.order-head, .driver, .destination { padding: 18px 20px; display: flex; align-items: center; }
.order-head { border-bottom: 1px solid var(--line); }
.order-head strong { display: block; font: 700 15px "Manrope"; margin-top: 2px; }
.order-head > span { margin-left: auto; color: #5d9c36; background: #ebf7e2; padding: 6px 9px; border-radius: 8px; font-size: 8px; font-weight: 800; }
.driver { gap: 11px; }
.driver-avatar { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #dde8d7; color: #58764a; font-size: 11px; font-weight: 800; }
.driver strong { display: block; font-size: 12px; margin: 2px 0; }
.driver p { margin: 0; color: #87928d; font-size: 9px; }
.driver a { width: 34px; height: 34px; margin-left: auto; display: grid; place-items: center; background: #e8f7ed; color: #3daa65; border-radius: 50%; text-decoration: none; }
.destination { align-items: flex-start; gap: 11px; border-top: 1px solid var(--line); background: #fbfcfb; }
.destination > span { color: #72a750; }
.destination p { margin: 3px 0 0; font-size: 10px; line-height: 1.5; color: #55625b; }
.timeline-card { margin-top: 18px; padding: 22px 25px 25px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 8px 30px rgba(31,49,42,.035); }
.timeline-card h2 { font: 700 14px "Manrope"; margin: 0 0 20px; }
.progress-line { height: 4px; margin: 0 10%; background: #e5e9e6; border-radius: 4px; overflow: hidden; }
.progress-line span { display: block; height: 100%; width: 0; background: var(--lime); transition: width .8s ease; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: -13px; }
.timeline-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; color: #a2aaa6; }
.timeline-step > span { width: 22px; height: 22px; display: grid; place-items: center; border: 3px solid white; border-radius: 50%; background: #dfe4e1; font-size: 8px; font-weight: 800; }
.timeline-step.complete > span { color: #2c4a20; background: var(--lime); }
.timeline-step.current > span { box-shadow: 0 0 0 4px rgba(167,237,98,.2); }
.timeline-step strong { font-size: 10px; color: #748078; }
.timeline-step.complete strong { color: #344139; }
.timeline-step small { display: block; margin-top: 2px; font-size: 8px; }
.tracking-help { text-align: center; color: #8b9590; font-size: 10px; margin: 24px 0 0; }
.public-footer { padding: 0 20px 28px; color: #8b9590; text-align: center; font-size: 10px; }
.tracking-error { display: none; width: min(600px, calc(100% - 40px)); margin: 100px auto; text-align: center; }
.tracking-error.visible { display: block; }
.tracking-error h1 { font: 800 32px "Manrope"; }
.tracking-error p { color: var(--muted); }
.pulse-update .eta-card { animation: pulseCard .8s; }
@keyframes pulseCard { 50% { box-shadow: 0 0 0 6px rgba(167,237,98,.25); } }

@media (max-width: 1500px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .activity-panel { max-width: none; }
  .message-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 430px; }
  .message-item { min-width: 0; }
  .whatsapp-note { max-width: 520px; }
}
@media (min-width: 1501px) {
  .activity-panel { position: sticky; top: 16px; }
}
@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 260px; padding: 30px; }
  .login-visual-copy { margin: 45px 0 0; }
  .login-visual-copy h1 { max-width: 570px; font-size: clamp(31px, 8vw, 48px); letter-spacing: -2px; }
  .login-route-art { display: none; }
  .login-form-side { padding: 24px 18px 35px; }
  .login-form { margin-top: -35px; position: relative; z-index: 3; }
  .sidebar { transform: translateX(-100%); transition: .25s; box-shadow: 20px 0 50px rgba(20,30,26,.15); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .app-footer { margin-left: 0; padding-left: 22px; padding-right: 22px; }
  .menu-button { display: grid; place-items: center; width: 38px; height: 38px; margin-right: 15px; border: 1px solid var(--line); border-radius: 9px; background: white; }
  .topbar { padding: 22px; }
  .live-pill, .icon-button { display: none; }
  .metrics, .workspace { padding-left: 22px; padding-right: 22px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 13px; }
  .filters { margin: 0; width: 100%; }
  .search { width: 100%; }
  .filters select { flex: 0 0 155px; }
  table { min-width: 760px; }
  .tracking-grid { grid-template-columns: 1fr; }
  .delivery-detail { grid-template-columns: 1fr 1fr; }
  .map-card { height: 400px; }
}
@media (max-width: 600px) {
  .login-visual { min-height: 230px; padding: 24px 20px; }
  .login-visual-copy { margin-top: 35px; }
  .login-visual-copy > p:last-child { font-size: 12px; }
  .login-form { padding: 26px 20px; border-radius: 18px; }
  .login-form h2 { font-size: 26px; }
  .login-footer { position: static; padding: 18px; color: #aab5b0; text-align: center; background: var(--dark); }
  .topbar { padding: 16px; }
  .topbar h1 { font-size: 18px; }
  .topbar .eyebrow { display: none; }
  .top-actions .primary-button { font-size: 0; padding: 10px 12px; }
  .top-actions .primary-button::after { content: "＋"; font-size: 18px; }
  .metrics { grid-template-columns: 1fr 1fr; padding: 16px; gap: 9px; }
  .metrics article { min-height: 110px; padding: 14px; }
  .metric-icon { width: 31px; height: 31px; }
  .metrics strong { font-size: 22px; }
  .metrics p { display: none; }
  .workspace { padding: 0 16px 25px; }
  .deliveries-panel, .activity-panel { border-radius: 13px; }
  .section-head { padding: 16px; }
  .filters { display: grid; grid-template-columns: 1fr; }
  .filters select { width: 100%; }
  .message-list { grid-template-columns: 1fr; }
  .message-item { padding: 14px 16px; }
  .whatsapp-note { margin: 10px; }
  .table-wrap { padding: 10px; overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  table { min-width: 0; }
  .deliveries-table { min-width: 0; table-layout: auto; }
  .deliveries-table th:nth-child(n), .deliveries-table td:nth-child(n) { width: 100%; }
  .deliveries-table th:last-child, .deliveries-table td:last-child { position: static; right: auto; z-index: auto; background: transparent; box-shadow: none; }
  .deliveries-table td:last-child { padding-left: 88px; padding-right: 0; }
  .deliveries-table .person strong { white-space: normal; }
  thead { display: none; }
  tbody { display: grid; gap: 10px; }
  tbody tr { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 5px 18px rgba(31,49,42,.04); }
  tbody td { min-height: 32px; padding: 7px 0 7px 88px; border: 0; position: relative; }
  tbody td::before { content: attr(data-label); position: absolute; left: 0; top: 9px; width: 76px; color: #98a19d; letter-spacing: .5px; text-transform: uppercase; font-size: 8px; font-weight: 800; }
  tbody td > small, tbody td div > small { max-width: none; white-space: normal; }
  .person { min-width: 0; }
  .row-actions { justify-content: flex-start; }
  .action-menu { left: 0; right: auto; }
  .empty-state { padding: 45px 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .settings-form-grid, .test-grid { grid-template-columns: 1fr; }
  .settings-form-grid label.wide, .test-grid .wide { grid-column: auto !important; }
  .settings-title { align-items: flex-start; flex-wrap: wrap; }
  .settings-title .settings-badge { margin-left: 47px; }
  .settings-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .branches-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .users-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .drivers-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .orders-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .order-details-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .delivery-simulator-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .finance-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .feedbacks-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .feedbacks-toolbar { display: grid; grid-template-columns: 1fr; }
  .feedbacks-toolbar label { min-width: 0; }
  .feedbacks-summary { grid-template-columns: 1fr 1fr; }
  .feedbacks-dashboard { grid-template-columns: 1fr; }
  .finance-filters { grid-template-columns: 1fr 1fr; padding: 12px; }
  .finance-filter-actions { grid-column: 1/-1; }
  .finance-filter-actions button { flex: 1; }
  .finance-export-actions { margin-left: 10px; }
  .finance-export-button { width: 34px; height: 34px; overflow: hidden; padding: 0; font-size: 0; }
  .finance-export-button::first-letter { font-size: 11px; }
  .finance-export-button#present-finance::after { content: "▶"; font-size: 11px; }
  .finance-export-button.powerpoint::after { content: "P"; font-size: 12px; font-weight: 900; }
  .branches-layout { grid-template-columns: 1fr; padding: 10px; max-height: calc(100vh - 85px); }
  .users-layout { grid-template-columns: 1fr; padding: 10px; max-height: calc(100vh - 85px); }
  .drivers-layout { grid-template-columns: 1fr; padding: 10px; max-height: calc(100vh - 85px); }
  .branch-form, .branches-list-section { padding: 15px; }
  .user-form, .users-list-section { padding: 15px; }
  .driver-form, .drivers-list-section { padding: 15px; }
  .branch-form-grid { grid-template-columns: 1fr; }
  .user-form-grid { grid-template-columns: 1fr; }
  .driver-form-grid { grid-template-columns: 1fr; }
  .orders-toolbar { grid-template-columns: 1fr; padding: 12px; }
  .orders-summary { grid-template-columns: 1fr 1fr; }
  .order-details-grid, .order-values { grid-template-columns: 1fr; }
  .delivery-simulator-content, .simulator-result { grid-template-columns: 1fr; }
  .simulator-result p, .simulator-km-value { grid-column: auto; }
  .order-product-head, .order-product-item { min-width: 570px; grid-template-columns: minmax(180px, 1fr) 65px 45px 90px 90px; }
  .order-products { overflow-x: auto; }
  .order-detail-card.wide { grid-column: auto; }
  .branch-form-grid label:nth-child(2), .branch-form-grid label.wide { grid-column: auto; }
  .user-form-grid label.wide { grid-column: auto; }
  .driver-form-grid label.wide { grid-column: auto; }
  .finance-metrics { grid-template-columns: 1fr 1fr; }
  .kpi-dashboard { grid-template-columns: 1fr 1fr; }
  .sales-rankings { grid-template-columns: 1fr; }
  .pie-chart-layout { grid-template-columns: 1fr; }
  .line-chart { max-height: 210px; }
  .line-axis-value, .line-point-value { font-size: 7px; }
  .line-axis-label { font-size: 8px; }
  .line-axis-detail { font-size: 6px; }
  .finance-bar-row { grid-template-columns: 100px minmax(70px, 1fr); }
  .finance-bar-row > strong { grid-column: 2; }
  .finance-driver-row { grid-template-columns: 1fr 1fr; }
  .finance-row-actions { grid-column: 1/-1; justify-content: stretch; }
  .settings-dialog form { max-height: calc(100vh - 16px); }
  .settings-content { padding: 12px 10px 4px; }
  .settings-section { padding: 14px; }
  .settings-test-row { display: grid; grid-template-columns: 1fr; }
  .settings-test-row .secondary-button { width: 100%; }
  .dialog-head { padding: 18px 16px 14px; }
  .delivery-dialog-head { align-items: flex-start; }
  .dialog-head-actions { gap: 5px; }
  .pdf-import-button { padding: 8px 9px; }
  .pdf-import-status { margin: 10px 16px 0; }
  .dialog-actions { padding: 12px 16px 18px; flex-wrap: wrap; }
  .dialog-actions .settings-doc-link { margin-right: auto; }
  .secret-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .evolution-instance-card { grid-template-columns: 1fr auto; }
  .instance-actions { grid-column: 1/-1; }
  .instance-actions button { flex: 1; }
  .tracking-header { padding: 0 20px; }
  .tracking-main { width: calc(100% - 28px); padding-top: 30px; }
  .tracking-copy h1 { letter-spacing: -1.5px; }
  .tracking-grid { gap: 12px; }
  .map-card { height: 330px; border-width: 5px; }
  .delivery-detail { grid-template-columns: 1fr; gap: 12px; }
  .eta-card { min-height: 145px; }
  .eta-card strong { font-size: 50px; }
  .timeline-card { padding: 20px 10px; }
  .timeline-step strong { font-size: 8px; }
  .timeline-step small { font-size: 7px; }
  .toast { left: 14px; right: 14px; bottom: 14px; max-width: none; text-align: center; }
}
@media (max-width: 390px) {
  .metrics { grid-template-columns: 1fr; }
  .kpi-dashboard, .finance-metrics { grid-template-columns: 1fr; }
  .ranking-row { grid-template-columns: minmax(80px, .8fr) minmax(60px, 1fr); }
  .ranking-row > strong { grid-column: 2; }
  .line-chart { max-height: 185px; }
  .finance-filters { grid-template-columns: 1fr; }
  .finance-filter-actions { grid-column: auto; }
  .metrics article { min-height: 90px; }
  tbody td { padding-left: 76px; }
  tbody td::before { width: 66px; }
  .deliveries-table td:last-child { padding-left: 76px; }
  .dialog-actions > * { width: 100%; justify-content: center; text-align: center; }
  .nearby-branch { grid-template-columns: auto minmax(0, 1fr); }
  .nearby-branch em { grid-column: 2; justify-self: start; }
}
