/**
 * Light theme for the whole intranet when html[data-theme="light"].
 * Loaded last in <head> so it overrides page-local dark styles (higher specificity + !important where needed).
 */

/* --- Intranet hub semantic palette (forms, HR, admin, RevChat shell, etc.) — use var(--in-*) in page <style> --- */
html[data-theme="dark"] {
  --in-bg: #0a0d0b;
  --in-bg-alt: #0d1117;
  --in-sidebar: #151c19;
  --in-surface: #141b18;
  --in-surface-hover: #1c2621;
  --in-surface-muted: #21262d;
  --in-border: #2a332e;
  --in-border-strong: #3d4841;
  --in-text: #e8edf0;
  --in-text-muted: #8b949e;
  --in-link: #58a6ff;
  --in-mention: #79c0ff;
  --in-gold: #c8922a;
  --in-gold-hover: #d9a84e;
  --in-gold-muted: rgba(200, 146, 42, 0.15);
  --in-green: #238636;
  --in-green-hover: #2ea043;
  --in-settings-bg: #141b18;
  --in-settings-shadow: rgba(0, 0, 0, 0.35);
  /* Panels / inputs (GitHub-adjacent; used across forms and RevComm) */
  --in-raised: #161b22;
  --in-border-ui: #30363d;
}

/* --- Dashboard / scorecard (uses CSS variables on :root) --- */
html[data-theme="light"] {
  --bg: #f7f4ed;
  --surface: #fffefb;
  --surface-2: #faf7f0;
  --border: #d4cec0;
  --text-primary: #1c211e;
  --text-secondary: #5c6560;
  --text-muted: #5c6560;
  --accent: #c8922a;
  --accent-dim: rgba(200, 146, 42, 0.18);
  --green: #238636;
  --green-dim: rgba(35, 134, 54, 0.14);
  /* Hub pages (same names as dark; values switch with theme) */
  --in-bg: #f7f4ed;
  --in-bg-alt: #fffefb;
  --in-sidebar: #f0ede4;
  --in-surface: #ffffff;
  --in-surface-hover: #faf7f0;
  --in-surface-muted: #f0ede4;
  --in-border: #d4cec0;
  --in-border-strong: #c4bdb0;
  --in-text: #1c211e;
  --in-text-muted: #5c6560;
  --in-link: #0a5cad;
  --in-mention: #0969da;
  --in-gold: #c8922a;
  --in-gold-hover: #a87620;
  --in-gold-muted: rgba(200, 146, 42, 0.18);
  --in-green: #238636;
  --in-green-hover: #2ea043;
  --in-settings-bg: #fffefb;
  --in-settings-shadow: rgba(28, 33, 30, 0.12);
  --in-raised: #ffffff;
  --in-border-ui: #c4bdb0;
}

html[data-theme="light"] .modal-overlay {
  background: rgba(28, 33, 30, 0.4) !important;
}

html[data-theme="light"] .metric-card:hover {
  border-color: #c4bdb0 !important;
}

/* --- Page shell: body and common layout --- */
html[data-theme="light"] body {
  background: #f7f4ed !important;
  color: #1c211e !important;
}

html[data-theme="light"] .container,
html[data-theme="light"] .box {
  color: #1c211e;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3 {
  color: #1c211e;
}

html[data-theme="light"] .subtitle,
html[data-theme="light"] .sub {
  color: #5c6560 !important;
}

html[data-theme="light"] .breadcrumb {
  color: #5c6560 !important;
}

html[data-theme="light"] .breadcrumb a {
  color: #a87620 !important;
}

html[data-theme="light"] label {
  color: #5c6560 !important;
}

/* --- Cards / surfaces (forms index, landing-like pages) --- */
html[data-theme="light"] .card {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .card:hover {
  background: #faf7f0 !important;
  border-color: #c8922a !important;
}

html[data-theme="light"] .card h2 {
  color: #1c211e !important;
}

html[data-theme="light"] .card p {
  color: #5c6560 !important;
}

/* --- Form controls (covers most intranet forms) --- */
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="tel"],
html[data-theme="light"] input[type="url"],
html[data-theme="light"] input[type="date"],
html[data-theme="light"] input[type="datetime-local"],
html[data-theme="light"] input[type="file"],
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background: #ffffff !important;
  color: #1c211e !important;
  border-color: #c4bdb0 !important;
  color-scheme: light !important;
}

