:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --ink: #172033;
  --muted: #69758a;
  --line: #dce3ee;
  --primary: #155e75;
  --primary-2: #0f766e;
  --accent: #f59e0b;
  --danger: #b42318;
  --success: #15803d;
  --shadow: 0 18px 50px rgba(23, 32, 51, 0.12);
  --radius: 8px;
}

/* FINAL mobile management toolbars no horizontal scroll v20260622-02 */
@media (max-width: 820px) {
  #listView .table-toolbar,
  #stallShiftView .table-toolbar,
  #stallSalesView > .table-toolbar,
  #practiceReportView > .table-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    padding: 10px 8px !important;
    margin-bottom: 10px !important;
    white-space: normal !important;
  }

  #listView .table-toolbar h2,
  #stallShiftView .table-toolbar h2,
  #stallSalesView > .table-toolbar h2,
  #practiceReportView > .table-toolbar h2 {
    grid-column: 1 / -1 !important;
    display: block !important;
    margin: 0 !important;
    color: var(--ink) !important;
    font-size: 20px !important;
    line-height: 1.15 !important;
    text-align: left !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  #stallShiftView .stacked-title {
    display: block !important;
    justify-items: start !important;
  }

  #stallShiftView .stacked-title span {
    display: inline !important;
  }

  #listView .table-toolbar .segmented-control,
  #stallShiftView .table-toolbar .segmented-control {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #listView .table-toolbar .segment-button,
  #stallShiftView .table-toolbar .segment-button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  #listView .schedule-create-actions,
  #practiceReportView .toolbar-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #practiceReportView .toolbar-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #listView .schedule-create-actions button,
  #practiceReportView .toolbar-actions button,
  #stallSalesView > .table-toolbar .compact-button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 8px !important;
    font-size: 14px !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  #listView .toolbar-month-control,
  #stallShiftView .toolbar-month-control,
  #stallSalesView > .table-toolbar .toolbar-month-control,
  #practiceReportView > .table-toolbar .toolbar-month-control {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    padding: 6px 8px !important;
    color: var(--muted) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  #listView .toolbar-month-control input[type="month"],
  #stallShiftView .toolbar-month-control input[type="month"],
  #stallSalesView > .table-toolbar .toolbar-month-control input[type="month"],
  #practiceReportView > .table-toolbar .toolbar-month-control input[type="month"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 34px !important;
    text-align: center !important;
  }

  #listView #listCount,
  #stallShiftView .toolbar-metrics,
  #stallSalesView > .table-toolbar .toolbar-metrics {
    grid-column: 1 / -1 !important;
  }

  #listView #listCount {
    display: grid !important;
    place-items: center !important;
    min-height: 40px !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--muted) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
  }

  #stallShiftView .toolbar-metrics,
  #stallSalesView > .table-toolbar .toolbar-metrics {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #stallShiftView .toolbar-metrics span,
  #stallSalesView > .table-toolbar .toolbar-metrics span {
    display: grid !important;
    place-items: center !important;
    min-width: 0 !important;
    min-height: 52px !important;
    padding: 6px 8px !important;
    text-align: center !important;
    writing-mode: horizontal-tb !important;
    white-space: normal !important;
    word-break: keep-all !important;
  }

  #stallShiftView .toolbar-metrics span:first-child,
  #stallSalesView > .table-toolbar .toolbar-metrics span:first-child {
    grid-column: 1 / -1 !important;
    min-height: 42px !important;
  }

  #stallShiftView .toolbar-metrics strong,
  #stallSalesView > .table-toolbar .toolbar-metrics strong {
    display: inline !important;
    font-size: 16px !important;
    white-space: nowrap !important;
  }

  #stallSalesView > .table-toolbar .compact-button {
    grid-column: 1 / -1 !important;
  }

  #stallSalesView .sub-tabs,
  #practiceReportView .sub-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 8px 0 12px !important;
  }

  #stallSalesView .sub-tab,
  #practiceReportView .sub-tab {
    width: 100% !important;
    min-height: 40px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  #practiceReportView .practice-report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui,
    sans-serif;
}

body.auth-locked {
  min-height: 100dvh;
  overflow: hidden;
}

body.auth-locked #adminShell {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  background: var(--bg);
  padding: 12vh 24px 24px;
}

.auth-card {
  width: min(520px, 100%);
}

.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(168, 85, 247, 0.2), transparent 26%),
    radial-gradient(circle at 52% 58%, rgba(14, 165, 233, 0.16), transparent 28%),
    linear-gradient(135deg, #02040a 0%, #090d18 48%, #02040a 100%);
  opacity: 1;
}

.boot-splash-bg {
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.06) 0 1px, transparent 1px 90px);
  transform: translateX(-18%) skewX(-12deg);
  animation: bootSweep 1.75s ease-out both;
}

.boot-splash-card {
  position: relative;
  display: grid;
  place-items: center;
  width: min(720px, 86vw);
  color: #f8fafc;
  text-align: center;
  transform: translateY(16px) scale(0.94);
  opacity: 0;
  animation: bootLogoIn 1.55s cubic-bezier(0.2, 0.84, 0.22, 1) forwards;
}

.boot-splash-card img {
  display: block;
  width: min(560px, 78vw);
  max-height: 62vh;
  object-fit: contain;
  border-radius: 14px;
  filter:
    drop-shadow(0 0 22px rgba(255, 255, 255, 0.18))
    drop-shadow(0 0 52px rgba(168, 85, 247, 0.2));
}

.boot-splash-line {
  display: block;
  width: min(420px, 58vw);
  height: 1px;
  margin-top: 20px;
  background: linear-gradient(90deg, transparent, rgba(248, 250, 252, 0.82), transparent);
  transform: scaleX(0);
  transform-origin: center;
  animation: bootLine 1.2s 0.35s ease-out forwards;
}

.boot-splash-card p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.boot-splash.is-finishing {
  animation: bootFadeOut 0.42s ease-in forwards;
}

@keyframes bootLogoIn {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.88);
    filter: blur(10px);
  }
  58% {
    opacity: 1;
    transform: translateY(0) scale(1.02);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes bootSweep {
  from {
    transform: translateX(-24%) skewX(-12deg);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  to {
    transform: translateX(18%) skewX(-12deg);
    opacity: 0.18;
  }
}

@keyframes bootLine {
  to {
    transform: scaleX(1);
  }
}

@keyframes bootFadeOut {
  to {
    opacity: 0;
    transform: scale(1.02);
  }
}

button,
input,
select {
  font: inherit;
}

select[multiple] {
  min-height: 150px;
  padding: 4px;
}

select[multiple] option {
  border-radius: 5px;
  padding: 6px 8px;
}

.checkbox-filter {
  display: grid;
  gap: 4px;
  max-height: 190px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 6px;
}

.checkbox-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border-radius: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 6px;
}

.checkbox-option:hover {
  background: var(--surface-2);
}

.checkbox-option input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
}

.checkbox-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button,
.file-button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

button:hover,
.file-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(21, 94, 117, 0.16);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.45);
  outline-offset: 2px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.mobile-menu-button,
.mobile-menu-backdrop {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  margin-bottom: 22px;
}

.brand-logo {
  display: block;
  width: min(176px, 100%);
  max-height: 82px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.18));
}

.nav-tabs,
.dashboard-nav-tabs,
.filter-panel,
.data-panel {
  display: grid;
  gap: 10px;
}

.nav-tabs {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 22px;
}

.dashboard-nav-tabs {
  display: none;
  margin-bottom: 22px;
}

.nav-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 6px;
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.15;
  box-shadow: none;
}

.nav-tab.active {
  background: var(--primary);
  color: #fff;
}

.nav-tab-stacked {
  flex-direction: column;
  gap: 2px;
  white-space: normal;
}

.nav-tab-stacked span {
  display: block;
}

.image-library-view {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px;
}

.image-library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.image-library-head h2 { margin: 4px 0 8px; }
.image-library-head p { margin: 0; color: var(--muted); }
.image-library-status { padding: 7px 11px; border-radius: 999px; background: #fff7ed; color: #9a3412; font-size: 12px; font-weight: 700; white-space: nowrap; }
.image-library-search { display: flex; gap: 12px; align-items: end; margin-top: 28px; }
.image-library-search label { flex: 1; display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.image-library-search input { width: 100%; }
.image-library-empty { display: grid; gap: 8px; margin-top: 24px; padding: 42px 28px; text-align: center; border: 1px dashed #cbd5e1; border-radius: 18px; background: #f8fafc; color: var(--muted); }
.image-library-empty strong { color: var(--ink); }
.image-library-empty.has-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); text-align: left; }
.image-library-card { display: grid; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.image-library-preview { display: block; padding: 0; overflow: hidden; border: 0; border-radius: 8px; background: #e2e8f0; cursor: zoom-in; }
.image-library-preview:focus-visible { outline: 3px solid #0e7490; outline-offset: 2px; }
.image-library-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #e2e8f0; transition: transform .18s ease; }
.image-library-preview:hover img { transform: scale(1.02); }
.image-library-card a { font-size: 13px; font-weight: 700; color: var(--primary); }
.image-preview-dialog { width: min(1080px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 18px; background: #111827; color: #fff; box-shadow: 0 24px 80px rgba(15, 23, 42, .48); }
.image-preview-dialog::backdrop { background: rgba(15, 23, 42, .76); }
.image-preview-panel { display: grid; max-height: calc(100vh - 32px); }
.image-preview-panel img { display: block; width: 100%; max-height: calc(100vh - 150px); object-fit: contain; background: #111827; }
.image-preview-close { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .72); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.image-preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; }
.image-preview-footer strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-preview-footer a { color: #a5f3fc; font-weight: 800; white-space: nowrap; }
.image-interview-section { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.image-interview-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.image-interview-heading h3 { margin: 4px 0 8px; font-size: 20px; }
.image-interview-heading p { margin: 0; color: var(--muted); }
.image-interview-actions { display: flex; align-items: end; gap: 10px; }
.image-interview-actions label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.image-interview-actions select { min-width: 150px; }
.image-interview-empty { display: grid; place-items: center; min-height: 120px; margin-top: 18px; padding: 24px; border: 1px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; color: var(--muted); text-align: center; }
.image-interview-empty strong { color: var(--ink); }
.image-interview-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 18px; }
.image-interview-card { min-width: 0; }
.image-interview-brand { color: var(--muted); font-size: 12px; font-weight: 800; }
.image-schedule-section { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.image-schedule-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.image-schedule-heading h3 { margin: 4px 0 8px; font-size: 20px; }
.image-schedule-heading p { margin: 0; color: var(--muted); }
.image-schedule-updated { color: var(--muted); font-size: 12px; white-space: nowrap; }
.image-schedule-filters { display: flex; align-items: end; gap: 12px; margin-top: 22px; }
.image-schedule-filters label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.image-schedule-filters select { min-width: 180px; }
.image-schedule-empty, .image-schedule-loading { display: grid; place-items: center; min-height: 120px; margin-top: 18px; padding: 24px; border: 1px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; color: var(--muted); text-align: center; }
.image-schedule-empty strong { color: var(--ink); }
.image-schedule-list { display: grid; gap: 10px; margin-top: 18px; }
.image-schedule-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(132px, 292px); gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.image-schedule-row[data-image-status="unselected"] { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 10px; }
.image-schedule-info { display: grid; gap: 5px; min-width: 0; }
.image-schedule-info time { color: var(--primary); font-size: 13px; font-weight: 800; }
.image-schedule-info strong { font-size: 16px; }
.image-schedule-info span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.image-schedule-fields { display: flex; flex-wrap: wrap; gap: 5px; }
.image-schedule-fields span { display: inline-flex; align-items: center; max-width: 100%; border: 1px solid #dbe5ef; border-radius: 999px; background: #f8fafc; padding: 3px 7px; color: #334155; font-size: 11px; font-weight: 700; }
.image-schedule-fields b { margin-right: 4px; color: #64748b; font-size: 10px; }
.image-schedule-image { display: grid; justify-content: start; gap: 8px; min-width: 0; }
.image-schedule-row[data-image-status="unselected"] .image-schedule-image { width: 100%; justify-content: stretch; }
.image-schedule-preview { display: grid; min-height: 160px; place-items: center; padding: 0; overflow: hidden; border: 0; border-radius: 9px; background: #f1f5f9; cursor: zoom-in; }
.image-schedule-preview img { display: block; width: 100%; height: 160px; object-fit: contain; transition: transform .18s ease; }
.image-schedule-preview:hover img { transform: scale(1.02); }
.image-schedule-download { color: var(--primary); font-size: 12px; font-weight: 800; text-align: center; }
.image-schedule-candidates { display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 136px)); justify-content: start; gap: 8px; }
.image-schedule-row[data-image-status="unselected"] .image-schedule-candidates { display: flex; width: 100%; max-width: 100%; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.image-schedule-candidate, .image-schedule-selected { display: grid; width: min(136px, 100%); gap: 6px; }
.image-schedule-row[data-image-status="unselected"] .image-schedule-candidate { flex: 0 0 136px; scroll-snap-align: start; }
.image-schedule-selected-area { display: flex; flex-wrap: wrap; align-items: start; gap: 8px; }
.image-schedule-selected-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 136px)); gap: 8px; }
.image-schedule-selected > span { color: #047857; font-size: 12px; font-weight: 800; text-align: center; }
.image-schedule-select { padding: 7px 8px; border: 0; border-radius: 7px; background: #0f766e; color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.image-schedule-select:disabled { opacity: .65; cursor: wait; }
.image-schedule-clear { padding: 7px 8px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #475569; font-size: 12px; font-weight: 800; cursor: pointer; }
.image-schedule-clear:disabled { opacity: .65; cursor: wait; }
.image-schedule-no-image { display: grid; width: 136px; min-width: 136px; min-height: 92px; place-items: center; border: 1px dashed #cbd5e1; border-radius: 9px; background: #f8fafc; color: #94a3b8; font-size: 13px; font-weight: 700; }
.image-schedule-no-image { cursor: pointer; }
.image-schedule-no-image small { font-size: 10px; font-weight: 700; }
.image-schedule-manual { display: grid; gap: 8px; }
.image-schedule-manual-toggle { width: min(292px, 100%); padding: 9px 10px; border: 1px solid #0f766e; border-radius: 8px; background: #ecfdf5; color: #0f766e; font-size: 12px; font-weight: 900; cursor: pointer; }
.image-schedule-add-control { display: grid; width: min(136px, 100%); gap: 8px; }
.image-schedule-add-image { display: grid; width: 136px; min-height: 160px; place-items: center; border: 1px dashed #0f766e; border-radius: 9px; background: #ecfdf5; color: #0f766e; font-size: 14px; font-weight: 900; cursor: pointer; }
.image-schedule-manual-panel { display: grid; width: min(292px, 100%); gap: 8px; }
.image-schedule-manual-panel label { display: grid; gap: 4px; color: #64748b; font-size: 11px; font-weight: 700; }
.image-schedule-manual-panel input { min-width: 0; padding: 8px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; }
.image-schedule-manual-panel [data-image-manual-results] { color: #64748b; font-size: 12px; }
.image-schedule-limit { width: min(292px, 100%); padding: 9px 10px; border: 1px solid #dbe5ef; border-radius: 8px; background: #f8fafc; color: #64748b; font-size: 12px; font-weight: 800; text-align: center; }

@media (max-width: 640px) {
  .image-library-view { padding: 20px 16px; }
  .image-library-head, .image-library-search, .image-interview-heading, .image-interview-actions, .image-schedule-heading, .image-schedule-filters { align-items: stretch; flex-direction: column; }
  .image-library-status { align-self: flex-start; }
  .image-schedule-updated { white-space: normal; }
  .image-schedule-filters select { min-width: 0; }
  .image-interview-actions select { min-width: 0; }
  .image-schedule-row { grid-template-columns: 1fr; }
  .image-schedule-image { max-width: 292px; }
}

.nav-main,
.nav-sub {
  display: block;
}

.nav-sub {
  margin-top: 3px;
  color: inherit;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.72;
}

.dashboard-mode {
  --dash-bg: #050914;
  --dash-panel: rgba(8, 17, 35, 0.86);
  --dash-line: rgba(120, 155, 210, 0.35);
  --dash-muted: #93a4ba;
  background: #030712;
}

.dashboard-mode .sidebar {
  border-right-color: rgba(120, 155, 210, 0.14);
  background:
    radial-gradient(circle at 30% 0%, rgba(168, 85, 247, 0.22), transparent 34%),
    linear-gradient(180deg, #060a14 0%, #02040a 100%);
  color: #f8fbff;
}

.dashboard-mode .brand-logo {
  width: 188px;
  max-height: 92px;
  padding: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.96), rgba(203, 213, 225, 0.9) 58%, rgba(100, 116, 139, 0.82) 100%);
  border: 1px solid rgba(248, 250, 252, 0.42);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.34),
    0 0 0 1px rgba(168, 85, 247, 0.2),
    0 14px 36px rgba(0, 0, 0, 0.42);
  filter:
    contrast(1.16)
    brightness(1.12)
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.22));
}

.dashboard-mode .nav-tabs {
  display: none;
}

.dashboard-mode .dashboard-nav-tabs {
  display: grid;
  grid-template-columns: 1fr;
}

.dashboard-mode .dashboard-nav-tabs .nav-tab {
  justify-content: flex-start;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #f4f7fb;
  padding: 0 22px;
  text-align: left;
}

.dashboard-mode .dashboard-nav-tabs .nav-tab.active {
  border-color: rgba(217, 70, 239, 0.48);
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.32), rgba(168, 85, 247, 0.06));
  color: #fff;
  box-shadow: inset 0 0 22px rgba(168, 85, 247, 0.2);
}

.dashboard-mode .filter-panel,
.dashboard-mode .data-panel,
.dashboard-mode .topbar,
.dashboard-mode .login-status,
.dashboard-mode .lock-warning {
  display: none;
}

.dashboard-mode .main {
  background:
    radial-gradient(circle at 74% 10%, rgba(14, 165, 233, 0.13), transparent 28%),
    radial-gradient(circle at 22% 18%, rgba(168, 85, 247, 0.13), transparent 25%),
    #050914;
  color: #f8fbff;
}

.filter-panel,
.data-panel {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}

.data-panel-field {
  gap: 5px;
}

.data-panel .form-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary);
  box-shadow: none;
}

.danger-button {
  background: #fff2f0;
  color: var(--danger);
  border: 1px solid #ffd6d1;
}

.file-button {
  display: grid;
  place-items: center;
  background: var(--primary-2);
}

.file-button input {
  display: none;
}

.main {
  min-width: 0;
  padding: 16px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
}

h2 {
  font-size: 19px;
}

.topbar-actions,
.calendar-head,
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.quick-days {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.login-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.login-status > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 340px;
}

.content-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 118px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 6px;
}

.content-filter-tabs button {
  min-height: 28px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 0 9px;
  box-shadow: none;
  font-size: 12px;
}

.content-filter-tabs button.active {
  border-color: rgba(21, 94, 117, 0.35);
  background: #e9f7f6;
  color: var(--primary-dark);
}

.login-status strong {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #dcfce7;
  color: #14532d;
  padding: 0 10px;
  font-size: 12px;
}

.read-only-mode .login-status strong {
  background: #fff4df;
  color: #7c2d12;
}

.login-status span,
.login-status em,
.login-status li strong {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

#currentUserLabel {
  color: var(--ink);
  font-weight: 900;
}

.login-user-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.push-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 24px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  padding: 2px 8px 2px 4px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.push-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.push-toggle:has(input:checked) {
  border-color: rgba(21, 94, 117, 0.28);
  background: #e9f7f6;
  color: var(--primary-dark);
}

.push-toggle:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.58;
}

.dashboard-user-actions .push-toggle {
  justify-content: center;
  width: 100%;
  min-height: 34px;
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
}

.dashboard-user-actions .push-toggle:has(input:checked) {
  background: rgba(217, 249, 241, 0.95);
  color: #0f766e;
}

.login-status ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.login-status li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  border-radius: 999px;
  background: var(--surface-2);
  padding: 0 9px 0 5px;
  font-size: 12px;
  font-weight: 800;
}

.login-status li strong {
  color: var(--ink);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-status li span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 11px;
}

.view-mode-button {
  min-height: 30px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  box-shadow: none;
}

.view-mode-button[aria-pressed="true"] {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #7c2d12;
}

.lock-warning {
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  background: #fff7ed;
  color: #7c2d12;
  padding: 9px 10px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}

.quick-days article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  min-width: 0;
}

.quick-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.quick-day-head h2 {
  font-size: 16px;
}

.quick-day-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.quick-event-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.quick-event {
  display: grid;
  min-height: 36px;
  gap: 1px;
  border: 1px solid #d8ebe9;
  background: #effafa;
  color: #083b3a;
  padding: 5px 7px;
  font-weight: 500;
  text-align: left;
  box-shadow: none;
}

.quick-event strong,
.quick-event span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-event strong {
  font-size: 12px;
  font-weight: 600;
}

.quick-event span,
.quick-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

/* FINAL quick days detail v20260526-19 */
.quick-event {
  min-height: 44px;
  align-content: start;
}

.quick-event span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
}

.quick-empty {
  grid-column: 1 / -1;
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.metric,
.summary-grid article,
.master-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.2;
}

.metric-tax-detail {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.metric-tax-detail b {
  color: var(--ink);
  font-weight: 900;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.dashboard-shell {
  min-height: calc(100vh - 32px);
  padding: 8px 10px 18px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(260px, 390px) auto;
  align-items: center;
  gap: 10px 22px;
  margin-bottom: 24px;
}

.dashboard-hero > div:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.dashboard-alert-box {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.dashboard-date-line {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.dashboard-date {
  color: #fff;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dashboard-time {
  color: #d946ef;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700;
}

.dashboard-alert-box {
  min-height: 72px;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.13), rgba(2, 6, 23, 0.36)),
    rgba(2, 6, 23, 0.28);
  padding: 10px 12px;
  box-shadow: inset 0 0 24px rgba(245, 158, 11, 0.08);
}

.dashboard-alert-box.has-unread-alert {
  animation: dashboardAlertPulse 1.15s ease-in-out infinite;
  border-color: rgba(251, 191, 36, 0.88);
}

@keyframes dashboardAlertPulse {
  0%, 100% {
    box-shadow:
      inset 0 0 24px rgba(245, 158, 11, 0.1),
      0 0 0 rgba(251, 191, 36, 0);
  }
  50% {
    box-shadow:
      inset 0 0 28px rgba(245, 158, 11, 0.2),
      0 0 24px rgba(251, 191, 36, 0.42);
  }
}

.dashboard-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.dashboard-alert-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashboard-alert-lamp {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 0 7px rgba(248, 113, 113, 0.7));
}

.dashboard-alert-box.has-unread-alert .dashboard-alert-lamp {
  animation: dashboardLampBlink 0.72s steps(2, end) infinite;
}

@keyframes dashboardLampBlink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 12px rgba(248, 113, 113, 0.95));
  }
  50% {
    opacity: 0.32;
    transform: scale(0.92);
    filter: drop-shadow(0 0 2px rgba(248, 113, 113, 0.3));
  }
}

.dashboard-alert-clear {
  min-height: 24px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.08);
  color: #fcd34d;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: none;
}

.dashboard-alert-clear:disabled {
  opacity: 0.58;
}

.dashboard-alert-list {
  display: grid;
  gap: 5px;
}

.dashboard-alert-list p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #e5e7eb;
  font-size: 11px;
  line-height: 1.25;
}

.dashboard-alert-list p::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}

.dashboard-alert-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.dashboard-alert-list em {
  color: #fcd34d;
  font-style: normal;
  white-space: nowrap;
}

.dashboard-alert-more {
  width: 100%;
  min-height: 26px;
  margin-top: 8px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 7px;
  background: rgba(251, 191, 36, 0.08);
  color: #fcd34d;
  font-size: 11px;
  font-weight: 700;
  box-shadow: none;
}

.dashboard-alert-more:hover {
  background: rgba(251, 191, 36, 0.16);
}

.dashboard-sync {
  margin-top: 6px;
  color: #22d3ee;
  font-size: 12px;
}

.dashboard-user-actions {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  min-width: 128px;
}

.dashboard-user {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.28);
  padding: 0 14px;
  text-align: center;
}

.setting-inline {
  display: grid;
  grid-template-columns: auto minmax(84px, 110px) auto;
  align-items: center;
  gap: 8px;
}

.setting-inline input {
  width: 100%;
}

.setting-inline em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.dashboard-user strong {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-logout {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.44);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.38);
  color: #e5e7eb;
  padding: 0 18px;
  box-shadow: none;
}

.dashboard-logout:hover {
  border-color: rgba(248, 113, 113, 0.72);
  color: #fecaca;
}

.dashboard-schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 20px;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-bottom-grid {
  display: block;
}

.dashboard-panel,
.dashboard-stat {
  border: 1px solid var(--dash-line);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.78)),
    var(--dash-panel);
  box-shadow: inset 0 0 26px rgba(15, 23, 42, 0.32);
}

.dashboard-panel {
  min-height: 190px;
  padding: 22px 28px;
}

