/* Shared detail pages, list controls, and the persistent dark option. */
.hr-search-select { position: relative; display: flex; min-width: 0; }
.hr-search-select > input { padding-right: 38px; width: 100%; }
.hr-search-toggle { position: absolute; z-index: 1; right: 4px; top: 4px; bottom: 4px; width: 30px; border: 0; border-radius: 8px; background: transparent; color: #647298; font-size: 1.25rem; }
.hr-search-toggle:hover { background: #e9edff; }
.hr-search-options { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 230px; overflow-y: auto; padding: 5px; border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface-background); box-shadow: var(--panel-shadow); }
.hr-search-options[hidden] { display: none; }
.hr-search-option { display: block; width: 100%; border: 0; border-radius: 7px; padding: 7px 10px; background: transparent; color: var(--brand-text); text-align: left; }
.hr-search-option:hover, .hr-search-option:focus-visible { background: #e9edff; color: #394fb8; }
.hr-search-hint { padding: 8px 10px; color: #75819a; font-size: .83rem; }
html[data-theme="dark"] .hr-search-toggle { color: #c2cbea; }
html[data-theme="dark"] .hr-search-toggle:hover, html[data-theme="dark"] .hr-search-option:hover, html[data-theme="dark"] .hr-search-option:focus-visible { background: #3b4b74; color: #f0f2ff; }
.hr-workweek-menu { position: relative; max-width: 420px; }
.hr-workweek-menu summary { cursor: pointer; list-style: none; }
.hr-workweek-menu summary::-webkit-details-marker { display: none; }
.hr-workweek-menu summary::after { content: '⌄'; float: right; }
.hr-workweek-options { position: absolute; z-index: 15; inset-inline: 0; top: calc(100% + 4px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 10px; border: 1px solid var(--surface-border); border-radius: 13px; background: var(--surface-background); box-shadow: var(--panel-shadow); }
.hr-workweek-options label { display: flex; align-items: center; gap: 7px; padding: 6px; border-radius: 8px; }
.hr-workweek-options label:hover { background: var(--surface-muted); }
.hrms-shell .hero-panel { background: linear-gradient(115deg, #5969d5 0%, #5d8fdf 56%, #51c7dd 100%); box-shadow: var(--panel-shadow); }
.hrms-shell .hero-panel .eyebrow { color: #e6eaff; }
.hrms-shell .hero-panel p { color: #f4f8ff; }
.hrms-shell .record-section { border: 1px solid #e6eafa; border-radius: var(--panel-radius); background: rgba(255,255,255,.83); box-shadow: var(--panel-shadow); }
.hrms-shell .entry-list-controls { background: #f5f7ff; border-color: #e3e8fa; border-radius: 16px; }
.hrms-shell .entry-list-summary span { background: #e9edff; color: #33477f; }
.hrms-shell .entry-list-summary span:first-child { background: #dfe6ff; }
.hrms-shell .entry-list-row:hover > td, .hrms-shell .ticket-history-row:hover > td, .hrms-shell .ticket-history-row:focus-visible > td { background: #eef2ff; }
.hrms-shell .ticket-history-row:focus-visible { outline-color: var(--accent-violet); }
.hrms-shell .entry-list-dialog { background: #fff; border-color: #dfe6fa; color: var(--brand-text); }
.hrms-shell .entry-list-dialog::backdrop { background: rgba(28,35,65,.55); }
.hrms-shell .entry-list-link, .hrms-shell .ticket-history-row a.entry-list-link { color: #4d61c4; }
.hr-theme-toggle { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #dfe5f5; border-radius: 11px; padding: 6px 10px; background: #f7f9ff; color: #43577a; font-size: .85rem; font-weight: 650; white-space: nowrap; }
.hr-theme-toggle:hover { background: #e9edff; color: #394fb8; }
.hr-theme-toggle:focus-visible { outline: 3px solid #8998ec; outline-offset: 2px; }
.hr-theme-icon { font-size: 1.1rem; line-height: 1; }
@media (max-width: 600px) { .hr-theme-label { display: none; } .erp-topbar .navbar-nav { gap: 8px; } }

/* Change these dark surface values to tune the alternate theme. */
html[data-theme="dark"] { color-scheme: dark; --brand-primary: #a7b4ff; --brand-text: #e8ecfa; --surface-background: #202941; --surface-muted: #27334e; --surface-border: #394763; --tab-inactive-text: #c5cdeb; --tab-border: #465478; --panel-shadow: 0 15px 40px rgba(5,10,25,.28); }
html[data-theme="dark"] body.hrms-shell { color: var(--brand-text); background: radial-gradient(circle at 74% 3%, #30365b 0, transparent 30%), radial-gradient(circle at 95% 80%, #203d49 0, transparent 34%), #141b2d; }
html[data-theme="dark"] .hrms-shell .erp-sidebar, html[data-theme="dark"] .hrms-shell .erp-topbar-inner { background: rgba(29,38,61,.95); border-color: #394763; }
html[data-theme="dark"] .hrms-shell .erp-sidebar-head, html[data-theme="dark"] .hrms-shell .erp-content>footer { border-color: #394763; }
html[data-theme="dark"] .hrms-shell .brand-word, html[data-theme="dark"] .hrms-shell .topbar-label, html[data-theme="dark"] .hrms-shell .erp-sidebar-brand { color: #edf0ff; }
html[data-theme="dark"] .hrms-shell .erp-nav-link, html[data-theme="dark"] .hrms-shell .erp-nav-group>summary, html[data-theme="dark"] .hrms-shell .erp-nav-children a, html[data-theme="dark"] .hrms-shell .erp-nav-initial { color: #cbd4ef; }
html[data-theme="dark"] .hrms-shell .erp-nav-link.active, html[data-theme="dark"] .hrms-shell .erp-nav-children a.active, html[data-theme="dark"] .hrms-shell .erp-nav-link:hover, html[data-theme="dark"] .hrms-shell .erp-nav-group>summary:hover, html[data-theme="dark"] .hrms-shell .erp-nav-children a:hover { background: #344367; color: #eff1ff; }
html[data-theme="dark"] .hrms-shell .erp-nav-initial, html[data-theme="dark"] .hrms-shell .erp-sidebar-toggle, html[data-theme="dark"] .hrms-shell .erp-mobile-toggle { background: #293754; border-color: #455473; color: #b9c5ff; }
html[data-theme="dark"] .hrms-shell .erp-topbar .nav-link, html[data-theme="dark"] .hrms-shell .erp-topbar .nav-link.text-dark { color: #e1e8fb !important; }
html[data-theme="dark"] .hr-theme-toggle { background: #324163; border-color: #526286; color: #e6ecff; }
html[data-theme="dark"] .hr-theme-toggle:hover { background: #405480; }
html[data-theme="dark"] .hrms-shell .page-heading h1, html[data-theme="dark"] .hrms-shell .section-heading h1, html[data-theme="dark"] .hrms-shell h2, html[data-theme="dark"] .hrms-shell h3, html[data-theme="dark"] .hrms-shell h4 { color: #f0f2ff; }
html[data-theme="dark"] .hrms-shell .page-heading p, html[data-theme="dark"] .hrms-shell .section-heading p, html[data-theme="dark"] .hrms-shell .form-text, html[data-theme="dark"] .hrms-shell .text-muted, html[data-theme="dark"] .hrms-shell small { color: #abb7d3 !important; }
html[data-theme="dark"] .hrms-shell .app-panel, html[data-theme="dark"] .hrms-shell .erp-form-panel, html[data-theme="dark"] .hrms-shell .card, html[data-theme="dark"] .hrms-shell .dashboard-hr-panel, html[data-theme="dark"] .hrms-shell .record-section, html[data-theme="dark"] .hrms-shell .metric-card, html[data-theme="dark"] .hrms-shell .home-grid .app-panel, html[data-theme="dark"] .hrms-shell .hr-leave-metrics a { background: #202941; border-color: #394763; color: #e8ecfa; }
html[data-theme="dark"] .hrms-shell .hero-panel { background: linear-gradient(115deg, #424caa 0%, #385d9a 56%, #226d85 100%); }
html[data-theme="dark"] .hrms-shell .admin-tabs, html[data-theme="dark"] .hrms-shell .hr-view-toggle { background: #26324c; border-color: #45516f; }
html[data-theme="dark"] .hrms-shell .admin-tabs button, html[data-theme="dark"] .hrms-shell .hr-view-toggle button { color: #c0cae4; }
html[data-theme="dark"] .hrms-shell .admin-tabs button.active, html[data-theme="dark"] .hrms-shell .hr-view-toggle button[aria-pressed="true"], html[data-theme="dark"] .hrms-shell .admin-tabs button:hover { background: #3b4b74; color: #f0f2ff; }
html[data-theme="dark"] .hrms-shell .form-control, html[data-theme="dark"] .hrms-shell .form-select, html[data-theme="dark"] .hrms-shell .entry-list-dialog { background: #1a253b; border-color: #465575; color: #edf0ff; }
html[data-theme="dark"] .hrms-shell .form-control::placeholder { color: #9aa8c7; }
html[data-theme="dark"] .hrms-shell .form-label, html[data-theme="dark"] .hrms-shell label, html[data-theme="dark"] .hrms-shell .record-label { color: #bbc6e1; }
html[data-theme="dark"] .hrms-shell .table { --bs-table-bg: transparent; --bs-table-color: #e8ecfa; --bs-table-border-color: #3a4761; color: #e8ecfa; }
html[data-theme="dark"] .hrms-shell .table thead th { background: #2a3654; color: #d3dcf3; border-color: #485673; }
html[data-theme="dark"] .hrms-shell .table tbody tr:hover, html[data-theme="dark"] .hrms-shell .entry-list-row:hover > td, html[data-theme="dark"] .hrms-shell .ticket-history-row:hover > td { background: #314164; }
html[data-theme="dark"] .hrms-shell .entry-list-controls, html[data-theme="dark"] .hrms-shell .entry-list-summary span, html[data-theme="dark"] .hrms-shell .entry-list-summary span:first-child { background: #2a3857; border-color: #435375; color: #e8ecfa; }
html[data-theme="dark"] .hrms-shell .erp-main-container a:not(.btn):not(.hr-timeline-bar) { color: #aebaff; }
html[data-theme="dark"] .hrms-shell .btn-light, html[data-theme="dark"] .hrms-shell .btn-outline-secondary, html[data-theme="dark"] .hrms-shell .hr-person-actions a { background: #303e5d; border-color: #52617f; color: #edf0ff; }
html[data-theme="dark"] .hrms-shell .status-pill, html[data-theme="dark"] .hrms-shell .person-status { background: #244d52; color: #a9eee0; }
html[data-theme="dark"] .hrms-shell .hr-workflow-progress { background: #202941; border-color: #394763; }
html[data-theme="dark"] .hrms-shell .hr-workflow-progress-head, html[data-theme="dark"] .hrms-shell .hr-workflow-step { color: #e8ecfa; }
html[data-theme="dark"] .hrms-shell .hr-person-card { background: #24304a; border-color: #405073; }
html[data-theme="dark"] .hrms-shell .hr-person-card h3 a, html[data-theme="dark"] .hrms-shell .hr-person-card dd, html[data-theme="dark"] .hrms-shell .hr-leave-metrics strong, html[data-theme="dark"] .hrms-shell .hr-timeline-navigation strong { color: #e8ecfa; }
html[data-theme="dark"] .hrms-shell .hr-person-card dl, html[data-theme="dark"] .hrms-shell .hr-timeline-scroll, html[data-theme="dark"] .hrms-shell .hr-timeline-row, html[data-theme="dark"] .hrms-shell .hr-timeline-cell { border-color: #42516d; }
html[data-theme="dark"] .hrms-shell .hr-timeline-heading, html[data-theme="dark"] .hrms-shell .hr-calendar-weekday { background: #2c3a59; color: #d4dcf1; }
html[data-theme="dark"] .hrms-shell .hr-timeline-person, html[data-theme="dark"] .hrms-shell .hr-calendar-day { color: #dbe2f7; }
html[data-theme="dark"] .hrms-shell .hr-calendar-day, html[data-theme="dark"] .hrms-shell .hr-calendar-day.empty { background: #26334d; border-color: #41506d; }
html[data-theme="dark"] .hrms-shell .hr-calendar-event { background: #394c85; color: #f1f2ff; }
html[data-theme="dark"] .hrms-shell .hr-calendar-holiday, html[data-theme="dark"] .hrms-shell .hr-calendar-approved { background: #225c55; color: #c2f4e7; }
html[data-theme="dark"] .hrms-shell .hr-calendar-pending { background: #48416f; color: #e9dcff; }
html[data-theme="dark"] .hrms-shell .hr-donut>div { background: #202941; box-shadow: inset 0 0 0 1px #45516f; }
html[data-theme="dark"] .hrms-shell .hr-donut strong, html[data-theme="dark"] .hrms-shell .hr-donut-legend strong { color: #edf0ff; }
html[data-theme="dark"] .hrms-shell .hr-request-preview, html[data-theme="dark"] .hrms-shell .hr-donut-legend span { color: #dce4f8; }
