

button, input, select, textarea {

  font: inherit;
}

button {

  cursor: pointer;
  touch-action: manipulation;
}

body.modal-scroll-locked {
  left: 0;
  overflow: hidden;
  position: fixed;
  right: 0;
  width: 100%;
}

.welcome-content,
.confirm-card,
.calendar-day-card,
.custom-period-card,
.goal-input-card,
.payment-schedule-dialog-card {
  touch-action: pan-y;
}

.confirm-overlay {

  background: rgba(15, 23, 42, 0.36);
  display: grid;
  inset: 0;
  overscroll-behavior: contain;
  padding: 20px;
  place-items: center;
  position: fixed;
  z-index: 160;
}

.confirm-overlay[hidden] {

  display: none;
}

.calendar-day-overlay {

  background: rgba(15, 23, 42, 0.36);
  display: grid;
  inset: 0;
  overscroll-behavior: contain;
  padding: 20px;
  place-items: center;
  position: fixed;
  z-index: 100;
}

.calendar-day-overlay[hidden] {

  display: none;
}

.confirm-card {

  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 16px;
  max-height: calc(100dvh - 40px);
  max-width: 360px;
  overscroll-behavior: contain;
  overflow-y: auto;
  padding: 18px;
  width: min(100%, 360px);
}

.calendar-day-card {

  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 14px;
  max-height: calc(100dvh - 40px);
  max-width: 360px;
  overscroll-behavior: contain;
  overflow-y: auto;
  padding: 18px;
  width: min(100%, 360px);
}

.calendar-day-head {

  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.calendar-day-head h2 {

  font-size: 16px;
  font-weight: 800;
}

.calendar-day-head button {

  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.calendar-day-summary, .calendar-day-services {

  display: grid;
  gap: 8px;
}

.calendar-day-total-row {

  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.calendar-day-summary strong {

  color: var(--ui-green, #008a12);
  font-size: 26px;
  font-weight: 860;
}

.calendar-day-actions {

  align-items: center;
  display: flex;
  gap: 6px;
}

.calendar-day-actions button {

  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 760;
  height: 44px;
  justify-content: center;
  min-width: 44px;
  padding: 0 12px;
}

.calendar-day-actions .calendar-day-holiday-button {

  font-size: 11px;
  height: 44px;
  min-width: 44px;
  padding: 0 10px;
}

.calendar-day-actions .calendar-day-holiday-button[aria-pressed="true"] {

  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--accent-dark);
}

.calendar-day-actions svg {

  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 17px;
}

.calendar-day-summary small, .calendar-day-empty {

  color: var(--muted);
  font-weight: 700;
}

.calendar-day-services {

  list-style: none;
  margin: 0;
  padding: 0;
}

.calendar-day-services li {

  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto auto;
  padding-top: 8px;
}

.calendar-day-memo {

  border-top: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 6px;
  padding-top: 10px;
}

.calendar-day-memo > span {

  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.calendar-day-memo p {

  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  white-space: pre-line;
}

.calendar-day-memo p span {

  color: var(--muted);
  display: inline-block;
  font-size: 11px;
  font-weight: 760;
  margin-right: 8px;
}

.confirm-card p {

  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.5;
  margin: 0;
  white-space: pre-line;
}

.confirm-actions {

  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.confirm-actions.is-stacked {

  grid-template-columns: 1fr;
}

.confirm-actions button:disabled {

  cursor: not-allowed;
  opacity: 0.56;
}

.confirm-actions.is-three-choice {

  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 0.9fr);
}

.confirm-actions.is-three-choice button {

  font-size: 14px;
  min-height: 44px;
  min-width: 0;
  padding: 0 8px;
  white-space: nowrap;
}

.confirm-actions.is-date-conflict {

  grid-template-columns: 1fr;
}

.confirm-actions.is-date-conflict button {

  font-size: 15px;
  min-height: 48px;
  width: 100%;
}

.confirm-actions.is-date-conflict #confirmOk {

  order: 1;
}

.confirm-actions.is-date-conflict #confirmSecondary {

  order: 2;
}

.confirm-actions.is-date-conflict #confirmCancel {

  order: 3;
}

.confirm-actions.is-delete-choice {

  grid-template-columns: 1fr;
}

.confirm-actions.is-delete-choice #confirmSecondary {

  order: 1;
}

.confirm-actions.is-delete-choice #confirmOk {

  order: 2;
}

.confirm-actions.is-delete-choice #confirmCancel {

  order: 3;
}

.brand p, .brand span {

  margin: 0;
}

.brand span {

  color: #aab6c5;
  font-size: 12px;
}

.nav-tab.active, .nav-tab:hover {

  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.quick-stats {

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-top: auto;
  padding: 16px;
}

.quick-stats span {

  color: #aab6c5;
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.quick-stats strong {

  font-size: 24px;
}

.eyebrow {

  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 4px;
}

h1, h2 {

  letter-spacing: 0;
  margin: 0;
}

h1 {

  font-size: 34px;
}

h2 {

  font-size: 18px;
}

.toolbar, .form-actions, .data-actions {

  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.backup-section {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.backup-actions .primary-button {
  flex: 1 0 100%;
}

.backup-fallback-link {
  -webkit-tap-highlight-color: transparent;
  align-self: start;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  justify-self: start;
  min-height: 44px;
  padding: 0 2px;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.backup-fallback-link:focus-visible {
  border-radius: 6px;
  outline: 3px solid rgba(0, 138, 18, 0.18);
  outline-offset: 2px;
}

.backup-warning {
  align-items: flex-start;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 10px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  gap: 8px;
  line-height: 1.6;
  padding: 12px;
}

.backup-warning div {

  display: grid;
  gap: 6px;
}

.backup-warning strong {

  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.backup-warning p {

  color: #374151;
  margin: 0;
}

.backup-warning svg {
  color: #ca8a04;
  flex-shrink: 0;
  margin-top: 1px;
}

.backup-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  padding: 0;
}

.backup-section .toggle-row {
  margin-bottom: 4px;
}

.toggle-row small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 2px;
}

.welcome-modal {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.54);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  overscroll-behavior: contain;
  overflow: hidden;
  padding: 24px 16px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
}

.welcome-modal[hidden] {
  display: none;
}

.backup-fallback-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.36);
  display: grid;
  inset: 0;
  overscroll-behavior: contain;
  padding: 20px;
  place-items: center;
  position: fixed;
  z-index: 120;
}

.backup-fallback-overlay[hidden] {
  display: none;
}

.backup-fallback-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
  display: grid;
  gap: 14px;
  max-height: min(720px, calc(100vh - 36px));
  max-width: 520px;
  overflow: auto;
  padding: 18px;
  width: min(100%, 520px);
}

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

.backup-fallback-head h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
}

.backup-fallback-head button {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 22px;
  height: 44px;
  justify-content: center;
  line-height: 1;
  width: 44px;
}

.backup-fallback-lead {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0;
}

.backup-fallback-actions,
.backup-fallback-panel {
  display: grid;
  gap: 10px;
}

.backup-fallback-panel {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

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

.backup-fallback-panel label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.backup-fallback-panel textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  min-height: 160px;
  resize: vertical;
}

.custom-period-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.36);
  display: flex;
  inset: 0;
  justify-content: center;
  overscroll-behavior: contain;
  padding: 20px;
  position: fixed;
  z-index: 200;
}

.custom-period-card {
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 10px;
  max-height: calc(100dvh - 48px);
  max-width: 272px;
  overscroll-behavior: contain;
  overflow-y: auto;
  padding: 14px;
  width: 100%;
}

.custom-period-overlay.is-positioned {
  align-items: flex-start;
  justify-content: flex-start;
}

.custom-period-overlay.is-positioned .custom-period-card {
  left: var(--custom-period-left);
  position: fixed;
  top: var(--custom-period-top);
}

.custom-period-card h2 {
  color: var(--home-text, var(--ink));
  font-size: 15px;
  font-weight: 760;
  margin: 0;
}

.custom-period-field {
  color: var(--home-muted, var(--muted));
  display: grid;
  font-size: 12px;
  font-weight: 760;
  gap: 7px;
}

.custom-period-input {
  appearance: none;
  background: var(--home-card, var(--surface));
  border: 1px solid var(--home-line, var(--border));
  border-radius: 12px;
  box-sizing: border-box;
  color: var(--home-text, var(--ink));
  font-size: 16px;
  font-weight: 760;
  line-height: 1;
  min-height: 44px;
  padding: 0 12px;
  text-align: center;
  width: 100%;
}

.custom-period-input::-webkit-date-and-time-value {
  text-align: center;
}

.custom-period-input::-webkit-calendar-picker-indicator {
  margin: 0;
}

.custom-period-error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 760;
  margin: 0;
}

.custom-period-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.custom-period-actions .primary-button {
  min-height: 44px;
}

.landscape-notice {
  display: none;
}

.notice-block-card {
  background:
    linear-gradient(180deg, rgba(240, 253, 250, 0.92), rgba(255, 255, 255, 0.98)),
    var(--surface);
  border: 2px solid #14b8a6;
  border-radius: 18px;
  box-shadow: 0 20px 54px rgba(20, 184, 166, 0.18), 0 12px 30px rgba(15, 23, 42, 0.08);
  color: var(--ink);
  display: grid;
  gap: 12px;
  max-width: 420px;
  padding: 32px 28px;
  text-align: center;
  width: min(100%, 420px);
}

.notice-block-icon {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(20, 184, 166, 0.38);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.16);
  display: inline-flex;
  height: 58px;
  justify-content: center;
  justify-self: center;
  width: 58px;
}

.notice-block-icon img {
  display: block;
  height: 42px;
  width: 42px;
}

.notice-block-label {
  color: #008a12;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0;
}

.landscape-notice h1 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 0;
}

.landscape-notice p {
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  margin: 0;
}

.welcome-content {
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  max-width: 400px;
  min-height: 0;
  overscroll-behavior: contain;
  overflow-y: auto;
  padding: 32px 24px;
  width: 100%;
}

.welcome-content-main {
  border-radius: 25px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  max-width: 504px;
  overflow-y: auto;
  padding: 21px 31px 25px;
}

.welcome-content-main.is-shaking {
  animation: welcome-card-shake 0.34s ease;
}

.welcome-hero-illustration {
  margin: 0 auto 5px;
  max-width: 360px;
  transform: translateX(-2px);
  width: 92%;
}

.welcome-hero-illustration img {
  border-radius: 12px;
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.welcome-title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 20px;
  text-align: center;
}

.welcome-content-main .welcome-title {
  font-size: 31px;
  font-weight: 770;
  letter-spacing: 0;
  line-height: 1.15;
  margin-bottom: 13px;
}

.welcome-subtitle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
  line-height: 1.75;
  margin: 0 auto 24px;
  max-width: 348px;
  text-align: center;
}

.welcome-items {
  display: grid;
  gap: 20px;
  margin-bottom: 29px;
}

.welcome-item {
  align-items: flex-start;
  display: flex;
  gap: 16px;
}

.welcome-item-icon {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 13px;
  color: var(--accent);
  display: flex;
  flex-shrink: 0;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.welcome-item-icon svg {
  height: 25px;
  width: 25px;
}

.welcome-item-text {
  display: grid;
  font-size: 13px;
  gap: 6px;
  padding-top: 3px;
}

.welcome-item-text strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 770;
  line-height: 1.35;
}

.welcome-item-text span {
  color: var(--muted);
  font-weight: 520;
  line-height: 1.7;
}

.welcome-actions {
  display: grid;
  gap: 10px;
}

.welcome-content-main .welcome-actions {
  gap: 12px;
  margin-bottom: 14px;
}

.welcome-cta-button {
  align-items: center;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  border: 0;
  border-radius: 9px;
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.22);
  color: #ffffff;
  display: grid;
  font: inherit;
  font-size: 18px;
  font-weight: 730;
  grid-template-columns: 22px 1fr 18px;
  min-height: 47px;
  padding: 0 13px;
  width: 100%;
}

.welcome-cta-button svg {
  height: 18px;
  width: 18px;
}

.welcome-browser-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  min-height: 40px;
  padding: 0;
  text-align: center;
}

.welcome-privacy {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-weight: 520;
  gap: 8px;
  justify-content: center;
  line-height: 1.6;
  margin: 0;
  padding-top: 14px;
  text-align: center;
}

.welcome-privacy svg {
  color: var(--accent);
  flex: 0 0 auto;
  height: 14px;
  width: 14px;
}

body[data-theme="dark"] .welcome-modal {
  background: rgba(0, 0, 0, 0.72);
}

