/* ============================================================
   MR. GOLFCART V2 — MY DAY
   Mobile-first V1 parity pass.

   V1 visual hierarchy preserved:
   Search -> Jay's Day -> day/work controls -> section heading -> cards
   Card: identity -> Next Step -> Latest Note -> Operational -> actions
   ============================================================ */

/* Working As: compact header control, no visible label. */
.working-as-root{min-width:98px;max-width:112px}
.working-as-control{display:flex;align-items:center;justify-content:flex-end}
.working-as-control label{display:none}
.working-as-control select{
  width:108px;
  min-height:38px;
  border:1px solid rgba(255,255,255,.46);
  border-radius:7px;
  padding:5px 24px 5px 8px;
  background:#fff;
  color:var(--text);
  font-size:15px;
  font-weight:800;
  line-height:1.1;
}

/* Search */
.my-day-search-wrap{margin:0 0 10px}
.my-day-search{
  width:100%;
  min-height:44px;
  padding:9px 12px;
  border:1px solid #c7d2cc;
  border-radius:10px;
  background:#fff;
  color:var(--text);
  font-size:16px;
  line-height:1.2;
  box-shadow:none;
}
.my-day-search::placeholder{color:#747b77;opacity:1}

/* Section heading */
.my-day-heading,
.my-day-section-heading{display:flex;align-items:center;gap:8px}
.my-day-heading{
  margin:1px 2px 6px;
  color:var(--green);
  font-size:15px;
  font-weight:900;
  line-height:1;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.my-day-heading::before,
.my-day-section-heading::before{
  content:"";
  width:4px;
  border-radius:3px;
  background:var(--gold);
  flex:0 0 4px;
}
.my-day-heading::before{height:17px}
.my-day-heading::after,
.my-day-section-heading::after{
  content:"";
  height:1px;
  background:#aeb8b3;
  flex:1 1 auto;
  min-width:18px;
}
.my-day-section-heading{
  margin:10px 2px 6px;
  color:#4f5e56;
  font-size:11px;
  font-weight:900;
  line-height:1;
  text-transform:uppercase;
  letter-spacing:.045em;
}
.my-day-section-heading::before{height:14px}

/* My Day 2x3 controls. First row uses urgency accents; second row stays quiet. */
.day-nav-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin:0 0 8px;
}
.day-nav-button{
  width:100%;
  min-width:0;
  min-height:54px;
  margin:0;
  padding:10px 12px;
  border:1px solid #c9d1cd;
  border-radius:9px;
  background:#fff;
  color:var(--green);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:13px;
  font-weight:850;
  line-height:1;
  text-align:left;
}
.day-utility-button{border-top:1px solid #c9d1cd}
.day-nav-button strong{
  display:inline-flex;
  min-width:28px;
  height:28px;
  padding:0 8px;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  border-radius:999px;
  background:#edf2ef;
  color:var(--green);
  font-size:12px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.day-nav-button.active{
  background:var(--green);
  color:#fff;
  border-color:var(--green);
}
.day-nav-button.active strong{background:rgba(255,255,255,.18);color:#fff}
.day-nav-button:active{transform:translateY(1px)}

/* Cards */
.work-list{display:grid;gap:8px;margin-top:0}
.work-card{
  --type-accent:#8b9790;
  --type-wash:#fafbfa;
  position:relative;
  overflow:visible;
  padding:13px;
  border:1px solid var(--line);
  border-left:4px solid var(--type-accent);
  border-radius:13px;
  background:linear-gradient(90deg,var(--type-wash) 0,#fff 30px);
  box-shadow:0 1px 2px rgba(0,0,0,.03);
  transition:opacity .14s ease,transform .14s ease;
}
.work-card.type-lead{--type-accent:#8b9790;--type-wash:#fafbfa}
.work-card.type-repair{--type-accent:#d98279;--type-wash:#fff8f7}
.work-card.type-lithium{--type-accent:#c9a82a;--type-wash:#fffbed}
.work-card.pending{opacity:.62}
.work-card.optimistic-exit{transform:scale(.985);opacity:.38}

/* Identity */
.work-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.work-title{min-width:0;flex:1 1 auto}
.work-name{
  margin:0;
  color:#1f2937;
  font-size:18px;
  font-weight:900;
  line-height:1.12;
  overflow-wrap:anywhere;
}
.work-contact{
  margin-top:3px;
  color:#53605a;
  font-size:12px;
  font-weight:750;
  line-height:1.2;
  overflow-wrap:anywhere;
}
.work-id{
  margin-top:4px;
  color:var(--green);
  font-size:11px;
  font-weight:850;
  line-height:1.2;
  letter-spacing:.035em;
  font-family:Arial,Helvetica,sans-serif;
  overflow-wrap:anywhere;
}
.work-cart{
  margin-top:6px;
  color:#4b5563;
  font-size:14px;
  font-weight:700;
  line-height:1.25;
  overflow-wrap:anywhere;
}

/* Type dropdown control */
.type-menu-wrap{position:relative;flex:0 0 auto}
.type-badge{
  min-width:104px;
  min-height:40px;
  height:40px;
  margin:0;
  padding:7px 10px 6px;
  border:1px solid #c7d2cc;
  border-top:4px solid #87938c;
  border-radius:9px;
  background:#f4f7f5;
  color:#45524b;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:11px;
  line-height:1;
  font-weight:900;
  letter-spacing:.03em;
  text-transform:uppercase;
  white-space:nowrap;
  box-shadow:none;
}
.type-badge.repair{color:#9b3c35;border-color:#e7aaa4;border-top-color:#d98279;background:#fff4f2}
.type-badge.lithium{color:#735d0b;border-color:#dcc46d;border-top-color:#c9a82a;background:#fff9e5}
.type-badge.lead{color:#45524b;border-color:#d2d9d5;border-top-color:#87938c;background:#f7f8f7}
.type-badge .chev{font-size:11px;line-height:1;color:currentColor}
.type-badge[aria-expanded="true"] .chev{transform:rotate(180deg)}

.card-menu{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  z-index:80;
  width:196px;
  max-height:300px;
  overflow:auto;
  padding:5px;
  border:1px solid #cfd8d3;
  border-radius:10px;
  background:#fff;
  box-shadow:0 8px 22px rgba(23,79,54,.14);
}
.card-menu button{
  width:100%;
  min-height:40px;
  margin:0;
  padding:9px 10px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  border:0;
  border-radius:7px;
  background:#fff;
  color:var(--green);
  font-size:12px;
  font-weight:850;
  text-align:left;
}
.card-menu button+button{border-top:1px solid #edf0ee;border-top-left-radius:0;border-top-right-radius:0}
.card-menu button:active{background:#eef3f0}
.card-menu .danger{margin-top:4px;border-top:1px solid #f0d3d0;color:#9a3d36;background:#fffafa}

/* Next Step: high priority scan-line. */
.next-step-summary,
.operational-summary{
  display:grid;
  grid-template-columns:74px minmax(0,1fr);
  gap:10px;
  align-items:baseline;
}
.next-step-summary{
  width:calc(100% + 8px);
  margin:11px -4px 0;
  padding:10px 4px;
  border:0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  border-radius:8px;
  background:transparent;
  color:inherit;
  text-align:left;
}
.next-step-summary span,
.operational-summary span,
.latest-note-label{
  color:#6b7280;
  font-size:10px;
  font-weight:900;
  line-height:1.1;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.next-step-summary strong{
  min-width:0;
  color:#1f2937;
  font-size:13px;
  font-weight:900;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.next-step-summary.overdue strong{color:var(--danger)}
.next-step-summary:active{background:#f3f6f4}

/* Latest Note: only a real note gets the gold cue. */
.latest-note{
  position:relative;
  margin:1px 0 0;
  border-bottom:1px solid var(--line);
  background:transparent;
}
.latest-note summary{
  position:relative;
  width:100%;
  min-height:54px;
  padding:9px 28px 9px 12px;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  cursor:pointer;
}
.latest-note summary::-webkit-details-marker{display:none}
.latest-note summary::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:3px;
  border-radius:3px;
  background:var(--gold);
}
.latest-note-summary{
  min-width:0;
  display:flex;
  align-items:baseline;
  gap:7px;
  flex-wrap:wrap;
}
.latest-note-meta{
  min-width:0;
  color:#66716b;
  font-size:11.5px;
  line-height:1.25;
  font-weight:800;
  overflow-wrap:anywhere;
}
.latest-note-chevron{
  flex:0 0 auto;
  margin-left:8px;
  color:var(--green);
  font-size:15px;
  line-height:1;
  transition:transform .14s ease;
}
.latest-note[open] .latest-note-chevron{transform:rotate(180deg)}
.latest-note-body{
  margin:0;
  padding:0 12px 10px 12px;
  border-left:3px solid var(--gold);
  color:#46524c;
  font-size:12px;
  line-height:1.4;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.latest-note-empty{
  min-height:34px;
  padding:7px 0;
  display:grid;
  grid-template-columns:74px minmax(0,1fr);
  gap:10px;
  align-items:center;
  border-bottom:1px solid var(--line);
}
.latest-note-empty-text{color:#7d8882;font-size:11px;font-weight:750;line-height:1.25}

/* Operational: deliberately quieter than Next Step. */
.operational-summary{
  margin:0;
  padding:9px 0;
  border-bottom:1px solid var(--line);
}
.operational-summary strong{
  min-width:0;
  color:#52605a;
  font-size:11.5px;
  font-weight:800;
  line-height:1.3;
  overflow-wrap:anywhere;
}

/* Four equal thumb targets. */
.card-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin-top:10px;
}
.card-actions a,
.card-actions button{
  min-width:0;
  width:100%;
  height:44px;
  min-height:44px;
  margin:0;
  padding:8px 5px;
  border:1px solid #c7d2cc;
  border-radius:9px;
  background:#fff;
  color:var(--green);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  line-height:1;
  font-weight:850;
  text-align:center;
  text-decoration:none;
  box-shadow:none;
}
.card-actions a:active,
.card-actions button:active{background:#f3f6f4}
.card-actions button:disabled{color:#9aa39e;background:#f8f9f8;border-color:#dde2df;opacity:1}

/* Inline editors remain spacious even though collapsed cards are dense. */
.inline-editor{
  width:100%;
  margin-top:7px;
  padding:10px;
  border:1px solid #d4dbd7;
  border-radius:10px;
  background:#f8faf8;
}
.inline-editor-title{margin-bottom:7px;color:var(--green);font-size:12px;font-weight:900;line-height:1.1}
.inline-grid{display:grid;gap:7px}
.inline-grid.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.inline-editor label{display:block;margin:0 0 4px;color:#66716b;font-size:10px;font-weight:900;line-height:1;text-transform:uppercase;letter-spacing:.035em}
.inline-editor input,
.inline-editor select,
.inline-editor textarea{
  width:100%;
  min-width:0;
  min-height:42px;
  box-sizing:border-box;
  border:1px solid #cfd6d2;
  border-radius:8px;
  padding:9px 10px;
  background:#fff;
  color:var(--text);
  font-size:16px;
}
.inline-editor textarea{min-height:58px;resize:vertical}
.inline-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:7px}
.inline-actions button{
  min-height:42px;
  margin:0;
  border:1px solid var(--line);
  border-radius:9px;
  padding:8px;
  background:#fff;
  color:var(--green);
  font-size:12px;
  font-weight:850;
}
.inline-actions .primary{background:var(--green);color:#fff;border-color:var(--green)}
.inline-actions .danger{color:#873535;border-color:#e0bcbc}

.empty-card{font-size:13px;color:#69756f}

@media(max-width:390px){
  .working-as-root{min-width:98px;max-width:104px}
  .working-as-control select{width:104px}
  .inline-grid.two{grid-template-columns:1fr}
}
@media(max-width:350px){
  .app-main{padding-left:8px;padding-right:8px}
  .day-nav-grid{gap:5px}
  .day-nav-button{padding-left:7px;padding-right:7px;font-size:12px}
  .work-card{padding-left:11px;padding-right:11px}
  .type-badge{min-width:96px}
}

/* Desktop uses same information hierarchy with slightly more breathing room. */
@media(min-width:701px){
  .working-as-root{min-width:112px}
  .working-as-control select{width:112px}
  .my-day-search{min-height:46px}
  .day-nav-button{min-height:58px;font-size:14px;padding:10px 14px}
  .work-list{gap:9px}
}

/* Schedule — direct V1 mobile schedule language, backed by V2 Next Steps. */
.schedule-screen{display:grid;gap:9px}
.schedule-toolbar{display:flex;align-items:center;gap:9px;min-height:38px}.schedule-toolbar strong{color:var(--green);font-size:14px;font-weight:900;letter-spacing:.03em;text-transform:uppercase}.schedule-back{min-height:34px;padding:7px 9px;border:1px solid #c7d2cc;border-radius:8px;background:#fff;color:var(--green);font-size:12px;font-weight:850}
.schedule-filter-row{display:grid;grid-template-columns:1fr 1fr;gap:7px}.schedule-filter-btn{min-height:46px;padding:9px 11px;border:1px solid #c9d1cd;border-radius:9px;background:#fff;color:var(--green);display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:850}.schedule-filter-btn strong{min-width:26px;height:26px;padding:0 7px;border-radius:999px;background:#edf2ef;color:var(--green);display:inline-flex;align-items:center;justify-content:center;font-size:12px}.schedule-filter-btn.active{background:var(--green);border-color:var(--green);color:#fff}.schedule-filter-btn.active strong{background:rgba(255,255,255,.18);color:#fff}
.schedule-list{display:grid;gap:8px}.schedule-card{--sched-accent:#87938c;display:grid;grid-template-columns:74px minmax(0,1fr);gap:10px;padding:12px 13px;border:1px solid var(--line);border-left:4px solid var(--sched-accent);border-radius:12px;background:#fff;box-shadow:var(--shadow)}.schedule-card.type-repair{--sched-accent:#d98279}.schedule-card.type-lithium{--sched-accent:#c9a82a}.schedule-when{display:flex;flex-direction:column;gap:3px;padding-right:9px;border-right:1px solid #edf0ee}.schedule-when strong{font-size:13px;color:var(--green);line-height:1.1}.schedule-when span{font-size:10.5px;color:#6b7280;font-weight:800}.schedule-main{min-width:0}.schedule-name{font-size:15px;font-weight:900;line-height:1.15}.schedule-contact{margin-top:2px;color:#59645f;font-size:11.5px;font-weight:750}.schedule-action{margin-top:5px;color:var(--green);font-size:12px;font-weight:900}.schedule-meta{margin-top:3px;color:#69746f;font-size:10.5px;font-weight:750;overflow-wrap:anywhere}.schedule-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:2px}.schedule-actions button{min-height:42px;border:1px solid #c7d2cc;border-radius:9px;background:#fff;color:var(--green);font-size:12px;font-weight:850}.schedule-actions button:nth-child(2){border-top:4px solid var(--green)}
/* V1 parity: Buyer is a first-class blue My Day work card; Schedule remains Lead/Repair/Lithium only. */
.work-card.type-buyer{--type-accent:#4d86b8;--type-wash:#f3f8fd}
.schedule-contact-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.schedule-contact-actions a,.schedule-contact-actions button{display:flex;align-items:center;justify-content:center;min-height:38px;border:1px solid #c7d2cc;border-radius:9px;background:#fff;color:var(--green);text-decoration:none;font-size:12px;font-weight:850}
.job-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:8px 0}.job-quick-grid label{display:grid;gap:3px;font-size:10px;font-weight:850;color:#68736e}.job-quick-grid select{min-width:0;min-height:38px;border:1px solid #c7d2cc;border-radius:8px;background:#fff;padding:6px;font-size:12px}@media(max-width:700px){.job-quick-grid{grid-template-columns:1fr 1fr}.job-quick-grid label:first-child{grid-column:1/-1}}

/* ============================================================
   Company Calendar / dispatch — additive V1 Schedule evolution.
   Existing schedule-card visual identity remains the base.
   ============================================================ */
.calendar-screen{gap:9px}
.calendar-heading{margin:0 2px 1px}
.calendar-scope-row,.calendar-view-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.calendar-segment{min-height:38px;padding:6px 9px;border:1px solid #c9d1cd;border-radius:9px;background:#fff;color:var(--green);font-size:12px;font-weight:900}
.calendar-segment.active{background:var(--green);border-color:var(--green);color:#fff}
.calendar-person-select{display:block;padding:10px 11px;border:1px solid #d3dcd7;border-radius:10px;background:#fff}
.calendar-person-select span,.calendar-inline-editor label{display:block;margin-bottom:5px;color:#66716b;font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
.calendar-person-select select,.calendar-inline-editor input,.calendar-inline-editor select{width:100%;min-height:42px;padding:8px 10px;border:1px solid #c7d2cc;border-radius:8px;background:#f7f9f8;color:var(--text);font-size:15px}
.calendar-agenda{display:grid;gap:12px}
.calendar-date-group{display:grid;gap:6px}
.calendar-date-heading{display:flex;align-items:center;gap:8px;color:#4f5e56;font-size:11px;font-weight:900;letter-spacing:.045em;text-transform:uppercase}
.calendar-date-heading::before{content:"";width:4px;height:14px;border-radius:3px;background:var(--gold);flex:0 0 4px}
.calendar-date-heading::after{content:"";height:1px;background:#aeb8b3;flex:1 1 auto}
.calendar-date-nav{display:grid;grid-template-columns:42px minmax(0,1fr) auto 42px;gap:6px;align-items:center}
.calendar-date-nav button,.calendar-date-nav input{min-height:40px;border:1px solid #c7d2cc;border-radius:8px;background:#fff;color:var(--green);font-size:12px;font-weight:850}
.calendar-date-nav input{min-width:0;padding:7px 8px;color:var(--text)}
.calendar-date-nav button:disabled{opacity:.42}
.calendar-week-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.calendar-week-day{position:relative;min-width:0;min-height:54px;padding:6px 2px;border:1px solid #d5dcd8;border-radius:8px;background:#fff;color:#56625c;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.calendar-week-day span{font-size:9px;font-weight:900;text-transform:uppercase}.calendar-week-day strong{font-size:14px}.calendar-week-day em{position:absolute;right:3px;top:3px;min-width:15px;height:15px;border-radius:999px;background:#edf2ef;color:var(--green);display:flex;align-items:center;justify-content:center;font-size:8px;font-style:normal;font-weight:900}
.calendar-week-day.today{border-color:var(--gold)}.calendar-week-day.active{background:var(--green);border-color:var(--green);color:#fff}.calendar-week-day.active em{background:rgba(255,255,255,.18);color:#fff}
.schedule-assigned{margin-top:4px;color:#334f42;font-size:11px;font-weight:850}
.schedule-location{margin-top:3px;color:#69746f;font-size:10.5px;font-weight:750;overflow-wrap:anywhere}
.calendar-actions{grid-template-columns:repeat(2,minmax(0,1fr))}

.calendar-agenda-card .schedule-when{justify-content:flex-start}
.calendar-agenda-card .schedule-action{margin-top:5px;color:var(--green);font-size:12px;font-weight:900}
.calendar-agenda-card .schedule-assigned{margin-top:3px;color:#334f42;font-size:11px;font-weight:850}
.calendar-agenda-card .schedule-meta{margin-top:3px;color:#69746f;font-size:10.5px;font-weight:750;overflow-wrap:anywhere}
.schedule-location-link{display:block;text-decoration:none;color:#69746f}
.schedule-location-link:active,.schedule-location-link:hover{text-decoration:underline}
.calendar-primary-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.calendar-primary-actions a,.calendar-primary-actions button{min-height:42px}
.calendar-operational-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.calendar-operational-actions button{min-height:40px;background:#f8faf8;color:#52635a;font-size:11px;font-weight:850}
.calendar-operational-actions button:nth-child(1),.calendar-operational-actions button:nth-child(2),.calendar-operational-actions button:nth-child(3){border-top:1px solid #c7d2cc}
.calendar-inline-editor{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:3px;padding:10px;border:1px solid #d4dcd8;border-radius:10px;background:#f8faf8}
.calendar-reassign-editor{grid-template-columns:1fr}
.calendar-inline-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.calendar-reassign-editor .calendar-inline-actions{grid-template-columns:1fr 1fr}
.calendar-inline-actions button{min-height:40px;border:1px solid #c7d2cc;border-radius:8px;background:#fff;color:var(--green);font-size:11px;font-weight:850}.calendar-inline-actions .primary{border-top:4px solid var(--green)}
@media(min-width:701px){.calendar-scope-row,.calendar-view-row{max-width:520px}.calendar-week-strip{gap:7px}.calendar-week-day{min-height:62px}.calendar-actions{grid-template-columns:repeat(4,minmax(0,1fr))}.calendar-operational-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}
