/* ── Reset / Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #0d0d1a;
    color: #e8eaf0;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Splash / Loading ─────────────────────────────────────────────────────── */
.splash {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100vh; background: #0d0d1a;
}
.splash-logo { font-size: 2rem; font-weight: 900; letter-spacing: -0.03em; color: #e8eaf0; }
.splash-sub  { color: #06c98a; font-size: 0.85rem; margin-top: 8px; font-weight: 600; }

/* ── App Shell ────────────────────────────────────────────────────────────── */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.app-header {
    background: #1a1a2e;
    padding: 0 20px;
    height: 52px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 2px solid #06c98a;
    flex-shrink: 0;
}
.app-header-left { display: flex; align-items: baseline; gap: 12px; }
.app-logo   { font-size: 1.25rem; font-weight: 900; letter-spacing: -0.03em; color: #e8eaf0; }
.app-tagline { font-size: 0.7rem; color: #06c98a; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.app-header-right { display: flex; align-items: center; gap: 10px; }
.header-user { font-size: 0.78rem; color: #888; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tab-nav {
    background: #181826;
    display: flex;
    border-bottom: 2px solid #23233a;
    flex-shrink: 0;
}
.tab-btn {
    background: none; border: none; cursor: pointer;
    color: #888; font-size: 0.88rem; font-weight: 600;
    padding: 14px 22px;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
    letter-spacing: 0.03em;
}
.tab-btn:hover { color: #e8eaf0; }
.tab-btn.active { color: #06c98a; border-bottom-color: #06c98a; }
.tab-body { flex: 1; overflow-y: auto; padding: 20px; }

/* ── Panel ────────────────────────────────────────────────────────────────── */
.panel {
    background: #181826;
    border: 1.5px solid #23233a;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
}
.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
    font-size: 1rem; font-weight: 700; color: #e8eaf0;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
button { cursor: pointer; font-family: inherit; }
.btn-primary { background: #06c98a; color: #0d0d1a; border: none; border-radius: 7px; padding: 8px 16px; font-weight: 700; font-size: 0.85rem; }
.btn-primary:hover { background: #04a871; }
.btn-success { background: #1565c0; color: white; border: none; border-radius: 7px; padding: 8px 16px; font-weight: 700; font-size: 0.85rem; }
.btn-success:hover { background: #0d47a1; }
.btn-danger  { background: #c62828; color: white; border: none; border-radius: 7px; padding: 8px 16px; font-weight: 700; font-size: 0.85rem; }
.btn-danger:hover  { background: #b71c1c; }
.btn-neutral { background: #23233a; color: #c8cadc; border: 1.5px solid #35355a; border-radius: 7px; padding: 8px 16px; font-weight: 600; font-size: 0.85rem; }
.btn-neutral:hover { background: #2e2e4a; }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; border-radius: 6px; }
.btn-xs { padding: 3px 8px; font-size: 0.72rem; border-radius: 5px; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 0.75rem; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.input, .select {
    background: #0d0d1a; border: 1.5px solid #35355a; border-radius: 7px;
    color: #e8eaf0; padding: 8px 11px; font-size: 0.88rem; font-family: inherit;
    outline: none;
}
.input:focus, .select:focus { border-color: #06c98a; }
.select option { background: #181826; }
.input-sm { padding: 5px 9px; font-size: 0.82rem; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.checkbox-label { display: flex; align-items: center; gap: 5px; font-size: 0.82rem; color: #c8cadc; cursor: pointer; }
.checkbox-label input[type=checkbox] { accent-color: #06c98a; width: 14px; height: 14px; }

/* ── Staff ────────────────────────────────────────────────────────────────── */
.staff-list { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-pill {
    background: #23233a; border: 1.5px solid #35355a; border-radius: 20px;
    padding: 5px 12px; display: flex; align-items: center; gap: 6px;
    font-size: 0.82rem; font-weight: 600; color: #e8eaf0;
    cursor: pointer; user-select: none;
    transition: border-color .15s, background .15s;
}
.staff-pill:hover { border-color: #06c98a; }
.staff-pill.unavail { opacity: .4; border-style: dashed; }
.staff-pill .pill-actions { display: flex; gap: 4px; }

/* ── Skill badges ─────────────────────────────────────────────────────────── */
.sk-badge {
    font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 10px;
    color: white; letter-spacing: 0.04em; white-space: nowrap;
}
.skb-Mowing    { background: #2e7d32; }
.skb-Whipping  { background: #1565c0; }
.skb-Spraying  { background: #6a1b9a; }
.skb-Gardening { background: #e65100; }
.skb-Tractor   { background: #4e342e; }

/* ── Job Cards ────────────────────────────────────────────────────────────── */
.job-card {
    background: #1e1e32; border: 1.5px solid #2e2e4e; border-radius: 10px;
    padding: 14px 16px; margin-bottom: 12px;
}
.job-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.job-card-title  { font-size: 1rem; font-weight: 800; color: #e8eaf0; }
.job-card-site   { font-size: 0.78rem; color: #888; margin-left: 8px; }
.job-card-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.job-card-meta   { font-size: 0.78rem; color: #666; margin-bottom: 8px; }
.job-card-crew   { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.assign-chip {
    background: #23233a; border: 1.5px solid #35355a; border-radius: 14px;
    padding: 3px 10px; font-size: 0.76rem; color: #c8cadc; display: flex; align-items: center; gap: 4px;
}
.assign-chip .rm { background: none; border: none; color: #666; font-size: 0.8rem; padding: 0 2px; cursor: pointer; }
.assign-chip .rm:hover { color: #ef5350; }
.job-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.job-dates { font-size: 0.72rem; color: #666; margin-top: 4px; }
.recur-badge { font-size: 0.68rem; background: #1a3a2a; color: #06c98a; border-radius: 10px; padding: 2px 8px; font-weight: 700; }
.done-badge  { font-size: 0.72rem; background: #1b3a1b; color: #4caf50; border-radius: 10px; padding: 2px 8px; font-weight: 700; }
.add-date-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* ── Task list ────────────────────────────────────────────────────────────── */
.task-lib { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.task-lib-chip {
    background: #23233a; border: 1px solid #35355a; border-radius: 14px;
    padding: 3px 10px; font-size: 0.76rem; color: #c8cadc; cursor: pointer;
}
.task-lib-chip:hover { border-color: #06c98a; color: #06c98a; }
.task-list { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.task-item { display: flex; align-items: center; gap: 6px; font-size: 0.84rem; color: #c8cadc; }
.task-item .rm { background: none; border: none; color: #555; font-size: 0.9rem; cursor: pointer; }
.task-item .rm:hover { color: #ef5350; }

/* ── Schedule ─────────────────────────────────────────────────────────────── */
.month-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.month-nav-btn { background: #23233a; border: 1.5px solid #35355a; color: #c8cadc; border-radius: 6px; padding: 5px 11px; font-size: 1rem; }
.month-nav-btn:hover { background: #2e2e4a; }
.month-sel {
    background: #0d0d1a; border: 1.5px solid #35355a; border-radius: 7px;
    color: #e8eaf0; padding: 6px 10px; font-size: 0.88rem; font-family: inherit; outline: none;
}
.week-row { margin-bottom: 16px; }
.week-row-label { font-size: 0.7rem; color: #555; margin-bottom: 6px; letter-spacing: 0.05em; text-transform: uppercase; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-day {
    background: #181826; border: 1px solid #23233a; border-radius: 8px;
    padding: 8px 7px; min-height: 72px; cursor: pointer;
}
.week-day.inactive { cursor: default; }
.week-day.inactive { opacity: .35; }
.week-day.today { border-color: #06c98a; }
.week-day.day-selected { border-color: #4a9eff; background: #141428; }
.week-day-header { cursor: pointer; user-select: none; }
.week-day-header:hover .week-day-date { color: #4a9eff; }
.week-day.day-selected .week-day-date { color: #4a9eff; }
.week-day-label { font-size: 0.68rem; color: #555; margin-bottom: 3px; font-weight: 600; }
.week-day-date  { font-size: 0.78rem; font-weight: 700; color: #c8cadc; margin-bottom: 5px; transition: color .12s; }

/* ── Day detail panel ─────────────────────────────────────────────────────── */
.day-panel-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 200;
}
.day-panel {
    position: fixed; top: 0; right: 0; width: 460px; max-width: 95vw;
    height: 100vh; background: #0f0f1e; border-left: 1px solid #2a2a4a;
    z-index: 201; display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.7);
}
.day-panel-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid #2a2a4a; background: #0d0d1a; flex-shrink: 0;
}
.day-panel-date  { font-size: 1rem; font-weight: 700; color: #e0e0f0; margin-bottom: 3px; }
.day-panel-stats { font-size: 0.75rem; color: #888; }
.day-panel-body  { flex: 1; overflow-y: auto; padding: 14px 16px; }

/* ── Day panel – staff roster ─────────────────────────────────────────────── */
.dp-roster-section {
    border-bottom: 1px solid #2a2a4a; padding-bottom: 14px; margin-bottom: 14px;
}
.dp-roster-label {
    font-size: 0.68rem; font-weight: 700; color: #06c98a;
    text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px;
}
.dp-roster-row   { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.dp-roster-name  {
    font-size: 0.82rem; font-weight: 600; color: #c8cadc;
    min-width: 108px; max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    flex-shrink: 0;
}
.dp-roster-time  { width: 80px; flex-shrink: 0; font-size: 0.82rem; }
.dp-roster-loc   { flex: 1; min-width: 0; font-size: 0.82rem; }
.dp-roster-phone {
    font-size: 0.9rem; flex-shrink: 0; text-decoration: none; opacity: 0.7;
    transition: opacity .12s;
}
.dp-roster-phone:hover { opacity: 1; }

.dp-job          { background: #1a1a30; border: 1px solid #2a2a4a; border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.dp-job.dp-job-done { background: #0e1e0e; border-color: #2e5a2e; }
.dp-job-top      { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dp-job-name     { font-weight: 700; font-size: 0.92rem; margin-bottom: 2px; }
.dp-job-site     { font-size: 0.72rem; color: #666; }
.dp-job-client   { font-size: 0.72rem; color: #06c98a; font-weight: 600; margin-top: 2px; }
.dp-row          { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.dp-crew-section { border-top: 1px solid #2a2a4a; padding-top: 10px; margin-top: 4px; }
.dp-crew-label   { font-size: 0.72rem; color: #888; margin-bottom: 6px; }
.dp-crew-chips   { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.dp-crew-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.day-job-chip {
    background: #1e1e32; border: 1px solid #2e2e4e; border-radius: 6px;
    padding: 4px 7px; margin-bottom: 4px; font-size: 0.72rem;
}
.day-job-chip.done { border-color: #2e7d32; background: #1a2e1a; }
.day-job-chip-name  { font-weight: 700; color: #c8cadc; display: flex; align-items: center; gap: 5px; }
.day-job-chip-site  { color: #666; font-size: 0.66rem; }
.day-job-chip-acts  { display: flex; gap: 4px; margin-top: 3px; }

/* ── Records ──────────────────────────────────────────────────────────────── */
/* ── Combined Records tab ────────────────────────────────────────────────── */
.rec2-topbar      { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.rec2-filters     { display: flex; gap: 4px; }
.rec2-filter-btn  { background: #1a1a30; border: 1px solid #2a2a4a; color: #888; font-size: 0.78rem;
                    padding: 4px 12px; border-radius: 20px; cursor: pointer; transition: all .15s; }
.rec2-filter-btn.active, .rec2-filter-btn:hover { background: #0a2a1a; border-color: #06c98a; color: #06c98a; }

.rec2-summary     { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; padding: 8px 14px;
                    background: #13132a; border: 1px solid #2a2a4a; border-radius: 8px; }
.rec2-sum-stat    { font-size: 0.78rem; color: #888; }
.rec2-sum-stat.done { color: #06c98a; }
.rec2-sum-stat.inc  { color: #ef5350; }
.rec2-sum-stat.qt   { color: #f9a825; }

.rec2-date-hdr    { display: flex; align-items: center; justify-content: space-between;
                    margin: 16px 0 6px; padding-bottom: 5px; border-bottom: 1px solid #23233a; }
.rec2-date-label  { font-size: 0.78rem; font-weight: 700; color: #06c98a; letter-spacing: 0.04em; text-transform: uppercase; }
.rec2-date-progress { font-size: 0.72rem; color: #666; }

/* Compact job row */
.rec2-row         { display: grid; grid-template-columns: 2fr 1.4fr 2fr auto;
                    align-items: center; gap: 10px;
                    background: #1a1a2e; border: 1px solid #2a2a42; border-radius: 8px;
                    padding: 9px 12px; margin-bottom: 3px; transition: background .12s; }
.rec2-row:hover   { background: #1e1e35; }
.rec2-row.rec2-done       { background: #0e1e0e; border-color: #2a4a2a; }
.rec2-row.rec2-incomplete { background: #1e0e0e; border-color: #4a2a2a; }
.rec2-row.rec2-expanded   { border-radius: 8px 8px 0 0; border-color: #4a4a8a; background: #181830; }

.rec2-left        { display: flex; align-items: center; gap: 10px; padding-left: 8px; }
.rec2-names       { display: flex; flex-direction: column; gap: 1px; }
.rec2-job-name    { font-weight: 700; font-size: 0.88rem; color: #e0e0f0; }
.rec2-site        { font-size: 0.7rem; color: #666; }
.rec2-client      { font-size: 0.7rem; color: #06c98a; font-weight: 600; }

.rec2-crew        { display: flex; flex-wrap: wrap; gap: 3px 8px; }
.rec2-crew-name   { font-size: 0.75rem; font-weight: 600; }

.rec2-status      { min-width: 0; }
.rec2-work-preview { font-size: 0.74rem; color: #aaa; margin-top: 3px; white-space: nowrap;
                     overflow: hidden; text-overflow: ellipsis; }

.rec2-actions     { display: flex; align-items: center; gap: 5px; justify-content: flex-end; }
.rec2-photo-badge { font-size: 0.7rem; color: #7eb8f7; background: #0a1a2e; border: 1px solid #1a3a5a;
                    border-radius: 10px; padding: 1px 6px; white-space: nowrap; }
.rec2-note-badge  { font-size: 0.7rem; color: #888; }
.rec2-expand-btn  { background: #1a1a3a; border: 1px solid #2a2a4a; color: #888; font-size: 0.7rem;
                    width: 26px; height: 26px; border-radius: 5px; cursor: pointer; display: flex;
                    align-items: center; justify-content: center; transition: all .15s; }
.rec2-expand-btn:hover, .rec2-expand-btn.open { border-color: #06c98a; color: #06c98a; background: #0a2a1a; }

/* Expanded detail panel */
.rec2-detail      { background: #13132a; border: 1px solid #4a4a8a; border-top: none;
                    border-radius: 0 0 8px 8px; padding: 16px; margin-bottom: 6px; }
.rec2-detail-section { margin-bottom: 20px; }
.rec2-detail-section:last-child { margin-bottom: 0; }
.rec2-section-label { font-size: 0.7rem; font-weight: 700; color: #06c98a; text-transform: uppercase;
                      letter-spacing: 0.06em; margin-bottom: 10px; }

.rec-group { margin-bottom: 20px; }
.rec-group-label { font-size: 0.78rem; color: #06c98a; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px; }
.rec-item {
    display: flex; align-items: flex-start; gap: 10px;
    background: #1e1e32; border: 1.5px solid #2e2e4e; border-radius: 8px;
    padding: 10px 13px; margin-bottom: 8px;
}
.rec-item.done { border-color: #2e5c2e; background: #1a2e1a; }
.rec-check { width: 17px; height: 17px; accent-color: #06c98a; margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.rec-item-body { flex: 1; }
.rec-item-name { font-weight: 700; font-size: 0.9rem; color: #e8eaf0; }
.rec-item-site { font-size: 0.76rem; color: #888; margin-left: 6px; }
.rec-item-crew { font-size: 0.76rem; color: #666; margin-top: 3px; }
.rec-item-done-lbl { font-size: 0.72rem; color: #4caf50; font-weight: 700; margin-top: 2px; }
.empty { color: #555; text-align: center; padding: 40px 0; font-size: 0.9rem; }

/* ── Report ───────────────────────────────────────────────────────────────── */
.rpt-wrap { padding: 0; overflow: hidden; }
.rpt-actions {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 14px 18px; background: #181826; border-bottom: 1.5px solid #23233a;
    flex-wrap: wrap; gap: 10px;
}
.rpt-actions-left  { display: flex; flex-direction: column; gap: 8px; }
.rpt-actions-right { display: flex; gap: 8px; align-items: flex-start; padding-top: 4px; }
.rpt-actions-title { font-size: 1rem; font-weight: 700; color: #e8eaf0; }
.rpt-actions-hint  { font-size: 0.72rem; color: #555; }
.rpt-preview-bg { background: #cdd0d8; padding: 24px; min-height: 200px; }
.rpt-doc {
    background: white; max-width: 740px; margin: 0 auto;
    padding: 36px 42px; box-shadow: 0 6px 28px rgba(0,0,0,.22);
    border-radius: 4px; color: #1a1a2e;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
.rpt-doc-hdr {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding-bottom: 16px; margin-bottom: 22px; border-bottom: 4px solid #1a1a2e;
}
.rpt-doc-company { font-size: 1.85rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; color: #1a1a2e; }
.rpt-doc-tagline { font-size: 0.72rem; color: #06c98a; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 5px; }
.rpt-doc-meta { text-align: right; }
.rpt-doc-meta-lbl    { font-size: 0.68rem; color: #aaa; text-transform: uppercase; letter-spacing: 0.07em; }
.rpt-doc-meta-date   { font-size: 0.9rem; font-weight: 700; color: #333; }
.rpt-doc-meta-period { font-size: 0.76rem; color: #888; margin-top: 2px; }
.rpt-doc-day { margin-bottom: 26px; page-break-inside: avoid; }
.rpt-doc-day-hd { background: #1a1a2e; color: white; padding: 9px 15px; border-radius: 7px; font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }
.rpt-doc-job { border: 1.5px solid #dde; border-radius: 9px; padding: 14px 16px; margin-bottom: 10px; page-break-inside: avoid; }
.rpt-doc-job-hd   { font-size: 1rem; font-weight: 800; margin-bottom: 5px; }
.rpt-doc-job-name { color: #1a1a2e; }
.rpt-doc-job-site { font-weight: 400; color: #888; font-size: 0.85rem; }
.rpt-doc-job-crew { font-size: 0.8rem; color: #555; padding-bottom: 9px; border-bottom: 1px solid #f0f2f5; margin-bottom: 10px; }
.rpt-doc-task { padding-left: 12px; border-left: 3px solid #06c98a; margin-bottom: 12px; page-break-inside: avoid; }
.rpt-doc-task-name { font-size: 0.86rem; font-weight: 700; color: #1b5e20; margin-bottom: 7px; }
.rpt-doc-photo-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.rpt-doc-photo { width: 220px; height: 155px; object-fit: cover; border-radius: 7px; border: 1px solid #e0e0e0; }
.rpt-thumb { position: relative; display: inline-block; }
.rpt-rm-btn {
    position: absolute; top: 4px; right: 4px;
    background: rgba(0,0,0,.55); color: white; border: none; border-radius: 50%;
    width: 20px; height: 20px; font-size: 0.7rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.rpt-add-btn {
    background: #f5f7fa; border: 1.5px dashed #bbb; border-radius: 7px;
    padding: 8px 14px; font-size: 0.78rem; color: #666; cursor: pointer; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 5px;
}
.rpt-add-btn:hover { background: #eef0f5; }
.rpt-doc-footer {
    margin-top: 40px; padding-top: 13px; border-top: 1.5px solid #eee;
    display: flex; justify-content: space-between; font-size: 0.68rem; color: #bbb;
}
.rpt-doc-empty { color: #555; text-align: center; padding: 50px; font-size: 0.9rem; }

/* ── Login ────────────────────────────────────────────────────────────────── */
.login-wrap {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100vh; background: #0d0d1a;
}
.login-card {
    background: #181826; border: 1.5px solid #23233a; border-radius: 14px;
    padding: 36px 40px; width: 340px; max-width: 95vw;
}
.login-logo    { font-size: 1.6rem; font-weight: 900; color: #e8eaf0; margin-bottom: 4px; }
.login-tagline { font-size: 0.72rem; color: #06c98a; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.login-version { font-size: 0.65rem; color: #444; margin-bottom: 22px; }
.login-error   { color: #ef5350; font-size: 0.82rem; margin-bottom: 12px; }
.login-field   { margin-bottom: 14px; }
.login-field label { display: block; font-size: 0.75rem; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }
.login-field .input { width: 100%; }
.login-submit { width: 100%; margin-top: 8px; padding: 11px; font-size: 0.95rem; }

/* ── Print / PDF ──────────────────────────────────────────────────────────── */
@media print {
    body.printing-report * { visibility: hidden; }
    body.printing-report .rpt-doc,
    body.printing-report .rpt-doc * { visibility: visible; }
    body.printing-report .rpt-doc {
        position: fixed; top: 0; left: 0; width: 100%;
        padding: 0; box-shadow: none; margin: 0; max-width: 100%;
    }
    body.printing-report .no-print { display: none !important; }
    body.printing-report .rpt-tmpl-hdr { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    body.printing-report .rpt-tmpl-services-tbl thead { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    body.printing-report .rpt-tmpl-sec-hd { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    body.printing-report .rpt-tmpl-whs-footer { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    body.printing-report .rpt-doc-photo { max-width: 48% !important; height: auto !important; }
}

/* ── Priority badges ──────────────────────────────────────────────────────── */
.prio-badge {
    font-size: 0.62rem; font-weight: 800; border-radius: 3px;
    padding: 1px 4px; margin-right: 4px; flex-shrink: 0; letter-spacing: 0.04em;
}
.prio-badge-5 { background: #c62828; color: #fff; }
.prio-badge-4 { background: #e65100; color: #fff; }
.prio-badge-3 { background: #f9a825; color: #1a1a2e; }
.prio-badge-2 { background: #00695c; color: #fff; }
.prio-badge-1 { background: #444; color: #ccc; }

/* Left border accent per priority on job chips */
.day-job-chip.prio-5 { border-left: 3px solid #c62828; }
.day-job-chip.prio-4 { border-left: 3px solid #e65100; }
.day-job-chip.prio-3 { border-left: 3px solid #f9a825; }
.day-job-chip.prio-2 { border-left: 3px solid #00695c; }
.day-job-chip.prio-1 { border-left: 3px solid #444; }

.day-job-chip-top { display: flex; align-items: center; margin-bottom: 2px; }

/* ── Drag and drop ────────────────────────────────────────────────────────── */
.day-job-chip[draggable="true"] { cursor: grab; }
.day-job-chip[draggable="true"]:active { cursor: grabbing; opacity: .7; }
.week-day.drop-target {
    background: #0a2a1a !important;
    outline: 2px dashed #06c98a;
    outline-offset: -2px;
}

/* ── Rain-out button ──────────────────────────────────────────────────────── */
.rainout-btn {
    position: absolute; top: 4px; right: 4px;
    background: transparent; border: none; font-size: 1.3rem;
    cursor: pointer; opacity: 0; transition: opacity .15s;
    line-height: 1; padding: 2px; color: #000;
}
.week-day:hover .rainout-btn { opacity: 1; }
.week-day { position: relative; }

/* ── Rain-out toast ───────────────────────────────────────────────────────── */
.rainout-toast {
    position: relative; background: #0d2a1a; border: 1.5px solid #06c98a;
    border-radius: 10px; padding: 14px 36px 14px 16px; margin-bottom: 14px;
}
.rainout-toast-title { font-size: 0.82rem; font-weight: 700; color: #06c98a; margin-bottom: 8px; }
.rainout-toast-row   { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; margin-bottom: 3px; }
.rainout-job         { color: #e8eaf0; font-weight: 600; }
.rainout-arrow       { color: #06c98a; }
.rainout-date        { color: #aaa; }

/* ── Report visit photos ──────────────────────────────────────────────────── */
.rpt-visit-photos {
    display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px;
    padding-top: 10px; border-top: 1px solid #eee;
}
.rpt-photo-slot { flex: 1; min-width: 200px; }
.rpt-photo-slot-label {
    font-size: 0.74rem; font-weight: 700; color: #888;
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}

/* ── Admin Tab ────────────────────────────────────────────────────────────── */
.admin-skill-grid {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
}
.admin-skill-card {
    background: #181826; border: 1.5px solid #23233a; border-radius: 10px;
    padding: 10px 14px; display: flex; align-items: center; gap: 10px; min-width: 200px;
}
.admin-skill-swatch { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.admin-skill-name   { font-weight: 700; font-size: 0.88rem; flex: 1; }
.admin-skill-usage  { font-size: 0.72rem; color: #666; white-space: nowrap; }
.admin-skill-actions { display: flex; gap: 5px; flex-shrink: 0; }

.admin-form-box {
    background: #0f0f1e; border: 1.5px solid #23233a; border-radius: 10px;
    padding: 16px 20px; margin-top: 14px;
}
.admin-form-title { font-weight: 700; font-size: 0.9rem; color: #06c98a; margin-bottom: 12px; }

.admin-staff-table { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.admin-staff-header {
    display: grid; grid-template-columns: 1fr 130px 1fr 120px;
    padding: 6px 10px; font-size: 0.72rem; color: #666; text-transform: uppercase;
    letter-spacing: 0.06em; border-bottom: 1px solid #23233a;
}
.admin-staff-row {
    display: grid; grid-template-columns: 1fr 130px 1fr 120px;
    align-items: center; padding: 8px 10px; border-radius: 7px;
    transition: background .12s;
}
.admin-staff-row:hover { background: #181826; }
.admin-staff-row.unavail-row { opacity: .5; }
.admin-staff-name   { font-weight: 600; }
.inline-name-label  { cursor: pointer; border-bottom: 1px dashed transparent; transition: border-color 0.15s; }
.inline-name-label:hover { border-bottom-color: #aaa; }
.inline-name-input  { width: 160px; font-size: 0.9rem; padding: 1px 4px; }
.admin-staff-skills { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-staff-acts   { display: flex; gap: 5px; }
.admin-staff-row.row-expanded { border-radius: 7px 7px 0 0; background: #181826; }
.admin-inline-form {
    background: #13132a; border: 1px solid #2a2a50; border-top: 2px solid #06c98a;
    border-radius: 0 0 8px 8px; padding: 16px 16px 12px; margin-bottom: 4px;
}

.avail-toggle {
    border: none; border-radius: 20px; padding: 3px 10px; font-size: 0.74rem;
    font-weight: 700; cursor: pointer; white-space: nowrap;
}
.avail-on  { background: #063a28; color: #06c98a; }
.avail-off { background: #3a0606; color: #ef5350; }

/* ── Report – top bar ────────────────────────────────────────────────────── */
.rpt-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px; background: #181826; border-bottom: 1.5px solid #23233a;
    flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.rpt-period-label {
    font-size: 0.95rem; font-weight: 700; color: #e8eaf0;
    min-width: 220px; text-align: center;
}
.rpt-mode-toggle {
    display: inline-flex; border: 1.5px solid #35355a; border-radius: 7px; overflow: hidden;
}
.rpt-mode-toggle button {
    background: none; border: none; color: #888; font-size: 0.82rem; font-weight: 700;
    padding: 6px 16px; cursor: pointer; transition: all .12s;
}
.rpt-mode-toggle button.active { background: #06c98a; color: #0d0d1a; }
.rpt-mode-toggle button:hover:not(.active) { background: #23233a; color: #e8eaf0; }

/* ── Report – client selector row ────────────────────────────────────────── */
.rpt-selector-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 12px;
}
.rpt-client-sel { flex: 1; min-width: 200px; max-width: 340px; }

/* ── Report options bar ───────────────────────────────────────────────────── */
.rpt-options {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
    padding: 10px 18px; background: #181826; border-radius: 10px;
    margin-bottom: 12px; border: 1px solid #23233a;
}
.rpt-options-label { font-size: 0.74rem; color: #888; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.rpt-opt-check {
    display: flex; align-items: center; gap: 6px; font-size: 0.82rem; cursor: pointer;
    color: #c0c4d8;
}
.rpt-opt-check input { accent-color: #06c98a; width: 14px; height: 14px; cursor: pointer; }

.rpt-doc-summary {
    font-size: 0.82rem; color: #666; margin-bottom: 18px; padding: 8px 14px;
    background: #f8f9fb; border-radius: 6px; border: 1px solid #e8e8e8;
}
/* ── AI client summary ─────────────────────────────────────────────────────── */
.rpt-ai-summary-block { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.rpt-ai-gen-btn { white-space: nowrap; }
.rpt-ai-generating { font-size: 0.82rem; color: #888; font-style: italic; padding: 6px 0; }
.rpt-ai-summary {
    flex: 1; background: #f0faf6; border: 1px solid #06c98a44;
    border-left: 4px solid #06c98a; border-radius: 6px;
    padding: 12px 16px; position: relative;
}
.rpt-ai-summary-text { font-size: 0.88rem; color: #1a1a2e; line-height: 1.6; font-style: italic; }
.rpt-ai-regen {
    position: absolute; top: 8px; right: 8px;
    font-size: 0.68rem; opacity: 0.6;
}
.rpt-ai-regen:hover { opacity: 1; }
/* Printed version — shown in PDF/Word, hidden on screen */
.rpt-ai-summary-print {
    font-size: 0.88rem; color: #333; line-height: 1.65; font-style: italic;
    margin-bottom: 20px; padding: 12px 16px;
    border-left: 3px solid #1a1a2e; background: #f8f9fb;
    border-radius: 4px;
}

/* ── Report Template (matches PDF template style) ─────────────────────────── */
.rpt-doc-tmpl { padding: 0 !important; overflow: visible; }

.rpt-tmpl-hdr {
    background: #1c1c1c; color: #fff;
    padding: 22px 28px 20px; margin-bottom: 0;
}
.rpt-tmpl-the {
    font-size: 0.78rem; font-weight: 400; color: #bbb;
    letter-spacing: 2px; text-transform: uppercase;
}
.rpt-tmpl-company {
    font-size: 2.5rem; font-weight: 900; line-height: 1; letter-spacing: -1.5px; color: #fff;
}
.rpt-tmpl-subtitle {
    font-size: 0.82rem; color: #ccc; margin-top: 8px; letter-spacing: 0.5px;
}
.rpt-tmpl-accent { color: #8bc34a; }

.rpt-tmpl-info-tbl {
    width: 100%; border-collapse: collapse; margin-bottom: 0;
}
.rpt-tmpl-info-lbl {
    background: #5b8c3e; color: #fff; font-weight: 700; padding: 9px 16px;
    font-size: 0.8rem; white-space: nowrap; width: 200px;
    border: 1px solid #4a7432;
}
.rpt-tmpl-info-val {
    padding: 9px 16px; font-size: 0.88rem; font-weight: 600; color: #1a1a1a;
    border: 1px solid #ddd;
}

.rpt-tmpl-sec-hd {
    background: #e0e0e0; color: #222; font-weight: 700; font-size: 0.76rem;
    text-transform: uppercase; letter-spacing: 0.7px;
    padding: 5px 14px; margin: 0;
}
.rpt-tmpl-site-name {
    font-weight: 700; font-size: 0.8rem; color: #1a1a1a;
    padding: 5px 14px 2px; background: #f5f5f5;
}

.rpt-tmpl-services-tbl {
    width: 100%; border-collapse: collapse; margin-bottom: 0; font-size: 0.79rem;
}
.rpt-tmpl-services-tbl thead tr { background: #5b8c3e; }
.rpt-tmpl-services-tbl thead th {
    color: #fff; font-weight: 700; padding: 7px 12px;
    text-align: left; font-size: 0.77rem; border: 1px solid #4a7432;
}
.rpt-tmpl-services-tbl tbody tr:nth-child(even) { background: #f7f7f7; }
.rpt-tmpl-services-tbl td {
    padding: 7px 12px; border: 1px solid #e0e0e0; vertical-align: top; color: #333;
}
.rpt-tmpl-td-comp { text-align: center; width: 80px; font-weight: 700; }
.rpt-tmpl-td-next { white-space: nowrap; width: 120px; }
.rpt-tmpl-td-task { font-weight: 600; }
.rpt-tmpl-td-notes { color: #555; }
.rpt-tmpl-yes { color: #2e7d32; }
.rpt-tmpl-no  { color: #c62828; }
.rpt-tmpl-pending { color: #888; }
.rpt-tmpl-row-inc td { background: #fff5f5 !important; }

.rpt-tmpl-task-row td { background: #fafafa; padding: 3px 12px; border: 1px solid #eee; }
.rpt-tmpl-task-list { display: flex; flex-wrap: wrap; gap: 6px; }
.rpt-task-done { font-size: 0.75rem; color: #2e7d32; }
.rpt-task-pend { font-size: 0.75rem; color: #888; }

.rpt-tmpl-observations {
    margin: 4px 0 4px 24px; padding: 0;
    font-size: 0.8rem; color: #333; line-height: 1.7;
}
.rpt-tmpl-observations li { margin-bottom: 2px; }
.rpt-tmpl-obs-placeholder { color: #999; font-style: italic; }

.rpt-tmpl-corr-tbl {
    width: 100%; border-collapse: collapse; margin: 0; font-size: 0.79rem;
}
.rpt-tmpl-corr-lbl {
    font-weight: 700; color: #1a1a1a; padding: 8px 14px;
    border: 1px solid #ddd; white-space: nowrap; width: 240px;
    background: #fafafa;
}
.rpt-tmpl-corr-val {
    padding: 8px 14px; border: 1px solid #ddd; color: #555; min-height: 32px;
}

.rpt-tmpl-whs-tbl { width: 100%; border-collapse: collapse; font-size: 0.79rem; }
.rpt-tmpl-whs-tbl td { padding: 7px 14px; border: 1px solid #ddd; color: #333; }
.rpt-tmpl-whs-yes {
    text-align: center; font-weight: 900; color: #2e7d32; width: 70px;
}
.rpt-tmpl-whs-footer {
    background: #5b8c3e; color: #fff; font-size: 0.78rem;
    padding: 9px 16px; font-weight: 600; text-align: center;
}

.rpt-doc-task-list { margin-top: 6px; }
.rpt-task-checkbox {
    display: inline-flex; align-items: center; justify-content: center;
    width: 17px; height: 17px; border: 1.5px solid #1b5e20; border-radius: 4px;
    font-size: 0.68rem; color: #1b5e20; margin-right: 5px; flex-shrink: 0;
}
.rpt-task-checkbox.checked { background: #1b5e20; color: #fff; }

/* ── Calendar day + button ────────────────────────────────────────────────── */
.day-add-btn {
    width: 100%; margin-top: 6px; border: 1.5px dashed #35355a; border-radius: 6px;
    background: transparent; color: #35355a; font-size: 1.1rem; line-height: 1;
    padding: 3px 0; cursor: pointer; transition: border-color .12s, color .12s;
}
.day-add-btn:hover { border-color: #06c98a; color: #06c98a; }
.day-assign-form {
    display: flex; align-items: center; gap: 4px; margin-top: 5px; flex-wrap: wrap;
}
.day-assign-form .select { flex: 1; min-width: 0; font-size: 0.72rem; }

/* ── Blazor error UI ──────────────────────────────────────────────────────── */
#blazor-error-ui {
    background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem;
    position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ── Undo snackbar ────────────────────────────────────────────────────────── */
.undo-snack {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #0d2a1a; border: 1.5px solid #06c98a; border-radius: 10px;
    padding: 10px 14px; margin-bottom: 14px; font-size: 0.82rem; color: #c8cadc;
}
.undo-snack .rm { background: none; border: none; color: #666; font-size: 1rem; cursor: pointer; margin-left: auto; }
.undo-snack .rm:hover { color: #ef5350; }

/* ── Ghost chips (rescheduled-away entries on the original date) ─────────── */
.ghost-chip {
    opacity: .45; border-style: dashed !important; cursor: default !important;
    background: #111122 !important; filter: grayscale(60%);
}
.ghost-name { color: #666 !important; font-style: italic; }
.ghost-rescheduled-label { font-size: 0.62rem; color: #5588aa; margin-top: 2px; }

/* ── RES badge — shown on job chip at its NEW (rescheduled-to) date ────────── */
.day-chip-res {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em;
    color: #f5a623; background: #2a1a00; border: 1px solid #f5a62344;
    border-radius: 3px; padding: 1px 5px; margin-top: 3px;
    display: inline-block; white-space: nowrap;
}

/* ── Per-day crew badge on calendar chip ──────────────────────────────────── */
.day-chip-crew {
    font-size: 0.6rem; font-weight: 700;
    border-radius: 3px; padding: 1px 5px; margin-top: 3px;
    display: inline-block;
}
.day-chip-crew.crew-full    { background: #0a2a1a; color: #06c98a; }
.day-chip-crew.crew-partial { background: #2a1a00; color: #f5a623; }
.day-chip-crew.crew-empty   { background: #1a0808; color: #ef5350; }

/* ── Rain-out inline confirmation ─────────────────────────────────────────── */
.rainout-confirm {
    background: #1a0d0d; border: 1.5px solid #c62828; border-radius: 8px;
    padding: 8px 10px; margin-bottom: 6px; font-size: 0.76rem;
}

/* ── Client name on schedule chip ─────────────────────────────────────────── */
.day-job-chip-client { font-size: 0.63rem; color: #06c98a; margin-top: 1px; font-weight: 600; }
.day-job-chip-est    { font-size: 0.62rem; color: #888; margin-top: 1px; }
.dp-job-est          { font-size: 0.74rem; color: #aaa; margin-top: 2px; }

/* ── Clients Tab ──────────────────────────────────────────────────────────── */
.client-grid { display: flex; flex-direction: column; gap: 8px; }
.client-card {
    background: #1e1e32; border: 1.5px solid #2e2e4e; border-radius: 10px; overflow: hidden;
}
.client-card.expanded { border-color: #06c98a; }
.client-card-header {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    cursor: pointer; user-select: none; transition: background .12s;
}
.client-card-header:hover { background: #23233a; }
.client-card-name    { font-weight: 800; font-size: 0.96rem; color: #e8eaf0; }
.client-card-contact { font-size: 0.76rem; color: #888; margin-top: 2px; }
.client-card-stats   { display: flex; gap: 10px; margin-left: auto; }
.client-card-stats span { font-size: 0.74rem; color: #666; }
.client-card-acts    { display: flex; gap: 5px; flex-shrink: 0; }
.client-info-row {
    display: flex; flex-wrap: wrap; gap: 14px; padding: 8px 16px 10px;
    font-size: 0.8rem; color: #aaa; border-top: 1px solid #23233a;
    background: #181826;
}
.client-jobs-list { padding: 8px 14px 12px; border-top: 1px solid #23233a; }
.client-job-row {
    display: flex; align-items: center; gap: 8px; padding: 6px 4px;
    border-bottom: 1px solid #23233a; font-size: 0.82rem;
}
.client-job-row:last-child { border-bottom: none; }

/* ── Jobs Tab – filter bar ────────────────────────────────────────────────── */
.jobs-filter-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-bottom: 14px;
}
.jobs-search { flex: 1; min-width: 160px; max-width: 280px; }

/* ── Jobs Tab – compact table ─────────────────────────────────────────────── */
.job-table { display: flex; flex-direction: column; gap: 3px; }
.job-row {
    display: grid;
    grid-template-columns: 44px 1fr 0.8fr 0.8fr 90px 70px 76px;
    align-items: center; gap: 6px;
    background: #1e1e32; border: 1.5px solid #2e2e4e; border-radius: 8px;
    padding: 9px 12px; cursor: pointer; transition: background .12s, border-color .12s;
    font-size: 0.84rem;
}
.job-row:hover { background: #23233a; border-color: #35355a; }
.job-row.expanded { border-color: #06c98a; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.job-row-prio   { flex-shrink: 0; }
.job-row-name   { font-weight: 700; color: #e8eaf0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-row-site   { color: #888; font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-row-client { color: #06c98a; font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-row-dates  { color: #666; font-size: 0.76rem; text-align: center; }
.job-row-crew   { color: #888; font-size: 0.76rem; text-align: center; }
.job-row-acts   { display: flex; gap: 4px; justify-content: flex-end; }

/* ── Jobs Tab – expanded detail ───────────────────────────────────────────── */
.job-detail {
    background: #181826; border: 1.5px solid #06c98a;
    border-top: none; border-radius: 0 0 8px 8px;
    padding: 12px 14px; margin-bottom: 6px;
}
.job-detail-row {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    margin-bottom: 10px; font-size: 0.82rem;
}
.job-detail-dates { margin-top: 4px; }

/* ── Date chips + tools ───────────────────────────────────────────────────── */
.date-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: #23233a; border: 1px solid #35355a; border-radius: 12px;
    padding: 2px 8px; font-size: 0.74rem; color: #c8cadc;
}
.date-chip .rm { background: none; border: none; color: #666; font-size: 0.78rem; cursor: pointer; padding: 0 1px; }
.date-chip .rm:hover { color: #ef5350; }
.date-tools { margin-top: 8px; }
.date-range-panel {
    background: #0f0f1e; border: 1px solid #35355a; border-radius: 8px;
    padding: 12px 14px; margin-top: 8px;
}

/* ── Day-of-week toggle buttons ───────────────────────────────────────────── */
.day-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 4px 10px; border-radius: 14px; font-size: 0.76rem; font-weight: 700;
    cursor: pointer; user-select: none;
    background: #23233a; border: 1.5px solid #35355a; color: #888;
    transition: background .12s, border-color .12s, color .12s;
}
.day-toggle.on { background: #063a28; border-color: #06c98a; color: #06c98a; }

/* ── Report – client section heading ──────────────────────────────────────── */
.rpt-client-section-hd {
    background: linear-gradient(90deg, #1a1a2e 0%, #23233a 100%);
    color: #06c98a; font-weight: 800; font-size: 0.96rem;
    padding: 8px 14px; border-radius: 7px; margin-bottom: 10px; margin-top: 20px;
    border-left: 4px solid #06c98a;
}

/* ── Report – rescheduled note ────────────────────────────────────────────── */
.rpt-reschedule-note {
    font-size: 0.74rem; color: #888; font-style: italic;
    padding: 4px 10px; background: #f5f7fa; border-radius: 5px;
    margin-bottom: 6px; border-left: 2px solid #bbb;
}

/* ── Records Tab – note UI ────────────────────────────────────────────────── */
.rec-item.incomplete { border-color: #5c2a2a; background: #1e1010; }
.rec-tag-incomplete {
    font-size: 0.68rem; font-weight: 700; color: #ef5350;
    background: #2a0e0e; border-radius: 10px; padding: 1px 7px;
}
.rec-tag-quote {
    font-size: 0.68rem; font-weight: 700; color: #f9a825;
    background: #2a1e00; border-radius: 10px; padding: 1px 7px;
}
.rec-work-done {
    font-size: 0.78rem; color: #aaa; margin-top: 3px; font-style: italic;
}
.rec-recommendations {
    font-size: 0.75rem; color: #06c98a; margin-top: 3px;
}
.rec-note-btn {
    background: none; border: 1px solid #35355a; border-radius: 6px;
    color: #666; font-size: 0.9rem; padding: 3px 7px; cursor: pointer;
    flex-shrink: 0; align-self: flex-start; margin-left: 8px; transition: all .12s;
}
.rec-note-btn:hover, .rec-note-btn.active { border-color: #06c98a; color: #06c98a; background: #0a2a1a; }
.rec-note-form {
    background: #0f0f1e; border: 1.5px solid #06c98a; border-top: none; border-radius: 0 0 10px 10px;
    padding: 14px 16px; margin-bottom: 10px;
}
.rec-note-title {
    font-size: 0.78rem; font-weight: 700; color: #06c98a;
    margin-bottom: 12px; letter-spacing: 0.03em;
}
/* Make rec-item a flex container to accommodate the note button */
.rec-item { display: flex; align-items: flex-start; }

/* ── Report – view mode toggle ────────────────────────────────────────────── */
.rpt-view-toggle {
    display: inline-flex; border: 1.5px solid #35355a; border-radius: 6px; overflow: hidden;
}
.rpt-view-toggle button {
    background: none; border: none; color: #888; font-size: 0.78rem; font-weight: 700;
    padding: 4px 12px; cursor: pointer; transition: all .12s;
}
.rpt-view-toggle button.active { background: #06c98a; color: #0d0d1a; }
.rpt-view-toggle button:hover:not(.active) { background: #23233a; color: #e8eaf0; }

/* ── Report – client block heading ────────────────────────────────────────── */
.rpt-client-block-hd {
    font-size: 1.15rem; font-weight: 900; color: #1a1a2e;
    background: linear-gradient(90deg, #e8f5ee 0%, #f5f5f5 100%);
    padding: 10px 16px; border-radius: 7px; margin: 20px 0 10px;
    border-left: 5px solid #06c98a;
}
.rpt-client-separator {
    border-top: 2px solid #eee; margin: 24px 0;
}

/* ── Report – site heading ────────────────────────────────────────────────── */
.rpt-site-section { margin-bottom: 16px; }
.rpt-site-hd {
    font-size: 0.82rem; font-weight: 700; color: #555;
    text-transform: uppercase; letter-spacing: 0.07em;
    padding: 5px 0 5px 14px; border-left: 3px solid #ccc;
    margin-bottom: 8px;
}

/* ── Report – job heading (client view) ───────────────────────────────────── */
.rpt-job-section { margin-bottom: 14px; padding-left: 14px; }
.rpt-job-hd {
    font-size: 0.95rem; font-weight: 800; color: #1a1a2e;
    margin-bottom: 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
}

/* ── Report – visit row (client view) ─────────────────────────────────────── */
.rpt-visit-row {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 6px 8px; border-radius: 6px; margin-bottom: 4px;
    border-left: 3px solid #eee;
}
.rpt-visit-row.done       { border-left-color: #06c98a; background: #f5fdf9; }
.rpt-visit-row.incomplete { border-left-color: #ef5350; background: #fff5f5; }
.rpt-status-badge {
    font-size: 0.75rem; font-weight: 800; width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; flex-shrink: 0; margin-top: 1px;
}
.rpt-status-badge.done       { background: #06c98a; color: #fff; }
.rpt-status-badge.incomplete { background: #ef5350; color: #fff; }
.rpt-status-badge.pending    { border: 1.5px solid #ccc; color: #ccc; }
.rpt-visit-body    { flex: 1; font-size: 0.82rem; }
.rpt-visit-date    { font-weight: 700; color: #333; margin-bottom: 2px; }
.rpt-visit-work    { color: #444; font-style: italic; margin-bottom: 2px; }
.rpt-visit-incomplete { color: #c62828; font-size: 0.78rem; margin-bottom: 2px; }
.rpt-visit-crew    { font-size: 0.76rem; color: #888; margin-bottom: 2px; }

/* ── Report – section blocks ──────────────────────────────────────────────── */
.rpt-section { margin-top: 16px; page-break-inside: avoid; }
.rpt-section-title {
    font-size: 0.78rem; font-weight: 800; padding: 6px 12px;
    border-radius: 5px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em;
}
.rpt-section-incomplete { background: #fff3e0; color: #e65100; border-left: 4px solid #e65100; }
.rpt-section-rec        { background: #e8f5e9; color: #1b5e20; border-left: 4px solid #1b5e20; }
.rpt-section-quote      { background: #fffde7; color: #f57f17; border-left: 4px solid #f57f17; }
.rpt-section-item {
    font-size: 0.82rem; color: #333; padding: 5px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.rpt-section-item:last-child { border-bottom: none; }
.rpt-section-item-name { font-weight: 600; }
.rpt-section-item-meta { font-size: 0.76rem; color: #888; margin-top: 1px; }

/* ── Report – internal note indicator ────────────────────────────────────── */
.rpt-internal-note {
    font-size: 0.74rem; color: #aaa; font-style: italic;
    background: #f0f2f5; padding: 3px 8px; border-radius: 4px; margin-top: 4px;
}

/* ── Schedule – unscheduled alert ─────────────────────────────────────────── */
.unscheduled-alert {
    background: #2a1e00; border: 1.5px solid #f9a825; border-radius: 8px;
    padding: 8px 14px; margin-bottom: 14px; font-size: 0.8rem;
    color: #f9a825; font-weight: 600;
}

/* ── Schedule – week summary bar ──────────────────────────────────────────── */
.week-summary {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
    margin-bottom: 6px; padding: 4px 2px;
}
.week-sum-label {
    font-size: 0.7rem; color: #555; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase;
}
.week-sum-stat  { font-size: 0.72rem; color: #888; }
.week-sum-done  { font-size: 0.72rem; color: #06c98a; font-weight: 700; }
.week-sum-ghost { font-size: 0.72rem; color: #5588aa; }
.week-sum-empty { font-size: 0.7rem; color: #333; font-style: italic; }

/* ── Schedule – day capacity indicator ────────────────────────────────────── */
.day-capacity {
    font-size: 0.62rem; font-weight: 700; border-radius: 4px;
    padding: 1px 5px; margin-bottom: 4px; display: inline-block;
}
.day-capacity.cap-ok   { background: #0a2a1a; color: #06c98a; }
.day-capacity.cap-over { background: #2a0a0a; color: #ef5350; }

/* ── Photo remove button (shown on thumb hover) ───────────────────────────── */
.photo-remove-btn {
    position: absolute; top: 4px; right: 4px;
    background: rgba(239,83,80,0.85); color: #fff;
    border: none; border-radius: 50%;
    width: 22px; height: 22px; font-size: 0.68rem;
    cursor: pointer; display: none;
    align-items: center; justify-content: center; padding: 0;
    line-height: 1;
}
.rpt-thumb:hover .photo-remove-btn { display: flex; }

/* ── AI generate button in note form ─────────────────────────────────────── */
.ai-gen-btn {
    flex-shrink: 0; white-space: nowrap; min-width: 70px;
    font-size: 0.8rem; padding: 6px 10px;
}
.ai-gen-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Skill count grid (job form) ──────────────────────────────────────────── */
.skill-count-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.skill-count-row  { display: flex; align-items: center; gap: 6px; }
.skill-count-input {
    width: 52px; text-align: center; padding: 3px 6px;
    font-size: 0.85rem; border-radius: 5px;
}

/* ── Employment type badges ───────────────────────────────────────────────── */
/* ── Assign chip role label ───────────────────────────────────────────────── */
.assign-chip { display: inline-flex; align-items: center; gap: 4px; }
.assign-chip-name { font-size: 0.82rem; }
.assign-chip-role {
    font-size: 0.65rem; font-weight: 700;
    padding: 1px 5px; border-radius: 3px;
    color: #fff; opacity: 0.92;
}
.assign-chip-role-sel {
    font-size: 0.65rem; font-weight: 700;
    padding: 1px 4px; border-radius: 3px;
    color: #fff; border: none; cursor: pointer;
    max-width: 90px; outline: none;
}
.assign-chip-role-sel option { background: #1a1a2e; color: #c8cadc; }

.emp-type-badge { font-size: 0.68rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; display: inline-block; margin-top: 2px; }
.emp-ft  { background: #0a2a1a; color: #06c98a; }
.emp-cas { background: #1a1a35; color: #8888cc; }

/* ── Works Completed table ───────────────────────────────────────────────── */
.ct-wrap         { overflow-x: auto; margin-top: 12px; border-radius: 10px; border: 1px solid #23233a; }
.ct-table        { border-collapse: collapse; min-width: 100%; font-size: 0.82rem; }
.ct-date-hdr     { background: #0d0d1a; color: #888; font-size: 0.7rem; text-transform: uppercase;
                   letter-spacing: 0.06em; padding: 10px 14px; min-width: 110px; white-space: nowrap;
                   position: sticky; left: 0; z-index: 2; border-right: 1px solid #23233a; border-bottom: 2px solid #23233a; }
.ct-job-hdr      { background: #2a5200; padding: 10px 14px; min-width: 200px; max-width: 260px;
                   border-left: 1px solid #1a3a00; border-bottom: 2px solid #23233a; vertical-align: top; }
.ct-job-name     { color: #b8ff40; font-weight: 700; font-size: 0.85rem; line-height: 1.3; }
.ct-job-site     { color: #7acc30; font-size: 0.72rem; margin-top: 2px; }

.ct-date-cell    { background: #0d0d1a; padding: 8px 14px; vertical-align: top; white-space: nowrap;
                   position: sticky; left: 0; z-index: 1; border-right: 1px solid #23233a; border-bottom: 1px solid #181830; }
.ct-date-num     { font-size: 0.8rem; color: #ccc; font-weight: 600; }
.ct-date-day     { font-size: 0.7rem; color: #06c98a; margin-top: 1px; }

.ct-cell         { padding: 8px 12px; vertical-align: top; border-left: 1px solid #181830; border-bottom: 1px solid #181830; min-width: 180px; }
.ct-cell.ct-done { background: #0a150a; }
.ct-work         { color: #e0e0e0; font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; line-height: 1.35; }
.ct-crew         { display: flex; flex-wrap: wrap; gap: 2px 6px; margin-top: 2px; }
.ct-name         { font-size: 0.78rem; font-weight: 600; }
.ct-role-tag     { font-size: 0.72rem; opacity: 0.75; margin-right: 4px; }
.ct-incomplete   { font-size: 0.72rem; color: #f5a623; margin-top: 4px; }
.ct-quote-flag   { font-size: 0.72rem; color: #7eb8f7; margin-top: 2px; }

.ct-weekend .ct-date-cell { background: #0a0a18; }
.ct-weekend .ct-cell      { background: #09090f; }

/* ── Admin staff table — extra columns ───────────────────────────────────── */
.admin-staff-table .admin-staff-header,
.admin-staff-table .admin-staff-row {
    grid-template-columns: 1.8fr 1.2fr 1fr 1.2fr 2fr 1fr;
}

/* ── Header — admin badge ─────────────────────────────────────────────────── */
.header-admin-badge {
    font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em;
    background: #06c98a; color: #0d0d1a;
    padding: 2px 7px; border-radius: 4px; text-transform: uppercase;
    margin-right: 2px;
}

/* ── User management table ────────────────────────────────────────────────── */
.user-table { margin-top: 8px; }
.user-table-header,
.user-table-row {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.7fr 2fr 1fr;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
}
.user-table-header {
    font-size: 0.68rem; font-weight: 700; color: #555;
    text-transform: uppercase; letter-spacing: 0.06em;
    border-bottom: 1px solid #23233a; padding-bottom: 6px;
}
.user-table-row {
    border-bottom: 1px solid #1a1a2e;
    font-size: 0.82rem;
}
.user-table-row:last-child { border-bottom: none; }
.user-table-name { font-weight: 600; color: #e8eaf0; }
.user-tab-summary { font-size: 0.74rem; color: #888; }
.user-table-acts  { display: flex; gap: 6px; }

.user-role-badge {
    font-size: 0.65rem; font-weight: 800; letter-spacing: 0.06em;
    padding: 2px 7px; border-radius: 4px; text-transform: uppercase;
    display: inline-block;
}
.user-role-admin      { background: #0a2a1a; color: #06c98a; border: 1px solid #06c98a44; }
.user-role-owner      { background: #1a1000; color: #ffcc00; border: 1px solid #ffcc0044; }
.user-role-supervisor { background: #0a1a2a; color: #4db6ff; border: 1px solid #4db6ff44; }
.user-role-contractor { background: #1a0a2a; color: #bb88ff; border: 1px solid #bb88ff44; }
.user-role-client     { background: #1a0a0a; color: #ff9966; border: 1px solid #ff996644; }
.user-role-staff      { background: #1a1a35; color: #8888cc; border: 1px solid #8888cc44; }
.user-status-on  { font-size: 0.74rem; color: #06c98a; font-weight: 600; }
.user-status-off { font-size: 0.74rem; color: #555; font-style: italic; }

/* ── User perm grid (in user form) ───────────────────────────────────────── */
.user-perm-grid {
    background: #0d0d1a; border: 1.5px solid #23233a; border-radius: 8px;
    overflow: hidden; max-width: 340px;
}
.user-perm-header,
.user-perm-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    align-items: center;
    padding: 7px 14px;
}
.user-perm-header {
    font-size: 0.66rem; font-weight: 700; color: #555;
    text-transform: uppercase; letter-spacing: 0.06em;
    border-bottom: 1px solid #23233a;
    background: #0a0a16;
}
.user-perm-row { border-bottom: 1px solid #151525; }
.user-perm-row:last-child { border-bottom: none; }
.user-perm-tab { font-size: 0.82rem; color: #ccc; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Wide desktop (1440px+) ───────────────────────────────────────────────── */
@media (min-width: 1440px) {
    .app-shell       { max-width: 1600px; margin: 0 auto; }
    .tab-body        { padding: 28px 36px; }
    .day-panel       { width: 540px; }
    .rpt-preview-bg  { padding: 36px; }
    .rpt-doc-tmpl    { max-width: 820px; }
}

/* ── Tablet (≤1024px) ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    /* Tab navigation */
    .tab-nav    { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tab-nav::-webkit-scrollbar { display: none; }
    .tab-btn    { padding: 12px 16px; font-size: 0.8rem; white-space: nowrap; flex-shrink: 0; }

    /* Layout */
    .tab-body   { padding: 16px; }

    /* Day panel / modal */
    .day-panel  { width: 380px; }

    /* Admin staff table */
    .admin-staff-table .admin-staff-header,
    .admin-staff-table .admin-staff-row {
        grid-template-columns: 1.8fr 1.2fr 1.2fr 2fr 1fr;
    }
    /* Hide 4th column (rate col) */
    .admin-staff-table .admin-staff-header > :nth-child(4),
    .admin-staff-table .admin-staff-row   > :nth-child(4) { display: none; }

    /* User table */
    .user-table-header,
    .user-table-row    { grid-template-columns: 1.4fr 0.8fr 2fr 1fr; }
    /* Hide 3rd column (role badges) */
    .user-table-header > :nth-child(3),
    .user-table-row    > :nth-child(3) { display: none; }

    /* Week grid — enable horizontal scroll */
    .week-grid-scroll  { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .week-grid         { min-width: 700px; }

    /* Report */
    .rpt-preview-bg  { padding: 12px; }
    .rpt-doc-tmpl    { max-width: 100%; }
}

/* ── Mobile (≤640px) ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    /* ── Tab nav ── */
    .tab-nav    { gap: 2px; }
    .tab-btn    { padding: 10px 12px; font-size: 0.75rem; }

    /* ── Body ── */
    .tab-body   { padding: 10px 8px; }

    /* ── Login card ── */
    .login-card { width: calc(100vw - 32px); max-width: 420px; padding: 28px 20px; }

    /* ── iOS zoom prevention — inputs must be ≥16px ── */
    .input,
    .select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    textarea,
    select { font-size: 1rem !important; }

    /* ── Touch targets — minimum 44px ── */
    .btn         { min-height: 38px; padding-top: 8px; padding-bottom: 8px; }
    .btn-xs      { min-height: 34px; padding: 6px 10px; font-size: 0.75rem; }
    .btn-sm      { min-height: 36px; }

    /* ── Checkboxes ── */
    .checkbox-label input[type="checkbox"] { width: 18px !important; height: 18px !important; }
    .rec-check  { width: 20px !important; height: 20px !important; }
    .photo-remove-btn { width: 28px !important; height: 28px !important; font-size: 1rem; }

    /* ── Day panel (schedule modal) — full-screen on mobile ── */
    .day-panel {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        position: fixed;
        overflow-y: auto;
    }

    /* ── Week grid ── */
    .week-grid-scroll  { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .week-grid         { min-width: 560px; grid-template-columns: repeat(7, minmax(80px, 1fr)); }
    .day-cell          { padding: 6px 4px; font-size: 0.72rem; }

    /* ── Jobs table — collapse to prio | name | acts ── */
    .job-header,
    .job-row        { grid-template-columns: 38px 1fr auto !important; gap: 6px; }
    .job-row-site,
    .job-row-client,
    .job-row-dates,
    .job-row-crew   { display: none; }

    /* ── Records table — hide crew column ── */
    .rec2-row    { grid-template-columns: 1fr 2fr auto !important; }
    .rec2-crew   { display: none; }

    /* ── Admin staff table — collapse ── */
    .admin-staff-table .admin-staff-header,
    .admin-staff-table .admin-staff-row {
        grid-template-columns: 1fr auto !important;
    }
    .admin-staff-table .admin-staff-header > :not(:first-child):not(:last-child),
    .admin-staff-table .admin-staff-row   > :not(:first-child):not(:last-child) { display: none; }

    /* ── User table — collapse ── */
    .user-table-header,
    .user-table-row    { grid-template-columns: 1fr auto !important; }
    .user-table-header > :not(:first-child):not(:last-child),
    .user-table-row    > :not(:first-child):not(:last-child) { display: none; }

    /* ── Calendar — ct-wrap already scrollable, just bump cell min-width ── */
    .ct-cell       { min-width: 140px; }

    /* ── Report preview ── */
    .rpt-preview-bg   { padding: 4px; background: #0d0d1a; }
    .rpt-doc-tmpl     { max-width: 100%; border-radius: 0; box-shadow: none; }
    .rpt-selector-row { flex-wrap: wrap; gap: 8px; }
    /* Hide "Next Scheduled" column — too wide on mobile */
    .rpt-tmpl-td-next,
    .rpt-tmpl-services-tbl th:nth-child(3),
    .rpt-tmpl-services-tbl td:nth-child(3) { display: none; }
    /* Header */
    .app-header-bar { padding: 6px 10px; }
    .app-header-title { font-size: 1rem; }
}

/* ── Very small phones (≤360px) ─────────────────────────────────────────── */
@media (max-width: 360px) {
    .tab-btn  { padding: 8px 8px; font-size: 0.7rem; }
    .tab-body { padding: 8px 6px; }
    .btn-xs   { padding: 5px 8px; font-size: 0.7rem; }
    .day-cell { padding: 4px 2px; font-size: 0.68rem; }
    .login-card { padding: 20px 14px; }
}

/* ── High-DPI / RDP scaling fixes ───────────────────────────────────────── */
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
    /* Ensure tables and wide grids never force horizontal body scroll */
    .ct-wrap,
    .week-grid-scroll { overflow-x: auto; }

    /* Bump tiny touch-only elements to remain usable at scale */
    .btn-xs  { min-height: 32px; }
    .rec-check,
    .checkbox-label input[type="checkbox"] { min-width: 16px; min-height: 16px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIGHT THEME
   Header, tab-nav, login page, and splash screen stay dark.
   Everything else: white background, dark text.
   ═══════════════════════════════════════════════════════════════════════════ */

body { background: #ffffff; color: #111111; }

/* Splash keeps dark */
.splash { background: #0d0d1a; }

/* Login page keeps dark */
.login-wrap  { background: #0d0d1a; }
.login-card  { background: #181826; border-color: #23233a; }
.login-logo  { color: #e8eaf0; }
.login-field label { color: #888; }
.login-version { color: #555; }
.login-field .input {
    background: #0d0d1a; border-color: #35355a; color: #e8eaf0;
}

/* Header stays dark — re-anchor colours so body inheritance can't bleed in */
.app-header  { background: #1a1a2e; color: #e8eaf0; }
.app-logo    { color: #e8eaf0; }
.app-tagline { color: #06c98a; }
.header-user { color: #888; }
.header-admin-badge { background: #06c98a; color: #0d0d1a; }
.app-header .btn-neutral {
    background: #23233a; color: #c8cadc; border-color: #35355a;
}
.app-header .btn-neutral:hover { background: #2e2e4a; }

/* Tab nav stays dark */
.tab-nav { background: #181826; border-bottom-color: #23233a; }
.tab-btn { color: #888; }
.tab-btn:hover { color: #e8eaf0; }
.tab-btn.active { color: #06c98a; border-bottom-color: #06c98a; }

/* Report preview background on mobile stays readable */
@media (max-width: 640px) {
    .rpt-preview-bg { background: #e8e8e8; }
}

/* ── Panels / cards ── */
.panel { background: #ffffff; border-color: #e0e0e0; }
.panel-header { color: #111111; }

/* ── Buttons ── */
.btn-neutral { background: #f0f0f0; color: #333333; border-color: #cccccc; }
.btn-neutral:hover { background: #e0e0e0; }

/* ── Forms ── */
.form-label { color: #555555; }
.input, .select {
    background: #ffffff; border-color: #cccccc; color: #111111;
}
.select option { background: #ffffff; color: #111111; }
.checkbox-label { color: #444444; }
.month-sel { background: #ffffff; border-color: #cccccc; color: #111111; }
.month-nav-btn { background: #f0f0f0; border-color: #cccccc; color: #333333; }
.month-nav-btn:hover { background: #e0e0e0; }

/* ── Staff pills ── */
.staff-pill { background: #f0f0f0; border-color: #cccccc; color: #111111; }

/* ── Job cards (Jobs tab) ── */
.job-card { background: #fafafa; border-color: #e0e0e0; }
.job-card-title { color: #111111; }
.job-card-site  { color: #555555; }
.job-card-meta  { color: #666666; }
.job-dates      { color: #777777; }
.recur-badge    { background: #e8f5ee; color: #1b7a4a; }
.done-badge     { background: #e8f5e9; color: #2e7d32; }
.assign-chip    { background: #f0f0f0; border-color: #cccccc; color: #444444; }
.assign-chip-role-sel option { background: #ffffff; color: #111111; }
.date-chip      { background: #f0f0f0; border-color: #cccccc; color: #444444; }
.date-range-panel { background: #fafafa; border-color: #cccccc; }
.task-lib-chip  { background: #f0f0f0; border-color: #cccccc; color: #444444; }
.task-lib-chip:hover { border-color: #06c98a; color: #06c98a; }
.task-item      { color: #444444; }
.task-item .rm  { color: #888888; }

/* ── Jobs tab table ── */
.job-row { background: #fafafa; border-color: #e0e0e0; }
.job-row:hover { background: #f0f0f0; border-color: #cccccc; }
.job-row.expanded { border-color: #06c98a; }
.job-row-name   { color: #111111; }
.job-row-site   { color: #555555; }
.job-row-dates  { color: #666666; }
.job-row-crew   { color: #777777; }
.job-detail { background: #f5f5f5; }

/* ── Day-of-week toggles ── */
.day-toggle { background: #f0f0f0; border-color: #cccccc; color: #555555; }
.day-toggle.on { background: #e8f5ee; border-color: #06c98a; color: #06c98a; }

/* ── Schedule / week grid ── */
.week-day { background: #fafafa; border-color: #e0e0e0; }
.week-day.today        { border-color: #06c98a; }
.week-day.day-selected { border-color: #4a9eff; background: #f0f5ff; }
.week-day.drop-target  { background: #e8f5ee !important; }
.week-day-label { color: #999999; }
.week-day-date  { color: #333333; }
.week-row-label { color: #888888; }
.week-sum-label { color: #666666; }
.week-sum-stat  { color: #777777; }
.week-sum-empty { color: #444444; }
.day-add-btn    { border-color: #cccccc; color: #aaaaaa; }
.day-add-btn:hover { border-color: #06c98a; color: #06c98a; }
.unscheduled-alert { background: #fff8e1; border-color: #f9a825; color: #7a4f00; }
.day-capacity.cap-ok   { background: #e8f5ee; color: #1b7a4a; }
.day-capacity.cap-over { background: #ffe4e4; color: #c62828; }
.rainout-confirm { background: #fff5f5; border-color: #c62828; }

/* ── Day job chips (schedule) ── */
.day-job-chip      { background: #f0f0f0; border-color: #e0e0e0; }
.day-job-chip.done { background: #e8f5e9; border-color: #4caf50; }
.day-job-chip-name { color: #333333; }
.day-chip-crew.crew-full    { background: #e8f5ee; color: #1b7a4a; }
.day-chip-crew.crew-partial { background: #fff8e1; color: #8a5c00; }
.day-chip-crew.crew-empty   { background: #ffe4e4; color: #c62828; }
.day-chip-res { background: #fff3cd; border-color: #f5a62344; color: #8a4f00; }
.ghost-chip   { background: #f0f0f0 !important; }

/* ── Day panel (slide-in) ── */
.day-panel { background: #ffffff; border-left-color: #e0e0e0; }
.day-panel-hdr   { background: #f8f8f8; border-bottom-color: #e0e0e0; }
.day-panel-date  { color: #111111; }
.day-panel-stats { color: #666666; }
.dp-roster-section { border-bottom-color: #e0e0e0; }
.dp-roster-name    { color: #333333; }
.dp-job            { background: #fafafa; border-color: #e0e0e0; }
.dp-job.dp-job-done { background: #e8f5e9; border-color: #4caf50; }
.dp-job-site       { color: #666666; }
.dp-job-est        { color: #888888; }
.dp-crew-section   { border-top-color: #e0e0e0; }
.dp-crew-label     { color: #666666; }

/* ── Records tab ── */
.rec2-filter-btn { background: #f0f0f0; border-color: #cccccc; color: #555555; }
.rec2-filter-btn.active, .rec2-filter-btn:hover {
    background: #e8f5ee; border-color: #06c98a; color: #06c98a;
}
.rec2-summary  { background: #f8f8f8; border-color: #e0e0e0; }
.rec2-sum-stat { color: #666666; }
.rec2-date-hdr { border-bottom-color: #e0e0e0; }
.rec2-row      { background: #fafafa; border-color: #e0e0e0; }
.rec2-row:hover { background: #f0f0f0; }
.rec2-row.rec2-done       { background: #e8f5e9; border-color: #4caf50; }
.rec2-row.rec2-incomplete { background: #fff5f5; border-color: #ffaaaa; }
.rec2-row.rec2-expanded   { background: #f5f5ff; border-color: #9999cc; }
.rec2-job-name    { color: #111111; }
.rec2-site        { color: #666666; }
.rec2-work-preview { color: #777777; }
.rec2-detail      { background: #f5f5f5; border-color: #9999cc; }
.rec2-expand-btn  { background: #f0f0f0; border-color: #cccccc; color: #666666; }
.rec2-expand-btn:hover, .rec2-expand-btn.open {
    border-color: #06c98a; color: #06c98a; background: #e8f5ee;
}
.rec2-photo-badge { background: #e8f0ff; border-color: #99bbee; color: #2255aa; }
.rec-item      { background: #fafafa; border-color: #e0e0e0; }
.rec-item.done { background: #e8f5e9; border-color: #4caf50; }
.rec-item.incomplete { background: #fff5f5; border-color: #ffaaaa; }
.rec-item-name { color: #111111; }
.rec-item-site { color: #666666; }
.rec-item-crew { color: #888888; }
.rec-work-done { color: #666666; }
.rec-tag-incomplete { background: #ffe4e4; color: #c62828; }
.rec-tag-quote      { background: #fff8e1; color: #9a5c00; }
.rec-note-form { background: #f5f5f5; border-color: #06c98a; }
.rec-note-title { color: #06c98a; }
.rec-note-btn  { border-color: #cccccc; color: #666666; }
.rec-note-btn:hover, .rec-note-btn.active {
    border-color: #06c98a; color: #06c98a; background: #e8f5ee;
}
.empty { color: #777777; }

/* ── Report ── */
.rpt-topbar     { background: #f8f8f8; border-bottom-color: #e0e0e0; }
.rpt-period-label { color: #111111; }
.rpt-mode-toggle  { border-color: #cccccc; }
.rpt-mode-toggle button { color: #555555; }
.rpt-mode-toggle button:hover:not(.active) { background: #f0f0f0; color: #111111; }
.rpt-options     { background: #f8f8f8; border-color: #e0e0e0; }
.rpt-options-label { color: #666666; }
.rpt-opt-check   { color: #444444; }
.rpt-view-toggle { border-color: #cccccc; }
.rpt-view-toggle button { color: #555555; }
.rpt-view-toggle button:hover:not(.active) { background: #f0f0f0; color: #111111; }
.rpt-client-section-hd {
    background: linear-gradient(90deg, #e8e8f5 0%, #f5f5f5 100%);
    color: #1a1a2e;
}
.rpt-ai-generating { color: #666666; }
.rpt-preview-bg { background: #e0e0e0; }

/* ── Admin tab ── */
.admin-skill-card { background: #fafafa; border-color: #e0e0e0; }
.admin-form-box   { background: #ffffff; border-color: #e0e0e0; }
.admin-staff-header { color: #666666; border-bottom-color: #e0e0e0; }
.admin-staff-row:hover { background: #f5f5f5; }
.admin-staff-row.row-expanded { background: #f5f5f5; }
.admin-inline-form { background: #f0f0f0; border-color: #cccccc; border-top-color: #06c98a; }
.avail-on  { background: #d0f5e8; color: #1b7a4a; }
.avail-off { background: #ffd4d4; color: #c62828; }
.emp-ft    { background: #e8f5ee; color: #1b7a4a; }
.emp-cas   { background: #ececf5; color: #5555aa; }

/* ── User management ── */
.user-table-header { color: #666666; border-bottom-color: #e0e0e0; }
.user-table-row    { border-bottom-color: #f0f0f0; }
.user-table-name   { color: #111111; }
.user-tab-summary  { color: #777777; }
.user-status-off   { color: #888888; }
.user-perm-grid    { background: #fafafa; border-color: #e0e0e0; }
.user-perm-header  { background: #f0f0f0; color: #555555; border-bottom-color: #e0e0e0; }
.user-perm-row     { border-bottom-color: #f0f0f0; }
.user-perm-tab     { color: #333333; }
.user-role-admin      { background: #e8f5ee; color: #1b7a4a; border-color: #4caf5044; }
.user-role-owner      { background: #fff8e1; color: #8a5c00; border-color: #f9a82544; }
.user-role-supervisor { background: #e3f0ff; color: #1155cc; border-color: #4a9eff44; }
.user-role-contractor { background: #f3eeff; color: #6633cc; border-color: #bb88ff44; }
.user-role-client     { background: #fff3ee; color: #cc4400; border-color: #ff996644; }
.user-role-staff      { background: #ececf5; color: #5555aa; border-color: #8888cc44; }

/* ── Completed tab (Works Completed table) ── */
.ct-wrap     { border-color: #e0e0e0; }
.ct-date-hdr { background: #f8f8f8; color: #555555;
               border-right-color: #e0e0e0; border-bottom-color: #e0e0e0; }
.ct-date-cell { background: #f8f8f8;
                border-right-color: #e0e0e0; border-bottom-color: #f0f0f0; }
.ct-date-num { color: #333333; }
.ct-cell     { border-left-color: #f0f0f0; border-bottom-color: #f0f0f0; }
.ct-cell.ct-done { background: #f0fff4; }
.ct-work     { color: #111111; }
.ct-weekend .ct-date-cell { background: #f0f0f0; }
.ct-weekend .ct-cell      { background: #f9f9f9; }

/* ── Clients tab ── */
.client-card        { background: #fafafa; border-color: #e0e0e0; }
.client-card.expanded { border-color: #06c98a; }
.client-card-header:hover { background: #f0f0f0; }
.client-card-name   { color: #111111; }
.client-card-contact { color: #555555; }
.client-card-stats span { color: #777777; }
.client-info-row    { background: #f8f8f8; border-top-color: #e0e0e0; color: #555555; }
.client-jobs-list   { border-top-color: #e0e0e0; }
.client-job-row     { border-bottom-color: #e0e0e0; }

/* ── Snackbars ── */
.rainout-toast { background: #e8f5ee; border-color: #06c98a; }
.rainout-job   { color: #111111; }
.rainout-date  { color: #555555; }
.undo-snack    { background: #e8f5ee; border-color: #06c98a; color: #333333; }
.undo-snack .rm { color: #666666; }

/* ── Dev panel ── */
.dev-panel      { border: 2px dashed #06c98a !important; }
.dev-panel-status { font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; padding: 6px 10px; border-radius: 6px; }
.dev-panel-ok   { color: #1b7a4a; background: #e8f5ee; }
.dev-panel-err  { color: #c62828; background: #ffe4e4; }
