.stores-page{padding-bottom:40px}
.stores-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:24px;margin-bottom:16px;border:1px solid #dfe5e8;border-radius:16px;background:linear-gradient(135deg,#fff 0%,#f5f9f7 100%);box-shadow:0 4px 16px rgba(16,24,40,.05)}
.stores-hero h1{margin:3px 0 6px;font-size:30px;line-height:1.1}.stores-hero p{margin:0;max-width:720px;color:#667085}.stores-eyebrow{display:block;color:#1f6f50;font-size:11px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.stores-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.stores-kpi{padding:16px;border:1px solid #e2e8eb;border-radius:14px;background:#fff;box-shadow:0 2px 8px rgba(16,24,40,.04)}.stores-kpi small{display:block;color:#667085;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.stores-kpi b{display:block;margin-top:5px;font-size:26px}
.stores-directory-section{padding:18px;border:1px solid #e2e8eb;border-radius:16px;background:#fff}.stores-directory-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:14px}.stores-directory-toolbar h2{margin:0 0 3px;font-size:20px}.stores-directory-toolbar p{margin:0}.stores-search-field{display:grid;gap:5px;min-width:min(420px,100%)}.stores-search-field span{font-size:11px;font-weight:800;color:#475467;text-transform:uppercase;letter-spacing:.04em}.stores-search-field input{width:100%;padding:10px 12px;border:1px solid #cfd8dc;border-radius:10px;background:#fff}
.stores-status{display:none;margin:8px 0 14px;padding:11px 12px;border:1px solid #dbe5e9;border-radius:10px;background:#f8fafb;color:#475467;font-size:13px}.stores-status.visible{display:block}.stores-status.error{border-color:#fecaca;background:#fef2f2;color:#991b1b}
.stores-directory-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.store-directory-card{display:flex;flex-direction:column;min-width:0;padding:15px;border:1px solid #e2e8eb;border-radius:13px;background:#fff;box-shadow:0 2px 7px rgba(16,24,40,.035)}.store-directory-card:hover{border-color:#b9ccc3;box-shadow:0 5px 15px rgba(16,24,40,.07)}.store-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.store-card-number{font-size:18px;font-weight:900}.store-card-client{margin-top:2px;color:#475467;font-size:12px;font-weight:700}.store-card-name{margin:12px 0 3px;font-weight:800;line-height:1.3}.store-card-address{min-height:36px;color:#667085;font-size:12px;line-height:1.45}.store-card-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.store-card-badge{padding:4px 7px;border-radius:999px;background:#f2f4f7;color:#475467;font-size:10px;font-weight:800}.store-card-badge.profile{background:#dcfce7;color:#166534}.store-card-badge.mapped{background:#dbeafe;color:#1d4ed8}.store-card-badge.history{background:#fef3c7;color:#92400e}.store-card-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:13px;padding-top:12px;border-top:1px solid #edf0f2}.store-card-metrics div{min-width:0}.store-card-metrics small{display:block;color:#98a2b3;font-size:9px;font-weight:800;text-transform:uppercase}.store-card-metrics b{display:block;margin-top:2px;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stores-empty{grid-column:1/-1;padding:38px 20px;border:1px dashed #cfd8dc;border-radius:12px;text-align:center;color:#667085}.stores-skeleton{height:180px;border-radius:13px;background:linear-gradient(90deg,#f3f4f6 25%,#e9ecef 37%,#f3f4f6 63%);background-size:400% 100%;animation:storesShimmer 1.25s ease infinite}@keyframes storesShimmer{0%{background-position:100% 0}100%{background-position:0 0}}
body.dark .stores-hero,body.dark .stores-directory-section,body.dark .stores-kpi,body.dark .store-directory-card{background:#11191d;border-color:#27343a;color:#f3f4f6}body.dark .stores-hero{background:linear-gradient(135deg,#11191d,#0d1713)}body.dark .stores-hero p,body.dark .store-card-address,body.dark .store-card-client,body.dark .stores-directory-toolbar p{color:#98a2b3}body.dark .stores-search-field input{background:#0b1216;border-color:#34434a;color:#f3f4f6}body.dark .store-card-metrics{border-color:#27343a}
@media(max-width:1100px){.stores-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stores-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.stores-hero,.stores-directory-toolbar{flex-direction:column;align-items:stretch}.stores-search-field{min-width:0}.stores-directory-grid,.stores-kpis{grid-template-columns:1fr}.stores-hero{padding:18px}}

/* Stores Workspace Step 3A.1: the Stores tab is mounted at body level, so clear the fixed sidebar. */
#storesPage.active {
  position: relative !important;
  margin-left: 250px !important;
  width: calc(100vw - 250px) !important;
  max-width: calc(100vw - 250px) !important;
  min-width: 0 !important;
  padding: 12px 18px 40px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

#storesPage.active > .stores-hero,
#storesPage.active > .stores-kpis,
#storesPage.active > .stores-directory-section {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

body:has(#storesPage.active) {
  overflow-x: hidden !important;
}

@media (max-width: 1000px) {
  #storesPage.active {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px 28px !important;
  }
}

/* Stores Workspace Step 3B: full Store Details command center. */
.store-directory-card[role="button"]{cursor:pointer;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
.store-directory-card[role="button"]:hover,.store-directory-card[role="button"]:focus-visible{transform:translateY(-2px);outline:none;border-color:#7baa94;box-shadow:0 10px 24px rgba(16,24,40,.1)}
.store-card-open-hint{margin-top:10px;color:#1f6f50;font-size:11px;font-weight:900;text-align:right}
.store-details-workspace{display:block;padding:0}.store-details-workspace[hidden]{display:none!important}
.store-details-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.store-details-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.store-action-link{display:inline-flex;align-items:center;text-decoration:none}
.store-detail-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:24px;border:1px solid #dfe5e8;border-radius:16px;background:linear-gradient(135deg,#fff 0%,#f5f9f7 100%);box-shadow:0 4px 16px rgba(16,24,40,.05)}
.store-detail-hero h1{margin:4px 0 5px;font-size:32px}.store-detail-hero p{margin:0;color:#475467;font-size:15px;font-weight:700}.store-detail-address{margin-top:10px;color:#667085}.store-detail-badge-stack{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}
.store-detail-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}.store-detail-kpis article{padding:16px;border:1px solid #e2e8eb;border-radius:14px;background:#fff;box-shadow:0 2px 8px rgba(16,24,40,.04)}.store-detail-kpis small{display:block;color:#667085;font-size:10px;font-weight:900;text-transform:uppercase}.store-detail-kpis b{display:block;margin-top:5px;font-size:25px}
.store-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.store-detail-panel{min-width:0;padding:18px;border:1px solid #e2e8eb;border-radius:15px;background:#fff}.store-detail-panel-wide{grid-column:1/-1}.store-detail-panel h2{margin:0 0 13px;font-size:19px}.store-detail-empty{padding:18px;border:1px dashed #cfd8dc;border-radius:10px;color:#667085;text-align:center}
.store-detail-wo-row{display:grid;gap:7px;padding:13px 0;border-bottom:1px solid #edf0f2}.store-detail-wo-row:last-child{border-bottom:0}.store-detail-wo-row>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}.store-detail-wo-row span{color:#667085;font-size:12px}.store-detail-wo-row p{margin:0;color:#344054;line-height:1.45}.store-detail-wo-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.store-detail-wo-footer button{padding:6px 9px;font-size:11px}
.store-detail-list{display:grid;gap:10px;margin:0}.store-detail-list div{display:grid;grid-template-columns:120px 1fr;gap:12px}.store-detail-list dt{color:#667085;font-size:11px;font-weight:900;text-transform:uppercase}.store-detail-list dd{margin:0;font-weight:700}.store-detail-issues{margin:10px 0 0;padding-left:20px}.store-detail-issues li{margin:7px 0;line-height:1.45}
body.dark .store-detail-hero,body.dark .store-detail-kpis article,body.dark .store-detail-panel{background:#11191d;border-color:#27343a;color:#f3f4f6}body.dark .store-detail-hero{background:linear-gradient(135deg,#11191d,#0d1713)}body.dark .store-detail-address,body.dark .store-detail-hero p,body.dark .store-detail-wo-row span,body.dark .store-detail-wo-row p{color:#98a2b3}body.dark .store-detail-wo-row{border-color:#27343a}
@media(max-width:900px){.store-detail-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.store-detail-grid{grid-template-columns:1fr}.store-detail-panel-wide{grid-column:auto}}
@media(max-width:720px){.store-details-toolbar,.store-detail-hero{flex-direction:column}.store-details-actions,.store-detail-badge-stack{justify-content:flex-start}.store-detail-kpis{grid-template-columns:1fr 1fr}.store-detail-list div{grid-template-columns:1fr}.store-detail-wo-row>div:first-child,.store-detail-wo-footer{align-items:flex-start;flex-direction:column}}

/* Stores Workspace Step 3C: operational intelligence and activity timeline. */
.store-detail-kpis article span,.store-intelligence-strip article span{display:block;margin-top:4px;color:#667085;font-size:11px}.store-detail-kpis .store-kpi-text{font-size:18px;line-height:1.25}
.store-intelligence-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 14px}.store-intelligence-strip article{padding:15px 16px;border:1px solid #dce7e1;border-radius:14px;background:linear-gradient(135deg,#f7fbf9,#fff)}.store-intelligence-strip small{display:block;color:#1f6f50;font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}.store-intelligence-strip b{display:block;margin-top:6px;font-size:17px;line-height:1.25}
.store-activity-row{display:grid;grid-template-columns:14px 1fr;gap:12px;padding:12px 0;border-bottom:1px solid #edf0f2}.store-activity-row:last-child{border-bottom:0}.store-activity-dot{width:10px;height:10px;margin-top:6px;border:3px solid #dcfce7;border-radius:50%;background:#1f6f50}.store-activity-content{min-width:0}.store-activity-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.store-activity-head span{color:#667085;font-size:11px}.store-activity-title{margin-top:3px;font-size:13px;font-weight:800}.store-activity-content p{margin:6px 0;color:#475467;line-height:1.45}.store-activity-content button{padding:6px 9px;font-size:11px}
.store-theme-list{display:grid;gap:12px}.store-theme-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}.store-theme-track{height:8px;margin-top:5px;overflow:hidden;border-radius:999px;background:#edf2ef}.store-theme-track span{display:block;height:100%;border-radius:999px;background:#1f6f50}.store-intelligence-note{margin:14px 0 0;color:#667085;font-size:11px;line-height:1.45}.store-panel-action{margin-top:14px}
body.dark .store-intelligence-strip article{background:linear-gradient(135deg,#0e1914,#11191d);border-color:#27343a}body.dark .store-detail-kpis article span,body.dark .store-intelligence-strip article span,body.dark .store-activity-head span,body.dark .store-activity-content p,body.dark .store-intelligence-note{color:#98a2b3}body.dark .store-activity-row{border-color:#27343a}body.dark .store-theme-track{background:#26342e}
@media(max-width:900px){.store-intelligence-strip{grid-template-columns:1fr}}

/* Stores Step D.2: searchable historical work order explorer. */
.store-history-explorer-panel{padding:0;overflow:hidden}.store-history-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px;border-bottom:1px solid #e5eaed}.store-history-header h2{margin:0 0 5px}.store-history-header p{margin:0;color:#667085;font-size:12px}.store-history-summary{display:grid;grid-template-columns:repeat(4,minmax(95px,1fr));gap:8px}.store-history-summary span{padding:9px 11px;border-radius:10px;background:#f6f8f7}.store-history-summary small{display:block;color:#667085;font-size:9px;font-weight:900;text-transform:uppercase}.store-history-summary b{display:block;margin-top:3px;font-size:14px}
.store-history-controls{display:grid;grid-template-columns:minmax(240px,2fr) repeat(4,minmax(130px,1fr));gap:10px;padding:14px 18px;background:#fafbfb;border-bottom:1px solid #e5eaed}.store-history-controls label{display:grid;gap:5px}.store-history-controls label span{color:#667085;font-size:9px;font-weight:900;text-transform:uppercase}.store-history-controls input,.store-history-controls select{width:100%;min-width:0;padding:9px 10px;border:1px solid #d6dee2;border-radius:9px;background:#fff;color:#101828}.store-history-refreshing{padding:7px 18px;background:#fef3c7;color:#92400e;font-size:11px;font-weight:800}
.store-history-records{padding:0 18px}.store-history-record{border-bottom:1px solid #edf0f2}.store-history-record:last-child{border-bottom:0}.store-history-record-toggle{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;width:100%;padding:15px 0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.store-history-record-toggle:hover .store-history-record-primary strong{color:#1f6f50}.store-history-record-primary{display:grid;min-width:0;gap:3px}.store-history-record-primary b{font-size:13px}.store-history-record-primary strong{overflow:hidden;font-size:13px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.store-history-record-primary small,.store-history-record-meta small{color:#667085}.store-history-record-meta{display:grid;min-width:180px;grid-template-columns:1fr auto;column-gap:12px;align-items:center;text-align:right}.store-history-record-meta b,.store-history-record-meta small{grid-column:1}.store-history-chevron{grid-column:2;grid-row:1/3;font-size:18px;transition:transform .15s ease}.store-history-record-toggle[aria-expanded="true"] .store-history-chevron{transform:rotate(180deg)}
.store-history-record-details{padding:0 0 16px}.store-history-record-details dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;padding:14px;border-radius:10px;background:#f7f9f8}.store-history-record-details dl div{min-width:0}.store-history-record-details dt{color:#667085;font-size:9px;font-weight:900;text-transform:uppercase}.store-history-record-details dd{margin:4px 0 0;white-space:pre-wrap;line-height:1.45}.store-history-record-totals{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}.store-history-record-totals span{min-width:120px;padding:9px 11px;border:1px solid #e2e8eb;border-radius:9px}.store-history-record-totals small{display:block;color:#667085;font-size:9px;font-weight:900;text-transform:uppercase}.store-history-record-totals b{display:block;margin-top:3px}.store-history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-top:1px solid #e5eaed}.store-history-pagination span{color:#667085;font-size:12px;text-align:center}.store-history-loading,.store-history-error{display:grid;gap:8px;padding:30px;text-align:center;color:#667085}.store-history-error span{font-size:12px}.store-history-error button{justify-self:center}
body.dark .store-history-header,body.dark .store-history-controls,body.dark .store-history-pagination{border-color:#27343a}body.dark .store-history-controls{background:#0d1519}body.dark .store-history-controls input,body.dark .store-history-controls select{background:#0b1216;border-color:#34434a;color:#f3f4f6}body.dark .store-history-summary span,body.dark .store-history-record-details dl{background:#0d1519}body.dark .store-history-record,body.dark .store-history-record-totals span{border-color:#27343a}body.dark .store-history-header p,body.dark .store-history-summary small,body.dark .store-history-controls label span,body.dark .store-history-record-primary small,body.dark .store-history-record-meta small,body.dark .store-history-record-details dt,body.dark .store-history-pagination span{color:#98a2b3}
@media(max-width:1100px){.store-history-header{flex-direction:column}.store-history-summary{width:100%}.store-history-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.store-history-search{grid-column:1/-1}}
@media(max-width:720px){.store-history-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.store-history-controls{grid-template-columns:1fr}.store-history-search{grid-column:auto}.store-history-record-toggle{grid-template-columns:1fr}.store-history-record-meta{min-width:0;text-align:left}.store-history-record-details dl{grid-template-columns:1fr}.store-history-pagination{flex-wrap:wrap;justify-content:center}.store-history-pagination span{order:-1;width:100%}}

.store-history-financial-summary{padding:16px 18px;border-bottom:1px solid #e5eaed;background:#fff}.store-history-financial-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:12px}.store-history-financial-heading small{color:#1f6f50;font-size:9px;font-weight:900;text-transform:uppercase}.store-history-financial-heading h3{margin:3px 0 0;font-size:16px}.store-history-financial-heading p{max-width:560px;margin:0;color:#667085;font-size:11px;line-height:1.45;text-align:right}.store-history-financial-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.store-history-financial-grid span{min-width:0;padding:11px 12px;border:1px solid #e2e8eb;border-radius:10px;background:#f8faf9}.store-history-financial-grid small{display:block;color:#667085;font-size:9px;font-weight:900;text-transform:uppercase}.store-history-financial-grid b{display:block;margin-top:4px;font-size:16px}.store-history-financial-grid em{display:block;margin-top:2px;color:#667085;font-size:10px;font-style:normal}body.dark .store-history-financial-summary{background:#0b1216;border-color:#27343a}body.dark .store-history-financial-grid span{background:#0d1519;border-color:#27343a}body.dark .store-history-financial-heading p,body.dark .store-history-financial-grid small,body.dark .store-history-financial-grid em{color:#98a2b3}@media(max-width:1100px){.store-history-financial-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.store-history-financial-heading{flex-direction:column}.store-history-financial-heading p{text-align:left}.store-history-financial-grid{grid-template-columns:1fr}}