.dashboard-panel-pink,
.dashboard-panel-blue {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.dashboard-panel-pink {
  border-left: 4px solid #f472b6;
  box-shadow: inset 0 0 32px rgba(236, 72, 153, 0.14);
}

.dashboard-panel-blue {
  border-left: 4px solid #22d3ee;
  box-shadow: inset 0 0 32px rgba(14, 165, 233, 0.14);
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-panel-head h2,
.dashboard-sales-panel h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.dashboard-panel-pink h2 { color: #f472b6; }
.dashboard-panel-blue h2 { color: #38bdf8; }
.dashboard-sales-panel h2 { color: #8b5cf6; }

.dashboard-sales-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.dashboard-sales-heading span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.08);
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.dashboard-schedule-list {
  display: grid;
  gap: 12px;
}

.dashboard-schedule-list p {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  color: #e5e7eb;
  font-size: 15px;
}

.dashboard-schedule-list span {
  color: #38bdf8;
}

.dashboard-schedule-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.dashboard-empty {
  margin: 0;
  color: var(--dash-muted);
}

.dashboard-stat {
  min-height: 150px;
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(240px, 1fr) minmax(150px, auto);
  align-items: center;
  column-gap: 16px;
  min-width: 0;
  padding: 20px;
}

.dashboard-stat h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.dashboard-stat-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, 1fr));
  gap: 14px;
  min-width: 0;
}

.dashboard-stat-values p {
  margin: 0;
  min-width: 0;
}

.dashboard-production-card {
  border-color: rgba(249, 115, 22, 0.62);
}

.dashboard-production-card h3 {
  color: #fb923c;
}

.dashboard-production-card-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.dashboard-production-card-body > p {
  margin: 0;
}

.dashboard-production-card-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.dashboard-production-card-list p {
  display: grid;
  grid-template-columns: minmax(72px, 0.62fr) minmax(0, 1.38fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  border-radius: 10px;
  background: rgba(251, 146, 60, 0.12);
  padding: 7px 8px;
}

.dashboard-production-card-list strong,
.dashboard-production-card-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-production-card-list strong {
  color: #111827;
  font-size: 12px;
}

.dashboard-production-card-list span {
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-today-card {
  border-color: rgba(168, 85, 247, 0.56);
  grid-template-columns: minmax(120px, 0.55fr) minmax(180px, 0.8fr) minmax(260px, 1.25fr) minmax(150px, auto);
}

.dashboard-today-card h3 {
  color: #8b5cf6;
}

.dashboard-today-values p:first-child strong {
  color: #ec4899;
}

.dashboard-today-values p:last-child strong {
  color: #8b5cf6;
}

.dashboard-today-diff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 8px;
  min-width: 0;
}

.dashboard-today-diff-grid p {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin: 0;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.08);
  padding: 8px 10px;
}

.dashboard-today-diff-grid span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-today-diff-grid strong {
  overflow: hidden;
  color: #111827;
  font-size: clamp(15px, 1.45vw, 20px);
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-today-diff-grid small {
  overflow: hidden;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-stat span {
  color: #cbd5e1;
  font-size: 13px;
}

.dashboard-stat strong {
  display: block;
  margin: 4px 0 0;
  color: #f8fafc;
  font-size: clamp(25px, 2.35vw, 38px);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.dashboard-purple { border-color: rgba(168, 85, 247, 0.62); }
.dashboard-purple h3 { color: #c084fc; }
.dashboard-pink { border-color: rgba(244, 114, 182, 0.62); }
.dashboard-pink h3 { color: #f472b6; }
.dashboard-blue { border-color: rgba(59, 130, 246, 0.62); }
.dashboard-blue h3 { color: #60a5fa; }
.dashboard-indigo { border-color: rgba(99, 102, 241, 0.62); }
.dashboard-indigo h3 { color: #818cf8; }
.dashboard-gold { border-color: rgba(245, 158, 11, 0.62); }
.dashboard-gold h3 { color: #fbbf24; }
.dashboard-cyan { border-color: rgba(14, 165, 233, 0.62); }
.dashboard-cyan h3 { color: #22d3ee; }

.dashboard-detail {
  align-self: center;
  width: 100%;
  max-width: 180px;
  min-height: 42px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.28);
  color: inherit;
  box-shadow: none;
}

.dashboard-sales-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) minmax(260px, 1.25fr);
  gap: 20px;
  align-items: end;
  margin-top: 34px;
}

.dashboard-sales-breakdown div {
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  min-height: 90px;
}

.dashboard-sales-breakdown div:last-child {
  border-right: 0;
}

.dashboard-sales-breakdown span {
  color: #cbd5e1;
  display: block;
  margin-bottom: 14px;
}

.dashboard-sales-breakdown strong {
  color: #d946ef;
  display: block;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1;
  white-space: nowrap;
}

.dashboard-total strong {
  color: #38bdf8;
  font-size: clamp(32px, 3.4vw, 46px);
}

.dashboard-sales-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.dashboard-sales-box {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.32);
  padding: 16px;
}

.dashboard-sales-title,
.dashboard-sales-lines p,
.dashboard-site-sales p,
.dashboard-sales-totals p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.dashboard-sales-title strong {
  color: #f8fafc;
  font-size: 18px;
}

.dashboard-mini-detail {
  min-height: 28px;
  border: 1px solid rgba(56, 189, 248, 0.52);
  border-radius: 7px;
  background: rgba(14, 165, 233, 0.1);
  color: #67e8f9;
  padding: 0 12px;
  font-size: 12px;
  box-shadow: none;
}

.dashboard-sales-lines,
.dashboard-site-sales,
.dashboard-sales-totals {
  display: grid;
  gap: 8px;
}

.dashboard-sales-lines span,
.dashboard-site-sales span,
.dashboard-sales-totals span {
  min-width: 0;
  color: #cbd5e1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-sales-lines strong,
.dashboard-site-sales strong,
.dashboard-sales-totals strong {
  color: #f8fafc;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-sales-totals {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding-top: 12px;
}

.dashboard-sales-totals p:first-child strong {
  color: #fbbf24;
  font-size: 22px;
}

.dashboard-sales-totals p:last-child strong {
  color: #38bdf8;
  font-size: 24px;
}

.dashboard-mode {
  --dash-bg: #f7f8ff;
  --dash-panel: #ffffff;
  --dash-line: #edf0f8;
  --dash-muted: #697386;
  background: #f7f8ff;
}

.dashboard-mode .sidebar {
  border-right: 1px solid #edf0f8;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 18px 0 44px rgba(90, 105, 140, 0.12);
}

.dashboard-mode .brand {
  justify-content: flex-start;
  min-height: 108px;
  padding-left: 18px;
}

.dashboard-mode .brand-logo {
  width: 188px;
  max-height: 82px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: contrast(1.18) brightness(0.72);
}

.dashboard-mode .dashboard-nav-tabs .nav-tab {
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #111827;
  padding: 0 22px;
  font-size: 15px;
  box-shadow: none;
}

.dashboard-mode .dashboard-nav-tabs .nav-tab.active {
  border: 0;
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.18), rgba(139, 92, 246, 0.08));
  color: #111827;
  box-shadow: none;
}

.dashboard-mode .dashboard-nav-tabs .nav-sub {
  color: #697386;
}

.dashboard-mode .main {
  background:
    radial-gradient(circle at 80% 7%, rgba(244, 114, 182, 0.12), transparent 23%),
    radial-gradient(circle at 34% 38%, rgba(139, 92, 246, 0.09), transparent 28%),
    #f7f8ff;
  color: #111827;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr;
  gap: 22px 28px;
  min-height: calc(100vh - 32px);
  padding: 8px 10px 18px;
}

.dashboard-welcome-card {
  grid-column: 1;
  grid-row: 1 / span 4;
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 60px);
  display: grid;
  align-content: space-between;
  overflow: hidden;
  border-radius: 0 22px 22px 0;
  background:
    linear-gradient(180deg, rgba(10, 12, 24, 0.12), rgba(10, 12, 24, 0.62)),
    radial-gradient(circle at 68% 18%, rgba(244, 114, 182, 0.9), transparent 15%),
    radial-gradient(circle at 20% 62%, rgba(59, 130, 246, 0.78), transparent 22%),
    linear-gradient(135deg, #111827, #38134e 46%, #050814);
  padding: 28px;
  color: #fff;
  box-shadow: 0 24px 70px rgba(74, 58, 117, 0.28);
}

.dashboard-welcome-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(255, 255, 255, 0.14) 44%, transparent 47%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 42px);
  opacity: 0.42;
}

.dashboard-welcome-card > * {
  position: relative;
}

.dashboard-welcome-logo {
  font-size: 42px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(244, 114, 182, 0.9);
}

.dashboard-welcome-logo::after {
  content: "";
  display: block;
  width: 142px;
  height: 7px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d946ef, #fb7185);
}

.dashboard-welcome-copy {
  display: grid;
  gap: 8px;
}

.dashboard-welcome-copy span {
  font-size: 34px;
  font-weight: 900;
}

.dashboard-welcome-copy strong {
  font-size: 26px;
  letter-spacing: 0.04em;
}

.dashboard-welcome-copy em {
  color: rgba(255, 255, 255, 0.86);
  font-style: normal;
  font-weight: 700;
}

.dashboard-hero,
.dashboard-production-notice,
.dashboard-schedule-grid,
.dashboard-card-grid,
.dashboard-bottom-grid {
  grid-column: 2;
}

.dashboard-production-notice {
  display: grid;
  gap: 10px;
  border: 2px solid #f97316;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(254, 215, 170, 0.96), rgba(255, 255, 255, 0.96)),
    #fff7ed;
  padding: 14px 16px;
  box-shadow: 0 22px 55px rgba(249, 115, 22, 0.24);
}

.dashboard-production-notice[hidden] {
  display: none;
}

.dashboard-production-notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-production-notice-head div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.dashboard-production-notice-head span {
  color: #9a3412;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-production-notice-head strong {
  color: #7c2d12;
  font-size: 24px;
  font-weight: 900;
}

.dashboard-production-notice-list {
  display: grid;
  gap: 7px;
}

.dashboard-production-notice-list p {
  display: grid;
  grid-template-columns: minmax(90px, 0.6fr) minmax(0, 1.6fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  border: 1px solid rgba(249, 115, 22, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 10px;
}

.dashboard-production-notice-list strong,
.dashboard-production-notice-list span,
.dashboard-production-notice-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-production-notice-list strong {
  color: #111827;
  font-size: 13px;
}

.dashboard-production-notice-list span {
  color: #7c2d12;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-production-notice-list em {
  color: #9a3412;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-hero {
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 390px) auto;
  align-items: start;
  gap: 10px 18px;
  margin: 0;
}

.dashboard-hero h1 {
  margin: 0 0 6px;
  color: #111827;
  font-size: clamp(24px, 2.2vw, 34px);
  letter-spacing: 0;
}

.dashboard-lead {
  margin: 0 0 12px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-date {
  color: #111827;
  font-size: 15px;
  letter-spacing: 0;
}

.dashboard-time {
  color: #111827;
  font-size: 15px;
}

.dashboard-sync {
  color: #8b5cf6;
}

.dashboard-user,
.dashboard-logout,
.dashboard-alert-box,
.dashboard-panel,
.dashboard-stat,
.dashboard-sales-box {
  border-color: #edf0f8;
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  box-shadow: 0 18px 50px rgba(95, 111, 150, 0.12);
}

.dashboard-user strong,
.dashboard-stat strong,
.dashboard-sales-lines strong,
.dashboard-site-sales strong,
.dashboard-sales-totals strong {
  color: #111827;
}

.dashboard-logout {
  color: #111827;
}

.dashboard-alert-box {
  min-height: 92px;
}

.dashboard-alert-list p,
.dashboard-schedule-list p {
  color: #111827;
}

.dashboard-alert-list strong,
.dashboard-schedule-list strong {
  color: #111827;
  font-weight: 800;
}

.dashboard-alert-list em,
.dashboard-empty,
.dashboard-stat span,
.dashboard-sales-lines span,
.dashboard-site-sales span,
.dashboard-sales-totals span {
  color: #697386;
}

.dashboard-schedule-grid {
  border: 1px solid #edf0f8;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  gap: 0;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(95, 111, 150, 0.12);
}

.dashboard-schedule-grid .dashboard-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-schedule-grid .dashboard-panel + .dashboard-panel {
  border-left: 1px solid #edf0f8;
}

.dashboard-panel-head h2,
.dashboard-sales-panel h2 {
  color: #111827;
}

.dashboard-detail,
.dashboard-mini-detail {
  border: 0;
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.36), rgba(139, 92, 246, 0.26));
  color: #111827;
  font-weight: 900;
}

.dashboard-purple,
.dashboard-pink {
  border: 0;
}

.dashboard-purple h3 {
  color: #111827;
}

.dashboard-pink h3 {
  color: #111827;
}

.dashboard-sales-panel {
  border-radius: 18px;
}

.dashboard-sales-totals {
  border-top-color: #edf0f8;
}

.dashboard-side-panels {
  display: grid;
  gap: 14px;
}

.dashboard-side-panels .dashboard-panel {
  min-height: 0;
  padding: 18px 20px;
}

.dashboard-side-panels h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.dashboard-status-panel p,
.dashboard-notice-panel p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  color: #dbeafe;
  font-size: 13px;
}

.dashboard-notice-panel p span,
.dashboard-status-panel p span {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #a855f7;
}

.dashboard-notice-panel p strong {
  flex: 1;
  font-weight: 500;
}

.dashboard-notice-panel p em {
  color: var(--dash-muted);
  font-style: normal;
}

.calendar-head {
  justify-content: center;
  margin: 6px 0 14px;
}

.icon-button {
  width: 44px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 24px;
  line-height: 1;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekday-row {
  margin-bottom: 8px;
}

.weekday-row span {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.weekday-row span:nth-child(6) {
  color: #2563eb;
}

.weekday-row span:nth-child(7) {
  color: #dc2626;
}

.day-cell {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px;
  overflow: hidden;
}

.day-cell.is-muted {
  opacity: 0.42;
}

.day-cell.is-today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.22);
}

.day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.day-number {
  font-weight: 600;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 4px;
  box-shadow: none;
}

.day-number.day-color-blue {
  color: #2563eb;
}

.day-number.day-color-red {
  color: #dc2626;
}

.add-day-button {
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: none;
}

.day-popup {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.28);
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
  bottom: auto;
  height: 100dvh;
}

body.day-popup-open { overflow: hidden; }

.day-popup[hidden] {
  display: none;
}

.day-popup-card {
  width: min(680px, 100%);
  max-height: min(800px, 100%);
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.day-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.day-popup-list {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  min-height: 0;
  min-width: 0;
  gap: 8px;
  overflow: auto;
  overscroll-behavior: contain;
}

.day-popup-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: auto;
  flex-shrink: 0;
  gap: 3px;
  min-height: 48px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: var(--radius);
  background: var(--row-content-color, #fff);
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  box-shadow: none;
}

.day-popup-item strong,
.day-popup-item span {
  flex: none;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.day-popup-item strong { font-size: 16px; }
.day-popup-head h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; line-height: 1.4; }
.day-popup-head .icon-button { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; }
#dayPopupAddBtn { min-height: 44px; white-space: normal; }

.day-popup-item span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.schedule-create-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.schedule-bulk-popup {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(3px);
}

.schedule-bulk-popup[hidden] {
  display: none;
}

.schedule-bulk-card {
  width: min(860px, 100%);
  max-height: min(780px, 88vh);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 12px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.22);
}

.schedule-bulk-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-bulk-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.schedule-bulk-head h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 20px;
}

.schedule-bulk-fields {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
}

.schedule-bulk-fields label {
  position: relative;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.schedule-bulk-site-field {
  position: relative;
  display: grid;
  gap: 10px;
  align-self: start;
}

.schedule-bulk-fields input,
.schedule-bulk-fields textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  font-weight: 650;
}

.schedule-bulk-fields input {
  min-height: 38px;
}

.schedule-bulk-fields textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.55;
}

.schedule-bulk-help {
  display: block;
  color: #0369a1;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.45;
}

.schedule-bulk-fields input:focus,
.schedule-bulk-fields textarea:focus {
  outline: 2px solid rgba(14, 116, 144, 0.18);
  border-color: rgba(14, 116, 144, 0.42);
  background: #fff;
}

.schedule-bulk-site-picker {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 5;
  max-height: 340px;
  overflow: auto;
  display: grid;
  gap: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.schedule-bulk-site-picker[hidden] {
  display: none;
}

.schedule-bulk-site-picker button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  min-height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  box-shadow: none;
}

.schedule-bulk-site-picker button:hover,
.schedule-bulk-site-picker button:focus {
  border-color: #7dd3fc;
  background: #eef6ff;
  outline: none;
}

.schedule-bulk-site-picker strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-bulk-site-picker span {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  min-height: 22px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 850;
}

.schedule-bulk-site-picker em {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-bulk-site-empty {
  padding: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.schedule-bulk-preview {
  min-height: 96px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
}

.schedule-bulk-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.schedule-bulk-summary strong,
.schedule-bulk-summary span,
.schedule-bulk-summary em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #fff;
  padding: 0 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.schedule-bulk-summary span {
  color: var(--muted);
}

.schedule-bulk-summary em {
  border-color: #bae6fd;
  background: #eff6ff;
  color: #0369a1;
}

.schedule-bulk-preview-list {
  display: grid;
  gap: 6px;
}

.schedule-bulk-preview-row {
  display: grid;
  grid-template-columns: 112px 90px minmax(0, 1fr) 150px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 7px 9px;
}

.schedule-bulk-preview-row strong,
.schedule-bulk-preview-row span,
.schedule-bulk-preview-row b,
.schedule-bulk-preview-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.schedule-bulk-preview-row strong {
  color: var(--ink);
  font-weight: 850;
}

.schedule-bulk-preview-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 0 8px;
  font-weight: 850;
}

.schedule-bulk-preview-row b {
  color: #334155;
  font-weight: 750;
}

.schedule-bulk-preview-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 750;
}

.schedule-bulk-preview-row.is-error {
  grid-template-columns: minmax(0, 1fr) 170px;
  border-color: #fecaca;
  background: #fff1f2;
}

.schedule-bulk-preview-row.is-error span {
  justify-content: flex-start;
  background: transparent;
  padding: 0;
  color: #b91c1c;
}

.schedule-bulk-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.alert-popup {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.62);
  padding: 18px;
  backdrop-filter: blur(4px);
}

.alert-popup[hidden] {
  display: none;
}

.alert-popup-card {
  width: min(720px, 100%);
  max-height: min(720px, 82vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98)),
    #020617;
  padding: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.alert-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alert-popup-head h2 {
  margin: 0;
  color: #fcd34d;
  font-size: 18px;
}

.alert-popup-list {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.alert-popup-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.72);
  padding: 10px 12px;
}

.alert-popup-row time {
  color: #fcd34d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.alert-popup-row div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.alert-popup-row strong {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.alert-popup-row span {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.alert-popup-row em {
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
}

.practice-manual-popup {
  position: fixed;
  inset: 0;
  z-index: 84;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(3px);
}

.practice-manual-popup[hidden] {
  display: none;
}

.practice-manual-card {
  width: min(920px, 100%);
  max-height: min(780px, 88vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 12px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.22);
}

.practice-manual-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.practice-manual-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.practice-manual-head h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 20px;
}

.practice-manual-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  overflow: auto;
  padding: 2px 2px 4px;
}

.practice-manual-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.practice-manual-fields label.wide {
  grid-column: 1 / -1;
}

.practice-manual-fields input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-weight: 650;
}

.practice-manual-fields input:focus {
  outline: 2px solid rgba(14, 116, 144, 0.18);
  border-color: rgba(14, 116, 144, 0.42);
  background: #fff;
}

.practice-manual-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 860px) {
  .practice-manual-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .practice-manual-popup {
    padding: 10px;
  }

  .practice-manual-card {
    max-height: 92vh;
    padding: 14px;
  }

  .practice-manual-fields {
    grid-template-columns: 1fr;
  }

  .practice-manual-actions {
    flex-direction: column-reverse;
  }
}

.event-chip {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #e9f7f6;
  color: #083b3a;
  padding: 3px 5px;
  font-weight: 500;
  text-align: left;
  min-height: 22px;
}

.event-chip[data-type="屋台"] {
  background: #fff4df;
  color: #5f3708;
}

.event-chip strong,
.event-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-chip strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
}

.event-chip span {
  display: block;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.86;
}

.day-summary-button { display: none; }
@media (max-width: 600px) {
  .day-popup-card { padding: 12px; gap: 10px; }
  .day-popup-head h2 { font-size: 18px; }
  .calendar-grid .day-cell { padding: 3px; min-height: 92px; }
  .calendar-grid .day-top { gap: 0; }
  .calendar-grid .day-number { width: 100%; min-height: 40px; padding: 0; }
  .calendar-grid .add-day-button { display: none; }
  .calendar-grid .event-chip { display: none; }
  .calendar-grid .day-summary-button {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 4px 0;
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
    color: #083b3a;
    background: #e9f7f6;
    border-radius: 5px;
    box-shadow: none;
  }
}

.stall-shift-toolbar {
  justify-content: center;
  text-align: center;
}

.stall-shift-toolbar .toolbar-metrics {
  position: absolute;
  right: 0;
}

.stacked-title {
  display: grid;
  gap: 0;
  justify-items: center;
  line-height: 1.05;
}

.stacked-title span {
  display: block;
}

.table-toolbar {
  position: relative;
  justify-content: space-between;
  margin-bottom: 10px;
}