html[data-theme="light"] input[type="file"]::file-selector-button,
html[data-theme="light"] input[type="file"]::-webkit-file-upload-button {
  background: #f0ede4 !important;
  color: #1c211e !important;
  border: 1px solid #c4bdb0 !important;
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  margin-right: 0.75rem;
  cursor: pointer;
  font: inherit;
}

html[data-theme="light"] input[readonly] {
  background: #f0ede4 !important;
  color: #5c6560 !important;
}

html[data-theme="light"] select option {
  background: #ffffff;
  color: #1c211e;
}

/* --- Buttons: outline / secondary (keep primary gold/green recognizable) --- */
html[data-theme="light"] .btn-outline {
  background: transparent !important;
  color: #5c6560 !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] .btn-outline:hover:not(:disabled) {
  border-color: #c8922a !important;
  color: #1c211e !important;
}

html[data-theme="light"] button.secondary,
html[data-theme="light"] .btn-secondary {
  background: #f0ede4 !important;
  color: #1c211e !important;
  border-color: #c4bdb0 !important;
}

/* --- RevChat / team layout --- */
html[data-theme="light"] header {
  background: #f0ede4 !important;
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] header a {
  color: #0a5cad !important;
}

html[data-theme="light"] .brand h1 {
  color: #1c211e !important;
}

html[data-theme="light"] aside {
  background: #f0ede4 !important;
  border-right-color: #d4cec0 !important;
}

html[data-theme="light"] aside .side-head > div:first-child {
  color: #5c6560 !important;
}

html[data-theme="light"] main {
  background: #faf7f0 !important;
}

html[data-theme="light"] #chatHead {
  background: #fffefb !important;
  border-bottom-color: #d4cec0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] #msgScroll {
  background: #faf7f0 !important;
}

html[data-theme="light"] .msg .meta {
  color: #5c6560 !important;
}

html[data-theme="light"] .msg .meta .name {
  color: #1c211e !important;
}

html[data-theme="light"] .msg .body {
  color: #1c211e !important;
}

html[data-theme="light"] .side-head button {
  background: #fffefb !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .conv-section-head {
  background: #e8e4d9 !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .conv-item {
  border-color: transparent !important;
}

html[data-theme="light"] .conv-item .t {
  color: #1c211e !important;
}

html[data-theme="light"] .conv-item.active .t,
html[data-theme="light"] .conv-item.active .p,
html[data-theme="light"] .conv-item.active .tag {
  color: #0a0c0b !important;
}

html[data-theme="light"] .conv-item:hover {
  background: rgba(200, 146, 42, 0.12) !important;
}

html[data-theme="light"] .conv-item.unread:not(.active) .t {
  color: #1c211e !important;
}

html[data-theme="light"] .conv-item .tag {
  color: #5c6560 !important;
}

html[data-theme="light"] .conv-item .p {
  color: #5c6560 !important;
}

html[data-theme="light"] .conv-empty {
  color: #5c6560 !important;
}

/* RevChat — channel members modal (list uses dark inline colors from team-chat.ts) */
html[data-theme="light"] #membersModal {
  background: rgba(28, 33, 30, 0.4) !important;
}

html[data-theme="light"] #btnChannelMembers {
  background: #fffefb !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .members-ul {
  background: #faf7f0 !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] .members-ul li {
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] .members-ul .mn {
  color: #1c211e !important;
}

html[data-theme="light"] .members-ul .me {
  color: #5c6560 !important;
}

html[data-theme="light"] .members-ul .mr {
  color: #5c6560 !important;
}

html[data-theme="light"] .members-ul .members-empty-hint {
  color: #5c6560 !important;
}

html[data-theme="light"] .pending-chip {
  background: #f0ede4 !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .pending-chip button {
  color: #5c6560 !important;
}

html[data-theme="light"] #composer {
  background: #fffefb !important;
  border-top-color: #d4cec0 !important;
}

html[data-theme="light"] #composer textarea {
  background: #ffffff !important;
  color: #1c211e !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] .profile-open {
  background: #e8e4d9 !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] #profileModal {
  background: rgba(28, 33, 30, 0.4) !important;
}

html[data-theme="light"] .profile-panel {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
  color: #1c211e !important;
  box-shadow: 0 16px 48px rgba(28, 33, 30, 0.12) !important;
}

html[data-theme="light"] .profile-panel label,
html[data-theme="light"] .profile-panel .hint {
  color: #5c6560 !important;
}

