*{box-sizing:border-box}body{margin:0;background:#f7f2f6;color:#493447;font:16px/1.65 system-ui,sans-serif}header{background:#93658D;color:white;padding:20px}header a{color:white;text-decoration:none;font-size:25px;font-weight:800;display:flex;align-items:center;gap:12px}header small{color:#f7eaf5}main,footer,.head{max-width:1000px;margin:auto}main{padding:24px 16px}h1{font-size:clamp(25px,5vw,38px);line-height:1.3}h2{font-size:20px}a{color:#795174}nav{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}nav a{background:white;border:1px solid #e4d7e2;border-radius:12px;padding:13px;text-decoration:none;font-weight:700}nav a.active{background:#795174;color:white}nav small{display:block;font-weight:400;font-size:12px}section{background:white;border-radius:16px;padding:clamp(16px,4vw,28px);margin:20px 0;box-shadow:0 5px 22px #93658D0b}label{display:block;font-weight:600;margin:12px 0 5px}input{width:100%;font:inherit;padding:12px;border:1px solid #c9b4c5;border-radius:8px}button{font:inherit;font-weight:700;cursor:pointer;border:1px solid #d2bfd0;border-radius:9px;background:white;color:#93658D;padding:12px 16px;margin:10px 8px 0 0}button.primary{background:#795174;color:white;border-color:#795174}output{display:block;background:#f1e5ef;padding:20px;border-radius:12px;margin-top:18px;font-size:clamp(22px,5vw,30px);font-weight:800;white-space:pre-line;overflow-wrap:anywhere}footer{padding:20px 16px;color:#705d6e}footer a{margin-right:14px}progress{width:100%;height:20px;accent-color:#795174}#status{font-size:13px;color:#705d6e}.hero{background:#93658D;color:white;padding:26px;border-radius:18px}.hero p{color:#fff1fc}.hero a{color:#fff} @media(min-width:650px){#fields{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}}.analytics select{width:100%;font:inherit;padding:10px;border:1px solid #c9b4c5;border-radius:8px;background:white;color:inherit}.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin:16px 0}.stat-grid>div{background:#f7f2f6;padding:12px;border-radius:10px}.stat-grid small,.stat-grid strong{display:block}.stat-grid strong{font-size:19px;overflow-wrap:anywhere}.chart-wrap{border-top:1px solid #e4d7e2;margin-top:18px}.chart-scroll{overflow-x:auto;max-width:100%}.chart-scroll svg{display:block;max-width:none}.chart-legend{font-size:13px}.analytics{margin-top:16px}
.dark body{background:#211b22;color:#f2e6f0}.dark section,.dark nav a,.dark input,.dark select,.dark button{background:#342b35;color:#f2e6f0;border-color:#675469}.dark .stat-grid>div,.dark output{background:#473749;color:#fff}.dark footer,.dark a{color:#e2badb}.dark .chart-scroll{background:#f7f2f6;border-radius:8px}#management h3{border-top:1px solid #d2bfd0;padding-top:16px}
.quick{margin:18px 0;grid-template-columns:repeat(3,minmax(0,1fr))}.quick a{text-align:center;padding:15px 5px;font-size:14px}.chips{background:#ffffff25;border-radius:10px;padding:10px;font-size:14px}.hero{background:linear-gradient(120deg,#684462,#93658d);padding:32px 24px}.edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px}textarea,select{width:100%;font:inherit;padding:10px;border:1px solid #c9b4c5;border-radius:8px;background:white;color:inherit}input[type=checkbox]{width:auto;margin-right:8px}#backup-info{background:#f1e5ef;padding:14px;border-radius:12px}#backup-info h3{margin:0}.dark #backup-info,.dark textarea{background:#473749;color:white}html{scroll-behavior:smooth} @media(max-width:420px){.quick a{font-size:12px}.edit-grid{gap:4px 8px}}
.field-help,.quick a small{display:block;font-size:13px;font-weight:normal;line-height:1.5;margin-top:5px;color:#705d6e}.dark .field-help,.dark .quick a small{color:#e2badb}.feedback-link{display:inline-block;background:#93658d;color:white!important;padding:12px 18px;border-radius:9px;font-weight:bold}.start-here a{display:inline-block;margin:5px 0}.feedback-call{border:1px solid #c9b4c5}#feedback-form label{display:block;margin:14px 0}#feedback-form button{min-height:44px}.quick a{min-height:52px}
.v2-panel[hidden]{display:none!important}.v2-panel{padding-bottom:85px}.v2-panel section{margin:10px 0;padding:16px}.v2-panel h2{margin:0 0 10px}.v2-big{font-size:30px;font-weight:800;color:#93658d}.v2-nav{position:fixed;bottom:0;left:0;right:0;z-index:100;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:6px 4px calc(6px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e4d8e2}.v2-nav button{padding:12px 2px;font-size:12px;min-width:0}.v2-nav .active{background:#93658d;color:white}.v2-row{border-top:1px solid #e4d8e2;padding:10px 0}.v2-row p{margin:4px 0}.v2-actions{display:grid;grid-template-columns:1fr 3fr 1fr;gap:5px}.v2-actions button{min-height:48px;padding:8px 4px}.v2-panel details{margin:10px 0;padding:12px;border:1px solid #e4d8e2;border-radius:12px}.v2-panel summary{cursor:pointer;font-weight:bold;padding:6px}.v2-panel iframe{width:100%;height:55vh;border:0}.dark .v2-nav{background:#302631}.v2-summary button{width:100%;margin-top:8px}.v2-summary progress{width:100%}
/* Compact mobile preview 2 */
body[data-view] header{padding:9px 16px}body[data-view] header a{font-size:19px;gap:8px}body[data-view] header svg{width:28px;height:28px}body[data-view] header small{font-size:11px;display:block;line-height:1.2}body[data-view] main{padding:10px 12px}body[data-view] .v2-panel{padding-bottom:calc(72px + env(safe-area-inset-bottom))}body[data-view] .v2-panel section{padding:12px;margin:5px 0}body[data-view] .v2-panel h2{font-size:18px;margin:0 0 5px}body[data-view] .v2-panel p{margin:5px 0;line-height:1.4}body[data-view] .v2-big{font-size:28px;line-height:1.25}body[data-view] .v2-summary progress{display:block;height:12px;margin:5px 0}body[data-view] .v2-summary button{min-height:44px;padding:8px;margin:6px 0 0}body[data-view] .v2-panel details{padding:5px 8px;margin:6px 0}body[data-view] .v2-panel summary{font-size:14px;padding:8px}body[data-view] .v2-row{padding:6px 0}body[data-view] .v2-row p{font-size:13px;margin:2px 0}body[data-view] .v2-actions button{margin:0;min-height:44px;font-size:14px}body[data-view] .v2-secondary{display:flex;gap:6px;flex-wrap:wrap}body[data-view] .v2-secondary button{margin:4px 0;padding:8px;font-size:13px;min-height:44px;flex:1}body[data-view] button:disabled{opacity:.4;cursor:default}body[data-view] .v2-nav{gap:0;padding:3px 4px calc(3px + env(safe-area-inset-bottom));}body[data-view] .v2-nav button{margin:0;border:0;border-radius:8px;background:transparent;color:#756875;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:52px;padding:3px;font-size:11px}body[data-view] .v2-nav svg{width:23px;height:23px}body[data-view] .v2-nav .active{color:#795174;background:#f1e5ef}body[data-view] input,body[data-view] select{min-width:0;max-width:100%;display:block}body[data-view] input[type=date]{width:100%;min-width:0;appearance:none;-webkit-appearance:none}body[data-view] input[type=checkbox]{display:inline-block;width:auto}body[data-view] label{min-width:0}body[data-view] .v2-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}body[data-view] .v2-tabs button{margin:0;padding:8px 2px;font-size:13px;min-height:44px}body[data-view] .v2-tabs .active{background:#795174;color:white}body[data-view] .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin:6px 0;gap:6px}body[data-view] .stat-grid>div{padding:8px}body[data-view] .v2-mapbox{position:relative;height:calc(100dvh - 205px - env(safe-area-inset-bottom));min-height:200px;background:#e8dfe7;border-radius:12px;overflow:hidden}body[data-view] .v2-mapbox iframe{height:100%;display:block}body[data-view] .v2-mapbox button{position:absolute;bottom:12px;left:12px;margin:0;box-shadow:0 2px 8px #0003}body[data-view] #v2-map>p{font-size:12px}body[data-view] #v2-map>a{font-size:13px}.dark body[data-view] .v2-nav .active{background:#473749;color:#f2e6f0}.dark body[data-view] .v2-nav button{color:#e2badb}body[data-view] [hidden]{display:none!important}

body[data-view] .v2-maptools{display:flex;gap:6px;margin:4px 0}body[data-view] .v2-maptools button{margin:0;min-height:44px;padding:6px 12px}body[data-view] .v2-mapbox{height:calc(100dvh - 250px - env(safe-area-inset-bottom))}body[data-view="map"] header{padding:5px 12px}body[data-view="map"] header small{display:none}body[data-view] input[type=date]{color:#795174;background:#f7f2f6}body[data-view] button:not(:disabled):active{transform:scale(.97);filter:brightness(.9)}body[data-view] .v2-summary .v2-estimate{font-size:13px}body[data-view] .v2-summary button{min-height:42px}body[data-view] .v2-row{padding:4px 0}body[data-view] .v2-counter small{font-size:11px}body[data-view] .v2-tabs button{min-height:44px}

/* Delivery and operations views share the same navigation. */
.v2-home-modes {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border: 1px solid #93658d;
  border-radius: 12px;
}
.v2-home-modes button {
  margin: 0;
  min-height: 44px;
  padding: 8px 4px;
}
.v2-home-modes button[aria-pressed="true"],
.v2-summary .v2-home-action {
  background: #805379;
  border-color: #805379;
  color: #fff;
}
.v2-home-modes button[data-mode="operation"][aria-pressed="true"],
.v2-operation-summary .v2-home-action {
  background: #315d85;
  border-color: #315d85;
  color: #fff;
}
.v2-summary .v2-home-action {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.v2-home-action svg { width: 21px; height: 21px; flex: none; }
#jobs, #jobs-month { scroll-margin-top: 80px; }
#mg-invoice-lines label {
  display: block;
  padding: 8px 0;
  overflow-wrap: anywhere;
}
#mg-invoice-lines input[type="checkbox"],
#jobs input[type="checkbox"] {
  width: auto;
  margin: 0 6px 0 0;
}

.stat-grid > .daily-sales-total,
.stat-grid > .daily-sales-breakdown { grid-column: 1 / -1; }
.daily-sales-total strong { font-size: 1.75rem; }
.daily-sales-breakdown details { margin: 0; }
.daily-sales-breakdown summary { padding: 6px 0; }
.daily-sales-breakdown p { overflow-wrap: anywhere; }

.reconcile { margin: 1rem 0; padding: 1rem; border: 1px solid #93658d80; border-radius: 14px; }
.reconcile > summary { font-size: 1.1rem; font-weight: 750; cursor: pointer; }
.reconcile form { margin: 0; }
.reconcile form > label, .reconcile-dates label { display: grid; gap: .25rem; margin: .65rem 0; align-items: start; }
.reconcile input, .reconcile select { width: 100%; min-width: 0; box-sizing: border-box; }
.reconcile-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.reconcile-records, .reconcile-status, .reconcile-saved { font-size: .9rem; }
.reconcile-totals { border-block: 1px solid #93658d50; padding: .35rem 0; }
.reconcile-totals div { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; }
.reconcile-totals dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.reconcile [data-state="review"] { color: #a23f22; }
.dark .reconcile [data-state="review"] { color: #ffa988; }
.reconcile [data-state="match"] { color: #277464; }
.dark .reconcile [data-state="match"] { color: #8ad4c4; }
.reconcile-status:empty, .reconcile-saved:empty { display: none; }
.closing { border: 1px solid #93658d80; border-radius: 14px; padding: 1rem; margin: 1rem 0; }
.closing h3 { margin: 0 0 .75rem; }
.closing > label, .closing .reconcile-dates label { display: grid; gap: .3rem; }
.closing input[type=date], .closing select { min-width: 0; width: 100%; box-sizing: border-box; }
.closing-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.closing-actions button { flex: 1; }
.closing-home-link { display: block; width: 100%; margin: .75rem 0; }
.closing-value { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.8fr); gap: .25rem .5rem; align-items: center; margin: .5rem 0; }
.closing .closing-value input { min-width: 0; width: 100%; }
.closing-value small { grid-column: 2; }
.closing-source { font-size: .85rem; }
.closing .reconcile input[type=checkbox] { width: auto; }
.closing-copy-text { width: 100%; }
#closing-recheck:empty, #closing-feedback:empty, #closing-resume:empty { display: none; }
.closing > label[hidden], .closing [hidden] { display: none; }