body[data-theme="dark"] .welcome-content-main {
  background: #111827;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

body[data-theme="dark"] .welcome-item-icon {
  background: rgba(20, 184, 166, 0.16);
}

body[data-theme="dark"] .welcome-privacy {
  border-color: rgba(148, 163, 184, 0.24);
}

@keyframes welcome-card-shake {
  0%, 100% {
    transform: translateX(0);
  }

  20%, 60% {
    transform: translateX(-7px);
  }

  40%, 80% {
    transform: translateX(7px);
  }
}

@media (max-width: 560px) {
  .welcome-modal {
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  }

  .welcome-content-main {
    border-radius: 22px;
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    padding: 16px 22px 20px;
  }

  .welcome-hero-illustration {
    margin-bottom: 4px;
    max-width: 297px;
    transform: translateX(-2px);
    width: 94%;
  }

  .welcome-content-main .welcome-title {
    font-size: 29px;
    margin-bottom: 11px;
  }

  .welcome-subtitle {
    font-size: 12px;
    line-height: 1.65;
    margin-bottom: 21px;
  }

  .welcome-items {
    gap: 18px;
    margin-bottom: 25px;
  }

  .welcome-item {
    gap: 13px;
  }

  .welcome-item-icon {
    border-radius: 12px;
    height: 47px;
    width: 47px;
  }

  .welcome-item-icon svg {
    height: 23px;
    width: 23px;
  }

  .welcome-item-text {
    font-size: 12px;
    gap: 5px;
  }

  .welcome-item-text strong {
    font-size: 14px;
  }

  .welcome-cta-button {
    font-size: 18px;
    min-height: 45px;
  }

  .welcome-privacy {
    align-items: flex-start;
    font-size: 10px;
    text-align: left;
  }
}

.how-to-step {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.how-to-platform-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 16px;
}

.how-to-platform-main {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.how-to-platform-switch {
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  min-height: 44px;
  padding: 0;
}

.how-to-step-number {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.how-to-step-text {
  font-size: 14px;
  line-height: 1.6;
  padding-top: 4px;
}

.how-to-example-image-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 18px 0 2px;
  overflow: hidden;
}

.how-to-example-image-card img {
  display: block;
  height: auto;
  width: 100%;
}

.how-to-example-image-card span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  padding: 7px 10px 8px;
}

body[data-theme="dark"] .how-to-example-image-card {
  border-color: rgba(148, 163, 184, 0.24);
}

.how-to-use-content {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.how-to-use-section h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
}

.how-to-use-section p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.how-to-use-section ul {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 8px;
  padding-left: 20px;
}

.notice-list {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.notice-list-content {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.notice-list-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 7px;
  padding: 14px;
  text-align: left;
  touch-action: pan-y;
  width: 100%;
}

.notice-list-item.is-dismissed {
  display: none;
}

.notice-list-item.is-unread {
  border-color: rgba(0, 146, 56, 0.3);
  box-shadow: 0 10px 26px rgba(0, 146, 56, 0.08);
}

.notice-list-item.is-read {
  opacity: 0.72;
}

.notice-list-item strong {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.notice-list-item small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

.notice-list-badge {
  align-items: center;
  background: rgba(0, 146, 56, 0.1);
  border-radius: 999px;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 9px;
  width: fit-content;
}

.notice-list-item.is-read .notice-list-badge {
  background: rgba(100, 116, 139, 0.12);
  color: var(--muted);
}

.notice-list-action {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  margin-top: 4px;
}

.notice-list-empty {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0;
  padding: 16px;
  text-align: center;
}

.notice-detail-body {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  text-align: left;
}

.notice-detail-content {
  position: relative;
}

.notice-close-button {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 23px;
  font-weight: 500;
  height: 44px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 44px;
}

.notice-detail-content .welcome-title {
  padding: 0 38px;
}

.notice-detail-section {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.notice-detail-section h3 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 10px;
}

.notice-detail-section ul {
  color: var(--ink);
  display: grid;
  font-size: 14px;
  font-weight: 650;
  gap: 8px;
  line-height: 1.65;
  margin: 0;
  padding-left: 20px;
}

.notice-delete-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--danger);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  justify-self: center;
  min-height: 44px;
  padding: 0;
  width: 44px;
}

.notice-delete-button[hidden] {
  display: none;
}

.notice-delete-icon {
  align-items: center;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.notice-delete-icon svg {
  height: 19px;
  width: 19px;
}

.notify-dot[hidden] {
  display: none !important;
}

.notify-dot {
  background: #ef4444;
  border: 2px solid var(--home-card);
  border-radius: 999px;
  display: block;
  height: 8px;
  position: absolute;
  right: 7px;
  top: 7px;
  width: 8px;
  z-index: 2;
}

.primary-button, .ghost-button, .danger-button, .icon-button {

  border: 0;
  border-radius: 7px;
  min-height: 34px;
  padding: 0 16px;
}

.primary-button {

  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.primary-button:hover {

  background: var(--accent-dark);
}

.ghost-button {

  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.danger-button {

  background: #fee2e2;
  color: var(--danger);
  font-weight: 800;
}

.entry-delete-button {

  background: var(--surface);
  border: 1px solid rgba(239, 68, 68, 0.36);
  color: var(--danger);
}

.icon-button {

  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  font-size: 22px;
  padding: 0;
  place-items: center;
  width: 42px;
}

.view {

  display: none;
}

.view.active {

  display: block;
}

.analysis-coming-soon {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  min-height: 60vh;
  padding: 32px 16px;
  text-align: center;
}

.analysis-coming-soon-icon {
  font-size: 48px;
}

.analysis-coming-soon h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.analysis-coming-soon p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.analysis-coming-soon-sub {
  font-size: 14px;
  line-height: 1.6;
}

.analysis-form-button {
  background: var(--accent);
  border-radius: 12px;
  color: #fff;
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  margin-top: 8px;
  padding: 12px 32px;
  text-decoration: none;
}

.mobile-summary {

  display: none;
}

.filters {

  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

input, select, textarea {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-sizing: border-box;
  color: var(--ink);
  min-height: 40px;
  outline: none;
  padding: 7px 9px;
  width: 100%;
}

input::placeholder,
textarea::placeholder {

  color: #9ca3af;
  font-size: 0.72em;
  font-weight: 600;
  opacity: 1;
}

textarea {

  resize: vertical;
}

input:focus, select:focus, textarea:focus {

  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

.toggle-row {

  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
  margin-bottom: 16px;
}

.toggle-row input {

  accent-color: var(--accent);
  min-height: 18px;
  width: 18px;
}

.metric-grid {

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

.metric, .panel, .entry-form {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {

  padding: 14px;
}

.metric span {

  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

.metric strong {

  font-size: 24px;
}

.dashboard-grid, .entry-layout, .settings-grid {

  display: grid;
  gap: 10px;
}

.dashboard-grid {

  grid-template-columns: 1fr;
}

.entry-layout {

  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

.settings-grid {

  grid-template-columns: 1fr;
}

#settingsView .settings-grid {

  grid-template-columns: 1fr;
  width: 100%;
}

.panel-header, .form-header {

  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-header span {

  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pie-grid {

  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.compact-header {

  margin-bottom: 8px;
}

.period-banner {

  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 10px;
  text-align: center;
}

.pie-panel {

  overflow: hidden;
}

.pie-wrap {

  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(200px, 0.75fr) minmax(0, 1fr);
}

.pie-core {

  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  max-width: 250px;
  min-width: 190px;
  padding: 21px;
  place-items: center;
  width: 100%;
}

.pie-center {

  align-items: center;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(24, 33, 47, 0.08);
  display: grid;
  height: 100%;
  justify-items: center;
  padding: 12px;
  text-align: center;
  width: 100%;
}

.pie-center span {

  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.pie-center strong {

  font-size: 28px;
  line-height: 1.1;
}

.pie-center small {

  color: var(--muted);
  font-size: 17px;
  font-weight: 900;
}

.pie-legend {

  display: grid;
  gap: 6px;
}

.legend-header {

  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 10px;
  grid-template-columns: minmax(82px, 0.9fr) repeat(3, minmax(62px, 1fr));
  padding: 0 10px 2px 16px;
  text-align: right;
}

.legend-header span:first-child {

  text-align: left;
}

.pie-legend-item {

  align-items: center;
  display: grid;
  grid-template-columns: 1fr;
}

.legend-service {

  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--service-color, var(--accent));
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(82px, 0.9fr) repeat(3, minmax(62px, 1fr));
  min-height: 42px;
  padding: 7px 10px;
  text-align: left;
  width: 100%;
}

.legend-service:hover {

  background: var(--surface-soft);
}

.legend-service.active {

  background: var(--surface-soft);
  box-shadow: 0 0 0 3px rgba(24, 33, 47, 0.08);
}

.legend-name {

  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.legend-stat {

  font-size: 13px;
  font-weight: 950;
  text-align: right;
}

.back-button:hover {

  background: var(--surface-soft);
}

.pie-totals {

  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
}

.pie-totals div, .memo-card {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 4px;
  min-height: 52px;
  padding: 9px 10px;
  text-align: left;
}

.pie-totals span, .memo-card span {

  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.pie-totals strong, .memo-card strong {

  font-size: 15px;
}

.memo-card strong {

  max-height: 22px;
  overflow: hidden;
  white-space: pre-line;
}

.memo-card.expanded {

  grid-column: 1 / -1;
}

.memo-card.expanded strong {

  max-height: none;
}

.dashboard-memo-panel {

  display: grid;
  gap: 10px;
  margin: var(--home-card-gap, 10px) 0 0;
  min-width: 0;
  padding: 14px 58px 14px 16px;
  position: relative;
}

.dashboard-memo-panel[hidden] {

  display: none;
}

.dashboard-memo-head {

  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  min-width: 0;
}

.dashboard-memo-head > span {

  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-memo-icon-button {

  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  display: inline-flex;
  justify-content: center;
  padding: 0;
}

.dashboard-memo-toggle-button {

  height: 44px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
}

.dashboard-memo-edit-button {

  bottom: 14px;
  height: 32px;
  position: absolute;
  right: 64px;
  width: 32px;
}

.dashboard-memo-icon-button svg {

  display: block;
  height: 24px;
  width: 24px;
}

.dashboard-memo-edit-button svg {

  height: 16px;
  width: 16px;
}

.dashboard-memo-text {

  color: var(--ink);
  display: -webkit-box;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0;
  overflow: hidden;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-memo-text.is-empty {

  color: var(--muted);
}

.dashboard-memo-panel.expanded .dashboard-memo-text {

  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.day-edit-title {

  display: grid;
  gap: 2px;
  grid-column: 1 / -1;
}

.day-edit-form label {

  display: grid;
  gap: 5px;
}

.day-edit-memo {

  grid-column: 1 / -1;
}

.day-edit-actions {

  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
}

.day-edit-reset {

  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.summary-panel {

  margin-bottom: 12px;
}

.detail-toggle {

  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 12px;
}

.detail-toggle summary {

  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 950;
  justify-content: space-between;
  list-style: none;
  min-height: 42px;
  padding: 0 12px;
}

.detail-toggle summary::-webkit-details-marker {

  display: none;
}

.detail-toggle summary::after {

  color: var(--muted);
  content: "開く";
  font-size: 12px;
}

.detail-toggle[open] summary {

  margin-bottom: 12px;
}

.detail-toggle[open] summary::after {

  content: "閉じる";
}

.summary-strip, .month-total-strip {

  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-card {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 10px;
}

.summary-card span {

  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.summary-card strong {

  font-size: 16px;
  font-weight: 950;
}

.year-month-cell span {

  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.year-month-cell strong {

  font-size: 15px;
  font-weight: 950;
}

.year-month-cell small {

  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.year-month-cell.has-sales {

  border-color: rgba(15, 118, 110, 0.35);
}

.breakdown {

  display: grid;
  gap: 12px;
  margin: 0;
}

.breakdown div {

  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
}

.breakdown div:last-child {

  border-bottom: 0;
  padding-bottom: 0;
}

.breakdown dt {

  color: var(--muted);
  font-weight: 800;
}

.breakdown dd {

  font-size: 19px;
  font-weight: 900;
  margin: 0;
}

.entry-form {

  align-self: start;
  display: grid;
  gap: 12px;
}

.entry-form .form-header {

  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 0;
}

.entry-form .form-header h2 {

  flex: 0 0 auto;
  font-size: 17px;
  white-space: nowrap;
}

.entry-header-actions {

  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 5px;
  margin-left: auto;
}

.entry-area-card {

  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  line-height: 1;
  min-height: 38px;
  min-width: 0;
  overflow: hidden;
  padding: 0 6px;
  position: relative;
  width: 62px;
}

.entry-area-card select {

  cursor: pointer;
  inset: 0;
  opacity: 0;
  position: absolute;
}

.entry-area-card span {

  display: grid;
  min-width: 0;
  overflow: hidden;
  place-items: center;
  text-align: center;
  white-space: nowrap;
  width: 100%;
}

.entry-vehicle-card {

  padding: 0;
  width: 54px;
}

.entry-vehicle-card span {

  font-size: 17px;
  line-height: 1.2;
}

.entry-holiday-button {

  height: 38px;
  min-height: 38px;
  padding-inline: 8px;
}

.entry-header-actions .ghost-button,
.entry-header-actions .primary-button {

  font-size: 12px;
  font-weight: 800;
  height: 38px;
  line-height: 1;
  min-height: 38px;
  padding-inline: 8px;
}

.entry-holiday-button[aria-pressed="true"] {

  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--accent-dark);
}

.entry-form.is-holiday-locked .entry-service-fields {

  opacity: 0.56;
}

.entry-form.is-holiday-locked .entry-service-icons {

  opacity: 0.56;
  pointer-events: none;
}

.entry-form.is-holiday-locked input:disabled,
.entry-form.is-holiday-locked textarea:disabled,
.entry-form.is-holiday-locked select:disabled,
.entry-form.is-holiday-locked button:disabled {

  cursor: not-allowed;
}

.entry-top-save-button {

  min-width: 54px;
}

@media (max-width: 430px) {
  .entry-form {
    padding-inline: 14px;
  }

  .entry-form .form-header {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(62px, 1fr) max-content;
  }

  .entry-form .form-header h2 {
    font-size: 15px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .entry-header-actions {
    display: grid;
    flex-shrink: 1;
    gap: 3px;
    grid-template-columns: 40px 52px 42px 42px 44px;
    justify-content: end;
    min-width: 0;
  }

  .entry-area-card,
  .entry-vehicle-card,
  .entry-holiday-button,
  .entry-header-actions .ghost-button,
  .entry-header-actions .primary-button {
    box-sizing: border-box;
    font-size: 11px;
    height: 44px;
    min-width: 0;
    min-height: 44px;
    overflow: hidden;
    padding-inline: 0;
    width: auto;
  }

  .entry-holiday-button {
    font-size: 10.5px;
  }

  .entry-top-save-button {
    min-width: 0;
  }
}

@media (max-width: 340px) {
  .entry-form {
    padding-inline: 12px;
  }

  .entry-form .form-header {
    gap: 4px;
    grid-template-columns: minmax(48px, 1fr) max-content;
  }

  .entry-form .form-header h2 {
    font-size: 14px;
  }

  .entry-header-actions {
    gap: 2px;
    grid-template-columns: 36px 46px 36px 36px 44px;
  }

  .entry-area-card,
  .entry-vehicle-card,
  .entry-holiday-button,
  .entry-header-actions .ghost-button,
  .entry-header-actions .primary-button {
    font-size: 10px;
  }

  .entry-holiday-button {
    font-size: 9px;
  }
}

.form-grid {

  display: grid;
  gap: 10px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entry-adjustment-grid {

  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.entry-date-grid {

  grid-template-columns: minmax(0, 1fr);
}

.form-grid label {

  line-height: 1.2;
  min-width: 0;
}

.entry-distance-field,
.entry-work-time-field {
  display: grid;
  gap: 6px;
}

.entry-distance-control,
.entry-work-time-control {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 44px;
}

.entry-distance-control input,
.entry-work-time-control input {
  min-height: 44px;
}

.odometer-toggle-button,
.time-range-toggle-button {
  align-items: center;
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  display: inline-flex;
  height: 44px;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  width: 44px;
}

.odometer-toggle-button svg,
.time-range-toggle-button svg {
  height: 20px;
  width: 20px;
}

.odometer-toggle-button.active,
.odometer-toggle-button[aria-expanded="true"],
.time-range-toggle-button.active,
.time-range-toggle-button[aria-expanded="true"] {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--accent-dark);
}

.odometer-panel,
.time-range-panel {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px;
}

.odometer-panel[hidden],
.time-range-panel[hidden] {
  display: none;
}

.odometer-panel label,
.time-range-panel label {
  display: grid;
  gap: 6px;
  line-height: 1.2;
  min-width: 0;
}

.time-range-panel input {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding-inline: 10px;
  width: 100%;
}

.time-range-panel input::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

.odometer-result,
.time-range-result {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  grid-column: 1 / -1;
  line-height: 1.35;
  margin: 0;
}

.entry-adjustment-grid label {

  font-size: 11px;
}

.entry-field-group {

  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.entry-service-fields {

  border-top: 0;
  padding-top: 0;
}

.entry-field-group h3 {

  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

.entry-memo-field {

  display: grid;
  gap: 6px;
  line-height: 1.2;
}

#memo {

  font-size: 14.4px;
}

.entry-date-field {

  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  justify-self: stretch;
  max-width: none;
  width: 100%;
}

.entry-date-control {

  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: 44px 184px 44px;
  justify-content: center;
  justify-self: center;
  margin-inline: auto;
  max-width: 100%;
  width: max-content;
}

.entry-date-step-button {

  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  justify-self: center;
  min-width: 44px;
  padding: 0;
  width: 44px;
}

.entry-date-step-button svg {

  height: 22px;
  width: 22px;
}

.form-grid input, .form-grid select {

  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.entry-adjustment-grid input {

  min-height: 40px;
  padding-inline: 8px;
}

.form-grid input[type="date"]:not(.entry-date-native) {

  -webkit-appearance: none;
  appearance: none;
  display: block;
  inline-size: 100%;
  max-inline-size: 100%;
  overflow: hidden;
  text-align: left;
}

.form-grid input[type="date"]:not(.entry-date-native)::-webkit-date-and-time-value {

  margin: 0;
  min-width: 0;
  text-align: left;
}

.form-grid input[type="date"]:not(.entry-date-native)::-webkit-calendar-picker-indicator {

  margin: 0;
  padding: 0;
}

.entry-date-card-wrap {

  display: block;
  inline-size: 184px;
  justify-self: center;
  position: relative;
}

.entry-date-native {

  -webkit-appearance: none;
  appearance: none;
  block-size: 100%;
  cursor: pointer;
  height: 100%;
  inline-size: 100%;
  inset: 0;
  max-width: 100%;
  opacity: 0.01;
  position: absolute;
  width: 100%;
  z-index: 2;
}

.entry-date-display {

  align-items: center;
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-sizing: border-box;
  color: var(--ink);
  display: flex;
  font-size: 15.5px;
  font-weight: 800;
  inline-size: 184px;
  justify-content: center;
  line-height: 1.2;
  min-block-size: 44px;
  padding: 10px;
  pointer-events: none;
  position: relative;
  text-align: center;
  z-index: 1;
}

.field-label-line {
  align-items: center;
  display: inline-flex;
  gap: 3px;
}

.required-mark {
  color: #e53e3e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

table {

  border-collapse: collapse;
  min-width: 1020px;
  width: 100%;
}

th, td {

  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  white-space: nowrap;
}

th {

  color: var(--muted);
  font-size: 12px;
}

td {

  font-size: 14px;
}

.empty-state {

  color: var(--muted);
  padding: 22px 10px;
  text-align: center;
}

.settings-form {

  display: grid;
  gap: 14px;
}

.settings-link-card {

  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  height: 38px;
  max-height: 38px;
  min-height: 38px;
  margin: 0 16px;
  padding: 0 12px;
  text-align: center;
  text-decoration: none;
  width: calc(100% - 32px);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  font-weight: 700;
}

.settings-link-card svg {

  flex: 0 0 auto;
  height: 17px;
  width: 17px;
}

.service-panel {

  margin-top: 16px;
}

.service-grid {

  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card {

  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-top: 4px solid var(--service-color, var(--accent));
  border-radius: 8px;
  padding: 14px;
}

.service-card h3 {

  font-size: 15px;
  margin: 0 0 12px;
}

.service-card dl {

  display: grid;
  gap: 9px;
  margin: 0;
}

.service-card div {

  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.service-card dt {

  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.service-card dd {

  font-weight: 900;
  margin: 0;
}

.service-detail-card {

  background: var(--surface);
}

.setting-title {

  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin: 0 0 8px;
}

.platform-settings {

  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-settings {

  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#settingsView .platform-settings,
#settingsView .metric-settings {

  grid-template-columns: 1fr;
}

.platform-option {

  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-left: 5px solid var(--service-color, var(--accent));
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 900;
  gap: 8px;
  overflow: hidden;
}

.platform-option-row {

  align-items: center;
  display: block;
}

.custom-service-edit-button,
.custom-service-delete-button,
.service-order-button {

  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.custom-service-edit-button,
.service-order-button {

  color: var(--muted);
}

.custom-service-delete-button {

  color: var(--danger);
}

.custom-service-edit-button {

  color: var(--muted);
  margin-left: 0;
}

.custom-service-delete-button {

  margin-left: 0;
}

.service-order-actions {

  align-items: center;
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
}

.service-order-button[aria-disabled="true"] {

  cursor: default;
  opacity: 0.28;
}

.custom-service-edit-button svg,
.custom-service-delete-button svg,
.service-order-button svg {

  height: 16px;
  width: 16px;
}

.metric-option {

  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 900;
  gap: 8px;
  overflow: hidden;
}

#settingsView .platform-option,
#settingsView .metric-option {

  box-sizing: border-box;
  height: 44px;
  max-height: 44px;
  min-height: 44px;
  padding: 0 12px;
  width: 100%;
}

.platform-option input, .metric-option input {

  accent-color: var(--service-color, var(--accent));
  min-height: 18px;
  width: 18px;
}

.custom-service-form {

  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.custom-service-form[hidden] {

  display: none;
}

.custom-service-add-toggle {

  margin-top: 12px;
  width: 100%;
}

.custom-service-limit-message {

  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 10px 0 0;
}

.custom-service-restore-list {

  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.custom-service-restore-list[hidden] {

  display: none;
}

.custom-service-restore-list span {

  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.custom-service-restore-button {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  min-height: 34px;
  padding: 0 10px;
}

.custom-service-fields {

  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.45fr);
}

.custom-service-color-row {

  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.custom-service-color-button {

  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  min-width: 44px;
  padding: 0;
  width: 100%;
}

.custom-service-color-button span {

  background: var(--custom-service-color);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  display: block;
  height: 18px;
  width: 18px;
}

.custom-service-color-button[aria-pressed="true"] {

  border-color: var(--custom-service-color);
  box-shadow: inset 0 0 0 2px var(--custom-service-color);
}

.custom-service-actions {

  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 44px;
}

.custom-service-close-button {

  height: 44px;
  min-height: 44px;
  width: 44px;
}

.custom-service-close-button svg {

  height: 18px;
  width: 18px;
}

.service-detail-card h3 {

  color: var(--ink);
  font-size: 18px;
}

.service-detail-card dl {

  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-detail-card div {

  align-items: start;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  min-height: 64px;
  padding: 10px;
}

.service-detail-card dd {

  font-size: 18px;
}

@media (max-width: 980px) {

  .quick-stats {

    display: none;
  }

  .metric-grid, .dashboard-grid, .pie-grid, .service-grid, .summary-strip, .month-total-strip {

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

  .dashboard-grid, .entry-layout, .pie-grid, .settings-grid {

    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {

    background: var(--surface-soft);
  }

  .topbar {

    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
  }

  h1 {

    font-size: 24px;
  }

  .toolbar {

    justify-content: space-between;
  }

  .mobile-summary {

    background: #111827;
    border-radius: 8px;
    color: #f8fafc;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 14px;
  }

  .mobile-summary span {

    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-summary strong {

    font-size: 22px;
  }

  .filters {

    display: grid;
    grid-template-columns: 1fr;
  }

  .metric {

    box-shadow: 0 6px 18px rgba(24, 33, 47, 0.08);
  }

  .metric-grid {

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

  .pie-wrap {

    grid-template-columns: 1fr;
    justify-items: center;
  }

  .pie-core {

    max-width: 176px;
    min-width: 176px;
  }

  .pie-legend {

    width: 100%;
  }

  .pie-legend-item {

    grid-template-columns: 1fr;
  }

  .legend-service {

    grid-template-columns: 1fr 1fr;
  }

  .legend-header {

    display: none;
  }

  .legend-name {

    grid-column: 1 / -1;
  }

  .legend-stat {

    text-align: left;
  }

  .pie-totals {

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

  .day-edit-form {

    grid-template-columns: 1fr 1fr;
  }

  .day-edit-actions, .platform-settings {

    grid-template-columns: 1fr;
  }

  .summary-strip, .month-total-strip, .year-month-grid {

    grid-template-columns: 1fr;
  }

  .service-detail-card dl {

    grid-template-columns: 1fr;
  }

  .service-grid {

    grid-template-columns: 1fr;
  }

  .metric span {

    font-size: 12px;
  }

  .metric strong {

    font-size: 21px;
  }

}

/* Dashboard redesign */
body {

  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  background: #f8fafc;
}

body[data-theme="dark"] {

  color-scheme: dark;
  --accent: #1a9e8f;
  --accent-dark: #157a6e;
  --accent-soft: rgba(26, 158, 143, 0.16);
  --home-bg: #1c1c1e;
  --home-card: #2c2c2e;
  --home-line: #2d3a4f;
  --home-muted: #a7b3c5;
  --home-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  --home-text: #d8dee6;
  --ink: #cbd3dc;
  --line: #2d3a4f;
  --muted: #a7b3c5;
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  --surface: #2c2c2e;
  --surface-soft: #1c1c1e;
  --ui-line: #2d3a4f;
  --home-green: #35b85a;
  --ui-green: #35b85a;
  --ui-muted: #a7b3c5;
  --uber: #4ab8e8;
  --demae: #e03a2f;
  --rocket: #0970e6;
  --menu: #e8850a;
  background: var(--home-bg);
  color: var(--home-text);
}

body[data-theme="dark"] input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  accent-color: var(--accent);
  background: var(--accent);
  border: none;
  border-radius: 5px;
  flex-shrink: 0;
  height: 22px;
  min-height: 22px;
  position: relative;
  width: 22px;
}

body[data-theme="dark"] input[type="checkbox"]::after {
  border: 2.5px solid #d1d5db;
  border-right: none;
  border-top: none;
  content: "";
  height: 5px;
  left: 5px;
  position: absolute;
  top: 6px;
  transform: rotate(-45deg);
  width: 10px;
}

body[data-theme="dark"] input[type="checkbox"]:not(:checked) {
  background: #2c2c2e;
  border: 1.5px solid #3a3a3c;
}

body[data-theme="dark"] input[type="checkbox"]:not(:checked)::after {
  opacity: 0;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {

  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--ink);
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {

  color: #5b6068;
}

body[data-theme="dark"] .backup-warning {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.42);
  color: #d1d5db;
}

body[data-theme="dark"] .backup-warning strong {
  color: #f8fafc;
}

body[data-theme="dark"] .backup-warning p {
  color: #e5e7eb;
}

.app-shell {

  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {

  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 18px 18px 28px 0;
  border-right: 1px solid #e9eef5;
}

body[data-theme="dark"] .sidebar {

  background: rgba(15, 23, 42, 0.94);
  border-right-color: var(--line);
}

.brand {

  align-items: center;
  display: grid;
  gap: 12px;
  justify-items: center;
  padding-left: 18px;
  text-align: center;
}

.brand-mark {

  align-items: center;
  background: transparent;
  border-radius: 8px;
  color: var(--ui-green);
  display: grid;
  font-weight: 800;
  height: auto;
  place-items: center;
  width: auto;
  font-size: 44px;
}

.brand p {

  font-weight: 950;
  color: var(--ink);
  font-size: 17px;
}

.brand span, .quick-stats {

  display: none;
}

.nav-tabs {

  display: grid;
  gap: 14px;
}

.delivery-timer {

  background: var(--home-card);
  border: 2px solid rgba(0, 138, 18, 0.34);
  border-radius: 18px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  cursor: pointer;
  left: 12px;
  overflow: hidden;
  position: fixed;
  right: 12px;
  transform: translateY(0);
  transition: transform 0.24s ease, width 0.24s ease, border-radius 0.24s ease, box-shadow 0.24s ease;
  will-change: transform;
  z-index: 51;
}

.delivery-timer.is-expanded {

  transform: translateY(0);
}

.delivery-timer.is-collapsed {

  transform: translateY(0);
}

.delivery-timer.is-idle.is-collapsed {

  border-radius: 18px;
  left: auto;
  min-height: 56px;
  width: 56px;
}

.delivery-timer.is-idle.is-collapsed .delivery-timer-collapsed {

  min-height: 56px;
  padding: 0;
}

.delivery-timer.is-idle.is-collapsed .timer-fixed-toggle {

  right: 6px;
  top: 6px;
}

.delivery-timer.is-idle.is-collapsed .timer-fixed-toggle svg {

  height: 12.8px;
  width: 12.8px;
}

.delivery-timer-collapsed {

  align-items: center;
  display: flex;
  justify-content: flex-start;
  min-height: 54px;
  padding: 7px 72px 7px 13px;
}

.delivery-timer-collapsed[hidden],
.delivery-timer-expanded[hidden],
.timer-start-btn[hidden],
.timer-break-btn[hidden],
.timer-resume-btn[hidden],
.timer-end-btn[hidden],
.timer-clear-btn[hidden],
.timer-collapsed-status[hidden],
.timer-info[hidden],
.timer-status-dot[hidden],
.timer-collapsed-text[hidden],
.timer-minimize-btn[hidden] {

  display: none;
}

.timer-status-dot {

  background: var(--ui-green, #008a12);
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 8px;
  height: 8px;
  width: 8px;
}

.timer-status-dot.idle {

  background: #8e8e93;
}

.timer-status-dot.break {

  background: #c47a16;
}

.timer-toggle-btn {

  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px;
}

.timer-fixed-toggle {

  position: absolute;
  right: 52px;
  top: 13px;
  z-index: 1;
}

.timer-minimize-btn {

  position: absolute;
  right: 8px;
  top: 13px;
  z-index: 1;
}

.timer-minimize-btn svg {

  height: 16px;
  width: 16px;
}

.delivery-timer.is-idle .timer-fixed-toggle {

  right: 8px;
}

.delivery-timer:not(.is-idle):not(.is-minimized) .delivery-timer-collapsed {

  padding-right: 116px;
}

.delivery-timer.is-minimized {

  border-radius: 18px;
  height: 56px;
  left: auto;
  min-height: 56px;
  right: 12px;
  width: 56px;
}

.delivery-timer.is-minimized .delivery-timer-collapsed {

  justify-content: center;
  min-height: 56px;
  padding: 0;
}

.delivery-timer.is-minimized .timer-fixed-toggle,
.delivery-timer.is-minimized .timer-minimize-btn,
.delivery-timer.is-minimized .timer-collapsed-text,
.delivery-timer.is-minimized .timer-collapsed-time {

  display: none;
}

.delivery-timer.is-minimized .timer-collapsed-status {

  display: grid;
  grid-template-columns: 1fr;
  min-height: 56px;
  place-items: center;
  width: 56px;
}

.delivery-timer.is-minimized .timer-status-copy,
.delivery-timer.is-minimized .timer-status-line {

  display: grid;
  height: 56px;
  place-items: center;
  width: 56px;
}

.delivery-timer.is-minimized .timer-status-icon {

  height: 26px;
  width: 26px;
}

.delivery-timer-expanded {

  padding: 0 13px 13px;
}

.timer-info {

  display: grid;
  border-top: 1px solid var(--home-line, #e7ecf2);
  gap: 7px;
  margin-bottom: 10px;
  padding-top: 10px;
}

.timer-saved-row {

  align-items: center;
  border-top: 1px solid var(--home-line, #e7ecf2);
  color: var(--home-muted, #667085);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  line-height: 1.2;
  padding: 8px 0 0;
  white-space: nowrap;
}

.timer-saved-row[hidden] {

  display: none;
}

.timer-saved-item {

  align-items: center;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  min-width: 0;
}

.timer-saved-caption {

  align-items: center;
  color: var(--home-muted, #667085);
  display: inline-flex;
  font-size: 11.6px;
  font-weight: 760;
  gap: 3px;
  line-height: 1;
}

.timer-saved-icon {

  color: var(--home-muted, #667085);
  flex: 0 0 auto;
  height: 11.6px;
  width: 11.6px;
}

.timer-saved-row strong {

  align-items: center;
  color: var(--home-text, #111827);
  display: inline-flex;
  font-size: 14.3px;
  font-variant-numeric: tabular-nums;
  font-weight: 780;
  gap: 3px;
  line-height: 1;
}

.timer-saved-label {

  color: var(--home-muted, #667085);
  font-size: 11.6px;
  font-weight: 760;
  line-height: 1;
}

.timer-saved-divider {

  background: var(--home-line, #e7ecf2);
  display: block;
  height: 18px;
  width: 1px;
}

.timer-saved-sessions {

  display: grid;
  gap: 5px;
  padding-top: 1px;
}

.timer-saved-sessions[hidden] {

  display: none;
}

.timer-saved-session {

  align-items: center;
  color: var(--home-text, #111827);
  display: flex;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  justify-content: center;
  line-height: 1.2;
  min-width: 0;
  white-space: nowrap;
}

.timer-saved-session-count {

  color: var(--home-muted, #667085);
  flex: 0 0 auto;
  font-size: 11.6px;
  font-weight: 760;
  margin-right: 9px;
}

.timer-saved-session-time {

  align-items: center;
  display: inline-flex;
  gap: 10px;
  min-width: 0;
}

.timer-collapsed-text {

  color: var(--home-text);
  flex: 0 0 auto;
  font-size: 17.6px;
  font-weight: 800;
  line-height: 1.2;
}

.timer-collapsed-status {

  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 44px;
  width: 100%;
}

.timer-status-copy {

  display: grid;
  min-width: 0;
}

.timer-status-line {

  align-items: center;
  display: inline-flex;
  gap: 7px;
  min-width: 0;
}

.timer-status-icon {

  color: var(--accent);
  flex: 0 0 auto;
  height: 17.6px;
  width: 17.6px;
}

.timer-status-icon.break {

  color: #c47a16;
}

.timer-collapsed-time {

  color: var(--accent);
  font-size: clamp(22px, 5.8vw, 27px);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.timer-collapsed-time.break {

  color: #c47a16;
}

.timer-status-idle {

  color: var(--home-muted, #667085);
}

.timer-status-running {

  color: var(--home-text, #111827);
}

.timer-status-break {

  color: var(--home-text, #111827);
}

.timer-sub-label {

  color: var(--home-muted, #667085);
  font-size: 13.2px;
  font-weight: 760;
  line-height: 1.2;
}

.timer-info-summary {

  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
}

.timer-summary-item {

  align-items: center;
  display: flex;
  gap: 5.5px;
  justify-content: center;
  min-width: 0;
}

.timer-summary-icon {

  color: var(--home-muted, #667085);
  flex: 0 0 auto;
  height: 13.2px;
  width: 13.2px;
}

.timer-summary-divider {

  background: var(--home-line, #e7ecf2);
  display: block;
  height: 22px;
}

.timer-sub-time {

  color: var(--home-text, #111827);
  font-size: 15.4px;
  font-variant-numeric: tabular-nums;
  font-weight: 780;
  line-height: 1;
}

.timer-actions {

  border-top: 1px solid var(--home-line, #e7ecf2);
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 10px;
}

.timer-break-btn,
.timer-resume-btn,
.timer-end-btn,
.timer-clear-btn {

  align-items: center;
  background: var(--home-card, #fff);
  border: 1px solid var(--home-line, #e7ecf2);
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  gap: 5px;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  min-height: 44px;
  padding: 0 6px;
}

.timer-break-btn svg,
.timer-resume-btn svg,
.timer-end-btn svg,
.timer-clear-btn svg {

  height: 14px;
  width: 14px;
}

.timer-start-btn {

  align-items: center;
  background: transparent;
  border: 0;
  color: var(--home-text);
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  min-height: 44px;
  padding: 0;
  text-align: left;
  width: 100%;
}

.timer-start-icon {

  align-items: center;
  background: var(--ui-green);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 32px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.timer-start-copy {

  display: grid;
  gap: 3px;
}

.timer-start-title {

  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.timer-start-subtext {

  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.timer-resume-btn {

  color: var(--accent);
}

.timer-break-btn {

  color: #b7791f;
}

.timer-end-btn {

  color: #c92a2a;
}

.timer-clear-btn {

  color: #8a94a6;
}

body[data-theme="dark"] .delivery-timer {

  border-color: rgba(45, 184, 75, 0.34);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

body[data-theme="dark"] .timer-status-dot.break {

  background: #d19a3a;
}

body[data-theme="dark"] .timer-collapsed-time.break {

  color: #d6a24a;
}

body[data-theme="dark"] .timer-break-btn {

  color: #d6a24a;
}

body[data-theme="dark"] .timer-end-btn {

  color: #ff6b6b;
}

body[data-theme="dark"] .timer-clear-btn {

  color: #a7b3c5;
}

body[data-theme="dark"] .nav-tab {

  color: #cbd5e1;
}

.nav-tab.active, .nav-tab:hover {

  background: #ecfdf5;
  color: var(--ui-green);
}

body[data-theme="dark"] .nav-tab.active, body[data-theme="dark"] .nav-tab:hover {

  background: rgba(45, 184, 75, 0.1);
  color: var(--ui-green);
}

.topbar {

  align-items: center;
  display: none;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.back-button {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-weight: 900;
  margin-bottom: 14px;
  min-height: 40px;
  padding: 0 14px;
}

.home-back-icon-button {

  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.home-back-icon-button svg {

  height: 20px;
  width: 20px;
}

body[data-theme="dark"] .period-tabs {

  background: var(--surface);
  border-color: var(--line);
}

body[data-theme="dark"] .custom-period-button {

  border-color: var(--line);
}

.dashboard-actions {

  align-items: center;
  display: flex;
  gap: 12px;
}

.date-picker-input {

  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.compact-filters {

  display: none;
}

body[data-theme="dark"] .dashboard-metric {

  border-color: var(--line);
}

.dashboard-metric.accent-metric strong {

  color: var(--ui-green);
}

.service-overview .pie-wrap {

  display: block;
}

.service-table {

  display: grid;
}


body[data-theme="dark"] .service-bar-track {

  background: #3a3a3c;
  height: 7px !important;
}

body[data-theme="dark"] .notify-icon, body[data-theme="dark"] .share-icon {
  stroke: var(--home-text) !important;
}

body[data-theme="dark"] .sales-metric .sales-total-button,
body[data-theme="dark"] .sales-breakdown strong {
  color: var(--ui-green) !important;
}

body[data-theme="dark"] .monthly-goal-head strong,
body[data-theme="dark"] .monthly-goal-secondary-values strong,
body[data-theme="dark"] .monthly-goal-daily span,
body[data-theme="dark"] .monthly-goal-daily strong,
body[data-theme="dark"] .service-name-cell > span:not(.service-percent):not(.service-icon),
body[data-theme="dark"] .service-table-row > strong,
body[data-theme="dark"] .service-row-detail strong,
body[data-theme="dark"] .weekly-chart-head strong {
  color: var(--home-text) !important;
}

body[data-theme="dark"] .service-row-detail small {
  color: var(--home-muted) !important;
}

body[data-theme="dark"] .monthly-goal-track span,
body[data-theme="dark"] .weekly-bar-value,
body[data-theme="dark"] .weekly-bar-day:not(.active) .weekly-bar-value,
body[data-theme="dark"] .weekly-bar-day.active .weekly-bar-value {
  background: var(--ui-green) !important;
}

body[data-theme="dark"] .monthly-goal-track {
  background: #3a3a3c !important;
}

body[data-theme="dark"] .monthly-goal-daily {
  background: linear-gradient(90deg, rgba(45, 184, 75, 0.12), rgba(45, 184, 75, 0.04)) !important;
  border-color: rgba(45, 184, 75, 0.32) !important;
}

body[data-theme="dark"] .monthly-goal-secondary {
  border-color: rgba(226, 232, 240, 0.14) !important;
}

body[data-theme="dark"] .monthly-goal-secondary-values strong:last-child {
  color: var(--ui-green) !important;
}

body[data-theme="dark"] .goal-input-group span {
  color: #cbd5e1 !important;
}

body[data-theme="dark"] .goal-input-field {
  border-color: #3a4658 !important;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.08) !important;
}

body[data-theme="dark"] .primary-button,
body[data-theme="dark"] .analysis-form-button {
  color: #e5e7eb !important;
}

body[data-theme="dark"] .notice-detail-section {
  background: rgba(248, 250, 252, 0.06);
  border-color: rgba(226, 232, 240, 0.14);
}

body[data-theme="dark"] .notice-detail-section h3,
body[data-theme="dark"] .notice-detail-section ul {
  color: #f8fafc;
}

body[data-theme="dark"] .notice-list-item.is-unread {
  border-color: rgba(45, 212, 191, 0.32);
  box-shadow: 0 10px 26px rgba(45, 212, 191, 0.08);
}

body[data-theme="dark"] .notice-list-badge {
  background: rgba(45, 212, 191, 0.14);
  color: #99f6e4;
}

body[data-theme="dark"] .deal-list-item,
body[data-theme="dark"] .deal-detail-section,
body[data-theme="dark"] .deal-code-block {
  background: rgba(248, 250, 252, 0.06);
  border-color: rgba(226, 232, 240, 0.14);
}

body[data-theme="dark"] .deal-list-item {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(226, 232, 240, 0.24);
}

body[data-theme="dark"] .deal-list-text strong {
  color: #f8fafc;
}

body[data-theme="dark"] .deal-list-text small,
body[data-theme="dark"] .deal-chevron {
  color: #cbd5e1;
}

body[data-theme="dark"] .deal-benefit-badge {
  background: rgba(45, 212, 191, 0.16);
  border-color: rgba(94, 234, 212, 0.3);
  color: #99f6e4;
}

body[data-theme="dark"] .deal-pr-badge {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(226, 232, 240, 0.14);
}

body[data-theme="dark"] .deal-icon {
  background: rgba(45, 212, 191, 0.18);
  border-color: rgba(94, 234, 212, 0.3);
  color: #99f6e4;
}

body[data-theme="dark"] .deal-bonus-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(14, 165, 233, 0.08));
  border-color: rgba(56, 189, 248, 0.24);
}

body[data-theme="dark"] .deal-breakdown-list li {
  background: rgba(15, 23, 42, 0.22);
  border-color: rgba(45, 212, 191, 0.18);
}

body[data-theme="dark"] .notice-list-item.is-read .notice-list-badge {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

body[data-theme="dark"] .notice-close-button {
  background: rgba(248, 250, 252, 0.08);
  border-color: rgba(226, 232, 240, 0.16);
  color: #f8fafc;
}

body[data-theme="dark"] .notice-delete-button {
  color: #fecaca;
}

.service-bar-fill {

  background: linear-gradient(90deg, var(--service-color), color-mix(in srgb, var(--service-color) 74%, #ffffff));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 0;
  transition: width 0.18s ease;
}

.year-month-grid {

  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.year-month-cell {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 10px;
  text-align: left;
}

@media (max-width: 980px) {
  .app-shell {

    grid-template-columns: 1fr;
    padding-bottom: 86px;
  }

  .sidebar {
    display: contents;
  }

  body[data-theme="dark"] .sidebar {
    background: transparent;
  }

  .brand {

    display: none;
  }

  .service-overview .pie-wrap {

    gap: 24px;
    grid-template-columns: 1fr;
  }

  .pie-core {

    max-width: 240px;
    min-width: 240px;
  }
}

@media (max-width: 620px) {

  .dashboard-metric small {

    font-size: 11px;
  }

  .row-chevron {

    display: inline-grid;
  }

  .selected-detail-grid {

    grid-template-columns: 1fr;
  }
}

/* Compact mobile-first density pass */
:root {

  color-scheme: light;
  --ink: #18212f;
  --muted: #637083;
  --line: #dbe2eb;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --accent: #1a9e8f;
  --accent-dark: #157a6e;
  --accent-soft: rgba(26, 158, 143, 0.16);
  --ui-green: #008a12;
  --home-green: #008a12;
  --uber: #5ac8fa;
  --demae: #ff3b30;
  --rocket: #007aff;
  --menu: #ff9500;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

body[data-accent="deep"] {
  --accent: #048C5D;
  --accent-dark: #04734D;
  --accent-soft: rgba(4, 140, 93, 0.16);
  --ui-green: #048C5D;
  --home-green: #048C5D;
}

body[data-accent="forest"] {
  --accent: #15803D;
  --accent-dark: #166534;
  --accent-soft: rgba(21, 128, 61, 0.16);
  --ui-green: #15803D;
  --home-green: #15803D;
}

.ledger-calendar-weekdays span {

  color: var(--home-text, var(--ink));
}

.ledger-calendar-weekdays .weekday-0,
.ledger-calendar-cell.weekday-0 .calendar-day-number,
.ledger-calendar-cell.holiday .calendar-day-number {

  color: var(--danger);
}

.ledger-calendar-weekdays .weekday-6,
.ledger-calendar-cell.weekday-6 .calendar-day-number {

  color: var(--rocket);
}

.calendar-day-off-badge {

  align-self: center;
  color: var(--home-muted, #64748b);
  display: block;
  font-size: 10px;
  font-weight: 500;
  justify-self: center;
  line-height: 1;
  padding: 0;
}

.main {

  padding: 20px 24px 36px;
  margin: 0 auto;
  max-width: 1040px;
  width: 100%;
}

.calendar-button {

  align-items: center;
  aspect-ratio: 1;
  background-color: var(--home-card);
  background-image: url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='5.5' y='5' width='13' height='14' rx='2.4' stroke='%23111827' stroke-width='1.75'/%3E%3Cpath d='M8 9h8M9 3.8v3M15 3.8v3M8.7 12.2h6.6M8.7 15.3h4.3' stroke='%23111827' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 19px 19px;
  border: 1px solid var(--home-line);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  color: transparent;
  display: flex;
  font-size: 0;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  min-width: 38px;
  padding: 0;
  position: relative;
  width: 38px;
}

.dashboard-metric span {

  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel-toggle {

  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  gap: 4px;
  min-height: 28px;
  padding: 0;
}

.panel-toggle[hidden] {

  display: none;
}

.service-sort-control {

  position: relative;
}

.panel-toggle.icon-only {

  border-radius: 999px;
  font-size: 0;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.panel-toggle.icon-only span {

  display: none;
}

.panel-toggle::after {

  content: "⇅";
  font-size: 15px;
  line-height: 1;
}

.service-sort-control .panel-toggle::after {

  content: none !important;
}

.panel-toggle.active, .panel-toggle[aria-expanded="true"] {

  color: var(--ui-green);
}

.panel-toggle[aria-expanded="true"]::after {

  content: "×";
  font-size: 14px;
}

.panel-toggle:focus-visible {

  border-radius: 6px;
  outline: 2px solid rgba(22, 163, 74, 0.32);
  outline-offset: 3px;
}

.service-sort-menu {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
  display: grid;
  min-width: 104px;
  padding: 5px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
}

.service-sort-menu[hidden] {

  display: none;
}

.service-sort-menu button {

  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  padding: 0 9px;
  text-align: left;
}

.service-sort-menu button.active {

  background: rgba(22, 163, 74, 0.1);
  color: var(--ui-green);
}

.service-overview-panel, .calendar-panel {

  margin-bottom: 14px;
}

.service-table-row {

  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: var(
    --service-grid,
    minmax(112px, 0.8fr) minmax(160px, 1.3fr) repeat(3, minmax(64px, 0.55fr)) 14px
  );
}


.service-table-row strong {

  font-size: 14px;
  font-weight: 750;
}

.service-name-cell {

  align-items: center;
  display: flex;
  gap: 8px;
  text-align: left;
}

.service-name-cell > span:nth-child(2) {

  font-size: 15px;
  font-weight: 800;
}

.service-icon {

  align-items: center;
  background: var(--service-color);
  border-radius: 7px;
  color: #ffffff;
  display: inline-grid;
  font-size: 11px;
  font-weight: 950;
  height: 28px;
  place-items: center;
  width: 28px;
}

.service-bar-cell {

  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 46px;
}

.service-bar-track {

  background: #edf2f7;
  border-radius: 6px;
  display: block;
  height: 16px;
  overflow: hidden;
}

.service-percent {

  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.row-chevron {

  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.service-table-row .row-chevron {

  align-items: center;
  border-radius: 999px;
  color: var(--muted);
  display: inline-grid;
  font-size: 16px;
  font-weight: 850;
  height: 26px;
  justify-self: end;
  place-items: center;
  width: 26px;
}

.service-table-row .row-chevron:hover {

  background: var(--surface-soft);
  color: var(--ink);
}

.selected-service-detail {

  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.service-detail-only .selected-service-detail {

  padding-top: 0;
}

.selected-detail-grid {

  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.selected-detail-grid > div, .selected-detail-grid .memo-card {

  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  display: grid;
  gap: 6px;
  min-height: 60px;
  padding: 10px;
  text-align: left;
}

.day-edit-form {

  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px;
}

.day-edit-title span {

  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.day-edit-title small {

  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.day-edit-form input, .day-edit-form textarea {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  min-height: 38px;
  padding: 7px 9px;
  width: 100%;
}

.day-edit-form .day-edit-adjustment {

  font-size: 11px;
}

.day-edit-form .day-edit-adjustment input {

  min-height: 36px;
  padding-inline: 7px;
}

.day-edit-form textarea {

  min-height: 70px;
  resize: vertical;
}

.day-edit-save, .day-edit-reset {

  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
  min-height: 40px;
}

.week-cell {

  gap: 3px;
  justify-items: start;
}

.period-compact-chart {

  display: grid;
  gap: 10px;
}

.period-chart-item {

  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--home-line, #e7ecf2);
  color: var(--home-text);
  display: grid;
  gap: 7px;
  min-height: 50px;
  min-width: 0;
  padding: 0 0 10px;
  text-align: left;
}

.period-chart-item:last-child {

  border-bottom: 0;
  padding-bottom: 0;
}

.period-chart-info {

  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(48px, 0.62fr) minmax(96px, 1fr) minmax(44px, 0.5fr);
  line-height: 1.2;
  min-width: 0;
}

.period-chart-info span {

  color: var(--home-text);
  font-size: 12px;
  font-weight: 760;
}

.period-chart-info strong {

  color: var(--home-text);
  font-size: 12px;
  font-weight: 760;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.period-chart-info small {

  color: var(--home-muted);
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.period-chart-bar-area {

  display: block;
  height: 8px;
  overflow: hidden;
}

.period-chart-bar {

  background: var(--ui-green);
  border-radius: 999px;
  display: block;
  height: 100%;
}

.period-chart-item.is-empty .period-chart-bar {

  background: transparent;
}

.period-chart-item.active .period-chart-info span,
.period-chart-item.active .period-chart-info strong {

  color: var(--accent);
}

.bonus-summary {

  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
  padding-top: 12px;
}

.bonus-summary div {

  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 10px;
}

.bonus-summary span {

  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.bonus-summary strong {

  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.empty-chart {

  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 16px 0;
}

.nav-tab {

  background: transparent;
  border: 0;
  border-radius: 0 10px 10px 0;
  color: #334155;
  padding: 0 18px;
  text-align: left;
  align-items: center;
  display: flex;
  font-size: 15px;
  font-weight: 700;
  min-height: 46px;
}

label {

  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 5px;
  font-weight: 750;
}

.setting-title, .summary-card span, .pie-totals span, .memo-card span, th {

  font-weight: 750;
}

@media (max-width: 980px) {
  .main {

    padding: 14px 12px 24px;
  }

  .dashboard-actions {

    gap: 8px;
  }

  .dashboard-metric small {

    font-size: 12px;
    min-width: 42px;
    padding: 5px 7px;
  }

}

@media (max-width: 620px) {

  .dashboard-actions {

    justify-content: space-between;
  }

  .dashboard-metric span {

    font-size: 11px;
  }

  .service-table-row {

    gap: 5px 8px;
    grid-template-columns: 1fr auto auto;
    min-height: 68px;
    text-align: right;
    padding: 8px 0;
  }

  .service-name-cell {

    grid-column: 1 / -1;
  }

  .service-bar-cell {

    grid-column: 1 / -1;
  }

  .service-table-row strong {

    font-size: 13px;
  }

  .metric-settings, .platform-settings {

    grid-template-columns: 1fr;
  }

}

/* Final rhythm pass: keep every dashboard surface compact and vertically balanced. */
.dashboard-metrics {

  display: grid;
  align-items: stretch;
  gap: var(--home-card-gap, 10px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 16px;
}

.dashboard-metric {

  background: var(--surface);
  border: 1px solid #e8eef5;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 0;
  min-height: 92px;
  padding: 15px 18px;
  align-content: center;
}

.metric-item {

  display: grid;
  gap: 7px;
  min-width: 0;
}

.dashboard-metric small {

  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  line-height: 1.1;
  white-space: nowrap;
}

.sales-followup-action {

  align-self: center;
  background: rgba(4, 140, 93, 0.1);
  border: 1px solid rgba(4, 140, 93, 0.18);
  border-radius: 999px;
  color: #048c5d;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  min-height: 44px;
  padding: 0 14px;
}

.sales-total-row {

  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel, .entry-form {

  padding: 16px;
  border-color: #e8eef5;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

#settingsView .panel {

  box-sizing: border-box;
  padding: 16px;
  width: 100%;
}

.deals-panel h2 {

  font-size: 17px;
  font-weight: 800;
  margin: 0 0 12px;
}

#dealsList {

  display: grid;
  gap: 8px;
}

.deal-list-item {

  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 5px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  min-height: 58px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.calendar-deal-section {

  margin-top: 12px;
}

.calendar-deal-card {

  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.deal-icon {

  align-items: center;
  background: rgba(4, 140, 93, 0.1);
  border: 1px solid rgba(4, 140, 93, 0.16);
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.deal-icon svg {

  height: 16px;
  width: 16px;
}

.deal-list-text {

  display: grid;
  gap: 3px;
  min-width: 0;
}

.deal-list-text strong {

  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-list-text small {

  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.deal-pr-badge {

  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  margin-right: 5px;
  padding: 3px 5px;
  vertical-align: 2px;
}

.deal-benefit-badge {

  background: rgba(4, 140, 93, 0.12);
  border: 1px solid rgba(4, 140, 93, 0.18);
  border-radius: 999px;
  color: #048c5d;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  padding: 4px 6px;
  white-space: nowrap;
}

.deal-chevron {

  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
}

.deal-chevron svg {

  height: 16px;
  width: 16px;
}

.deal-detail-page {

  display: grid;
  gap: 16px;
  padding: 56px 16px 120px;
}

.deal-detail-page h1 {

  color: var(--ink);
  font-size: 26px;
  font-weight: 950;
  line-height: 1.25;
  margin: 0;
}

.deal-detail-intro {

  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.8;
  margin: 0;
}

.deal-detail-pr {

  justify-self: start;
  margin: 0;
}

.deal-bonus-box {

  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(125, 211, 252, 0.08));
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 14px;
  display: grid;
  gap: 6px;
  padding: 18px;
  text-align: center;
}

.deal-bonus-box span {

  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.deal-bonus-box strong {

  color: var(--ui-green);
  font-size: 46px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.deal-bonus-box small {

  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.deal-breakdown-list {

  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.deal-breakdown-list li {

  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(4, 140, 93, 0.14);
  border-radius: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  padding: 8px 9px;
}

.deal-breakdown-section {

  gap: 8px;
  padding: 12px;
}

.deal-breakdown-section h2 {

  font-size: 13px;
}

.deal-detail-section {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.deal-detail-section h2 {

  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  margin: 0;
}

.deal-steps {

  counter-reset: deal-step;
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.deal-steps li {

  align-items: start;
  color: var(--ink);
  counter-increment: deal-step;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  line-height: 1.6;
}

.deal-steps li::before {

  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  color: #ffffff;
  content: counter(deal-step);
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  height: 26px;
  justify-content: center;
  margin-top: 1px;
  width: 26px;
}

.deal-step-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.deal-step-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.deal-step-description {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.deal-detail-actions {

  display: grid;
  gap: 12px;
}

.deal-code-block {

  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.deal-code-label {

  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  grid-column: 1 / -1;
}

.deal-code {

  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.deal-copy-button,
.deal-link-button {

  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  text-align: center;
}

.deal-copy-button {

  padding: 0 14px;
  white-space: nowrap;
}

.deal-link-button {

  box-sizing: border-box;
  text-decoration: none;
  width: 100%;
}

.deal-notes {

  color: var(--ink);
  display: grid;
  font-size: 12px;
  font-weight: 750;
  gap: 6px;
  line-height: 1.55;
  margin: 0;
  padding-left: 1.15em;
}

.deal-disclosure {

  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0;
}

.deal-calendar-hide-button {

  align-items: center;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  width: 100%;
}

.deal-calendar-hide-button svg {

  height: 17px;
  width: 17px;
}

.panel-header {

  margin-bottom: 12px;
}

.panel-header h2 {

  font-size: 17px;
  font-weight: 800;
}

.service-table-row {

  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  min-height: 54px;
  padding: 0;
  text-align: right;
}

@media (max-width: 980px) {
  .dashboard-metrics {

    gap: var(--home-card-gap, 10px);
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  }

  .dashboard-metric {

    min-height: 84px;
    padding: 13px 14px;
  }

  .panel, .entry-form {

    padding: 13px;
  }
}

@media (max-width: 620px) {
  .dashboard-metrics {

    grid-template-columns: 1fr;
  }

  .dashboard-metric {

    gap: 10px;
    min-height: 78px;
    padding: 12px;
  }

  .bonus-summary {

    grid-template-columns: 1fr;
  }
}

/* Smartphone-first polish: tighter density, calmer type, and less desktop spacing. */
@media (max-width: 720px) {
  html {

    -webkit-text-size-adjust: 100%;
  }

  body[data-theme="dark"] .sidebar {

    background: rgba(15, 23, 42, 0.98);
  }

  .brand, .quick-stats {

    display: none;
  }

  .panel, .entry-form {

    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.055);
    padding: 12px;
  }

  .service-name-cell, .service-bar-cell {

    grid-column: 1 / -1;
  }

  .service-name-cell > span:nth-child(2) {

    font-size: 14px;
    font-weight: 760;
  }

  .service-percent, .service-table-row strong {

    font-size: 12px;
    font-weight: 720;
  }

  .service-table-row .row-chevron {

    font-size: 15px;
  }

  .selected-detail-grid {

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

  .selected-detail-grid .memo-card {

    grid-column: 1 / -1;
  }

  .entry-layout, .settings-grid {

    gap: 10px;
    grid-template-columns: 1fr;
  }

  .platform-settings, .metric-settings {

    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {

    gap: 10px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-adjustment-grid {

    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  label, .setting-title {

    font-size: 11px;
    font-weight: 700;
  }

  input, select, textarea {

    border-radius: 8px;
    font-size: 16px;
    min-height: 38px;
    padding: 7px 9px;
  }

  textarea {

    min-height: 76px;
  }

  .form-actions, .data-actions {

    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .backup-actions {

    grid-template-columns: 1fr;
  }

  .primary-button, .ghost-button, .danger-button {

    border-radius: 9px;
    min-height: 38px;
    padding: 0 12px;
  }

  .deal-copy-button,
  .deal-link-button {

    min-height: 44px;
  }

  table {

    font-size: 12px;
    min-width: 820px;
  }

  th, td {

    padding: 8px 6px;
  }

  .confirm-card {

    border-radius: 16px;
    padding: 16px;
    width: min(100%, 320px);
  }
}

/* Home redesign for phones: reference-style white cards, green accent, no horizontal drift. */
@media (max-width: 720px) {
  * {

    max-width: 100%;
  }

  .app-shell {
  display: block;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

  .dashboard-metric {
  background: var(--home-card);
  border: 1px solid var(--home-line);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.065);
  min-height: 86px;
  padding: 14px 13px;
}

  .metric-item {
  align-content: center;
  display: grid;
  gap: 11px;
}

  .service-table {

    overflow: hidden;
  }


  .service-table-row.active {

    background: transparent;
  }

  .service-name-cell {

    align-items: center;
    display: contents;
  }

  .service-name-cell > span:nth-child(2) {

    align-self: end;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
  }

  .panel-link {

    align-items: center;
    background: transparent;
    border: 0;
    color: var(--ui-green);
    cursor: pointer;
    display: flex;
    font-size: 14px;
    font-weight: 850;
    justify-content: space-between;
    min-height: 44px;
    padding: 12px 0 0;
    text-align: left;
    width: 100%;
  }

  .panel-link span {

    color: var(--ui-green);
    font-size: 26px;
    line-height: 1;
  }

}

@media (max-width: 380px) {

  .service-icon {

    height: 30px;
    width: 30px;
  }
}

/* Exact reference pass for the phone home screen. Keep behavior, tighten visual parity. */
@media (max-width: 720px) {
  body {
  font-size: 14px;
  line-height: 1.42;
  color: var(--home-text);
  overflow-x: hidden;
  background: var(--home-bg);
}

  .main {
  max-width: none;
  padding: 18px 16px 34px;
}

  .dashboard-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(104px, 1fr) 46px;
}

  .dashboard-metrics {
  display: grid;
  gap: var(--home-card-gap, 10px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

  .dashboard-metric small {
  color: #334155;
  line-height: 1;
  text-align: left;
  font-size: 14px;
  font-weight: 800;
}

  .service-overview-panel, .calendar-panel {
  background: var(--home-card);
  border: 1px solid var(--home-line);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.065);
  border-radius: 14px;
  margin-bottom: 20px;
  padding: 22px 26px 18px;
}

  .panel-header {
  align-items: center;
  margin-bottom: 18px;
}

  .panel-header h2 {
  color: #0f172a;
  font-size: 20px;
  font-weight: 850;
}

  #serviceSortToggle {

    display: none;
  }

  .service-table-row {
  display: grid;
  gap: 6px 8px;
  grid-template-columns: 44px minmax(156px, 1.65fr) minmax(76px, 0.72fr) minmax(48px, 0.45fr) minmax(76px, 0.62fr) 18px !important;
}


  .service-table-row {
  gap: 6px 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e8eef5;
  border-radius: 0;
  text-align: right;
  grid-template-rows: 30px 24px;
  min-height: 102px;
  padding: 17px 0;
}

  .service-icon {
  align-self: center;
  font-weight: 850;
  grid-column: 1;
  grid-row: 1 / 3;
  justify-self: start;
  border-radius: 8px;
  font-size: 18px;
  height: 40px;
  width: 40px;
}

  .service-name-cell > span:nth-child(2) {

    font-size: 18px;
    font-weight: 820;
  }

  .service-bar-cell {
  align-self: center;
  display: grid;
  gap: 5px;
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr) 54px;
}

  .service-bar-track {
  background: #edf2f7;
  height: 11px;
}

  .service-percent {
  color: #475569;
  text-align: right;
  font-size: 13px;
  font-weight: 760;
}

  .service-table-row strong {
  align-self: center;
  color: #0f172a;
  grid-row: 1 / 3;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
}

  .service-table-row .row-chevron {
  align-self: center;
  grid-column: 6;
  grid-row: 1 / 3;
  height: 28px;
  color: #334155;
  font-size: 28px;
  width: 18px;
}

  .service-detail-link {

    display: none;
  }

}

@media (max-width: 520px) {
  .main {

    padding-left: 16px;
    padding-right: 16px;
  }

  .dashboard-actions {

    grid-template-columns: minmax(92px, 1fr) 44px;
  }

  .dashboard-metrics {

    gap: var(--home-card-gap, 10px);
  }

  .dashboard-metric small {

    font-size: 12px;
  }

  .service-overview-panel, .calendar-panel {

    padding-left: 18px;
    padding-right: 18px;
  }

  .service-table-row {

    grid-template-columns: 38px minmax(108px, 1.35fr) minmax(62px, 0.65fr) minmax(40px, 0.42fr) minmax(62px, 0.58fr) 16px !important;
  }

  .service-table-row {

    min-height: 88px;
    padding: 14px 0;
  }

  .service-icon {

    font-size: 16px;
    height: 34px;
    width: 34px;
  }

  .service-name-cell > span:nth-child(2) {

    font-size: 15px;
  }

  .service-bar-cell {

    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .service-percent {

    font-size: 11px;
  }

  .service-table-row strong {

    font-size: 12px;
  }

}

@media (max-width: 380px) {
}

/* iPhone reality pass: readable, stable, reference-inspired home screen. */
@media (max-width: 560px) {

  .app-shell {

    display: block !important;
    padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
  }

  .topbar, .brand, .quick-stats, .compact-filters {

    display: none !important;
  }

  .service-overview-panel, .calendar-panel, .entry-form, .panel {

    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.065) !important;
  }


  .service-name-cell > span:nth-child(2) {

    align-self: end !important;
    color: #0f172a !important;
    font-size: 15px !important;
    font-weight: 820 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    min-width: 0 !important;
  }

  .service-detail-link {

    display: none !important;
  }

}

@media (max-width: 380px) {
}

/* iPhone balance pass: smaller type, tighter cards, stronger service bars. */
@media (max-width: 560px) {

  .service-name-cell > span:nth-child(2) {

    font-size: 13px !important;
  }

}

@media (max-width: 380px) {
}

/* Compact calm pass: less visual pressure on real iPhone screens. */
@media (max-width: 560px) {

  .service-name-cell > span:nth-child(2) {

    font-size: 12px !important;
    font-weight: 790 !important;
  }

}

@media (max-width: 380px) {

  .service-overview-panel, .calendar-panel {

    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* iPhone balance pass: tighter width, quieter type, fixed action rail */
@media (max-width: 560px) {
  html, body {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

  body {
  background: var(--home-bg) !important;
  color: var(--home-text) !important;
}

  .panel-header {
  margin: 0 0 18px !important;
  align-items: center !important;
  margin-bottom: 12px !important;
}

  .panel-header h2 {
  color: var(--home-text) !important;
  line-height: 1.2 !important;
  font-size: 17px !important;
  font-weight: 760 !important;
  letter-spacing: 0 !important;
}
  .service-sort-menu button {

    font-size: 11px !important;
    min-height: 34px !important;
  }

  .service-name-cell > span:nth-child(2) {

    font-size: 12px !important;
    font-weight: 740 !important;
  }

  .panel-link {

    display: none !important;
  }

}

@media (max-width: 380px) {

  .service-table-row strong, .service-percent {

    font-size: 8px !important;
  }
}

/* Apple-like density polish: quieter sections, lighter icons, tighter vertical rhythm */
@media (max-width: 560px) {

  .metric-item {
  align-content: center !important;
  display: grid !important;
  min-width: 0 !important;
  gap: 5px !important;
}

  .service-sort-menu {
  border-radius: 10px !important;
  min-width: 92px !important;
  right: 0 !important;
  top: 34px !important;
}

  .service-name-cell > span:nth-child(2) {

    font-size: 11.5px !important;
  }

}

@media (max-width: 380px) {
}

/* Native-app refinement from design brief */
@media (max-width: 560px) {

  .view {
  gap: 10px !important;
}

  .service-overview-panel, .calendar-panel {
  margin: 0 0 18px !important;
  border: 1px solid var(--home-line) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055) !important;
  border-radius: 13px !important;
  margin-bottom: 10px !important;
  padding: 11px 13px 12px !important;
}

  #serviceSortToggle span, #serviceSortToggle::after {

    content: none !important;
    display: none !important;
  }
  .service-name-cell > span:nth-child(2) {

    font-size: 11px !important;
    font-weight: 720 !important;
  }

  .service-table-row strong, .service-percent {
  font-size: 7.8px !important;
  font-weight: 720 !important;
}

}

@media (max-width: 380px) {
}

/* Alignment pass: right-anchored actions, clearer service columns, larger secondary text */
@media (max-width: 560px) {


  .service-name-cell > span:nth-child(2) {

    font-size: 12.5px !important;
    font-weight: 740 !important;
  }

}

@media (max-width: 380px) {

  .service-table-row strong {

    font-size: 8.2px !important;
  }
}

@media (max-width: 560px) {

  .service-table-row strong {
  align-self: center !important;
  color: #0f172a !important;
  grid-row: 1 / 3 !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  font-weight: 740 !important;
  justify-self: end !important;
  line-height: 1.15 !important;
  text-align: right !important;
  font-size: 9.2px !important;
}

}

/* iOS minimal pass: remove service icons and lock numeric columns */
@media (max-width: 560px) {
  .main {
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto !important;
  padding-top: 18px !important;
  padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
  max-width: 440px !important;
  padding: 16px 20px calc(76px + env(safe-area-inset-bottom)) !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
}





  .service-icon {
  align-self: center !important;
  font-weight: 850 !important;
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  justify-self: start !important;
  border-radius: 7px !important;
  font-size: 10.5px !important;
  height: 28px !important;
  width: 28px !important;
  display: none !important;
}

  .service-name-cell {
  display: contents !important;
  gap: 7px !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
}

  .service-name-cell > span:nth-child(2) {

    color: var(--home-text) !important;
    font-size: 13.2px !important;
    font-weight: 760 !important;
  }

  .service-bar-cell {
  align-self: center !important;
  display: grid !important;
  gap: 8px !important;
  grid-column: 1 !important;
  grid-row: 2 !important;
  grid-template-columns: minmax(0, 1fr) 36px !important;
}

  .service-table-row > strong:nth-of-type(1) {

    grid-column: 2 !important;
  }

  .service-table-row > strong:nth-of-type(2) {

    grid-column: 3 !important;
  }

  .service-table-row > strong:nth-of-type(3) {

    grid-column: 4 !important;
  }

  .service-table-row .row-chevron::before {

    content: none !important;
  }

  .calendar-title-picker {
  align-items: center !important;
  background-color: var(--home-card) !important;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='5.5' y='5' width='13' height='14' rx='2.4' stroke='%235B6472' stroke-width='1.7'/%3E%3Cpath d='M8 9h8M9 3.8v3M15 3.8v3M8.8 12.3h2.4M12.8 12.3h2.4M8.8 15.5h2.4' stroke='%235B6472' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 18px 18px !important;
  border: 1px solid rgba(212, 221, 231, 0.95) !important;
  border-radius: 8px !important;
  box-shadow: 0 5px 13px rgba(15, 23, 42, 0.04) !important;
  display: inline-flex !important;
  justify-content: center !important;
  padding: 0 !important;
  height: 28px !important;
  width: 28px !important;
}

}

@media (max-width: 380px) {
  .main {

    padding-left: 17px !important;
    padding-right: 17px !important;
  }

  .service-name-cell > span:nth-child(2) {

    font-size: 12.4px !important;
  }

  .service-bar-cell {

    grid-template-columns: minmax(0, 1fr) 32px !important;
  }
}

@media (max-width: 560px) {

  .service-table-row > strong:nth-of-type(1) {

    grid-column: 2 !important;
  }

  .service-table-row > strong:nth-of-type(2) {

    grid-column: 3 !important;
  }

  .service-table-row > strong:nth-of-type(3) {

    grid-column: 4 !important;
  }
}

@media (max-width: 380px) {
}

@media (max-width: 380px) {

  .dashboard-actions {

    grid-template-columns: 102px 35px !important;
  }
}

@media (max-width: 560px) {

  .service-table-row .row-chevron::before {

    content: none !important;
  }
}

@media (max-width: 380px) {

  .service-table-row .service-name-cell {

    width: 100px !important;
  }
}

/* Type scale correction: keep sales primary, normalize date and metric values */
@media (max-width: 560px) {

  .dashboard-metric small {
  display: block !important;
  padding: 0 !important;
  line-height: 1.1 !important;
  color: #667085 !important;
  font-size: 9.5px !important;
  font-weight: 680 !important;
}
}

@media (max-width: 380px) {
}

/* Compact type pass requested: reduce header and metric pressure */
@media (max-width: 560px) {

  .dashboard-actions {
  align-self: center !important;
  display: grid !important;
  gap: 8px !important;
  justify-self: end !important;
  margin: 0 !important;
  grid-template-columns: 92px 34px !important;
}

  .dashboard-metrics {
  display: grid !important;
  margin: 0 0 18px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--home-card-gap) !important;
  margin-bottom: 9px !important;
}

  .dashboard-metric {
  background: var(--home-card) !important;
  box-sizing: border-box;
  min-width: 0 !important;
  border: 1px solid var(--home-line) !important;
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.055) !important;
  border-color: rgba(214, 222, 232, 0.9) !important;
  border-radius: 11px !important;
  padding: 8px 12px !important;
}

}

@media (max-width: 380px) {
}

@media (max-width: 560px) {

}

@media (max-width: 380px) {
}

/* Correct sales breakdown target and final compact type scale */
@media (max-width: 560px) {

}

@media (max-width: 380px) {
}

/* Service section alignment pass */
@media (max-width: 560px) {

  .service-sort-control {
  z-index: 3 !important;
  position: static !important;
  right: auto !important;
  top: auto !important;
}

  .service-overview {
  padding-top: 0 !important;
}

  .service-table {
  overflow: hidden !important;
  width: 100% !important;
}







  .service-name-cell > span:nth-child(2) {

    color: var(--home-text) !important;
    font-size: 12.5px !important;
    font-weight: 750 !important;
    line-height: 1 !important;
  }

  .service-percent {
  color: #667085 !important;
  font-size: 8.8px !important;
  font-weight: 700 !important;
  justify-self: end !important;
  text-align: right !important;
}

  .service-table-row > strong:nth-of-type(1) {

    grid-column: 2 !important;
  }

  .service-table-row > strong:nth-of-type(2) {

    grid-column: 3 !important;
  }

  .service-table-row > strong:nth-of-type(3) {

    grid-column: 4 !important;
  }

}

@media (max-width: 380px) {

  .service-name-cell > span:nth-child(2) {

    font-size: 11.8px !important;
  }

  .service-percent {

    font-size: 8px !important;
  }
}

/* Service compact header/row refinement */
@media (max-width: 560px) {
  #serviceSortToggle {
  align-items: center !important;
  border: 1px solid #e1e8f0 !important;
  display: inline-flex !important;
  justify-content: center !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(212, 221, 231, 0.95) !important;
  border-radius: 9px !important;
  color: #566174 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  height: 20px !important;
  min-height: 20px !important;
  width: 20px !important;
}
  #serviceSortToggle::after {
    content: none !important;
  }

  #serviceSortToggle svg {
    display: block !important;
    fill: none !important;
    height: 14px !important;
    stroke: currentColor !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-width: 2 !important;
    width: 14px !important;
  }

  .service-table-row {
  gap: 4px !important;
  display: grid !important;
  column-gap: 5px !important;
  grid-template-columns: minmax(112px, 1fr) 48px 31px 48px 14px !important;
}



  .service-table-row {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #e7edf5 !important;
  border-radius: 0 !important;
  text-align: right !important;
  align-items: center !important;
  position: relative !important;
  grid-template-rows: 18px 12px !important;
  min-height: 46px !important;
  padding: 6px 0 !important;
}

  .service-table-row .service-name-cell {
  left: auto !important;
  position: static !important;
  text-align: left !important;
  top: auto !important;
  width: auto !important;
  align-items: baseline !important;
  display: inline-flex !important;
  gap: 6px !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
}

  .service-name-cell > span:nth-child(2) {

    font-size: 13px !important;
    font-weight: 750 !important;
  }

  .service-name-cell .service-percent {

    color: #667085 !important;
    display: inline !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .service-table-row .service-bar-cell {
  bottom: auto !important;
  display: grid !important;
  gap: 8px !important;
  left: auto !important;
  position: static !important;
  grid-column: 1 !important;
  grid-row: 2 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 88px !important;
}

  body:not([data-theme="dark"]) .service-bar-track {
  background: #edf1f5 !important;
  height: 6px !important;
}

  .service-table-row > strong {
  align-self: center !important;
  font-weight: 760 !important;
  justify-self: end !important;
  line-height: 1 !important;
  text-align: right !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  grid-row: 1 / 3 !important;
}

  .service-table-row .row-chevron {
  align-items: center !important;
  justify-content: flex-end !important;
  position: relative !important;
  color: #626b7c !important;
  display: inline-flex !important;
  overflow: hidden !important;
  align-self: center !important;
  grid-column: 5 !important;
  justify-self: end !important;
  min-width: 18px !important;
  width: 18px !important;
  grid-row: 1 / 3 !important;
  height: 18px !important;
}

  .service-table-row .row-chevron svg {
  display: block !important;
  height: 16px !important;
  width: 16px !important;
}
}

@media (max-width: 380px) {
  .service-table-row {

    gap: 6px;
    grid-template-columns: minmax(98px, 1fr) 44px 28px 44px 13px !important;
    column-gap: 5px !important;
  }

  .service-name-cell > span:nth-child(2) {

    font-size: 10.8px !important;
  }
}

/* Service table final alignment: title, headers, sort, and values share one row */
@media (max-width: 700px) {

  .service-overview-panel .service-sort-control {

    grid-column: 5 !important;
    justify-self: end !important;
    position: static !important;
  }

  #serviceSortToggle {

    height: 20px !important;
    min-height: 20px !important;
    width: 20px !important;
  }
  .service-overview {

    padding-top: 0 !important;
  }






  .service-name-cell > span:nth-child(2) {

    font-size: 13px !important;
    font-weight: 750 !important;
    line-height: 1 !important;
  }

  .service-table-row > strong:nth-of-type(1) {

    grid-column: 2 !important;
  }

  .service-table-row > strong:nth-of-type(2) {

    grid-column: 3 !important;
  }

  .service-table-row > strong:nth-of-type(3) {

    grid-column: 4 !important;
  }

}

@media (max-width: 380px) {

  .service-name-cell > span:nth-child(2) {

    font-size: 11px !important;
  }
}

/* Service table readability pass: larger row text, aligned percent, longer bars */
@media (max-width: 700px) {

  .service-name-cell > span:nth-child(2) {

    font-size: 13px !important;
    font-weight: 760 !important;
    line-height: 1 !important;
  }

  .service-table-row .row-chevron {
  align-self: center !important;
  grid-column: 5 !important;
  grid-row: 1 / 3 !important;
  height: 18px !important;
  justify-self: end !important;
  margin-right: 0 !important;
  min-width: 18px !important;
  width: 18px !important;
}
}

@media (max-width: 380px) {


  .service-name-cell > span:nth-child(2) {

    font-size: 15px !important;
  }

  .service-name-cell .service-percent {

    font-size: 10.5px !important;
  }
}

/* Fix service name / percentage ordering after earlier grid rules */
@media (max-width: 700px) {
  .service-table-row .service-name-cell > span:nth-child(2) {

    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    order: 1 !important;
  }

  .service-table-row .service-name-cell .service-percent {

    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    order: 2 !important;
    text-align: left !important;
  }
}

/* Service table balance for 6-digit sales values */
@media (max-width: 700px) {
  .service-table-row {
  grid-template-columns: minmax(136px, 1fr) 62px 32px 48px 18px !important;
}

  .service-table-row .service-name-cell {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  gap: 7px !important;
  line-height: 1 !important;
  align-items: baseline !important;
  column-gap: 6px !important;
  display: grid !important;
  grid-template-columns: max-content max-content !important;
}

  .service-name-cell > span:nth-child(2), .service-name-cell .service-percent {

    font-size: 13px !important;
    font-weight: 720 !important;
    line-height: 1 !important;
  }

  .service-name-cell > span:nth-child(2) {

    color: var(--home-text) !important;
  }

  .service-name-cell .service-percent {
  display: inline !important;
  white-space: nowrap !important;
  align-self: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  padding-top: 1px !important;
  color: #667085 !important;
}

  .service-table-row .service-bar-cell {
  grid-column: 1 !important;
  grid-row: 2 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: min(142px, 100%) !important;
}

  .service-table-row > strong:nth-of-type(1) {

    min-width: 62px !important;
  }

  .service-table-row > strong:nth-of-type(2) {

    min-width: 32px !important;
  }

  .service-table-row > strong:nth-of-type(3) {

    min-width: 48px !important;
  }
}

@media (max-width: 380px) {
  .service-table-row {

    grid-template-columns: minmax(124px, 1fr) 58px 29px 42px 17px !important;
  }

  .service-name-cell > span:nth-child(2), .service-name-cell .service-percent {

    font-size: 10.4px !important;
  }

  .service-table-row .service-bar-cell {

    width: min(124px, 100%) !important;
    grid-template-columns: minmax(0, 1fr) 28px !important;
  }
}

/* Home weekly sales chart */
.weekly-sales-panel, .period-sales-panel {

  overflow: hidden;
  padding: 14px 16px 12px;
}

.weekly-chart-head, .period-chart-head {

  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
  column-gap: 12px;
  margin-bottom: 10px;
}

.weekly-chart-head div, .period-chart-head div {

  display: grid;
  gap: 3px;
}

.weekly-chart-head span, .weekly-chart-head small,
.period-chart-head span, .period-chart-head small {

  color: var(--home-muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.2;
}

.weekly-chart-head strong {

  color: #050814;
  font-size: 18px;
  font-weight: 820;
  line-height: 1;
}

.period-chart-head span {

  color: var(--home-text);
  font-size: 14px;
  font-weight: 820;
}

.period-chart-head small {

  font-size: 11px;
  font-weight: 650;
}

.weekly-chart-meta {

  align-items: end;
  display: grid;
  gap: 4px;
  justify-items: end;
}

.weekly-chart-meta em {

  color: var(--home-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
  line-height: 1;
}

.weekly-chart-bars {

  align-items: end;
  border-bottom: 1px solid #d7dee8;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 132px;
  padding: 24px 2px 0;
  position: relative;
}

.weekly-chart-max-line {

  border-top: 1px dashed rgba(98, 107, 124, 0.62);
  color: var(--home-muted);
  font-size: 10px;
  font-weight: 620;
  left: 0;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 24px;
  z-index: 0;
}

.weekly-chart-max-line span {

  background: var(--home-card);
  left: 0;
  padding-right: 5px;
  position: absolute;
  top: -17px;
}

.weekly-bar-day {

  align-items: center;
  background: transparent;
  border: 0;
  color: var(--home-text);
  display: grid;
  gap: 3px;
  grid-template-rows: 1fr auto auto;
  height: 100%;
  min-height: 92px;
  min-width: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.weekly-bar-value {

  align-self: end;
  background: var(--ui-green);
  border-radius: 4px 4px 0 0;
  display: block;
  justify-self: center;
  min-height: 0;
  width: 30%;
}

.weekly-bar-day:not(.active) .weekly-bar-value {

  background: var(--ui-green);
}

.weekly-bar-day.active .weekly-bar-value {

  background: var(--ui-green);
}

.weekly-bar-value[style*="height:0"] {

  background: transparent;
}

.weekly-bar-date {

  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  margin-top: 7px;
}

.weekly-bar-weekday {

  color: #667085;
  font-size: 11px;
  font-weight: 620;
  line-height: 1;
}

.weekly-bar-day small {

  display: none;
}

@media (max-width: 700px) {

  .weekly-bar-date {

    font-size: 11px;
    margin-top: 6px;
  }

  .weekly-bar-weekday {

    font-size: 9.5px;
  }
}

@media (max-width: 380px) {
  .weekly-chart-bars {
    gap: 5px;
  }
}

/* Header and metric layout: fixed sales details, four compact metric cards */
@media (max-width: 700px) {

}

@media (max-width: 380px) {
  .dashboard-metrics {

    gap: var(--home-card-gap) !important;
  }

}

/* 2026-05-10: tighter mobile home, monthly goal, and centered plus tab */
@media (max-width: 700px) {

  .service-table {
  border-top: 1px solid #e8edf3 !important;
  padding-top: 2px !important;
  position: static !important;
  width: 100% !important;
  gap: 0 !important;
}

  .monthly-goal-empty {

    display: grid !important;
    gap: 5px !important;
  }

  .calendar-panel {

    margin-top: 0 !important;
  }

}

@media (max-width: 380px) {
  :root {

    --mobile-page-pad: 11px;
  }

  .service-table-row > strong {

    font-size: 10px !important;
  }
}

/* 2026-05-11: reference mobile home UI */
@media (max-width: 700px) {

  .dashboard-metric, .panel {
  background: var(--home-card) !important;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 9px 25px rgba(15, 23, 42, 0.065) !important;
}

  .monthly-goal-panel {
  margin: var(--home-card-gap) 0 !important;
  padding: 0 !important;
}

  .monthly-goal-card {
  color: var(--home-text) !important;
  text-align: left !important;
  background: var(--home-card) !important;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 9px 25px rgba(15, 23, 42, 0.065) !important;
  display: grid !important;
  gap: 11px !important;
  padding: 16px !important;
  width: 100% !important;
}

  .monthly-goal-head {
  align-items: start !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
}

  .monthly-goal-head > div {
  display: grid !important;
  gap: 4px !important;
}

  .monthly-goal-head > div > span, .monthly-goal-empty span {
  color: var(--home-muted) !important;
  font-size: 12px !important;
  font-weight: 720 !important;
}

  .monthly-goal-head strong {
  line-height: 1 !important;
  color: #050814 !important;
  font-size: 18px !important;
  font-weight: 830 !important;
}

  .monthly-goal-head > div:nth-child(2) {

    justify-items: end !important;
  }

  .monthly-goal-head > div:nth-child(2) strong {

    color: var(--ui-green) !important;
    font-size: 18px !important;
  }

  .monthly-goal-rate-row {
  align-items: baseline !important;
  display: flex !important;
  gap: 4px !important;
}

  .monthly-goal-toggle {
  align-items: center !important;
  color: var(--home-muted) !important;
  display: inline-flex !important;
  height: 18px !important;
  justify-content: center !important;
  width: 18px !important;
}

  .monthly-goal-toggle svg {
  display: block !important;
  height: 14px !important;
  width: 14px !important;
}

  .monthly-goal-track {
  background: #ebedf2 !important;
  border-radius: 999px !important;
  height: 9px !important;
  overflow: hidden !important;
}

  .monthly-goal-track span {
  display: block !important;
  height: 100% !important;
  background: linear-gradient(90deg, var(--ui-green), color-mix(in srgb, var(--ui-green) 78%, #000000)) !important;
  border-radius: inherit !important;
}

  .monthly-goal-current {

    display: flex !important;
    justify-content: space-between !important;
  }

  .monthly-goal-current span, .monthly-goal-card p {

    color: var(--home-muted) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin: 0 !important;
  }

  .monthly-goal-current strong {

    color: var(--ui-green) !important;
    font-size: 14px !important;
    font-weight: 820 !important;
  }

  .monthly-goal-related {
    border-top: 1px solid var(--home-line) !important;
    display: grid !important;
    gap: 0 !important;
    padding-top: 0 !important;
  }

  .monthly-goal-secondary {
    display: grid !important;
    gap: 8px !important;
  }

  .monthly-goal-secondary + .monthly-goal-secondary {
    border-top: 1px solid var(--home-line) !important;
    padding-top: 0 !important;
  }

  .monthly-goal-secondary-toggle {
    align-items: center !important;
    appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--home-muted) !important;
    display: flex !important;
    font: inherit !important;
    font-size: 12px !important;
    font-weight: 720 !important;
    justify-content: space-between !important;
    line-height: 1 !important;
    min-height: 38px !important;
    padding: 0 !important;
    text-align: left !important;
    width: 100% !important;
  }

  .monthly-goal-secondary-toggle span:first-child {
    color: var(--home-muted) !important;
    display: inline-flex !important;
    line-height: 1 !important;
  }

  .monthly-goal-secondary-toggle-right {
    align-items: center !important;
    color: var(--home-muted) !important;
    display: inline-flex !important;
    gap: 4px !important;
    line-height: 1 !important;
  }

  .monthly-goal-secondary-values {
    align-items: end !important;
    display: grid !important;
    gap: 12px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .monthly-goal-secondary-values strong {
    color: #050814 !important;
    font-size: 18px !important;
    font-weight: 830 !important;
    line-height: 1 !important;
  }

  .monthly-goal-secondary-values strong:last-child {
    color: var(--ui-green) !important;
  }

  .monthly-goal-secondary-detail {
    display: grid !important;
    gap: 9px !important;
    padding-bottom: 8px !important;
  }

  .monthly-goal-daily-row {
    align-items: center !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: minmax(0, 1fr) 32px !important;
  }

  .monthly-goal-daily {

    align-items: center !important;
    background: linear-gradient(90deg, rgba(0, 138, 18, 0.08), rgba(0, 138, 18, 0.03)) !important;
    border: 1px solid rgba(0, 138, 18, 0.22) !important;
    border-radius: 10px !important;
    display: grid !important;
    gap: 4px !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    padding: 10px 12px !important;
  }

  .monthly-goal-daily span, .monthly-goal-daily strong {

    color: #050814 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
  }

  .monthly-goal-daily strong {
    font-weight: 820 !important;
    justify-self: end !important;
  }

  .monthly-goal-daily strong.goal-achieved {
    color: var(--ui-green) !important;
  }

  .monthly-goal-edit {
    align-items: center !important;
    color: var(--home-muted) !important;
    display: inline-flex !important;
    height: 32px !important;
    justify-content: center !important;
    justify-self: end !important;
    width: 32px !important;
  }

  .monthly-goal-edit svg {
    height: 16px !important;
    width: 16px !important;
  }

  .goal-input-overlay {
    align-items: center;
    background: rgba(15, 23, 42, 0.36);
    display: flex;
    inset: 0;
    justify-content: center;
    overscroll-behavior: contain;
    padding: 20px;
    position: fixed;
    z-index: 200;
  }

  .goal-input-card {
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    display: grid;
    gap: 10px;
    max-height: calc(100dvh - 48px);
    max-width: 340px;
    overscroll-behavior: contain;
    overflow-y: auto;
    padding: 18px;
    width: 100%;
  }

  .goal-input-card h2 {
    color: #050814;
    font-size: 16px;
    font-weight: 760;
    margin: 0;
  }

  .goal-input-group {
    display: grid;
    gap: 5px;
  }

  .goal-input-group span {
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 720;
  }

  .goal-input-field {
    border: 1.5px solid #d7dee8;
    border-radius: 10px;
    box-sizing: border-box;
    color: #050814;
    font-size: 18px;
    font-weight: 760;
    min-height: 40px;
    padding: 7px 10px;
    width: 100%;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  }

  .goal-input-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
  }

  .monthly-goal-empty strong {
  font-weight: 780 !important;
  color: var(--ui-green) !important;
  font-size: 20px !important;
}

  .service-overview-panel {
  position: relative !important;
  overflow: visible !important;
  padding: 8px 16px 12px !important;
}

  .service-panel-header {
    align-items: center !important;
    display: flex !important;
    gap: 8px !important;
    margin: 0 !important;
    min-height: 32px !important;
  }

  .service-overview-panel h2 {
  line-height: 1 !important;
  color: var(--home-muted) !important;
  font-size: 12px !important;
  font-weight: 830 !important;
}

  .service-header-labels {
    align-items: center !important;
    color: var(--home-muted) !important;
    display: grid !important;
    font-size: 11px !important;
    font-weight: 720 !important;
    gap: 0 !important;
    grid-template-columns: 76px 48px 50px 18px !important;
    margin-left: auto !important;
    white-space: nowrap !important;
  }

  .service-header-labels span {
    color: var(--home-muted) !important;
    font-size: 11px !important;
    font-weight: 720 !important;
    min-width: auto !important;
    text-align: left !important;
  }

  .service-sort-control {

    flex-shrink: 0 !important;
    margin-left: 0 !important;
  }

  .service-sort-slot {
    align-items: center !important;
    display: flex !important;
    justify-content: center !important;
  }

  .service-sort-control .panel-toggle {

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #566174 !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: inherit !important;
    justify-content: center !important;
    height: 20px !important;
    min-height: 20px !important;
    overflow: visible !important;
    padding: 0 !important;
    width: 20px !important;
  }

  .service-sort-control .panel-toggle::before {

    content: none !important;
  }

  .service-sort-control .panel-toggle::after {

    content: none !important;
  }

  .service-sort-control .panel-toggle svg {
    display: block !important;
    fill: none !important;
    height: 14px !important;
    stroke: currentColor !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-width: 2 !important;
    width: 14px !important;
  }

  .service-sort-control .panel-toggle span {
    display: none !important;
  }

  .service-table-row {
    column-gap: 5px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 76px 48px 50px 18px !important;
    align-items: center !important;
    border-bottom: 1px solid var(--ui-line) !important;
    grid-template-rows: auto auto !important;
    min-height: 45px !important;
    padding: 7px 0 !important;
}

  .service-row-group {
  border-bottom: 1px solid var(--ui-line) !important;
  display: grid !important;
}

  .service-row-group .service-table-row {
  border-bottom: 0 !important;
}

  .service-row-detail {
  display: grid !important;
  gap: 6px 8px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  padding: 0 0 9px !important;
}

  .service-row-detail span {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
}

  .service-row-detail small {
  color: #626b7c !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

  .service-row-detail strong {
  color: #050814 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

  .service-icon {

    display: none !important;
  }

  .service-name-cell {
  gap: 3px !important;
  align-items: start !important;
  display: grid !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

  .service-name-cell > span:not(.service-percent):not(.service-icon) {

    color: #050814 !important;
    font-size: 13px !important;
    font-weight: 810 !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .service-percent {
  color: #626b7c !important;
  font-size: 11px !important;
  font-weight: 760 !important;
  grid-column: 1 !important;
  grid-row: 2 !important;
  justify-self: start !important;
  line-height: 1 !important;
  margin-left: 0 !important;
  white-space: nowrap !important;
}

  .service-table-row .service-name-cell > span:nth-child(2) {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .service-table-row .service-name-cell .service-percent {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .service-bar-cell {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  min-width: 0 !important;
  padding-right: 0 !important;
}

  body:not([data-theme="dark"]) .service-bar-track {
  background: #edf0f4 !important;
  height: 7px !important;
}

  .service-table-row > strong {
  align-self: center !important;
  grid-row: 1 !important;
  text-align: left !important;
  line-height: 1 !important;
  color: #050814 !important;
  font-size: 12px !important;
  font-weight: 780 !important;
  justify-self: start !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

  .row-chevron {
  align-items: center !important;
  color: #626b7c !important;
  display: inline-flex !important;
  font-size: 20px !important;
  grid-column: 5 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  line-height: 1 !important;
}

  .row-chevron svg {
  display: block !important;
  height: 16px !important;
  width: 16px !important;
}

  .panel-link.service-detail-link {

    display: none !important;
  }

  .nav-tab {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #596274 !important;
    display: flex !important;
    flex-direction: column !important;
    font-size: 10px !important;
    font-weight: 720 !important;
    gap: 3px !important;
    height: 60px !important;
    justify-content: center !important;
    line-height: 1 !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    width: 100% !important;
  }

  .nav-tab::before,
  .nav-tab::after {
    content: none !important;
    display: none !important;
  }

  .nav-tab.active {
    color: var(--ui-green) !important;
  }

  .nav-icon {
    display: block !important;
    height: 23px !important;
    width: 23px !important;
  }

  .nav-tab > span:not(.nav-add-circle) {
    display: block !important;
    line-height: 1 !important;
  }

  .nav-tab-add {
    color: var(--ui-green) !important;
    gap: 4px !important;
    transform: none !important;
  }

  .nav-add-circle {
    align-items: center !important;
    background: linear-gradient(145deg, var(--ui-green), color-mix(in srgb, var(--ui-green) 78%, #000000)) !important;
    border-radius: 999px !important;
    box-shadow: 0 8px 18px rgba(0, 138, 18, 0.22) !important;
    color: #fff !important;
    display: flex !important;
    height: 48px !important;
    justify-content: center !important;
    width: 48px !important;
  }

  .nav-tab-add .nav-icon {
    height: 29px !important;
    width: 29px !important;
  }

  .nav-tab-add > span:not(.nav-add-circle) {
    font-size: 11px !important;
    font-weight: 820 !important;
  }
}

@media (max-width: 410px) {
  :root {

    --mobile-page-pad: 15px;
  }

  .service-table-row {

    grid-template-columns: minmax(0, 1fr) 74px 46px 48px 18px !important;
  }

  .service-table-row > strong {

    font-size: 12px !important;
  }

  .service-percent {

    font-size: 11px !important;
  }

  .monthly-goal-daily {

    grid-template-columns: 1fr !important;
  }
}

/* 2026-05-14 final pass: large sales total with collapsible quest/tip/net sales */
@media (max-width: 700px) {

}

@media (max-width: 390px) {
}

/* 2026-05-15: consolidated mobile home layout. */
@media (max-width: 700px), (max-height: 500px) {
  :root {
  --mobile-page-pad: 18px;
  --mobile-card-gap: 12px;
  --ui-green: #008a12;
  --ui-muted: #5f6878;
  --ui-line: #e4e8ef;
  --home-page-pad: 16px;
  --home-section-gap: 10px;
  --home-card-gap: 10px;
  --home-radius: 16px;
  --home-bg: #f6f7f9;
  --home-card: #ffffff;
  --home-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --home-green: #008a12;
  --home-text: #111827;
  --home-muted: #667085;
  --home-line: #e7ecf2;
}

  body {
  overflow-x: hidden !important;
  background: var(--home-bg) !important;
}

  .main {
  max-width: 430px !important;
  padding: 18px var(--home-page-pad) calc(86px + env(safe-area-inset-bottom)) !important;
}

  .main:has(#dashboardView.calendar-only),
  .main:has(#settingsView.active) {

    padding-top: max(12px, env(safe-area-inset-top)) !important;
  }

  .view {
  gap: var(--home-section-gap) !important;
}

  .dashboard-head {

    display: grid !important;
    gap: 8px !important;
    grid-template-rows: auto auto !important;
    margin: 0 0 var(--home-card-gap) !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .dashboard-title-row, .dashboard-control-row {

    min-width: 0 !important;
    width: 100% !important;
  }

  .dashboard-title-row {

    align-items: start !important;
    display: grid !important;
    column-gap: 6px !important;
    grid-template-columns: minmax(0, 1fr) 84px !important;
    grid-template-rows: 38px auto !important;
    min-height: 58px !important;
    row-gap: 3px !important;
  }

  .dashboard-title-row h1 {

    align-items: center !important;
    display: flex !important;
    gap: 0 !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .dashboard-brand-line {
    align-items: center !important;
    display: inline-flex !important;
    gap: 5px !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
  }

  .dashboard-brand-icon {
    border-radius: 6px !important;
    display: block !important;
    flex: 0 0 auto !important;
    height: 21px !important;
    width: 21px !important;
  }

  .dashboard-brand-copy {
    align-items: baseline !important;
    display: flex !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  .dashboard-brand-copy strong {
    color: #048C5D !important;
    font-size: 16px !important;
    font-weight: 820 !important;
    letter-spacing: 0.3px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  .dashboard-brand-copy small {
    color: var(--home-muted) !important;
    font-size: 10px !important;
    font-weight: 680 !important;
    line-height: 1.2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .dashboard-date-picker-button {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    height: 44px !important;
    justify-content: center !important;
    margin-left: 0 !important;
    min-height: 44px !important;
    padding: 0 !important;
    width: 20px !important;
  }

  .dashboard-date-picker-button svg {
    height: 18px !important;
    width: 18px !important;
  }

  .dashboard-period-nav {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    height: 44px !important;
    justify-content: center !important;
    min-height: 44px !important;
    padding: 0 !important;
    width: 36px !important;
  }

  .dashboard-period-nav svg {
    height: 20px !important;
    width: 20px !important;
  }

  .dashboard-title-row h1 span {

    color: var(--home-text) !important;
    font-size: clamp(15px, 4.3vw, 18px) !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  .dashboard-title-row h1 small {

    color: var(--home-text) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .dashboard-head-actions {

    align-self: center !important;
    display: grid !important;
    gap: 8px !important;
    grid-column: 2 !important;
    grid-template-columns: 38px 38px !important;
    grid-row: 1 !important;
    justify-self: end !important;
  }

  .notify-button, .share-button {

    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    display: grid !important;
    height: 38px !important;
    justify-content: center !important;
    line-height: 0 !important;
    min-height: 38px !important;
    padding: 0 !important;
    place-items: center !important;
    position: relative !important;
    text-align: center !important;
    transform: none !important;
    width: 38px !important;
  }

  .notify-button::before, .share-button::before {

    background: var(--home-card) !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08) !important;
    content: "" !important;
    height: 38px !important;
    left: 50% !important;
    position: absolute !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 38px !important;
  }

  .notify-icon, .share-icon {

    display: block !important;
    fill: none !important;
    flex: 0 0 auto !important;
    height: 17px !important;
    margin: 0 !important;
    position: relative !important;
    stroke: #050814 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-width: 2 !important;
    width: 17px !important;
    z-index: 1 !important;
  }

  .share-menu-card {

    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18) !important;
    box-sizing: border-box !important;
    display: grid !important;
    gap: 4px !important;
    padding: 8px !important;
    position: absolute !important;
    right: 46px !important;
    top: 62px !important;
    width: min(252px, calc(100vw - 24px)) !important;
    z-index: 30 !important;
  }

  .share-menu-card[hidden] {

    display: none !important;
  }

  .share-menu-card::before {

    background: var(--home-card) !important;
    border-left: 1px solid var(--home-line) !important;
    border-top: 1px solid var(--home-line) !important;
    content: "" !important;
    height: 12px !important;
    position: absolute !important;
    right: 14px !important;
    top: -7px !important;
    transform: rotate(45deg) !important;
    width: 12px !important;
  }

  .share-menu-option {

    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 10px !important;
    color: var(--home-text) !important;
    display: grid !important;
    font-size: 14px !important;
    font-weight: 760 !important;
    gap: 10px !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    min-height: 46px !important;
    padding: 8px 10px !important;
    position: relative !important;
    text-align: left !important;
  }

  .share-menu-option:active {

    background: var(--accent-soft) !important;
  }

  .share-menu-icon {

    align-items: center !important;
    background: var(--accent-soft) !important;
    border-radius: 9px !important;
    color: var(--accent-dark) !important;
    display: inline-flex !important;
    height: 28px !important;
    justify-content: center !important;
    width: 28px !important;
  }

  .share-menu-icon svg {

    display: block !important;
    fill: none !important;
    height: 17px !important;
    stroke: currentColor !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-width: 2 !important;
    width: 17px !important;
  }

  .notify-dot {

    height: 8px !important;
    position: absolute !important;
    right: 7px !important;
    top: 7px !important;
    width: 8px !important;
    z-index: 2 !important;
  }

  .dashboard-control-row {

    align-items: center !important;
    display: grid !important;
    gap: 4px !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    justify-content: stretch !important;
  }

  .period-selector-row {

    align-items: center !important;
    display: grid !important;
    gap: 4px !important;
    grid-template-columns: minmax(0, 1fr) 38px !important;
    min-width: 0 !important;
    width: min(240px, calc(100vw - 167px)) !important;
  }

  .period-tabs {

    background: var(--home-card) !important;
    border: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.065) !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    height: 38px !important;
    min-height: 38px !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  .period-tab {

    background: var(--home-card) !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--home-text) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    height: 38px !important;
    min-height: 38px !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .period-tab + .period-tab {

    border-left: 1px solid var(--home-line) !important;
  }

  .period-tab.active {

    background: var(--home-green) !important;
    color: #ffffff !important;
  }

  .custom-period-button {

    align-items: center !important;
    background: var(--home-card) !important;
    border: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.065) !important;
    box-sizing: border-box !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    font-weight: 800 !important;
    height: 38px !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 0 !important;
    width: 38px !important;
  }

  .custom-period-button svg {

    fill: none !important;
    height: 17px !important;
    stroke: currentColor !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-width: 2 !important;
    width: 17px !important;
  }

  .custom-period-button.active {

    background: var(--home-green) !important;
    color: #ffffff !important;
  }

  .dashboard-weather-chips {

    display: grid !important;
    gap: 4px !important;
    grid-template-columns: max-content 38px 38px !important;
    justify-self: end !important;
    width: max-content !important;
  }

  .dashboard-weather-chips:has(.weather-chip-hidden) {

    grid-template-columns: max-content 38px !important;
  }

  .dashboard-weather-chips span {

    align-items: center !important;
    background: var(--home-card) !important;
    border: 0 !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.065) !important;
    color: var(--home-text) !important;
    display: grid !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    height: 38px !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 0 !important;
    place-items: center !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .dashboard-weather-chips .weather-chip-hidden {

    display: none !important;
  }

  #dashboardView.calendar-only .dashboard-weather-chips,
  #dashboardView.calendar-only .dashboard-actions,
  #dashboardView.calendar-only .dashboard-metrics,
  #dashboardView.calendar-only .dashboard-head,
  #dashboardView.calendar-only .dashboard-head .dashboard-control-row,
  #dashboardView.calendar-only .monthly-goal-panel,
  #dashboardView.calendar-only .service-overview-panel,
  #dashboardView.calendar-only .weekly-sales-panel {
    display: none !important;
  }

  #dashboardView.calendar-only #dashboardDateTitle,
  #dashboardView.calendar-only .dashboard-brand-line,
  #dashboardView.calendar-only .dashboard-head-actions {

    display: none !important;
  }

  .dashboard-weather-chips span:first-child {

    height: 38px !important;
    min-width: 47px !important;
    padding: 0 4px !important;
    width: auto !important;
  }

  .dashboard-weather-chips span:first-child::before {

    content: none !important;
    display: none !important;
  }

  .dashboard-weather-chips span:nth-child(2), .dashboard-weather-chips span:nth-child(3) {

    font-size: 15px !important;
    line-height: 1 !important;
    padding: 0 !important;
    width: 38px !important;
  }

  .dashboard-weather-chips span:nth-child(3) {

    color: #f59e0b !important;
  }

  .dashboard-actions {
  grid-template-columns: 34px !important;
  justify-content: end !important;
  margin-left: 0 !important;
  display: none !important;
}

  .dashboard-metrics {
  margin-bottom: 0 !important;
  display: grid !important;
  gap: var(--home-card-gap) !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

  .dashboard-metric, #dashboardView .panel, #dashboardView .monthly-goal-card, #dashboardView .weekly-sales-panel, #dashboardView .period-sales-panel {

    background: var(--home-card) !important;
    border: 0 !important;
    border-radius: var(--home-radius) !important;
    box-shadow: var(--home-shadow) !important;
  }

  #dashboardView .period-sales-panel:not([hidden]),
  #dashboardView .dashboard-memo-panel:not([hidden]) {
    margin-top: var(--home-card-gap) !important;
  }

  #dashboardView .dashboard-memo-panel {
    gap: 10px !important;
    padding: 14px 58px 14px 16px !important;
    position: relative !important;
  }

  #dashboardView .dashboard-memo-head > span {
    color: var(--home-card-title-color) !important;
    font-size: var(--home-card-title-size) !important;
    font-weight: var(--home-card-title-weight) !important;
    line-height: var(--home-card-title-line) !important;
  }

  #dashboardView .dashboard-memo-icon-button {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--home-muted) !important;
    padding: 0 !important;
  }

  #dashboardView .dashboard-memo-toggle-button {
    height: 44px !important;
    min-height: 44px !important;
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
  }

  #dashboardView .dashboard-memo-edit-button {
    bottom: 14px !important;
    height: 32px !important;
    min-height: 32px !important;
    position: absolute !important;
    right: 64px !important;
    width: 32px !important;
  }

  #dashboardView .dashboard-memo-toggle-button svg {
    height: 24px !important;
    width: 24px !important;
  }

  #dashboardView .dashboard-memo-edit-button svg {
    height: 16px !important;
    width: 16px !important;
  }

  .dashboard-metric:not(.sales-metric) small {

    color: var(--home-muted) !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    margin-bottom: 3px !important;
    white-space: nowrap !important;
  }

  #dashboardView .monthly-goal-card, #dashboardView .calendar-panel {

    margin-top: 0 !important;
    padding: 16px !important;
  }

  #dashboardView .calendar-panel {

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    gap: var(--home-card-gap) !important;
    margin-top: var(--home-card-gap) !important;
    padding: 0 !important;
  }

  #dashboardView .calendar-panel:not([hidden]) {
    display: grid !important;
  }

  .ledger-calendar-card {

    background: var(--home-card) !important;
    border: 0 !important;
    border-radius: var(--home-radius) !important;
    box-shadow: var(--home-shadow) !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  .payment-schedule-card {
    background: var(--home-card);
    border: 0;
    border-radius: var(--home-radius);
    box-shadow: var(--home-shadow);
    display: grid;
    gap: 9px;
    margin-top: var(--home-card-gap);
    padding: 14px;
  }

  .payment-schedule-head {
    align-items: center;
    display: flex;
    gap: 8px;
  }

  .payment-schedule-head h3 {
    color: var(--home-text);
    font-size: 16px;
    font-weight: 780;
    line-height: 1.1;
    margin: 0;
  }

  .payment-schedule-head > span {
    align-items: center;
    background: rgba(0, 138, 18, 0.1);
    border-radius: 10px;
    color: var(--ui-green);
    display: inline-flex;
    flex: 0 0 auto;
    height: 30px;
    justify-content: center;
    width: 30px;
  }

  .payment-schedule-head svg {
    height: 16px;
    width: 16px;
  }

  .payment-schedule-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .payment-schedule-footer button,
  .payment-schedule-history-head button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--home-muted);
    display: inline-flex;
    font: inherit;
    font-size: 11px;
    font-weight: 760;
    justify-content: center;
    line-height: 1.1;
    min-height: 44px;
    padding: 0 6px;
  }

  .payment-schedule-footer button[aria-expanded="true"],
  .payment-schedule-history-head button[aria-expanded="true"] {
    color: var(--ui-green);
  }

  .payment-schedule-list {
    display: grid;
    gap: 7px;
  }

  .payment-schedule-row {
    background: var(--home-card);
    border: 1px solid var(--home-line);
    border-radius: 12px;
    display: grid;
    min-width: 0;
    padding: 10px;
  }

  .payment-schedule-menu-row {
    padding-block: 4px;
  }

  .payment-schedule-row.is-empty {
    background: transparent;
    opacity: 0.62;
  }

  .payment-schedule-row.is-pending {
    background: var(--home-card);
  }

  .payment-schedule-row.is-today {
    background: var(--home-card);
  }

  .payment-schedule-main {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  .payment-schedule-row-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
  }

  .payment-service-name {
    align-items: center;
    color: var(--home-text);
    display: inline-flex;
    font-size: 13px;
    font-weight: 780;
    gap: 7px;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .payment-service-name::before {
    background: var(--payment-service-color, var(--ui-green));
    border-radius: 999px;
    content: "";
    flex: 0 0 auto;
    height: 9px;
    width: 9px;
  }

  .payment-schedule-row-head strong {
    color: var(--home-text);
    font-feature-settings: "tnum";
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  .payment-manual-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-width: 0;
  }

  .payment-manual-row + .payment-manual-row {
    border-top: 1px solid var(--home-line);
    padding-top: 5px;
    margin-top: 5px;
  }

  .payment-manual-row strong {
    color: var(--home-text);
    font-feature-settings: "tnum";
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  .payment-manual-add-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    display: inline-flex;
    font: inherit;
    font-size: 10px;
    font-weight: 760;
    justify-content: center;
    line-height: 1;
    min-height: 44px;
    padding: 0;
    white-space: nowrap;
    width: 44px;
  }

  .payment-manual-add-button svg {
    height: 16px;
    width: 16px;
  }

  .payment-schedule-more-button {
    align-items: center;
    background: color-mix(in srgb, var(--home-card) 86%, transparent);
    border: 1px solid var(--home-line);
    border-radius: 10px;
    color: var(--home-text);
    display: inline-flex;
    font: inherit;
    font-size: 11px;
    font-weight: 760;
    justify-content: center;
    line-height: 1.1;
    min-height: 44px;
    padding: 0 10px;
  }

  .payment-schedule-history {
    border-top: 1px solid var(--home-line);
    display: grid;
    gap: 10px;
    padding-top: 12px;
  }

  .payment-schedule-history-head {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
  }

  .payment-schedule-history-head span {
    color: var(--home-text);
    font-size: 13px;
    font-weight: 800;
  }

  .payment-schedule-history-head small {
    color: var(--home-muted);
    font-size: 10px;
    font-weight: 650;
    margin-left: auto;
  }

  .payment-schedule-more-button {
    justify-self: stretch;
  }

  .payment-calendar-card {
    margin-top: var(--home-card-gap);
  }

  .payment-calendar-section-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 4px;
    min-width: 0;
    padding: 12px 12px 0;
  }

  .payment-calendar-section-head h3 {
    color: var(--home-muted);
    flex: 1 1 auto;
    font-size: 12px;
    font-weight: 720;
    line-height: 1;
    margin: 0;
    min-width: 0;
  }

  .payment-calendar-section-head button {
    align-items: center;
    background: var(--home-card);
    border: 1px solid var(--home-line);
    border-radius: 999px;
    color: var(--home-muted);
    display: inline-flex;
    flex: 0 1 auto;
    font: inherit;
    font-size: 10px;
    font-weight: 760;
    justify-content: center;
    line-height: 1.1;
    max-width: 48%;
    min-height: 38px;
    padding: 0 7px;
    white-space: nowrap;
  }

  .payment-calendar-section-head button[aria-expanded="true"] {
    border-color: rgba(0, 138, 18, 0.24);
    color: var(--ui-green);
  }

  .payment-calendar-card .ledger-calendar-head {
    padding-top: 4px !important;
  }

  .payment-schedule-overlay {
    align-items: center;
    background: rgba(15, 23, 42, 0.36);
    display: grid;
    inset: 0;
    overscroll-behavior: contain;
    padding: 20px;
    place-items: center;
    position: fixed;
    z-index: 105;
  }

  .payment-schedule-dialog-card {
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    display: grid;
    gap: 14px;
    max-height: calc(100dvh - 40px);
    max-width: 360px;
    overflow-y: auto;
    padding: 18px;
    width: min(100%, 360px);
  }

  .payment-schedule-dialog-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
  }

  .payment-schedule-dialog-head h2 {
    color: var(--home-text);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
  }

  .payment-schedule-dialog-head button {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-size: 20px;
    height: 36px;
    justify-content: center;
    line-height: 1;
    width: 36px;
  }

  .payment-schedule-dialog-list {
    display: grid;
    gap: 8px;
  }

  .payment-schedule-dialog-list p {
    align-items: start;
    border-top: 1px solid var(--home-line);
    color: var(--home-muted);
    display: grid;
    font-size: 12px;
    font-weight: 700;
    gap: 4px;
    grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
    line-height: 1.45;
    margin: 0;
    padding-top: 8px;
  }

  .payment-schedule-dialog-list p:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .payment-schedule-dialog-list strong {
    align-items: center;
    color: var(--home-text);
    display: inline-flex;
    font-weight: 800;
    gap: 7px;
  }

  .payment-schedule-dialog-service strong i {
    background: var(--payment-service-color);
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
    height: 8px;
    width: 8px;
  }

  .payment-schedule-dialog-list span {
    min-width: 0;
  }

  .payment-calendar-cell {
    gap: 3px !important;
  }

  .payment-calendar-cell.has-payment {
    background: #fff !important;
  }

  body[data-theme="dark"] .payment-calendar-cell.has-payment {
    background: transparent !important;
  }

  .payment-calendar-cell-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    grid-area: weather;
    justify-self: end;
    min-height: 8px;
  }

  .payment-calendar-cell-list em {
    background: var(--payment-service-color, var(--ui-green));
    border-radius: 999px;
    display: block;
    font-size: 9px;
    font-style: normal;
    font-weight: 820;
    height: 7px;
    line-height: 1;
    width: 7px;
  }

  .payment-calendar-cell-list small {
    color: var(--home-muted);
    font-size: 9px;
    font-weight: 760;
    line-height: 1;
  }

  .payment-calendar-cell strong {
    align-self: center !important;
    color: var(--home-text);
    font-size: 10px !important;
    font-weight: 820 !important;
    grid-area: 1 / 1 / -1 / -1 !important;
    justify-self: center !important;
    line-height: 1.1 !important;
    margin-top: 0;
    overflow-wrap: anywhere;
    white-space: normal !important;
    z-index: 1;
  }

  .payment-manual-section {
    display: grid;
    gap: 7px;
    margin-top: var(--home-card-gap);
  }

  .payment-day-summary {
    background: var(--home-card);
    border: 1px solid var(--home-line);
    border-radius: 12px;
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
    padding: 12px;
  }

  .payment-day-summary span {
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 680;
  }

  .payment-day-summary strong {
    color: var(--ui-green, #008a12);
    font-size: 26px;
    font-weight: 860;
    line-height: 1.1;
  }

  .payment-day-list {
    display: grid;
    gap: 8px;
  }

  .payment-day-detail-card {
    background: var(--home-card);
    border: 1px solid var(--home-line);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    padding: 10px;
  }

  .payment-day-detail-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
  }

  .payment-day-service-name {
    align-items: center;
    color: var(--home-text);
    display: inline-flex;
    font-size: 13px;
    font-weight: 760;
    gap: 6px;
    line-height: 1.2;
    min-width: 0;
  }

  .payment-day-service-name i {
    background: var(--payment-service-color, var(--ui-green));
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
    height: 7px;
    width: 7px;
  }

  .payment-day-detail-head strong {
    color: var(--home-text);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
  }

  .payment-day-detail-list {
    display: grid;
    gap: 5px;
    margin: 0;
  }

  .payment-day-detail-list div {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
  }

  .payment-day-detail-list dt {
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 760;
  }

  .payment-day-detail-list dd {
    color: var(--home-text);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    flex: 0 0 72px;
    font-weight: 700;
    margin: 0;
    text-align: right;
  }

  .payment-day-detail-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
  }

  .payment-date-edit-button {
    font-size: 10px;
    min-height: 34px;
    padding: 0 10px;
  }

  .payment-date-delete-button {
    color: #b91c1c;
    font-size: 10px;
    min-height: 34px;
    padding: 0 10px;
  }

  .payment-rule-overlay {
    align-items: center;
    background: rgba(15, 23, 42, 0.36);
    display: flex;
    inset: 0;
    justify-content: center;
    overscroll-behavior: contain;
    padding: 20px;
    position: fixed;
    z-index: 80;
  }

  .payment-rule-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-sizing: border-box;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    display: grid;
    gap: 13px;
    max-width: 360px;
    padding: 18px;
    width: min(calc(100vw - 36px), 360px);
  }

  .payment-rule-card [hidden] {
    display: none;
  }

  .payment-rule-card h2 {
    color: var(--home-text);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.2;
    margin: 0;
  }

  .payment-rule-card p {
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
    margin: 0;
  }

  .payment-rule-card input:not([type="checkbox"]),
  .payment-rule-card select {
    background: #fff;
    border: 1px solid var(--home-line);
    border-radius: 10px;
    color: var(--home-text);
    font: inherit;
    font-size: 15px;
    min-height: 44px;
    padding: 0 10px;
  }

  .payment-rule-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .manual-payment-add-card {
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
  }

  .manual-payment-add-card h2 {
    font-size: 16px;
    font-weight: 800;
  }

  .manual-payment-add-card label {
    display: grid;
    gap: 6px;
  }

  .manual-payment-add-card label > input {
    box-sizing: border-box;
    text-align: center;
    width: 100%;
  }

  .manual-payment-date-card-wrap {
    display: block;
    inline-size: 184px;
    justify-self: center;
    margin-inline: auto;
    max-width: 100%;
    position: relative;
  }

  .manual-payment-add-card input.manual-payment-date-input {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    height: 100%;
    inset: 0;
    max-width: 100%;
    opacity: 0;
    position: absolute;
    width: 100%;
    z-index: 2;
  }

  .manual-payment-date-display {
    align-items: center;
    appearance: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-sizing: border-box;
    color: var(--ink);
    display: flex;
    font-size: 15.5px;
    font-weight: 800;
    inline-size: 184px;
    justify-content: center;
    line-height: 1.2;
    min-block-size: 44px;
    padding: 10px;
    pointer-events: none;
    position: relative;
    text-align: center;
    z-index: 1;
  }

  .payment-rule-card .manual-payment-add-service {
    align-items: center;
    color: var(--home-text);
    display: inline-flex;
    font-size: 13px;
    font-weight: 760;
    gap: 7px;
  }

  .payment-rule-card .manual-payment-add-service i {
    background: var(--payment-service-color, var(--ui-green));
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
    height: 8px;
    width: 8px;
  }

  .manual-payment-targets {
    display: grid;
    gap: 6px;
  }

  .manual-payment-targets > span,
  .manual-payment-add-total span {
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 720;
  }

  .manual-payment-target-row {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--home-line);
    border-radius: 10px;
    display: grid;
    gap: 10px;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    min-height: 36px;
    padding: 4px 9px;
  }

  .manual-payment-target-row input {
    accent-color: var(--accent);
    flex: 0 0 auto;
    height: 18px;
    margin: 0;
    min-height: 18px;
    padding: 0;
    width: 18px;
  }

  .manual-payment-target-row span {
    color: var(--home-text);
    font-size: 12px;
    font-weight: 760;
  }

  .manual-payment-target-row strong,
  .manual-payment-add-total strong {
    color: var(--home-text);
    font-feature-settings: "tnum";
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-weight: 760;
    white-space: nowrap;
  }

  .manual-payment-add-total {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  .manual-payment-add-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-back-row {

    display: flex !important;
    justify-content: flex-start !important;
    margin-bottom: var(--home-card-gap) !important;
    min-height: 40px !important;
  }

  .calendar-back-home-button {

    align-items: center !important;
    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--home-shadow) !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    height: 40px !important;
    justify-content: center !important;
    min-height: 40px !important;
    width: 40px !important;
  }

  .calendar-summary-card {
    border-bottom: 1px solid var(--home-line) !important;
    display: grid !important;
    gap: 4px !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    min-height: 48px !important;
    padding: 6px 8px !important;
    position: relative !important;
  }

  .calendar-summary-items {
    display: grid !important;
    column-gap: 6px !important;
    grid-template-columns: max-content max-content max-content !important;
    justify-content: center !important;
    row-gap: 4px !important;
    width: 100% !important;
  }

  .calendar-summary-item {
    display: contents !important;
  }

  .calendar-summary-card span {
    color: var(--home-muted) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    justify-self: end !important;
    white-space: nowrap !important;
  }

  .calendar-summary-card strong {
    color: var(--ui-green) !important;
    font-feature-settings: "tnum" !important;
    font-size: 18px !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 830 !important;
    justify-self: end !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  .calendar-summary-card small {
    align-self: center !important;
    color: var(--home-muted) !important;
    font-feature-settings: "tnum" !important;
    font-size: 10px !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 560 !important;
    justify-self: start !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  .calendar-summary-mode-button {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--home-muted) !important;
    display: inline-flex !important;
    height: 44px !important;
    justify-content: center !important;
    min-height: 44px !important;
    padding: 0 !important;
    position: absolute !important;
    right: 6px !important;
    top: 4px !important;
    width: 44px !important;
    z-index: 3 !important;
  }

  .calendar-summary-mode-button svg {
    height: 20px !important;
    width: 20px !important;
  }

  .calendar-summary-mode-menu {
    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--home-shadow) !important;
    display: grid !important;
    gap: 4px !important;
    padding: 6px !important;
    position: absolute !important;
    right: 8px !important;
    top: 48px !important;
    width: 112px !important;
    z-index: 5 !important;
  }

  .calendar-summary-mode-option {
    background: transparent !important;
    border: 0 !important;
    border-radius: 8px !important;
    color: var(--home-text) !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    min-height: 44px !important;
    padding: 0 10px !important;
    text-align: left !important;
  }

  .calendar-summary-mode-option.selected {
    background: rgba(0, 138, 18, 0.1) !important;
    color: var(--ui-green) !important;
  }

  .ledger-calendar-head {

    align-items: center !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: 44px 1fr 44px !important;
    padding: 10px 12px 8px !important;
  }

  .ledger-calendar-head > div {

    align-items: center !important;
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
  }

  .ledger-calendar-head strong {

    color: var(--home-text) !important;
    font-size: 18px !important;
    font-weight: 720 !important;
    line-height: 1 !important;
  }

  .ledger-calendar-head .calendar-nav-button, .ledger-calendar-head .calendar-title-picker {

    align-items: center !important;
    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--home-shadow) !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    height: 40px !important;
    justify-content: center !important;
    min-height: 40px !important;
    width: 40px !important;
  }

  .ledger-calendar-head .calendar-nav-button::before {
    content: none !important;
  }

  .calendar-back-home-button svg,
  .ledger-calendar-head .calendar-nav-button svg {

    height: 18px !important;
    width: 18px !important;
  }

  .ledger-calendar-head .calendar-title-picker svg {

    height: 18px !important;
    width: 18px !important;
  }

  .ledger-calendar-weekdays, .ledger-calendar-grid {

    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  .ledger-calendar-weekdays {

    border-bottom: 1px solid var(--home-line) !important;
    color: var(--home-muted) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    padding: 0 0 6px !important;
    text-align: center !important;
  }

  .ledger-calendar-weekdays .weekday-0 {

    color: var(--danger) !important;
  }

  .ledger-calendar-weekdays .weekday-6 {

    color: var(--rocket) !important;
  }

  .ledger-calendar-grid {

    align-items: stretch !important;
    border-left: 1px solid var(--home-line) !important;
    grid-auto-rows: 62px !important;
  }

  .ledger-calendar-cell {

    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--home-line) !important;
    border-right: 1px solid var(--home-line) !important;
    box-sizing: border-box !important;
    color: var(--home-text) !important;
    display: grid !important;
    font: inherit !important;
    grid-template-areas:
      "day weather"
      "sales sales"
      "count count" !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto 1fr auto !important;
    height: 62px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 5px 4px 6px !important;
    text-align: left !important;
    width: 100% !important;
  }

  .ledger-calendar-cell.muted {

    pointer-events: none !important;
  }

  .ledger-calendar-cell.today {

    background: rgba(22, 163, 74, 0.08) !important;
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.28) !important;
  }

  .ledger-calendar-cell.selected {

    background: rgba(37, 99, 235, 0.07) !important;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.52) !important;
  }

  body[data-theme="dark"] .ledger-calendar-cell.today {

    background: rgba(41, 163, 71, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(41, 163, 71, 0.5) !important;
  }

  body[data-theme="dark"] .ledger-calendar-cell.selected {

    background: rgba(59, 130, 246, 0.13) !important;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.72) !important;
  }

  .ledger-calendar-cell .calendar-day-number {

    color: var(--home-text) !important;
    font-size: 11px !important;
    font-weight: 560 !important;
    grid-area: day !important;
    line-height: 1 !important;
  }

  .ledger-calendar-cell.weekday-0 .calendar-day-number {

    color: var(--danger) !important;
  }

  .ledger-calendar-cell.weekday-6 .calendar-day-number {

    color: var(--rocket) !important;
  }

  .ledger-calendar-cell.holiday .calendar-day-number {

    color: var(--danger) !important;
  }

  .ledger-calendar-cell .calendar-weather {

    font-size: 11px !important;
    grid-area: weather !important;
    line-height: 1 !important;
  }

  .ledger-calendar-cell strong {

    align-self: center !important;
    color: var(--ui-green) !important;
    font-size: clamp(8px, 2.25vw, 10px) !important;
    font-weight: 620 !important;
    grid-area: sales !important;
    justify-self: center !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .ledger-calendar-cell small {

    color: var(--home-muted) !important;
    font-size: 9px !important;
    font-weight: 500 !important;
    grid-area: count !important;
    justify-self: center !important;
    line-height: 1 !important;
  }

  .ledger-calendar-cell strong.calendar-sales-missing {

    color: #d97706 !important;
    font-size: clamp(8px, 2.25vw, 10px) !important;
    font-weight: 760 !important;
  }

  .ledger-calendar-cell strong.calendar-day-off-badge {

    color: var(--home-muted, #64748b) !important;
    font-size: 9px !important;
    font-weight: 500 !important;
    padding: 0 !important;
  }

  #dashboardView .service-overview-panel {

    margin-top: var(--home-card-gap) !important;
    padding: 8px 16px 12px !important;
  }

  #dashboardView .service-table-row {

    min-height: 0 !important;
    padding: 8px 0 !important;
  }

  #dashboardView .service-table-row + .service-table-row {

    border-top: 1px solid var(--home-line) !important;
  }

  .nav-tabs {
  align-items: center !important;
  border-top: 1px solid #e7ecf2 !important;
  bottom: 0 !important;
  box-sizing: border-box !important;
  display: grid !important;
  gap: 0 !important;
  left: 0 !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  position: fixed !important;
  right: 0 !important;
  z-index: 50 !important;
  border-radius: 34px 34px 0 0 !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  height: calc(90px + env(safe-area-inset-bottom)) !important;
  justify-items: center !important;
  padding: 8px 16px calc(10px + env(safe-area-inset-bottom)) !important;
  background: var(--home-card) !important;
  box-shadow: var(--home-shadow) !important;
  width: auto !important;
}
}

.weather-picker {

  display: flex;
  gap: 8px;
  margin: 0;
}

.weather-picker button {

  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  flex: 1;
  font-size: 20px;
  justify-content: center;
  min-height: 44px;
}

.weather-picker button[aria-pressed="true"] {

  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.45);
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.1);
}


.entry-live-total-card {

  align-items: center;
  background: var(--surface);
  border: 1px solid #d7dee8;
  border-radius: 10px;
  box-sizing: border-box;
  cursor: default;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  min-height: 38px;
  padding: 7px 10px;
  user-select: none;
}

.entry-live-total-item {

  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
  min-width: 0;
}

.entry-live-total-label {

  align-items: center;
  color: var(--muted);
  display: inline-flex;
  flex: 0 1 auto;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  line-height: 1;
  min-width: 0;
  white-space: nowrap;
}

.entry-live-total-label svg {

  flex: 0 0 auto;
  height: 15px;
  width: 15px;
}

.entry-live-total-item strong {

  color: var(--ink);
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#entryLiveTotalSales {

  color: var(--accent);
}

.entry-live-total-divider {

  align-self: stretch;
  background: var(--line);
  min-height: 24px;
}

.entry-service-select {

  display: none;
}

.entry-service-icons {

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

.entry-service-icon {

  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  align-items: center;
  background: var(--surface);
  border: 1px solid #d7dee8;
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
  display: inline-grid;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  min-width: 0;
  padding: 6px 8px;
  touch-action: manipulation;
  user-select: none;
  white-space: nowrap;
}

.entry-service-icon span {

  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-service-icon small {

  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  opacity: 0.72;
}

.entry-service-icon[aria-pressed="true"] {

  background: color-mix(in srgb, var(--service-color) 12%, #fff);
  border-color: color-mix(in srgb, var(--service-color) 45%, #d7dee8);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--service-color) 12%, transparent);
  color: var(--service-color);
}

body[data-theme="dark"] .entry-form {
  --entry-control-bg: #202124;
  --entry-control-border: #354055;
  --entry-control-text: var(--home-text);
  --entry-control-muted: var(--home-muted);
  --entry-control-selected-bg: rgba(41, 163, 71, 0.14);
  --entry-control-selected-border: rgba(41, 163, 71, 0.52);
}

body[data-theme="dark"] .entry-form input:not(.entry-date-native),
body[data-theme="dark"] .entry-form select,
body[data-theme="dark"] .entry-form textarea,
body[data-theme="dark"] .entry-area-card,
body[data-theme="dark"] .entry-holiday-button,
body[data-theme="dark"] .entry-date-display,
body[data-theme="dark"] .entry-live-total-card,
body[data-theme="dark"] .entry-service-icon,
body[data-theme="dark"] .weather-picker button,
body[data-theme="dark"] .odometer-toggle-button,
body[data-theme="dark"] .odometer-panel,
body[data-theme="dark"] .time-range-toggle-button,
body[data-theme="dark"] .time-range-panel {
  background: var(--entry-control-bg);
  border-color: var(--entry-control-border);
  color: var(--entry-control-text);
  box-shadow: none;
}

body[data-theme="dark"] .entry-form input::placeholder,
body[data-theme="dark"] .entry-form textarea::placeholder {
  color: #737d8c;
}

body[data-theme="dark"] .entry-live-total-label,
body[data-theme="dark"] .entry-live-total-label svg,
body[data-theme="dark"] .entry-service-icon small,
body[data-theme="dark"] .odometer-result,
body[data-theme="dark"] .time-range-result {
  color: var(--entry-control-muted);
}

body[data-theme="dark"] .entry-live-total-divider {
  background: var(--entry-control-border);
}

body[data-theme="dark"] .entry-holiday-button[aria-pressed="true"],
body[data-theme="dark"] .weather-picker button[aria-pressed="true"],
body[data-theme="dark"] .odometer-toggle-button.active,
body[data-theme="dark"] .odometer-toggle-button[aria-expanded="true"],
body[data-theme="dark"] .time-range-toggle-button.active,
body[data-theme="dark"] .time-range-toggle-button[aria-expanded="true"] {
  background: var(--entry-control-selected-bg);
  border-color: var(--entry-control-selected-border);
  color: var(--home-text);
  box-shadow: inset 0 0 0 1px rgba(41, 163, 71, 0.12);
}

body[data-theme="dark"] .entry-service-icon[aria-pressed="true"] {
  background: color-mix(in srgb, var(--service-color) 16%, var(--entry-control-bg));
  border-color: color-mix(in srgb, var(--service-color) 48%, var(--entry-control-border));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--service-color) 16%, transparent);
  color: var(--service-color);
}

.toast {

  background: rgba(5, 8, 20, 0.88);
  border-radius: 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  left: 50%;
  line-height: 1.45;
  max-width: min(320px, calc(100vw - 48px));
  padding: 14px 18px;
  pointer-events: none;
  position: fixed;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: normal;
  z-index: 220;
}

/* Consolidated sales total card styles */
@media (max-width: 700px) {
  .sales-metric {

    cursor: pointer !important;
    grid-column: 1 / -1 !important;
    min-height: 40px !important;
    padding: 6px 14px !important;
    position: relative !important;
  }

  .sales-metric.show-breakdown {

    min-height: auto !important;
  }

  .metric-pair, .sales-metric .metric-pair {

    align-items: start !important;
    display: grid !important;
    gap: 12px 8px !important;
    grid-template-columns: minmax(0, 1fr) 42px !important;
    grid-template-rows: auto auto !important;
  }

  .sales-metric .metric-item {

    grid-column: 1 !important;
    min-width: 0 !important;
  }

  .sales-metric small {

    color: var(--home-muted) !important;
    font-size: 12px !important;
    font-weight: 720 !important;
    margin: 0 0 10px !important;
  }

  .sales-metric .sales-total-button {

    color: var(--ui-green) !important;
    display: block !important;
    font-size: clamp(27.3px, 7.56vw, 41px) !important;
    font-weight: 780 !important;
    letter-spacing: 0 !important;
    line-height: 0.92 !important;
    max-width: 100% !important;
    padding: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
  }

  .sales-metric .sales-total-row {

    align-items: center !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    min-width: 0 !important;
  }

  .sales-metric .sales-followup-action {

    font-size: 12px !important;
    flex: 0 0 auto !important;
    margin-top: 0 !important;
    min-height: 44px !important;
    padding: 0 14px !important;
  }

  .sales-total-button::after {

    content: none !important;
  }

  .sales-expand-icon {

    align-items: center !important;
    color: #050814 !important;
    display: inline-flex !important;
    height: 44px !important;
    justify-content: center !important;
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
  }

  .sales-expand-icon svg {

    display: block !important;
    height: 22px !important;
    width: 22px !important;
  }

  .sales-breakdown {

    display: none !important;
  }

  .sales-metric.show-breakdown .sales-breakdown {

    display: grid !important;
    gap: 4px !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  .sales-metric.show-breakdown .sales-breakdown:empty {

    min-height: 64px !important;
  }

  .sales-breakdown div {

    align-items: start !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    display: grid !important;
    gap: 1px !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .sales-breakdown span, .sales-breakdown strong {

    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  .sales-breakdown span {

    color: var(--home-muted) !important;
    font-size: clamp(7px, 2.2vw, 12px) !important;
    font-weight: 600 !important;
  }

  .sales-breakdown strong {

    color: var(--ui-green) !important;
    font-size: clamp(13px, 3.6vw, 19px) !important;
    font-weight: 600 !important;
  }

  .dashboard-metric:not(.sales-metric) {

    min-height: 24px !important;
    padding: 4px 10px !important;
  }

  .dashboard-metric:not(.sales-metric) .metric-pair {

    display: block !important;
  }

  .dashboard-metric:not(.sales-metric) strong {

    color: var(--ink) !important;
    font-size: 17px !important;
    font-weight: 820 !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  .metric-card-with-icon {

    align-content: start !important;
    display: grid !important;
    grid-template-rows: auto auto !important;
    position: relative !important;
    padding-right: 50px !important;
  }

  .metric-card-with-icon.metric-collapsible {

    cursor: pointer !important;
  }

  .metric-card-with-icon.show-breakdown {

    align-items: start !important;
    min-height: 72px !important;
    padding-bottom: 10px !important;
  }

  .metric-icon {

    align-items: center !important;
    color: var(--ui-green) !important;
    display: inline-flex !important;
    height: 40px !important;
    justify-content: center !important;
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
  }

  .metric-icon svg {

    display: block !important;
    height: 20px !important;
    width: 20px !important;
  }

  .metric-card-with-icon.show-breakdown .metric-icon {

    top: 12px !important;
    transform: none !important;
  }

  .metric-expand-indicator {

    align-items: center !important;
    color: var(--home-muted) !important;
    display: inline-flex !important;
    height: 16px !important;
    justify-content: center !important;
    position: absolute !important;
    right: 12px !important;
    top: calc(50% + 10px) !important;
    transform: none !important;
    width: 40px !important;
  }

  .metric-expand-indicator svg {

    display: block !important;
    height: 14px !important;
    width: 14px !important;
  }

  .metric-card-with-icon:not(.show-breakdown) .metric-breakdown {

    display: none !important;
  }

  .metric-breakdown {

    display: grid !important;
    gap: 4px 8px !important;
    grid-row: 2 !important;
    grid-template-columns: repeat(2, minmax(0, max-content)) !important;
    margin-top: 6px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .metric-key-deliveries .metric-breakdown {

    grid-template-columns: repeat(2, minmax(0, max-content)) !important;
    padding-right: 34px !important;
  }

  .metric-breakdown-item {

    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .metric-breakdown-item.is-wide {

    grid-column: 1 / -1 !important;
  }

  .metric-breakdown-item span {

    color: var(--home-muted) !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
  }

  .dashboard-metric:not(.sales-metric) .metric-breakdown-item strong {

    color: var(--ink) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
  }
}

/* Landscape phones: guide users back to portrait. Keyboard-open portrait (width < 568px) must not trigger this. */
@media (min-width: 568px) and (max-height: 599px) and (orientation: landscape) {
  .app-shell,
  .welcome-modal,
  .confirm-overlay,
  .calendar-day-overlay,
  .toast {
    display: none !important;
  }

  .landscape-notice {
    align-items: center;
    box-sizing: border-box;
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
  }
}

/* Desktop and tablet layout constraints. Keep mobile-first rules untouched below 701px. */
@media (min-width: 701px) and (min-height: 600px) {
  body {
    overflow-x: hidden;
  }

  .app-shell,
  .sidebar,
  .main {
    min-width: 0;
  }

  .main {
    box-sizing: border-box;
    margin-inline: auto;
    overflow-x: clip;
    width: 100%;
  }

  .view.active {
    display: grid;
    gap: 14px;
    justify-items: stretch;
  }

  .dashboard-head {
    display: grid;
    gap: 12px;
    width: 100%;
  }

  .dashboard-title-row {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
  }

  .dashboard-title-row h1 {
    align-items: center;
    display: flex;
    gap: 4px;
    margin: 0;
    min-width: 0;
  }

  .dashboard-title-row h1 span,
  .dashboard-title-row h1 small,
  .dashboard-brand-copy strong,
  .dashboard-brand-copy small,
  .service-table-row > strong,
  .service-percent {
    white-space: nowrap;
  }

  .dashboard-head-actions {
    display: flex;
    gap: 8px;
    justify-self: end;
    position: relative;
  }

  .share-button,
  .notify-button,
  .dashboard-date-picker-button,
  .dashboard-period-nav,
  .calendar-button {
    flex: 0 0 auto;
  }

  .share-button,
  .notify-button,
  .dashboard-date-picker-button,
  .dashboard-period-nav {
    align-items: center;
    background: var(--home-card);
    border: 1px solid var(--home-line);
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    color: var(--home-text);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    min-height: 38px;
    padding: 0;
    position: relative;
    width: 38px;
  }

  .share-icon,
  .notify-icon,
  .dashboard-period-nav svg,
  .dashboard-date-picker-button svg {
    display: block;
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
  }

  .dashboard-period-nav {
    background: transparent;
    border: 0;
    box-shadow: none;
    width: 32px;
  }

  .dashboard-brand-line {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    grid-column: 1 / -1;
    min-width: 0;
  }

  .dashboard-brand-icon {
    border-radius: 8px;
  }

  .dashboard-brand-copy {
    align-items: baseline;
    display: inline-flex;
    gap: 8px;
    min-width: 0;
  }

  .dashboard-control-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    width: 100%;
  }

  .period-selector-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 36px;
    min-width: 0;
    width: clamp(220px, 55vw, 240px);
  }

  .period-tabs {
    width: 100%;
  }

  .period-tabs {
    align-items: center;
    background: var(--home-card);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.065);
    display: inline-grid;
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 38px;
    overflow: hidden;
    padding: 0;
  }

  .period-tab {
    background: var(--home-card);
    border: 0;
    border-radius: 0;
    color: var(--home-text);
    font-size: 12px;
    font-weight: 800;
    height: 38px;
    min-height: 38px;
    min-width: 0;
    padding: 0;
  }

  .period-tab + .period-tab {
    border-left: 1px solid var(--home-line);
  }

  .period-tab.active {
    background: var(--home-green);
    box-shadow: none;
    color: #ffffff;
  }

  .custom-period-button {
    align-items: center;
    background: var(--home-card);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.065);
    box-sizing: border-box;
    color: var(--home-text);
    display: inline-flex;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    min-height: 38px;
    padding: 0;
    width: 38px;
  }

  .custom-period-button svg {
    fill: none;
    height: 15px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 15px;
  }

  .custom-period-button.active {
    background: var(--home-green);
    color: #ffffff;
  }

  .dashboard-weather-chips {
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(50px, max-content) 34px 34px;
    justify-self: end;
    min-width: 0;
    width: max-content;
  }

  .dashboard-weather-chips:has(.weather-chip-hidden) {
    grid-template-columns: minmax(50px, max-content) 34px;
    width: max-content;
  }

  .dashboard-weather-chips span {
    align-items: center;
    background: var(--home-card);
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.065);
    box-sizing: border-box;
    color: var(--home-text);
    display: inline-flex;
    font-size: 12px;
    font-weight: 780;
    height: 38px;
    justify-content: center;
    line-height: 1;
    min-height: 38px;
    min-width: 0;
    padding: 0;
    text-align: center;
    white-space: nowrap;
    width: auto;
  }

  .dashboard-weather-chips span:nth-child(2),
  .dashboard-weather-chips span:nth-child(3) {
    font-size: 18px;
    line-height: 1;
  }

  .dashboard-weather-chips .weather-chip-hidden {
    display: none;
  }

  .dashboard-metrics {
    gap: 12px;
    margin-bottom: 0;
  }

  .monthly-goal-card {
    background: transparent;
    border: 0;
    color: var(--home-text);
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 0;
    text-align: left;
    width: 100%;
  }

  .monthly-goal-empty,
  .monthly-goal-head,
  .monthly-goal-current {
    min-width: 0;
  }

  .monthly-goal-empty {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .monthly-goal-empty span,
  .monthly-goal-head span,
  .monthly-goal-current span,
  .monthly-goal-card p {
    color: var(--home-card-title-color, var(--home-muted));
    font-size: var(--home-card-title-size, 12px);
    font-weight: var(--home-card-title-weight, 700);
    line-height: var(--home-card-title-line, 1.2);
    margin: 0;
  }

  .monthly-goal-empty strong,
  .monthly-goal-head strong,
  .monthly-goal-current strong {
    color: var(--ui-green);
    font-size: clamp(18px, 1.6vw, 24px);
    font-weight: 850;
    line-height: 1.12;
  }

  .monthly-goal-head {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .monthly-goal-head > div {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  .monthly-goal-head-right {
    justify-items: end;
  }

  .monthly-goal-rate-row,
  .monthly-goal-current {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
  }

  .monthly-goal-panel,
  .service-overview-panel,
  .weekly-sales-panel,
  .period-sales-panel,
  .calendar-panel,
  .entry-form,
  #settingsView .panel {
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  .service-overview,
  .service-table,
  .entry-layout,
  .settings-grid {
    min-width: 0;
    width: 100%;
  }

  .service-overview,
  .service-panel-header,
  .service-table-row,
  .service-name-cell,
  .service-table-row > strong {
    min-width: 0;
  }

  .service-panel-header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
  }

  .service-table-row {
    align-items: center;
    display: grid;
  }

  .service-name-cell > span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .service-sort-control .panel-toggle span {
    display: none;
  }

  .entry-layout {
    justify-items: center;
  }

  .entry-form {
    box-sizing: border-box;
    padding: 18px;
  }

  .entry-form .form-header {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
  }

  .entry-header-actions {
    justify-content: end;
    margin-left: 0;
  }

  .entry-date-field {
    justify-items: center;
  }

  .entry-date-control {
    grid-template-columns: 44px minmax(184px, 220px) 44px;
  }

  .entry-date-card-wrap,
  .entry-date-display {
    inline-size: 220px;
  }

  .settings-grid {
    justify-items: stretch;
  }

  .nav-tabs {
    gap: 8px;
    padding-right: 10px;
  }

  .nav-tab {
    align-items: center;
    border-radius: 0 12px 12px 0;
    display: grid;
    font-size: 13px;
    font-weight: 780;
    gap: 12px;
    grid-template-columns: 28px minmax(0, 1fr);
    justify-content: start;
    line-height: 1.25;
    min-height: 48px;
    padding: 0 14px 0 18px;
    text-align: left;
  }

  .nav-icon {
    display: block;
    height: 22px;
    width: 22px;
  }

  .nav-add-circle {
    align-items: center;
    background: var(--ui-green);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
  }

  .nav-tab-add .nav-icon {
    height: 18px;
    width: 18px;
  }

  .metric-card-with-icon {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(72px, max-content) 44px;
    overflow: hidden;
    padding: 16px 18px;
  }

  .sales-metric {
    align-content: center;
    cursor: default;
    display: grid;
    grid-column: 1 / -1;
    min-height: 0;
    overflow: hidden;
    padding: 18px 20px;
    position: relative;
  }

  .sales-metric .metric-pair {
    align-items: center;
    display: grid;
    gap: 16px 22px;
    grid-template-columns: minmax(220px, 1.45fr) repeat(5, minmax(0, 1fr));
    height: 100%;
    min-height: 140px;
  }

  .sales-metric .metric-item {
    align-content: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    display: grid;
    gap: 8px;
    justify-items: start;
    min-width: 0;
    min-height: 100%;
    padding: 4px 0;
  }

  .sales-metric .metric-item,
  .sales-breakdown div {
    min-height: 100%;
  }

  .sales-metric small {
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
  }

  .sales-total-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
  }

  .sales-metric .sales-total-button {
    color: var(--ui-green);
    display: block;
    font-size: clamp(30px, 3.1vw, 42px);
    font-weight: 860;
    line-height: 1;
    white-space: nowrap;
  }

  .sales-breakdown {
    align-items: stretch;
    display: contents;
    margin: 0;
    min-width: 0;
  }

  .sales-breakdown:empty {
    display: none;
  }

  .sales-metric:has(.sales-breakdown:empty) {
    grid-column: auto;
  }

  .sales-metric:has(.sales-breakdown:empty) .metric-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .sales-metric:has(.sales-breakdown:empty) .metric-item {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  .sales-breakdown div {
    align-content: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    display: grid;
    gap: 6px;
    justify-items: center;
    min-width: 0;
    min-height: 100%;
    padding: 4px 0;
    text-align: center;
  }

  .sales-breakdown div:nth-child(4) {
    grid-column: auto;
  }

  .sales-breakdown div:nth-child(5) {
    grid-column: auto;
  }

  .sales-breakdown span {
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 780;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sales-breakdown strong {
    color: var(--ui-green);
    font-size: clamp(15px, 1.35vw, 20px);
    font-weight: 830;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sales-expand-icon,
  .metric-expand-indicator {
    display: none;
  }

  .dashboard-metric:not(.sales-metric) .metric-pair {
    display: contents;
  }

  .dashboard-metric:not(.sales-metric) .metric-item {
    align-content: center;
    display: grid;
    gap: 7px;
    grid-column: 1;
    justify-items: start;
    min-width: 0;
    text-align: left;
  }

  .dashboard-metric:not(.sales-metric) .metric-item strong {
    color: var(--home-text);
    display: block;
    font-size: clamp(26px, 2vw, 32px);
    font-weight: 860;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-metric:not(.sales-metric) .metric-breakdown {
    align-content: center;
    align-self: center;
    display: grid;
    gap: 5px 10px;
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, max-content));
    justify-content: start;
    justify-self: end;
    min-width: 0;
  }

  .metric-key-deliveries .metric-breakdown {
    grid-template-columns: repeat(2, minmax(0, max-content));
    padding-right: 34px;
  }

  .metric-breakdown-item {
    align-items: baseline;
    display: inline-flex;
    gap: 4px;
    min-width: 0;
  }

  .metric-breakdown-item.is-wide {
    grid-column: 1 / -1;
  }

  .metric-breakdown-item.is-compact-service {
    gap: 0;
  }

  .metric-breakdown-item span {
    color: var(--home-muted);
    font-size: 10px;
    font-weight: 720;
    white-space: nowrap;
  }

  .dashboard-metric:not(.sales-metric) .metric-breakdown-item strong {
    color: var(--home-text);
    font-size: 12px;
    font-weight: 780;
    line-height: 1;
    white-space: nowrap;
  }

  .metric-icon {
    align-items: center;
    color: var(--ui-green);
    display: inline-flex;
    height: 44px;
    justify-content: center;
    opacity: 1;
    grid-column: 3;
    justify-self: end;
    position: static;
    transform: none;
    width: 44px;
  }

  .metric-icon svg {
    display: block;
    height: 38px;
    stroke: currentColor;
    width: 38px;
  }

  .calendar-button {
    font-size: 0;
  }

  .calendar-button::before {
    content: "📅";
    font-size: 16px;
    line-height: 1;
  }
}

@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: 216px minmax(0, 1fr);
  }

  .sidebar {
    gap: 24px;
    padding: 20px 14px 28px 0;
  }

  .brand {
    gap: 8px;
    padding-left: 14px;
  }

  .brand-mark {
    font-size: 34px;
  }

  .brand p {
    font-size: 14px;
    line-height: 1.25;
  }

  .main {
    max-width: 1180px;
    padding: 24px clamp(24px, 3vw, 40px) 44px;
    width: min(100%, 1180px);
  }

  #dashboardView,
  #entriesView,
  #analysisView,
  #settingsView,
  #dealDetailView {
    margin-inline: auto;
    max-width: 1060px;
    width: 100%;
  }

  .dashboard-head {
    margin-bottom: 2px;
    min-width: 0;
  }

  .dashboard-title-row {
    gap: 10px 16px;
    width: 100%;
  }

  .dashboard-title-row h1 span {
    font-size: clamp(16px, 1.54vw, 21px);
    font-weight: 820;
    line-height: 1.1;
  }

  .dashboard-title-row h1 small {
    font-size: clamp(10px, 0.95vw, 13px);
    font-weight: 760;
    line-height: 1;
  }

  .dashboard-brand-icon {
    height: 30px;
    width: 30px;
  }

  .dashboard-control-row {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .period-tabs {
    max-width: none;
    width: 100%;
  }

  #dashboardView[data-dashboard-period="custom"] .dashboard-control-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #dashboardView[data-dashboard-period="custom"] .period-selector-row {
    max-width: 240px;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-metric {
    align-content: center;
    min-height: 124px;
    min-width: 0;
    padding: 16px 18px;
  }

  .dashboard-metric strong,
  .sales-metric .sales-total-button {
    line-height: 1.1;
  }

  .monthly-goal-panel {
    margin: 0;
  }

  .monthly-goal-card {
    min-height: 58px;
    text-align: left;
  }

  .weekly-sales-panel,
  .period-sales-panel,
  .calendar-panel {
    overflow: hidden;
  }

  .service-table-row {
    gap: 8px 14px;
    grid-template-columns: minmax(180px, 1fr) minmax(112px, 0.58fr) minmax(72px, 0.38fr) minmax(112px, 0.58fr) 24px;
    width: 100%;
  }

  .service-bar-cell {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .entry-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-form {
    max-width: 100%;
    width: 100%;
  }

  .entry-header-actions {
    gap: 4px;
    min-width: 0;
  }

  .entry-form .form-header h2 {
    font-size: 16px;
  }

  .entry-area-card {
    font-size: 11px;
    width: 58px;
  }

  .entry-vehicle-card {
    width: 46px;
  }

  .entry-header-actions .ghost-button,
  .entry-header-actions .primary-button {
    font-size: 11px;
    padding-inline: 7px;
  }

  .entry-top-save-button {
    min-width: 48px;
  }

  .entry-service-icons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .delivery-timer {
    border-radius: 14px;
    bottom: auto;
    left: auto;
    margin-left: 14px;
    max-width: none;
    position: static;
    right: auto;
    width: auto;
    z-index: auto;
  }

  .delivery-timer-collapsed {
    min-height: 52px;
    padding: 8px 42px 8px 10px;
  }

  .timer-start-icon {
    flex-basis: 28px;
    height: 28px;
    width: 28px;
  }

  .timer-start-title {
    font-size: 14px;
  }

  .timer-start-subtext {
    display: none;
  }
}

@media (min-width: 981px) and (max-width: 1100px) {
  .main {
    max-width: 960px;
    padding-inline: 24px;
  }

  #dashboardView,
  #entriesView,
  #analysisView,
  #dealDetailView,
  #settingsView {
    max-width: 820px;
  }

  .dashboard-control-row {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .dashboard-metrics {
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-metric .metric-pair {
    gap: 14px 12px;
    grid-template-columns: minmax(180px, 1.35fr) repeat(5, minmax(0, 1fr));
  }

  .sales-breakdown {
    display: contents;
  }

  .sales-breakdown div:nth-child(4),
  .sales-breakdown div:nth-child(5) {
    grid-column: auto;
  }

  .sales-breakdown div:nth-child(5) {
    grid-column: 2;
  }

  .service-table-row {
    grid-template-columns: minmax(150px, 1.2fr) minmax(86px, 0.7fr) minmax(56px, 0.45fr) minmax(86px, 0.7fr) 22px;
  }

  .delivery-timer {
    max-width: none;
  }
}

@media (min-width: 701px) and (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    border-bottom: 1px solid #e9eef5;
    border-right: 0;
    gap: 10px;
    padding: 12px 24px 10px;
  }

  body[data-theme="dark"] .sidebar {
    border-bottom-color: var(--line);
    border-right-color: transparent;
  }

  .brand {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
    padding-left: 0;
    text-align: left;
  }

  .brand-mark {
    font-size: 28px;
  }

  .brand p {
    font-size: 14px;
    line-height: 1.2;
  }

  .nav-tabs {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 0;
  }

  .nav-tab {
    border-radius: 12px;
    font-size: 12px;
    gap: 7px;
    grid-template-columns: auto auto;
    justify-content: center;
    min-height: 46px;
    min-width: 0;
    padding: 0 10px;
  }

  .nav-tab span:not(.nav-add-circle) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-tab.active,
  .nav-tab:hover {
    border-radius: 12px;
  }

  .nav-icon {
    height: 20px;
    width: 20px;
  }

  .nav-add-circle {
    height: 28px;
    width: 28px;
  }

  .nav-tab-add .nav-icon {
    height: 17px;
    width: 17px;
  }

  .main {
    max-width: 760px;
    padding: 22px 24px 96px;
  }

  .dashboard-title-row {
    gap: 8px 14px;
  }

  .dashboard-title-row h1 span {
    font-size: 24px;
  }

  .dashboard-title-row h1 small {
    font-size: 14px;
  }

  .dashboard-brand-icon {
    height: 28px;
    width: 28px;
  }

  .dashboard-control-row {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .period-tabs {
    max-width: none;
    width: 100%;
  }

  #dashboardView[data-dashboard-period="custom"] .dashboard-control-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #dashboardView[data-dashboard-period="custom"] .period-selector-row {
    max-width: 100%;
  }

  .dashboard-weather-chips {
    max-width: 100%;
  }

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

  .dashboard-metric {
    min-height: 124px;
  }

  .sales-metric .metric-pair {
    gap: 12px 10px;
    grid-template-columns: minmax(160px, 1.25fr) repeat(5, minmax(0, 1fr));
  }

  .sales-breakdown {
    display: contents;
  }

  .sales-breakdown div:nth-child(4),
  .sales-breakdown div:nth-child(5) {
    grid-column: auto;
  }

  .sales-breakdown div:nth-child(5) {
    grid-column: 2;
  }

  .service-table-row {
    gap: 8px 10px;
    grid-template-columns: minmax(120px, 1fr) minmax(76px, auto) minmax(42px, auto) minmax(76px, auto) 22px;
  }

  .entry-form {
    max-width: 100%;
    width: 100%;
  }

  .entry-service-icons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .delivery-timer {
    bottom: 18px;
    left: auto;
    max-width: 360px;
    right: 24px;
    width: min(360px, calc(100vw - 48px));
  }
}

/* Desktop and tablet calendar: mirror the mobile home design. */
@media (min-width: 701px) and (min-height: 600px) {
  :root {
    --mobile-page-pad: 18px;
    --mobile-card-gap: 12px;
    --ui-green: #008a12;
    --ui-muted: #5f6878;
    --ui-line: #e4e8ef;
    --home-page-pad: 16px;
    --home-section-gap: 10px;
    --home-card-gap: 10px;
    --home-radius: 16px;
    --home-bg: #f6f7f9;
    --home-card: #ffffff;
    --home-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --home-green: #008a12;
    --home-text: #111827;
    --home-muted: #667085;
    --home-line: #e7ecf2;
    --calendar-cell-min-height: clamp(72px, 7vw, 104px);
    --calendar-cell-padding-block: 8px 7px;
    --calendar-cell-padding-inline: 8px;
    --calendar-summary-label-size: 13px;
    --calendar-summary-value-size: clamp(22px, 1.9vw, 28px);
    --calendar-summary-count-size: 12px;
    --calendar-card-gap: clamp(14px, 1.2vw, 18px);
    --app-content-max: 760px;
    --calendar-page-max: var(--app-content-max);
    --desktop-content-max: var(--app-content-max);
  }

  .main:has(#dashboardView.calendar-only),
  .main:has(#settingsView.active) {

    padding-top: max(12px, env(safe-area-inset-top)) !important;
  }

  #dashboardView.calendar-only .dashboard-weather-chips,
  #dashboardView.calendar-only .dashboard-actions,
  #dashboardView.calendar-only .dashboard-metrics,
  #dashboardView.calendar-only .dashboard-head,
  #dashboardView.calendar-only .dashboard-head .dashboard-control-row,
  #dashboardView.calendar-only .monthly-goal-panel,
  #dashboardView.calendar-only .service-overview-panel,
  #dashboardView.calendar-only .weekly-sales-panel {
    display: none !important;
  }

  #dashboardView.calendar-only #dashboardDateTitle,
  #dashboardView.calendar-only .dashboard-brand-line,
  #dashboardView.calendar-only .dashboard-head-actions {

    display: none !important;
  }

  #dashboardView .monthly-goal-card, #dashboardView .calendar-panel {

    margin-top: 0 !important;
    padding: 16px !important;
  }

  #dashboardView .calendar-panel {

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    gap: var(--calendar-card-gap) !important;
    margin-top: var(--home-card-gap) !important;
    padding: 0 !important;
  }

  #dashboardView .calendar-panel:not([hidden]) {
    display: grid !important;
  }

  .ledger-calendar-card {

    background: var(--home-card) !important;
    border: 0 !important;
    border-radius: var(--home-radius) !important;
    box-shadow: var(--home-shadow) !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  #dashboardView.calendar-only {
    max-width: min(100%, calc(var(--app-content-max) * 0.8)) !important;
  }

  #dashboardView.calendar-only #calendarPanel > div {
    display: grid !important;
    gap: var(--calendar-card-gap) !important;
  }

  #dashboardView.calendar-only .calendar-back-row {
    margin-bottom: 0 !important;
  }

  #dashboardView.calendar-only .calendar-deal-section {
    margin: 0 !important;
  }

  #dashboardView.calendar-only .calendar-deal-card {
    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--home-shadow) !important;
  }

  .calendar-back-row {

    display: flex !important;
    justify-content: flex-start !important;
    margin-bottom: var(--home-card-gap) !important;
    min-height: 40px !important;
  }

  .calendar-back-home-button {

    align-items: center !important;
    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--home-shadow) !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    height: 40px !important;
    justify-content: center !important;
    min-height: 40px !important;
    width: 40px !important;
  }

  .calendar-summary-card {
    align-items: center !important;
    border-bottom: 1px solid var(--home-line) !important;
    display: grid !important;
    gap: 12px !important;
    grid-template-columns: minmax(0, 1fr) 44px !important;
    justify-items: stretch !important;
    min-height: 0 !important;
    padding: 14px 16px !important;
    position: relative !important;
  }

  .calendar-summary-items {
    display: grid !important;
    gap: 8px 18px !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, max-content)) !important;
    justify-content: center !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .calendar-summary-item {
    align-items: baseline !important;
    display: inline-grid !important;
    gap: 4px 7px !important;
    grid-template-columns: auto auto auto !important;
    min-width: 0 !important;
  }

  .calendar-summary-card span {
    color: var(--home-muted) !important;
    font-size: var(--calendar-summary-label-size) !important;
    font-weight: 650 !important;
    justify-self: start !important;
    white-space: nowrap !important;
  }

  .calendar-summary-card strong {
    color: var(--ui-green) !important;
    font-feature-settings: "tnum" !important;
    font-size: var(--calendar-summary-value-size) !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 830 !important;
    justify-self: start !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  .calendar-summary-card small {
    color: var(--home-muted) !important;
    font-feature-settings: "tnum" !important;
    font-size: var(--calendar-summary-count-size) !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 560 !important;
    justify-self: start !important;
    white-space: nowrap !important;
  }

  .calendar-summary-mode-button {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--home-muted) !important;
    display: inline-flex !important;
    height: 44px !important;
    justify-content: center !important;
    min-height: 44px !important;
    padding: 0 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: static !important;
    justify-self: end !important;
    width: 44px !important;
    z-index: 3 !important;
  }

  .calendar-summary-mode-button svg {
    height: 20px !important;
    width: 20px !important;
  }

  .calendar-summary-mode-menu {
    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--home-shadow) !important;
    display: grid !important;
    gap: 4px !important;
    padding: 6px !important;
    position: absolute !important;
    right: 16px !important;
    top: calc(100% - 2px) !important;
    width: 112px !important;
    z-index: 5 !important;
  }

  .calendar-summary-mode-option {
    background: transparent !important;
    border: 0 !important;
    border-radius: 8px !important;
    color: var(--home-text) !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    min-height: 44px !important;
    padding: 0 10px !important;
    text-align: left !important;
  }

  .calendar-summary-mode-option.selected {
    background: rgba(0, 138, 18, 0.1) !important;
    color: var(--ui-green) !important;
  }

  .ledger-calendar-head {

    align-items: center !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: 44px 1fr 44px !important;
    padding: 10px 12px 8px !important;
  }

  .ledger-calendar-head > div {

    align-items: center !important;
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
  }

  .ledger-calendar-head strong {

    color: var(--home-text) !important;
    font-size: 18px !important;
    font-weight: 720 !important;
    line-height: 1 !important;
  }

  .ledger-calendar-head .calendar-nav-button, .ledger-calendar-head .calendar-title-picker {

    align-items: center !important;
    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--home-shadow) !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    height: 40px !important;
    justify-content: center !important;
    min-height: 40px !important;
    width: 40px !important;
  }

  .ledger-calendar-head .calendar-nav-button::before {
    content: none !important;
  }

  .calendar-back-home-button svg,
  .ledger-calendar-head .calendar-nav-button svg {

    height: 18px !important;
    width: 18px !important;
  }

  .ledger-calendar-head .calendar-title-picker svg {

    height: 18px !important;
    width: 18px !important;
  }

  .ledger-calendar-weekdays, .ledger-calendar-grid {

    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  .ledger-calendar-weekdays {

    border-bottom: 1px solid var(--home-line) !important;
    color: var(--home-muted) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    padding: 0 0 6px !important;
    text-align: center !important;
  }

  .ledger-calendar-weekdays .weekday-0 {

    color: var(--danger) !important;
  }

  .ledger-calendar-weekdays .weekday-6 {

    color: var(--rocket) !important;
  }

  .ledger-calendar-grid {

    align-items: stretch !important;
    border-left: 1px solid var(--home-line) !important;
    grid-auto-rows: var(--calendar-cell-min-height) !important;
  }

  .ledger-calendar-cell {

    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--home-line) !important;
    border-right: 1px solid var(--home-line) !important;
    box-sizing: border-box !important;
    color: var(--home-text) !important;
    display: grid !important;
    font: inherit !important;
    grid-template-areas:
      "day weather"
      "sales sales"
      "count count" !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto 1fr auto !important;
    height: auto !important;
    min-height: var(--calendar-cell-min-height) !important;
    min-width: 0 !important;
    padding: var(--calendar-cell-padding-block) var(--calendar-cell-padding-inline) !important;
    text-align: left !important;
    width: 100% !important;
  }

  .ledger-calendar-cell.muted {

    pointer-events: none !important;
  }

  .ledger-calendar-cell.today {

    background: rgba(22, 163, 74, 0.08) !important;
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.28) !important;
  }

  .ledger-calendar-cell.selected {

    background: rgba(37, 99, 235, 0.07) !important;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.52) !important;
  }

  body[data-theme="dark"] .ledger-calendar-cell.today {

    background: rgba(34, 197, 94, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.5) !important;
  }

  body[data-theme="dark"] .ledger-calendar-cell.selected {

    background: rgba(59, 130, 246, 0.13) !important;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.72) !important;
  }

  .ledger-calendar-cell .calendar-day-number {

    color: var(--home-text) !important;
    font-size: clamp(13px, 1.05vw, 16px) !important;
    font-weight: 560 !important;
    grid-area: day !important;
    line-height: 1 !important;
  }

  .ledger-calendar-cell.weekday-0 .calendar-day-number {

    color: var(--danger) !important;
  }

  .ledger-calendar-cell.weekday-6 .calendar-day-number {

    color: var(--rocket) !important;
  }

  .ledger-calendar-cell.holiday .calendar-day-number {

    color: var(--danger) !important;
  }

  .ledger-calendar-cell .calendar-weather {

    font-size: clamp(12px, 1vw, 15px) !important;
    grid-area: weather !important;
    line-height: 1 !important;
  }

  .ledger-calendar-cell strong {

    align-self: center !important;
    color: var(--ui-green) !important;
    font-size: clamp(13px, 1.15vw, 16px) !important;
    font-weight: 620 !important;
    grid-area: sales !important;
    justify-self: center !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .ledger-calendar-cell small {

    color: var(--home-muted) !important;
    font-size: clamp(11px, 1vw, 13px) !important;
    font-weight: 500 !important;
    grid-area: count !important;
    justify-self: center !important;
    line-height: 1 !important;
  }

  .ledger-calendar-cell strong.calendar-sales-missing {

    color: #d97706 !important;
    font-size: clamp(13px, 1.15vw, 16px) !important;
    font-weight: 760 !important;
  }

  .ledger-calendar-cell strong.calendar-day-off-badge {

    color: var(--home-muted, #64748b) !important;
    font-size: clamp(11px, 1vw, 13px) !important;
    font-weight: 500 !important;
    padding: 0 !important;
  }

  .payment-calendar-section {
    display: grid !important;
    gap: var(--calendar-card-gap) !important;
  }

  .payment-calendar-card {
    margin-top: 0 !important;
  }

  .payment-calendar-section-head {
    align-items: center !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: space-between !important;
    margin: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .payment-calendar-section-head h3 {
    color: var(--home-muted) !important;
    flex: 1 1 auto !important;
    font-size: 13px !important;
    font-weight: 720 !important;
    line-height: 1 !important;
    margin: 0 !important;
    min-width: 0 !important;
  }

  .payment-calendar-section-head button {
    align-items: center !important;
    appearance: none !important;
    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--home-shadow) !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    font: inherit !important;
    font-size: 12px !important;
    font-weight: 760 !important;
    justify-content: center !important;
    line-height: 1 !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
  }

  .payment-calendar-section-head button[aria-expanded="true"] {
    border-color: rgba(0, 138, 18, 0.28) !important;
    color: var(--ui-green) !important;
  }

  #dashboardView.calendar-only .payment-calendar-cell {
    gap: 0 !important;
    grid-template-areas:
      "day markers"
      "amount amount"
      ". ." !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto 1fr auto !important;
    height: auto !important;
    min-height: var(--calendar-cell-min-height) !important;
    padding: var(--calendar-cell-padding-block) var(--calendar-cell-padding-inline) !important;
  }

  #dashboardView.calendar-only .payment-calendar-cell .calendar-day-number {
    font-size: clamp(13.5px, 1.1vw, 16px) !important;
    font-weight: 560 !important;
  }

  #dashboardView.calendar-only .payment-calendar-cell-list {
    align-items: start !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    grid-area: markers !important;
    justify-self: end !important;
    min-height: 12px !important;
    padding-top: 1px !important;
  }

  #dashboardView.calendar-only .payment-calendar-cell-list em {
    background: var(--payment-service-color, var(--ui-green)) !important;
    border-radius: 999px !important;
    display: block !important;
    height: 8px !important;
    width: 8px !important;
  }

  #dashboardView.calendar-only .payment-calendar-cell-list small {
    color: var(--home-muted) !important;
    font-size: 9px !important;
    font-weight: 760 !important;
    line-height: 1 !important;
  }

  #dashboardView.calendar-only .payment-calendar-cell strong {
    align-self: center !important;
    color: var(--ui-green) !important;
    font-size: clamp(13.5px, 1.15vw, 16.5px) !important;
    font-weight: 620 !important;
    grid-area: amount !important;
    justify-self: center !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    overflow-wrap: normal !important;
    white-space: nowrap !important;
    z-index: 1 !important;
  }

  #dashboardView.calendar-only .payment-calendar-cell.has-payment {
    background: var(--home-card) !important;
  }

  #dashboardView.calendar-only .payment-manual-section {
    display: grid !important;
    gap: var(--calendar-card-gap) !important;
    margin: 0 !important;
  }

  #dashboardView.calendar-only .payment-schedule-row {
    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--home-shadow) !important;
    display: grid !important;
    min-width: 0 !important;
    padding: 10px !important;
  }

  #dashboardView.calendar-only .payment-schedule-menu-row {
    gap: 0 !important;
    padding-block: 4px !important;
  }

  #dashboardView.calendar-only .payment-manual-row {
    align-items: center !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    min-height: 44px !important;
    min-width: 0 !important;
  }

  #dashboardView.calendar-only .payment-manual-row + .payment-manual-row {
    border-top: 1px solid var(--home-line) !important;
    margin-top: 5px !important;
    padding-top: 5px !important;
  }

  #dashboardView.calendar-only .payment-service-name {
    align-items: center !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    font-size: 14px !important;
    font-weight: 780 !important;
    gap: 7px !important;
    line-height: 1.2 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #dashboardView.calendar-only .payment-service-name::before {
    background: var(--payment-service-color, var(--ui-green)) !important;
    border-radius: 999px !important;
    content: "" !important;
    flex: 0 0 auto !important;
    height: 9px !important;
    width: 9px !important;
  }

  #dashboardView.calendar-only .payment-manual-row strong {
    color: var(--home-text) !important;
    font-feature-settings: "tnum" !important;
    font-size: 14px !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  #dashboardView.calendar-only .payment-manual-add-button {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--home-muted) !important;
    display: inline-flex !important;
    font: inherit !important;
    justify-content: center !important;
    line-height: 1 !important;
    min-height: 44px !important;
    padding: 0 !important;
    width: 44px !important;
  }

  #dashboardView.calendar-only .payment-manual-add-button svg {
    height: 16px !important;
    width: 16px !important;
  }

  .calendar-day-overlay {
    z-index: 140 !important;
  }

  .calendar-day-card {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22) !important;
    gap: 14px !important;
    max-width: 360px !important;
    padding: 18px !important;
    width: min(100%, 360px) !important;
  }

  .payment-day-summary,
  .payment-day-detail-card {
    background: var(--home-card) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 12px !important;
  }

  .payment-day-summary {
    display: grid !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
    padding: 12px !important;
  }

  .payment-day-summary span {
    color: var(--home-muted) !important;
    font-size: 11px !important;
    font-weight: 680 !important;
  }

  .payment-day-summary strong {
    color: var(--ui-green) !important;
    font-size: 26px !important;
    font-weight: 860 !important;
    line-height: 1.1 !important;
  }

  .payment-day-list {
    display: grid !important;
    gap: 8px !important;
  }

  .payment-day-detail-card {
    display: grid !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  .payment-day-detail-head {
    align-items: center !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: space-between !important;
  }

  .payment-day-service-name {
    align-items: center !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    font-size: 13px !important;
    font-weight: 760 !important;
    gap: 6px !important;
    line-height: 1.2 !important;
    min-width: 0 !important;
  }

  .payment-day-service-name i {
    background: var(--payment-service-color, var(--ui-green)) !important;
    border-radius: 999px !important;
    display: inline-block !important;
    flex: 0 0 auto !important;
    height: 7px !important;
    width: 7px !important;
  }

  .payment-day-detail-head strong {
    color: var(--home-text) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  .payment-day-detail-list {
    display: grid !important;
    gap: 5px !important;
    margin: 0 !important;
  }

  .payment-day-detail-list div {
    align-items: center !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: space-between !important;
  }

  .payment-day-detail-list dt {
    color: var(--home-muted) !important;
    font-size: 12px !important;
    font-weight: 760 !important;
  }

  .payment-day-detail-list dd {
    color: var(--home-text) !important;
    flex: 0 0 72px !important;
    font-size: 13px !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 700 !important;
    margin: 0 !important;
    text-align: right !important;
  }

  .payment-day-detail-actions {
    align-items: center !important;
    display: flex !important;
    gap: 8px !important;
    justify-content: flex-end !important;
  }

  .payment-date-edit-button,
  .payment-date-delete-button {
    font-size: 10px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
  }

  .payment-schedule-overlay,
  .payment-rule-overlay {
    align-items: center !important;
    background: rgba(15, 23, 42, 0.36) !important;
    display: grid !important;
    inset: 0 !important;
    overscroll-behavior: contain !important;
    padding: 20px !important;
    place-items: center !important;
    position: fixed !important;
    z-index: 145 !important;
  }

  .payment-schedule-dialog-card,
  .payment-rule-card {
    -webkit-overflow-scrolling: touch !important;
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22) !important;
    display: grid !important;
    gap: 14px !important;
    max-height: calc(100dvh - 40px) !important;
    max-width: 360px !important;
    overflow-y: auto !important;
    padding: 18px !important;
    width: min(100%, 360px) !important;
  }

  .payment-schedule-dialog-head {
    align-items: center !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: space-between !important;
  }

  .payment-schedule-dialog-head h2 {
    color: var(--home-text) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  .payment-schedule-dialog-head button {
    align-items: center !important;
    background: var(--surface-soft) !important;
    border: 1px solid var(--line) !important;
    border-radius: 999px !important;
    color: var(--ink) !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    font: inherit !important;
    font-size: 20px !important;
    height: 36px !important;
    justify-content: center !important;
    line-height: 1 !important;
    padding: 0 !important;
    width: 36px !important;
  }

  .payment-schedule-dialog-list {
    display: grid !important;
    gap: 8px !important;
  }

  .payment-schedule-dialog-list p {
    align-items: start !important;
    border-top: 1px solid var(--home-line) !important;
    color: var(--home-muted) !important;
    display: grid !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    gap: 4px !important;
    grid-template-columns: minmax(72px, max-content) minmax(0, 1fr) !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    padding-top: 8px !important;
  }

  .payment-schedule-dialog-list p:first-child {
    border-top: 0 !important;
    padding-top: 0 !important;
  }

  .payment-schedule-dialog-list strong {
    align-items: center !important;
    color: var(--home-text) !important;
    display: inline-flex !important;
    font-weight: 800 !important;
    gap: 7px !important;
  }

  .payment-schedule-dialog-service strong i {
    background: var(--payment-service-color) !important;
    border-radius: 999px !important;
    display: inline-block !important;
    flex: 0 0 auto !important;
    height: 8px !important;
    width: 8px !important;
  }

  .payment-rule-card h2 {
    color: var(--home-text) !important;
    font-size: 18px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  .payment-rule-card input:not([type="checkbox"]),
  .payment-rule-card select {
    background: #fff !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 10px !important;
    color: var(--home-text) !important;
    font: inherit !important;
    font-size: 15px !important;
    min-height: 44px !important;
    padding: 0 10px !important;
  }

  .payment-rule-card.manual-payment-add-card .manual-payment-targets {
    display: grid !important;
    gap: 6px !important;
  }

  .payment-rule-card.manual-payment-add-card .manual-payment-target-row {
    align-items: center !important;
    background: var(--surface-soft) !important;
    border: 1px solid var(--home-line) !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: 18px minmax(0, 1fr) auto !important;
    min-height: 40px !important;
    padding: 5px 9px !important;
  }

  .payment-rule-card.manual-payment-add-card .manual-payment-target-row input[type="checkbox"] {
    accent-color: var(--accent) !important;
    appearance: auto !important;
    box-sizing: border-box !important;
    height: 18px !important;
    inline-size: 18px !important;
    justify-self: center !important;
    margin: 0 !important;
    min-height: 18px !important;
    padding: 0 !important;
    width: 18px !important;
  }

  .payment-rule-card.manual-payment-add-card .manual-payment-target-row span {
    color: var(--home-text) !important;
    font-size: 12px !important;
    font-weight: 760 !important;
    line-height: 1.2 !important;
    min-width: 0 !important;
  }

  .payment-rule-card.manual-payment-add-card .manual-payment-target-row strong {
    color: var(--home-text) !important;
    font-feature-settings: "tnum" !important;
    font-size: 13px !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 760 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .payment-rule-actions {
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .payment-rule-actions button {
    min-height: 44px !important;
  }

  .manual-payment-add-actions {
    background: var(--home-card) !important;
    bottom: -18px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 0 -18px -18px !important;
    padding: 10px 18px 18px !important;
    position: sticky !important;
  }
}

@media (min-width: 981px) and (min-height: 600px) {
  :root {
    --app-content-max: 820px;
  }
}

@media (min-width: 1101px) and (min-height: 600px) {
  :root {
    --app-content-max: 1120px;
  }
}

/* Desktop and tablet refinement layer. Keep mobile rules below 701px untouched. */
@media (min-width: 701px) and (min-height: 600px) {
  .main {
    align-content: start;
    max-width: none;
    padding: 28px clamp(24px, 3.5vw, 56px) 48px;
    display: grid;
    justify-items: center;
    width: 100%;
  }

  #dashboardView {
    --home-card-title-color: var(--home-muted);
    --home-card-title-size: clamp(12px, 1vw, 14px);
    --home-card-title-weight: 700;
    --home-card-title-line: 1.18;
    --home-subtitle-color: var(--home-muted);
    --home-subtitle-size: clamp(11px, 0.88vw, 12.5px);
    --home-subtitle-weight: 700;
    --home-subtitle-line: 1.16;
    --home-detail-label-color: var(--home-muted);
    --home-detail-label-size: clamp(10px, 0.78vw, 11.5px);
    --home-detail-label-weight: 700;
    --home-detail-value-color: var(--home-text);
    --home-detail-value-size: clamp(13px, 1.05vw, 15px);
    --home-detail-value-weight: 800;
    --home-detail-line: 1.15;
  }

  #dashboardView .dashboard-memo-head > span,
  #dashboardView .weekly-chart-head span,
  #dashboardView .period-chart-head span,
  #dashboardView .service-overview-panel h2 {
    color: var(--home-card-title-color) !important;
    font-size: var(--home-card-title-size) !important;
    font-weight: var(--home-card-title-weight) !important;
    line-height: var(--home-card-title-line) !important;
  }

  #dashboardView .weekly-chart-head small,
  #dashboardView .period-chart-head small,
  #dashboardView .weekly-chart-meta em,
  #dashboardView .service-header-labels span {
    color: var(--home-subtitle-color) !important;
    font-size: var(--home-subtitle-size) !important;
    font-weight: var(--home-subtitle-weight) !important;
    line-height: var(--home-subtitle-line) !important;
  }

  #dashboardView .sales-breakdown div span,
  #dashboardView .metric-breakdown-item span,
  #dashboardView .service-row-detail small,
  #dashboardView .monthly-goal-current span {
    color: var(--home-detail-label-color) !important;
    font-size: var(--home-detail-label-size) !important;
    font-weight: var(--home-detail-label-weight) !important;
    line-height: var(--home-detail-line) !important;
  }

  #dashboardView .sales-breakdown div strong,
  #dashboardView .metric-breakdown-item strong,
  #dashboardView .service-table-row > strong,
  #dashboardView .service-row-detail strong,
  #dashboardView .monthly-goal-current strong {
    color: var(--home-detail-value-color) !important;
    font-size: var(--home-detail-value-size) !important;
    font-weight: var(--home-detail-value-weight) !important;
    line-height: var(--home-detail-line) !important;
  }

  #dashboardView,
  #entriesView,
  #analysisView,
  #settingsView,
  #dealDetailView {
    margin-inline: auto;
    max-width: var(--app-content-max);
    width: 100%;
  }

  #dashboardView.calendar-only,
  #entriesView,
  #settingsView,
  #dealDetailView {
    max-width: min(100%, calc(var(--app-content-max) * 0.8)) !important;
  }

  .entry-form,
  .analysis-coming-soon,
  #settingsView .settings-grid {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
  }

  .view.active {
    gap: clamp(16px, 1.4vw, 22px);
    justify-self: center;
  }

  #entriesView.active,
  #settingsView.active {
    gap: clamp(8px, 0.8vw, 12px);
  }

  #entriesView > .home-back-icon-button,
  #settingsView > .home-back-icon-button {
    margin-bottom: 0;
  }

  #settingsView .settings-grid {
    justify-items: center;
  }

  #settingsView .panel,
  #settingsView .settings-link-card {
    margin-inline: auto;
  }

  #settingsView .data-actions,
  #settingsView .backup-section .toggle-row {
    justify-content: center;
  }

  #settingsView .backup-fallback-link {
    justify-self: center;
    text-align: center;
  }

  .panel-link.service-detail-link,
  .service-icon {
    display: none !important;
  }

  .brand-mark img {
    border-radius: 9px;
    display: block;
    height: 34px;
    width: 34px;
  }

  .timer-start-title {
    font-size: 13px;
    white-space: nowrap;
  }

  .service-sort-control {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    white-space: nowrap;
  }

  .dashboard-head-actions .share-menu-card {
    background: var(--home-card);
    border: 1px solid var(--home-line);
    border-radius: 14px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
    display: grid;
    gap: 4px;
    padding: 8px;
    position: absolute;
    right: 46px;
    top: calc(100% + 8px);
    width: min(252px, calc(100vw - 32px));
    z-index: 30;
  }

  .dashboard-head-actions .share-menu-card[hidden] {
    display: none;
  }

  .dashboard-head-actions .share-menu-card::before {
    background: var(--home-card);
    border-left: 1px solid var(--home-line);
    border-top: 1px solid var(--home-line);
    content: "";
    height: 12px;
    position: absolute;
    right: 14px;
    top: -7px;
    transform: rotate(45deg);
    width: 12px;
  }

  .dashboard-head-actions .share-menu-option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--home-text);
    display: grid;
    font-size: 14px;
    font-weight: 760;
    gap: 10px;
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 46px;
    padding: 8px 10px;
    position: relative;
    text-align: left;
  }

  .dashboard-head-actions .share-menu-option:hover {
    background: rgba(0, 138, 18, 0.08);
  }

  .dashboard-head-actions .share-menu-icon {
    align-items: center;
    background: var(--accent-soft);
    border-radius: 9px;
    color: var(--accent-dark);
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
  }

  .dashboard-head-actions .share-menu-icon svg {
    display: block;
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 17px;
  }

  .goal-input-overlay {
    align-items: center;
    background: rgba(15, 23, 42, 0.36);
    display: flex;
    inset: 0;
    justify-content: center;
    overscroll-behavior: contain;
    padding: 20px;
    position: fixed;
    z-index: 200;
  }

  .goal-input-card {
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    box-sizing: border-box;
    display: grid;
    gap: 10px;
    max-height: calc(100dvh - 48px);
    max-width: 340px;
    overscroll-behavior: contain;
    overflow-y: auto;
    padding: 18px;
    width: 100%;
  }

  .goal-input-card h2 {
    color: #050814;
    font-size: 16px;
    font-weight: 760;
    margin: 0;
  }

  .goal-input-group {
    display: grid;
    gap: 5px;
  }

  .goal-input-group span {
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 720;
  }

  .goal-input-field {
    background: #ffffff;
    border: 1.5px solid #d7dee8;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
    box-sizing: border-box;
    color: #050814;
    font-size: 18px;
    font-weight: 760;
    min-height: 40px;
    padding: 7px 10px;
    width: 100%;
  }

  .goal-input-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
  }

  .monthly-goal-toggle {
    align-items: center;
    color: var(--home-muted);
    display: inline-flex;
    flex: 0 0 auto;
    height: 18px;
    justify-content: center;
    width: 18px;
  }

  .monthly-goal-toggle svg {
    display: block;
    height: 14px;
    width: 14px;
  }

  .monthly-goal-edit svg {
    display: block;
    height: 16px;
    width: 16px;
  }

  .monthly-goal-track {
    background: #ebedf2;
    border-radius: 999px;
    height: 9px;
    overflow: hidden;
  }

  .monthly-goal-track span {
    background: linear-gradient(90deg, var(--ui-green), color-mix(in srgb, var(--ui-green) 78%, #000000));
    border-radius: inherit;
    display: block;
    height: 100%;
  }

  .monthly-goal-current {
    display: flex;
    justify-content: space-between;
  }

  .monthly-goal-current span,
  .monthly-goal-card p {
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 600;
    margin: 0;
  }

  .monthly-goal-current strong {
    color: var(--ui-green);
    font-size: 14px;
    font-weight: 820;
  }

  .monthly-goal-related {
    border-top: 1px solid var(--home-line);
    display: grid;
    gap: 0;
    padding-top: 0;
  }

  .monthly-goal-secondary {
    display: grid;
    gap: 8px;
  }

  .monthly-goal-secondary + .monthly-goal-secondary {
    border-top: 1px solid var(--home-line);
    padding-top: 0;
  }

  .monthly-goal-secondary-toggle {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--home-muted);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    justify-content: space-between;
    line-height: 1.2;
    min-height: 38px;
    padding: 0;
    text-align: left;
    width: 100%;
  }

  .monthly-goal-secondary-toggle span:first-child {
    color: var(--home-muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
  }

  .monthly-goal-secondary-toggle-right {
    align-items: center;
    color: var(--home-muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 4px;
    line-height: 1.2;
  }

  .monthly-goal-secondary-values {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .monthly-goal-secondary-values strong {
    color: #050814;
    font-size: clamp(18px, 1.6vw, 24px);
    font-weight: 850;
    line-height: 1.12;
  }

  .monthly-goal-secondary-values strong:last-child {
    color: var(--ui-green);
  }

  .monthly-goal-secondary-detail {
    display: grid;
    gap: 9px;
    padding-bottom: 8px;
  }

  .monthly-goal-daily-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 32px;
  }

  .monthly-goal-daily {
    align-items: center;
    background: linear-gradient(90deg, rgba(0, 138, 18, 0.08), rgba(0, 138, 18, 0.03));
    border: 1px solid rgba(0, 138, 18, 0.22);
    border-radius: 10px;
    display: grid;
    gap: 4px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 10px 12px;
  }

  .monthly-goal-daily span,
  .monthly-goal-daily strong {
    color: #050814;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
  }

  .monthly-goal-daily strong {
    font-weight: 820;
    justify-self: end;
  }

  .monthly-goal-daily strong.goal-achieved {
    color: var(--ui-green);
  }

  .monthly-goal-edit {
    align-items: center;
    color: var(--home-muted);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    justify-self: end;
    width: 32px;
  }

  .monthly-goal-head > div:first-child strong {
    color: #050814;
  }

  .monthly-goal-head-right strong {
    color: var(--ui-green);
  }

  .dashboard-metric {
    align-content: center;
    min-height: clamp(108px, 9vw, 132px);
    padding: clamp(20px, 1.8vw, 26px) clamp(22px, 2vw, 30px);
  }

  .dashboard-metric .metric-item small {
    color: var(--home-subtitle-color);
    font-size: var(--home-subtitle-size);
    font-weight: var(--home-subtitle-weight);
    line-height: var(--home-subtitle-line);
  }

  .sales-metric .metric-item small {
    color: var(--home-card-title-color);
    font-size: var(--home-card-title-size);
    font-weight: var(--home-card-title-weight);
    line-height: var(--home-card-title-line);
  }

  .dashboard-metric .metric-item strong {
    font-size: clamp(27px, 2.3vw, 34px);
  }

  .sales-metric .sales-total-row strong {
    font-size: clamp(36px, 3vw, 46px);
  }

  .sales-breakdown div span {
    color: var(--home-detail-label-color);
    font-size: var(--home-detail-label-size);
    font-weight: var(--home-detail-label-weight);
    line-height: var(--home-detail-line);
  }

  .sales-breakdown div strong {
    color: var(--home-detail-value-color);
    font-size: var(--home-detail-value-size);
    font-weight: var(--home-detail-value-weight);
    line-height: var(--home-detail-line);
  }

  .dashboard-metric:not(.sales-metric) .metric-breakdown {
    column-gap: 16px;
    display: flex;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    justify-content: flex-start;
    justify-self: start;
    margin-top: 6px;
    padding-right: 0;
    row-gap: 6px;
  }

  .metric-key-deliveries .metric-breakdown {
    padding-right: 0;
  }

  .metric-breakdown-item span {
    color: var(--home-detail-label-color);
    font-size: var(--home-detail-label-size);
    font-weight: var(--home-detail-label-weight);
    line-height: var(--home-detail-line);
  }

  .dashboard-metric:not(.sales-metric) .metric-breakdown-item strong {
    color: var(--home-detail-value-color);
    font-size: var(--home-detail-value-size);
    font-weight: var(--home-detail-value-weight);
    line-height: var(--home-detail-line);
  }

  .metric-collapsible,
  .sales-metric,
  .service-table-row,
  .ledger-calendar-cell {
    cursor: pointer;
  }

  .service-table-row {
    font-size: clamp(15px, 1.2vw, 17px);
    padding-block: clamp(10px, 1vw, 14px);
  }

  .service-table-row:hover {
    background: rgba(0, 138, 18, 0.04);
  }

  body[data-theme="dark"] .service-table-row:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .service-row-detail {
    column-gap: 22px;
    display: flex;
    flex-wrap: wrap;
    padding: 8px 2px 4px;
    row-gap: 6px;
  }

  .service-row-detail span {
    align-items: baseline;
    display: inline-flex;
    gap: 6px;
  }

  .service-row-detail small {
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 700;
  }

  .service-row-detail strong {
    font-size: 14px;
  }

  .delivery-timer:not(.is-idle) .delivery-timer-collapsed {
    padding: 10px 42px 12px 14px;
  }

  .delivery-timer:not(.is-idle) .timer-collapsed-status {
    display: grid;
    gap: 2px;
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    min-height: 0;
  }

  .delivery-timer:not(.is-idle) .timer-collapsed-time {
    font-size: 24px;
  }

  .delivery-timer.is-idle {
    display: none !important;
  }

  body[data-theme="dark"] .ledger-calendar-cell:hover {
    background: rgba(255, 255, 255, 0.07) !important;
  }

  .ledger-calendar-grid {
    grid-auto-rows: var(--calendar-cell-min-height) !important;
  }

  .ledger-calendar-cell {
    grid-template-rows: auto 1fr auto !important;
    min-height: var(--calendar-cell-min-height) !important;
    padding: var(--calendar-cell-padding-block) var(--calendar-cell-padding-inline) !important;
  }

  .ledger-calendar-cell:hover {
    background: rgba(0, 138, 18, 0.05) !important;
  }

  .ledger-calendar-cell .calendar-day-number {
    font-size: clamp(13.5px, 1.1vw, 16px) !important;
  }

  .ledger-calendar-cell strong {
    align-self: center;
    font-size: clamp(13.5px, 1.15vw, 16.5px) !important;
  }

  .ledger-calendar-cell small {
    font-size: clamp(11.5px, 1vw, 13.5px) !important;
  }

  .calendar-summary-card strong {
    font-size: clamp(22px, 1.9vw, 28px) !important;
  }

  .calendar-summary-card span {
    font-size: 13px !important;
  }

  .weekly-bar-date {
    color: var(--home-text);
    font-size: 13px;
    font-weight: 800;
  }

  .weekly-bar-weekday {
    color: var(--home-muted);
    font-size: 11.5px;
    font-weight: 700;
  }

  .period-chart-item.is-empty {
    opacity: 0.45;
    padding-block: 4px;
  }
}

/* Tablet: keep the mobile navigation pattern and avoid squeezed desktop grids. */
@media (min-width: 701px) and (max-width: 1199px) and (min-height: 600px) {
  :root {
    --app-content-max: min(960px, calc(100vw - 48px));
    --tablet-nav-height: 76px;
  }

  .app-shell {
    display: block;
    padding-bottom: calc(var(--tablet-nav-height) + env(safe-area-inset-bottom));
  }

  .sidebar {
    display: contents;
  }

  .sidebar > .brand,
  .quick-stats {
    display: none !important;
  }

  .main {
    max-width: none;
    padding: 22px clamp(20px, 3.6vw, 36px) calc(104px + env(safe-area-inset-bottom));
    width: 100%;
  }

  #dashboardView,
  #entriesView,
  #analysisView,
  #settingsView,
  #dealDetailView,
  #dashboardView.calendar-only {
    max-width: var(--app-content-max);
    width: 100%;
  }

  .nav-tabs {
    align-items: stretch;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--home-line);
    bottom: 0;
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    left: 0;
    min-height: var(--tablet-nav-height);
    padding: 6px max(14px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-right));
    position: fixed;
    right: 0;
    z-index: 90;
  }

  body[data-theme="dark"] .nav-tabs {
    background: rgba(17, 24, 39, 0.96);
  }

  .nav-tab {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 16px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    font-size: 11px;
    font-weight: 800;
    gap: 4px;
    justify-content: center;
    line-height: 1.1;
    min-height: 60px;
    min-width: 0;
    padding: 5px 4px;
    text-align: center;
  }

  .nav-tab.active,
  .nav-tab:hover {
    background: rgba(0, 138, 18, 0.09);
    border-radius: 16px;
    color: var(--ui-green);
  }

  .nav-tab span:not(.nav-add-circle) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
  }

  .nav-icon {
    display: block;
    height: 22px;
    width: 22px;
  }

  .nav-add-circle {
    align-items: center;
    background: var(--ui-green);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
  }

  .nav-tab-add {
    color: var(--ui-green);
  }

  .nav-tab-add .nav-icon {
    height: 24px;
    width: 24px;
  }

  .delivery-timer {
    bottom: calc(var(--tablet-nav-height) + 16px + env(safe-area-inset-bottom));
    left: 18px;
    margin: 0 auto;
    max-width: 420px;
    position: fixed;
    right: 18px;
    width: min(420px, calc(100vw - 36px));
    z-index: 91;
  }

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

  #dashboardView > .dashboard-metrics > .sales-metric {
    grid-column: 1 / -1;
  }

  .sales-metric {
    min-height: 0;
    padding: clamp(18px, 2.4vw, 24px);
  }

  .sales-metric .metric-pair {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 0;
  }

  .sales-metric .metric-item {
    align-content: start;
    min-height: 0;
    padding: 0;
  }

  .sales-metric .metric-pair > .metric-item:first-child {
    transform: none;
  }

  .sales-metric .sales-total-row {
    min-width: 0;
  }

  .sales-metric .sales-total-button {
    font-size: clamp(36px, 5.6vw, 52px);
    line-height: 0.98;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .sales-breakdown {
    display: grid;
    gap: 14px 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    min-width: 0;
    width: 100%;
  }

  .sales-breakdown div,
  .sales-breakdown div:nth-child(4),
  .sales-breakdown div:nth-child(5) {
    align-content: start;
    display: grid;
    gap: 6px;
    grid-column: auto;
    justify-items: start;
    min-height: 0;
    min-width: 0;
    padding: 0;
    text-align: left;
  }

  .sales-breakdown span {
    font-size: clamp(12px, 1.6vw, 14px);
    line-height: 1.1;
  }

  .sales-breakdown strong {
    font-size: clamp(17px, 2.3vw, 22px);
    line-height: 1.05;
  }

  .dashboard-metric:not(.sales-metric) {
    align-content: center;
    min-height: clamp(74px, 8vw, 92px);
    padding: clamp(7px, 0.9vw, 10px) clamp(11px, 1.3vw, 14px);
  }

  .metric-card-with-icon {
    align-content: center;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    row-gap: 4px;
  }

  .metric-card-with-icon .metric-pair {
    grid-column: 1;
    grid-row: 1;
  }

  .metric-card-with-icon .metric-breakdown {
    grid-column: 1;
    grid-row: 2;
  }

  .dashboard-metric:not(.sales-metric) .metric-breakdown {
    column-gap: 10px;
    margin-top: 0;
    row-gap: 3px;
  }

  .dashboard-metric:not(.sales-metric) .metric-item strong {
    font-size: 18px !important;
    line-height: 1.05;
  }

  .metric-icon {
    align-self: center;
    color: var(--ui-green) !important;
    font-size: 22px !important;
    grid-column: 2;
    grid-row: 1 / 3;
    height: 22px;
    justify-self: end;
    width: 22px;
  }

  .metric-icon svg {
    display: block;
    height: 100%;
    stroke: currentColor !important;
    width: 100%;
  }

  .metric-icon svg * {
    stroke: currentColor !important;
  }

  .service-overview-panel {
    --service-average-column: 86px;
    --service-bar-height: 8px;
    --service-count-column: 72px;
    --service-divider-color: var(--ui-line);
    --service-name-column: minmax(0, 1fr);
    --service-row-gap: 8px 18px;
    --service-sales-column: 112px;
    --service-sort-column: 24px;
    min-height: auto;
  }

  .service-overview-panel .service-overview,
  .service-overview .pie-wrap,
  .service-overview-panel .service-table {
    width: 100%;
  }

  .service-overview-panel .service-panel-header {
    align-items: center !important;
    border-bottom: 1px solid var(--service-divider-color) !important;
    column-gap: 18px !important;
    display: grid !important;
    grid-template-columns: var(--service-name-column) var(--service-sales-column) var(--service-count-column) var(--service-average-column) var(--service-sort-column) !important;
    justify-content: stretch !important;
    margin: 0 !important;
    padding: 0 0 12px !important;
  }

  .service-overview-panel .service-header-labels {
    align-items: center !important;
    column-gap: 18px !important;
    display: grid !important;
    grid-column: 2 / 6 !important;
    grid-template-columns: var(--service-sales-column) var(--service-count-column) var(--service-average-column) var(--service-sort-column) !important;
    margin-left: 0 !important;
  }

  .service-overview-panel .service-header-labels span {
    align-items: center !important;
    align-self: center !important;
    display: flex !important;
    height: 100% !important;
    justify-content: flex-end !important;
    justify-self: end !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  .service-overview-panel .service-header-labels .service-sort-control .panel-toggle {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--home-muted) !important;
    display: inline-flex !important;
    height: 24px !important;
    justify-content: center !important;
    min-height: 24px !important;
    overflow: visible !important;
    padding: 0 !important;
    width: 24px !important;
  }

  .service-overview-panel .service-header-labels .service-sort-control .panel-toggle span {
    display: none !important;
  }

  .service-overview-panel .service-header-labels .service-sort-control .panel-toggle svg {
    display: block !important;
    height: 18px !important;
    stroke: currentColor !important;
    width: 18px !important;
  }

  .service-row-group,
  .service-table-row {
    width: 100% !important;
  }

  .service-row-group {
    border-bottom: 1px solid var(--service-divider-color) !important;
  }

  .service-row-group:last-of-type {
    border-bottom: 0 !important;
  }

  .service-table-row {
    align-items: center;
    border-bottom: 0 !important;
    column-gap: 18px !important;
    display: grid !important;
    grid-template-columns: var(--service-name-column) var(--service-sales-column) var(--service-count-column) var(--service-average-column) var(--service-sort-column) !important;
    padding-block: 12px 10px !important;
  }

  .service-table-row > strong {
    justify-self: end !important;
    text-align: right !important;
  }

  .service-name-cell {
    align-items: baseline;
    gap: 8px;
  }

  .service-table-row .service-bar-cell {
    grid-column: 1 / -1;
    max-width: 100%;
    width: 100%;
  }

  .service-bar-track,
  body[data-theme="dark"] .service-bar-track {
    height: var(--service-bar-height) !important;
  }
}

/* Wide desktop: reference-style dashboard layout. */
@media (min-width: 1200px) and (min-height: 600px) {
  :root {
    --desktop-home-goal-card-height: 92px;
    --desktop-home-metric-height: 104px;
  }

  .app-shell {
    grid-template-columns: 188px minmax(0, 1fr);
  }

  .sidebar {
    gap: 22px;
    padding: 18px 10px 28px 0;
  }

  .brand {
    padding-left: 12px;
  }

  .main {
    max-width: none;
    padding: 20px clamp(24px, 3vw, 42px) 28px;
  }

  .nav-tab {
    font-size: 15.2px;
    gap: 11px;
    min-height: 48px;
    padding: 0 14px;
  }

  .nav-icon {
    height: 23px;
    width: 23px;
  }

  .nav-add-circle {
    height: 36px;
    width: 36px;
  }

  .nav-tab-add {
    gap: 14px;
  }

  .nav-tab-add .nav-icon {
    height: 22px;
    width: 22px;
  }

  #dashboardView {
    align-items: start;
    column-gap: 16px;
    grid-auto-flow: row;
    grid-template-areas:
      "head head head head head head"
      "sales sales sales sales sales sales"
      "deliveries hours average hourly distance expenses"
      "goal goal goal memo memo memo"
      "service service service chart chart chart";
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: auto auto auto auto auto;
    height: auto;
    margin-inline: auto;
    max-width: var(--app-content-max);
    overflow: visible;
    row-gap: 16px;
    width: 100%;
  }

  #dashboardView > .back-button,
  #dashboardView > .dashboard-head {
    grid-area: head;
  }

  #dashboardView > .back-button {
    grid-column: 1 / -1;
  }

  #dashboardView > .dashboard-metrics {
    display: contents;
  }

  #dashboardView > .dashboard-metrics > .sales-metric {
    grid-area: sales;
  }

  #dashboardView > .dashboard-metrics > .metric-key-deliveries { grid-area: deliveries; }
  #dashboardView > .dashboard-metrics > .metric-key-hours { grid-area: hours; }
  #dashboardView > .dashboard-metrics > .metric-key-average { grid-area: average; }
  #dashboardView > .dashboard-metrics > .metric-key-hourly { grid-area: hourly; }
  #dashboardView > .dashboard-metrics > .metric-key-distance { grid-area: distance; }
  #dashboardView > .dashboard-metrics > .metric-key-expenses { grid-area: expenses; }

  #dashboardView > .service-overview-panel {
    align-self: stretch;
    grid-area: service;
    height: 100%;
  }

  #dashboardView > .weekly-sales-panel,
  #dashboardView > .period-sales-panel {
    align-self: stretch;
    grid-area: chart;
    height: 100%;
  }

  #dashboardView > .monthly-goal-panel {
    align-self: stretch;
    grid-area: goal;
  }

  #dashboardView > .dashboard-memo-panel {
    align-self: stretch;
    grid-area: memo;
    margin: 0;
  }

  #dashboardView > .monthly-goal-panel,
  #dashboardView > .dashboard-memo-panel {
    box-sizing: border-box;
    height: var(--desktop-home-goal-card-height);
    min-height: var(--desktop-home-goal-card-height);
  }

  #dashboardView > .monthly-goal-panel {
    cursor: pointer;
    display: grid;
  }

  #dashboardView > .monthly-goal-panel .monthly-goal-card {
    align-content: center;
    height: 100%;
    min-height: 0;
  }

  #dashboardView > .monthly-goal-panel:has(.monthly-goal-current) {
    height: auto;
    min-height: var(--desktop-home-goal-card-height);
  }

  #dashboardView > .monthly-goal-panel:has(.monthly-goal-current) .monthly-goal-card {
    align-content: start;
    gap: 11px;
    height: auto;
    min-height: 0;
  }

  #dashboardView > .monthly-goal-panel:has(.monthly-goal-current) .monthly-goal-head {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #dashboardView > .monthly-goal-panel:has(.monthly-goal-current) .monthly-goal-head > div {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  #dashboardView > .monthly-goal-panel:has(.monthly-goal-current) .monthly-goal-head-right {
    justify-items: end;
  }

  #dashboardView > .monthly-goal-panel:has(.monthly-goal-current) .monthly-goal-head span {
    color: var(--home-card-title-color);
    font-size: var(--home-card-title-size);
    font-weight: var(--home-card-title-weight);
    line-height: var(--home-card-title-line);
  }

  #dashboardView > .monthly-goal-panel:has(.monthly-goal-current) .monthly-goal-head strong {
    font-size: clamp(18px, 1.6vw, 24px);
    font-weight: 850;
    line-height: 1.12;
  }

  #dashboardView > .monthly-goal-panel:has(.monthly-goal-current) .monthly-goal-head > div:first-child strong {
    color: #050814;
  }

  #dashboardView > .monthly-goal-panel:has(.monthly-goal-current) .monthly-goal-head-right strong {
    color: var(--ui-green);
  }

  #dashboardView > .dashboard-memo-panel {
    align-content: center;
  }

  #dashboardView:has(> .monthly-goal-panel .monthly-goal-current) > .dashboard-memo-panel {
    align-content: start;
    height: auto;
    min-height: var(--desktop-home-goal-card-height);
  }

  #dashboardView > .calendar-panel {
    grid-column: 1 / -1;
    grid-row: 3 / span 4;
  }

  #dashboardView.calendar-only {
    height: auto;
    overflow: visible;
  }

  #dashboardView > .panel,
  #dashboardView > .service-overview-panel,
  #dashboardView > .weekly-sales-panel,
  #dashboardView > .period-sales-panel,
  #dashboardView > .dashboard-memo-panel,
  #dashboardView > .monthly-goal-panel,
  .dashboard-metric {
    border: 1px solid #edf1f6;
  }

  #dashboardView > .panel,
  #dashboardView > .service-overview-panel,
  #dashboardView > .weekly-sales-panel,
  #dashboardView > .period-sales-panel,
  #dashboardView > .dashboard-memo-panel,
  #dashboardView > .monthly-goal-panel {
    padding: 18px 20px;
  }

  .dashboard-brand-line,
  .row-chevron,
  .metric-expand-indicator,
  .sales-expand-icon,
  .dashboard-memo-toggle-button,
  .panel-link.service-detail-link {
    display: none !important;
  }

  .dashboard-metric {
    align-content: start;
    align-self: stretch;
    box-sizing: border-box;
    height: auto;
    min-height: var(--desktop-home-metric-height);
    overflow: visible;
    padding: 8px 16px;
  }

  .sales-metric {
    align-content: center;
    min-height: var(--desktop-home-metric-height);
    padding: 8px clamp(24px, 2.1vw, 36px);
  }

  .sales-metric .metric-pair {
    align-items: center;
    column-gap: clamp(26px, 3.2vw, 52px);
    grid-template-columns: minmax(320px, 0.62fr) minmax(0, 1.9fr);
    min-height: 0;
  }

  .sales-metric .metric-item {
    gap: 6px;
    min-height: 0;
    padding: 0;
  }

  .sales-metric .metric-pair > .metric-item:first-child {
    transform: translateY(-4px);
  }

  .sales-metric .metric-item small {
    color: var(--home-card-title-color);
    font-size: var(--home-card-title-size);
    font-weight: var(--home-card-title-weight);
    line-height: var(--home-card-title-line);
  }

  .sales-metric .sales-total-row strong,
  .sales-metric .sales-total-button {
    font-size: clamp(29px, 2.75vw, 40px);
    line-height: 0.95;
  }

  .sales-metric .sales-breakdown {
    column-gap: clamp(24px, 3.4vw, 48px);
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    row-gap: 8px;
  }

  .sales-metric .sales-breakdown div {
    align-content: center;
    display: grid;
    gap: 4px;
    justify-items: start;
    min-width: clamp(68px, 6.2vw, 96px);
    text-align: left;
  }

  .sales-breakdown div span {
    color: var(--home-detail-label-color);
    font-size: var(--home-detail-label-size);
    font-weight: var(--home-detail-label-weight);
    line-height: var(--home-detail-line);
  }

  .sales-breakdown div strong {
    color: var(--home-detail-value-color);
    font-size: var(--home-detail-value-size);
    font-weight: var(--home-detail-value-weight);
    line-height: var(--home-detail-line);
  }

  .dashboard-metric:not(.sales-metric) .metric-pair {
    display: contents;
  }

  .dashboard-metric:not(.sales-metric) .metric-item {
    gap: 6px;
  }

  .dashboard-metric:not(.sales-metric) .metric-item small {
    color: var(--home-subtitle-color);
    font-size: var(--home-subtitle-size);
    font-weight: var(--home-subtitle-weight);
    line-height: var(--home-subtitle-line);
  }

  .dashboard-metric:not(.sales-metric) .metric-item strong {
    font-size: clamp(16px, 1.22vw, 19px);
  }

  .dashboard-metric:not(.sales-metric) .metric-breakdown {
    column-gap: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 10px;
    row-gap: 6px;
  }

  .metric-card-with-icon {
    align-items: start;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr;
    padding-right: 16px;
  }

  .metric-card-with-icon .metric-pair {
    grid-column: 1;
    grid-row: 1;
  }

  .metric-card-with-icon .metric-breakdown {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .metric-icon {
    align-items: center;
    align-self: end;
    color: var(--ui-green);
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    height: clamp(22px, 1.68vw, 26px);
    justify-content: center;
    justify-self: end;
    opacity: 1;
    position: static;
    transform: none;
    width: clamp(22px, 1.68vw, 26px);
  }

  .metric-icon svg {
    display: block;
    height: 100%;
    stroke: currentColor;
    width: 100%;
  }

  #dashboardView > .dashboard-metrics > .metric-card-with-icon .metric-icon {
    color: var(--ui-green) !important;
  }

  #dashboardView > .dashboard-metrics > .metric-card-with-icon .metric-icon svg,
  #dashboardView > .dashboard-metrics > .metric-card-with-icon .metric-icon svg * {
    stroke: currentColor !important;
  }

  .metric-breakdown-item {
    gap: 6px;
  }

  .metric-breakdown-item span {
    color: var(--home-detail-label-color);
    font-size: var(--home-detail-label-size);
    font-weight: var(--home-detail-label-weight);
    line-height: var(--home-detail-line);
  }

  .dashboard-metric:not(.sales-metric) .metric-breakdown-item strong {
    color: var(--home-detail-value-color);
    font-size: var(--home-detail-value-size);
    font-weight: var(--home-detail-value-weight);
    line-height: var(--home-detail-line);
  }

  .service-overview-panel {
    --service-average-column: 86px;
    --service-bar-height: 6px;
    --service-count-column: 72px;
    --service-divider-color: var(--ui-line);
    --service-detail-gap: 14px;
    --service-detail-label-size: var(--home-detail-label-size);
    --service-detail-min-column: 118px;
    --service-detail-value-size: var(--home-detail-value-size);
    --service-header-size: var(--home-subtitle-size);
    --service-name-column: minmax(0, 1fr);
    --service-name-size: 14px;
    --service-percent-size: 12px;
    --service-row-gap: 8px 18px;
    --service-row-value-size: var(--home-detail-value-size);
    --service-sales-column: 112px;
    --service-sort-column: 24px;
    display: flex;
    flex-direction: column;
    min-height: 330px;
  }

  .service-overview-panel .service-panel-header {
    align-items: center !important;
    column-gap: 18px !important;
    display: grid !important;
    grid-template-columns: var(--service-name-column) var(--service-sales-column) var(--service-count-column) var(--service-average-column) var(--service-sort-column) !important;
    border-bottom: 1px solid var(--service-divider-color) !important;
    margin: 0 !important;
    padding: 0 0 12px !important;
  }

  .service-overview-panel h2,
  .service-header-labels,
  .service-header-labels span {
    color: var(--home-muted) !important;
    font-size: var(--service-header-size) !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
  }

  .service-overview-panel h2 {
    grid-column: 1 !important;
  }

  .service-overview-panel .service-header-labels {
    align-items: center !important;
    column-gap: 18px !important;
    display: grid !important;
    grid-column: 2 / 6 !important;
    grid-template-columns: var(--service-sales-column) var(--service-count-column) var(--service-average-column) var(--service-sort-column) !important;
    margin-left: 0 !important;
  }

  .service-overview-panel .service-header-labels span {
    align-items: center !important;
    align-self: center !important;
    display: flex !important;
    height: 100% !important;
    justify-content: flex-end !important;
    justify-self: end !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  .service-overview-panel .service-sort-slot {
    justify-self: end !important;
  }

  .service-overview-panel .service-sort-control .panel-toggle {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--home-muted) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 24px !important;
    min-height: 24px !important;
    overflow: visible !important;
    padding: 0 !important;
    width: 24px !important;
  }

  .service-overview-panel .service-sort-control .panel-toggle span {
    display: none !important;
  }

  .service-overview-panel .service-sort-control .panel-toggle svg {
    display: block !important;
    height: 18px !important;
    stroke: currentColor !important;
    width: 18px !important;
  }

  .service-overview-panel .service-overview,
  .service-overview .pie-wrap {
    display: flex !important;
    flex: 1;
    flex-direction: column;
    min-height: 0;
  }

  .service-overview-panel .service-table {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
  }

  .service-row-group {
    border-bottom: 1px solid var(--service-divider-color) !important;
    display: grid !important;
    gap: 0 !important;
  }

  .service-row-group:last-of-type {
    border-bottom: 0 !important;
  }

  .service-table-row {
    gap: var(--service-row-gap) !important;
    grid-template-columns: var(--service-name-column) var(--service-sales-column) var(--service-count-column) var(--service-average-column) var(--service-sort-column) !important;
    border-bottom: 0 !important;
    padding-block: 14px 12px !important;
  }

  .service-name-cell {
    align-items: baseline;
    gap: 8px;
  }

  .service-name-cell > span:nth-child(2) {
    font-size: var(--service-name-size);
  }

  .service-name-cell .service-percent {
    font-size: var(--service-percent-size);
  }

  .service-table-row > strong {
    font-size: var(--service-row-value-size) !important;
    justify-self: end !important;
    text-align: right !important;
  }

  .service-table-row .service-bar-cell {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .service-bar-track,
  body[data-theme="dark"] .service-bar-track {
    height: var(--service-bar-height) !important;
  }

  .service-table-row .service-bar-fill[style*="width: 0"] {
    opacity: 0.4;
  }

  .service-row-detail {
    column-gap: var(--service-detail-gap) !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(var(--service-detail-min-column), 1fr)) !important;
    padding: 0 0 14px !important;
    row-gap: 8px !important;
  }

  .service-row-detail span {
    align-items: baseline !important;
    display: inline-grid !important;
    gap: 6px !important;
    grid-template-columns: auto auto !important;
    justify-content: start !important;
    line-height: 1.15 !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }

  .service-row-detail small {
    color: var(--home-muted) !important;
    font-size: var(--service-detail-label-size) !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
  }

  .service-row-detail strong {
    color: var(--home-text) !important;
    font-size: var(--service-detail-value-size) !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
  }

  .weekly-sales-panel,
  .period-sales-panel {
    display: flex;
    flex-direction: column;
  }

  .weekly-sales-panel[hidden],
  .period-sales-panel[hidden] {
    display: none !important;
  }

  .weekly-sales-panel > div,
  .period-sales-panel > div {
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  .weekly-chart-bars {
    flex: 1;
    min-height: 230px;
  }

  .dashboard-metric .metric-item strong,
  .sales-breakdown div strong,
  .metric-breakdown-item strong,
  .service-table-row,
  .calendar-summary-card strong {
    font-variant-numeric: tabular-nums;
  }
}