html[data-theme="light"] .profile-panel input,
html[data-theme="light"] .profile-panel select,
html[data-theme="light"] .profile-panel textarea {
  background: #ffffff !important;
  color: #1c211e !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] .chan-picks {
  background: #faf7f0 !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] .mention-picker {
  background: #fffefb !important;
  border-color: #c8922a !important;
  box-shadow: 0 8px 24px rgba(28, 33, 30, 0.12) !important;
}

html[data-theme="light"] .mention-picker .mi:hover,
html[data-theme="light"] .mention-picker .mi.active {
  background: #f0ede4 !important;
}

html[data-theme="light"] .react-chip {
  background: #f0ede4 !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .react-chip .react-chip-count {
  color: #5c6560 !important;
}

html[data-theme="light"] .react-chip-hovertip {
  background: #fffefb !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
  box-shadow: 0 8px 24px rgba(28, 33, 30, 0.12) !important;
}

/* Expanded emoji grid (RevChat “⋯ More emoji”) — matches mention-picker / react-chip light surfaces */
html[data-theme="light"] .react-picker-extra {
  background: #fffefb !important;
  border-color: #c4bdb0 !important;
  box-shadow: 0 8px 24px rgba(28, 33, 30, 0.12) !important;
}

html[data-theme="light"] .react-bar button:hover {
  background: #f0ede4 !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] .react-bar .react-more {
  color: #5c6560 !important;
}

html[data-theme="light"] .react-bar .react-more:hover {
  color: #1c211e !important;
}

html[data-theme="light"] .avatar-crop-shell {
  background: #e8e4d9 !important;
}

html[data-theme="light"] .empty {
  color: #5c6560 !important;
}

/* RevChat — left rail, Saved / All activity, thread column, Slack DM row (inline dark from team-chat.ts) */
html[data-theme="light"] .layout {
  background: #f7f4ed;
}

html[data-theme="light"] .tc-rail {
  background: #f0ede4 !important;
  border-right-color: #d4cec0 !important;
}

html[data-theme="light"] .tc-rail button {
  color: #5c6560 !important;
}

html[data-theme="light"] .tc-rail button:hover {
  background: rgba(200, 146, 42, 0.12) !important;
  color: #1c211e !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] .tc-rail button.active {
  background: rgba(200, 146, 42, 0.22) !important;
  color: #8a6218 !important;
  border-color: #c8922a !important;
}

html[data-theme="light"] #tcChatShell,
html[data-theme="light"] .chat-main-split,
html[data-theme="light"] .chat-main-col {
  background: #faf7f0 !important;
}

html[data-theme="light"] .tc-alt-panel {
  background: #faf7f0 !important;
}

html[data-theme="light"] .tc-alt-head {
  background: #fffefb !important;
  border-bottom-color: #d4cec0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .tc-activity-detail-toolbar {
  background: #fffefb !important;
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] .tc-activity-detail-title {
  color: #1c211e !important;
}

html[data-theme="light"] .tc-activity-detail-actions button.secondary {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: #f0ede4 !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .tc-activity-detail-actions button.secondary:hover:not(:disabled) {
  border-color: #c8922a !important;
  background: rgba(200, 146, 42, 0.14) !important;
}

html[data-theme="light"] .tc-activity-detail-scroll {
  background: #faf7f0 !important;
}

html[data-theme="light"] .tc-activity-list-col {
  background: #faf7f0 !important;
  border-right-color: #d4cec0 !important;
}

html[data-theme="light"] .tc-alt-row {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] .tc-alt-row:hover {
  border-color: #c8922a !important;
}

html[data-theme="light"] .tc-alt-row .lbl {
  color: #5c6560 !important;
}

html[data-theme="light"] .tc-alt-row .snip {
  color: #1c211e !important;
}

html[data-theme="light"] .tc-alt-row .sub {
  color: #5c6560 !important;
}

html[data-theme="light"] .thread-panel {
  background: #fffefb !important;
  border-left-color: #d4cec0 !important;
}

html[data-theme="light"] .thread-panel-head {
  border-bottom-color: #d4cec0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .thread-panel-close {
  color: #5c6560 !important;
}

html[data-theme="light"] .thread-panel-close:hover {
  color: #1c211e !important;
  background: rgba(200, 146, 42, 0.12) !important;
}

html[data-theme="light"] .thread-scroll {
  background: #faf7f0 !important;
}

html[data-theme="light"] .thread-composer {
  background: #f0ede4 !important;
  border-top-color: #d4cec0 !important;
}

