

button, input, select, textarea {

  font: inherit;
}

button {

  cursor: pointer;
}

.confirm-overlay {

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

.confirm-overlay[hidden] {

  display: none;
}

.calendar-day-overlay {

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

.calendar-day-overlay[hidden] {

  display: none;
}

.confirm-card {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 16px;
  max-width: 360px;
  padding: 18px;
  width: min(100%, 360px);
}

.calendar-day-card {

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 14px;
  max-width: 360px;
  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 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;
}

.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;
}

.confirm-actions {

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

.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: 16px;
}

.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;
  margin-bottom: 12px;
  padding: 12px;
}

.backup-warning p {
  margin: 0;
}

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

.welcome-modal {
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 24px 16px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
}

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

.welcome-content {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  padding: 32px 24px;
  width: 100%;
}

.welcome-logo {
  font-size: 48px;
  margin-bottom: 12px;
  text-align: center;
}

.welcome-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 20px;
  text-align: center;
}

.welcome-items {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

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

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

.welcome-item-text {
  display: grid;
  font-size: 14px;
  gap: 4px;
}

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

.welcome-item-text span {
  color: var(--muted);
  line-height: 1.6;
}

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

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

.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-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;
}

.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;
}

.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%;
}

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: 16px;
}

.dashboard-grid {

  grid-template-columns: 1fr;
}

.entry-layout {

  display: grid;
  gap: 16px;
  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;
}

.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: 10px;
}

.form-grid {

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

.form-grid label {

  min-width: 0;
}

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

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

.form-grid input[type="date"] {

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

.form-grid input[type="date"]::-webkit-date-and-time-value {

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

.form-grid input[type="date"]::-webkit-calendar-picker-indicator {

  margin: 0;
  padding: 0;
}

.required-field {

  position: relative;
}

.required-field::after {

  color: #e53e3e;
  content: "*";
  font-size: 12px;
  font-weight: 800;
  position: absolute;
  right: 0;
  top: 0;
}

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;
  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;
}

.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;
}

.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;
}

.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: #e5e7eb;
  --ink: #d1d5db;
  --line: #2d3a4f;
  --muted: #a7b3c5;
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  --surface: #2c2c2e;
  --surface-soft: #1c1c1e;
  --ui-line: #2d3a4f;
  --ui-green: #2db84b;
  --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: #1a9e8f;
  background: #1a9e8f;
  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);
}

.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: #008a12;
  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-top: 1px solid var(--home-line);
  bottom: calc(86px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  left: 0;
  position: fixed;
  right: 0;
  z-index: 49;
}

.delivery-timer-collapsed {

  align-items: center;
  display: flex;
  gap: 8px;
  padding: 8px 56px 8px 16px;
}

.timer-status-dot {

  background: #34c759;
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.timer-status-dot.break {

  background: #ff9500;
}

.timer-collapsed-text {

  flex: 1;
  font-size: 15px;
  font-weight: 700;
}

.timer-toggle-btn {

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

.timer-fixed-toggle {

  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.delivery-timer-expanded {

  padding: 8px 56px 8px 16px;
}

.timer-info {

  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}

.timer-info-row {

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

.timer-label {

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

.timer-main-time {

  color: var(--accent);
  font-size: 20px;
  font-weight: 800;
}

.timer-main-time.break {

  color: #ff9500;
}

.timer-sub-label {

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

.timer-sub-time {

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

.timer-actions {

  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

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

  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  min-height: 38px;
}

.timer-start-btn,
.timer-resume-btn {

  background: var(--accent);
}

.timer-break-btn {

  background: #ff9500;
}

.timer-end-btn {

  background: #ff3b30;
}

.timer-clear-btn {

  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  min-height: 38px;
  padding: 0 12px;
}

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

  color: #cbd5e1;
}

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

  background: #ecfdf5;
  color: #008a12;
}

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

  background: rgba(45, 184, 75, 0.1);
  color: #2db84b;
}

.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;
}

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

  background: var(--surface);
  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: #008a12;
}

.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 {
  stroke: var(--home-text) !important;
}

body[data-theme="dark"] .sales-metric .metric-pair::after {
  color: var(--home-text) !important;
}

body[data-theme="dark"] .sales-metric .sales-total-button,
body[data-theme="dark"] .sales-breakdown strong {
  color: #2db84b !important;
}

body[data-theme="dark"] .monthly-goal-head 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: #2db84b !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"] .primary-button,
body[data-theme="dark"] .analysis-form-button {
  color: #e5e7eb !important;
}

.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;
}

.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: #0d9488;
  --accent-dark: #0b5f59;
  --accent-soft: #d8f6f1;
  --uber: #5ac8fa;
  --demae: #ff3b30;
  --rocket: #007aff;
  --menu: #ff9500;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.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: #008a12;
}

.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: #008a12;
}

.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 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-bar-list {

  display: grid;
}