.toolbar-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.toolbar-metrics strong {
  color: var(--ink);
  font-size: 13px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.practice-report-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.practice-report-metrics .metric {
  padding: 16px;
}

.practice-report-metrics .metric strong {
  font-size: clamp(28px, 4vw, 42px);
}

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.schedule-table,
.stall-shift-table {
  min-width: 1080px;
}

.stall-shift-table {
  width: 1350px;
  min-width: 1350px;
}

.stall-sales-table {
  width: 1900px;
  min-width: 1900px;
}

.stall-pdf-column-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stall-pdf-column-picker[hidden] {
  display: none;
}

.stall-pdf-column-picker-head {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 92px;
}

.stall-pdf-column-picker-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.stall-pdf-column-picker-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.stall-pdf-column-list {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.stall-pdf-column-list label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  background: #fff;
  box-sizing: border-box;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.stall-pdf-column-list label:has(input:checked) {
  border-color: #a8c6cf;
  background: #f2fbfc;
}

.stall-pdf-column-list input {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  accent-color: var(--primary);
}

.stall-shift-table th,
.stall-shift-table td {
  overflow: visible;
  text-overflow: clip;
}

th,
td {
  border-bottom: 1px solid var(--line);
  height: 30px;
  padding: 4px 6px;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  z-index: 1;
}

tbody tr:hover {
  background: #f6fafb;
}

.schedule-table tbody tr,
.stall-shift-table tbody tr {
  background: var(--row-content-color, #fff);
}

.schedule-table tbody tr[data-schedule-row] {
  touch-action: auto;
}

.schedule-table tbody tr.is-long-pressing {
  opacity: 0.38;
}

.schedule-table tbody tr.is-drag-placeholder td {
  background: #e8f0ff;
  color: transparent;
  text-shadow: none;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.schedule-table tbody tr.is-drag-placeholder input,
.schedule-table tbody tr.is-drag-placeholder button,
.schedule-table tbody tr.is-drag-placeholder select,
.schedule-table tbody tr.is-drag-placeholder textarea {
  visibility: hidden;
}

.schedule-table tbody tr.is-drop-target-before td,
.schedule-table tbody tr.is-drop-target-after td {
  position: relative;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.schedule-table tbody tr.is-drop-target-before td {
  border-top: 6px solid #0284c7;
}

.schedule-table tbody tr.is-drop-target-after td {
  border-bottom: 6px solid #0284c7;
}

.schedule-table tbody tr.is-drop-target-before td:first-child::before,
.schedule-table tbody tr.is-drop-target-after td:first-child::after {
  position: absolute;
  left: 10px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: #0284c7;
  color: #fff;
  content: "ここに移動";
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.28);
  white-space: nowrap;
}

.schedule-table tbody tr.is-drop-target-before td:first-child::before {
  top: -16px;
}

.schedule-table tbody tr.is-drop-target-after td:first-child::after {
  bottom: -16px;
}

.schedule-drag-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  opacity: 0.82;
  border-collapse: separate;
  border-spacing: 0;
  pointer-events: none;
  table-layout: fixed;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(37, 99, 235, 0.18);
  overflow: hidden;
}

.schedule-drag-preview td {
  background: #fff;
  border-bottom: 1px solid #d7e0ee;
  border-right: 1px solid #d7e0ee;
  color: #0f172a;
  font-size: 12px;
  padding: 8px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-drag-preview td:first-child {
  border-left: 1px solid #d7e0ee;
}

.schedule-drag-preview input,
.schedule-drag-preview button,
.schedule-drag-preview select,
.schedule-drag-preview textarea {
  pointer-events: none;
}

.schedule-table tbody tr td,
.stall-shift-table tbody tr td {
  background: var(--row-content-color, #fff);
}

.schedule-table strong,
.stall-shift-table strong,
.stall-sales-table strong,
.practice-report-table strong {
  font-weight: 700;
}

.schedule-table th:first-child,
.schedule-table td:first-child,
.stall-shift-table th:first-child,
.stall-shift-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--row-content-color, #fff);
}

.schedule-table th:first-child,
.stall-shift-table th:first-child {
  z-index: 3;
  background: #f8fafc;
}

.schedule-table .date-col,
.stall-shift-table .date-col {
  width: 42px;
  min-width: 42px;
  font-weight: 700;
}

.schedule-table .weekday-col {
  width: 32px;
  min-width: 32px;
  color: var(--muted);
  font-weight: 700;
}

.stall-shift-table .weekday-col {
  width: 48px;
  min-width: 48px;
  color: var(--muted);
  font-weight: 700;
}

.stall-shift-table .date-col {
  width: 58px;
  min-width: 58px;
}

.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) {
  width: 70px;
}

.schedule-table th:nth-child(4),
.schedule-table td:nth-child(4) {
  width: 54px;
}

.schedule-table th:nth-child(5),
.schedule-table td:nth-child(5) {
  width: 72px;
}

.schedule-table th:nth-child(6),
.schedule-table td:nth-child(6) {
  width: 64px;
}

.schedule-table th:nth-child(7),
.schedule-table td:nth-child(7) {
  width: 150px;
}

.schedule-table th:nth-child(8),
.schedule-table td:nth-child(8) {
  width: 100px;
}

.schedule-table th:nth-child(9),
.schedule-table td:nth-child(9) {
  width: 86px;
}

.schedule-table th:nth-child(10),
.schedule-table td:nth-child(10) {
  width: 82px;
}

.schedule-table th:nth-child(12),
.schedule-table td:nth-child(12) {
  width: 86px;
}

.schedule-table th:nth-child(11),
.schedule-table td:nth-child(11) {
  width: 82px;
}

.schedule-table th:nth-child(13),
.schedule-table td:nth-child(13) {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 92px;
  background: var(--row-content-color, #fff);
  box-shadow: -8px 0 14px rgba(15, 23, 42, 0.08);
}

.schedule-table th:nth-child(13) {
  z-index: 4;
  background: #f8fafc;
}

.schedule-table td.staff-cell,
.stall-shift-table td.staff-cell,
.schedule-table td.content-cell,
.stall-shift-table td.content-cell,
.schedule-table td.schedule-color-cell,
.stall-shift-table td.schedule-color-cell {
  position: relative;
  overflow: visible;
}

.schedule-table td.staff-color-red,
.stall-shift-table td.staff-color-red,
.schedule-table td.cell-color-red,
.stall-shift-table td.cell-color-red {
  background: #fecaca;
}

.schedule-table td.staff-color-yellow,
.stall-shift-table td.staff-color-yellow,
.schedule-table td.cell-color-yellow,
.stall-shift-table td.cell-color-yellow {
  background: #fef08a;
}

.staff-color-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 95;
  width: 240px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 8px;
  color: var(--ink);
}

.staff-color-popover.drop-up {
  top: auto;
  bottom: calc(100% + 4px);
}

.staff-color-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.staff-color-tabs button,
.staff-picker-list button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.staff-color-tabs button {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 46px;
  padding: 5px 4px;
}

.staff-color-tabs button.active,
.staff-picker-list button.active {
  border-color: var(--primary);
  background: #e9f7f6;
  color: var(--primary-dark);
}

.staff-color-chip {
  width: 26px;
  height: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
}

.staff-color-chip-none {
  background: linear-gradient(135deg, #fff 0 45%, #cbd5e1 45% 55%, #fff 55% 100%);
}

.staff-color-chip-red {
  background: #fecaca;
}

.staff-color-chip-yellow {
  background: #fef08a;
}

.staff-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.staff-picker-list button {
  min-height: 28px;
  padding: 5px 6px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-picker-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 96;
  width: 220px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 8px;
  color: var(--ink);
}

.content-picker-popover.drop-up {
  top: auto;
  bottom: calc(100% + 4px);
}

.content-picker-head {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.content-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.content-picker-list button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 5px 6px;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.content-picker-list button.active {
  border-color: var(--primary);
  background: #e9f7f6;
  color: var(--primary-dark);
}

.content-picker-chip {
  flex: 0 0 18px;
  width: 18px;
  height: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: var(--picker-content-color, #fff);
}

.content-picker-list button span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stall-shift-table th:nth-child(3),
.stall-shift-table td:nth-child(3) {
  width: 112px;
}

.stall-shift-table th:nth-child(4),
.stall-shift-table td:nth-child(4) {
  width: 120px;
}

.stall-shift-table th:nth-child(5),
.stall-shift-table td:nth-child(5) {
  width: 76px;
}

.stall-shift-table th:nth-child(6),
.stall-shift-table td:nth-child(6) {
  width: 180px;
}

.stall-shift-table th:nth-child(7),
.stall-shift-table td:nth-child(7) {
  width: 66px;
}

.stall-shift-table th:nth-child(8),
.stall-shift-table td:nth-child(8) {
  width: 66px;
}

.stall-shift-table th:nth-child(9),
.stall-shift-table td:nth-child(9) {
  width: 128px;
}

.stall-shift-table th:nth-child(10),
.stall-shift-table td:nth-child(10) {
  width: 150px;
}

.stall-shift-table th:nth-child(11),
.stall-shift-table td:nth-child(11) {
  width: 170px;
}

.stall-shift-table th:nth-child(12),
.stall-shift-table td:nth-child(12) {
  width: 96px;
}

.stall-shift-table th:nth-child(13),
.stall-shift-table td:nth-child(13) {
  width: 80px;
}

.stall-shift-table .cell-input {
  overflow: visible;
  text-overflow: clip;
}

.stall-sales-table th:nth-child(1),
.stall-sales-table td:nth-child(1) { width: 126px; }

.stall-sales-table th:nth-child(2),
.stall-sales-table td:nth-child(2) { width: 96px; }

.stall-sales-table th:nth-child(3),
.stall-sales-table td:nth-child(3) { width: 180px; }

.stall-sales-table th:nth-child(4),
.stall-sales-table td:nth-child(4) { width: 126px; }

.stall-sales-table th:nth-child(5),
.stall-sales-table td:nth-child(5),
.stall-sales-table th:nth-child(9),
.stall-sales-table td:nth-child(9),
.stall-sales-table th:nth-child(13),
.stall-sales-table td:nth-child(13) { width: 150px; }

.stall-sales-table th:nth-child(6),
.stall-sales-table td:nth-child(6),
.stall-sales-table th:nth-child(10),
.stall-sales-table td:nth-child(10),
.stall-sales-table th:nth-child(14),
.stall-sales-table td:nth-child(14) { width: 84px; }

.stall-sales-table th:nth-child(7),
.stall-sales-table td:nth-child(7),
.stall-sales-table th:nth-child(11),
.stall-sales-table td:nth-child(11),
.stall-sales-table th:nth-child(15),
.stall-sales-table td:nth-child(15) { width: 74px; }

.stall-sales-table th:nth-child(8),
.stall-sales-table td:nth-child(8),
.stall-sales-table th:nth-child(12),
.stall-sales-table td:nth-child(12),
.stall-sales-table th:nth-child(16),
.stall-sales-table td:nth-child(16),
.stall-sales-table th:nth-child(17),
.stall-sales-table td:nth-child(17) { width: 100px; }

.stall-sales-table th:nth-child(18),
.stall-sales-table td:nth-child(18) { width: 170px; }

.stall-sales-table th:nth-child(19),
.stall-sales-table td:nth-child(19) { width: 72px; }

.stall-ledger-table th:nth-child(1),
.stall-ledger-table td:nth-child(1) { width: 140px; }

.stall-ledger-table th:nth-child(2),
.stall-ledger-table td:nth-child(2) { width: 140px; }

.stall-ledger-table th:nth-child(3),
.stall-ledger-table td:nth-child(3) { width: 140px; }

.stall-ledger-table th:nth-child(4),
.stall-ledger-table td:nth-child(4) { width: 140px; }

.stall-ledger-table th:nth-child(5),
.stall-ledger-table td:nth-child(5) { width: 360px; }

.stall-ledger-table th:nth-child(6),
.stall-ledger-table td:nth-child(6) { width: 72px; }

.practice-report-table th:nth-child(1),
.practice-report-table td:nth-child(1) { width: 136px; }

.practice-report-table th:nth-child(2),
.practice-report-table td:nth-child(2) { width: 120px; }

.practice-report-table th:nth-child(3),
.practice-report-table td:nth-child(3) { width: 90px; }

.practice-report-table th:nth-child(4),
.practice-report-table td:nth-child(4) { width: 120px; }

.practice-report-table th:nth-child(5),
.practice-report-table td:nth-child(5) { width: 160px; }

.practice-report-table th:nth-child(n+6):nth-child(-n+17),
.practice-report-table td:nth-child(n+6):nth-child(-n+17) { width: 104px; }

.practice-report-table th:nth-child(18),
.practice-report-table td:nth-child(18) { width: 260px; }

.practice-report-table th:nth-child(19),
.practice-report-table td:nth-child(19) { width: 72px; }

.practice-stock-table th,
.practice-stock-table td,
.practice-asset-table th,
.practice-asset-table td,
.practice-performer-table th,
.practice-performer-table td { width: 170px; }

.practice-stock-switch {
  margin: 0 0 10px;
}

.cell-readonly {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-status-pill {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.practice-performer-table th:nth-child(1),
.practice-performer-table td:nth-child(1) { width: 136px; }

.segmented-control {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 3px;
}

.segment-button {
  min-height: 28px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  box-shadow: none;
}

.segment-button.active {
  background: var(--primary);
  color: #fff;
}

.positive-amount {
  color: #047857;
}

.negative-amount {
  color: #dc2626;
}

.amount-cell {
  text-align: right;
  font-weight: 700;
}

.stall-sales-alert {
  background: #fef08a;
  color: #dc2626;
}

.stall-sales-alert .cell-input {
  color: #dc2626;
  font-weight: 700;
}

.reflected-sales-input {
  color: #0f172a;
  font-weight: 700;
}

.stall-sales-table th {
  overflow: visible;
}

.schedule-table th {
  overflow: visible;
}

.practice-report-table {
  width: 2100px;
  min-width: 2100px;
}

.practice-report-table th {
  overflow: visible;
}

.th-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  padding: 2px 4px;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.th-filter-button::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.58;
  flex: 0 0 auto;
}

.th-filter-button:hover,
.th-filter-button.active {
  border-color: #b8d7d5;
  background: #e9f7f6;
  color: var(--primary);
}

.stall-sales-filter-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 4px;
  z-index: 80;
  width: max-content;
  min-width: 220px;
  max-width: 320px;
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  color: var(--ink);
  padding: 8px;
  text-align: left;
}

.filter-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.filter-popover-head strong {
  font-size: 12px;
  white-space: nowrap;
}

.filter-popover-head button {
  min-height: 24px;
  border: 1px solid #f0b8b8;
  border-radius: 999px;
  background: #fff7f7;
  color: #b42318;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-choice-list {
  display: grid;
  gap: 2px;
}

.filter-choice-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  border-radius: 5px;
  padding: 3px 5px;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
}

.filter-choice-list label:hover {
  background: #f3f8fb;
}

.filter-choice-list input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border-radius: 3px;
  appearance: auto;
}

.filter-choice-list span {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.empty-filter-choice {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.schedule-table tr.day-start td,
.stall-shift-table tr.day-start td {
  border-top: 3px solid #cbd8e7;
}

.schedule-table tr.day-start td:first-child,
.stall-shift-table tr.day-start td:first-child {
  color: var(--primary);
}

.schedule-table tr.day-start td.day-color-blue,
.schedule-table tr.day-start td.weekday-col.day-color-blue,
.stall-shift-table tr.day-start td.day-color-blue,
.stall-shift-table tr.day-start td.weekday-col.day-color-blue {
  color: #2563eb;
}

.schedule-table tr.day-start td.day-color-red,
.schedule-table tr.day-start td.weekday-col.day-color-red,
.stall-shift-table tr.day-start td.day-color-red,
.stall-shift-table tr.day-start td.weekday-col.day-color-red {
  color: #dc2626;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: #e9f7f6;
  color: #083b3a;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.type-badge[data-type="屋台"] {
  background: #fff4df;
  color: #5f3708;
}

.type-cell,
.content-cell {
  transition: background 120ms ease;
}

.type-cell .cell-select,
.content-cell .cell-input {
  background: transparent;
  font-weight: 700;
}

.auto-gray-cell {
  background: #e5e7eb;
}

.auto-gray-cell.cell-color-red {
  background: #fecaca;
}

.auto-gray-cell.cell-color-yellow {
  background: #fef08a;
}

.auto-gray-cell .cell-input {
  background: transparent;
}

.schedule-color-cell .cell-input,
.schedule-color-cell .money-field input {
  background: transparent;
}

.cell-input {
  width: 100%;
  min-height: 24px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  padding: 2px 4px;
  font-size: 12px;
  line-height: 1.2;
}

.cell-input:hover {
  border-color: #cbd8e7;
  background: #fff;
}

.cell-input:focus {
  border-color: var(--primary);
  background: #fff;
  outline: 2px solid rgba(21, 94, 117, 0.16);
  outline-offset: 0;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
}

.cell-input:disabled {
  opacity: 1;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  background: transparent;
  border-color: transparent;
}

.date-input {
  padding-right: 0;
}

.number-input {
  text-align: right;
}

.cell-select {
  appearance: auto;
  font-weight: 700;
}

.row-actions {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.small-button {
  min-height: 24px;
  padding: 0 7px;
  font-size: 11px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-grid-single {
  grid-template-columns: 1fr;
}

.master-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.sub-tab {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.sub-tab.active {
  border-color: #8cc9c5;
  background: #e9f7f6;
  color: var(--primary);
  box-shadow: none;
}

.table-sub-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
}

.table-sub-toolbar h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.master-tab {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  box-shadow: none;
}

.master-tab.active {
  border-color: rgba(21, 94, 117, 0.35);
  background: #e9f7f6;
  color: var(--primary-dark);
}

.master-panels {
  display: grid;
}

.master-panel[hidden] {
  display: none;
}

.analysis-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.analysis-panel-head h2 {
  margin: 0 0 4px;
}

.analysis-month-control {
  display: grid;
  gap: 6px;
  min-width: 190px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.analysis-month-control input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

.analysis-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.analysis-tab {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 0 18px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

.analysis-tab.active {
  border-color: rgba(21, 94, 117, 0.35);
  background: var(--primary);
  color: #fff;
}

.analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.analysis-summary-grid article {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.analysis-summary-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.analysis-summary-grid strong {
  color: #0f172a;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.1;
  white-space: nowrap;
}

.analysis-summary-grid small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.analysis-summary-grid .positive strong,
.analysis-table .positive {
  color: #047857;
}

.analysis-summary-grid .negative strong,
.analysis-table .negative {
  color: #b91c1c;
}

.analysis-table-wrap {
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.analysis-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 12px;
}

.analysis-table th,
.analysis-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  text-align: left;
  vertical-align: top;
}

.analysis-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.analysis-table tr:nth-child(even) td {
  background: #fbfdff;
}

.analysis-table .rank-col {
  width: 52px;
  color: var(--primary-dark);
  font-weight: 900;
  text-align: center;
}

.analysis-table .number-cell {
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.analysis-table small {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
}

.stall-adjust-tool {
  display: grid;
  gap: 16px;
}

.stall-adjust-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.stall-adjust-form label {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.stall-adjust-form input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

.stall-adjust-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.stall-adjust-summary div,
.stall-adjust-summary p {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.stall-adjust-summary strong,
.stall-adjust-summary span {
  display: block;
}

.stall-adjust-summary span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.stall-adjust-summary p {
  grid-column: 1 / -1;
  color: #475569;
}

.stall-adjust-message {
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 700;
}

.placeholder-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
}

.placeholder-panel h2 {
  margin: 0 0 6px;
}

.placeholder-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.summary-toolbar,
.production-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.production-toolbar {
  justify-content: space-between;
}

.production-toolbar h2 {
  margin: 0;
}

.production-table-wrap {
  max-height: calc(100vh - 190px);
}

.production-table {
  min-width: 1120px;
}

.production-table th,
.production-table td {
  border-right: 1px solid var(--line);
}

.production-table th:last-child,
.production-table td:last-child {
  border-right: 0;
}

.production-table th:nth-child(1),
.production-table td:nth-child(1) {
  width: 128px;
}

.production-table td:nth-child(1) .cell-input {
  min-width: 112px;
  padding-right: 2px;
}

.production-table th:nth-child(2),
.production-table td:nth-child(2),
.production-table th:nth-child(3),
.production-table td:nth-child(3),
.production-table th:nth-child(4),
.production-table td:nth-child(4),
.production-table th:nth-child(5),
.production-table td:nth-child(5),
.production-table th:nth-child(7),
.production-table td:nth-child(7) {
  width: 110px;
}

.production-table th:nth-child(6),
.production-table td:nth-child(6) {
  width: 360px;
}

.production-table th:nth-child(8),
.production-table td:nth-child(8),
.production-table th:nth-child(9),
.production-table td:nth-child(9) {
  width: 90px;
}

.payroll-toolbar {
  display: grid;
  grid-template-columns: 180px 120px minmax(220px, 1fr) minmax(260px, auto);
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.payroll-toolbar.is-shift-mode {
  grid-template-columns: 180px minmax(260px, 1fr) minmax(360px, auto);
}

.payroll-mode-tabs {
  margin-bottom: 10px;
}

.payroll-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.payroll-action-group[hidden] {
  display: none;
}

.mypage-toolbar {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.password-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.password-panel summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.password-change-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  margin-top: 10px;
}

.mypage-login {
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
}

.mypage-login h1 {
  margin: 0;
  font-size: 28px;
}

.mypage-login h2 {
  margin: 6px 0 0;
  color: var(--primary);
  font-size: 22px;
}

.mypage-login p {
  margin-top: 14px;
}

.mypage-shell {
  min-height: 100vh;
  background: var(--bg);
  padding: 28px;
}

.mypage-shell .mypage-login {
  margin: 8vh auto 0;
}

.mypage-shell .mypage-shift-only {
  max-width: 1180px;
  margin: 0 auto;
}

.mypage-login-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.remember-login {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.remember-login input {
  width: 16px;
  height: 16px;
}

.form-message {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.mypage-period {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mypage-period strong {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 16px;
}

.mypage-count {
  border-radius: 999px;
  background: #e9f7f6;
  color: var(--primary-dark);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
}

.mypage-metrics {
  margin-bottom: 12px;
}

.shift-page-table {
  min-width: 980px;
  table-layout: fixed;
}

.shift-page-table tbody tr,
.shift-page-table tbody td {
  background: var(--row-content-color, #fff);
}

.account-master-form {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 110px 110px;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 14px;
}

.account-master-form select,
.account-master-form button {
  min-height: 36px;
}

.account-master-form button {
  grid-column: 1 / -1;
}

.permission-checks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 10px;
}

.permission-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  font-size: 12px;
  font-weight: 800;
}

.account-master-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  max-height: 70vh;
  overflow: auto;
}

.account-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 62px 58px 100px 54px minmax(180px, 1.4fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px;
  font-size: 12px;
  font-weight: 800;
}

.account-row span,
.account-row code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-row code {
  color: var(--muted);
}

.account-permissions {
  color: var(--muted);
}

.account-status {
  border-radius: 999px;
  padding: 4px 8px;
  text-align: center;
  font-size: 11px;
}

.account-status.enabled {
  background: #dcfce7;
  color: #166534;
}

.account-status.disabled {
  background: #fee2e2;
  color: #991b1b;
}

.audit-log-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  max-height: 72vh;
  overflow: auto;
}

.audit-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 8px 10px;
}

.audit-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.audit-row {
  display: grid;
  grid-template-columns: 96px 120px 110px 140px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 800;
}

.audit-row span,
.audit-row strong,
.audit-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-row span {
  color: var(--muted);
}

.audit-row em {
  color: var(--ink);
  font-style: normal;
}

.security-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.security-scan-status {
  min-height: 20px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.security-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.security-summary-grid div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px 12px;
}

.security-summary-grid strong {
  color: var(--ink);
  font-size: 18px;
}

.security-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.security-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.security-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 12px;
}

.security-table th,
.security-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.security-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.security-table td {
  color: var(--ink);
  font-weight: 800;
}

.security-table td:nth-child(5),
.security-table td:nth-child(6) {
  color: var(--muted);
  font-size: 11px;
}

.security-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.security-table .num {
  text-align: right;
  white-space: nowrap;
}

.payroll-period {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payroll-period strong {
  color: var(--ink);
  font-size: 16px;
}

.payroll-import-log-panel {
  margin-bottom: 12px;
}

.payroll-import-log {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: #fff;
  padding: 10px;
}

.payroll-import-log-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.payroll-import-log-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.payroll-import-log-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.payroll-import-log-head span,
.payroll-import-message {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payroll-import-log-counts,
.payroll-import-people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.payroll-import-log-counts {
  justify-content: flex-end;
}

.payroll-import-log-counts span,
.payroll-import-person {
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 999px;
  background: #fff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.payroll-import-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 7px;
}

.payroll-import-person strong {
  color: var(--ink);
}

.payroll-import-person span {
  color: var(--muted);
  font-size: 11px;
}

.status-imported,
.payroll-import-person.is-imported {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.status-skipped,
.payroll-import-person.is-skipped {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.status-error,
.payroll-import-person.is-error {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.payroll-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.payroll-selector {
  position: sticky;
  top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.payroll-results {
  min-width: 0;
}

.payroll-metrics {
  margin-bottom: 12px;
}

.payroll-list {
  display: grid;
  gap: 12px;
}

.payroll-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.payroll-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.payroll-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payroll-table-wrap {
  max-height: 420px;
}

.payroll-table {
  min-width: 980px;
  table-layout: fixed;
}

.payroll-table tbody tr,
.payroll-table tbody td {
  background: var(--row-content-color, #fff);
}

.summary-list,
.pill-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 70vh;
  overflow: auto;
}

#siteSummary.summary-list {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
  gap: 12px;
  max-height: none;
  overflow: visible;
}

.summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.summary-row strong,
.summary-row span,
.summary-row small {
  overflow-wrap: anywhere;
}

.summary-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-row small {
  grid-column: 1 / -1;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
}

.corp-site-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0;
  overflow: hidden;
}

.corp-site-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #e9f7f6;
  padding: 10px 12px;
}

.corp-site-head strong {
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.corp-site-head span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.corp-site-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.corp-site-breakdown span {
  padding: 4px 8px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.corp-site-list {
  display: grid;
  gap: 2px;
  padding: 4px 12px 8px;
}

.corp-site-list .summary-row:last-child {
  border-bottom: 0;
}

.pill-list {
  display: grid;
  gap: 8px;
  align-content: flex-start;
  margin-top: 12px;
}

.master-form {
  position: relative;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.site-master-form {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.75fr) minmax(0, 0.75fr) minmax(0, 0.65fr) repeat(3, minmax(150px, 1fr)) auto;
}

.invoice-name-master-form {
  grid-template-columns: minmax(110px, 0.8fr) minmax(160px, 1.15fr) minmax(130px, 0.9fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
}

.invoice-mail-group-form {
  grid-template-columns: minmax(130px, 0.9fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(180px, auto) auto;
}

.master-subtitle {
  margin: 18px 0 4px;
  color: var(--ink);
  font-size: 15px;
}

.master-check {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.site-corp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.site-corp-tabs button {
  min-height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  box-shadow: none;
  font-size: 12px;
}

.site-corp-tabs button.active {
  border-color: rgba(21, 94, 117, 0.35);
  background: #e9f7f6;
  color: var(--primary-dark);
}

.site-master-list {
  display: grid;
  gap: 8px;
}

.master-form[data-master-form="contents"] {
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto) auto;
  align-items: center;
}

.master-form input {
  min-height: 36px;
}

.master-form button {
  min-height: 36px;
}

.master-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.master-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 10px;
}

.master-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-master-row {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.7fr) minmax(0, 0.7fr) minmax(0, 0.7fr) minmax(200px, 1.45fr) auto;
}

.invoice-name-master-row {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
}

.invoice-mail-group-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 10px;
}

.invoice-mail-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.invoice-mail-group-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.invoice-mail-group-head strong {
  color: var(--ink);
  font-size: 14px;
}

.invoice-mail-group-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.invoice-mail-group-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.invoice-mail-group-meta b {
  border-radius: 999px;
  background: #dff7ef;
  padding: 4px 8px;
  color: #047857;
  font-size: 11px;
}

.invoice-mail-group-meta button {
  min-height: 28px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  font-size: 12px;
}

.invoice-mail-group-rows {
  display: grid;
  gap: 6px;
}

.staff-master-row {
  grid-template-columns: minmax(0, 1fr) 90px auto;
}

.site-master-row span,
.invoice-name-master-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-master-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.master-row-actions {
  display: flex;
  gap: 6px;
}

.master-row-actions button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  font-size: 12px;
}

.master-row-actions button:last-child {
  color: var(--danger);
}

@media (max-width: 900px) {
  .analysis-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-month-control {
    min-width: 0;
  }

  .analysis-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-summary-grid strong {
    font-size: 18px;
  }

  .analysis-table {
    min-width: 960px;
    font-size: 11px;
  }

  .invoice-name-master-form,
  .invoice-mail-group-form,
  .invoice-name-master-row {
    grid-template-columns: 1fr;
  }

  .invoice-mail-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-mail-group-meta {
    justify-content: flex-start;
  }

  .invoice-name-master-row .master-row-actions {
    justify-content: flex-start;
  }
}

.pill {
  border-radius: 999px;
  background: var(--surface-2);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.master-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 5px 5px 10px;
}

.master-pill span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-pill button {
  display: grid;
  width: 24px;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--danger);
  padding: 0;
  box-shadow: none;
  font-size: 14px;
  line-height: 1;
}

.content-master-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 70vh;
  overflow: auto;
}

.content-master-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 10px;
}

.content-master-row span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-master-row .color-current {
  width: 42px;
  min-height: 28px;
  height: 28px;
  background: var(--swatch-color);
}

.color-palette {
  position: relative;
  width: max-content;
}

.color-palette.compact {
  width: max-content;
}

.color-current {
  width: 38px;
  min-height: 28px;
  height: 28px;
  border: 1px solid rgba(23, 32, 51, 0.24);
  border-radius: 6px;
  background: var(--swatch-color);
  padding: 0;
  box-shadow: none;
}

.color-current.no-color,
.color-swatch.no-color {
  background:
    linear-gradient(135deg, transparent 46%, #b42318 47%, #b42318 53%, transparent 54%),
    #fff;
}

.color-current[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21, 94, 117, 0.18);
}

.color-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(6, 30px);
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  box-shadow: var(--shadow);
}

.color-popover[hidden] {
  display: none;
}

.color-swatch {
  width: 30px;
  min-height: 22px;
  height: 22px;
  border: 1px solid rgba(23, 32, 51, 0.18);
  border-radius: 4px;
  background: var(--swatch-color);
  padding: 0;
  box-shadow: none;
  font-size: 9px;
  font-weight: 900;
}

.color-swatch.selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(21, 94, 117, 0.35);
}

.editor-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  width: min(390px, 100vw);
  height: 100vh;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: var(--surface);
  padding: 22px;
  box-shadow: -10px 0 35px rgba(23, 32, 51, 0.06);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.editor-panel.open {
  transform: translateX(0);
}

.editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.editor-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.editor-actions button {
  flex: 1;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

/* Final dashboard skin: white B-Village management page */
.dashboard-mode {
  --dash-line: #dfe7f3;
  --dash-muted: #6b7280;
  background: #f7f8ff;
}

.dashboard-mode .sidebar {
  background: #fff;
  color: #111827;
  box-shadow: 16px 0 44px rgba(91, 104, 135, 0.12);
}

.dashboard-mode .brand-logo {
  width: 190px;
  max-height: 84px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: contrast(1.2) brightness(0.72);
}

.dashboard-mode .dashboard-nav-tabs .nav-tab {
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #111827;
  padding: 0 22px;
  text-align: left;
  box-shadow: none;
}

.dashboard-mode .dashboard-nav-tabs .nav-tab.active {
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.2), rgba(139, 92, 246, 0.08));
  color: #111827;
  box-shadow: none;
}

.dashboard-mode .main {
  background:
    radial-gradient(circle at 82% 4%, rgba(244, 114, 182, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfcff, #f6f7ff);
  color: #111827;
}

.dashboard-mode .dashboard-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr;
  gap: 20px 28px;
  min-height: calc(100vh - 32px);
  padding: 8px 10px 18px;
}

.dashboard-mode .dashboard-welcome-card {
  grid-column: 1;
  grid-row: 1 / span 4;
  min-height: calc(100vh - 58px);
  position: sticky;
  top: 16px;
  border-radius: 0 24px 24px 0;
}

.dashboard-mode .dashboard-hero,
.dashboard-mode .dashboard-production-notice,
.dashboard-mode .dashboard-schedule-grid,
.dashboard-mode .dashboard-card-grid,
.dashboard-mode .dashboard-bottom-grid {
  grid-column: 2;
}

.dashboard-mode .dashboard-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 390px) 124px;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 10px 18px;
  margin: 0;
}

.dashboard-mode .dashboard-hero h1 {
  color: #111827;
}

.dashboard-mode .dashboard-date,
.dashboard-mode .dashboard-time,
.dashboard-mode .dashboard-user strong,
.dashboard-mode .dashboard-logout,
.dashboard-mode .dashboard-panel-head h2,
.dashboard-mode .dashboard-sales-panel h2,
.dashboard-mode .dashboard-stat h3,
.dashboard-mode .dashboard-stat strong,
.dashboard-mode .dashboard-sales-lines strong,
.dashboard-mode .dashboard-site-sales strong,
.dashboard-mode .dashboard-sales-totals strong,
.dashboard-mode .dashboard-schedule-list strong,
.dashboard-mode .dashboard-alert-list strong {
  color: #111827;
}

.dashboard-mode .dashboard-alert-box {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 92px;
  border: 1px solid #e5edf7;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(91, 104, 135, 0.12);
}

.dashboard-mode .dashboard-user {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(91, 104, 135, 0.13);
}

.dashboard-mode .dashboard-logout {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(91, 104, 135, 0.13);
}

.dashboard-mode .dashboard-schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border: 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
}

.dashboard-mode .dashboard-schedule-grid .dashboard-panel {
  min-height: 220px;
  border: 1px solid #dce5f1;
  border-radius: 13px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 12px 36px rgba(91, 104, 135, 0.08);
}

.dashboard-mode .dashboard-schedule-grid .dashboard-panel + .dashboard-panel {
  border-left: 1px solid #dce5f1;
}

.dashboard-mode .dashboard-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-mode .dashboard-panel-head h2 {
  font-size: 18px;
}

.dashboard-mode .dashboard-panel-head time {
  color: #64748b;
  font-size: 14px;
  font-weight: 900;
}

.dashboard-mode .dashboard-schedule-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  display: grid;
  gap: 8px;
}

.dashboard-mode .dashboard-schedule-list p {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  min-height: 48px;
  margin: 0;
  border: 1px solid #d8ebe9;
  border-radius: 8px;
  background: #effafa;
  padding: 8px 10px;
  color: #111827;
}

.dashboard-mode .dashboard-schedule-list span {
  color: #718096;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-mode .dashboard-card-grid {
  gap: 18px;
  margin: 0;
}

.dashboard-mode .dashboard-stat,
.dashboard-mode .dashboard-sales-panel,
.dashboard-mode .dashboard-sales-box {
  border: 1px solid #edf0f8;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(91, 104, 135, 0.12);
}

.dashboard-mode .dashboard-stat {
  min-height: 176px;
  border-radius: 18px;
}

.dashboard-mode .dashboard-detail,
.dashboard-mode .dashboard-mini-detail {
  border: 0;
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.42), rgba(139, 92, 246, 0.24));
  color: #111827;
  font-weight: 900;
  box-shadow: none;
}

.dashboard-mode .dashboard-sales-panel {
  border-radius: 18px;
}

.dashboard-mode .dashboard-sales-totals {
  border-top-color: #edf0f8;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .editor-panel {
    width: min(420px, 100vw);
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    min-height: 100dvh;
    overscroll-behavior-x: none;
  }

  .app-shell {
    display: block;
    width: 100vw;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .mobile-menu-button {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 16px);
    left: calc(env(safe-area-inset-left) + 16px);
    z-index: 70;
    display: grid;
    place-items: center;
    gap: 4px;
    width: 52px;
    min-height: 52px;
    height: 52px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    padding: 0;
    touch-action: manipulation;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  }

  .dashboard-mode .mobile-menu-button {
    background: rgba(2, 6, 23, 0.88);
    border-color: rgba(168, 85, 247, 0.42);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.22);
  }

  .mobile-menu-button span {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }

  .dashboard-mode .mobile-menu-button span {
    background: #f8fafc;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(2, 6, 23, 0.46);
    backdrop-filter: blur(2px);
  }

  .mobile-menu-backdrop[hidden] {
    display: none !important;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(310px, 86vw);
    height: 100dvh;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.24);
  }

  .mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .main {
    padding: calc(env(safe-area-inset-top) + 76px) 10px 18px;
    width: 100vw;
    max-width: 100vw;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .dashboard-shell {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    min-height: calc(100dvh - 88px);
    padding: 0 0 18px;
    overflow-x: hidden;
  }

  .dashboard-welcome-card {
    display: none;
  }

  .dashboard-hero,
  .dashboard-production-notice,
  .dashboard-schedule-grid,
  .dashboard-card-grid,
  .dashboard-bottom-grid {
    grid-column: 1;
  }

  .dashboard-production-notice {
    border-radius: 14px;
    padding: 12px;
  }

  .dashboard-production-notice-head {
    align-items: flex-start;
  }

  .dashboard-production-notice-list p {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .table-wrap,
  .production-table-wrap,
  .payroll-table-wrap {
    max-width: 100%;
  }

  .topbar {
    display: grid;
  }

  .dashboard-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 10px;
    margin: 0 0 14px;
    padding-left: 48px;
  }

  .dashboard-hero > div:first-child {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .dashboard-time {
    font-size: 16px;
  }

  .dashboard-date-line {
    gap: 8px;
  }

  .dashboard-date {
    font-size: 16px;
    line-height: 1.25;
  }

  .dashboard-sync {
    margin-top: 2px;
    font-size: 10px;
  }

  .dashboard-alert-box {
    grid-column: 1 / -1;
    grid-row: 3;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    margin-left: -48px;
    min-height: 90px;
    padding: 12px;
  }

  .dashboard-alert-head {
    margin-bottom: 5px;
  }

  .dashboard-alert-clear {
    min-height: 22px;
    padding: 0 9px;
  }

  .dashboard-alert-list p {
    font-size: 12px;
  }

  .dashboard-user-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 102px;
    max-width: 132px;
    gap: 6px;
  }

  .dashboard-user {
    min-height: 34px;
    padding: 0 12px;
    text-align: center;
  }

  .dashboard-user strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .dashboard-logout {
    min-width: 102px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .metric-grid,
  .quick-days,
  .dashboard-schedule-grid,
  .dashboard-card-grid,
  .dashboard-bottom-grid,
  .summary-grid,
  .mypage-toolbar,
  .payroll-toolbar,
  .payroll-layout,
  .master-panels {
    grid-template-columns: 1fr;
  }

  .dashboard-sales-breakdown {
    grid-template-columns: 1fr;
  }

  .dashboard-sales-detail-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel {
    min-height: 0;
    padding: 14px;
  }

  .dashboard-panel-head {
    margin-bottom: 10px;
  }

  .dashboard-panel-head h2,
  .dashboard-sales-panel h2 {
    font-size: 17px;
  }

  .dashboard-schedule-list {
    gap: 7px;
  }

  .dashboard-schedule-list p {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
    font-size: 12px;
  }

  .dashboard-stat {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 14px;
    gap: 12px;
  }

  .dashboard-stat h3 {
    grid-row: auto;
    grid-column: 1 / -1;
    font-size: 18px;
  }

  .dashboard-stat-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-stat strong {
    font-size: 26px;
  }

  .dashboard-detail {
    max-width: none;
    min-height: 36px;
  }

  .dashboard-sales-box {
    padding: 12px;
  }

  .dashboard-sales-title strong {
    font-size: 16px;
  }

  .dashboard-sales-lines strong,
  .dashboard-site-sales strong,
  .dashboard-sales-totals strong {
    font-size: 14px;
  }

  .dashboard-sales-totals p:first-child strong,
  .dashboard-sales-totals p:last-child strong {
    font-size: 18px;
  }

  .payroll-selector {
    position: static;
  }

  .quick-event-list {
    grid-template-columns: 1fr;
  }

  .login-status {
    grid-template-columns: 1fr;
  }

  .weekday-row,
  .calendar-grid {
    gap: 4px;
  }

  .day-cell {
    min-height: 118px;
    padding: 7px;
  }

  .event-chip {
    padding: 3px 5px;
  }

  .mypage-shell {
    padding: 12px;
  }

  .mypage-toolbar {
    gap: 10px;
    padding: 10px;
  }

  .mypage-toolbar label {
    width: 100%;
  }

  .mypage-toolbar input,
  .mypage-toolbar button {
    width: 100%;
  }

  .mypage-period {
    order: -1;
  }

  .password-change-form {
    grid-template-columns: 1fr;
  }

  .mypage-shift-only .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .mypage-shift-only .shift-page-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 6px;
  }

  .mypage-shift-only .shift-page-table thead {
    display: none;
  }

  .mypage-shift-only .shift-page-table,
  .mypage-shift-only .shift-page-table tbody,
  .mypage-shift-only .shift-page-table tr,
  .mypage-shift-only .shift-page-table td {
    display: block;
    width: 100%;
  }

  .mypage-shift-only .shift-page-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--row-content-color, #fff);
    padding: 7px 9px;
    box-shadow: 0 5px 16px rgba(23, 32, 51, 0.05);
  }

  .mypage-shift-only .shift-page-table td {
    min-height: 0;
    height: auto;
    border-bottom: 0;
    padding: 2px 0;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    font-size: 12px;
    line-height: 1.25;
  }

  .mypage-shift-only .shift-page-table td:empty {
    display: none;
  }

  .mypage-shift-only .shift-page-table td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 48px;
    margin-right: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .mypage-shift-only .shift-page-table td[data-label="日付"] {
    grid-column: 1 / -1;
    padding-bottom: 3px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
  }

  .mypage-shift-only .shift-page-table td[data-label="日付"]::before {
    display: none;
  }

  .mypage-shift-only .shift-page-table td[data-label="現場"] {
    grid-column: 1 / -1;
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 900;
  }

  .mypage-shift-only .shift-page-table td[data-label="現場"]::before {
    display: none;
  }

  .mypage-shift-only .shift-page-table td[data-label="内容"],
  .mypage-shift-only .shift-page-table td[data-label="時間"] {
    font-weight: 800;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 4mm;
  }

  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body {
    min-height: 0;
    background: #fff;
  }

  .auth-shell,
  .sidebar,
  .topbar,
  .login-status,
  .quick-days,
  .metric-grid,
  .editor-panel,
  .day-popup,
  .row-actions,
  .small-button,
  .icon-button,
  .view:not(.active) {
    display: none !important;
  }

  .app-shell {
    display: block;
    min-height: 0;
  }

  .main {
    padding: 0;
    width: 297mm;
    transform: scale(0.66);
    transform-origin: top left;
  }

  .view.active {
    display: block !important;
  }

  .table-toolbar,
  .summary-toolbar,
  .production-toolbar,
  .payroll-toolbar {
    margin-bottom: 6px;
  }

  .table-wrap,
  .production-table-wrap,
  .payroll-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  table {
    min-width: 0;
    width: 100%;
    page-break-inside: auto;
  }

  .stall-shift-table {
    width: 100%;
    min-width: 0;
  }

  th {
    position: static;
  }

  td,
  th {
    height: auto;
    min-height: 0;
    padding: 1.5px 2px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    font-size: 6.8px;
    line-height: 1.08;
  }

  .cell-input {
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    font-size: 6.8px;
  }

  .schedule-table th:first-child,
  .schedule-table td:first-child,
  .schedule-table th:nth-child(13),
  .schedule-table td:nth-child(13),
  .stall-shift-table th:first-child,
  .stall-shift-table td:first-child {
    position: static;
    box-shadow: none;
  }

  .schedule-table th:nth-child(n+10),
  .schedule-table td:nth-child(n+10),
  .stall-shift-table th:nth-child(n+12),
  .stall-shift-table td:nth-child(n+12) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Dashboard polish v3: logo, lighter type, alert/user actions */
@media (min-width: 821px) {
  .dashboard-mode .brand {
    min-height: 112px;
    justify-content: center;
  }

  .dashboard-mode .brand::before,
  .dashboard-mode .brand::after {
    content: none;
  }

  .dashboard-mode .brand-logo {
    display: block;
    width: 150px;
    max-height: 92px;
    object-fit: contain;
    filter: contrast(1.15) brightness(0.9) drop-shadow(0 8px 14px rgba(15, 23, 42, 0.12));
  }

  .dashboard-mode .dashboard-nav-tabs .nav-main,
  .dashboard-mode .dashboard-stat h3,
  .dashboard-mode .dashboard-panel-head h2,
  .dashboard-mode .dashboard-sales-panel h2 {
    font-weight: 760;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-sub,
  .dashboard-mode .dashboard-lead,
  .dashboard-mode .dashboard-schedule-list span,
  .dashboard-mode .dashboard-stat span {
    font-weight: 560;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-icon {
    font-weight: 760;
  }

  .dashboard-mode .dashboard-menu-card strong {
    font-weight: 650;
    letter-spacing: 0.03em;
  }

  .dashboard-mode .dashboard-menu-card span {
    font-weight: 500;
  }

  .dashboard-mode .dashboard-welcome-logo {
    font-family: "Brush Script MT", "Segoe Script", "Hiragino Mincho ProN", cursive;
    color: #fff;
    font-size: 48px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transform: rotate(-3deg);
    text-shadow:
      0 0 8px rgba(255, 255, 255, 0.82),
      0 0 24px rgba(244, 114, 182, 0.95);
  }

  .dashboard-mode .dashboard-welcome-logo::after {
    content: "";
    display: block;
    width: 142px;
    height: 5px;
    margin-top: 8px;
    border-radius: 999px;
    background: #ff4db8;
    box-shadow: 0 0 16px rgba(255, 77, 184, 0.85);
  }

  .dashboard-mode .dashboard-welcome-copy span,
  .dashboard-mode .dashboard-welcome-copy strong {
    font-weight: 760;
  }

  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(270px, 1fr) minmax(330px, 420px) minmax(150px, auto);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 12px 16px;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .dashboard-mode .dashboard-hero h1 {
    font-size: 28px;
    font-weight: 760;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 2;
    grid-row: 1;
    min-height: 58px;
    padding: 0 22px;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 18px;
    font-weight: 760;
  }

  .dashboard-mode .dashboard-alert-box {
    grid-column: 2;
    grid-row: 2;
    display: block;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 86px;
    padding: 10px 12px;
    border: 1px solid #f8d9a2;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 38px rgba(236, 155, 70, 0.14);
    overflow: hidden;
  }

  .dashboard-mode .dashboard-alert-head {
    display: flex;
    margin-bottom: 6px;
    color: #c56f00;
    font-size: 12px;
    font-weight: 720;
  }

  .dashboard-mode .dashboard-alert-title {
    display: inline-flex;
    width: auto;
    height: auto;
    color: #c56f00;
    font-size: 12px;
  }

  .dashboard-mode .dashboard-alert-box.has-unread-alert .dashboard-alert-title::after {
    content: none;
  }

  .dashboard-mode .dashboard-alert-lamp {
    font-size: 16px;
  }

  .dashboard-mode .dashboard-alert-clear {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid #f1c77a;
    background: #fff7e8;
    color: #9a5a00;
    font-weight: 650;
  }

  .dashboard-mode .dashboard-alert-list {
    display: grid;
    gap: 5px;
  }

  .dashboard-mode .dashboard-alert-list p {
    color: #111827;
    font-size: 11px;
  }

  .dashboard-mode .dashboard-alert-list strong {
    color: #111827;
    font-weight: 620;
  }

  .dashboard-mode .dashboard-alert-list em {
    color: #64748b;
  }

  .dashboard-mode .dashboard-alert-more {
    display: block;
    min-height: 24px;
    margin-top: 7px;
    border-color: #f1c77a;
    background: #fff9ef;
    color: #b46800;
    font-weight: 650;
  }

  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-logout {
    display: grid;
    grid-column: 3;
    min-width: 138px;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(91, 104, 135, 0.13);
  }

  .dashboard-mode .dashboard-user {
    grid-row: 1;
  }

  .dashboard-mode .dashboard-logout {
    grid-row: 2;
    color: #111827;
    font-weight: 650;
  }

  .dashboard-mode .dashboard-user strong {
    color: #111827;
    font-weight: 650;
  }

  .dashboard-mode .dashboard-schedule-grid {
    min-height: 226px;
  }

  .dashboard-mode .dashboard-schedule-grid .dashboard-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
  }

  .dashboard-mode .dashboard-schedule-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dashboard-mode .dashboard-schedule-list p {
    min-height: 58px;
    border: 1px solid #dcefed;
    border-radius: 10px;
    background: #f0fbfa;
    padding: 9px 11px;
    box-shadow: none;
  }

  .dashboard-mode .dashboard-schedule-list p:nth-child(3n) {
    border-right: 1px solid #dcefed;
  }

  .dashboard-mode .dashboard-schedule-list strong {
    font-size: 14px;
    font-weight: 700;
  }

  .dashboard-mode .dashboard-schedule-list span {
    color: #5f6f83;
    font-size: 12px;
    line-height: 1.35;
  }

  .dashboard-mode .dashboard-schedule-grid .dashboard-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    width: min(180px, 100%);
    min-height: 36px;
  }

  .dashboard-mode .dashboard-detail {
    font-weight: 650;
  }

  .dashboard-mode .dashboard-stat strong {
    font-weight: 740;
  }
}

@media (max-width: 820px) {
  .dashboard-mode .brand-logo {
    display: block;
  }

  .dashboard-mode .dashboard-welcome-logo {
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-weight: 500;
  }

  .dashboard-mode .dashboard-alert-box {
    display: block;
    width: auto;
    height: auto;
    min-height: 78px;
    padding: 10px;
    border-radius: 12px;
  }

  .dashboard-mode .dashboard-alert-clear,
  .dashboard-mode .dashboard-alert-list,
  .dashboard-mode .dashboard-alert-more {
    display: initial;
  }

  .dashboard-mode .dashboard-alert-list {
    display: grid;
  }
}

/* Absolute last dashboard fixes v7 */
@media (min-width: 821px) {
  .dashboard-mode .sidebar {
    overflow: hidden !important;
    padding: 14px 18px 12px !important;
  }

  .dashboard-mode .brand {
    min-height: 72px !important;
    margin-bottom: 6px !important;
  }

  .dashboard-mode .brand-logo {
    width: 116px !important;
    max-height: 64px !important;
  }

  .dashboard-mode .dashboard-nav-tabs {
    gap: 5px !important;
    margin-bottom: 8px !important;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-tab {
    min-height: 49px !important;
    padding: 0 8px !important;
    border-radius: 13px !important;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-tab:hover {
    background: linear-gradient(90deg, rgba(244, 114, 182, 0.2), rgba(139, 92, 246, 0.14)) !important;
    box-shadow: 0 10px 24px rgba(139, 92, 246, 0.12) !important;
    transform: translateX(3px) !important;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 17px !important;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-main {
    font-size: 14px !important;
    font-weight: 680 !important;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-sub {
    font-size: 10px !important;
    font-weight: 520 !important;
  }

  .dashboard-mode .dashboard-menu-card {
    min-height: 86px !important;
    margin-top: 8px !important;
    padding: 12px !important;
    border-radius: 12px !important;
  }

  .dashboard-mode .dashboard-menu-card strong,
  .dashboard-mode .dashboard-menu-card span {
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  .dashboard-mode .dashboard-menu-card i {
    width: 112px !important;
    height: 14px !important;
  }

  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(280px, 1fr) minmax(350px, 430px) minmax(140px, auto) !important;
    grid-template-rows: auto auto !important;
    align-items: start !important;
    gap: 8px 16px !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    width: auto !important;
    min-height: 34px !important;
    padding: 0 !important;
    gap: 12px !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .dashboard-mode .dashboard-date-line::before {
    font-size: 16px !important;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 17px !important;
    font-weight: 680 !important;
  }

  .dashboard-mode .dashboard-alert-box {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
  }

  .dashboard-mode .dashboard-user {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  .dashboard-mode .dashboard-logout {
    grid-column: 3 !important;
    grid-row: 2 !important;
    display: grid !important;
    place-items: center !important;
    justify-content: center !important;
    align-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
  }
}

/* Dashboard requested fixes v23 */
@media (min-width: 821px) {
  .dashboard-mode .dashboard-welcome-card {
    background:
      linear-gradient(180deg, rgba(6, 8, 16, 0.02), rgba(6, 8, 16, 0.16)),
      url("./assets/dashboard-bg.png?v=20260525-23") 34% center / cover no-repeat !important;
  }

  .dashboard-mode .dashboard-welcome-copy {
    left: 30px !important;
    top: 28px !important;
    width: min(270px, calc(100% - 60px)) !important;
    gap: 8px !important;
    border-radius: 16px !important;
    padding: 18px 20px !important;
    background: linear-gradient(135deg, rgba(3, 7, 18, 0.78), rgba(15, 23, 42, 0.42)) !important;
  }

  .dashboard-mode .dashboard-welcome-copy span {
    font-size: 19px !important;
    font-weight: 700 !important;
  }

  .dashboard-mode .dashboard-welcome-copy strong {
    font-size: 20px !important;
    font-weight: 680 !important;
  }

  .dashboard-mode .dashboard-welcome-copy em {
    font-size: 13px !important;
    font-weight: 560 !important;
  }

  .dashboard-mode .table-sub-toolbar #payrollLogClearBtn {
    margin-left: auto;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .dashboard-mode .main {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 64px 10px 18px !important;
    overflow-x: hidden !important;
  }

  .dashboard-mode .dashboard-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .dashboard-mode .dashboard-welcome-card {
    display: none !important;
  }

  .dashboard-mode .dashboard-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child,
  .dashboard-mode .dashboard-date-line,
  .dashboard-mode .dashboard-sync,
  .dashboard-mode .dashboard-alert-box,
  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-logout {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    justify-self: stretch !important;
  }

  .dashboard-mode .dashboard-hero h1 {
    font-size: 22px !important;
    line-height: 1.25 !important;
  }

  .dashboard-mode .dashboard-date-line {
    min-height: 48px !important;
    padding: 0 14px !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 14px !important;
    white-space: nowrap !important;
  }

  .dashboard-mode .dashboard-alert-box {
    min-height: 0 !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-logout {
    min-height: 44px !important;
    display: grid !important;
    place-items: center !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-schedule-grid,
  .dashboard-mode .dashboard-card-grid,
  .dashboard-mode .dashboard-sales-detail-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .dashboard-mode .dashboard-panel,
  .dashboard-mode .dashboard-stat,
  .dashboard-mode .dashboard-sales-detail {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .dashboard-mode .dashboard-schedule-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dashboard-mode .dashboard-stat {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
    gap: 10px !important;
    text-align: left !important;
  }

  .dashboard-mode .dashboard-stat strong,
  .dashboard-mode .dashboard-sales-total strong {
    font-size: clamp(28px, 10vw, 44px) !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }
}

/* Absolute final dashboard image/clock v10 */
@media (min-width: 821px) {
  .dashboard-mode .sidebar {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .dashboard-mode .dashboard-menu-card {
    margin-top: auto !important;
    min-height: 150px !important;
    border-radius: 13px !important;
    padding: 22px !important;
    background:
      radial-gradient(circle at 82% 12%, rgba(244, 114, 182, 0.26), transparent 28%),
      linear-gradient(145deg, #070a14, #151827) !important;
  }

  .dashboard-mode .dashboard-menu-card strong {
    font-size: 16px !important;
    font-weight: 750 !important;
  }

  .dashboard-mode .dashboard-menu-card span {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  .dashboard-mode .dashboard-menu-card i {
    width: 148px !important;
    height: 28px !important;
  }

  .dashboard-mode .dashboard-welcome-card {
    background:
      linear-gradient(180deg, rgba(6, 8, 16, 0), rgba(6, 8, 16, 0.12)),
      url("./assets/dashboard-bg.png?v=20260525-21") 18% center / cover no-repeat !important;
  }

  .dashboard-mode .dashboard-welcome-card::before,
  .dashboard-mode .dashboard-welcome-logo {
    display: none !important;
  }

  .dashboard-mode .dashboard-welcome-copy {
    display: grid !important;
    position: absolute !important;
    left: 30px !important;
    top: 58vh !important;
    z-index: 1 !important;
    gap: 8px !important;
    margin: 0 !important;
    width: min(255px, calc(100% - 60px)) !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(3, 7, 18, 0.76), rgba(15, 23, 42, 0.38)) !important;
    padding: 18px 20px !important;
    backdrop-filter: blur(3px) !important;
    color: #fff !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
  }

  .dashboard-mode .dashboard-welcome-copy span {
    font-size: 36px !important;
    font-weight: 780 !important;
  }

  .dashboard-mode .dashboard-welcome-copy strong {
    color: #fff !important;
    font-size: 26px !important;
    font-weight: 780 !important;
  }

  .dashboard-mode .dashboard-welcome-copy em {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 650 !important;
  }

  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(280px, 1fr) minmax(350px, 430px) minmax(140px, auto) !important;
    grid-template-rows: auto auto !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    width: auto !important;
    min-height: 58px !important;
    padding: 0 26px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 18px 44px rgba(91, 104, 135, 0.12) !important;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 18px !important;
    font-weight: 760 !important;
  }
}
/* Absolute final dashboard image/clock v10 */
@media (min-width: 821px) {
  .dashboard-mode .sidebar {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .dashboard-mode .dashboard-menu-card {
    margin-top: auto !important;
    min-height: 150px !important;
    border-radius: 13px !important;
    padding: 22px !important;
    background:
      radial-gradient(circle at 82% 12%, rgba(244, 114, 182, 0.26), transparent 28%),
      linear-gradient(145deg, #070a14, #151827) !important;
  }

  .dashboard-mode .dashboard-menu-card strong {
    font-size: 16px !important;
    font-weight: 750 !important;
  }

  .dashboard-mode .dashboard-menu-card span {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  .dashboard-mode .dashboard-menu-card i {
    width: 148px !important;
    height: 28px !important;
  }

  .dashboard-mode .dashboard-welcome-card {
    background:
      linear-gradient(180deg, rgba(6, 8, 16, 0), rgba(6, 8, 16, 0.12)),
      url("./assets/dashboard-bg.png?v=20260525-21") 18% center / cover no-repeat !important;
  }

  .dashboard-mode .dashboard-welcome-card::before,
  .dashboard-mode .dashboard-welcome-logo {
    display: none !important;
  }

  .dashboard-mode .dashboard-welcome-copy {
    display: grid !important;
    position: absolute !important;
    left: 30px !important;
    top: 58vh !important;
    z-index: 1 !important;
    gap: 8px !important;
    width: min(255px, calc(100% - 60px)) !important;
    margin: 0 !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(3, 7, 18, 0.76), rgba(15, 23, 42, 0.38)) !important;
    padding: 18px 20px !important;
    backdrop-filter: blur(3px) !important;
    color: #fff !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
  }

  .dashboard-mode .dashboard-welcome-copy span {
    font-size: 36px !important;
    font-weight: 780 !important;
  }

  .dashboard-mode .dashboard-welcome-copy strong {
    color: #fff !important;
    font-size: 26px !important;
    font-weight: 780 !important;
  }

  .dashboard-mode .dashboard-welcome-copy em {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 650 !important;
  }

  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(280px, 1fr) minmax(350px, 430px) minmax(140px, auto) !important;
    grid-template-rows: auto auto !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    width: auto !important;
    min-height: 58px !important;
    padding: 0 26px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 18px 44px rgba(91, 104, 135, 0.12) !important;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 18px !important;
    font-weight: 760 !important;
  }
}

/* Dashboard image and clock final v9 */
@media (min-width: 821px) {
  .dashboard-mode .sidebar {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .dashboard-mode .dashboard-menu-card {
    margin-top: auto !important;
    min-height: 150px !important;
    border-radius: 13px !important;
    padding: 22px !important;
    background:
      radial-gradient(circle at 82% 12%, rgba(244, 114, 182, 0.26), transparent 28%),
      linear-gradient(145deg, #070a14, #151827) !important;
  }

  .dashboard-mode .dashboard-menu-card strong {
    font-size: 16px !important;
    font-weight: 750 !important;
  }

  .dashboard-mode .dashboard-menu-card span {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  .dashboard-mode .dashboard-menu-card i {
    width: 148px !important;
    height: 28px !important;
  }

  .dashboard-mode .dashboard-welcome-card {
    background:
      linear-gradient(180deg, rgba(6, 8, 16, 0), rgba(6, 8, 16, 0.12)),
      url("./assets/dashboard-bg.png?v=20260525-18") center / cover no-repeat !important;
  }

  .dashboard-mode .dashboard-welcome-card::before,
  .dashboard-mode .dashboard-welcome-logo {
    display: none !important;
  }

  .dashboard-mode .dashboard-welcome-copy {
    display: grid !important;
    position: relative !important;
    z-index: 1 !important;
    gap: 8px !important;
    margin-top: auto !important;
    margin-bottom: 28px !important;
    color: #fff !important;
  }

  .dashboard-mode .dashboard-welcome-copy span {
    font-size: 36px !important;
    font-weight: 780 !important;
  }

  .dashboard-mode .dashboard-welcome-copy strong {
    color: #fff !important;
    font-size: 26px !important;
    font-weight: 780 !important;
  }

  .dashboard-mode .dashboard-welcome-copy em {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 650 !important;
  }

  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(280px, 1fr) minmax(350px, 430px) minmax(140px, auto) !important;
    grid-template-rows: auto auto !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    width: auto !important;
    min-height: 58px !important;
    padding: 0 26px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 18px 44px rgba(91, 104, 135, 0.12) !important;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 18px !important;
    font-weight: 760 !important;
  }
}

/* Dashboard clock placement final v6 */
@media (min-width: 821px) {
  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(280px, 1fr) minmax(350px, 430px) minmax(140px, auto);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 10px 16px;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    width: auto;
    min-height: 42px;
    padding: 0;
    gap: 14px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .dashboard-mode .dashboard-date-line::before {
    font-size: 17px;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 18px;
    font-weight: 680;
  }

  .dashboard-mode .dashboard-alert-box {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .dashboard-mode .dashboard-user {
    grid-column: 3;
    grid-row: 1;
  }

  .dashboard-mode .dashboard-logout {
    grid-column: 3;
    grid-row: 2;
    display: grid;
    place-items: center;
    text-align: center;
    line-height: 1;
  }
}

/* Dashboard final override v5 */
@media (min-width: 821px) {
  .dashboard-mode .sidebar {
    overflow: hidden;
    padding: 18px 20px 16px;
  }

  .dashboard-mode .brand {
    min-height: 82px;
    margin-bottom: 10px;
  }

  .dashboard-mode .brand-logo {
    width: 128px;
    max-height: 72px;
  }

  .dashboard-mode .dashboard-nav-tabs {
    gap: 7px;
    margin-bottom: 12px;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-tab {
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    gap: 11px;
    min-height: 54px;
    border-radius: 14px;
    padding: 0 8px;
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-tab:hover {
    background: linear-gradient(90deg, rgba(244, 114, 182, 0.18), rgba(139, 92, 246, 0.12));
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.12);
    transform: translateX(3px);
  }

  .dashboard-mode .dashboard-nav-tabs .nav-tab:hover .nav-main {
    color: #7c3aed;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-main {
    font-size: 15px;
    font-weight: 680;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-sub {
    margin-top: 2px;
    font-size: 10.5px;
    font-weight: 520;
  }

  .dashboard-menu-card {
    min-height: 104px;
    margin-top: 12px;
    padding: 15px;
  }

  .dashboard-menu-card strong,
  .dashboard-menu-card span {
    font-size: 13px;
  }

  .dashboard-menu-card i {
    width: 124px;
    height: 20px;
  }

  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(280px, 1fr) minmax(350px, 430px) minmax(140px, auto);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 10px 16px;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .dashboard-mode .dashboard-hero h1 {
    font-size: 28px;
    font-weight: 680;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    width: auto;
    min-height: 42px;
    padding: 0;
    gap: 14px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .dashboard-mode .dashboard-date-line::before {
    font-size: 17px;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 18px;
    font-weight: 680;
  }

  .dashboard-mode .dashboard-alert-box {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .dashboard-mode .dashboard-user {
    grid-column: 3;
    grid-row: 1;
  }

  .dashboard-mode .dashboard-logout {
    grid-column: 3;
    grid-row: 2;
    display: grid;
    place-items: center;
    justify-content: center;
    align-content: center;
    text-align: center;
    line-height: 1;
    padding: 0 18px;
  }
}

/* Dashboard reference layout v2 */
@media (min-width: 821px) {
  .dashboard-mode.app-shell {
    grid-template-columns: 270px minmax(0, 1fr);
    background:
      radial-gradient(circle at 78% 0%, rgba(244, 114, 182, 0.14), transparent 24%),
      linear-gradient(180deg, #fbfcff 0%, #f5f7ff 100%);
  }

  .dashboard-mode .sidebar {
    width: 270px;
    padding: 28px 24px 22px;
    border: 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 22px 0 52px rgba(88, 103, 138, 0.14);
  }

  .dashboard-mode .brand {
    position: relative;
    justify-content: flex-start;
    min-height: 96px;
    margin: 0 0 20px;
    padding: 0;
  }

  .dashboard-mode .brand-logo {
    display: none;
  }

  .dashboard-mode .brand::before {
    content: "B-Village";
    display: inline-block;
    color: #070b16;
    font-size: 40px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0;
    transform: rotate(-4deg);
  }

  .dashboard-mode .brand::after {
    content: "";
    position: absolute;
    left: 8px;
    bottom: 22px;
    width: 164px;
    height: 10px;
    border-radius: 999px;
    background: #ff4db8;
    transform: rotate(-4deg);
    z-index: -1;
  }

  .dashboard-mode .dashboard-nav-tabs {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-tab {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    align-items: center;
    justify-content: initial;
    gap: 14px;
    min-height: 66px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #0f172a;
    text-align: left;
    white-space: normal;
    box-shadow: none;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-tab.active {
    background: transparent;
    color: #0f172a;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.2);
  }

  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="home"] .nav-icon::before { content: "⌂"; }
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="shift"] .nav-icon::before { content: "▦"; }
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="sales"] .nav-icon::before { content: "▥"; }
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="production"] .nav-icon::before { content: "●"; }
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="invoice"] .nav-icon::before { content: "▤"; }
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="payroll"] .nav-icon::before { content: "¥"; }
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="ark"] .nav-icon::before { content: "▽"; }
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="crm"] .nav-icon::before { content: "♟"; }

  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="shift"] .nav-icon,
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="invoice"] .nav-icon,
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="ark"] .nav-icon {
    background: linear-gradient(135deg, #6d5dfc, #a855f7);
  }

  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="sales"] .nav-icon,
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="crm"] .nav-icon {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
  }

  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="production"] .nav-icon,
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="payroll"] .nav-icon,
  .dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="home"] .nav-icon {
    background: linear-gradient(135deg, #ff5fbd, #f472b6);
  }

  .dashboard-mode .dashboard-nav-tabs .nav-main {
    color: #101827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-sub {
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    opacity: 1;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-arrow::before {
    content: "›";
    color: #475569;
    font-size: 26px;
    line-height: 1;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-arrow.external::before {
    content: "↗";
    font-size: 16px;
  }

  .dashboard-menu-card {
    display: grid;
    align-content: space-between;
    min-height: 150px;
    margin-top: 28px;
    border-radius: 13px;
    background:
      radial-gradient(circle at 82% 12%, rgba(244, 114, 182, 0.24), transparent 26%),
      linear-gradient(145deg, #070a14, #151827);
    color: #fff;
    padding: 22px;
    box-shadow: 0 18px 36px rgba(17, 24, 39, 0.18);
  }

  .dashboard-menu-card strong,
  .dashboard-menu-card span {
    display: block;
    font-size: 16px;
    line-height: 1.35;
  }

  .dashboard-menu-card i {
    display: block;
    width: 148px;
    height: 28px;
    background:
      linear-gradient(90deg, transparent 0 5%, #ff4db8 5% 7%, transparent 7% 11%, #ff4db8 11% 16%, transparent 16% 20%, #ff4db8 20% 24%, transparent 24% 28%, #ff4db8 28% 32%, transparent 32% 100%),
      linear-gradient(#ff4db8, #ff4db8) center / 100% 2px no-repeat;
    opacity: 0.8;
  }

  .dashboard-mode .main {
    min-width: 0;
    padding: 0;
    background:
      radial-gradient(circle at 82% 4%, rgba(244, 114, 182, 0.13), transparent 22%),
      #f8faff;
    color: #0f172a;
  }

  .dashboard-mode .dashboard-shell {
    grid-template-columns: minmax(320px, 350px) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    gap: 24px 30px;
    min-height: 100vh;
    padding: 0 26px 24px 0;
  }

  .dashboard-mode .dashboard-welcome-card {
    grid-column: 1;
    grid-row: 1 / span 4;
    top: 0;
    min-height: 100vh;
    border-radius: 0 0 110px 0;
    background:
      linear-gradient(180deg, rgba(8, 10, 18, 0.02), rgba(8, 10, 18, 0.58)),
      radial-gradient(circle at 67% 22%, rgba(249, 115, 22, 0.65), transparent 16%),
      radial-gradient(circle at 52% 33%, rgba(236, 72, 153, 0.86), transparent 24%),
      radial-gradient(circle at 22% 58%, rgba(37, 99, 235, 0.78), transparent 26%),
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 2px, transparent 2px 48px),
      linear-gradient(145deg, #0b1025, #310d4c 44%, #030711 100%);
    padding: 34px 30px;
    box-shadow: 24px 0 64px rgba(41, 39, 88, 0.18);
  }

  .dashboard-mode .dashboard-welcome-card::before {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 36%),
      radial-gradient(circle at 68% 40%, rgba(255, 255, 255, 0.17), transparent 17%),
      repeating-linear-gradient(0deg, transparent 0 54px, rgba(255, 255, 255, 0.06) 54px 56px);
    opacity: 1;
  }

  .dashboard-mode .dashboard-welcome-logo {
    align-self: start;
    margin-top: 44vh;
    color: #fff;
    font-size: 36px;
    text-shadow: 0 0 24px rgba(244, 114, 182, 0.98);
  }

  .dashboard-mode .dashboard-welcome-copy {
    display: grid;
    gap: 8px;
    margin-bottom: 28px;
  }

  .dashboard-mode .dashboard-welcome-copy span {
    font-size: 36px;
    font-weight: 900;
  }

  .dashboard-mode .dashboard-welcome-copy strong {
    color: #fff;
    font-size: 26px;
    font-weight: 900;
  }

  .dashboard-mode .dashboard-welcome-copy em {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
  }

  .dashboard-mode .dashboard-hero {
    grid-column: 2;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(330px, 430px) 58px;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 8px 18px;
    padding-top: 28px;
    margin: 0;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .dashboard-mode .dashboard-hero h1 {
    margin: 0;
    color: #070b16;
    font-size: 29px;
    font-weight: 900;
    letter-spacing: 0;
  }

  .dashboard-mode .dashboard-lead {
    margin: 10px 0 0;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    min-height: 66px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    padding: 0 22px;
    box-shadow: 0 18px 44px rgba(91, 104, 135, 0.12);
  }

  .dashboard-mode .dashboard-date-line::before {
    content: "▣";
    color: #111827;
    font-size: 22px;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    color: #111827;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .dashboard-mode .dashboard-sync {
    display: none;
  }

  .dashboard-mode .dashboard-alert-box {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 58px;
    min-width: 58px;
    height: 58px;
    min-height: 58px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 44px rgba(91, 104, 135, 0.14);
    overflow: visible;
  }

  .dashboard-mode .dashboard-alert-head {
    display: contents;
  }

  .dashboard-mode .dashboard-alert-title {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    color: transparent;
    font-size: 0;
  }

  .dashboard-mode .dashboard-alert-lamp {
    font-size: 25px;
  }

  .dashboard-mode .dashboard-alert-box.has-unread-alert .dashboard-alert-title::after {
    content: "";
    position: absolute;
    top: 9px;
    right: 9px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ff4db8;
    box-shadow: 0 0 0 4px rgba(255, 77, 184, 0.18);
  }

  .dashboard-mode .dashboard-alert-clear,
  .dashboard-mode .dashboard-alert-list,
  .dashboard-mode .dashboard-alert-more {
    display: none;
  }

  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-logout {
    display: none;
  }

  .dashboard-mode .dashboard-schedule-grid {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    min-height: 172px;
    margin: 0;
    border: 1px solid #edf0f8;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 48px rgba(91, 104, 135, 0.1);
    overflow: hidden;
  }

  .dashboard-mode .dashboard-schedule-grid .dashboard-panel {
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 26px 30px;
  }

  .dashboard-mode .dashboard-schedule-grid .dashboard-panel + .dashboard-panel {
    border-left: 1px solid #edf0f8;
  }

  .dashboard-mode .dashboard-panel-head {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 16px;
  }

  .dashboard-mode .dashboard-panel-head h2 {
    color: #070b16;
    font-size: 24px;
    font-weight: 900;
  }

  .dashboard-mode .dashboard-panel-head h2::after {
    margin-left: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
  }

  .dashboard-mode .dashboard-panel-pink .dashboard-panel-head h2::after {
    content: "TODAY";
  }

  .dashboard-mode .dashboard-panel-blue .dashboard-panel-head h2::after {
    content: "TOMORROW";
  }

  .dashboard-mode .dashboard-panel-head time {
    margin-left: auto;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
  }

  .dashboard-mode .dashboard-schedule-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  .dashboard-mode .dashboard-schedule-list p {
    min-height: 72px;
    border: 0;
    border-right: 1px solid #edf0f8;
    border-radius: 0;
    background: transparent;
    padding: 0 16px;
  }

  .dashboard-mode .dashboard-schedule-list p:nth-child(3n) {
    border-right: 0;
  }

  .dashboard-mode .dashboard-schedule-list strong {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
  }

  .dashboard-mode .dashboard-schedule-list span {
    color: #111827;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    white-space: normal;
  }

  .dashboard-mode .dashboard-schedule-grid .dashboard-detail {
    display: none;
  }

  .dashboard-mode .dashboard-card-grid {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
  }

  .dashboard-mode .dashboard-stat {
    min-height: 220px;
    grid-template-columns: 1fr;
    align-content: space-between;
    gap: 18px;
    border: 1px solid #edf0f8;
    border-radius: 18px;
    background:
      radial-gradient(circle at 82% 52%, rgba(244, 114, 182, 0.2), transparent 24%),
      rgba(255, 255, 255, 0.96);
    padding: 28px 30px 18px;
    box-shadow: 0 18px 48px rgba(91, 104, 135, 0.12);
  }

  .dashboard-mode .dashboard-stat.dashboard-pink {
    background:
      radial-gradient(circle at 78% 52%, rgba(139, 92, 246, 0.2), transparent 28%),
      rgba(255, 255, 255, 0.96);
  }

  .dashboard-mode .dashboard-stat h3 {
    color: #070b16;
    font-size: 25px;
    font-weight: 900;
  }

  .dashboard-mode .dashboard-stat-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .dashboard-mode .dashboard-stat span {
    color: #111827;
    font-size: 14px;
    font-weight: 800;
  }

  .dashboard-mode .dashboard-stat strong {
    color: #070b16;
    font-size: 44px;
    font-weight: 900;
    line-height: 1;
  }

  .dashboard-mode .dashboard-detail {
    max-width: none;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(244, 114, 182, 0.52), rgba(244, 114, 182, 0.28));
    color: #111827;
    font-weight: 900;
  }

  .dashboard-mode .dashboard-pink .dashboard-detail {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.52), rgba(139, 92, 246, 0.26));
  }

  .dashboard-mode .dashboard-bottom-grid {
    grid-column: 2;
  }

  .dashboard-mode .dashboard-sales-panel {
    border: 1px solid #edf0f8;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    padding: 24px 30px;
    box-shadow: 0 18px 48px rgba(91, 104, 135, 0.1);
  }

  .dashboard-mode .dashboard-sales-panel h2 {
    color: #070b16;
    font-size: 20px;
    font-weight: 900;
  }

  .dashboard-mode .dashboard-sales-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .dashboard-mode .dashboard-sales-box {
    border: 0;
    border-right: 1px solid #edf0f8;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 20px 0 0;
  }

  .dashboard-mode .dashboard-sales-box:last-child {
    border-right: 0;
    padding-right: 0;
  }

  .dashboard-mode .dashboard-sales-title strong,
  .dashboard-mode .dashboard-sales-lines strong,
  .dashboard-mode .dashboard-site-sales strong,
  .dashboard-mode .dashboard-sales-totals strong {
    color: #070b16;
  }
}

@media (max-width: 820px) {
  .dashboard-mode .dashboard-menu-card {
    display: none;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-tab {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-icon {
    display: none;
  }

  .dashboard-mode .dashboard-shell {
    gap: 12px;
    padding: 76px 10px 18px;
  }

  .dashboard-mode .dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 10px;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1 / -1;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 1;
    display: flex;
    align-items: center;
    min-height: 48px;
    border-radius: 999px;
    background: #fff;
    padding: 0 14px;
    box-shadow: 0 10px 28px rgba(91, 104, 135, 0.12);
  }

  .dashboard-mode .dashboard-alert-box {
    grid-column: 2;
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 999px;
  }

  .dashboard-mode .dashboard-alert-clear,
  .dashboard-mode .dashboard-alert-list,
  .dashboard-mode .dashboard-alert-more {
    display: none;
  }

  .dashboard-mode .dashboard-schedule-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-mode .dashboard-schedule-list {
    grid-template-columns: 1fr;
  }
}

/* Dashboard final override v4 */
@media (min-width: 821px) {
  .dashboard-mode .brand {
    min-height: 112px;
    justify-content: center;
  }

  .dashboard-mode .brand::before,
  .dashboard-mode .brand::after {
    content: none;
  }

  .dashboard-mode .brand-logo {
    display: block;
    width: 150px;
    max-height: 92px;
    object-fit: contain;
    filter: contrast(1.15) brightness(0.9) drop-shadow(0 8px 14px rgba(15, 23, 42, 0.12));
  }

  .dashboard-mode .dashboard-nav-tabs .nav-main,
  .dashboard-mode .dashboard-panel-head h2,
  .dashboard-mode .dashboard-stat h3,
  .dashboard-mode .dashboard-sales-panel h2 {
    font-weight: 760;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-sub,
  .dashboard-mode .dashboard-lead,
  .dashboard-mode .dashboard-schedule-list span,
  .dashboard-mode .dashboard-stat span {
    font-weight: 560;
  }

  .dashboard-mode .dashboard-menu-card strong {
    font-weight: 650;
    letter-spacing: 0.03em;
  }

  .dashboard-mode .dashboard-menu-card span {
    font-weight: 500;
  }

  .dashboard-mode .dashboard-welcome-logo {
    margin-top: 41vh;
    font-family: "Brush Script MT", "Segoe Script", "Hiragino Mincho ProN", cursive;
    color: #fff;
    font-size: 48px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transform: rotate(-3deg);
    text-shadow:
      0 0 8px rgba(255, 255, 255, 0.82),
      0 0 24px rgba(244, 114, 182, 0.95);
  }

  .dashboard-mode .dashboard-welcome-logo::after {
    content: "";
    display: block;
    width: 142px;
    height: 5px;
    margin-top: 8px;
    border-radius: 999px;
    background: #ff4db8;
    box-shadow: 0 0 16px rgba(255, 77, 184, 0.85);
  }

  .dashboard-mode .dashboard-welcome-copy span,
  .dashboard-mode .dashboard-welcome-copy strong {
    font-weight: 760;
  }

  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(270px, 1fr) minmax(330px, 420px) minmax(150px, auto);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 12px 16px;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .dashboard-mode .dashboard-hero h1 {
    font-size: 28px;
    font-weight: 760;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 2;
    grid-row: 1;
    min-height: 58px;
    padding: 0 22px;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 18px;
    font-weight: 760;
  }

  .dashboard-mode .dashboard-alert-box {
    grid-column: 2;
    grid-row: 2;
    display: block;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 86px;
    padding: 10px 12px;
    border: 1px solid #f8d9a2;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 38px rgba(236, 155, 70, 0.14);
    overflow: hidden;
  }

  .dashboard-mode .dashboard-alert-head {
    display: flex;
    margin-bottom: 6px;
    color: #c56f00;
    font-size: 12px;
    font-weight: 720;
  }

  .dashboard-mode .dashboard-alert-title {
    display: inline-flex;
    width: auto;
    height: auto;
    color: #c56f00;
    font-size: 12px;
  }

  .dashboard-mode .dashboard-alert-box.has-unread-alert .dashboard-alert-title::after {
    content: none;
  }

  .dashboard-mode .dashboard-alert-lamp {
    font-size: 16px;
  }

  .dashboard-mode .dashboard-alert-clear {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid #f1c77a;
    background: #fff7e8;
    color: #9a5a00;
    font-weight: 650;
  }

  .dashboard-mode .dashboard-alert-list {
    display: grid;
    gap: 5px;
  }

  .dashboard-mode .dashboard-alert-list p {
    color: #111827;
    font-size: 11px;
  }

  .dashboard-mode .dashboard-alert-list strong {
    color: #111827;
    font-weight: 620;
  }

  .dashboard-mode .dashboard-alert-list em {
    color: #64748b;
  }

  .dashboard-mode .dashboard-alert-more {
    display: block;
    min-height: 24px;
    margin-top: 7px;
    border-color: #f1c77a;
    background: #fff9ef;
    color: #b46800;
    font-weight: 650;
  }

  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-logout {
    display: grid;
    grid-column: 3;
    min-width: 138px;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(91, 104, 135, 0.13);
  }

  .dashboard-mode .dashboard-user {
    grid-row: 1;
  }

  .dashboard-mode .dashboard-logout {
    grid-row: 2;
    color: #111827;
    font-weight: 650;
  }

  .dashboard-mode .dashboard-user strong {
    color: #111827;
    font-weight: 650;
  }

  .dashboard-mode .dashboard-schedule-grid {
    min-height: 226px;
  }

  .dashboard-mode .dashboard-schedule-grid .dashboard-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
  }

  .dashboard-mode .dashboard-schedule-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dashboard-mode .dashboard-schedule-list p {
    min-height: 58px;
    border: 1px solid #dcefed;
    border-radius: 10px;
    background: #f0fbfa;
    padding: 9px 11px;
  }

  .dashboard-mode .dashboard-schedule-list p:nth-child(3n) {
    border-right: 1px solid #dcefed;
  }

  .dashboard-mode .dashboard-schedule-list strong {
    font-size: 14px;
    font-weight: 700;
  }

  .dashboard-mode .dashboard-schedule-list span {
    color: #5f6f83;
    font-size: 12px;
    line-height: 1.35;
  }

  .dashboard-mode .dashboard-schedule-grid .dashboard-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    width: min(180px, 100%);
    min-height: 36px;
  }

  .dashboard-mode .dashboard-detail {
    font-weight: 650;
  }

  .dashboard-mode .dashboard-stat strong {
    font-weight: 740;
  }
}

@media (max-width: 820px) {
  .dashboard-mode .brand-logo {
    display: block;
  }

  .dashboard-mode .dashboard-welcome-logo {
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-weight: 500;
  }

  .dashboard-mode .dashboard-alert-box {
    display: block;
    width: auto;
    height: auto;
    min-height: 78px;
    padding: 10px;
    border-radius: 12px;
  }

  .dashboard-mode .dashboard-alert-clear,
  .dashboard-mode .dashboard-alert-list,
  .dashboard-mode .dashboard-alert-more {
    display: initial;
  }

  .dashboard-mode .dashboard-alert-list {
    display: grid;
  }
}
/* Absolute final dashboard fixes v8 */
@media (min-width: 821px) {
  .dashboard-mode .sidebar {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 14px 18px 12px !important;
  }

  .dashboard-mode .brand {
    min-height: 72px !important;
    margin-bottom: 6px !important;
  }

  .dashboard-mode .brand-logo {
    width: 116px !important;
    max-height: 64px !important;
  }

  .dashboard-mode .dashboard-nav-tabs {
    gap: 5px !important;
    margin-bottom: 8px !important;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-tab {
    min-height: 49px !important;
    padding: 0 8px !important;
    border-radius: 13px !important;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-tab:hover {
    background: linear-gradient(90deg, rgba(244, 114, 182, 0.2), rgba(139, 92, 246, 0.14)) !important;
    box-shadow: 0 10px 24px rgba(139, 92, 246, 0.12) !important;
    transform: translateX(3px) !important;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 17px !important;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-main {
    font-size: 14px !important;
    font-weight: 680 !important;
  }

  .dashboard-mode .dashboard-nav-tabs .nav-sub {
    font-size: 10px !important;
    font-weight: 520 !important;
  }

  .dashboard-mode .dashboard-menu-card {
    min-height: 150px !important;
    margin-top: auto !important;
    padding: 22px !important;
    border-radius: 13px !important;
    background:
      radial-gradient(circle at 82% 12%, rgba(244, 114, 182, 0.26), transparent 28%),
      linear-gradient(145deg, #070a14, #151827) !important;
  }

  .dashboard-mode .dashboard-menu-card strong,
  .dashboard-mode .dashboard-menu-card span {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  .dashboard-mode .dashboard-menu-card i {
    width: 148px !important;
    height: 28px !important;
  }

  .dashboard-mode .dashboard-welcome-card {
    background:
      linear-gradient(180deg, rgba(6, 8, 16, 0), rgba(6, 8, 16, 0.12)),
      url("./assets/dashboard-bg.png?v=20260525-21") 18% center / cover no-repeat !important;
  }

  .dashboard-mode .dashboard-welcome-card::before,
  .dashboard-mode .dashboard-welcome-logo {
    display: none !important;
  }

  .dashboard-mode .dashboard-welcome-copy {
    display: grid !important;
    position: absolute !important;
    left: 30px !important;
    top: 58vh !important;
    z-index: 1 !important;
    gap: 8px !important;
    width: min(255px, calc(100% - 60px)) !important;
    margin: 0 !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(3, 7, 18, 0.76), rgba(15, 23, 42, 0.38)) !important;
    padding: 18px 20px !important;
    backdrop-filter: blur(3px) !important;
    color: #fff !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
  }

  .dashboard-mode .dashboard-welcome-copy span {
    font-size: 36px !important;
    font-weight: 780 !important;
  }

  .dashboard-mode .dashboard-welcome-copy strong {
    color: #fff !important;
    font-size: 26px !important;
    font-weight: 780 !important;
  }

  .dashboard-mode .dashboard-welcome-copy em {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 650 !important;
  }

  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(280px, 1fr) minmax(350px, 430px) minmax(140px, auto) !important;
    grid-template-rows: auto auto !important;
    align-items: start !important;
    gap: 8px 16px !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    width: auto !important;
    min-height: 58px !important;
    padding: 0 26px !important;
    gap: 12px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 18px 44px rgba(91, 104, 135, 0.12) !important;
  }

  .dashboard-mode .dashboard-date-line::before {
    font-size: 16px !important;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 18px !important;
    font-weight: 760 !important;
  }

  .dashboard-mode .dashboard-alert-box {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
  }

  .dashboard-mode .dashboard-user {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  .dashboard-mode .dashboard-logout {
    grid-column: 3 !important;
    grid-row: 2 !important;
    display: grid !important;
    place-items: center !important;
    justify-content: center !important;
    align-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
  }
}

/* FINAL dashboard requested fixes v23 */
@media (min-width: 821px) {
  .dashboard-mode .dashboard-welcome-card {
    background:
      linear-gradient(180deg, rgba(6, 8, 16, 0.02), rgba(6, 8, 16, 0.16)),
      url("./assets/dashboard-bg.png?v=20260525-23") 34% center / cover no-repeat !important;
  }

  .dashboard-mode .dashboard-welcome-copy {
    display: grid !important;
    position: absolute !important;
    left: 30px !important;
    top: 28px !important;
    z-index: 2 !important;
    width: min(270px, calc(100% - 60px)) !important;
    gap: 8px !important;
    border-radius: 16px !important;
    padding: 18px 20px !important;
    background: linear-gradient(135deg, rgba(3, 7, 18, 0.78), rgba(15, 23, 42, 0.42)) !important;
    color: #fff !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.82) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
  }

  .dashboard-mode .dashboard-welcome-copy span {
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }

  .dashboard-mode .dashboard-welcome-copy strong {
    font-size: 20px !important;
    font-weight: 680 !important;
    line-height: 1.2 !important;
  }

  .dashboard-mode .dashboard-welcome-copy em {
    font-size: 13px !important;
    font-weight: 560 !important;
    line-height: 1.35 !important;
  }

  .dashboard-mode .table-sub-toolbar #payrollLogClearBtn {
    margin-left: auto !important;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .dashboard-mode .app-shell,
  .dashboard-mode .main {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .dashboard-mode .main {
    padding: 64px 10px 18px !important;
  }

  .dashboard-mode .dashboard-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .dashboard-mode .dashboard-welcome-card {
    display: none !important;
  }

  .dashboard-mode .dashboard-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child,
  .dashboard-mode .dashboard-date-line,
  .dashboard-mode .dashboard-sync,
  .dashboard-mode .dashboard-alert-box,
  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-logout {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    justify-self: stretch !important;
  }

  .dashboard-mode .dashboard-hero h1 {
    font-size: 22px !important;
    line-height: 1.25 !important;
  }

  .dashboard-mode .dashboard-date-line {
    min-height: 48px !important;
    padding: 0 14px !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 14px !important;
    white-space: nowrap !important;
  }

  .dashboard-mode .dashboard-alert-box {
    min-height: 0 !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-logout {
    min-height: 44px !important;
    display: grid !important;
    place-items: center !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-schedule-grid,
  .dashboard-mode .dashboard-card-grid,
  .dashboard-mode .dashboard-sales-detail-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .dashboard-mode .dashboard-panel,
  .dashboard-mode .dashboard-stat,
  .dashboard-mode .dashboard-sales-detail {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .dashboard-mode .dashboard-schedule-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dashboard-mode .dashboard-stat {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
    gap: 10px !important;
    text-align: left !important;
  }

  .dashboard-mode .dashboard-stat strong,
  .dashboard-mode .dashboard-sales-total strong {
    font-size: clamp(28px, 10vw, 44px) !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }
}


/* FINAL urgent dashboard placement v24 */
@media (min-width: 821px) {
  .dashboard-mode .dashboard-welcome-card {
    background:
      linear-gradient(180deg, rgba(6, 8, 16, 0.01), rgba(6, 8, 16, 0.18)),
      url("./assets/dashboard-bg.png?v=20260525-24") 34% center / cover no-repeat !important;
  }

  .dashboard-mode .dashboard-welcome-copy {
    top: auto !important;
    bottom: 76px !important;
    left: 30px !important;
  }

  .dashboard-mode .dashboard-date-line {
    min-height: 50px !important;
    padding: 6px 22px !important;
    gap: 4px 10px !important;
    line-height: 1.05 !important;
    align-content: center !important;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    line-height: 1.05 !important;
  }
}

@media (max-width: 820px) {
  .dashboard-mode .main {
    padding: 58px 10px 18px !important;
  }

  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-auto-rows: auto !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .dashboard-mode .dashboard-user {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: auto !important;
    max-width: none !important;
    min-height: 44px !important;
    margin: 0 !important;
    display: grid !important;
    place-items: center !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-logout {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 112px !important;
    max-width: 112px !important;
    min-width: 96px !important;
    min-height: 44px !important;
    margin: 0 !important;
    display: grid !important;
    place-items: center !important;
    text-align: center !important;
    padding: 0 10px !important;
  }

  .dashboard-mode .dashboard-alert-box {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    min-height: 0 !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 6px 10px !important;
    gap: 2px 8px !important;
    flex-wrap: wrap !important;
    align-content: center !important;
    justify-content: center !important;
    line-height: 1.05 !important;
  }

  .dashboard-mode .dashboard-sync {
    grid-column: 1 / -1 !important;
    grid-row: 5 !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 13px !important;
    line-height: 1.05 !important;
  }

  .dashboard-mode .dashboard-alert-head {
    gap: 8px !important;
  }
}

/* FINAL responsive dashboard shrink fixes v26 */
@media (max-width: 1280px) and (min-width: 821px) {
  .dashboard-mode .main {
    padding: 18px 16px 24px !important;
    overflow-x: hidden !important;
  }

  .dashboard-mode .dashboard-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 16px !important;
    padding: 0 !important;
  }

  .dashboard-mode .dashboard-welcome-card {
    display: none !important;
  }

  .dashboard-mode .dashboard-hero,
  .dashboard-mode .dashboard-production-notice,
  .dashboard-mode .dashboard-schedule-grid,
  .dashboard-mode .dashboard-card-grid,
  .dashboard-mode .dashboard-sales-detail-grid,
  .dashboard-mode .dashboard-bottom-grid {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .dashboard-mode .dashboard-hero {
    display: grid !important;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 420px) minmax(120px, auto) !important;
    gap: 10px 12px !important;
  }

  .dashboard-mode .dashboard-hero h1 {
    font-size: clamp(24px, 2.4vw, 30px) !important;
    white-space: normal !important;
  }

  .dashboard-mode .dashboard-date-line {
    min-height: 46px !important;
    padding: 5px 18px !important;
    gap: 2px 8px !important;
  }

  .dashboard-mode .dashboard-date,
  .dashboard-mode .dashboard-time {
    font-size: 15px !important;
    line-height: 1.05 !important;
  }

  .dashboard-mode .dashboard-schedule-grid,
  .dashboard-mode .dashboard-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-mode .dashboard-sales-detail-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dashboard-mode .dashboard-stat,
  .dashboard-mode .dashboard-panel,
  .dashboard-mode .dashboard-sales-detail,
  .dashboard-mode .dashboard-sales-box {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .dashboard-mode .dashboard-stat strong,
  .dashboard-mode .dashboard-sales-total strong,
  .dashboard-mode .dashboard-sales-lines strong {
    font-size: clamp(28px, 4.2vw, 44px) !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 1060px) and (min-width: 821px) {
  .dashboard-mode .dashboard-hero {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px) !important;
    grid-template-rows: auto auto auto !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .dashboard-mode .dashboard-date-line {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .dashboard-mode .dashboard-alert-box {
    grid-column: 2 !important;
    grid-row: 1 / span 3 !important;
  }

  .dashboard-mode .dashboard-user {
    grid-column: 1 !important;
    grid-row: 3 !important;
    justify-self: start !important;
    width: min(220px, 100%) !important;
  }

  .dashboard-mode .dashboard-logout {
    grid-column: 1 !important;
    grid-row: 3 !important;
    justify-self: end !important;
    width: min(160px, 42%) !important;
  }
}

@media (max-width: 940px) and (min-width: 821px) {
  .dashboard-mode .dashboard-hero,
  .dashboard-mode .dashboard-production-notice,
  .dashboard-mode .dashboard-schedule-grid,
  .dashboard-mode .dashboard-card-grid,
  .dashboard-mode .dashboard-sales-detail-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dashboard-mode .dashboard-alert-box,
  .dashboard-mode .dashboard-hero > div:first-child,
  .dashboard-mode .dashboard-date-line,
  .dashboard-mode .dashboard-user-actions {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-self: stretch !important;
  }

  .dashboard-mode .dashboard-alert-box { grid-row: 1 !important; }
  .dashboard-mode .dashboard-hero > div:first-child { grid-row: 2 !important; }
  .dashboard-mode .dashboard-date-line { grid-row: 3 !important; }
  .dashboard-mode .dashboard-user-actions {
    grid-row: 4 !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

/* FINAL dashboard user controls v20260613-0003 */
.dashboard-mode .dashboard-user-actions {
  grid-column: 3 !important;
  grid-row: 1 / span 2 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 128px !important;
  max-width: 150px !important;
}

.dashboard-mode .dashboard-user,
.dashboard-mode .dashboard-logout,
.dashboard-mode .dashboard-user-actions .push-toggle {
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 38px !important;
  margin: 0 !important;
  justify-self: stretch !important;
}

.dashboard-mode .dashboard-user-actions .push-toggle {
  display: inline-flex !important;
  justify-content: center !important;
  padding-right: 10px !important;
  font-size: 11px !important;
}

@media (max-width: 820px) {
  .dashboard-mode .dashboard-user-actions {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(118px, auto) minmax(92px, auto) !important;
    gap: 8px !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-logout,
  .dashboard-mode .dashboard-user-actions .push-toggle {
    min-height: 36px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    font-size: 12px !important;
  }

  .dashboard-mode .dashboard-user strong {
    max-width: 100% !important;
    font-size: 12px !important;
  }
}

@media (max-width: 430px) {
  .dashboard-mode .dashboard-user-actions {
    grid-template-columns: minmax(0, 1fr) minmax(108px, auto) !important;
  }

  .dashboard-mode .dashboard-logout {
    grid-column: 1 / -1 !important;
  }
}

/* FINAL mobile dashboard header fix v20260613-0005 */
@media (max-width: 820px) {
  .dashboard-mode .mobile-menu-button {
    top: 24px !important;
    left: 16px !important;
    z-index: 10000 !important;
    width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  .dashboard-mode .dashboard-hero {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding-left: 0 !important;
    margin: 0 0 14px !important;
  }

  .dashboard-mode .dashboard-alert-box,
  .dashboard-mode .dashboard-hero > div:first-child,
  .dashboard-mode .dashboard-user-actions,
  .dashboard-mode .dashboard-date-line,
  .dashboard-mode .dashboard-sync {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    justify-self: auto !important;
  }

  .dashboard-mode .dashboard-alert-box {
    order: 4 !important;
    min-height: 96px !important;
    padding: 12px !important;
    text-align: center !important;
    position: relative !important;
    z-index: 1 !important;
  }

  .dashboard-mode .dashboard-alert-head {
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 30px !important;
    padding: 0 80px !important;
    margin-bottom: 6px !important;
  }

  .dashboard-mode .dashboard-alert-title {
    justify-content: center !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-alert-clear {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .dashboard-mode .dashboard-alert-list {
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 auto !important;
  }

  .dashboard-mode .dashboard-alert-list p {
    grid-template-columns: 14px minmax(0, 1fr) auto !important;
    text-align: left !important;
  }

  .dashboard-mode .dashboard-alert-more {
    max-width: 620px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    order: 1 !important;
  }

  .dashboard-mode .dashboard-user-actions {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(112px, auto) minmax(88px, auto) !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  .dashboard-mode .dashboard-date-line {
    order: 3 !important;
    min-height: 42px !important;
  }

  .dashboard-mode .dashboard-sync {
    order: 5 !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-user-actions .push-toggle,
  .dashboard-mode .dashboard-logout {
    min-height: 38px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
  }

  .dashboard-mode .dashboard-user strong {
    max-width: 100% !important;
    font-size: 12px !important;
  }
}

@media (max-width: 430px) {
  .dashboard-mode .dashboard-user-actions {
    grid-template-columns: minmax(0, 1fr) minmax(108px, auto) !important;
  }

  .dashboard-mode .dashboard-logout {
    grid-column: 1 / -1 !important;
  }
}

/* supersedes the previous mobile order rules */
@media (max-width: 820px) {
  .dashboard-mode .dashboard-alert-box {
    order: 4 !important;
    padding-left: 12px !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    order: 1 !important;
  }

  .dashboard-mode .dashboard-user-actions {
    order: 2 !important;
  }

  .dashboard-mode .dashboard-date-line {
    order: 3 !important;
  }

  .dashboard-mode .dashboard-sync {
    order: 5 !important;
  }
}

/* legacy block kept below for cascade safety */
@media (max-width: 0px) {
  .dashboard-mode .dashboard-alert-box {
    order: 1 !important;
    padding-left: 76px !important;
    min-height: 96px !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    order: 2 !important;
  }

  .dashboard-mode .dashboard-user-actions {
    order: 3 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(112px, auto) minmax(88px, auto) !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  .dashboard-mode .dashboard-date-line {
    order: 4 !important;
    min-height: 42px !important;
  }

  .dashboard-mode .dashboard-sync {
    order: 5 !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-user-actions .push-toggle,
  .dashboard-mode .dashboard-logout {
    min-height: 38px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
  }

  .dashboard-mode .dashboard-user strong {
    max-width: 100% !important;
    font-size: 12px !important;
  }
}

/* FINAL mobile dashboard header/button fix v20260613-0006 */
@media (max-width: 820px) {
  .dashboard-mode .mobile-menu-button {
    top: calc(env(safe-area-inset-top) + 76px) !important;
    left: calc(env(safe-area-inset-left) + 16px) !important;
    z-index: 2147483647 !important;
    width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  .dashboard-mode .dashboard-hero {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding-top: 68px !important;
    padding-left: 0 !important;
    margin-top: 0 !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    order: 1 !important;
    width: 100% !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-hero h1,
  .dashboard-mode .dashboard-lead {
    text-align: center !important;
  }

  .dashboard-mode .dashboard-user-actions {
    order: 2 !important;
  }

  .dashboard-mode .dashboard-date-line {
    order: 3 !important;
  }

  .dashboard-mode .dashboard-alert-box {
    order: 4 !important;
    padding: 12px !important;
  }

  .dashboard-mode .dashboard-sync {
    order: 5 !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-alert-head {
    justify-content: center !important;
    text-align: center !important;
  }
}

@media (max-width: 430px) {
  .dashboard-mode .dashboard-user-actions {
    grid-template-columns: minmax(0, 1fr) minmax(108px, auto) !important;
  }

  .dashboard-mode .dashboard-logout {
    grid-column: 1 / -1 !important;
  }
}

/* FINAL login redesign v20260526-01 */
.auth-shell {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(22px, 4vw, 56px);
  background:
    radial-gradient(circle at 32% 45%, rgba(255, 255, 255, 0.13), transparent 18%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.48)),
    url("./assets/login-bg-desktop.png?v=20260526-01") center / cover no-repeat,
    #030406 !important;
  color: #f8fafc;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-shell::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.36));
}

.auth-shell::after {
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.72);
}

.auth-shell .auth-card {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(560px, 42vw);
  min-width: 420px;
  margin-right: clamp(36px, 7vw, 120px);
  border: 1px solid rgba(226, 232, 240, 0.52);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(14, 17, 23, 0.84), rgba(3, 5, 9, 0.76));
  padding: clamp(42px, 4.7vw, 64px);
  color: #f8fafc;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 32px 80px rgba(255, 255, 255, 0.03),
    0 30px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px) saturate(1.05);
}

.auth-shell .mypage-login h1 {
  margin: 0;
  color: #f8fafc;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Times New Roman", serif;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-align: center;
}

.auth-shell .mypage-login h2 {
  display: none;
}

.auth-shell .login-divider {
  position: relative;
  width: min(270px, 70%);
  height: 28px;
  margin: 10px auto 30px;
}

.auth-shell .login-divider::before,
.auth-shell .login-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 12px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.46));
}

.auth-shell .login-divider::before {
  left: 0;
}

.auth-shell .login-divider::after {
  right: 0;
  transform: scaleX(-1);
}

.auth-shell .login-divider {
  background:
    radial-gradient(circle at 50% 50%, rgba(226, 232, 240, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 46% 50%, rgba(226, 232, 240, 0.62) 0 1px, transparent 2px),
    radial-gradient(circle at 54% 50%, rgba(226, 232, 240, 0.62) 0 1px, transparent 2px);
}

.auth-shell .mypage-login-form {
  gap: 22px;
  margin-top: 0;
}

.auth-shell .mypage-login-form label:not(.remember-login) {
  display: grid;
  gap: 10px;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.auth-shell .mypage-login-form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 64px;
  border: 1px solid rgba(226, 232, 240, 0.28);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(2, 6, 12, 0.46);
  color: #f8fafc;
  padding: 0 22px 0 58px;
  font-size: 16px;
  font-weight: 500;
  outline: none;
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.03),
    0 14px 35px rgba(0, 0, 0, 0.2);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-shell .mypage-login-form label:nth-child(1),
.auth-shell .mypage-login-form label:nth-child(2) {
  position: relative;
}

.auth-shell .mypage-login-form label:nth-child(1)::after,
.auth-shell .mypage-login-form label:nth-child(2)::after {
  position: absolute;
  left: 22px;
  bottom: 19px;
  color: rgba(226, 232, 240, 0.62);
  font-size: 24px;
  line-height: 1;
}

.auth-shell .mypage-login-form label:nth-child(1)::after {
  content: "♙";
}

.auth-shell .mypage-login-form label:nth-child(2)::after {
  content: "▢";
}

.auth-shell .mypage-login-form input:not([type="checkbox"])::placeholder {
  color: rgba(226, 232, 240, 0.48);
}

.auth-shell .mypage-login-form input:not([type="checkbox"]):focus {
  border-color: rgba(248, 250, 252, 0.74);
  background: rgba(8, 12, 20, 0.7);
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(248, 250, 252, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.3);
}

.auth-shell .remember-login {
  justify-content: flex-start;
  margin-top: -4px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 13px;
  font-weight: 500;
}

.auth-shell .remember-login input {
  accent-color: #e5e7eb;
}

.auth-shell .mypage-login-form button[type="submit"] {
  min-height: 62px;
  margin-top: 2px;
  border: 1px solid rgba(248, 250, 252, 0.64);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(5, 7, 11, 0.78);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow:
    inset 0 0 26px rgba(255, 255, 255, 0.06),
    0 15px 34px rgba(0, 0, 0, 0.36);
}

.auth-shell .mypage-login-form button[type="submit"]:hover {
  border-color: #fff;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.28), transparent 36%),
    rgba(18, 21, 28, 0.88);
}

.auth-shell .forgot-password {
  position: relative;
  margin: 28px auto 0;
  padding-top: 34px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.auth-shell .forgot-password::before,
.auth-shell .forgot-password::after {
  content: "";
  position: absolute;
  top: 14px;
  width: calc(50% - 20px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.38));
}

.auth-shell .forgot-password::before {
  left: 0;
}

.auth-shell .forgot-password::after {
  right: 0;
  transform: scaleX(-1);
}

.auth-shell .form-message {
  margin-top: 14px;
  color: #fca5a5;
  text-align: center;
  font-weight: 600;
}

@media (max-width: 980px) {
  .auth-shell {
    place-items: end center;
    padding: 42vh 18px 26px;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.68)),
      url("./assets/login-bg-mobile.png?v=20260526-01") center top / cover no-repeat,
      #030406 !important;
  }

  .auth-shell .auth-card {
    justify-self: center;
    width: min(680px, 100%);
    min-width: 0;
    margin: 0;
    border-radius: 22px;
    padding: clamp(28px, 7vw, 48px);
  }
}

@media (max-width: 520px) {
  .auth-shell {
    padding: 38vh 14px 18px;
  }

  .auth-shell .auth-card {
    border-radius: 18px;
    padding: 24px 22px;
  }

  .auth-shell .mypage-login h1 {
    font-size: 20px;
  }

  .auth-shell .login-divider {
    margin-bottom: 20px;
  }

  .auth-shell .mypage-login-form {
    gap: 16px;
  }

  .auth-shell .mypage-login-form label:not(.remember-login) {
    font-size: 14px;
  }

  .auth-shell .mypage-login-form input:not([type="checkbox"]),
  .auth-shell .mypage-login-form button[type="submit"] {
    min-height: 54px;
    font-size: 14px;
  }

  .auth-shell .forgot-password {
    margin-top: 18px;
    padding-top: 26px;
  }
}

/* FINAL login background/logo v20260526-02 */
.auth-shell {
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 560px) !important;
  gap: clamp(28px, 6vw, 92px) !important;
  place-items: center !important;
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.1), transparent 20%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.54)),
    url("./assets/login-bg-clean.png?v=20260526-02") center / cover no-repeat,
    #030406 !important;
}

.auth-logo-panel {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 12px;
  width: min(560px, 38vw);
  justify-self: center;
  filter:
    drop-shadow(0 34px 46px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 28px rgba(255, 255, 255, 0.12));
}

.auth-logo-panel img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 52vh;
  object-fit: contain;
}

.auth-shell .auth-card {
  justify-self: center !important;
  width: min(560px, 100%) !important;
  min-width: 0 !important;
  margin: 0 !important;
  background:
    linear-gradient(145deg, rgba(12, 15, 20, 0.82), rgba(3, 5, 9, 0.72)) !important;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-content: center !important;
    gap: 20px !important;
    padding: 26px 18px !important;
    background:
      radial-gradient(circle at 44% 20%, rgba(255, 255, 255, 0.1), transparent 20%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58)),
      url("./assets/login-bg-clean.png?v=20260526-02") center / cover no-repeat,
      #030406 !important;
  }

  .auth-logo-panel {
    width: min(420px, 72vw);
  }

  .auth-logo-panel img {
    max-height: 28vh;
  }
}

@media (max-width: 520px) {
  .auth-shell {
    padding: 18px 14px !important;
    gap: 14px !important;
  }

  .auth-logo-panel {
    width: min(340px, 82vw);
  }

  .auth-logo-panel img {
    max-height: 24vh;
  }
}

/* FINAL login card closer to reference v20260526-03 */
.auth-shell {
  grid-template-columns: minmax(360px, 0.92fr) minmax(560px, 0.9fr) !important;
  gap: clamp(58px, 7.5vw, 128px) !important;
  padding: clamp(34px, 5vw, 82px) clamp(54px, 7vw, 120px) !important;
}

.auth-logo-panel {
  width: min(620px, 40vw) !important;
  transform: translateX(1vw) translateY(1vh);
}

.auth-shell .auth-card {
  width: min(640px, 100%) !important;
  min-height: 560px !important;
  display: grid !important;
  align-content: center !important;
  border: 1px solid rgba(226, 232, 240, 0.62) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.09), transparent 30%),
    linear-gradient(145deg, rgba(9, 12, 17, 0.66), rgba(2, 4, 8, 0.5)) !important;
  padding: clamp(52px, 5vw, 72px) clamp(54px, 5.6vw, 82px) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 44px 90px rgba(255, 255, 255, 0.025),
    0 38px 100px rgba(0, 0, 0, 0.36) !important;
}

.auth-shell .mypage-login h1 {
  font-size: 23px !important;
  letter-spacing: 0.22em !important;
  margin-bottom: 2px !important;
}

.auth-shell .login-divider {
  width: min(320px, 76%) !important;
  height: 28px !important;
  margin: 8px auto 32px !important;
}

.auth-shell .mypage-login-form {
  gap: 24px !important;
}

.auth-shell .mypage-login-form label:not(.remember-login) {
  gap: 11px !important;
  font-size: 16px !important;
  font-weight: 460 !important;
}

.auth-shell .mypage-login-form input:not([type="checkbox"]) {
  min-height: 68px !important;
  border-color: rgba(226, 232, 240, 0.3) !important;
  border-radius: 13px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014)),
    rgba(7, 10, 15, 0.48) !important;
  padding-left: 62px !important;
  box-shadow:
    inset 0 0 30px rgba(255, 255, 255, 0.026),
    inset 0 -18px 32px rgba(0, 0, 0, 0.16),
    0 18px 42px rgba(0, 0, 0, 0.22) !important;
}

.auth-shell .mypage-login-form label:nth-child(1)::after,
.auth-shell .mypage-login-form label:nth-child(2)::after {
  left: 24px !important;
  bottom: 21px !important;
  font-size: 23px !important;
  opacity: 0.85;
}

.auth-shell .mypage-login-form label:nth-child(1)::after {
  content: "♙" !important;
}

.auth-shell .mypage-login-form label:nth-child(2)::after {
  content: "□" !important;
}

.auth-shell .remember-login {
  margin-top: -7px !important;
  margin-bottom: -2px !important;
}

.auth-shell .mypage-login-form button[type="submit"] {
  min-height: 66px !important;
  margin-top: 6px !important;
  border-radius: 9px !important;
  border-color: rgba(248, 250, 252, 0.68) !important;
  background:
    radial-gradient(circle at 50% -18%, rgba(255, 255, 255, 0.3), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.018)),
    rgba(5, 7, 11, 0.72) !important;
  font-size: 19px !important;
  font-weight: 560 !important;
  letter-spacing: 0.09em !important;
}

.auth-shell .forgot-password {
  margin-top: 30px !important;
  padding-top: 34px !important;
  font-size: 14px !important;
}

@media (max-width: 1120px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    padding: 28px 18px !important;
    gap: 22px !important;
  }

  .auth-logo-panel {
    width: min(430px, 72vw) !important;
    transform: none !important;
  }

  .auth-logo-panel img {
    max-height: 27vh !important;
  }

  .auth-shell .auth-card {
    width: min(650px, 100%) !important;
    min-height: 0 !important;
    padding: clamp(30px, 7vw, 52px) clamp(24px, 7vw, 58px) !important;
  }
}

@media (max-width: 520px) {
  .auth-shell .auth-card {
    border-radius: 18px !important;
    padding: 26px 22px !important;
  }

  .auth-shell .mypage-login h1 {
    font-size: 19px !important;
  }

  .auth-shell .mypage-login-form input:not([type="checkbox"]),
  .auth-shell .mypage-login-form button[type="submit"] {
    min-height: 56px !important;
  }
}

/* FINAL login square card v20260526-04 */
.auth-shell {
  grid-template-columns: minmax(420px, 0.95fr) minmax(610px, 0.9fr) !important;
  gap: clamp(68px, 8vw, 142px) !important;
}

.auth-shell .auth-card {
  width: min(650px, 100%) !important;
  min-height: 535px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(226, 232, 240, 0.58) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.075), transparent 28%),
    linear-gradient(145deg, rgba(12, 15, 20, 0.56), rgba(2, 4, 8, 0.44)) !important;
  padding: 54px 66px 50px !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 42px 90px rgba(255, 255, 255, 0.018),
    0 28px 74px rgba(0, 0, 0, 0.3) !important;
}

.auth-shell .mypage-login h1 {
  font-size: 22px !important;
  font-weight: 460 !important;
  letter-spacing: 0.24em !important;
}

.auth-shell .login-divider {
  width: 315px !important;
  margin: 8px auto 30px !important;
}

.auth-shell .mypage-login-form {
  gap: 23px !important;
}

.auth-shell .mypage-login-form input:not([type="checkbox"]) {
  min-height: 58px !important;
  border-radius: 10px !important;
  border-color: rgba(226, 232, 240, 0.25) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.01)),
    rgba(7, 10, 15, 0.43) !important;
  box-shadow:
    inset 0 0 22px rgba(255, 255, 255, 0.018),
    inset 0 -14px 26px rgba(0, 0, 0, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.18) !important;
}

.auth-shell .mypage-login-form label:nth-child(1)::after,
.auth-shell .mypage-login-form label:nth-child(2)::after {
  bottom: 16px !important;
}

.auth-shell .mypage-login-form button[type="submit"] {
  min-height: 58px !important;
  border-radius: 7px !important;
  margin-top: 2px !important;
  font-size: 18px !important;
  font-weight: 520 !important;
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.092), rgba(255, 255, 255, 0.012)),
    rgba(5, 7, 11, 0.68) !important;
}

.auth-shell .forgot-password {
  margin-top: 27px !important;
}

@media (max-width: 1120px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .auth-shell .auth-card {
    width: min(650px, 100%) !important;
    min-height: 0 !important;
    border-radius: 14px !important;
    padding: clamp(30px, 7vw, 52px) clamp(24px, 7vw, 58px) !important;
  }
}

@media (max-width: 520px) {
  .auth-shell .auth-card {
    border-radius: 12px !important;
  }
}

/* FINAL schedule controls/delete/login cleanup v20260526-05 */
.sidebar > .filter-panel {
  display: none !important;
}

.auth-shell .forgot-password {
  display: none !important;
}

.toolbar-month-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.toolbar-month-control input[type="month"] {
  min-height: 34px;
  width: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
  font: inherit;
}

.table-toolbar .segmented-control,
.stall-shift-toolbar .segmented-control {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .table-toolbar,
  .stall-shift-toolbar {
    align-items: stretch;
  }

  .schedule-create-actions {
    width: 100%;
  }

  .schedule-create-actions button {
    flex: 1 1 0;
  }

  .schedule-bulk-popup {
    padding: 10px;
  }

  .schedule-bulk-card {
    max-height: 92vh;
    padding: 14px;
  }

  .schedule-bulk-fields {
    grid-template-columns: 1fr;
  }

  .schedule-bulk-site-picker {
    max-height: 260px;
  }

  .schedule-bulk-preview-row,
  .schedule-bulk-preview-row.is-error {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .schedule-bulk-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .toolbar-month-control {
    justify-content: space-between;
    width: 100%;
  }

  .toolbar-month-control input[type="month"] {
    width: min(180px, 60%);
  }
}

/* FINAL demo mode v20260526-06 */
.auth-shell .demo-mode-login {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: rgba(244, 247, 251, 0.82);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.auth-shell .demo-mode-login input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #f5f7fb;
}

.demo-money-input,
input.demo-money-input:disabled {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  background: #f8fafc;
  opacity: 1;
}

/* FINAL B SYSTEM typewriter v20260526-08 */
.system-typewriter {
  position: relative;
  display: inline-block;
  width: 17ch;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Times New Roman", serif;
  letter-spacing: 0.055em;
  animation: systemTypewriter 5.6s steps(17, end) infinite;
}

.system-typewriter::after {
  content: "";
  position: absolute;
  top: 12%;
  right: 0;
  width: 2px;
  height: 76%;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, currentColor 22% 78%, transparent);
  box-shadow: 0 0 12px currentColor;
  animation: systemCaretBlink 0.82s steps(1, end) infinite;
}

.auth-shell .system-typewriter {
  display: block;
  margin: -10px auto 6px;
  color: rgba(248, 250, 252, 0.88);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.auth-logo-panel .auth-logo-typewriter {
  margin: -10px auto 0;
  color: rgba(248, 250, 252, 0.9);
  font-size: clamp(15px, 1.25vw, 22px);
  font-weight: 520;
  text-shadow:
    0 0 16px rgba(255, 255, 255, 0.28),
    0 8px 26px rgba(0, 0, 0, 0.62);
}

.dashboard-menu-card .system-typewriter {
  color: rgba(255, 255, 255, 0.92);
}

/* FINAL typewriter position and stall shift toolbar v20260526-10 */
.auth-logo-panel {
  align-content: center;
  gap: 0 !important;
}

.auth-logo-panel .auth-logo-typewriter {
  margin: clamp(-54px, -4.1vw, -28px) auto 0 !important;
  font-size: clamp(24px, 2.25vw, 36px) !important;
  letter-spacing: 0.075em;
}

.stall-shift-toolbar {
  justify-content: flex-start !important;
  text-align: left !important;
}

.stall-shift-toolbar .toolbar-month-control {
  order: 3;
  flex: 0 0 auto;
  width: auto;
}

.stall-shift-toolbar .toolbar-metrics {
  position: static !important;
  right: auto !important;
  margin-left: 0;
}

@media (max-width: 720px) {
  .auth-logo-panel .auth-logo-typewriter {
    margin-top: clamp(-34px, -7vw, -18px) !important;
    font-size: clamp(18px, 5vw, 25px) !important;
  }

  .stall-shift-toolbar .toolbar-month-control {
    width: 100%;
  }
}

/* FINAL dashboard detail and typewriter width v20260526-11 */
.system-typewriter {
  width: 18.6ch !important;
  padding-right: 0.35ch;
  animation-name: systemTypewriterWide !important;
}

.dashboard-mode .dashboard-schedule-list p {
  min-height: 0 !important;
  align-content: start !important;
}

.dashboard-mode .dashboard-schedule-list span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
}

@keyframes systemTypewriterWide {
  0%,
  10% {
    width: 0;
    opacity: 0.42;
  }

  38%,
  66% {
    width: 18.6ch;
    opacity: 1;
  }

  82%,
  100% {
    width: 0;
    opacity: 0.52;
  }
}

@keyframes systemTypewriter {
  0%,
  10% {
    width: 0;
    opacity: 0.42;
  }

  38%,
  66% {
    width: 17ch;
    opacity: 1;
  }

  82%,
  100% {
    width: 0;
    opacity: 0.52;
  }
}

@keyframes systemCaretBlink {
  0%,
  48% {
    opacity: 1;
  }

  49%,
  100% {
    opacity: 0;
  }
}

/* FINAL login typewriter actual animation v20260526-12 */
.system-typewriter {
  width: auto !important;
  max-width: 0;
  padding-right: 0.55ch;
  animation: systemTypewriterReveal 5.8s steps(17, end) infinite !important;
}

.auth-logo-panel .auth-logo-typewriter {
  min-width: 0;
  max-width: 0;
  overflow: hidden;
}

@keyframes systemTypewriterReveal {
  0%,
  9% {
    max-width: 0;
    opacity: 0.42;
  }

  40%,
  67% {
    max-width: 22.5ch;
    opacity: 1;
  }

  84%,
  100% {
    max-width: 0;
    opacity: 0.52;
  }
}

/* FINAL typewriter reset clean v20260526-13 */
.system-typewriter {
  width: 0 !important;
  max-width: none !important;
  box-sizing: content-box;
  padding-right: 0 !important;
  animation: systemTypewriterClean 5.8s steps(17, end) infinite !important;
}

.system-typewriter::after {
  right: -0.42ch;
}

@keyframes systemTypewriterClean {
  0%,
  9% {
    width: 0;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  40%,
  67% {
    width: 18.9ch;
    opacity: 1;
  }

  84% {
    width: 0;
    opacity: 1;
  }

  85%,
  100% {
    width: 0;
    opacity: 0;
  }
}

/* FINAL restored nested typewriter v20260526-14 */
.system-typewriter {
  display: inline-block !important;
  width: 0 !important;
  max-width: none !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  padding-right: 0.42ch !important;
  opacity: 1 !important;
  animation: systemTypewriterNested 5.8s steps(17, end) infinite !important;
}

.system-typewriter > span {
  display: inline-block;
  width: max-content;
}

.system-typewriter::after {
  right: 0 !important;
}

@keyframes systemTypewriterNested {
  0%,
  9% {
    width: 0;
  }

  40%,
  67% {
    width: 19.8ch;
  }

  84%,
  100% {
    width: 0;
  }
}

/* FINAL visible login logo typewriter v20260526-15 */
.auth-logo-panel .login-logo-typewriter {
  position: relative !important;
  z-index: 5 !important;
  display: block !important;
  width: max-content !important;
  max-width: none !important;
  margin: clamp(-36px, -2.8vw, -18px) auto 0 !important;
  overflow: visible !important;
  color: rgba(255, 255, 255, 0.96) !important;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Times New Roman", serif !important;
  font-size: clamp(25px, 2.35vw, 38px) !important;
  font-weight: 560 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.15 !important;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.4),
    0 8px 28px rgba(0, 0, 0, 0.86) !important;
}

.auth-logo-panel .login-logo-typewriter::before {
  content: "Management System";
  position: absolute;
  inset: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.96);
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.4),
    0 8px 28px rgba(0, 0, 0, 0.86);
  animation: loginLogoTypewriter 5.6s steps(17, end) infinite;
}

.auth-logo-panel .login-logo-typewriter {
  color: transparent !important;
  -webkit-text-stroke: 0 transparent;
}

.auth-logo-panel .login-logo-typewriter::after {
  content: "";
  position: absolute;
  top: 8%;
  left: 0;
  width: 2px;
  height: 84%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.8);
  animation: loginLogoCaret 5.6s steps(17, end) infinite, systemCaretBlink 0.82s steps(1, end) infinite;
}

@keyframes loginLogoTypewriter {
  0%,
  8% {
    width: 0;
  }

  42%,
  68% {
    width: 100%;
  }

  86%,
  100% {
    width: 0;
  }
}

@keyframes loginLogoCaret {
  0%,
  8% {
    left: 0;
  }

  42%,
  68% {
    left: 100%;
  }

  86%,
  100% {
    left: 0;
  }
}

/* FINAL clean typewriter shared v20260526-16 */
.clean-typewriter {
  position: relative !important;
  display: inline-block !important;
  width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  white-space: nowrap !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

.clean-typewriter::before {
  content: attr(aria-label);
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-shadow: none;
  animation: cleanTypewriterText 5.4s steps(17, end) infinite;
}

.clean-typewriter::after {
  content: "";
  position: absolute;
  top: 10%;
  left: 0;
  width: 2px;
  height: 80%;
  border-radius: 999px;
  background: currentColor;
  box-shadow: none;
  animation: cleanTypewriterCaret 5.4s steps(17, end) infinite, cleanCaretBlink 0.78s steps(1, end) infinite;
}

.auth-logo-panel .login-logo-typewriter {
  margin: clamp(-36px, -2.8vw, -18px) auto 0 !important;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Times New Roman", serif !important;
  font-size: clamp(25px, 2.35vw, 38px) !important;
  font-weight: 560 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.15 !important;
}

.auth-logo-panel .login-logo-typewriter::after,
.auth-logo-panel .login-logo-typewriter::before {
  color: rgba(255, 255, 255, 0.96) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.96) !important;
}

.dashboard-menu-card .dashboard-menu-typewriter {
  margin-top: 2px !important;
  color: transparent !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  letter-spacing: 0.02em !important;
}

.dashboard-menu-card .dashboard-menu-typewriter::before,
.dashboard-menu-card .dashboard-menu-typewriter::after {
  color: rgba(255, 255, 255, 0.94) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.94) !important;
}

@keyframes cleanTypewriterText {
  0%,
  8% {
    width: 0;
  }

  42%,
  68% {
    width: 100%;
  }

  86%,
  100% {
    width: 0;
  }
}

@keyframes cleanTypewriterCaret {
  0%,
  8% {
    left: 0;
  }

  42%,
  68% {
    left: 100%;
  }

  86%,
  100% {
    left: 0;
  }
}

@keyframes cleanCaretBlink {
  0%,
  48% {
    opacity: 1;
  }

  49%,
  100% {
    opacity: 0;
  }
}

/* FINAL login typewriter blur cleanup v20260526-17 */
.auth-logo-panel .clean-typewriter.login-logo-typewriter {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  filter: none !important;
}

.auth-logo-panel .clean-typewriter.login-logo-typewriter::before {
  color: rgba(255, 255, 255, 0.97) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.97) !important;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.62),
    0 0 5px rgba(255, 255, 255, 0.18) !important;
}

.auth-logo-panel .clean-typewriter.login-logo-typewriter::after {
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.28) !important;
}

