/* KTS v1.5.7 — installed mobile PWA pro mode
   Scope: dashboard only when JS marks the installed/mobile app with .pwa-pro-mode.
   Goal: experienced users see work, not onboarding or repeated explanations. */

body.dashboard-v110.pwa-pro-mode {
  --pro-edge: 10px;
  --pro-card: 14px;
  padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Minimal app chrome */
body.dashboard-v110.pwa-pro-mode .app-header {
  min-height: 54px !important;
  padding: 8px 12px !important;
  border-bottom-color: rgba(255,255,255,.06) !important;
}
body.dashboard-v110.pwa-pro-mode .app-header .brand-mark {
  width: 34px !important;
  height: 34px !important;
}
body.dashboard-v110.pwa-pro-mode .app-header .brand strong {
  font-size: 12px !important;
  letter-spacing: .03em;
}
body.dashboard-v110.pwa-pro-mode .app-header .header-actions { display: none !important; }
body.dashboard-v110.pwa-pro-mode .product-app-nav { display: none !important; }

/* Keep the beta boundary visible, but only as one compact status line. */
body.dashboard-v110.pwa-pro-mode .test-mode-strip {
  min-height: 0 !important;
  padding: 5px 12px !important;
  gap: 6px !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  overflow: hidden;
}
body.dashboard-v110.pwa-pro-mode .test-mode-strip > span:last-child { display: none !important; }
body.dashboard-v110.pwa-pro-mode .test-mode-strip .test-mode-dot {
  width: 6px !important;
  height: 6px !important;
}

body.dashboard-v110.pwa-pro-mode .app-shell {
  width: calc(100% - 16px) !important;
  margin: 8px auto 20px !important;
  gap: 9px !important;
}

/* Today = action first. Remove education layer from the installed app. */
body.dashboard-v110.pwa-pro-mode #productOnboarding,
body.dashboard-v110.pwa-pro-mode #openProductOnboarding,
body.dashboard-v110.pwa-pro-mode .dashboard-mode-switch { display: none !important; }

body.dashboard-v110.pwa-pro-mode .workflow-hero {
  display: block !important;
  border-radius: 16px !important;
}
body.dashboard-v110.pwa-pro-mode .workflow-hero-copy {
  padding: 14px 14px 8px !important;
  min-height: 0 !important;
}
body.dashboard-v110.pwa-pro-mode .workflow-hero-copy .eyebrow,
body.dashboard-v110.pwa-pro-mode .workflow-hero-copy > p:not(#appMessage),
body.dashboard-v110.pwa-pro-mode .workflow-hero-copy .today-purpose { display: none !important; }
body.dashboard-v110.pwa-pro-mode .today-heading-row { display: block !important; }
body.dashboard-v110.pwa-pro-mode .today-heading-row h1 {
  font-size: 22px !important;
  line-height: 1.18 !important;
  letter-spacing: -.03em !important;
  margin: 0 !important;
}
body.dashboard-v110.pwa-pro-mode #appMessage:empty { display: none !important; }
body.dashboard-v110.pwa-pro-mode #appMessage:not(:empty) { margin-top: 9px !important; }

body.dashboard-v110.pwa-pro-mode .workflow-actions-card {
  padding: 10px 14px 14px !important;
  border-top: 0 !important;
}
body.dashboard-v110.pwa-pro-mode .workflow-action-label {
  margin-bottom: 4px !important;
  font-size: 10px !important;
}
body.dashboard-v110.pwa-pro-mode #nextActionTitle {
  font-size: 16px !important;
  line-height: 1.35 !important;
}
body.dashboard-v110.pwa-pro-mode #nextActionDescription {
  margin: 4px 0 10px !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
  opacity: .72;
}
body.dashboard-v110.pwa-pro-mode #nextActionBtn {
  width: 100% !important;
  min-height: 46px !important;
}
body.dashboard-v110.pwa-pro-mode .workflow-secondary-actions,
body.dashboard-v110.pwa-pro-mode .workflow-actions-card > details { display: none !important; }

/* The only home metrics are work counts. */
body.dashboard-v110.pwa-pro-mode .today-task-section {
  padding: 12px !important;
  border-radius: 16px !important;
}
body.dashboard-v110.pwa-pro-mode .today-task-heading { margin-bottom: 8px !important; }
body.dashboard-v110.pwa-pro-mode .today-task-heading .eyebrow { display: none !important; }
body.dashboard-v110.pwa-pro-mode .today-task-heading h2 {
  font-size: 15px !important;
  line-height: 1.25 !important;
}
body.dashboard-v110.pwa-pro-mode .today-task-heading > span {
  font-size: 10px !important;
  opacity: .68;
}
body.dashboard-v110.pwa-pro-mode .summary-grid.workflow-summary {
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 7px !important;
}
body.dashboard-v110.pwa-pro-mode .summary-card.task-card {
  min-height: 82px !important;
  padding: 11px !important;
  align-content: space-between !important;
  border-radius: 13px !important;
}
body.dashboard-v110.pwa-pro-mode .summary-card.task-card span {
  font-size: 11px !important;
  line-height: 1.3 !important;
}
body.dashboard-v110.pwa-pro-mode .summary-card.task-card strong {
  font-size: 25px !important;
  line-height: 1 !important;
}
body.dashboard-v110.pwa-pro-mode .summary-card.task-card :is(em,b) { display: none !important; }