html[data-theme="light"] #threadMsgInput {
  background: #ffffff !important;
  color: #1c211e !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] #slackDmRow {
  border-top-color: #d4cec0 !important;
  color: #5c6560 !important;
}

html[data-theme="light"] #slackDmConnect {
  color: #a87620 !important;
}

html[data-theme="light"] #msgContextMenu {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
  box-shadow: 0 12px 40px rgba(28, 33, 30, 0.12) !important;
}

html[data-theme="light"] #msgContextMenu button {
  color: #1c211e !important;
}

html[data-theme="light"] #msgContextMenu button:hover {
  background: #f0ede4 !important;
}

/* --- Tables / logs (admin, mileage, etc.) --- */
html[data-theme="light"] table {
  color: #1c211e;
}

html[data-theme="light"] th,
html[data-theme="light"] td {
  border-color: #d4cec0 !important;
}

html[data-theme="light"] tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

/* --- Lockbox / inventory selects --- */
html[data-theme="light"] .form-group select option {
  background: #ffffff !important;
  color: #1c211e !important;
}

/* --- Tickets inbox & dense UIs: panels --- */
html[data-theme="light"] .panel {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] pre,
html[data-theme="light"] code {
  background: #f0ede4 !important;
  color: #1c211e !important;
  border-color: #d4cec0 !important;
}

/* --- Company calendar (FullCalendar) — scoped so RevChat header keeps its own light styles --- */
html[data-theme="light"] header:has(.header-left) {
  background: #fffefb !important;
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] header:has(.header-left) .header-left h1 {
  color: #1c211e !important;
}

html[data-theme="light"] header:has(.header-left) .header-right a {
  color: #5c6560 !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] header:has(.header-left) .header-right a:hover {
  color: #1c211e !important;
  border-color: #c8922a !important;
}

html[data-theme="light"] .fc {
  --fc-border-color: #d4cec0;
  --fc-page-bg-color: #f7f4ed;
  --fc-neutral-bg-color: #fffefb;
  --fc-list-event-hover-bg-color: #f0ede4;
  --fc-today-bg-color: rgba(200, 146, 42, 0.12);
  --fc-highlight-color: rgba(200, 146, 42, 0.18);
  --fc-non-business-color: rgba(247, 244, 237, 0.6);
}

html[data-theme="light"] .fc .fc-toolbar-title {
  color: #1c211e !important;
}

html[data-theme="light"] .fc .fc-button {
  background: #f0ede4 !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .fc .fc-button:hover {
  background: #e8e4d9 !important;
  border-color: #c8922a !important;
}

html[data-theme="light"] .fc .fc-col-header-cell {
  background: #f0ede4 !important;
}

html[data-theme="light"] .fc .fc-col-header-cell-cushion,
html[data-theme="light"] .fc .fc-daygrid-day-number {
  color: #5c6560 !important;
}

html[data-theme="light"] .fc .fc-daygrid-day {
  background: #faf7f0 !important;
}