/* FINAL staff time matching and sidebar typewriter fit v20260526-20 */
.dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter {
  display: block !important;
  width: min(100%, 17.5ch) !important;
  max-width: 100% !important;
  overflow: hidden !important;
  font-size: 14px !important;
  font-weight: 620 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.25 !important;
}

.dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter::before {
  max-width: 100% !important;
}

.dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter::after {
  height: 72% !important;
}

/* FINAL mobile login logo lower v20260526-18 */
@media (max-width: 720px) {
  .auth-shell .auth-logo-panel {
    transform: translateY(34px) !important;
    margin-bottom: 22px !important;
  }
}

@media (max-width: 420px) {
  .auth-shell .auth-logo-panel {
    transform: translateY(44px) !important;
    margin-bottom: 30px !important;
  }
}

/* FINAL schedule/sidebar typewriter full text v20260526-21 */
.dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter {
  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  padding-right: 0.65ch !important;
  box-sizing: content-box !important;
  font-size: 14px !important;
  font-weight: 620 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.25 !important;
}

.dashboard-mode .dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter {
  font-size: 16px !important;
  font-weight: 620 !important;
  letter-spacing: 0.01em !important;
}

.dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter::before {
  max-width: none !important;
  padding-right: 0.65ch !important;
  box-sizing: content-box !important;
}

.dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter::after {
  height: 72% !important;
  transform: translateX(0.25ch);
}

/* FINAL clean typewriter no leading ghost v20260526-22 */
.clean-typewriter {
  overflow: visible !important;
}

.clean-typewriter::before {
  width: 0 !important;
  max-width: none !important;
  padding-right: 0 !important;
  box-sizing: content-box !important;
  animation: cleanTypewriterNoGhost 5.6s steps(17, end) infinite !important;
}

.clean-typewriter::after {
  animation: cleanTypewriterCaretNoGhost 5.6s steps(17, end) infinite, cleanCaretBlink 0.78s steps(1, end) infinite !important;
}

.auth-logo-panel .clean-typewriter.login-logo-typewriter,
.dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter {
  width: max-content !important;
  min-width: max-content !important;
  padding-right: 0.65ch !important;
  overflow: visible !important;
}

.auth-logo-panel .clean-typewriter.login-logo-typewriter::before,
.dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter::before {
  width: 0 !important;
  padding-right: 0 !important;
}

@keyframes cleanTypewriterNoGhost {
  0%,
  8% {
    width: 0;
    opacity: 0;
  }

  9% {
    width: 0;
    opacity: 1;
  }

  42%,
  72% {
    width: 100%;
    opacity: 1;
  }

  73%,
  100% {
    width: 0;
    opacity: 0;
  }
}