.period-bar-label {

  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.period-bar-track {

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

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

  background: #3a3a3c;
}

.period-bar-fill {

  background: linear-gradient(90deg, #008a12, #34d399);
  display: block;
  height: 100%;
}

.period-bar-row strong {

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

.period-bar-row small {

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

.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;
  }

  .period-bar-row {

    gap: 7px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    min-height: 58px;
  }

  .period-bar-row small {

    display: none;
  }

  .period-bar-track {

    grid-column: 1 / -1;
  }

  .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, 14px);
  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;
}

.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%;
}

.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;
}

.period-bar-row {

  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(54px, 0.35fr) minmax(160px, 1.4fr) minmax(90px, 0.55fr) minmax(44px, 0.3fr);
  min-height: 52px;
  padding: 8px 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));
  }

  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;
  }

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

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

  table {

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

  th, td {

    padding: 8px 6px;
  }

  .confirm-card {

    border-radius: 14px;
    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: #008a12;
    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: #008a12;
    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, 14px);
  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, 12px);
  }

  .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;
  }

  .service-bar-fill {

    min-width: 8px !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 {

    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m7 10 5 5 5-5' stroke='%235B6472' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 16px 16px !important;
    content: "" !important;
    inset: 0 !important;
    position: absolute !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 {

    text-indent: 0 !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;
  font-size: 0 !important;
  position: relative !important;
  color: transparent !important;
  display: block !important;
  overflow: hidden !important;
  text-indent: -999px !important;
  align-self: center !important;
  grid-column: 5 !important;
  justify-self: end !important;
  min-width: 14px !important;
  width: 14px !important;
  grid-row: 1 / 3 !important;
  height: 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 {

  overflow: hidden;
  padding: 14px 16px 12px;
}

.weekly-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 {

  display: grid;
  gap: 3px;
}

.weekly-chart-head span, .weekly-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;
}

.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: 116px;
  padding: 8px 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: 8px;
  z-index: 0;
}

.weekly-chart-max-line span {

  background: var(--home-card);
  padding-right: 5px;
}

.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: #008a12;
  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: #008a12;
}

.weekly-bar-day.active .weekly-bar-value {

  background: #008a12;
}