/* --- Public standalone forms (owner-termination, new-vendor-submission) --- */
html[data-theme="light"] .form-card,
html[data-theme="light"] .projection-card {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

/* Part-time hours — paycheck estimate card (was only styled for dark; .form-card already light above) */
html[data-theme="light"] .projection-card h2 {
  color: #1c211e !important;
}

html[data-theme="light"] .projection-card .subhead {
  color: #5c6560 !important;
}

html[data-theme="light"] .proj-row {
  border-bottom-color: #e8e4d9 !important;
}

html[data-theme="light"] .proj-label {
  color: #5c6560 !important;
}

html[data-theme="light"] .proj-value {
  color: #1c211e !important;
}

html[data-theme="light"] .proj-total {
  border-top-color: #d4cec0 !important;
}

html[data-theme="light"] .proj-total .proj-label {
  color: #a87620 !important;
}

html[data-theme="light"] .proj-loading {
  color: #5c6560 !important;
}

html[data-theme="light"] .radio-group label,
html[data-theme="light"] .check-row label {
  background: #faf7f0 !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] .radio-group label:has(input:checked),
html[data-theme="light"] .check-row label:has(input:checked) {
  border-color: #c8922a !important;
  background: rgba(200, 146, 42, 0.1) !important;
}

html[data-theme="light"] hr.section-divider,
html[data-theme="light"] hr.divider {
  border-top-color: #d4cec0 !important;
}

html[data-theme="light"] .info-box {
  color: #1c211e !important;
  background: rgba(200, 146, 42, 0.1) !important;
  border-color: rgba(200, 146, 42, 0.35) !important;
}

/* Mileage reimbursement — IRS callout (page used light-on-dark text) */
html[data-theme="light"] .irs-note {
  color: #1c211e !important;
  background: rgba(200, 146, 42, 0.14) !important;
  border-color: rgba(180, 130, 30, 0.45) !important;
}

html[data-theme="light"] .irs-note strong {
  color: #1c211e !important;
}

html[data-theme="light"] .legal-block {
  color: #5c6560 !important;
}

/* --- RevComm (/revcomm) — scoped to body.revcomm-page (team-chat also uses .msg) --- */
html[data-theme="light"] body.revcomm-page header {
  background: #f0ede4 !important;
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page h1 {
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page .btn-icon {
  background: #fffefb !important;
  border-color: #c4bdb0 !important;
  color: #5c6560 !important;
}

html[data-theme="light"] body.revcomm-page .btn-icon:hover {
  border-color: #c8922a !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page .list {
  background: #fffefb !important;
  border-right-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page .thread-row {
  border-bottom-color: #e8e4d9 !important;
}

html[data-theme="light"] body.revcomm-page .thread-row:hover {
  background: #faf7f0 !important;
}

html[data-theme="light"] body.revcomm-page .thread-row.active {
  background: #f0ede4 !important;
  border-left-color: #c8922a !important;
}

html[data-theme="light"] body.revcomm-page .thread-row.thread-row-forward {
  border-left-color: #9ca3a0 !important;
}

html[data-theme="light"] body.revcomm-page label.sortlab,
html[data-theme="light"] body.revcomm-page .sub,
html[data-theme="light"] body.revcomm-page .meta {
  color: #5c6560 !important;
}

html[data-theme="light"] body.revcomm-page .contact-card {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page .contact-card .name,
html[data-theme="light"] body.revcomm-page .contact-card .headline {
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page .contact-card-link:hover .name,
html[data-theme="light"] body.revcomm-page .contact-card-link-narrow:hover .name {
  color: #0a5cad !important;
}

html[data-theme="light"] body.revcomm-page .contact-card .email,
html[data-theme="light"] body.revcomm-page .contact-card .co,
html[data-theme="light"] body.revcomm-page .contact-card ul,
html[data-theme="light"] body.revcomm-page .revcomm-detail-list,
html[data-theme="light"] body.revcomm-page .revcomm-detail-kv .k {
  color: #5c6560 !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-detail-section-title {
  color: #6b7280 !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-money-warn {
  color: #cf222e !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-property-panel {
  background: #faf7f0 !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-property-panel-hd {
  color: #6b7280 !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-property-dl dd {
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-property-panel-primary a,
html[data-theme="light"] body.revcomm-page .revcomm-detail-list a,
html[data-theme="light"] body.revcomm-page .revcomm-property-link-list a {
  color: #0a5cad !important;
}

html[data-theme="light"] body.revcomm-page .contact-card-actions .btn-edit {
  background: #faf7f0 !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page .contact-card-actions .btn-profile {
  background: #fffefb !important;
  border-color: #c4bdb0 !important;
  color: #0a5cad !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-tool-panel {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-tool-panel > div:first-child {
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-tool-panel .sub {
  color: #5c6560 !important;
}

html[data-theme="light"] body.revcomm-page #lsProcessSelect,
html[data-theme="light"] body.revcomm-page #pmMeldSelect,
html[data-theme="light"] body.revcomm-page #teamChatSelect,
html[data-theme="light"] body.revcomm-page #lsProcessSearch,
html[data-theme="light"] body.revcomm-page #threadSearchQ {
  background: #ffffff !important;
  color: #1c211e !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] body.revcomm-page #lsProcessSearchResults {
  background: #faf7f0 !important;
  border-color: #d4cec0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page #pmMeldList {
  color: #5c6560 !important;
}

html[data-theme="light"] body.revcomm-page .msg {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page .msg.out.msg-forward,
html[data-theme="light"] body.revcomm-page .msg.note {
  background: #faf7f0 !important;
  border-left-color: #9ca3a0 !important;
}

html[data-theme="light"] body.revcomm-page .msg.note .meta {
  color: #a87620 !important;
}

html[data-theme="light"] body.revcomm-page textarea,
html[data-theme="light"] body.revcomm-page input[type="text"],
html[data-theme="light"] body.revcomm-page input[type="search"],
html[data-theme="light"] body.revcomm-page input[type="datetime-local"],
html[data-theme="light"] body.revcomm-page select#assigneeSel,
html[data-theme="light"] body.revcomm-page select#viewSel,
html[data-theme="light"] body.revcomm-page select#sortSel {
  background: #ffffff !important;
  color: #1c211e !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] body.revcomm-page textarea {
  background: #ffffff !important;
}

html[data-theme="light"] body.revcomm-page button:not(.primary) {
  background: #f0ede4 !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page button.primary {
  background: #238636 !important;
  border-color: #238636 !important;
  color: #fff !important;
}

html[data-theme="light"] body.revcomm-page button.warn {
  background: #faf3e0 !important;
  border-color: #d4a012 !important;
  color: #7c5a00 !important;
}

html[data-theme="light"] body.revcomm-page .suggest {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page .suggest div:hover {
  background: #f0ede4 !important;
}

html[data-theme="light"] body.revcomm-page .pill {
  background: #f0ede4 !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page .pri-urgent {
  background: rgba(248, 81, 73, 0.12) !important;
  color: #cf222e !important;
}

html[data-theme="light"] body.revcomm-page .pri-high {
  background: rgba(210, 153, 34, 0.15) !important;
  color: #9a6700 !important;
}

html[data-theme="light"] body.revcomm-page .pri-normal,
html[data-theme="light"] body.revcomm-page .pri-none {
  background: #e8e4d9 !important;
  color: #5c6560 !important;
}

html[data-theme="light"] body.revcomm-page .pri-low {
  background: #e8e4d9 !important;
  color: #6e7781 !important;
}

html[data-theme="light"] body.revcomm-page .compose-tabs {
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page .compose-tab {
  color: #5c6560 !important;
}

html[data-theme="light"] body.revcomm-page .compose-tab:hover {
  color: #1c211e !important;
  background: #faf7f0 !important;
}

html[data-theme="light"] body.revcomm-page .compose-tab.active {
  color: #a87620 !important;
  border-bottom-color: #c8922a !important;
}

html[data-theme="light"] body.revcomm-page .ai-chat-log {
  background: #faf7f0 !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page .ai-chat-msg.asst {
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-modal-backdrop {
  background: rgba(28, 33, 30, 0.4) !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-modal-box {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
  box-shadow: 0 16px 48px rgba(28, 33, 30, 0.12) !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page .revcomm-modal-box h3 {
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page #directoryContactModal .dcf-field label,
html[data-theme="light"] body.revcomm-page #directoryContactModal .dcf-field-label {
  color: #5c6560 !important;
}

html[data-theme="light"] body.revcomm-page #directoryContactModal .dcf-field input {
  background: #ffffff !important;
  border-color: #c4bdb0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.revcomm-page .reply-signature-preview {
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page .detail a.sub {
  color: #0a5cad !important;
}

html[data-theme="light"] body.revcomm-page .kind-tenant {
  background: rgba(35, 134, 54, 0.12) !important;
  color: #1a7f37 !important;
}

html[data-theme="light"] body.revcomm-page .kind-owner {
  background: rgba(200, 146, 42, 0.15) !important;
  color: #9a6700 !important;
}

html[data-theme="light"] body.revcomm-page .kind-vendor {
  background: rgba(10, 92, 173, 0.1) !important;
  color: #0a5cad !important;
}

html[data-theme="light"] body.revcomm-page .kind-attorney {
  background: rgba(163, 113, 247, 0.12) !important;
  color: #6e40c9 !important;
}

html[data-theme="light"] body.revcomm-page .kind-opposing-counsel {
  background: rgba(248, 81, 73, 0.1) !important;
  color: #cf222e !important;
}

html[data-theme="light"] body.revcomm-page .kind-employee {
  background: rgba(121, 192, 255, 0.15) !important;
  color: #0969da !important;
}

html[data-theme="light"] body.revcomm-page .kind-unknown-contact {
  background: #e8e4d9 !important;
  color: #5c6560 !important;
}

html[data-theme="light"] body.revcomm-page hr {
  border-top-color: #d4cec0 !important;
}

html[data-theme="light"] body.revcomm-page .detail .actions[style*="border-top"] {
  border-top-color: #d4cec0 !important;
}

/* Directory contact profile (/tickets/directory-contact/*): light theme lives in page inline CSS (loads before this file) so navy cards can flip to cream cards. */

/* --- Accounting logs: BDM Clawbacks + Part Time Hours (.section is only used on these two pages) --- */
html[data-theme="light"] .section {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] .section h2 {
  color: #1c211e !important;
  background: #f0ede4 !important;
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] .section h2 .period {
  color: #5c6560 !important;
}

html[data-theme="light"] .section thead th {
  background: #f0ede4 !important;
  color: #5c6560 !important;
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] .section tbody tr {
  border-bottom-color: #e8e4d9 !important;
}

html[data-theme="light"] .section tbody tr:hover {
  background: #faf7f0 !important;
}

html[data-theme="light"] .section tbody td {
  color: #1c211e !important;
}

html[data-theme="light"] .section .no-data,
html[data-theme="light"] .section .loading {
  color: #5c6560 !important;
}

html[data-theme="light"] .section .error {
  color: #cf222e !important;
}

/* --- Wire transfer instructions: nested .panel headers/rows (page shell is .panel only here) --- */
html[data-theme="light"] .panel h2 {
  background: #f0ede4 !important;
  color: #1c211e !important;
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] .panel .note {
  background: #fffefb !important;
  color: #a87620 !important;
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] .panel .row {
  border-bottom-color: #e8e4d9 !important;
}

html[data-theme="light"] .panel dt {
  color: #5c6560 !important;
}

html[data-theme="light"] .panel dd {
  color: #1c211e !important;
}

/* --- Dark table shells (admin voice log, leasing vacant, lockbox, etc.) --- */
html[data-theme="light"] .table-wrap {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] .table-wrap thead th {
  background: #f0ede4 !important;
  color: #5c6560 !important;
  border-bottom-color: #d4cec0 !important;
}

html[data-theme="light"] .table-wrap tbody td,
html[data-theme="light"] .table-wrap tbody th {
  color: #1c211e !important;
  border-color: #e8e4d9 !important;
}

html[data-theme="light"] .table-wrap tbody tr:hover td,
html[data-theme="light"] .table-wrap tbody tr:hover th {
  background: #faf7f0 !important;
}

html[data-theme="light"] .table-wrap th {
  color: #5c6560 !important;
}

/* --- HR Company Holidays (/hr/holidays) — .records-table td used light-on-dark text --- */
html[data-theme="light"] body.hr-holidays-page .records-table td {
  color: #1c211e !important;
}

html[data-theme="light"] body.hr-holidays-page .records-table th {
  color: #5c6560 !important;
}

html[data-theme="light"] body.hr-holidays-page .records-table th,
html[data-theme="light"] body.hr-holidays-page .records-table td {
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.hr-holidays-page .records-table tbody tr:hover td {
  background: #faf7f0 !important;
}

html[data-theme="light"] body.hr-holidays-page .year-heading {
  color: #1c211e !important;
}

html[data-theme="light"] body.hr-holidays-page .btn-outline {
  color: #5c6560 !important;
  border-color: #c4bdb0 !important;
}

html[data-theme="light"] body.hr-holidays-page .btn-outline:hover {
  color: #1c211e !important;
  border-color: #c8922a !important;
}

/* --- HR PTO Balance (/hr/pto) — tables + summary cards were dark-only --- */
html[data-theme="light"] body.pto-balance-page table {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.pto-balance-page thead th {
  background: #f0ede4 !important;
  color: #5c6560 !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.pto-balance-page tbody td {
  color: #1c211e !important;
  border-color: #e8e4d9 !important;
}

html[data-theme="light"] body.pto-balance-page tbody tr.clickable:hover {
  background: #faf7f0 !important;
}

html[data-theme="light"] body.pto-balance-page tbody tr.selected {
  background: #f0ede4 !important;
}

html[data-theme="light"] body.pto-balance-page tbody td[style*="c8922a"] {
  color: #a87620 !important;
}

html[data-theme="light"] body.pto-balance-page .summary-card {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.pto-balance-page .summary-card .label {
  color: #5c6560 !important;
}

html[data-theme="light"] body.pto-balance-page .summary-card .value {
  color: #1c211e !important;
}

html[data-theme="light"] body.pto-balance-page .summary-card .value.balance {
  color: #a87620 !important;
}

html[data-theme="light"] body.pto-balance-page h2.section-title {
  color: #1c211e !important;
}

/* --- Lockbox Inventory (/departments/leasing/lockbox-inventory) — dark panels + chart titles --- */
html[data-theme="light"] body.lockbox-inventory-page .update-form-wrap {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.lockbox-inventory-page .update-form-wrap h2 {
  color: #1c211e !important;
}

html[data-theme="light"] body.lockbox-inventory-page .update-form-wrap .form-group label {
  color: #5c6560 !important;
}

html[data-theme="light"] body.lockbox-inventory-page .update-form-wrap .form-group select,
html[data-theme="light"] body.lockbox-inventory-page .update-form-wrap .form-group input {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.lockbox-inventory-page .update-form-wrap .form-group select option {
  background: #fffefb !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.lockbox-inventory-page .toast.success {
  background: #e8f5e9 !important;
  color: #238636 !important;
  border-color: #b7d7bc !important;
}

html[data-theme="light"] body.lockbox-inventory-page .toast.error {
  background: #fde8e8 !important;
  color: #c5221f !important;
  border-color: #f5c2c0 !important;
}

html[data-theme="light"] body.lockbox-inventory-page .summary-card {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.lockbox-inventory-page .summary-card .value {
  color: #1c211e !important;
}

html[data-theme="light"] body.lockbox-inventory-page .summary-card .label {
  color: #5c6560 !important;
}

html[data-theme="light"] body.lockbox-inventory-page .chart-card {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.lockbox-inventory-page .chart-card h3 {
  color: #1c211e !important;
}

html[data-theme="light"] body.lockbox-inventory-page .filters .filter-group label {
  color: #5c6560 !important;
}

html[data-theme="light"] body.lockbox-inventory-page .filters .filter-group select {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.lockbox-inventory-page .no-data {
  color: #5c6560 !important;
}

/* --- Unit occupancy (/departments/leasing/vacant-units) — summary cards + badges + filters --- */
html[data-theme="light"] body.unit-occupancy-page .summary-card {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
}

html[data-theme="light"] body.unit-occupancy-page .summary-card .value {
  color: #1c211e !important;
}

html[data-theme="light"] body.unit-occupancy-page .summary-card .label {
  color: #5c6560 !important;
}

html[data-theme="light"] body.unit-occupancy-page .badge-occupied {
  background: #e8f0ff !important;
  color: #0969da !important;
}

html[data-theme="light"] body.unit-occupancy-page .badge-vacant {
  background: #e6f4ea !important;
  color: #238636 !important;
}

html[data-theme="light"] body.unit-occupancy-page .badge-pending {
  background: #fff8e6 !important;
  color: #9a6700 !important;
}

html[data-theme="light"] body.unit-occupancy-page .filter-row input,
html[data-theme="light"] body.unit-occupancy-page .filter-row select {
  background: #fffefb !important;
  border-color: #d4cec0 !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.unit-occupancy-page .meta {
  color: #5c6560 !important;
}

html[data-theme="light"] body.unit-occupancy-page .state-msg {
  color: #5c6560 !important;
}

html[data-theme="light"] body.unit-occupancy-page th.sortable:hover {
  background: #e8e4d9 !important;
}

html[data-theme="light"] body.unit-occupancy-page tr:hover td {
  background: #faf7f0 !important;
}

/*
 * RevComm directory contact profile — loaded after page inline CSS.
 * Forces light action links, timeline badges, and muted labels (global h2 / section color was still winning in some cases).
 */
html[data-theme="light"] body.directory-contact-page .action-bar a.btn-outline,
html[data-theme="light"] body.directory-contact-page .action-bar a.btn-edit {
  background: #fffefb !important;
  border: 1px solid #c4bdb0 !important;
  color: #5c6560 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.directory-contact-page .action-bar a.btn-outline:hover,
html[data-theme="light"] body.directory-contact-page .action-bar a.btn-edit:hover {
  background: #faf7f0 !important;
  border-color: #c8922a !important;
  color: #1c211e !important;
}

html[data-theme="light"] body.directory-contact-page section.block h2.block-hd {
  color: #8b949e !important;
}

html[data-theme="light"] body.directory-contact-page section.block span.handle-kind {
  color: #8b949e !important;
}

html[data-theme="light"] body.directory-contact-page section.block span.tl-pill {
  background: #f0ede4 !important;
  color: #5c6560 !important;
  border: 1px solid #d4cec0 !important;
}

html[data-theme="light"] body.directory-contact-page section.block .acct-subcard .pill {
  background: #f0ede4 !important;
  color: #5c6560 !important;
  border: 1px solid #d4cec0 !important;
}