@keyframes cleanTypewriterCaretNoGhost {
  0%,
  8% {
    left: 0;
    opacity: 0;
  }

  9% {
    left: 0;
    opacity: 1;
  }

  42%,
  72% {
    left: 100%;
    opacity: 1;
  }

  73%,
  100% {
    left: 0;
    opacity: 0;
  }
}

/* FINAL visible typewriter without first-letter ghost v20260526-23 */
.clean-typewriter {
  position: relative !important;
  display: inline-block !important;
  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  padding-right: 0.75ch !important;
  white-space: nowrap !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.clean-typewriter::before {
  content: attr(aria-label) !important;
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  overflow: visible !important;
  white-space: nowrap !important;
  clip-path: inset(0 100% 0 0);
  animation: cleanTypewriterClip 5.6s steps(17, end) infinite !important;
}

.clean-typewriter::after {
  content: "" !important;
  position: absolute !important;
  top: 10% !important;
  left: 0 !important;
  width: 2px !important;
  height: 80% !important;
  border-radius: 999px !important;
  animation: cleanTypewriterClipCaret 5.6s steps(17, end) infinite, cleanCaretBlink 0.78s steps(1, end) infinite !important;
}

.auth-logo-panel .clean-typewriter.login-logo-typewriter::before,
.auth-logo-panel .clean-typewriter.login-logo-typewriter::after {
  color: rgba(255, 255, 255, 0.97) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.97) !important;
}

.dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter::before,
.dashboard-menu-card .clean-typewriter.dashboard-menu-typewriter::after {
  color: rgba(255, 255, 255, 0.94) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.94) !important;
}

@keyframes cleanTypewriterClip {
  0%,
  8% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }

  9% {
    clip-path: inset(0 100% 0 0);
    opacity: 1;
  }

  42%,
  72% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }

  73%,
  100% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
}

@keyframes cleanTypewriterClipCaret {
  0%,
  8% {
    left: 0;
    opacity: 0;
  }

  9% {
    left: 0;
    opacity: 1;
  }

  42%,
  72% {
    left: 100%;
    opacity: 1;
  }

  73%,
  100% {
    left: 0;
    opacity: 0;
  }
}

/* FINAL JS driven typewriter restore v20260526-24 */
.clean-typewriter.js-typewriter {
  position: relative !important;
  display: inline-block !important;
  width: 18.8ch !important;
  min-width: 18.8ch !important;
  max-width: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
  white-space: nowrap !important;
  color: rgba(255, 255, 255, 0.96) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.96) !important;
  text-align: left !important;
}

.clean-typewriter.js-typewriter::before {
  content: none !important;
  display: none !important;
  animation: none !important;
}

.clean-typewriter.js-typewriter::after {
  content: "" !important;
  position: static !important;
  display: inline-block !important;
  width: 2px !important;
  height: 0.92em !important;
  margin-left: 2px !important;
  border-radius: 999px !important;
  vertical-align: -0.11em !important;
  background: currentColor !important;
  box-shadow: none !important;
  transform: none !important;
  animation: cleanCaretBlink 0.78s steps(1, end) infinite !important;
}

.auth-logo-panel .clean-typewriter.js-typewriter.login-logo-typewriter {
  width: 18.8ch !important;
  min-width: 18.8ch !important;
  margin-left: auto !important;
  margin-right: auto !important;
  color: rgba(255, 255, 255, 0.97) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.97) !important;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.62),
    0 0 5px rgba(255, 255, 255, 0.18) !important;
}

.dashboard-menu-card .clean-typewriter.js-typewriter.dashboard-menu-typewriter {
  display: block !important;
  width: 18.8ch !important;
  min-width: 18.8ch !important;
  max-width: calc(100% - 4px) !important;
  color: rgba(255, 255, 255, 0.94) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.94) !important;
}

/* FINAL master list page v20260526-27 */
.master-list-page {
  min-height: calc(100vh - 150px);
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid #e5eaf3;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(219, 234, 254, 0.78), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.08);
}

.master-list-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.master-list-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: #111827;
  font-size: 26px;
  font-weight: 760;
}

.master-list-head h2 span {
  color: #64748b;
  font-size: 21px;
}

.master-list-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 520;
}

.master-list-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: min(320px, 100%);
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.master-list-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #0f172a;
  font: inherit;
}

.master-list-add-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1.2fr) minmax(120px, 0.7fr) minmax(150px, 0.85fr);
  gap: 12px;
  align-items: end;
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.master-list-add-title {
  display: grid;
  gap: 4px;
}

