/* Gesner Ops dash v2: compact weather, Scheduling calendar, To-Do, plain procedures list.
   Loaded after theme.css (AW Blue Hour). Colours: lime accent, ice blue, green; red only for offline. */

/* ---------- Compact weather strip ---------- */
.weather-card.wx-compact { padding: 8px 12px !important; margin-bottom: 10px !important; border-radius: 12px !important; }
.wx-compact .wxc-line1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; line-height: 1.25; }
.wx-compact .wxc-temp { font-size: 1.15rem; font-weight: 750; color: #ffffff; }
.wx-compact .wxc-desc { font-size: 0.9rem; color: #dbe5f5; }
.wx-compact .wxc-hilo { font-size: 0.8rem; color: var(--muted); margin-left: auto; white-space: nowrap; }
.wx-compact .wxc-line2 { margin-top: 2px; font-size: 0.88rem; color: var(--muted); line-height: 1.3; }
.wx-compact .wxc-line2 strong { color: #c9f31d; font-weight: 700; }
.wx-compact .wxc-sep { margin: 0 6px; color: var(--muted); }
.wx-compact .wx-fallback { margin: 0; font-size: 0.85rem; }

/* ---------- Dashboard cards ---------- */
.sched-card, .todo-card { padding: 12px !important; margin-bottom: 12px !important; border-radius: 16px !important; }
.sched-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dash-title { margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 750; color: #c9f31d; }
.dash-share { font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.dash-share:empty { display: none; }
.dash-share.is-shared { color: #b6f5cb; background: rgba(21,128,61,0.30); border: 1px solid rgba(134,239,172,0.45); }
.dash-share.is-local { color: #dbe5f5; background: rgba(159,194,255,0.12); border: 1px solid rgba(159,194,255,0.35); }

/* Today's date, large, above the calendar */
.sched-today { display: flex; flex-direction: column; gap: 2px; padding: 2px 2px 10px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border); }
.sched-today-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.sched-today-date { font-size: 1.35rem; font-weight: 750; color: #ffffff; line-height: 1.2; }

/* Month nav */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cal-month { font-weight: 700; font-size: 1rem; color: #ffffff; }
.cal-arrow { width: 44px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.05);
  color: #c9f31d; font-size: 1.5rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cal-arrow:active { background: rgba(201,243,29,0.14); }

/* Grid */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow span { text-align: center; font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; padding: 2px 0 4px; }
.cal-cell { min-height: 40px; }
.cal-day { position: relative; border: 1px solid transparent; background: rgba(255,255,255,0.04); color: #ffffff; border-radius: 10px;
  font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; padding: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
.cal-day:active { background: rgba(201,243,29,0.16); }
.cal-day.is-today { background: rgba(201,243,29,0.16); border-color: #c9f31d; color: #c9f31d; font-weight: 800; }
.cal-day.has-notes { background: rgba(159,194,255,0.12); }
.cal-day.is-today.has-notes { background: rgba(201,243,29,0.20); }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: #9fc2ff; margin-top: 3px; box-shadow: 0 0 0 2px rgba(159,194,255,0.20); }
.cal-day.is-today .cal-dot { background: #c9f31d; }

/* "Put on calendar" pick mode */
.sched-copy-banner { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px;
  padding: 8px 10px; border-radius: 10px; background: rgba(159,194,255,0.12); border: 1px solid rgba(159,194,255,0.40);
  color: #ffffff; font-size: 0.85rem; }
.sched-copy-banner span { overflow-wrap: anywhere; }
.sched-copy-cancel { padding: 6px 10px !important; min-height: 34px !important; font-size: 0.8rem !important; flex: none; }

/* Planned today, under the calendar */
.sched-today-list { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.sched-today-list .stl-k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stl-item { text-align: left; background: rgba(201,243,29,0.08); border: 1px solid rgba(201,243,29,0.30); color: #ffffff;
  border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere; cursor: pointer; }

/* ---------- Day popup ---------- */
.day-sheet { max-height: 86vh; overflow-y: auto; }
.day-sheet h3 { color: #c9f31d; }
.day-notes { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.day-empty { color: var(--muted); font-size: 0.9rem; padding: 4px 8px; }
.day-note { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); }
.day-note.is-editing { border-color: rgba(201,243,29,0.65); }
.day-note-text { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; }
.day-note-btns { display: flex; gap: 6px; flex: none; }
.day-note-btns .btn { padding: 6px 10px !important; min-height: 34px !important; font-size: 0.8rem !important; }
.day-label { display: block; font-size: 0.8rem; color: var(--muted); margin: 4px 4px 6px; }
#day-text { width: 100%; box-sizing: border-box; border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; min-height: 84px; resize: vertical; }
.day-actions { display: flex; gap: 8px; margin: 10px 0; }
.day-actions .btn { flex: 1; }
.day-actions .btn.hidden { display: none !important; }

/* ---------- To-Do ---------- */
.todo-add { display: flex; gap: 8px; margin-bottom: 8px; }
.todo-add input { flex: 1; min-width: 0; border-radius: 10px; padding: 10px 12px; font-size: 16px; }
.todo-add-btn { flex: none; padding: 0 16px !important; min-height: 44px; }
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.todo-empty { color: var(--muted); font-size: 0.9rem; padding: 4px 2px; }
.todo-item { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 8px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.todo-check { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.todo-check input { width: 22px; height: 22px; flex: none; margin: 0; }
.todo-text { font-size: 0.95rem; overflow-wrap: anywhere; }
.todo-item.is-done .todo-text { color: var(--muted); text-decoration: line-through; }
.todo-icon-btn { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.todo-icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.todo-icon-btn.todo-cal { color: #9fc2ff; }
.todo-icon-btn:active { background: rgba(255,255,255,0.08); border-color: var(--border); }

/* ---------- Procedures: plain A to Z list ---------- */
.proc-plain-list { display: flex; flex-direction: column; background: var(--glass); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; margin: 10px 0 24px; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.proc-plain-row { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--border);
  color: #ffffff; font: inherit; font-size: 0.95rem; line-height: 1.3; padding: 12px 14px; cursor: pointer; overflow-wrap: anywhere; }
.proc-plain-row:last-child { border-bottom: 0; }
.proc-plain-row:active { background: rgba(201,243,29,0.12); }
.proc-plain-empty { color: var(--muted); padding: 14px; margin: 0; }
#panel-work-procedures .proc-toolbar .hint { color: #dbe5f5 !important; }

/* ---------- Work log: Parts Consumed rows on phone width ---------- */
/* Part picker gets the full row so the part number and name are readable; qty + Remove sit below. */
@media (max-width: 420px) {
  .part-row-fields { grid-template-columns: 1fr auto !important; }
  .part-row-fields .part-row-select { grid-column: 1 / -1; }
  .part-row-fields .part-row-qty { grid-column: 1; }
  .part-row-fields .part-row-remove { grid-column: 2 !important; }
}

/* ---------- Turbine status: one compact row above Scheduling ---------- */
.tower-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 10px; }
.tower-chip { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 40px; padding: 0 6px;
  border-radius: 12px; font: inherit; font-size: 0.95rem; font-weight: 800; cursor: pointer; color: #ffffff;
  background: var(--glass); border: 1px solid var(--border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); -webkit-tap-highlight-color: transparent; }
.tower-chip .tc-icon { width: 22px; height: 22px; flex: none; display: inline-flex; }
.tower-chip .tc-icon svg { width: 22px; height: 22px; fill: currentColor; }
.tower-chip .tc-name { white-space: nowrap; }
.tower-chip.online { color: #2fd27a; background: rgba(21,128,61,0.22); border-color: rgba(134,239,172,0.55); }
.tower-chip.online .tc-name { color: #d6fbe2; }
.tower-chip.offline { color: #ff5a5a; background: rgba(220,38,38,0.22); border: 2px solid #ff4d4d; }
.tower-chip.offline .tc-name { color: #ffd0d0; }
.tower-chip:active { filter: brightness(1.2); }

/* ---- Punch list pass: compact calendar + lit-up today ---- */
.sched-card { padding: 10px 10px 8px !important; }
.sched-today { flex-direction: row; align-items: baseline; gap: 8px; padding: 0 2px 6px; margin-bottom: 6px; }
.sched-today-label { font-size: 0.66rem; }
.sched-today-date { font-size: 1rem; font-weight: 700; }
.sched-card .sched-head { margin-bottom: 4px; }
.cal-nav { margin-bottom: 2px; }
.cal-month { font-size: 0.92rem; }
.cal-arrow { width: 40px; height: 32px; font-size: 1.1rem; }
.cal-grid { gap: 2px; }
.cal-dow span { font-size: 0.6rem; padding: 0 0 2px; }
.cal-cell { min-height: 34px; }
.cal-day { font-size: 0.84rem; border-radius: 8px; }
.cal-dot { width: 5px; height: 5px; margin-top: 2px; }
.cal-day.is-today,
.cal-day.is-today.has-notes { background: #c9f31d; border-color: #c9f31d; color: #0b1220; font-weight: 800;
  box-shadow: 0 0 0 2px rgba(201,243,29,0.25), 0 0 14px rgba(201,243,29,0.55); }
.cal-day.is-today:active { background: #b5dc12; }
.cal-day.is-today .cal-dot { background: #0b1220; box-shadow: none; }

/* Planned today list removed (no-planned pass) */
.sched-today-list { display: none !important; }

/* ---- syncq pass: status row with Sub + O&M, one-week calendar, offline sync pill ---- */
/* Six chips on one line at 390px: each chip takes its natural width plus an equal share. */
.tower-row { display: flex; flex-wrap: nowrap; gap: 5px; }
.tower-chip { flex: 1 1 auto; gap: 3px; padding: 0 4px; height: 38px; font-size: 0.8rem; letter-spacing: -0.01em; }
.tower-chip .tc-icon, .tower-chip .tc-icon svg { width: 18px; height: 18px; }
.tower-chip.tc-site .tc-icon, .tower-chip.tc-site .tc-icon svg { width: 17px; height: 17px; }
@media (max-width: 350px) {
  .tower-row { gap: 3px; }
  .tower-chip { padding: 0 2px; font-size: 0.72rem; }
  .tower-chip .tc-icon, .tower-chip .tc-icon svg { width: 15px; height: 15px; }
}

/* Week view: 7 cells, Mon to Sun */
.cal-month { background: none; border: 0; padding: 4px 8px; border-radius: 8px; font: inherit; font-weight: 700;
  font-size: 0.92rem; color: #ffffff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cal-month.is-other-week { color: #9fc2ff; text-decoration: underline; text-underline-offset: 3px; }
.cal-week .cal-cell { min-height: 42px; }
.cal-week .cal-day { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.95rem; }

/* Offline sync pill: neutral blue-gray, never yellow/peach/red */
.syncq-pill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border-radius: 999px;
  border: 1px solid rgba(159,194,255,0.40); background: rgba(120,140,170,0.20); color: #d7e2f2;
  font: inherit; font-size: 0.8rem; font-weight: 650; line-height: 1; white-space: nowrap; }
.syncq-pill svg { width: 15px; height: 15px; fill: #9fc2ff; flex: none; }
.syncq-pill--home { padding: 7px 12px; margin: 0 0 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.syncq-pill--home:active { background: rgba(120,140,170,0.32); }
.syncq-pill--home.hidden, .syncq-pill--home[hidden] { display: none !important; }
.syncq-pill--row { padding: 4px 9px; font-size: 0.72rem; margin: 2px 0 6px; }
.syncq-pill--row svg { width: 13px; height: 13px; }
.syncq-slot { display: block; }
.syncq-slot:empty { display: none; }

/* Work log list: location filter */
.log-filter-field { margin-bottom: 10px; }
