:root {
  --bg: #eef3f8;
  --panel: #ffffff;
  --text: #122230;
  --muted: #5b6b79;
  --line: #d7dee5;
  --brand: #0f766e;
  --brand-dark: #0a5b55;
  --accent: #dff7ef;
  --warn: #b54708;
  --danger: #b42318;
  --ok: #027a48;
  --shadow: 0 16px 40px rgba(16,24,40,.08);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #f7fbff 0, var(--bg) 45%, #eaf1f7 100%);
  color: var(--text);
}
button, input, select { font: inherit; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; }
.topbar {
  background: linear-gradient(135deg, #0f766e, #115e59 56%, #0b3f44);
  color: #fff;
  padding: 18px 18px 34px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.topbar h1 { margin: 6px 0 0; font-size: 1.65rem; }
.eyebrow { opacity: .8; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.top-meta { opacity: .92; margin-top: 6px; font-size: .92rem; max-width: 52ch; }
.top-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.container { max-width: 960px; margin: -18px auto 0; padding: 0 14px 32px; }
.card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(215,222,229,.95);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}
.subcard { background: #f8fbfd; box-shadow: none; border-radius: 20px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head.compact { margin-bottom: 10px; }
.section-head h2, .section-head h3 { margin: 0 0 4px; }
.section-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.stack { display: grid; gap: 12px; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: 6px; }
label span { font-size: .88rem; color: var(--muted); }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}
input:focus, select:focus { outline: 2px solid rgba(15,118,110,.15); border-color: #89d6c7; }
input:read-only { background: #f8fafc; }
.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary, .btn:not(.secondary):not(.ghost) { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; box-shadow: 0 10px 22px rgba(15,118,110,.2); }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.role-chip {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--brand-dark);
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.hero-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.hero-grid-main { align-items: stretch; }
.dashboard-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric {
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
}
.metric.emphasis { background: linear-gradient(135deg, #f4fffb, #ecfdf3); border-color: #b7ead6; }
.metric.gradient { background: linear-gradient(135deg, #122230, #164e63); color: #fff; }
.metric.gradient .metric-label, .metric.gradient .metric-note { color: rgba(255,255,255,.75); }
.metric-label { font-size: .8rem; color: var(--muted); }
.metric-value { font-size: 1.5rem; font-weight: 800; margin-top: 4px; }
.metric-value.small { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.metric-note { margin-top: 6px; color: var(--muted); font-size: .78rem; }
.persona-strip {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid #dceee8;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fffd, #eef9f5);
}
.persona-title { font-size: 1rem; font-weight: 700; }
.persona-subtitle { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.persona-summary {
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dceee8;
  color: var(--brand-dark);
  font-weight: 600;
  white-space: nowrap;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.quick-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 16px;
  padding: 12px 10px;
  font-weight: 700;
  cursor: pointer;
}
.quick-btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; border-color: transparent; }
.helper { color: var(--muted); font-size: .85rem; }
.badge, .status-pill {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .82rem;
  background: #eef2f6;
  display: inline-flex;
  width: fit-content;
}
.badge.ok, .status-pill.good, .status-pill.inside, .status-pill.synced { background: #ecfdf3; color: var(--ok); }
.badge.warn, .status-pill.warn, .status-pill.outside { background: #fff7ed; color: var(--warn); }
.status-pill.bad, .status-pill.failed, .status-pill.error { background: #fef2f2; color: var(--danger); }
.status-pill.queued { background: #eef2ff; color: #3730a3; }
.status-pill.syncing { background: #eff6ff; color: #1d4ed8; }
.status-pill.unknown { background: #eef2f6; color: var(--muted); }
.photo-preview {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  max-height: 220px;
  object-fit: cover;
}
.queue-list { display: grid; gap: 10px; }
.queue-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 6px;
  background: #fff;
}
.queue-item.compact { padding: 10px 12px; }
.queue-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.inline-stats { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .87rem; }
.order-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.order-summary span { display: block; color: var(--muted); font-size: .85rem; }
.order-summary strong { display: block; margin-top: 4px; }
.link-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 0;
  cursor: pointer;
}
.empty { color: var(--muted); font-size: .92rem; }
.muted { color: var(--muted); font-size: .88rem; }
.error-text { color: var(--danger); font-size: .86rem; }
.insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 12px;
}
.insight-card {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid #dceee8;
  background: #f8fffd;
}
.insight-card span { display: block; color: var(--muted); font-size: .8rem; }
.insight-card strong { display: block; font-size: 1.12rem; margin-top: 6px; }
.insight-card.warn { border-color: #fed7aa; background: #fffaf5; }
.insight-card.good { border-color: #b7ead6; background: #f4fffb; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(18,34,48,.94);
  color: #fff;
  min-width: 220px;
  max-width: calc(100vw - 24px);
  text-align: center;
  z-index: 30;
}
.toast.ok { background: var(--ok); }
.toast.warn { background: var(--warn); }
.toast.error { background: var(--danger); }
.toast.hidden { display: none; }
.tabbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.tab {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  border-radius: 14px;
  padding: 11px 12px;
  cursor: pointer;
  font-weight: 600;
}
.tab.active { background: #ecfdf3; border-color: #a7f3d0; color: var(--brand-dark); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.actions.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.workspace-head { position: static; }
.route-card { background: linear-gradient(180deg, #fff, #f8fffd); }
@media (max-width: 720px) {
  .grid.two, .grid.three, .hero-grid, .dashboard-kpis, .actions.two, .tabbar, .quick-actions, .insight-strip { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .top-actions { align-items: flex-start; }
  .container { padding-bottom: 80px; margin-top: -10px; }
  .queue-row, .persona-strip { align-items: flex-start; flex-direction: column; }
  .order-summary { flex-direction: column; }
  .card { border-radius: 22px; }
}


.insight-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin:16px 0 8px}
.insight-card{border:1px solid rgba(15,118,110,.12);border-radius:18px;padding:14px 16px;background:#f8fbfb;display:flex;flex-direction:column;gap:6px}
.insight-card.good{background:#eefaf5}
.insight-card.warn{background:#fff7ed}
.inline-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.route-card{border-radius:18px}
@media (min-width:720px){.inline-stats{grid-template-columns:repeat(4,minmax(0,1fr));}}


.top-actions-row{display:flex;gap:10px;align-items:center}
.icon-only{min-width:44px;padding:12px 12px}
body.drawer-open{overflow:hidden}
.app-drawer{position:fixed;inset:0;z-index:1200}
.drawer-backdrop{position:absolute;inset:0;background:rgba(6,18,30,.45);backdrop-filter:blur(4px)}
.drawer-panel{position:absolute;right:0;top:0;bottom:0;width:min(92vw,380px);background:#f9fcff;border-left:1px solid rgba(215,222,229,.95);box-shadow:0 24px 60px rgba(16,24,40,.22);padding:18px;overflow:auto}
.drawer-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:18px}
.drawer-head h2{margin:4px 0}
.drawer-head p{margin:0;color:var(--muted)}
.drawer-section{margin-bottom:18px}
.drawer-section-title{font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:10px}
.drawer-grid{display:grid;gap:10px}
.drawer-nav-card{border:1px solid rgba(15,118,110,.12);background:#fff;border-radius:18px;padding:14px;text-align:left;display:grid;gap:4px}
.drawer-nav-card strong{font-size:.96rem}
.drawer-nav-card span{font-size:.84rem;color:var(--muted)}
.drawer-list{display:grid;gap:10px}
.module-list-item{border:1px solid rgba(15,118,110,.1);background:#fff;border-radius:18px;padding:14px;display:flex;justify-content:space-between;gap:12px;text-align:left}
.module-list-item div{display:grid;gap:4px}
.module-list-item strong{font-size:.95rem}
.module-list-item span{font-size:.84rem;color:var(--muted)}
.module-list-item em{font-style:normal;color:var(--brand);font-weight:700;align-self:center}
.module-list-item.good{background:#eefaf5}
.module-list-item.warn{background:#fff7ed}
.drawer-tips{display:grid;gap:10px}
.tip-card{background:#fff;border:1px dashed rgba(15,118,110,.22);border-radius:16px;padding:12px 14px;color:var(--text)}
.workspace-rail{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}
.workspace-pill{border:1px solid rgba(15,118,110,.1);background:#fbfefe;border-radius:18px;padding:12px 14px;display:grid;gap:4px}
.workspace-pill span{font-size:.78rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.workspace-pill strong{font-size:.98rem}
.hub-hero{display:grid;grid-template-columns:1.2fr .8fr;gap:14px;align-items:stretch}
.hub-hero-copy{border:1px solid rgba(15,118,110,.1);background:linear-gradient(135deg,#f6fffd,#eef8ff);border-radius:20px;padding:18px}
.hub-hero-copy h3{margin:8px 0 6px;font-size:1.2rem}
.hub-hero-copy p{margin:0;color:var(--muted)}
.role-chip.mini{margin-bottom:0}
.hub-hero-stats{display:grid;gap:10px}
.hub-stat{border-radius:18px;background:#fff;border:1px solid rgba(215,222,229,.95);padding:14px;display:grid;gap:6px}
.hub-stat span{font-size:.8rem;color:var(--muted)}
.hub-stat strong{font-size:1.35rem}
.module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.module-card{border:1px solid rgba(15,118,110,.12);background:#fff;border-radius:20px;padding:16px;text-align:left;display:grid;gap:8px;box-shadow:0 10px 24px rgba(16,24,40,.04)}
.module-card.good{background:#eefaf5}
.module-card.warn{background:#fff7ed}
.module-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.module-card-head strong{font-size:1rem}
.module-card-head span{font-size:.78rem;color:var(--brand);font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.module-card p{margin:0;color:var(--muted);font-size:.88rem;line-height:1.45}
.planner-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.planner-card{border:1px solid rgba(15,118,110,.08);background:#fbfdff;border-radius:20px;padding:16px}
.planner-card h3{margin:0 0 12px}
.planner-list{display:grid;gap:10px}
.planner-item{display:grid;grid-template-columns:10px 1fr;gap:10px;align-items:flex-start;padding:10px 0;border-bottom:1px solid rgba(215,222,229,.6)}
.planner-item:last-child{border-bottom:0;padding-bottom:0}
.dot{width:10px;height:10px;border-radius:999px;margin-top:6px;background:#cbd5e1}
.dot.good{background:#12b76a}
.dot.warn{background:#f79009}
.dot.neutral{background:#5b6b79}

@media (max-width: 720px){
  .top-actions{align-items:stretch}
  .top-actions-row{justify-content:flex-end}
  .workspace-rail{grid-template-columns:1fr}
  .hub-hero{grid-template-columns:1fr}
  .module-grid,.planner-grid{grid-template-columns:1fr}
  .drawer-panel{width:min(100vw,380px);border-left:0}
}


.dashboard-shell{padding:0;background:transparent;border:0;box-shadow:none}
.dashboard-hero{display:grid;grid-template-columns:1.25fr .75fr;gap:14px;margin-bottom:14px}
.dashboard-hero-main{background:linear-gradient(135deg,#0f766e 0%,#155eef 100%);color:#fff;border-radius:24px;padding:20px 18px;box-shadow:0 20px 44px rgba(15,118,110,.24)}
.dashboard-hero-main .eyebrow{color:rgba(255,255,255,.75);font-weight:800;letter-spacing:.08em;text-transform:uppercase;font-size:.74rem}
.dashboard-hero-main h2{margin:8px 0 8px;font-size:1.55rem;line-height:1.15}
.dashboard-hero-main p{margin:0;color:rgba(255,255,255,.88);max-width:34rem}
.dashboard-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.dashboard-hero-actions .btn.secondary{background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.22)}
.dashboard-hero-side{display:grid;gap:12px}
.hero-side-card{border-radius:22px;padding:16px;background:#fff;border:1px solid rgba(215,222,229,.95);display:grid;gap:8px;justify-content:flex-start;box-shadow:0 8px 24px rgba(16,24,40,.05)}
.hero-side-card span{font-size:.78rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.hero-side-card strong{font-size:1.02rem;line-height:1.3}
.kpi-band{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:14px}
.kpi-card{background:#fff;border:1px solid rgba(215,222,229,.95);border-radius:22px;padding:16px;display:grid;gap:8px;box-shadow:0 10px 30px rgba(16,24,40,.05)}
.kpi-card.primary{background:linear-gradient(135deg,#eff8ff,#ecfeff)}
.kpi-card.warn{background:linear-gradient(135deg,#fff7ed,#fff1f2)}
.kpi-label{font-size:.8rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.kpi-value{font-size:1.7rem;line-height:1;font-weight:800;color:#101828}
.kpi-note{color:var(--muted);font-size:.8rem}
.insight-strip.premium{margin-bottom:14px}
.dashboard-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:14px}
.dashboard-column{display:grid;gap:14px}
.subcard{background:#fff;border:1px solid rgba(215,222,229,.95);border-radius:22px;padding:16px;box-shadow:0 12px 30px rgba(16,24,40,.05)}
.action-center-list,.priority-feed{display:grid;gap:10px}
.action-center-item{border:1px solid rgba(15,118,110,.08);background:#fbfdff;border-radius:18px;padding:14px;display:grid;gap:4px}
.action-center-item.good{background:#eefaf5}
.action-center-item.warn{background:#fff7ed}
.action-center-item strong{font-size:.96rem}
.action-center-item span{font-size:.85rem;color:var(--muted)}
.priority-item{display:grid;grid-template-columns:36px 1fr;gap:12px;align-items:flex-start;padding:12px 0;border-bottom:1px solid rgba(215,222,229,.65)}
.priority-item:last-child{border-bottom:0;padding-bottom:0}
.priority-index{width:36px;height:36px;border-radius:999px;background:#f2f4f7;color:#344054;display:flex;align-items:center;justify-content:center;font-weight:800}
.route-card.premium,.queue-item.compact.premium{border-radius:20px;box-shadow:0 8px 24px rgba(16,24,40,.04)}

@media (max-width: 900px){
  .dashboard-hero,.dashboard-grid{grid-template-columns:1fr}
  .kpi-band{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 560px){
  .dashboard-hero-main{padding:18px 16px}
  .dashboard-hero-main h2{font-size:1.3rem}
  .kpi-band{grid-template-columns:1fr 1fr}
  .kpi-card{padding:14px}
}


/* ===== Minimal modern layout patch ===== */
.top-meta{max-width:44ch}
#menu-btn.hidden{display:none!important}
#workspace-shell .workspace-rail{display:none!important}
#workspace-shell #tabbar{display:none!important}
#workspace-shell .dashboard-grid{display:none!important}
#workspace-shell .insight-strip{display:none!important}
#workspace-shell .dashboard-hero-side{display:none!important}
#workspace-shell .dashboard-hero{
  display:block!important;
  background:linear-gradient(135deg,#0f766e,#0b4f56)!important;
  color:#fff!important;
  border-radius:24px!important;
  padding:20px!important;
  margin-bottom:16px!important;
}
#workspace-shell .dashboard-hero h2,
#workspace-shell .dashboard-hero p,
#workspace-shell .dashboard-hero .eyebrow{color:#fff!important}
#workspace-shell .dashboard-hero-actions{display:flex;gap:10px;flex-wrap:wrap}
#workspace-shell .kpi-band{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
}
#workspace-shell .kpi-card{
  background:#fff!important;
  border:1px solid rgba(215,222,229,.95)!important;
  border-radius:22px!important;
  box-shadow:0 10px 24px rgba(16,24,40,.05)!important;
}
#workspace-shell .kpi-card.warn{background:#fff8f3!important}
#workspace-shell .workspace-head{
  position:relative!important;
}
#workspace-shell .top-menu-helper{
  color:#5b6b79;
}
#workspace-shell .drawer-grid{
  grid-template-columns:1fr!important;
}
#workspace-shell .drawer-list{
  display:none!important;
}
.compact-filters{margin-bottom:14px}
.shop-report-card{border-radius:18px!important}
.shop-report-card .queue-row strong{font-size:1rem}
.shop-photo-wrap{width:100%;aspect-ratio:16/9;border-radius:16px;overflow:hidden;border:1px solid #e6edf1;background:#f8fbfc;margin-bottom:12px}
.shop-photo-wrap.empty{display:flex;align-items:center;justify-content:center}
.shop-card-photo{width:100%;height:100%;display:block;object-fit:cover}
.shop-photo-empty{font-weight:700;color:#5f6f7f}
@media (max-width:900px){
  #workspace-shell .kpi-band{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:640px){
  #workspace-shell .kpi-band{grid-template-columns:1fr!important}
  .topbar{padding-bottom:24px!important}
  .container{margin-top:-10px!important}
}


/* Shops report geo + last order patch */
.shop-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.shop-meta-grid > div{background:#f8fbfc;border:1px solid #e6edf1;border-radius:14px;padding:12px}
.meta-label{display:block;font-size:.78rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#5f6f7f;margin-bottom:6px}
.shop-meta-grid strong{font-size:.98rem;color:#142132}
.shop-detail-line{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-top:12px;background:#fff;border:1px solid #e6edf1;border-radius:14px;padding:12px}
.shop-detail-line strong{flex:1 1 260px;font-size:.95rem;color:#142132;font-weight:700}
.shop-detail-sub{margin-top:8px;color:#5f6f7f;font-size:.88rem}
.mini-link{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;background:#ecf8f5;color:#0f766e;text-decoration:none;font-weight:700;border:1px solid #b7e7dc}
@media (max-width:720px){
  .shop-meta-grid{grid-template-columns:1fr}
  .shop-detail-line{align-items:flex-start}
}


/* Hamburger links fix */
.drawer-fallback-links{display:grid;gap:10px;margin-top:10px}
.drawer-nav-card,.module-list-item{cursor:pointer}


/* Hide top summary area outside dashboard */
#workspace-shell.section-mode .workspace-head,
#workspace-shell.section-mode .summary-grid,
#workspace-shell.section-mode .metrics-grid,
#workspace-shell.section-mode .stats-grid,
#workspace-shell.section-mode .dashboard-summary,
#workspace-shell.section-mode .clean-summary-strip,
#workspace-shell.section-mode .dashboard-hero,
#workspace-shell.section-mode .kpi-band,
#workspace-shell.section-mode .hero-summary,
#workspace-shell.section-mode .workspace-rail,
#workspace-shell.section-mode .top-summary,
#workspace-shell.section-mode .active-task-card{
  display:none !important;
}

#workspace-shell.section-mode .tab-panel.active{
  margin-top:0 !important;
}

#workspace-shell.dashboard-mode .workspace-head{
  display:grid !important;
}


/* Direct hide salesperson/workspace block outside dashboard */
#workspace-shell.section-mode > .workspace-head{
  display:none !important;
}


/* Full-width compact Onboard Shop layout */
#workspace-shell.section-mode{
  max-width: 100% !important;
}

#workspace-shell.section-mode .tab-panel.active{
  width: 100% !important;
}

#workspace-shell.section-mode #tab-shop.active .card,
#workspace-shell.section-mode #tab-visit.active .card,
#workspace-shell.section-mode #tab-order.active .card,
#workspace-shell.section-mode #tab-shops-report.active .card,
#workspace-shell.section-mode #tab-queue.active .card{
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 22px !important;
  padding: 20px !important;
  box-shadow: 0 8px 22px rgba(16,24,40,.05) !important;
}

#workspace-shell.section-mode #tab-shop .section-head,
#workspace-shell.section-mode #tab-visit .section-head,
#workspace-shell.section-mode #tab-order .section-head,
#workspace-shell.section-mode #tab-shops-report .section-head,
#workspace-shell.section-mode #tab-queue .section-head{
  margin-bottom: 12px !important;
}

#workspace-shell.section-mode #tab-shop h2,
#workspace-shell.section-mode #tab-visit h2,
#workspace-shell.section-mode #tab-order h2,
#workspace-shell.section-mode #tab-shops-report h2,
#workspace-shell.section-mode #tab-queue h2{
  font-size: 1.7rem !important;
  letter-spacing: -.03em !important;
  margin-bottom: 4px !important;
}

#workspace-shell.section-mode #tab-shop p,
#workspace-shell.section-mode #tab-visit p,
#workspace-shell.section-mode #tab-order p,
#workspace-shell.section-mode #tab-shops-report p,
#workspace-shell.section-mode #tab-queue p{
  font-size: .98rem !important;
  color: #5f6f7f !important;
}

#workspace-shell.section-mode #tab-shop .grid,
#workspace-shell.section-mode #tab-visit .grid,
#workspace-shell.section-mode #tab-order .grid{
  gap: 12px !important;
}

#workspace-shell.section-mode #tab-shop .grid.two,
#workspace-shell.section-mode #tab-visit .grid.two,
#workspace-shell.section-mode #tab-order .grid.two{
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
}

#workspace-shell.section-mode #tab-shop label,
#workspace-shell.section-mode #tab-visit label,
#workspace-shell.section-mode #tab-order label{
  margin-bottom: 0 !important;
}

#workspace-shell.section-mode #tab-shop label span,
#workspace-shell.section-mode #tab-visit label span,
#workspace-shell.section-mode #tab-order label span{
  display: inline-block !important;
  margin-bottom: 6px !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
}

#workspace-shell.section-mode #tab-shop input,
#workspace-shell.section-mode #tab-shop select,
#workspace-shell.section-mode #tab-shop textarea,
#workspace-shell.section-mode #tab-visit input,
#workspace-shell.section-mode #tab-visit select,
#workspace-shell.section-mode #tab-visit textarea,
#workspace-shell.section-mode #tab-order input,
#workspace-shell.section-mode #tab-order select,
#workspace-shell.section-mode #tab-order textarea{
  min-height: 48px !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  font-size: .98rem !important;
}

#workspace-shell.section-mode #tab-shop textarea,
#workspace-shell.section-mode #tab-visit textarea,
#workspace-shell.section-mode #tab-order textarea{
  min-height: 92px !important;
}

#workspace-shell.section-mode #tab-shop .btn,
#workspace-shell.section-mode #tab-visit .btn,
#workspace-shell.section-mode #tab-order .btn{
  min-height: 46px !important;
  padding: 10px 16px !important;
  border-radius: 14px !important;
}

#workspace-shell.section-mode #tab-shop .stack,
#workspace-shell.section-mode #tab-visit .stack,
#workspace-shell.section-mode #tab-order .stack{
  gap: 12px !important;
}

#workspace-shell.section-mode #tab-shop .helper-text,
#workspace-shell.section-mode #tab-visit .helper-text,
#workspace-shell.section-mode #tab-order .helper-text{
  font-size: .88rem !important;
  margin-top: 4px !important;
}

#workspace-shell.section-mode #tab-shop .photo-preview,
#workspace-shell.section-mode #tab-visit .photo-preview{
  max-height: 160px !important;
  border-radius: 14px !important;
}

#workspace-shell.section-mode #tab-shop .actions-row,
#workspace-shell.section-mode #tab-visit .actions-row,
#workspace-shell.section-mode #tab-order .actions-row{
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 6px !important;
}

#workspace-shell.section-mode #tab-shop .actions-row .btn,
#workspace-shell.section-mode #tab-visit .actions-row .btn,
#workspace-shell.section-mode #tab-order .actions-row .btn{
  flex: 0 0 auto !important;
}

@media (max-width: 900px){
  #workspace-shell.section-mode #tab-shop .grid.two,
  #workspace-shell.section-mode #tab-visit .grid.two,
  #workspace-shell.section-mode #tab-order .grid.two{
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 1200px){
  #workspace-shell.section-mode #tab-shop.active .card,
  #workspace-shell.section-mode #tab-visit.active .card,
  #workspace-shell.section-mode #tab-order.active .card,
  #workspace-shell.section-mode #tab-shops-report.active .card,
  #workspace-shell.section-mode #tab-queue.active .card{
    padding: 24px !important;
  }
}


/* Retailer 360 modal and local edit */
.small{min-height:40px!important;padding:8px 14px!important;border-radius:12px!important}
.shop-card-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.modal-shell{position:fixed;inset:0;z-index:1400}
.modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(3px)}
.modal-panel{position:relative;max-width:1100px;margin:28px auto;background:#fff;border:1px solid #dbe4ea;border-radius:28px;box-shadow:0 24px 60px rgba(15,23,42,.18);padding:22px;max-height:calc(100vh - 56px);overflow:auto}
.modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}
.modal-head-actions{display:flex;gap:10px;align-items:center}
.retailer360-grid{display:grid;grid-template-columns:1.35fr .85fr;gap:16px}
.retailer360-main,.retailer360-side{display:grid;gap:16px}
.retailer360-card{background:#fff;border:1px solid #e6edf1;border-radius:22px;padding:18px}
.meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.meta-cell{background:#f8fbfc;border:1px solid #e6edf1;border-radius:16px;padding:12px}
.meta-cell span{display:block;font-size:.78rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#5f6f7f;margin-bottom:6px}
.meta-cell strong{font-size:1rem;color:#142132}
.meta-cell.media{grid-column:1/-1}
.shop-inline-photo{width:100%;max-height:240px;display:block;object-fit:cover;border-radius:14px;border:1px solid #dbe4ea;margin-top:10px}
.order360-card,.geo360-card{display:grid;gap:10px}
.order360-line{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:12px;border:1px solid #e6edf1;border-radius:14px;background:#f8fbfc}
.order360-line span{font-size:.84rem;font-weight:800;color:#5f6f7f;text-transform:uppercase;letter-spacing:.04em}
.order360-line strong{font-size:.98rem;color:#142132;text-align:right}
@media (max-width:900px){
  .retailer360-grid{grid-template-columns:1fr}
  .meta-grid{grid-template-columns:1fr}
}


/* Shops grid layout */
#shop-report-list.shops-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:16px;
  align-items:stretch;
}
#shop-report-list.shops-grid .empty{
  grid-column:1/-1;
}
.shop-report-card{
  height:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:0!important;
  overflow:hidden;
}
.shop-card-header{
  align-items:flex-start;
  gap:12px;
  padding:0 16px;
}
.shop-report-card .shop-meta-grid,
.shop-report-card .shop-detail-line,
.shop-report-card .shop-detail-sub,
.shop-report-card .shop-card-actions{
  padding-left:16px;
  padding-right:16px;
}
.shop-report-card .shop-card-actions{
  margin-top:auto;
  padding-bottom:16px;
}
.shop-photo-wrap{
  width:100%;
  aspect-ratio:4/3;
  background:#f4f7fa;
  overflow:hidden;
}
.shop-photo-wrap.empty{
  display:flex;
  align-items:center;
  justify-content:center;
}
.shop-photo-empty{
  font-weight:700;
  color:#6b7c8e;
}
.shop-name-link{
  appearance:none;
  border:0;
  background:none;
  padding:0;
  margin:0;
  font:inherit;
  font-size:1.02rem;
  font-weight:800;
  color:#142132;
  text-align:left;
  cursor:pointer;
}
.shop-name-link:hover,
.shop-name-link:focus{
  color:#0f5bd3;
  outline:none;
}
@media (max-width:640px){
  #shop-report-list.shops-grid{
    grid-template-columns:1fr 1fr;
    gap:12px;
  }
  .shop-card-header,
  .shop-report-card .shop-meta-grid,
  .shop-report-card .shop-detail-line,
  .shop-report-card .shop-detail-sub,
  .shop-report-card .shop-card-actions{
    padding-left:12px;
    padding-right:12px;
  }
  .shop-report-card .shop-card-actions{
    padding-bottom:12px;
  }
}
@media (max-width:420px){
  #shop-report-list.shops-grid{
    grid-template-columns:1fr;
  }
}


/* Design tightening pass */
.card,
.subcard,
.metric,
.kpi-card,
.hero-side-card,
.drawer-panel,
.drawer-nav-card,
.module-list-item,
.module-card,
.planner-card,
.retailer360-card,
.modal-panel,
.queue-item,
.shop-report-card,
.shop-photo-wrap,
.shop-meta-grid > div,
.shop-detail-line,
.meta-cell,
.order360-line {
  border-radius: 8px !important;
}

.btn,
.tab,
input,
select,
textarea,
.badge,
.status-pill,
.mini-link,
.quick-btn,
.workspace-pill {
  border-radius: 8px !important;
}

.topbar {
  background: #0f766e !important;
}

.section-head h2,
.section-head h3,
.dashboard-hero-main h2,
.topbar h1 {
  letter-spacing: 0 !important;
}

.btn,
.mini-link,
.shop-name-link,
.drawer-nav-card,
.module-list-item {
  min-height: 44px;
}

.shop-card-actions .btn {
  flex: 1 1 120px;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-actions .mini-link {
  background: #fff;
}