.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 {
  color: var(--home-muted) !important;
  display: inline-flex !important;
  font-size: 12px !important;
  font-weight: 820 !important;
  line-height: 1.8 !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, #008c16, #009f1b) !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-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-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.32);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 200;
  }

  .goal-input-card {
    background: var(--home-card);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    display: grid;
    gap: 14px;
    max-width: 340px;
    padding: 18px;
    width: 100%;
  }

  .goal-input-card h2 {
    color: #050814;
    font-size: 16px;
    font-weight: 760;
    margin: 0;
  }

  .goal-input-field {
    border: 1px solid var(--border);
    border-radius: 12px;
    box-sizing: border-box;
    color: #050814;
    font-size: 20px;
    font-weight: 760;
    min-height: 48px;
    padding: 10px 12px;
    width: 100%;
  }

  .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: 90px 52px 60px 20px !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: var(--service-grid, minmax(0, 1fr) 90px 52px 60px 20px) !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: 5px !important;
  align-items: center !important;
  display: flex !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
}

  .service-name-cell > span:not(.service-percent):not(.service-icon) {

    color: #050814 !important;
    font-size: 13px !important;
    font-weight: 810 !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;
  justify-self: start !important;
  margin-left: 6px !important;
  white-space: nowrap !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 {
  color: #626b7c !important;
  font-size: 20px !important;
  grid-column: 5 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  line-height: 1 !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: 21px !important;
    width: 21px !important;
  }

  .nav-tab > span:not(.nav-add-circle) {
    display: block !important;
    line-height: 1 !important;
  }

  .nav-tab-add {
    color: var(--ui-green) !important;
    gap: 3px !important;
    transform: none !important;
  }

  .nav-add-circle {
    align-items: center !important;
    background: linear-gradient(145deg, #009d16, #007c0f) !important;
    border-radius: 999px !important;
    box-shadow: 0 8px 18px rgba(0, 138, 18, 0.22) !important;
    color: #fff !important;
    display: flex !important;
    height: 44px !important;
    justify-content: center !important;
    width: 44px !important;
  }

  .nav-tab-add .nav-icon {
    height: 24px !important;
    width: 24px !important;
  }
}

@media (max-width: 410px) {
  :root {

    --mobile-page-pad: 15px;
  }

  .service-table-row {

    grid-template-columns: var(--service-grid, minmax(0, 1fr) 90px 52px 60px 20px) !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) {
  :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: 12px;
  --home-card-gap: 12px;
  --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: 24px var(--home-page-pad) calc(86px + env(safe-area-inset-bottom)) !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: center !important;
    display: grid !important;
    column-gap: 8px !important;
    grid-template-columns: minmax(0, 1fr) 38px !important;
    min-height: 38px !important;
  }

  .dashboard-title-row h1 {

    align-items: baseline !important;
    display: flex !important;
    gap: 5px !important;
    margin: 0 !important;
  }

  .dashboard-date-picker-button {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--home-muted) !important;
    display: inline-flex !important;
    height: 24px !important;
    justify-content: center !important;
    margin-left: 1px !important;
    min-height: 24px !important;
    padding: 0 !important;
    width: 24px !important;
  }

  .dashboard-date-picker-button svg {
    height: 15px !important;
    width: 15px !important;
  }

  .dashboard-title-row h1 span {

    color: var(--home-text) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
  }

  .dashboard-title-row h1 small {

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

  .notify-button {

    align-self: center !important;
    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.08) !important;
    display: flex !important;
    height: 38px !important;
    justify-content: center !important;
    justify-self: end !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 {

    content: none !important;
  }

  .notify-icon {

    display: block !important;
    fill: none !important;
    flex: 0 0 auto !important;
    height: 17px !important;
    margin: auto !important;
    stroke: #050814 !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;
  }

  .dashboard-control-row {

    align-items: center !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    justify-content: stretch !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;
    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;
  }

  .dashboard-weather-chips {

    display: grid !important;
    gap: 8px !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: 12px !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;
  }

  .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 .dashboard-control-row,
  #dashboardView.calendar-only .monthly-goal-panel,
  #dashboardView.calendar-only .service-overview-panel,
  #dashboardView.calendar-only .weekly-sales-panel {
    display: none !important;
  }

  .dashboard-weather-chips span:first-child {

    height: 38px !important;
    min-width: 0 !important;
    padding: 0 12px !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: 16px !important;
    line-height: 0 !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 {

    background: var(--home-card) !important;
    border: 0 !important;
    border-radius: var(--home-radius) !important;
    box-shadow: var(--home-shadow) !important;
  }

  .dashboard-metric:not(.sales-metric) small {

    color: var(--home-muted) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    margin-bottom: 4px !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;
  }

  .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;
  }

  .calendar-summary-card > div {
    align-items: center !important;
    display: flex !important;
    gap: 6px !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .calendar-summary-card > div + div {
    border-left: 0 !important;
  }

  .calendar-summary-card span {
    color: var(--home-muted) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
  }

  .calendar-summary-card strong {
    color: var(--ui-green) !important;
    font-size: 18px !important;
    font-weight: 830 !important;
    line-height: 1.05 !important;
  }

  .calendar-summary-card small {
    color: var(--home-muted) !important;
    font-size: 10px !important;
    font-weight: 560 !important;
  }

  .ledger-calendar-head {

    align-items: center !important;
    display: grid !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;
  }

  .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 span:first-child {

    color: var(--danger) !important;
  }

  .ledger-calendar-weekdays span:last-child {

    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 .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 .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;
  }

  #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(86px + 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 0 12px;
}

.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-service-select {

  display: none;
}

.entry-service-icons {

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

.entry-service-icon {

  align-items: center;
  background: var(--surface);
  border: 1px solid #d7dee8;
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  min-width: 0;
  padding: 0 8px;
  white-space: nowrap;
}

.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);
}

.toast {

  background: rgba(5, 8, 20, 0.88);
  border-radius: 999px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  left: 50%;
  padding: 10px 16px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 80;
}

/* 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;
  }

  .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: #008a12 !important;
    display: block !important;
    font-size: clamp(26px, 7.2vw, 39px) !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-total-button::after {

    content: none !important;
  }

  .sales-metric .metric-pair::after {

    align-self: start !important;
    color: #050814 !important;
    content: "⌄" !important;
    font-size: 28px !important;
    font-weight: 780 !important;
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    justify-self: end !important;
    line-height: 1 !important;
    margin-top: 30px !important;
  }

  .sales-metric.show-breakdown .metric-pair::after {

    content: "⌃" !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: #008a12 !important;
    font-size: clamp(13px, 3.6vw, 19px) !important;
    font-weight: 600 !important;
  }

  .dashboard-metric:not(.sales-metric) {

    min-height: 27px !important;
    padding: 5px 11px !important;
  }

  .dashboard-metric:not(.sales-metric) .metric-pair {

    display: block !important;
  }

  .dashboard-metric:not(.sales-metric) strong {

    color: var(--ink) !important;
    font-size: 18px !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: 56px !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: 44px !important;
    justify-content: center !important;
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
  }

  .metric-icon svg {

    display: block !important;
    height: 22px !important;
    width: 22px !important;
  }

  .metric-card-with-icon.show-breakdown .metric-icon {

    top: 12px !important;
    transform: none !important;
  }

  .metric-expand-indicator {

    color: var(--home-muted) !important;
    font-size: 12px !important;
    font-weight: 780 !important;
    line-height: 1 !important;
    position: absolute !important;
    right: 8px !important;
    text-align: center !important;
    top: 50% !important;
    transform: translateY(4px) !important;
    width: 36px !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-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 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;
  }
}
