/* Shop-manager reporting, scoped so cashier and offline layouts stay independent. */
#app[data-role="manager"] { background: #fafafa; color: #202124; }
.manager-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 86px; padding: calc(16px + env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-right, 0px)) 16px max(28px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid #e4e4e8; background: #fff; }
.manager-logo { position: static; transform: none; display: inline-flex; align-items: center; gap: 10px; color: #25232d; text-decoration: none; direction: ltr; }
.manager-logo .brand-mark { color: #fff; width: 36px; height: 40px; box-shadow: none; }
.manager-logo strong, .manager-logo .brand-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -.055em; }
.manager-top-actions { display: flex; align-items: center; gap: 12px; }
.manager-icon-button, .manager-menu > summary { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; min-width: 46px; min-height: 46px; padding: 11px; border: 1px solid #c9c7cd; border-radius: 50%; background: #fff; color: #25232d; cursor: pointer; }
.manager-icon-button svg, .manager-menu > summary svg { width: 22px; height: 22px; }
.manager-icon-button:hover, .manager-menu > summary:hover { background: #f5f1fc; border-color: #9a80ca; }
.manager-menu { position: relative; }
.manager-menu > summary { list-style: none; }
.manager-menu > summary::-webkit-details-marker { display: none; }
.manager-menu[open] > summary { background: #f3edfc; border-color: #8a6bc0; color: #5e35ae; }
.manager-menu > nav { position: absolute; inset-inline-end: 0; top: calc(100% + 12px); z-index: 45; min-width: 242px; width: max-content; max-width: calc(100vw - 32px); padding: 8px; background: #fff; border: 1px solid #e7e3ed; border-radius: 14px; box-shadow: 0 12px 40px #211c3220; }
.manager-menu nav button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 13px; border: 0; border-radius: 8px; background: transparent; text-align: start; color: #34303d; font-size: .9375rem; }
.manager-menu nav button:hover, .manager-menu nav button.active, .manager-menu nav button[aria-current="page"] { background: #f3edfc; color: #6841b5; }
.manager-menu nav button svg { width: 19px; height: 19px; }
#app[data-role="manager"] .app-nav { padding-inline: max(28px, env(safe-area-inset-left, 0px)); background: #fff; }
#app[data-role="manager"] .branch-label { font-size: .875rem; }
#app[data-role="manager"] .admin-nav-item { text-align: start; }
.dashboard-layout { display: block; min-height: 0; }
.dashboard-layout > .admin-content { width: 100%; max-width: 1440px; padding: 34px 32px 42px; margin-inline: auto; }
.dashboard-page { --dashboard-purple: #6540ba; --dashboard-muted: #72717a; --dashboard-blue: #2478bd; min-width: 0; color: #232326; }
.dashboard-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.dashboard-welcome { min-width: 0; }
.dashboard-welcome h1 { font-size: clamp(1.55rem, 2.35vw, 2.05rem); font-weight: 500; line-height: 1.55; letter-spacing: -.025em; overflow-wrap: anywhere; }
.dashboard-welcome p { margin-top: 6px; color: #6c6b75; font-size: .9375rem; line-height: 1.7; }
.dashboard-help { display: inline-flex; align-items: center; justify-content: center; border: 0; background: #f0e9fb; color: #7552b5; width: 44px; min-width: 44px; min-height: 44px; padding: 10px; border-radius: 50%; }
.dashboard-help svg { width: 21px; height: 21px; }
.dashboard-tabs { display: flex; align-items: stretch; gap: 26px; border-bottom: 1px solid #e5e3e8; margin-bottom: 25px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.dashboard-tabs button { position: relative; flex: 0 0 auto; border: 0; border-bottom: 3px solid transparent; padding: 12px 4px 14px; background: none; color: #5b5962; font-size: 1rem; font-weight: 500; white-space: nowrap; }
.dashboard-tabs button:hover { color: #6942b1; }
.dashboard-tabs button[aria-selected="true"] { border-bottom-color: #805bbb; color: #232126; font-weight: 650; }
.dashboard-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 15px; }
.dashboard-period { display: flex; min-width: 290px; flex: 0 1 360px; overflow: hidden; border: 1px solid #d8d3e0; background: #f2f0f6; border-radius: 7px; }
.dashboard-period button { flex: 1; min-width: 0; min-height: 46px; padding: 9px 20px; border: 0; border-inline-end: 1px solid #ded9e7; border-radius: 0; background: transparent; font-size: 1rem; color: #4b4851; }
.dashboard-period button:last-child { border-inline-end: 0; }
.dashboard-period button[aria-pressed="true"] { background: #7b55bb; color: #fff; }
.dashboard-period button:hover:not([aria-pressed="true"]) { background: #eae5f3; }
.dashboard-date { position: relative; display: flex; align-items: center; gap: 9px; min-width: 185px; flex: 0 1 240px; color: #63606b; font-size: .875rem; }
.dashboard-date .dashboard-control-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.dashboard-date input { appearance: none; min-width: 0; width: 100%; min-height: 46px; padding: 9px 12px; background: #fff; border: 1px solid #c9c6ce; border-radius: 7px; text-align: center; direction: ltr; color: #343039; font-size: 1rem; }
.dashboard-date input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .65; padding: 2px; }
.dashboard-compare { display: inline-flex; align-items: center; gap: 10px; position: relative; min-height: 46px; cursor: pointer; color: #4b4851; font-size: 1rem; white-space: nowrap; }
.dashboard-compare input { appearance: none; position: relative; width: 38px; min-width: 38px; height: 22px; margin: 0; border: 0; border-radius: 20px; background: #c9c7ce; cursor: pointer; transition: background .15s; }
.dashboard-compare input::before { content: ""; position: absolute; width: 28px; height: 28px; top: -3px; inset-inline-start: -2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 7px #28243425; transition: inset-inline-start .15s; }
.dashboard-compare input:checked { background: #b8a1df; }
.dashboard-compare input:checked::before { inset-inline-start: 13px; background: #7046b7; }
.dashboard-filter-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 46px; min-width: 46px; min-height: 46px; padding: 10px; border: 1px solid #c9c6ce; border-radius: 8px; background: #fff; color: #2b2830; font-size: .9375rem; }
.dashboard-filter-button svg { width: 20px; height: 20px; }
.dashboard-filter-dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 7px; height: 7px; border-radius: 50%; background: #7046b7; box-shadow: 0 0 0 2px #fff; }
.dashboard-filter-button[aria-expanded="true"] { border-color: #8c6abd; color: #6741b0; background: #f4effc; }
.dashboard-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px; padding: 18px; margin: 4px 0 14px; border: 1px solid #e4dfeb; border-radius: 10px; background: #f7f5fb; }
.dashboard-filters[hidden] { display: none !important; }
.dashboard-filters label { display: flex; flex: 1 1 200px; flex-direction: column; min-width: 0; gap: 7px; color: #5d5868; font-size: .875rem; }
.dashboard-filters select { appearance: none; width: 100%; min-height: 46px; padding: 10px 12px; padding-inline-end: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23716a7e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") left 12px center / 16px no-repeat; border: 1px solid #d5cfde; border-radius: 7px; color: #322c3c; font-size: 1rem; }
html[dir="ltr"] .dashboard-filters select { background-position: right 12px center; }
.dashboard-filters .button { min-height: 46px; background: #fff; }
.dashboard-scope-note { color: #706c78; font-size: .875rem; line-height: 1.8; margin-bottom: 26px; overflow-wrap: anywhere; }
.dashboard-scope-note > strong { display: block; margin-bottom: 2px; color: #4b4355; font-weight: 550; }
.dashboard-scope-note > span { display: block; }
.dashboard-grid-new { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 28px; }
.dashboard-card { min-width: 0; padding: 26px 25px 18px; background: #fff; border: 1px solid #efedf2; border-radius: 14px; box-shadow: 0 5px 23px #3027430e, 0 1px 5px #30274305; }
.dashboard-card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.dashboard-card-head h2 { font-size: 1.1rem; font-weight: 650; color: #252327; line-height: 1.55; letter-spacing: -.01em; overflow-wrap: anywhere; }
.dashboard-report-link { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 44px; padding: 1px 0; border: 0; background: none; color: var(--dashboard-blue, #2478bd); font-size: .9375rem; line-height: 1.6; text-decoration: none; white-space: nowrap; }
.dashboard-report-link:hover { color: #14568d; text-decoration: underline; text-underline-offset: 4px; }
.dashboard-value { display: block; color: #242226; font-size: clamp(1.85rem, 2.6vw, 2.6rem); font-weight: 450; line-height: 1.5; letter-spacing: -.025em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dashboard-value small, .dashboard-value + small { color: #615b6b; font-size: .875rem; font-weight: 400; letter-spacing: 0; }
.dashboard-value small { margin-inline-start: 5px; }
.dashboard-card-note { display: block; color: #74707c; font-size: .875rem; line-height: 1.75; margin-top: 4px; min-height: 25px; }
.dashboard-comparison { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #6c627b; background: #f5f2f9; border-radius: 5px; padding: 4px 8px; margin-top: 8px; font-size: .875rem; line-height: 1.6; }
.dashboard-comparison[data-trend="up"] { color: #24704d; background: #eef8f2; }
.dashboard-comparison[data-trend="down"] { color: #ad4b43; background: #fff2ef; }
.dashboard-chart { display: block; width: 100%; height: auto; max-width: 100%; min-width: 0; margin-top: 22px; direction: ltr; overflow: visible; fill: none; stroke: none; stroke-width: 0; }
.dashboard-chart > svg { display: block; width: 100%; height: auto; max-width: 100%; overflow: visible; fill: none; stroke: none; stroke-width: 0; }
.dashboard-chart .chart-gridline { stroke: #e6e3ea; stroke-width: 1; vector-effect: non-scaling-stroke; }
.dashboard-chart .chart-axis-label { fill: #77717f; stroke: none; font-size: 14px; font-weight: 400; font-family: inherit; }
.dashboard-chart .chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dashboard-chart .chart-dot { stroke-width: 0; }
.dashboard-chart .chart-bar-value { fill: #51485f; stroke: none; font-size: 13px; font-family: inherit; }
.dashboard-axis-labels { display: flex; justify-content: space-between; direction: ltr; min-width: 0; min-height: 70px; padding: 9px 12px 6px; margin-bottom: 12px; color: #77717f; }
.dashboard-axis-labels > span { display: block; flex: 1 1 0; min-width: 0; height: 20px; font-size: .875rem; line-height: 1.4; white-space: nowrap; text-align: end; transform: rotate(-50deg); transform-origin: 75% 50%; }
.dashboard-chart-key { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: #6b617a; font-size: .875rem; }
.dashboard-chart-key > span { display: inline-flex; align-items: center; gap: 7px; }
.dashboard-chart-key i { display: inline-block; width: 21px; height: 0; border-top: 2px solid currentColor; }
.dashboard-chart-key i.is-previous { border-top-style: dashed; }
.dashboard-section-note { color: #746b80; font-size: .875rem; line-height: 1.8; margin-block: 4px 18px; }
.dashboard-table-caption { color: #776c83; font-size: .875rem; line-height: 1.8; text-align: start; padding-block: 8px; }
.dashboard-control-label { color: #69606f; font-size: .875rem; font-weight: 500; }
.dashboard-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; color: #746d7f; font-size: .875rem; line-height: 1.7; list-style: none; padding: 0; }
.dashboard-legend > * { display: inline-flex; align-items: center; gap: 7px; overflow-wrap: anywhere; }
.dashboard-legend i { display: inline-block; width: 18px; height: 10px; flex-shrink: 0; border-radius: 1px; background: currentColor; }
.dashboard-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 38px 14px; min-height: 220px; color: #79717f; text-align: center; font-size: .9375rem; line-height: 1.8; }
.dashboard-empty svg { width: 34px; height: 34px; color: #b2a5c7; }
.dashboard-empty strong { color: #6c607b; font-size: 1rem; font-weight: 500; }
.dashboard-empty p { max-width: 320px; }
.dashboard-pie-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: center; padding-block: 28px 20px; min-width: 0; }
.dashboard-pie { display: block; width: 100%; height: auto; max-width: 255px; margin-inline: auto; fill: none; stroke: none; stroke-width: 0; direction: ltr; }
.dashboard-pie svg { display: block; width: 100%; height: auto; fill: none; stroke: none; stroke-width: 0; }
.dashboard-ranking { display: flex; flex-direction: column; gap: 15px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.dashboard-ranking li { display: flex; align-items: flex-start; gap: 9px; color: #655d71; font-size: .875rem; line-height: 1.6; min-width: 0; }
.dashboard-ranking li > i { display: block; width: 13px; height: 13px; min-width: 13px; margin-top: 5px; border-radius: 2px; background: currentColor; }
.dashboard-ranking li > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.dashboard-ranking li > bdi { flex: 0 1 auto; max-width: 48%; min-width: 0; margin-inline-start: auto; color: #4a3f56; font-size: .875rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dashboard-ranking li strong { color: #403747; font-size: .875rem; font-weight: 500; overflow-wrap: anywhere; }
.dashboard-ranking li small { display: block; color: #79717f; font-size: .875rem; font-variant-numeric: tabular-nums; }
.dashboard-chart-table { margin-top: 17px; border-top: 1px solid #f0edf4; color: #6f657d; font-size: .875rem; }
.dashboard-chart-table summary { padding: 12px 0 1px; min-height: 44px; cursor: pointer; font-size: .875rem; }
.dashboard-chart-table summary:hover { color: #6540ba; }
.dashboard-chart-table[open], .dashboard-chart-table details[open] { overflow-x: auto; }
.dashboard-chart-table table { width: 100%; border-collapse: collapse; min-width: 270px; margin-top: 8px; color: #544c5e; font-size: .875rem; }
.dashboard-chart-table th, .dashboard-chart-table td { padding: 9px 7px; text-align: start; border-bottom: 1px solid #ede9f2; font-variant-numeric: tabular-nums; }
.dashboard-chart-table th { background: #faf8fd; font-weight: 500; }
.dashboard-chart-table tr:last-child td { border-bottom: 0; }
.dashboard-report { min-width: 0; }
.modal:has(.dashboard-report) { max-width: 1000px; }
.dashboard-report-summary { display: flex; flex-wrap: wrap; gap: 12px 25px; padding: 16px 18px; margin-bottom: 18px; border: 1px solid #e7e1ef; border-radius: 9px; background: #faf8fd; color: #6b607b; font-size: .9375rem; line-height: 1.7; }
.dashboard-report-summary strong { display: block; font-size: 1.25rem; color: #392c4b; font-weight: 600; font-variant-numeric: tabular-nums; }
.dashboard-report-table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e9e3f0; border-radius: 9px; }
.dashboard-report-table table, table.dashboard-report-table { width: 100%; border-collapse: collapse; min-width: 520px; color: #4d425e; font-size: .875rem; }
.dashboard-report-table th, .dashboard-report-table td { padding: 12px; text-align: start; border-bottom: 1px solid #ece7f1; font-variant-numeric: tabular-nums; vertical-align: top; }
.dashboard-report-table th { color: #756982; background: #faf8fd; font-weight: 550; }
.dashboard-report-table tbody tr:last-child td { border-bottom: 0; }
.dashboard-report-table th:first-child, .dashboard-report-table td:first-child { max-width: 235px; overflow-wrap: anywhere; }
.dashboard-report p { color: #756a80; font-size: .875rem; line-height: 1.8; margin-bottom: 16px; }
.dashboard-page button:focus-visible, .manager-topbar button:focus-visible, .manager-menu summary:focus-visible, .dashboard-chart-table summary:focus-visible { outline: 3px solid #b19adf; outline-offset: 3px; }

@media (min-width: 1440px) {
  .dashboard-layout > .admin-content { padding-inline: 36px; }
  .dashboard-grid-new { gap: 30px; }
  .dashboard-card { padding: 30px 30px 20px; }
  .dashboard-card-head h2 { font-size: 1.2rem; }
}
@media (max-width: 1000px) {
  .dashboard-layout > .admin-content { padding: 28px 24px 36px; }
  .dashboard-grid-new { gap: 22px; }
  .dashboard-card { padding: 22px 20px 16px; }
  .dashboard-card-head { gap: 12px; }
  .dashboard-card-head h2 { font-size: 1rem; }
  .dashboard-report-link { font-size: .875rem; }
  .dashboard-pie-row { grid-template-columns: 1fr; padding-top: 20px; gap: 20px; }
  .dashboard-pie { max-width: 215px; }
  .dashboard-ranking { gap: 10px; }
}
@media (max-width: 700px) {
  .manager-topbar { min-height: 74px; gap: 10px; padding: calc(13px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) 13px max(18px, env(safe-area-inset-left, 0px)); }
  .manager-top-actions { gap: 8px; }
  .manager-logo strong, .manager-logo .brand-title { font-size: 1.4rem; }
  .manager-logo .brand-mark { width: 32px; height: 36px; }
  .manager-icon-button, .manager-menu > summary { min-width: 44px; width: 44px; min-height: 44px; height: 44px; padding: 11px; }
  #app[data-role="manager"] .app-nav { padding-inline: max(18px, env(safe-area-inset-left, 0px)); }
  #app[data-role="manager"] .app-nav .nav-tabs { display: none; }
  #app[data-role="manager"] .branch-label { font-size: .875rem; gap: 6px; }
  #app[data-role="manager"] .branch-label .badge { display: none; }
  .dashboard-layout > .admin-content { padding: 27px max(18px, env(safe-area-inset-right, 0px)) 34px max(18px, env(safe-area-inset-left, 0px)); }
  .dashboard-heading-row { margin-bottom: 22px; gap: 8px; }
  .dashboard-welcome h1 { font-size: 1.55rem; }
  .dashboard-welcome p { font-size: .875rem; }
  .dashboard-help { width: 38px; min-width: 38px; padding: 9px; }
  .dashboard-tabs { gap: 25px; margin-bottom: 25px; }
  .dashboard-tabs button { font-size: 1rem; padding-bottom: 12px; }
  .dashboard-controls { gap: 12px; align-items: center; }
  .dashboard-period { flex: 1 0 100%; min-width: 0; }
  .dashboard-period button { padding: 10px 12px; min-height: 48px; }
  .dashboard-date { flex: 1 0 100%; min-width: 0; }
  .dashboard-date input { min-height: 48px; }
  .dashboard-compare { margin-inline-end: auto; }
  .dashboard-filter-button { min-width: 46px; }
  .dashboard-filters { padding: 14px; gap: 12px; }
  .dashboard-filters label { flex-basis: 100%; }
  .dashboard-scope-note { font-size: .875rem; margin-bottom: 22px; }
  .dashboard-grid-new { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  .dashboard-card { padding: 24px 22px 15px; border-radius: 13px; }
  .dashboard-card-head h2 { font-size: 1.08rem; }
  .dashboard-report-link { font-size: .9375rem; }
  .dashboard-value { font-size: 2rem; }
  .dashboard-chart { margin-top: 24px; }
  .dashboard-pie-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; }
  .dashboard-ranking li, .dashboard-ranking li strong, .dashboard-ranking li small { font-size: .875rem; }
  .dashboard-ranking { gap: 12px; }
  .dashboard-card-note { min-height: 0; }
  .dashboard-report-summary { padding: 14px; }
}
@media (max-width: 420px) {
  .manager-topbar { padding-inline: max(14px, env(safe-area-inset-left, 0px)); }
  .manager-top-actions { gap: 6px; }
  .manager-logo { gap: 7px; }
  .manager-logo .brand-mark { width: 29px; height: 33px; border-radius: 9px; }
  .manager-logo strong, .manager-logo .brand-title { font-size: 1.3rem; }
  .dashboard-layout > .admin-content { padding-inline: max(14px, env(safe-area-inset-left, 0px)); }
  .dashboard-welcome h1 { font-size: 1.4rem; }
  .dashboard-card { padding: 20px 16px 12px; }
  .dashboard-card-head { gap: 10px; flex-wrap: wrap; }
  .dashboard-card-head h2 { font-size: 1rem; }
  .dashboard-report-link { font-size: .875rem; }
  .dashboard-value { font-size: 1.85rem; }
  .dashboard-pie-row { grid-template-columns: 1fr; padding-block: 20px 12px; }
  .dashboard-pie { max-width: 210px; }
  .dashboard-ranking { gap: 10px; }
  .dashboard-ranking li { align-items: center; }
  .dashboard-tabs { gap: 20px; }
  .dashboard-report-summary { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-page *, .manager-topbar * { transition: none !important; }
}
@media print {
  .manager-topbar, .dashboard-controls, .dashboard-tabs, .dashboard-filters, .dashboard-report-link, .dashboard-help { display: none !important; }
  .dashboard-card { break-inside: avoid; box-shadow: none; border-color: #d8d1df; }
}
