/* Compact Jobs summary. Three equal counters, no card list. */
.dtf-dash {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
  max-width: 100%;
}

.dtf-dash-count {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
}

.dtf-dash-count strong {
  font-size: 18px;
  line-height: 1.1;
}

.dtf-dash-count span {
  font-size: 12px;
  line-height: 1.2;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.dtf-dash-count.is-on {
  background: var(--accent-soft);
  border-color: var(--border-strong);
}

/* Today card. Sits above the tool cards. 56pt targets. */
.today-card {
  background: #ffffff;
  color: #24303a;
  border: 1px solid #c5d0da;
  border-radius: 14px;
  padding: 4px 16px 16px;
}

.today-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56pt;
}

.today-head h3 {
  margin: 0;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-transform: none;
  color: #24303a;
}

.today-see {
  min-height: 56pt;
  min-width: 56pt;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #0f766e;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.today-rows {
  display: flex;
  flex-direction: column;
}

.today-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 56pt;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid #c5d0da;
  background: #ffffff;
  color: #24303a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.today-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.today-chip.is-overdue {
  background: #f8d6d6;
  color: #7a2430;
}

.today-chip.is-today {
  background: #d9f3ee;
  color: #0c4f4a;
}

.today-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: #24303a;
}

.today-meta {
  font-size: 14px;
  line-height: 1.35;
  color: #5b6b79;
}

.today-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 8px 8px 4px;
}

.today-empty-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #24303a;
}

.today-empty-hint {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #5b6b79;
}

.today-pill {
  width: 100%;
  min-height: 56pt;
  border: 0;
  border-radius: 999px;
  background: #24303a;
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

#app-home.is-today-all .app-home-cards,
#app-home.is-today-all .app-home-recent {
  display: none;
}

body.dtf-classic-home .app-home {
  padding-bottom: calc(64pt + env(safe-area-inset-bottom, 34pt) + 16pt);
}

body.dtf-classic-home .dev-workspace-nav,
body.dtf-classic-home #beta-nav {
  display: none !important;
}

/* Today-strip item. One screen, one header. Classic chrome stays hidden. */
body.dtf-redesign.dtf-home-item > .app-header,
body.dtf-redesign.dtf-home-item > #app-top-chrome,
body.dtf-redesign.dtf-home-item > main.container,
body.dtf-redesign.dtf-home-item > .app-footer,
body.dtf-redesign.dtf-home-item #app-tab-bar,
body.dtf-redesign.dtf-home-item .dev-workspace-nav,
body.dtf-redesign.dtf-home-item #beta-nav,
body.dtf-redesign.dtf-home-item .dtf-punch-openbar,
body.dtf-redesign.dtf-home-item .dtf-segments,
body.dtf-redesign.dtf-home-item .dtf-schedules,
body.dtf-redesign.dtf-home-item .dtf-desk-nav {
  display: none !important;
}

body.dtf-redesign.dtf-home-item #dtf-app {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  height: 100%;
  min-height: 100vh;
  overflow: auto;
  background: var(--bg, #eef2f5);
  pointer-events: auto;
}

/* Inspection punch sits above the classic line. The line itself is the only view after Back. */
body.dtf-redesign.dtf-home-item:not(.dtf-line-route) .punch-inspection-panel,
body.dtf-redesign.dtf-home-item:not(.dtf-line-route) .punch-backdrop {
  display: none !important;
}

body.dtf-redesign.dtf-line-route .inspections-workspace-header,
body.dtf-redesign.dtf-line-route .punch-panel-hdr,
body.dtf-redesign.dtf-line-route .punch-backdrop {
  display: none !important;
}

body.dtf-redesign.dtf-line-route .punch-inspection-panel {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  visibility: visible !important;
  pointer-events: auto !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.app-tab-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  height: calc(64pt + env(safe-area-inset-bottom, 34pt));
  padding-bottom: env(safe-area-inset-bottom, 34pt);
  box-sizing: border-box;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #ffffff;
  border-top: 1px solid #c5d0da;
}

body.dtf-classic-home .app-tab-bar,
body.dtf-daily-open:not(.dtf-log-editing) .app-tab-bar {
  display: grid;
}

.app-tab-bar button {
  min-height: 56pt;
  border: 0;
  background: transparent;
  color: #5b6b79;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

body.dtf-classic-home .app-tab-bar [data-tab="home"],
body.dtf-daily-open .app-tab-bar [data-tab="jobs"] {
  color: #0f766e;
  font-weight: 700;
}

html[data-theme="dark"] .today-card,
html[data-theme="dark"] .today-row {
  background: #10202c;
  color: #e8f4f6;
  border-color: #24545c;
}

html[data-theme="dark"] .today-head h3,
html[data-theme="dark"] .today-title,
html[data-theme="dark"] .today-empty-title {
  color: #e8f4f6;
}

html[data-theme="dark"] .today-meta,
html[data-theme="dark"] .today-empty-hint {
  color: #c5d5df;
}

html[data-theme="dark"] .today-see,
html[data-theme="dark"] body.dtf-classic-home .app-tab-bar [data-tab="home"],
html[data-theme="dark"] body.dtf-daily-open .app-tab-bar [data-tab="jobs"] {
  color: #5eead4;
}

html[data-theme="dark"] .today-chip.is-overdue {
  background: #4a2228;
  color: #ffd4d4;
}

html[data-theme="dark"] .today-chip.is-today {
  background: #123832;
  color: #b6fff3;
}

html[data-theme="dark"] .today-pill {
  background: #e8f4f6;
  color: #10202c;
}

html[data-theme="dark"] .app-tab-bar {
  background: #10202c;
  border-top-color: #24545c;
}

html[data-theme="dark"] .app-tab-bar button {
  color: #c5d5df;
}