/* Records: one filter system, one search, no repeated explanation. */
body.dashboard-v110.pwa-pro-mode .record-list-panel,
body.dashboard-v110.pwa-pro-mode .workflow-detail-panel,
body.dashboard-v110.pwa-pro-mode .booking-command-bar,
body.dashboard-v110.pwa-pro-mode .booking-inbox-panel,
body.dashboard-v110.pwa-pro-mode .booking-detail-panel,
body.dashboard-v110.pwa-pro-mode .booking-calendar-panel {
  border-radius: 16px !important;
  padding: 12px !important;
}
body.dashboard-v110.pwa-pro-mode .workflow-toolbar .eyebrow,
body.dashboard-v110.pwa-pro-mode .workflow-toolbar .muted,
body.dashboard-v110.pwa-pro-mode .workflow-detail-toolbar .eyebrow,
body.dashboard-v110.pwa-pro-mode .workflow-detail-toolbar .muted { display: none !important; }
body.dashboard-v110.pwa-pro-mode .workflow-toolbar h2,
body.dashboard-v110.pwa-pro-mode .workflow-detail-toolbar h2 {
  font-size: 17px !important;
  line-height: 1.25 !important;
}
body.dashboard-v110.pwa-pro-mode .workflow-tabbar { margin-top: 4px !important; }
body.dashboard-v110.pwa-pro-mode .filter-bar.workflow-searchbar {
  display: block !important;
  margin-top: 8px !important;
}
body.dashboard-v110.pwa-pro-mode .filter-bar.workflow-searchbar label,
body.dashboard-v110.pwa-pro-mode .filter-bar.workflow-searchbar select { display: none !important; }
body.dashboard-v110.pwa-pro-mode .filter-bar.workflow-searchbar input {
  width: 100% !important;
  min-height: 42px !important;
}
body.dashboard-v110.pwa-pro-mode .detail-header-status { display: none !important; }
body.dashboard-v110.pwa-pro-mode #recordDetail.empty-state {
  min-height: 120px !important;
  padding: 20px 12px !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

/* Settings/support are not part of the everyday scroll. */
body.dashboard-v110.pwa-pro-mode .support-grid { display: none !important; }
body.dashboard-v110.pwa-pro-mode.pro-settings-open .support-grid {
  display: block !important;
  margin-top: 10px !important;
}
body.dashboard-v110.pwa-pro-mode.pro-settings-open .support-grid > .support-panel:not(#settingsSection) { display: none !important; }
body.dashboard-v110.pwa-pro-mode.pro-settings-open #settingsSection { display: block !important; }
body.dashboard-v110.pwa-pro-mode #settingsSection .panel-heading .eyebrow,
body.dashboard-v110.pwa-pro-mode #settingsSection .panel-heading .muted,
body.dashboard-v110.pwa-pro-mode #settingsSection .field-help { display: none !important; }

/* Booking: keep operations, remove explanatory copy. */
body.dashboard-v110.pwa-pro-mode .booking-command-title .eyebrow,
body.dashboard-v110.pwa-pro-mode .booking-command-title .booking-beta-note { display: none !important; }
body.dashboard-v110.pwa-pro-mode .booking-command-title h2 {
  font-size: 18px !important;
  line-height: 1.2 !important;
}
body.dashboard-v110.pwa-pro-mode .booking-command-actions {
  grid-template-columns: 1fr auto !important;
  gap: 7px !important;
}
body.dashboard-v110.pwa-pro-mode .booking-command-actions > .btn.primary { min-width: 0 !important; }
body.dashboard-v110.pwa-pro-mode #bookingWorkspace .booking-summary-card em { display: none !important; }

/* Bottom nav = 4 core tasks + More. Center write action gets priority. */
body.dashboard-v110.pwa-pro-mode .mobile-app-nav {
  right: 8px !important;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  left: 8px !important;
  min-height: 62px !important;
  padding: 5px !important;
  border-radius: 18px !important;
}
body.dashboard-v110.pwa-pro-mode .mobile-app-nav button {
  min-height: 52px !important;
  gap: 2px !important;
}
body.dashboard-v110.pwa-pro-mode .mobile-app-nav button b { font-size: 9px !important; }
body.dashboard-v110.pwa-pro-mode .mobile-app-nav [data-v110-nav="procedure"] {
  transform: translateY(-7px);
  min-height: 58px !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 17px !important;
  background: linear-gradient(180deg,#f2d78f,#d7ad5a) !important;
  color: #2a1d0c !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.24);
}
body.dashboard-v110.pwa-pro-mode .mobile-app-nav [data-v110-nav="procedure"] b { font-weight: 800; }

/* More sheet */
.pro-more-backdrop { display: none; }
body.dashboard-v110.pwa-pro-mode .pro-more-backdrop[aria-hidden="false"] {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px 10px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
}
body.dashboard-v110.pwa-pro-mode .pro-more-sheet {
  width: min(100%, 520px);
  max-height: min(76vh, 620px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(236,209,154,.18);
  border-radius: 22px;
  background: #18130d;
  color: #fff7e7;
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
}
body.dashboard-v110.pwa-pro-mode .pro-more-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
body.dashboard-v110.pwa-pro-mode .pro-more-head strong { font-size: 17px; }
body.dashboard-v110.pwa-pro-mode .pro-more-close {
  width: 38px;
  height: 38px;
  min-height: 38px !important;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff7e7;
  font-size: 20px;
}
body.dashboard-v110.pwa-pro-mode .pro-more-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
body.dashboard-v110.pwa-pro-mode .pro-more-grid :is(button,a) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  color: #fff7e7;
  text-decoration: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}
body.dashboard-v110.pwa-pro-mode .pro-more-grid .danger { color: #ffc5bd; }

@media (max-width: 370px) {
  body.dashboard-v110.pwa-pro-mode .pro-more-grid { grid-template-columns: 1fr; }
}

@media (min-width: 721px) {
  body.dashboard-v110.pwa-pro-mode { padding-bottom: 0 !important; }
  body.dashboard-v110.pwa-pro-mode .pro-more-backdrop { display: none !important; }
}
