/* Theme controls shared by both visual styles. */
.theme-settings-entry { flex: 0 0 auto; font-size: 13px; font-weight: 700; }
.theme-settings-page { max-width: 900px; margin: 0 auto 16px; }
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.theme-option { position: relative; display: grid; gap: 11px; padding: 15px; border: 2px solid #d6e2e6; border-radius: 10px; background: #fff; cursor: pointer; }
.theme-option:has(input:checked) { border-color: #087ea4; box-shadow: 0 0 0 3px rgba(8, 126, 164, .12); }
.theme-option input { position: absolute; top: 14px; right: 14px; width: 19px; height: 19px; margin: 0; accent-color: #087ea4; }
.theme-option-preview { height: 112px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; align-content: start; padding: 10px; border: 1px solid #d6e2e6; border-radius: 6px; }
.theme-option-preview i { grid-column: 1 / -1; height: 20px; }
.theme-option-preview b { height: 55px; border: 1px solid; }
.classic-preview { background: #f5f7f8; }
.classic-preview i { background: #087ea4; border-radius: 4px; }
.classic-preview b { background: #fff; border-color: #d6e2e6; border-radius: 5px; }
.orion-preview { background: #f3f6fb; }
.orion-preview i { background: linear-gradient(90deg, #174a8c 0 23%, #fff 23%); border: 1px solid #53637a; }
.orion-preview b { background: repeating-linear-gradient(0deg, #e8f1fc, #e8f1fc 8px, #fff 8px, #fff 15px); border-color: #53637a; }
.theme-option-copy { display: grid; gap: 3px; padding-right: 20px; }
.theme-option-copy strong { font-size: 16px; }
.theme-option-copy small { color: #667880; font-size: 12px; line-height: 1.4; }
.theme-settings-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #dde5e8; padding-top: 16px; }

/* Star orbit: a compact control-room treatment inspired by the reference image. */
body[data-theme="orion"] {
  --orion-ink: #18324d;
  --orion-muted: #587086;
  --orion-border: #b8cbd9;
  --orion-blue: #2866a8;
  --orion-blue-dark: #1d4f88;
  --orion-teal: #147f8a;
  --orion-pale: #f2f7fb;
  --orion-line: #d5e2eb;
  --orion-danger: #b54747;
  background: #f3f7fa;
  color: var(--orion-ink);
  font-family: "IBM Plex Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body[data-theme="orion"] .topbar {
  min-height: 68px;
  margin: 12px 16px 0;
  padding: 9px 15px 9px 0;
  border: 1px solid var(--orion-line);
  border-radius: 3px 3px 0 0;
  background: #fff;
  box-shadow: 0 2px 0 rgba(38, 83, 125, .08);
}
body[data-theme="orion"] .topbar > div:first-child { display: grid; grid-template-columns: 56px auto; column-gap: 14px; align-items: center; }
body[data-theme="orion"] .topbar > div:first-child::before { content: "◆"; grid-row: 1 / 3; height: 66px; display: grid; place-items: center; background: var(--orion-blue); color: #fff; font-size: 24px; }
body[data-theme="orion"] h1,
body[data-theme="orion"] h2,
body[data-theme="orion"] h3,
body[data-theme="orion"] .label,
body[data-theme="orion"] th {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Noto Sans SC", monospace;
  letter-spacing: .035em;
}
body[data-theme="orion"] h1 { font-size: 21px; line-height: 1.2; }
body[data-theme="orion"] h2 { font-size: 15px; text-transform: uppercase; }
body[data-theme="orion"] #entryHint { color: var(--orion-muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
body[data-theme="orion"] main { max-width: 1520px; padding: 12px 16px 28px; }
body[data-theme="orion"] .home-panel,
body[data-theme="orion"] .panel { border: 1px solid var(--orion-line); border-radius: 3px; background: #fff; padding: 15px; box-shadow: 0 2px 0 rgba(33, 56, 88, .06); }
body[data-theme="orion"] .home-head { align-items: center; padding-bottom: 10px; border-bottom: 1px solid #aebbc9; }
body[data-theme="orion"] .home-identity { border: 1px solid #aebbc9; border-radius: 2px; background: #f7faff; }
body[data-theme="orion"] .identity-name { font-family: "IBM Plex Mono", "Noto Sans SC", monospace; color: #204b85; }
body[data-theme="orion"] .identity-tag { border: 1px solid #adc4de; border-radius: 2px; background: #e9f2fd; color: #204b85; }
body[data-theme="orion"] .hint,
body[data-theme="orion"] label,
body[data-theme="orion"] .label { color: var(--orion-muted); }
body[data-theme="orion"] button:not(.task-link):not(.danger-link),
body[data-theme="orion"] select,
body[data-theme="orion"] input,
body[data-theme="orion"] textarea { border-radius: 2px; }
body[data-theme="orion"] button:not(.secondary):not(.nav-tile):not(.task-link):not(.danger-link):not(.daily-person-chip):not(.management-stat):not(.pill-action):not(.segment-button):not(.tag-toggle):not(.travel-amount-link) { border-color: var(--orion-blue-dark); background: var(--orion-blue); color: #fff; }
body[data-theme="orion"] button.secondary { border-color: #9eb5c7; background: #fff; color: var(--orion-blue-dark); }
body[data-theme="orion"] button.secondary:hover { border-color: var(--orion-blue); background: #f1f7fc; }
body[data-theme="orion"] button:focus-visible,
body[data-theme="orion"] input:focus-visible,
body[data-theme="orion"] select:focus-visible { outline: 2px solid #12a2b1; outline-offset: 2px; }
body[data-theme="orion"] .metric-table-wrap,
body[data-theme="orion"] .task-table-wrap,
body[data-theme="orion"] .performance-table-wrap { border-color: var(--orion-border); border-radius: 2px; }
body[data-theme="orion"] table { border-collapse: collapse; }
body[data-theme="orion"] th { background: #eaf1fa; color: #204b85; font-size: 11px; font-weight: 800; text-transform: uppercase; }
body[data-theme="orion"] td,
body[data-theme="orion"] th { border-bottom-color: #c9d5e3; }
body[data-theme="orion"] tbody tr:nth-child(even) { background: #f6f9fd; }
body[data-theme="orion"] tbody tr:hover { background: #eaf5fb; }
body[data-theme="orion"] .metric-table th,
body[data-theme="orion"] .metric-table td { padding: 10px 12px; border-right: 1px solid #c9d5e3; }
body[data-theme="orion"] .metric-table td { color: #245a9e; font-family: "IBM Plex Mono", Consolas, monospace; font-size: 21px; }
body[data-theme="orion"] .home-nav { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 7px; }
body[data-theme="orion"] .nav-tile { min-height: 44px; border: 1px solid #b5cad9; border-radius: 2px; background: #f9fbfe; color: #204b85; font-family: "IBM Plex Mono", "Noto Sans SC", monospace; font-size: 12px; letter-spacing: .02em; }
body[data-theme="orion"] .nav-tile:hover,
body[data-theme="orion"] .nav-tile.active { border-color: var(--orion-blue); background: #e5f0fb; color: var(--orion-blue-dark); }
body[data-theme="orion"] .sub-nav { top: 0; background: #edf2f8; border-color: #9daec2; }
body[data-theme="orion"] .sub-nav .nav-tile { min-height: 36px; }
body[data-theme="orion"] .analytics-dashboard { border-top: 1px solid #8293a9; gap: 9px; }
body[data-theme="orion"] .analytics-cards { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
body[data-theme="orion"] .analytics-card,
body[data-theme="orion"] .analytics-block,
body[data-theme="orion"] .management-stat,
body[data-theme="orion"] .management-filter-card,
body[data-theme="orion"] .performance-score-card,
body[data-theme="orion"] .performance-block,
body[data-theme="orion"] .daily-task-card,
body[data-theme="orion"] .daily-task-list-item,
body[data-theme="orion"] .task-key-facts > div,
body[data-theme="orion"] .detail-stat { border: 1px solid #8b9caf; border-radius: 2px; background: #fff; box-shadow: none; }
body[data-theme="orion"] .analytics-card { min-height: 84px; padding: 9px; border-top: 3px solid #245a9e; }
body[data-theme="orion"] .analytics-card:nth-child(3n + 2) { border-top-color: #128f9b; }
body[data-theme="orion"] .analytics-card:nth-child(3n) { border-top-color: #bd7e3f; }
body[data-theme="orion"] .analytics-card span,
body[data-theme="orion"] .analytics-card em { color: var(--orion-muted); }
body[data-theme="orion"] .analytics-card strong,
body[data-theme="orion"] .management-stat strong,
body[data-theme="orion"] .performance-score-card strong { color: #245a9e; font-family: "IBM Plex Mono", Consolas, monospace; }
body[data-theme="orion"] .analytics-grid { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 8px; }
body[data-theme="orion"] .analytics-block { padding: 12px; }
body[data-theme="orion"] .analytics-block h3,
body[data-theme="orion"] .section-head h2 { color: #183e71; }
body[data-theme="orion"] .analytics-table th,
body[data-theme="orion"] .analytics-table td,
body[data-theme="orion"] .task-table th,
body[data-theme="orion"] .task-table td,
body[data-theme="orion"] .performance-table th,
body[data-theme="orion"] .performance-table td { border-right: 1px solid #d6e0eb; }
body[data-theme="orion"] .status-panel { gap: 7px; }
body[data-theme="orion"] .status-panel > div { padding: 10px; border: 1px solid #8b9caf; background: #f8fbff; }
body[data-theme="orion"] .daily-work-summary { border: 1px solid #92a4b9; border-radius: 2px; background: #eef5fd; color: #245a75; }
body[data-theme="orion"] .daily-status-badge,
body[data-theme="orion"] .status-badge,
body[data-theme="orion"] .person-role-tag { border-radius: 2px; }
body[data-theme="orion"] .home-highlight-card,
body[data-theme="orion"] .home-highlight-card.notice,
body[data-theme="orion"] .home-highlight-card.praise { border-radius: 2px; }
body[data-theme="orion"] .task-progress-hero { border: 1px solid #8293a9; border-radius: 2px; background: linear-gradient(115deg, #eff5fc, #fff 62%); }
body[data-theme="orion"] .task-progress-hero-head strong { color: #245a9e; }
body[data-theme="orion"] .task-progress-track i { background: linear-gradient(90deg, #245a9e, #11a1ad); }
body[data-theme="orion"] .modal-overlay .task-detail-modal,
body[data-theme="orion"] .modal-overlay .daily-missing-modal,
body[data-theme="orion"] .modal-overlay .home-highlight-modal,
body[data-theme="orion"] .app-dialog { border: 1px solid #66758a; border-radius: 3px; }
body.daily-reply-page[data-theme="orion"] .card { border: 1px solid #66758a; border-radius: 2px; box-shadow: 0 2px 0 rgba(33, 56, 88, .08); }
body.daily-reply-page[data-theme="orion"] .report { border: 1px solid #a1b1c2; border-radius: 2px; background: #f3f7fc; }
body.daily-reply-page[data-theme="orion"] .comment { border-left-color: #245a9e; background: #f3f7fc; }
body.daily-reply-page[data-theme="orion"] button { border-radius: 2px; background: #245a9e; }
body.daily-reply-page[data-theme="orion"] textarea { border-radius: 2px; border-color: #8293a9; }

/* Component exceptions: these are informational controls, not primary actions. */
body[data-theme="orion"] .management-stat,
body[data-theme="orion"] button.management-stat,
body[data-theme="orion"] .people-stat-button {
  border-color: #c4d7e3;
  background: #f7fbfe;
  color: var(--orion-ink);
}
body[data-theme="orion"] .management-stat span,
body[data-theme="orion"] .management-stat em,
body[data-theme="orion"] .people-stat-button em { color: var(--orion-muted); }
body[data-theme="orion"] .management-stat strong,
body[data-theme="orion"] .people-admin-stats .management-stat strong { color: var(--orion-blue-dark); }
body[data-theme="orion"] .management-stat:hover,
body[data-theme="orion"] .people-stat-button:hover { border-color: #8eb6d1; background: #eef7fd; }

body[data-theme="orion"] .daily-person-chip,
body[data-theme="orion"] button.daily-person-chip { color: var(--orion-ink); }
body[data-theme="orion"] .daily-person-chip.is-missing { border-color: #efb7b7; background: #fff4f3; color: #a33f3f; }
body[data-theme="orion"] .daily-person-chip.is-partial { border-color: #e5ca83; background: #fff9e8; color: #7c5a16; }
body[data-theme="orion"] .daily-person-chip.is-complete { border-color: #abd8bb; background: #effaf2; color: #276c42; }

body[data-theme="orion"] .pill-action,
body[data-theme="orion"] .segment-button {
  border-color: #8fb8d4;
  background: #e9f4fc;
  color: var(--orion-blue-dark);
}
body[data-theme="orion"] .pill-action.active,
body[data-theme="orion"] .segment-button.active { border-color: var(--orion-blue); background: #d7eafb; color: var(--orion-blue-dark); }
body[data-theme="orion"] .pill-action:not(.active):hover,
body[data-theme="orion"] .segment-button:not(.active):hover { background: #f3f9fd; }

body[data-theme="orion"] .tag-toggle,
body[data-theme="orion"] .tag-toggle.on { border-color: #b8cedb; background: #fff; color: var(--orion-muted); }
body[data-theme="orion"] .tag-toggle.on { border-color: #a9d5bc; background: #effaf2; color: #286a43; }
body[data-theme="orion"] .danger-link,
body[data-theme="orion"] .admin-remove-button { border-color: #e5bcbc; background: #fff7f7; color: var(--orion-danger); }
body[data-theme="orion"] .status-badge,
body[data-theme="orion"] .daily-status-badge,
body[data-theme="orion"] .performance-status { font-weight: 700; }
body[data-theme="orion"] .status-active { background: #e8f5fa; color: #176375; }
body[data-theme="orion"] .status-paused,
body[data-theme="orion"] .status-pending { background: #fff7df; color: #806018; }
body[data-theme="orion"] .status-handover { background: #eef0ff; color: #4653a0; }
body[data-theme="orion"] .status-done { background: #eaf7ee; color: #287044; }
body[data-theme="orion"] .modal-overlay,
body[data-theme="orion"] .app-dialog-overlay { background: rgba(28, 52, 76, .24); }

@media (max-width: 900px) {
  body[data-theme="orion"] .topbar { margin: 6px 8px 0; min-height: 58px; }
  body[data-theme="orion"] .topbar > div:first-child { grid-template-columns: 43px auto; column-gap: 8px; }
  body[data-theme="orion"] .topbar > div:first-child::before { height: 56px; font-size: 18px; }
  body[data-theme="orion"] h1 { font-size: 17px; }
  body[data-theme="orion"] main { padding: 8px; }
  body[data-theme="orion"] .analytics-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body[data-theme="orion"] .analytics-grid { grid-template-columns: 1fr; }
  body[data-theme="orion"] .home-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .theme-options { grid-template-columns: 1fr; }
  .theme-settings-actions { align-items: stretch; flex-direction: column; }
  .theme-settings-actions button { width: 100%; }
  body[data-theme="orion"] .topbar { padding-right: 8px; }
  body[data-theme="orion"] .topbar > div:first-child { min-width: 0; }
  body[data-theme="orion"] #entryHint { font-size: 10px; letter-spacing: .03em; }
  body[data-theme="orion"] .theme-settings-entry { min-width: 82px; padding: 0 6px; font-size: 11px; }
  body[data-theme="orion"] .home-panel,
  body[data-theme="orion"] .panel { padding: 10px; }
  body[data-theme="orion"] .analytics-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-theme="orion"] .home-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-theme="orion"] .nav-tile { min-height: 42px; }
  body[data-theme="orion"] .status-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-theme="orion"] .metric-table { min-width: 680px; }
  body[data-theme="orion"] .analytics-block { overflow-x: auto; }
}
