/* Shared light design system. Page layouts, data, and workflow states stay owned
   by their existing modules; this layer brings the remaining surfaces in line. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --ink:#12314e; --muted:#526b82; --line:#d6e2ec; --paper:#f5f8fb;
  --panel:#fff; --surface:#fff; --sage:#e8f3fc;
  --color-text-primary:#12314e; --color-text-secondary:#526b82;
  --color-background-secondary:#f5f8fb; --color-background-info:#e8f3fc;
  --color-text-info:#0869aa; --color-border-tertiary:#d6e2ec;
  --glass-fill:#fff; --glass-fill-soft:#f5f8fb; --glass-fill-hover:#e8f3fc;
  --glass-border:#d6e2ec; --glass-border-outer:#e9eff5;
  --glass-radius:10px; --glass-radius-sm:7px; --glass-radius-pill:7px;
  --shadow:0 2px 8px rgba(18,49,78,.04);
  --glass-shadow:0 2px 8px rgba(18,49,78,.04);
  --focus:0 0 0 3px rgba(8,105,170,.18);
}
:root[data-theme="light"] body { background:#f5f8fb!important; color:var(--ink); }
:root[data-theme="light"] body::before, :root[data-theme="light"] body::after { display:none; }
/* Shell: same navigation order and compact, recognizable navy rail. */
:root[data-theme="light"] #sidebar { background:#12314e!important; border-right:1px solid #203f5b; box-shadow:none!important; }
:root[data-theme="light"] #sidebar .nav-button { border-radius:7px!important; border:1px solid transparent!important; background:transparent!important; box-shadow:none!important; color:#dce8f3!important; font-weight:600; }
:root[data-theme="light"] #sidebar .nav-button:hover { background:#1e4464!important; color:#fff!important; }
:root[data-theme="light"] #sidebar .nav-button.is-active { background:#e8f3fc!important; color:#075e99!important; border-color:#e8f3fc!important; box-shadow:inset 3px 0 #1685c6!important; }
:root[data-theme="light"] #sidebar .sub-nav-button { font-size:13px; }
:root[data-theme="light"] .sidebar-brand { border-color:#34506a; }
:root[data-theme="light"] .user-card { border:1px solid var(--line)!important; border-radius:10px!important; box-shadow:none!important; }
:root[data-theme="light"] .page-header h1 { color:var(--ink); }
.page-header .app-title-row { display:flex; align-items:baseline; gap:10px; }
.page-header .app-title-row h1 { margin:0; }
.page-header #appReleaseVersion { color:var(--muted); font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
@media(max-width:760px) {
  .page-header .app-title-row { gap:8px; }
  .page-header .app-title-row h1 { font-size:clamp(1.6rem,7.3vw,2.5rem); white-space:nowrap; }
}
:root[data-theme="light"] #globalSearchPanel { background:#fff!important; border-color:var(--line)!important; border-radius:10px!important; box-shadow:none!important; }
:root[data-theme="light"] .mobile-bottom-nav, :root[data-theme="light"] .dog-show-mobile-nav { background:#12314e!important; border:1px solid #284965!important; border-radius:16px!important; }
:root[data-theme="light"] :is(.mobile-bottom-nav-button,.dog-show-mobile-nav button) { border-radius:9px!important; box-shadow:none!important; }
:root[data-theme="light"] :is(.mobile-bottom-nav-button,.dog-show-mobile-nav button).is-active { background:#235b83!important; border-color:#4485b3!important; color:#fff!important; }
:root[data-theme="light"] :is(.mobile-more-menu,.mobile-more-menu-list,.dog-show-more-menu) { background:#fff!important; color:var(--ink); border-color:var(--line)!important; }
/* Shared controls, including old editors. Keep destructive/status colors. */
:root[data-theme="light"] button { border-radius:7px; box-shadow:none; font-weight:650; }
:root[data-theme="light"] body:not(.is-login-view) :is(.secondary-button,.button-row>button,.settings-alert-actions>button,.user-card button) { border-radius:7px!important; box-shadow:none!important; }
:root[data-theme="light"] body:not(.is-login-view) .secondary-button:not(.danger-button):not(.is-active) { background:#fff; color:var(--ink); border-color:var(--line); }
:root[data-theme="light"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),select,textarea) { border-radius:7px!important; border-color:var(--line); background-color:#fff; color:var(--ink); box-shadow:none; }
:root[data-theme="light"] :is(input,select,textarea):focus-visible { outline:2px solid #1685c6; outline-offset:2px; }
:root[data-theme="light"] :is(button,a,summary,[role="tab"]):focus-visible { outline:3px solid #82bdf0; outline-offset:3px; }
:root[data-theme="light"] input:is([type="checkbox"],[type="radio"]) { accent-color:#0869aa; }
:root[data-theme="light"] :is(.detail-dialog,.media-dialog) { border:1px solid var(--line)!important; border-radius:12px!important; background:#fff!important; color:var(--ink); }
:root[data-theme="light"] .detail-dialog::backdrop { background:rgba(12,31,49,.5); backdrop-filter:blur(3px); }
:root[data-theme="light"] .detail-dialog :is(.dialog-header,.detail-dialog-body,.tracker-form) { background:#fff!important; color:var(--ink); border-color:var(--line); box-shadow:none!important; }
:root[data-theme="light"] .detail-dialog-body > * { min-width:0; }
:root[data-theme="light"] .detail-dialog :is(.record-card,.detail-row,.estimate-box,.estimate-total) { box-shadow:none!important; border-color:var(--line)!important; border-radius:8px!important; }
:root[data-theme="light"] .detail-dialog :is(.record-card,.detail-row) { background:#f5f8fb!important; }
:root[data-theme="light"] .detail-dialog button:not(.secondary-button):not(.danger-button):not([role="tab"]):not(.password-visibility-button) { background:#0869aa; border-color:#0869aa; color:#fff; }
:root[data-theme="light"] .detail-dialog .secondary-button { border-radius:7px!important; box-shadow:none!important; }
:root[data-theme="light"] body .danger-button { color:#ad332f!important; background:#fff4f2!important; border-color:#edb8b3!important; }
:root[data-theme="light"] body .danger-button:hover { background:#fbe6e4!important; }
/* Remaining workspaces. Existing modern pages retain their specialized layouts. */
:root[data-theme="light"] :is(#taskSchedulerPage,#dogShowPage,#settingsSetupPage,#settingsUsersPage,#settingsKennelLocationsPage,#settingsAlertsPage,#settingsAuditLogPage) { --workspace-blue:#0869aa; color:var(--ink); }
:root[data-theme="light"] :is(#taskSchedulerPage,#dogShowPage,#settingsSetupPage,#settingsUsersPage,#settingsKennelLocationsPage,#settingsAlertsPage,#settingsAuditLogPage) > :is(.form-section,.recent-submissions) { background:#fff!important; border:1px solid var(--line)!important; border-radius:10px!important; box-shadow:none!important; backdrop-filter:none; animation:none; }
:root[data-theme="light"] :is(#taskSchedulerPage,#dogShowPage,#settingsSetupPage,#settingsUsersPage,#settingsKennelLocationsPage,#settingsAlertsPage,#settingsAuditLogPage) h2 { font-size:28px; letter-spacing:-.6px; color:var(--ink); }
:root[data-theme="light"] :is(#taskSchedulerPage,#dogShowPage,#settingsSetupPage,#settingsUsersPage,#settingsKennelLocationsPage,#settingsAlertsPage,#settingsAuditLogPage) .section-heading > span { display:none; }
:root[data-theme="light"] :is(#taskSchedulerPage,#dogShowPage,#settingsSetupPage,#settingsUsersPage,#settingsKennelLocationsPage,#settingsAlertsPage,#settingsAuditLogPage) :is(.record-card,.table-wrap,.summary-card,.settings-brand-preview,.settings-agreement-document-card,.settings-agreement-option) { border-color:var(--line)!important; border-radius:8px!important; box-shadow:none!important; background:#fff!important; }
:root[data-theme="light"] :is(#taskSchedulerPage,#dogShowPage,#settingsSetupPage,#settingsUsersPage,#settingsKennelLocationsPage,#settingsAlertsPage,#settingsAuditLogPage) :is(.button-row>button,button[type="submit"],#dogShowNewEventButton,#openScheduledCareTaskButton,#openSettingsUserButton,#addKennelLocationButton):not(.secondary-button):not(.danger-button) { background:#0869aa!important; color:#fff!important; border-color:#0869aa!important; }
:root[data-theme="light"] :is(#settingsUserTabs,#kennelBuildingTabs,#dogShowDesktopNav) { border:0!important; border-bottom:1px solid var(--line)!important; background:transparent!important; box-shadow:none!important; border-radius:0!important; gap:16px; padding:0; }
:root[data-theme="light"] :is(#settingsUserTabs,#kennelBuildingTabs,#dogShowDesktopNav)>button { flex:0 0 auto; background:transparent!important; color:var(--muted)!important; border:0!important; border-bottom:3px solid transparent!important; border-radius:0!important; box-shadow:none!important; padding:12px 4px; font-size:14px; }
:root[data-theme="light"] :is(#settingsUserTabs,#kennelBuildingTabs,#dogShowDesktopNav)>button.is-active { color:#0869aa!important; border-bottom-color:#0869aa!important; }
:root[data-theme="light"] :is(#settingsUserTabs,#kennelBuildingTabs)>button span { background:#edf2f7; color:var(--muted); border-radius:4px; }
:root[data-theme="light"] :is(#settingsUsersPage,#dogShowPage,#taskSchedulerPage) .data-table th { background:#f5f8fb!important; color:var(--muted)!important; font-size:12px; letter-spacing:.6px; }
:root[data-theme="light"] :is(#settingsUsersPage,#dogShowPage,#taskSchedulerPage) .data-table td { border-color:var(--line); vertical-align:top; }
:root[data-theme="light"] #settingsUsersPage .table-wrap { padding:0; }
:root[data-theme="light"] #settingsUsersPage :is(.settings-user-card,.settings-users-toolbar) { box-shadow:none!important; }
:root[data-theme="light"] #settingsUserTableBody tr:hover { background:#f0f7fc; }
:root[data-theme="light"] #settingsSetupPage :is(.settings-brand-preview,.settings-agreement-option>summary) { background:#f5f8fb!important; color:var(--ink); }
:root[data-theme="light"] #settingsSetupPage .settings-agreement-option { overflow:hidden; }
:root[data-theme="light"] #settingsSetupPage :is(.field-grid>*,fieldset,.settings-agreement-repeatable-list,.settings-agreement-option-content) { min-width:0; max-width:100%; }
:root[data-theme="light"] #settingsSetupPage input[type="file"] { width:100%; min-width:0; }
:root[data-theme="light"] #kennelLocationList .record-card { border-left:3px solid #1685c6!important; }
:root[data-theme="light"] #auditLogList { gap:0; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
:root[data-theme="light"] #auditLogList .record-card { border:0!important; border-bottom:1px solid var(--line)!important; border-radius:0!important; padding:18px; }
:root[data-theme="light"] #auditLogList .record-card:last-child { border-bottom:0!important; }
:root[data-theme="light"] #auditLogList .record-card p { font-size:13px; line-height:1.5; }
/* Scheduling keeps its time grid, event colors, drag/drop, and detail panel. */
:root[data-theme="light"] #taskSchedulerPage :is(.task-scheduler-sidebar,.task-scheduler-board,.task-scheduler-detail-panel,.task-scheduler-mini-calendar,.task-scheduler-legend) { background:#fff!important; border-color:var(--line)!important; border-radius:8px; box-shadow:none!important; }
:root[data-theme="light"] #taskSchedulerPage :is(.task-scheduler-week-header,.task-scheduler-day-board-header,.task-scheduler-time-label) { background:#f5f8fb; color:var(--muted); }
:root[data-theme="light"] #taskSchedulerPage .task-scheduler-week-header.is-today { background:#e8f3fc; color:#0869aa; }
:root[data-theme="light"] #taskSchedulerPage .task-scheduler-help-strip { background:#f5f8fb; color:var(--muted); border-color:var(--line); border-radius:7px; }
:root[data-theme="light"] #taskSchedulerPage .segmented-control { box-shadow:none!important; background:#f5f8fb!important; border:1px solid var(--line)!important; border-radius:7px!important; }
:root[data-theme="light"] #taskSchedulerPage .segmented-control button { border-radius:5px!important; box-shadow:none!important; background:transparent!important; color:var(--muted)!important; }
:root[data-theme="light"] #taskSchedulerPage .segmented-control button.is-active { background:#0869aa!important; color:#fff!important; }
/* Dog-show sections share the new surface treatment, not new workflow rules. */
:root[data-theme="light"] #dogShowPage :is(.dog-show-panel,.dog-show-summary-card,.dog-show-stat-card,.dog-show-calendar-panel,.dog-show-progress-section,.dog-show-finance-card,.dog-show-roster-card,.dog-show-empty-state) { background:#fff!important; border:1px solid var(--line)!important; border-radius:8px!important; box-shadow:none!important; }
:root[data-theme="light"] #dogShowPage :is(.dog-show-section-header,.dog-show-panel-header) { border-color:var(--line); }
:root[data-theme="light"] #dogShowPage .dog-show-event-toolbar label { color:var(--muted); }
:root[data-theme="light"] #dogShowPage > .dog-show-workspace { padding:22px!important; }
:root[data-theme="light"] #dogShowPage :is(.dog-show-expenses-heading,.dog-show-planner-heading,.dog-show-calculator-heading,.dog-show-progress-heading,.dog-show-finance-report-heading,.dog-show-dog-report-selector,.dog-show-progress-dog-hero,.dog-show-judge-hero) { background:#f5f8fb!important; color:var(--ink)!important; border:1px solid var(--line)!important; border-radius:8px!important; box-shadow:none!important; }
:root[data-theme="light"] #dogShowPage :is(.dog-show-expenses-heading,.dog-show-planner-heading,.dog-show-calculator-heading,.dog-show-progress-heading,.dog-show-finance-report-heading,.dog-show-dog-report-selector,.dog-show-progress-dog-hero,.dog-show-judge-hero) :is(h3,h4,p,strong) { color:var(--ink)!important; }
:root[data-theme="light"] #dogShowPage :is(.dog-show-expenses-heading,.dog-show-planner-heading,.dog-show-calculator-heading,.dog-show-progress-heading)> :is(span,div>span) { color:var(--muted)!important; }
:root[data-theme="light"] #dogShowPage :is(.dog-show-expenses-heading,.dog-show-planner-heading,.dog-show-calculator-heading,.dog-show-progress-heading) span { color:var(--muted)!important; }
:root[data-theme="light"] #dogShowPage :is(.dog-show-upcoming-shows,.dog-show-upcoming-bulk,.dog-show-event-summary,.dog-show-expense-group,.dog-show-expense-split,.dog-show-finance-report-group,.dog-show-customer-report-card,.dog-show-calculator-form,.dog-show-calculator-results,.dog-show-planner-card,.dog-show-plan-board,.dog-show-plan-event-card,.dog-show-master-calendar,.dog-show-potential-plan,.dog-show-potential-card,.dog-show-dog-row,.dog-show-task-batch,.dog-show-progress-dog-row) { background:#fff!important; border-color:var(--line)!important; border-radius:8px!important; box-shadow:none!important; }
:root[data-theme="light"] #dogShowPage :is(.dog-show-stat-grid,.dog-show-expense-stats,.dog-show-finance-report-stats,.dog-show-customer-report-stats,.dog-show-dog-report-stats)>article { background:#f5f8fb!important; border:1px solid var(--line)!important; border-radius:8px!important; box-shadow:none!important; }
:root[data-theme="light"] #dogShowPage :is(.dog-show-finance-mode-tabs,.dog-show-finance-period-tabs,.dog-show-finance-scope-tabs,.dog-show-calendar-view-toggle,.dog-show-filter-row) button.is-active { background:#0869aa!important; color:#fff!important; border-color:#0869aa!important; }
:root[data-theme="light"] #dogShowPage :is(.dog-show-more-grid>button,.dog-show-summary-list>button,.dog-show-summary-list>article) { background:#f5f8fb!important; color:var(--ink)!important; border-color:var(--line)!important; border-radius:8px!important; box-shadow:none!important; }
/* Notification center, urgent-alert composers and access management. */
:root[data-theme="light"] :is(#notificationPanel,.notification-panel-header,.notification-item) { background:#fff!important; border-color:var(--line)!important; color:var(--ink); box-shadow:none!important; }
:root[data-theme="light"] #notificationPanel { border-radius:12px!important; box-shadow:0 16px 48px rgba(18,49,78,.16)!important; }
:root[data-theme="light"] .notification-item { border-radius:7px!important; }
:root[data-theme="light"] .notification-item:not(.is-read) { border-left:3px solid #1685c6!important; }
:root[data-theme="light"] #settingsAlertPreferenceList .record-card { background:#f5f8fb!important; }
:root[data-theme="light"] .detail-dialog .alert-checkbox-grid { align-items:start; }
:root[data-theme="light"] .detail-dialog .alert-checkbox-group { align-content:start; gap:0; background:#fff!important; border:1px solid var(--line)!important; border-radius:8px!important; box-shadow:none!important; padding:12px; }
:root[data-theme="light"] .detail-dialog .alert-checkbox-group h3 { font-size:13px; color:var(--muted); margin:0 0 8px; }
:root[data-theme="light"] .detail-dialog .alert-checkbox-group label { min-height:44px; background:transparent!important; border:0!important; border-bottom:1px solid var(--line)!important; border-radius:0!important; box-shadow:none!important; padding:10px 0; font-size:13px; line-height:1.45; }
:root[data-theme="light"] .detail-dialog .alert-checkbox-group label:last-child { border-bottom:0!important; }
/* Login is already a modern two-column form; align recovery/signup and accents. */
:root[data-theme="light"] #loginPage :is(.login-panel,.signup-panel) { background:#fff!important; border:1px solid var(--line)!important; border-radius:12px!important; box-shadow:none!important; }
:root[data-theme="light"] #loginPage :is(input,.auth-provider-button) { border-color:var(--line)!important; border-radius:7px!important; }
:root[data-theme="light"] #loginPage .auth-submit-button { background:#0869aa!important; border-color:#0869aa!important; border-radius:7px!important; box-shadow:none!important; }
:root[data-theme="light"] :is(.customer-book-now-button,#customerBookNowButton) { background:#0869aa!important; border-color:#0869aa!important; border-radius:8px!important; box-shadow:none!important; }
@media(max-width:700px) {
  :root[data-theme="light"] #dogShowPage > .dog-show-workspace { padding:14px!important; }
  :root[data-theme="light"] #dogShowPage h2 { font-size:24px; }
  :root[data-theme="light"] :is(#settingsUserTabs,#kennelBuildingTabs,#dogShowDesktopNav) { flex-wrap:nowrap; overflow-x:auto; gap:16px; }
  :root[data-theme="light"] :is(#settingsSetupPage,#settingsUsersPage,#settingsKennelLocationsPage,#settingsAlertsPage,#settingsAuditLogPage) .section-heading { align-items:flex-start; }
  :root[data-theme="light"] :is(#settingsSetupPage,#settingsUsersPage,#settingsKennelLocationsPage,#settingsAlertsPage,#settingsAuditLogPage) h2 { font-size:24px; }
  :root[data-theme="light"] #settingsSetupPage .field-grid { grid-template-columns:minmax(0,1fr); }
  :root[data-theme="light"] #settingsUsersPage .settings-user-card { border:1px solid var(--line)!important; border-radius:8px!important; }
  :root[data-theme="light"] #auditLogList .record-card { padding:14px; overflow-wrap:anywhere; }
  :root[data-theme="light"] .detail-dialog :is(input,select,textarea) { max-width:100%; }
}
@media(prefers-reduced-motion:reduce) {
  :root[data-theme="light"] :is(.page-view,.form-section,.record-card,button) { animation:none!important; transition:none!important; }
}