.master-list-add-title strong {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

.master-list-add-title span {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.master-list-add-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.master-list-add-form input,
.master-list-add-form select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  padding: 0 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.master-list-add-form select {
  appearance: auto;
}

.master-list-add-wide {
  grid-column: span 2;
}

.master-list-add-form button[type="submit"] {
  min-height: 40px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.master-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 20px;
}

.master-link-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 286px;
  padding: 24px;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.master-link-delete {
  justify-self: center;
  min-height: 32px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff5f5;
  color: #dc2626;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.master-link-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: var(--master-card-color);
  color: var(--master-card-accent);
  font-size: 27px;
  font-weight: 800;
}

.master-link-card h3 {
  margin: 0;
  color: #111827;
  font-size: 17px;
  font-weight: 720;
}

.master-link-card p {
  min-height: 38px;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.master-link-rows {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
  text-align: left;
}

.master-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.master-link-row strong {
  display: block;
  color: #334155;
  font-size: 12px;
}

.master-link-row a:not(.master-open-button) {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #2563eb;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-password {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.master-password-label {
  display: inline-flex;
  align-items: center;
  color: #64748b;
  font-style: normal;
  font-weight: 700;
}

.master-password code,
.master-password-value {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid #dbe3f0;
  border-radius: 10px 0 0 10px;
  background: #f8fbff;
  color: #0f172a;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.master-password.is-visible code {
  border-color: #fecaca;
  background: #fff5f5;
  color: #dc2626;
}

.master-password.is-empty {
  color: #94a3b8;
}

.master-link-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.master-open-button {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
}

.master-open-button {
  padding: 0 12px;
}

.master-eye-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 28px;
  min-height: 28px;
  margin-left: -8px;
  border: 1px solid #dbe3f0;
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  color: #475569;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.master-eye-button:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.master-eye-button:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.master-eye-button svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.master-eye-button svg circle {
  fill: currentColor;
  stroke: none;
}

.master-eye-button.is-open {
  border-color: #fecaca;
  background: #fff5f5;
  color: #dc2626;
}

.master-list-note {
  display: grid;
  gap: 8px;
  margin-top: 26px;
  padding: 18px 22px;
  border-radius: 8px;
  background: #eef6ff;
  color: #475569;
  font-size: 13px;
}

.master-list-note strong {
  color: #334155;
  font-size: 14px;
}

.dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="masterList"] .nav-icon::before { content: "▱"; }
.dashboard-mode .dashboard-nav-tabs [data-dashboard-icon="masterList"] .nav-icon {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
}

.invoice-page {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.invoice-toolbar,
.invoice-toolbar-actions,
.invoice-line-head,
.invoice-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.invoice-toolbar h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.invoice-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.invoice-title-row h2 {
  margin: 0;
}

.invoice-view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.invoice-view-toggle button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.invoice-view-toggle button.active {
  background: #0f6b7d;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 107, 125, 0.18);
}

.invoice-toolbar p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.invoice-toolbar-actions label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.invoice-toolbar-actions input,
.invoice-toolbar-actions select,
.invoice-form-grid input,
.invoice-form-grid textarea {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

.invoice-toolbar-actions input,
.invoice-toolbar-actions select {
  min-height: 36px;
  padding: 0 10px;
}

.invoice-pdf-scale-label input {
  width: 84px;
}

.invoice-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.invoice-history-panel,
.invoice-editor {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.invoice-history-panel {
  overflow: hidden;
  padding: 0;
}

.invoice-history-head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #334155;
}

.invoice-history-head span {
  color: #64748b;
  font-size: 12px;
}

.invoice-history-list {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.invoice-history-filter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.invoice-history-filter label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.invoice-history-filter label > span {
  display: block;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  white-space: normal;
}

.invoice-history-filter select {
  width: 100%;
  min-height: 36px;
  padding: 0 34px 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.invoice-history-filter strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}

.invoice-history-filter-bottom {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.invoice-history-filter-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  justify-items: stretch;
}

.invoice-history-bulk-pdf {
  min-height: 34px;
  padding: 0 6px;
  border: 1px solid #0f766e;
  border-radius: 6px;
  background: #0f6b7d;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1.15;
  white-space: normal;
}

.invoice-history-bulk-pdf:hover:not(:disabled) {
  background: #115e59;
  box-shadow: 0 6px 14px rgba(15, 107, 125, 0.2);
}

.invoice-history-bulk-pdf:disabled {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.invoice-history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.invoice-history-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.invoice-history-tabs button span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.invoice-history-tabs button.active,
.invoice-history-tabs button:hover {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.invoice-history-tabs button.active span,
.invoice-history-tabs button:hover span {
  color: #dbeafe;
}

.invoice-history-items {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.invoice-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.invoice-history-item:last-child {
  border-bottom: 0;
}

.invoice-history-record {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 68px;
  padding: 11px 12px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.invoice-history-item.active,
.invoice-history-item:hover {
  background: #f8fbff;
}

.invoice-history-item.active .invoice-history-record {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.invoice-history-record-main,
.invoice-history-record-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.invoice-history-record-main strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.invoice-history-record-meta span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.invoice-history-delete {
  justify-self: center;
  width: 36px;
  min-height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.invoice-history-delete:hover {
  border-color: #fecaca;
  background: #fee2e2;
}

.invoice-amount-panel {
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.invoice-amount-page {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.invoice-amount-page .invoice-amount-list {
  padding: 16px;
}

.invoice-amount-page .invoice-amount-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.invoice-amount-page .invoice-amount-corps {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.invoice-amount-page .invoice-amount-rows {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.invoice-amount-list {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.invoice-amount-summary {
  display: grid;
  gap: 8px;
}

.invoice-amount-summary article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.invoice-amount-summary span,
.invoice-amount-summary small,
.invoice-amount-corp span,
.invoice-amount-row small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.invoice-amount-summary strong {
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.1;
}

.invoice-amount-corps,
.invoice-amount-groups,
.invoice-amount-rows {
  display: grid;
  gap: 6px;
}

.invoice-amount-corp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: #eff6ff;
}

.invoice-amount-corp strong {
  min-width: 0;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.invoice-amount-groups {
  gap: 12px;
}

.invoice-amount-corp-block {
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.invoice-amount-corp-head {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #dbe3ef;
  background: #f8fafc;
}

.invoice-amount-corp-head > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.invoice-amount-corp-head strong {
  min-width: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.invoice-amount-corp-head span {
  flex-shrink: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.invoice-amount-corp-head dl {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

.invoice-amount-corp-head dl div {
  display: grid;
  min-width: 90px;
  gap: 2px;
  text-align: right;
}

.invoice-amount-corp-head dt {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.invoice-amount-corp-head dd {
  margin: 0;
  color: #0f6b7d;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.invoice-amount-corp-block .invoice-amount-rows {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  padding: 10px;
}

.invoice-amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.invoice-amount-row:hover {
  border-color: #7dd3fc;
  background: #f0f9ff;
  box-shadow: 0 8px 18px rgba(14, 116, 144, 0.12);
}

.invoice-amount-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.invoice-amount-row strong {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.invoice-amount-row em {
  color: #0f6b7d;
  font-size: 14px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.invoice-amount-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.invoice-amount-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, calc(100vw - 32px));
  height: min(92vh, 980px);
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #e7edf5;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.invoice-amount-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #dbe3ef;
  background: #fff;
}

.invoice-amount-preview-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.invoice-amount-preview-actions {
  display: flex !important;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px !important;
}

.invoice-amount-preview-head strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-amount-preview-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.invoice-amount-preview-body {
  overflow: auto;
  padding: 18px;
}

.invoice-amount-preview-body .invoice-paper {
  min-height: auto;
}

.invoice-workspace {
  display: grid;
  gap: 18px;
}

.invoice-editor {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.invoice-paper-actions {
  position: sticky;
  top: 12px;
  z-index: 2;
}

.invoice-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.invoice-form-grid label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.invoice-form-grid label.wide {
  grid-column: span 2;
}

.invoice-form-grid input,
.invoice-form-grid textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
}

.invoice-form-grid textarea {
  resize: vertical;
}

.invoice-line-head strong {
  color: #334155;
}

.invoice-line-head div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-add-section {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #d6e0ed;
  border-radius: 7px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.invoice-add-section select,
.invoice-row-section select {
  min-height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 800;
}

.invoice-add-section select {
  min-width: 96px;
  padding: 4px 8px;
}

.invoice-item-editor {
  min-width: 760px;
}

.invoice-item-editor th:first-child {
  width: 44%;
}

.invoice-preview {
  overflow: auto;
  padding: 18px;
  border-radius: 8px;
  background: #e7edf5;
}

.invoice-paper {
  box-sizing: border-box;
  width: min(794px, 100%);
  max-width: 100%;
  min-height: 1120px;
  margin: 0 auto;
  padding: 46px 50px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
}

.invoice-paper h1 {
  margin: 0 0 34px;
  text-align: center;
  font-size: 30px;
  letter-spacing: 0.08em;
}

.invoice-paper-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  font-family: Inter, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.invoice-paper-meta label {
  display: grid;
  gap: 5px;
}

.invoice-paper-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(239, 246, 255, 0.64);
  color: #111827;
  font: inherit;
}

.invoice-paper-input:hover,
.invoice-paper-input:focus {
  border-color: #93c5fd;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.24);
}

.invoice-paper-input.num {
  text-align: right;
}

textarea.invoice-paper-input {
  resize: vertical;
}

.invoice-paper-head {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 34px;
  min-height: 180px;
}

.invoice-recipient {
  display: block;
  min-width: 280px;
  margin: 0 0 72px;
  padding-bottom: 8px;
  border-bottom: 1px solid #111827;
  font-size: 18px;
  font-weight: 700;
}

.invoice-message {
  margin: 0;
  font-size: 13px;
}

.invoice-issuer {
  display: grid;
  gap: 4px;
  align-content: start;
  font-size: 12px;
}

.invoice-issuer dl {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 3px 8px;
  margin: 0 0 10px;
}

.invoice-issuer dt {
  color: #374151;
}

.invoice-issuer dd {
  min-width: 0;
  margin: 0;
  text-align: right;
}

.invoice-issuer strong {
  margin-top: 6px;
  font-size: 14px;
}

.invoice-subject {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 8px;
  margin: 12px 0 18px;
  padding-bottom: 7px;
  border-bottom: 1px solid #111827;
  font-size: 13px;
}

.invoice-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 270px) minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 22px;
}

.invoice-paper table {
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.invoice-paper th,
.invoice-paper td {
  padding: 8px 10px;
  border: 1px solid #111827;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.invoice-paper th {
  background: #f3f4f6;
  font-weight: 700;
  text-align: left;
}

.invoice-summary-grid table:first-child td {
  text-align: right;
  font-weight: 700;
}

.invoice-detail-table th:nth-child(2),
.invoice-detail-table th:nth-child(3),
.invoice-detail-table th:nth-child(4),
.invoice-detail-table .num {
  text-align: right;
}

.invoice-detail-table th:first-child,
.invoice-detail-table td:first-child {
  width: 38%;
}

.invoice-detail-table th:nth-child(2),
.invoice-detail-table td:nth-child(2) {
  width: 12%;
}

.invoice-detail-table th:nth-child(3),
.invoice-detail-table td:nth-child(3),
.invoice-detail-table th:nth-child(4),
.invoice-detail-table td:nth-child(4) {
  width: 20%;
}

.invoice-detail-table th.invoice-print-hidden,
.invoice-detail-table td.invoice-print-hidden {
  width: 118px;
}

.invoice-row-actions {
  display: grid;
  gap: 4px;
}

.invoice-row-actions .small-button {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 10px;
  line-height: 1.2;
}

.invoice-row-section {
  display: grid;
  gap: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.invoice-row-section select {
  width: 100%;
  padding: 2px 6px;
  font-size: 10px;
}

.invoice-section-row td {
  background: #f9fafb;
  font-weight: 700;
}

.invoice-blank-row {
  height: 80px;
  color: #9ca3af;
  text-align: center;
}

.invoice-pdf-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.invoice-pdf-preview-overlay[hidden] {
  display: none;
}

.invoice-pdf-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1040px, calc(100vw - 32px));
  height: min(92vh, 980px);
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.invoice-pdf-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #dbe3ef;
  background: #fff;
}

.invoice-pdf-preview-head strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-pdf-preview-head div {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.invoice-pdf-preview-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #e5e7eb;
}

.invoice-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 28px;
  margin-top: 24px;
}

.invoice-note {
  min-height: 116px;
  padding: 10px;
  border: 1px solid #111827;
  font-size: 12px;
}

.invoice-note strong {
  display: block;
  margin-bottom: 8px;
}

.invoice-note p {
  margin: 0;
}

@media print {
  .invoice-print-hidden {
    display: none !important;
  }

  .invoice-paper-input {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
}

@media (max-width: 1100px) {
  .master-list-add-form {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .master-list-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .invoice-layout {
    grid-template-columns: 1fr;
  }

  .invoice-form-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 720px) {
  .master-list-page {
    padding: 16px;
    border-radius: 14px;
  }

  .master-list-head {
    display: grid;
  }

  .master-list-search {
    width: 100%;
  }

  .master-list-add-form {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .master-list-add-wide {
    grid-column: auto;
  }

  .master-list-grid {
    grid-template-columns: 1fr;
  }

  .invoice-page {
    padding: 14px;
  }

  .invoice-toolbar,
  .invoice-toolbar-actions,
  .invoice-line-head {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-view-toggle,
  .invoice-view-toggle button {
    width: 100%;
  }

  .invoice-amount-page .invoice-amount-summary,
  .invoice-amount-page .invoice-amount-corps,
  .invoice-amount-page .invoice-amount-rows {
    grid-template-columns: 1fr;
  }

  .invoice-amount-corp-head {
    grid-template-columns: 1fr;
  }

  .invoice-amount-corp-head dl,
  .invoice-amount-preview-actions {
    justify-content: stretch;
  }

  .invoice-amount-corp-head dl div {
    min-width: 0;
    text-align: left;
  }

  .invoice-amount-preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-amount-preview-actions button {
    flex: 1 1 110px;
  }

  .invoice-form-grid,
  .invoice-summary-grid,
  .invoice-paper-head,
  .invoice-bottom {
    grid-template-columns: 1fr;
  }

  .invoice-form-grid label.wide {
    grid-column: auto;
  }

  .invoice-paper {
    min-height: 0;
    padding: 28px 18px;
  }
}

/* FINAL dashboard production notice removal v20260530-01 */
.dashboard-production-notice {
  display: none !important;
}

.dashboard-production-card-list strong {
  color: #111827;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

.dashboard-production-card-list span {
  font-size: 10px !important;
  line-height: 1.25 !important;
}

.dashboard-mode .dashboard-production-card-list p {
  grid-template-columns: minmax(54px, 0.5fr) minmax(0, 1.5fr);
  gap: 6px;
  padding: 6px 7px;
}

/* FINAL fixed filter chooser width v20260530-02 */
.schedule-table th,
.stall-shift-table th,
.stall-sales-table th,
.practice-report-table th,
.practice-performer-table th {
  overflow: visible;
  position: relative;
}

.stall-sales-filter-popover,
.schedule-filter-popover,
.stall-shift-filter-popover,
.practice-filter-popover,
.practice-performer-filter-popover {
  width: min(320px, calc(100vw - 28px)) !important;
  min-width: min(280px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
}

.filter-choice-list label {
  min-width: 0;
}

.filter-choice-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.table-wrap:has(.stall-sales-filter-popover),
.table-wrap:has(.staff-color-popover),
.table-wrap:has(.content-picker-popover),
.table-wrap.has-cell-popover {
  min-height: min(430px, calc(100dvh - 120px));
}

/* FINAL dashboard today practice metrics v20260608-01 */
.dashboard-mode .dashboard-today-diff-grid strong {
  font-size: clamp(15px, 1.45vw, 20px) !important;
  line-height: 1.1 !important;
}

@media (max-width: 1180px) {
  .dashboard-today-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-today-diff-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .dashboard-today-diff-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* FINAL dashboard production card mobile sizing v20260608-02 */
.dashboard-mode .dashboard-production-card .dashboard-production-card-body > p {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: end;
  justify-content: start;
  gap: 6px;
  min-width: 0;
}

.dashboard-mode .dashboard-production-card .dashboard-production-card-body > p span {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

.dashboard-mode .dashboard-production-card .dashboard-production-card-body > p strong,
.dashboard-mode .dashboard-production-card #dashboardProductionPendingCount {
  color: #111827 !important;
  font-size: clamp(24px, 7vw, 32px) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

.dashboard-mode .dashboard-production-card .dashboard-production-card-list p {
  grid-template-columns: minmax(48px, auto) minmax(0, 1fr) !important;
  gap: 6px !important;
  padding: 6px 8px !important;
}

.dashboard-mode .dashboard-production-card .dashboard-production-card-list strong {
  color: #111827 !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

.dashboard-mode .dashboard-production-card .dashboard-production-card-list span {
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}

/* FINAL dashboard sales card title color v20260608-03 */
.dashboard-sales-box .dashboard-sales-title strong,
.dashboard-mode .dashboard-sales-title strong {
  color: #111827 !important;
  font-weight: 900 !important;
}

/* FINAL dashboard today diff responsive sizing v20260609-01 */
.dashboard-today-diff-grid {
  grid-template-columns: repeat(3, minmax(112px, 1fr)) !important;
}

.dashboard-today-diff-grid p {
  container-type: inline-size;
  min-width: 0;
  padding: 10px 12px !important;
}

.dashboard-mode .dashboard-today-diff-grid span,
.dashboard-today-diff-grid span {
  color: #111827 !important;
  font-size: clamp(13px, 4cqw, 16px) !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

.dashboard-mode .dashboard-today-diff-grid strong,
.dashboard-today-diff-grid strong {
  display: block !important;
  max-width: 100% !important;
  overflow: visible !important;
  color: #111827 !important;
  font-size: clamp(18px, 10cqw, 30px) !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  line-height: 1.02 !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.dashboard-mode .dashboard-today-diff-grid small,
.dashboard-today-diff-grid small {
  color: #94a3b8 !important;
  font-size: clamp(10px, 3.5cqw, 12px) !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

@media (max-width: 700px) {
  .dashboard-today-diff-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dashboard-mode .dashboard-today-diff-grid strong,
  .dashboard-today-diff-grid strong {
    font-size: clamp(24px, 9vw, 34px) !important;
  }
}

/* FINAL mobile schedule table/toolbar cleanup v20260622-01 */
@media (max-width: 820px) {
  #listView .table-toolbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 8px 4px 10px 64px !important;
    margin-bottom: 8px !important;
    white-space: nowrap !important;
  }

  #listView .table-toolbar h2,
  #listView .table-toolbar button,
  #listView .table-toolbar label,
  #listView .table-toolbar span {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  #listView .table-toolbar h2 {
    flex: 0 0 auto !important;
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.1 !important;
  }

  #listView .table-toolbar .segmented-control {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    width: auto !important;
    min-width: max-content !important;
  }

  #listView .table-toolbar .segment-button {
    flex: 0 0 auto !important;
    min-width: 82px !important;
    width: auto !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }

  #listView .schedule-create-actions {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    width: auto !important;
    gap: 8px !important;
  }

  #listView .schedule-create-actions button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 86px !important;
    min-height: 40px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }

  #listView .toolbar-month-control {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    width: auto !important;
    min-width: max-content !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    font-size: 12px !important;
  }

  #listView .toolbar-month-control input[type="month"] {
    flex: 0 0 auto !important;
    width: 138px !important;
    min-width: 138px !important;
  }

  #listView #listCount {
    flex: 0 0 auto !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  #listView .table-wrap {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
  }

  #listView .schedule-table {
    width: 1080px !important;
    min-width: 1080px !important;
    table-layout: fixed !important;
  }

  #listView .schedule-table th,
  #listView .schedule-table td {
    height: 34px !important;
    padding: 4px 6px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  #listView .schedule-table .cell-input {
    min-height: 24px !important;
    height: 24px !important;
    padding: 2px 4px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  #listView .schedule-table th:nth-child(13),
  #listView .schedule-table td:nth-child(13) {
    position: static !important;
    right: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
  }
}

/* FINAL mobile no-scroll toolbar override v20260622-03 */
@media (max-width: 820px) {
  #listView .table-toolbar,
  #stallShiftView .table-toolbar,
  #stallSalesView > .table-toolbar,
  #practiceReportView > .table-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 10px 8px !important;
    white-space: normal !important;
  }

  #listView .table-toolbar h2,
  #stallShiftView .table-toolbar h2,
  #stallSalesView > .table-toolbar h2,
  #practiceReportView > .table-toolbar h2 {
    grid-column: 1 / -1 !important;
    display: block !important;
    margin: 0 !important;
    color: var(--ink) !important;
    font-size: 20px !important;
    line-height: 1.15 !important;
    text-align: left !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
  }

  #stallShiftView .stacked-title span {
    display: inline !important;
  }

  #listView .table-toolbar .segmented-control,
  #stallShiftView .table-toolbar .segmented-control {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #listView .table-toolbar .segment-button,
  #stallShiftView .table-toolbar .segment-button,
  #listView .schedule-create-actions button,
  #practiceReportView .toolbar-actions button,
  #stallSalesView > .table-toolbar .compact-button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 8px !important;
    font-size: 14px !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  #listView .schedule-create-actions,
  #practiceReportView .toolbar-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #practiceReportView .toolbar-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #listView .toolbar-month-control,
  #stallShiftView .toolbar-month-control,
  #stallSalesView > .table-toolbar .toolbar-month-control,
  #practiceReportView > .table-toolbar .toolbar-month-control {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    padding: 6px 8px !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
  }

  #listView .toolbar-month-control input[type="month"],
  #stallShiftView .toolbar-month-control input[type="month"],
  #stallSalesView > .table-toolbar .toolbar-month-control input[type="month"],
  #practiceReportView > .table-toolbar .toolbar-month-control input[type="month"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  #listView #listCount,
  #stallShiftView .toolbar-metrics,
  #stallSalesView > .table-toolbar .toolbar-metrics {
    grid-column: 1 / -1 !important;
  }

  #listView #listCount {
    display: grid !important;
    place-items: center !important;
    min-height: 40px !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--muted) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
  }

  #stallShiftView .toolbar-metrics,
  #stallSalesView > .table-toolbar .toolbar-metrics {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #stallShiftView .toolbar-metrics span,
  #stallSalesView > .table-toolbar .toolbar-metrics span {
    display: grid !important;
    place-items: center !important;
    min-width: 0 !important;
    min-height: 48px !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: keep-all !important;
  }

  #stallShiftView .toolbar-metrics span:first-child,
  #stallSalesView > .table-toolbar .toolbar-metrics span:first-child {
    grid-column: 1 / -1 !important;
    min-height: 40px !important;
  }

  #stallSalesView > .table-toolbar .compact-button {
    grid-column: 1 / -1 !important;
  }

  #stallSalesView .sub-tabs,
  #practiceReportView .sub-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #stallSalesView .sub-tab,
  #practiceReportView .sub-tab {
    width: 100% !important;
    min-height: 40px !important;
    white-space: nowrap !important;
  }
}

/* FINAL mobile month input contained v20260622-04 */
@media (max-width: 820px) {
  #listView .toolbar-month-control,
  #stallShiftView .toolbar-month-control,
  #stallSalesView > .table-toolbar .toolbar-month-control,
  #practiceReportView > .table-toolbar .toolbar-month-control {
    grid-template-columns: 54px minmax(0, 1fr) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  #listView .toolbar-month-control input[type="month"],
  #stallShiftView .toolbar-month-control input[type="month"],
  #stallSalesView > .table-toolbar .toolbar-month-control input[type="month"],
  #practiceReportView > .table-toolbar .toolbar-month-control input[type="month"] {
    display: block !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
    padding-inline: 6px !important;
    font-size: 15px !important;
    line-height: 1 !important;
    opacity: 0 !important;
    position: relative !important;
    z-index: 2 !important;
  }

  .toolbar-month-control .mobile-month-display {
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    place-items: center !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: 42px !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--ink) !important;
    font-size: clamp(18px, 5vw, 24px) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
    z-index: 1 !important;
  }
}

/* FINAL mobile editor overlay recovery v20260622-05 */
@media (max-width: 820px) {
  body.editor-open {
    overflow: hidden !important;
  }

  body.editor-open .mobile-menu-button,
  body.editor-open .mobile-menu-backdrop {
    display: none !important;
  }

  body.editor-open .editor-panel.open {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    border: 0 !important;
    background: #fff !important;
    padding: calc(env(safe-area-inset-top) + 76px) 16px calc(env(safe-area-inset-bottom) + 28px) !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.editor-open .editor-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
    padding-right: 72px !important;
  }

  body.editor-open .editor-head .eyebrow {
    margin: 0 0 6px !important;
    color: var(--muted) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
  }

  body.editor-open .editor-head h2 {
    margin: 0 !important;
    color: var(--ink) !important;
    font-size: 26px !important;
    line-height: 1.2 !important;
  }

  body.editor-open #closeEditorBtn {
    display: grid !important;
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 18px) !important;
    right: calc(env(safe-area-inset-right) + 16px) !important;
    z-index: 2147483647 !important;
    place-items: center !important;
    width: 58px !important;
    min-width: 58px !important;
    height: 58px !important;
    min-height: 58px !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    color: var(--ink) !important;
    padding: 0 !important;
    font-size: 42px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12) !important;
    touch-action: manipulation !important;
  }

  body.editor-open .form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  body.editor-open .form-grid label {
    min-width: 0 !important;
    color: var(--muted) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  body.editor-open .form-grid .wide {
    grid-column: 1 / -1 !important;
  }

  body.editor-open .form-grid input {
    min-width: 0 !important;
    min-height: 48px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
  }

  body.editor-open .editor-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-top: 22px !important;
  }

  body.editor-open .editor-actions button {
    min-height: 54px !important;
    font-size: 18px !important;
    border-radius: 12px !important;
  }
}

/* FINAL payroll distribution toolbar layout v20260622-06 */
.payroll-toolbar {
  grid-template-columns: minmax(210px, 0.65fr) minmax(110px, auto) minmax(360px, 1.25fr) minmax(260px, auto);
  align-items: center;
}

.payroll-toolbar.is-shift-mode {
  grid-template-columns: minmax(210px, 0.7fr) minmax(460px, 1.35fr) minmax(300px, auto);
}

.payroll-toolbar .toolbar-month-control,
.payroll-toolbar #payrollCutoffLabel,
.payroll-toolbar .payroll-period {
  min-width: 0;
}

.payroll-period {
  align-self: stretch;
  min-height: 64px;
  align-content: center;
  line-height: 1.2;
}

.payroll-period span {
  display: block;
  min-height: 16px;
}

.payroll-period strong {
  display: block;
  margin-top: 2px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.18;
}

.payroll-toolbar.is-shift-mode .payroll-period strong {
  font-size: 20px;
}

@media (max-width: 1180px) {
  .payroll-toolbar,
  .payroll-toolbar.is-shift-mode {
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  }

  .payroll-toolbar .payroll-action-group {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* FINAL current-month launch, production filters, iPad mini dashboard v20260706-01 */
.production-mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.production-mode-tab {
  min-height: 36px;
  border: 1px solid #d7e0ec;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  padding: 0 12px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
}

.production-mode-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.production-range-controls {
  display: inline-flex;
  gap: 8px;
  align-items: end;
}

.production-range-controls label {
  min-width: 150px;
}

.production-list-summary {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
}

.production-table th {
  overflow: visible;
}

@media (max-width: 820px) {
  #productionView .production-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    align-items: stretch !important;
    padding: 10px 8px !important;
  }

  #productionView .production-toolbar h2 {
    font-size: 20px !important;
  }

  #productionView .production-mode-tabs,
  #productionView .production-range-controls {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  #productionView .production-range-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #productionView .production-range-controls label,
  #productionView .toolbar-month-control {
    min-width: 0 !important;
  }

  #productionView .production-mode-tab,
  #productionView #addProductionRowBtn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 8px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }

}

.production-filter-popover {
  width: min(320px, calc(100vw - 28px)) !important;
  min-width: min(280px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
}

@media (min-width: 700px) and (max-width: 820px) {
  .dashboard-mode .main {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 auto !important;
    padding-left: max(18px, env(safe-area-inset-left)) !important;
    padding-right: max(18px, env(safe-area-inset-right)) !important;
    overflow-x: hidden !important;
  }

  .dashboard-mode .dashboard-shell {
    width: min(100%, 720px) !important;
    max-width: 720px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }

  .dashboard-mode .dashboard-hero,
  .dashboard-mode .dashboard-schedule-grid,
  .dashboard-mode .dashboard-card-grid,
  .dashboard-mode .dashboard-bottom-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* FINAL iPad mini dashboard centering v20260706-02 */
@media (min-width: 821px) and (max-width: 1180px) {
  .dashboard-mode.app-shell {
    display: block !important;
    grid-template-columns: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    background:
      radial-gradient(circle at 82% 4%, rgba(244, 114, 182, 0.13), transparent 22%),
      #f8faff !important;
  }

  .dashboard-mode .mobile-menu-button {
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 116px) !important;
    left: calc(env(safe-area-inset-left) + 22px) !important;
    z-index: 2147483647 !important;
    display: grid !important;
    place-items: center !important;
    gap: 5px !important;
    width: 58px !important;
    min-width: 58px !important;
    height: 58px !important;
    min-height: 58px !important;
    border: 1px solid rgba(168, 85, 247, 0.42) !important;
    border-radius: 999px !important;
    background: rgba(2, 6, 23, 0.88) !important;
    padding: 0 !important;
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.22) !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  .dashboard-mode .mobile-menu-button span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
  }

  .dashboard-mode .mobile-menu-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9998 !important;
    display: block !important;
    background: rgba(2, 6, 23, 0.38) !important;
    backdrop-filter: blur(2px) !important;
  }

  .dashboard-mode .mobile-menu-backdrop[hidden] {
    display: none !important;
  }

  .dashboard-mode .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 9999 !important;
    width: min(330px, 84vw) !important;
    height: 100dvh !important;
    padding: calc(env(safe-area-inset-top) + 22px) 18px 22px !important;
    overflow-y: auto !important;
    transform: translateX(-105%) !important;
    transition: transform 180ms ease !important;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.24) !important;
  }

  .dashboard-mode.mobile-menu-open .sidebar {
    transform: translateX(0) !important;
  }

  .dashboard-mode .main {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: calc(env(safe-area-inset-top) + 92px) max(24px, env(safe-area-inset-right)) 28px max(24px, env(safe-area-inset-left)) !important;
    overflow-x: hidden !important;
  }

  .dashboard-mode .dashboard-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    width: min(100%, 900px) !important;
    max-width: 900px !important;
    min-height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .dashboard-mode .dashboard-welcome-card {
    display: none !important;
  }

  .dashboard-mode .dashboard-hero,
  .dashboard-mode .dashboard-production-notice,
  .dashboard-mode .dashboard-schedule-grid,
  .dashboard-mode .dashboard-card-grid,
  .dashboard-mode .dashboard-sales-detail-grid,
  .dashboard-mode .dashboard-bottom-grid {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .dashboard-mode .dashboard-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    padding: 0 !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child,
  .dashboard-mode .dashboard-user-actions,
  .dashboard-mode .dashboard-date-line,
  .dashboard-mode .dashboard-alert-box,
  .dashboard-mode .dashboard-sync {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
    margin: 0 !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    order: 1 !important;
  }

  .dashboard-mode .dashboard-user-actions {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(150px, auto) minmax(120px, auto) !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .dashboard-mode .dashboard-date-line {
    order: 3 !important;
    min-height: 54px !important;
  }

  .dashboard-mode .dashboard-alert-box {
    order: 4 !important;
    display: block !important;
    min-height: 0 !important;
    padding: 18px 20px !important;
    border: 1px solid #fde68a !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    text-align: center !important;
    box-shadow: 0 18px 44px rgba(91, 104, 135, 0.12) !important;
  }

  .dashboard-mode .dashboard-sync {
    order: 5 !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-alert-head {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    margin-bottom: 10px !important;
  }

  .dashboard-mode .dashboard-alert-title {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
    height: auto !important;
    color: #f59e0b !important;
    font-size: 16px !important;
    font-weight: 900 !important;
  }

  .dashboard-mode .dashboard-alert-lamp {
    font-size: 20px !important;
  }

  .dashboard-mode .dashboard-alert-clear,
  .dashboard-mode .dashboard-alert-list {
    display: revert !important;
  }

  .dashboard-mode .dashboard-alert-list {
    display: grid !important;
    max-width: 760px !important;
    margin: 0 auto !important;
  }

  .dashboard-mode .dashboard-alert-more:not([hidden]) {
    display: block !important;
    width: 100% !important;
    max-width: 760px !important;
    margin: 12px auto 0 !important;
  }

  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-logout,
  .dashboard-mode .dashboard-user-actions .push-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }

  .dashboard-mode .dashboard-user strong {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 14px !important;
  }
}

/* FINAL iPad mini portrait dashboard centering v20260706-03 */
@media (max-width: 820px) {
  .dashboard-mode.app-shell {
    display: block !important;
    grid-template-columns: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    background:
      radial-gradient(circle at 82% 4%, rgba(244, 114, 182, 0.13), transparent 22%),
      #f8faff !important;
  }

  .dashboard-mode .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 9999 !important;
    width: min(320px, 86vw) !important;
    height: 100dvh !important;
    padding: calc(env(safe-area-inset-top) + 22px) 18px 22px !important;
    overflow-y: auto !important;
    transform: translateX(-105%) !important;
    transition: transform 180ms ease !important;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.24) !important;
  }

  .dashboard-mode.mobile-menu-open .sidebar {
    transform: translateX(0) !important;
  }

  .dashboard-mode .mobile-menu-button {
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 96px) !important;
    left: calc(env(safe-area-inset-left) + 18px) !important;
    z-index: 2147483647 !important;
    display: grid !important;
    place-items: center !important;
    gap: 5px !important;
    width: 54px !important;
    min-width: 54px !important;
    height: 54px !important;
    min-height: 54px !important;
    border: 1px solid rgba(168, 85, 247, 0.42) !important;
    border-radius: 999px !important;
    background: rgba(2, 6, 23, 0.88) !important;
    padding: 0 !important;
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.22) !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  .dashboard-mode .mobile-menu-button span {
    display: block !important;
    width: 23px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
  }

  .dashboard-mode .mobile-menu-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9998 !important;
    display: block !important;
    background: rgba(2, 6, 23, 0.38) !important;
    backdrop-filter: blur(2px) !important;
  }

  .dashboard-mode .mobile-menu-backdrop[hidden] {
    display: none !important;
  }

  .dashboard-mode .main {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: calc(env(safe-area-inset-top) + 92px) max(14px, env(safe-area-inset-right)) 24px max(14px, env(safe-area-inset-left)) !important;
    overflow-x: hidden !important;
  }

  .dashboard-mode .dashboard-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    width: min(100%, 720px) !important;
    max-width: 720px !important;
    min-height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .dashboard-mode .dashboard-welcome-card {
    display: none !important;
  }

  .dashboard-mode .dashboard-hero,
  .dashboard-mode .dashboard-production-notice,
  .dashboard-mode .dashboard-schedule-grid,
  .dashboard-mode .dashboard-card-grid,
  .dashboard-mode .dashboard-sales-detail-grid,
  .dashboard-mode .dashboard-bottom-grid {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .dashboard-mode .dashboard-hero {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-hero > div:first-child {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-hero h1,
  .dashboard-mode .dashboard-lead {
    text-align: center !important;
  }

  .dashboard-mode .dashboard-user-actions {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(118px, auto) minmax(92px, auto) !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .dashboard-mode .dashboard-date-line {
    order: 3 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 6px 12px !important;
  }

  .dashboard-mode .dashboard-alert-box {
    order: 4 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 14px 12px !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-sync {
    order: 5 !important;
    width: 100% !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-alert-head {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 30px !important;
    margin-bottom: 8px !important;
    padding: 0 74px !important;
  }

  .dashboard-mode .dashboard-alert-title {
    justify-content: center !important;
    text-align: center !important;
  }

  .dashboard-mode .dashboard-alert-clear {
    position: absolute !important;
    right: 12px !important;
    top: 14px !important;
  }

  .dashboard-mode .dashboard-alert-list {
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 auto !important;
  }

  .dashboard-mode .dashboard-alert-list p {
    grid-template-columns: 14px minmax(0, 1fr) auto !important;
    text-align: left !important;
  }

  .dashboard-mode .dashboard-alert-more:not([hidden]) {
    display: block !important;
    width: 100% !important;
    max-width: 620px !important;
    margin: 10px auto 0 !important;
  }

  .dashboard-mode .dashboard-user,
  .dashboard-mode .dashboard-user-actions .push-toggle,
  .dashboard-mode .dashboard-logout {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .dashboard-mode .dashboard-user strong {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
  }
}

/* FINAL persistent desktop sidebar v20260821-01 */
@media (min-width: 821px) {
  .app-shell:not(.dashboard-mode) {
    display: block !important;
    min-height: 100vh !important;
  }

  .app-shell:not(.dashboard-mode) .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 50 !important;
    width: 236px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
  }

  .app-shell:not(.dashboard-mode) .main {
    width: auto !important;
    min-width: 0 !important;
    margin-left: 236px !important;
  }
}

/* FINAL schedule site name wrapping v20260905-01 */
.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) {
  width: 118px !important;
  min-width: 118px !important;
}

.schedule-table td:nth-child(3) {
  height: auto !important;
  min-height: 34px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  vertical-align: middle !important;
}

.schedule-table td:nth-child(3) strong {
  display: block !important;
  overflow: visible !important;
  color: inherit !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: break-word !important;
}

@media (max-width: 820px) {
  #listView .schedule-table th:nth-child(3),
  #listView .schedule-table td:nth-child(3) {
    width: 122px !important;
    min-width: 122px !important;
  }

  #listView .schedule-table td:nth-child(3),
  #listView .schedule-table td:nth-child(3) strong {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }
}

/* Wrapped schedule fields keep complete names and notes visible. */
#listView .schedule-table td.schedule-color-cell,
#stallShiftView .stall-shift-table td.schedule-color-cell {
  height: auto !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
#listView .schedule-table textarea.schedule-text-input,
#stallShiftView .stall-shift-table textarea.schedule-text-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 26px !important;
  max-height: none;
  padding: 3px 4px !important;
  overflow: hidden !important;
  resize: none;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.5 !important;
  font-family: inherit;
  font-weight: inherit;
  border-radius: 4px;
}

#listView .schedule-table textarea.schedule-text-input:focus,
#stallShiftView .stall-shift-table textarea.schedule-text-input:focus {
  padding-right: 28px !important;
}

/* Schedule editing and viewport-bound cell menus v20260906-01. */
#sharedSaveStatus {
  display: block;
  margin: 0 0 6px auto;
  padding: 3px 8px;
  min-height: 26px;
  max-width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #536472;
  font-size: 12px;
  white-space: normal;
}
#sharedSaveStatus.has-error {
  background: #fff2dc;
  color: #92400e;
  cursor: pointer;
}
.schedule-cell-menu-button {
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  min-width: 24px;
  min-height: 28px;
  padding: 3px;
  border: 1px solid #aebfce;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}
.schedule-color-cell:hover > .schedule-cell-menu-button,
.schedule-color-cell:focus-within > .schedule-cell-menu-button,
.schedule-cell-menu-button[aria-expanded="true"] {
  opacity: 1;
  pointer-events: auto;
}
.schedule-cell-menu-swatch {
  display: block;
  width: 14px;
  height: 14px;
  border: 1px solid #587282;
  border-radius: 2px;
  background: var(--cell-menu-color, #fff);
  box-shadow: inset 4px 0 #fecaca, inset -4px 0 #fef08a;
}
.schedule-cell-menu-button:focus-visible {
  outline: 2px solid #175e72;
  outline-offset: 2px;
}
.schedule-edit-tools {
  display: flex;
  justify-content: flex-end;
  min-height: 32px;
  margin: 0 0 6px;
}
.schedule-edit-tools label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: 0;
  color: #175e72;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.schedule-edit-tools input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
}
.schedule-color-mode .schedule-color-cell {
  cursor: pointer;
}
.schedule-color-mode .schedule-color-cell .cell-input {
  pointer-events: none;
}
.schedule-color-mode .schedule-cell-menu-button {
  display: none;
}
.schedule-table .cell-input,
.stall-shift-table .cell-input {
  font-size: 12px !important;
  letter-spacing: 0;
}
.schedule-table .cell-input:focus,
.stall-shift-table .cell-input:focus {
  font-size: 14px !important;
  padding-right: 28px;
  background: #fff !important;
  outline: 2px solid #175e72;
  outline-offset: -2px;
}
.schedule-cell-popover {
  position: fixed !important;
  bottom: auto !important;
  z-index: 1200;
  box-sizing: border-box;
  margin: 0;
  overscroll-behavior: contain;
}
.schedule-cell-popover .staff-color-tabs button,
.schedule-cell-popover .staff-picker-list button,
.schedule-cell-popover .content-picker-list button {
  min-height: 40px;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (hover: none), (pointer: coarse) {
  .schedule-table .cell-input:focus,
  .stall-shift-table .cell-input:focus {
    font-size: 16px !important;
    padding-right: 28px;
  }
}
@media (max-width: 1180px) {
  .dashboard-mode #mobileMenuBtn {
    top: calc(env(safe-area-inset-top) + 12px) !important;
    left: calc(env(safe-area-inset-left) + 12px) !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    grid-template-rows: repeat(3, 2px) !important;
    align-content: center !important;
    background: #fff !important;
    border-color: #d5dce5 !important;
    z-index: 70 !important;
  }
  .dashboard-mode #mobileMenuBtn span { background: #172333 !important; }
  #mobileMenuBtn span { background: #172333 !important; }
  .dashboard-mode.mobile-menu-open #mobileMenuBtn { z-index: 10000 !important; }
}
.table-filter-floating {
  position: fixed !important;
  z-index: 1500 !important;
  box-sizing: border-box;
  overscroll-behavior: contain;
}
.table-filter-floating .filter-popover-head {
  position: sticky;
  top: -8px;
  background: #fff;
  gap: 8px;
  z-index: 1;
}
.table-filter-floating .filter-popover-head strong { flex: 1; min-width: 0; }
.table-filter-floating .table-filter-close {
  color: #263343;
  background: #fff;
  border-color: #d5dce5;
  border-radius: 6px;
}
.staff-name-select { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.table-filter-floating .filter-choice-list span { white-space: normal; overflow-wrap: anywhere; }
@media (pointer: coarse) {
  .table-filter-floating .filter-choice-list label,
  .table-filter-floating button { min-height: 44px; }
  .table-filter-floating .filter-choice-list label { font-size: 16px; }
}
@media print {
  .table-filter-floating,
  #sharedSaveStatus,
  .schedule-edit-tools,
  .schedule-cell-menu-button,
  .schedule-cell-popover {
    display: none !important;
  }
}
