/* Activity Planner - Theme */

.theme-mode-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--sky-border);
  border-radius: var(--radius-sm);
  background: var(--sky-soft);
  color: var(--navy);
  box-shadow: none;
  cursor: pointer;
  flex-shrink: 0;
  font: inherit;
  padding: 0;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.theme-mode-indicator:hover,
.theme-mode-indicator:focus-visible {
  border-color: rgba(207, 122, 37, 0.35);
  color: var(--copper);
  outline: none;
}

.theme-mode-indicator__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-mode-indicator__icon--dark {
  display: none;
}

.theme-mode-indicator .btn__icon-svg {
  width: 18px;
  height: 18px;
}

.theme-mode-indicator__tooltip {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  z-index: 60;
  width: max-content;
  max-width: min(320px, calc(100vw - 2rem));
  display: block;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.theme-mode-indicator:hover .theme-mode-indicator__tooltip,
.theme-mode-indicator:focus-visible .theme-mode-indicator__tooltip,
.theme-mode-indicator:focus-within .theme-mode-indicator__tooltip {
  opacity: 1;
  transform: translateY(0);
}

:root {
  --green: #2f8a51;
  --warning: #b86b18;
  --danger: #b53030;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --navy: #d8eaff;
  --navy-dark: #edf6ff;
  --copper: #e2a05f;
  --copper-soft: #f0bf83;
  --blue: #91c7ff;
  --sky-soft: rgba(59, 119, 177, 0.18);
  --sky-border: rgba(128, 177, 222, 0.28);
  --mint-soft: rgba(88, 145, 107, 0.18);
  --mint-border: rgba(128, 185, 145, 0.26);
  --rose-soft: rgba(156, 72, 72, 0.18);
  --rose-border: rgba(215, 121, 121, 0.28);
  --ink: #e7edf5;
  --text: var(--ink);
  --muted: #aab8c8;
  --line: rgba(173, 196, 220, 0.16);
  --line-strong: rgba(194, 214, 235, 0.28);
  --surface: #101d2b;
  --surface-alt: #15273a;
  --surface-subtle: #0c1724;
  --surface-muted: #1b3045;
  --surface-warm: linear-gradient(135deg, rgba(226, 160, 95, 0.12), rgba(78, 132, 184, 0.07));
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.24);
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
  --glass-bg: rgba(14, 27, 41, 0.72);
  --glass-bg-strong: rgba(14, 27, 41, 0.88);
  --glass-line: rgba(186, 211, 236, 0.16);
  --modal-overlay: rgba(3, 8, 14, 0.66);
  --modal-border: 1px solid rgba(173, 196, 220, 0.16);
  --modal-surface: linear-gradient(180deg, rgba(18, 27, 37, 0.99), rgba(24, 37, 52, 0.98));
  --modal-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] body {
  background:
    linear-gradient(180deg, #07111d 0%, #0b1724 46%, #08121e 100%),
    linear-gradient(135deg, rgba(226, 160, 95, 0.07), rgba(56, 115, 174, 0.05));
}

html[data-theme="dark"] ::selection {
  background: #f0bf83;
  color: #07111d;
}

html[data-theme="dark"] *::selection {
  background: #f0bf83;
  color: #07111d;
}

html[data-theme="dark"] ::-moz-selection {
  background: #f0bf83;
  color: #07111d;
}

html[data-theme="dark"] *::-moz-selection {
  background: #f0bf83;
  color: #07111d;
}

html[data-theme="dark"] .header-inner {
  border-color: rgba(185, 207, 229, 0.16);
  background-color: rgba(11, 23, 36, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 32px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .site-nav {
  background: transparent;
}

html[data-theme="dark"] .site-nav a:hover {
  background: rgba(226, 160, 95, 0.1);
  border-color: rgba(226, 160, 95, 0.24);
  color: var(--copper-soft);
}

html[data-theme="dark"] .site-nav a[aria-current="page"] {
  background: rgba(226, 160, 95, 0.12);
  border-color: rgba(226, 160, 95, 0.28);
  color: var(--copper-soft);
}

@media (max-width: 768px) {
  html[data-theme="dark"] .site-nav {
    background: var(--glass-bg-strong);
  }
}

html[data-theme="dark"] .activity-toolbar,
html[data-theme="dark"] .activity-toolbar__input,
html[data-theme="dark"] .calendar-toolbar--embedded,
html[data-theme="dark"] .calendar-toolbar__mobile-picker-field,
html[data-theme="dark"] .calendar-day-card,
html[data-theme="dark"] .dashboard-place-row,
html[data-theme="dark"] .dashboard-insight,
html[data-theme="dark"] .dashboard-mini-item,
html[data-theme="dark"] .dashboard-pulse,
html[data-theme="dark"] .group-item,
html[data-theme="dark"] .views-team-card,
html[data-theme="dark"] .views-member-card,
html[data-theme="dark"] .location-option,
html[data-theme="dark"] .location-modal__empty,
html[data-theme="dark"] .confirm-modal__dialog {
  background: linear-gradient(180deg, rgba(18, 35, 52, 0.96), rgba(12, 24, 37, 0.96));
  border-color: var(--line);
}

html[data-theme="dark"] .dashboard-hero,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .dashboard-focus,
html[data-theme="dark"] .landing-flow__item,
html[data-theme="dark"] .landing-feature,
html[data-theme="dark"] .landing-trust__panel {
  background: linear-gradient(180deg, rgba(18, 34, 51, 0.98), rgba(13, 25, 39, 0.96));
  border-color: var(--line);
}

html[data-theme="dark"] .group-panel,
html[data-theme="dark"] .group-list,
html[data-theme="dark"] .hero-panel,
html[data-theme="dark"] .form-container,
html[data-theme="dark"] .activity-grid,
html[data-theme="dark"] .activity-grid-shell--stable,
html[data-theme="dark"] .linked-activity-card,
html[data-theme="dark"] .route-activity-option {
  background: linear-gradient(180deg, rgba(18, 35, 52, 0.96), rgba(12, 24, 37, 0.96));
  border-color: var(--line);
}

html[data-theme="dark"] .calendar-month {
  background: rgba(10, 22, 35, 0.78);
  border-color: var(--line);
}

html[data-theme="dark"] .calendar-month__weekdays {
  background: rgba(18, 31, 45, 0.88);
  border-color: var(--line);
}

html[data-theme="dark"] .calendar-day-card {
  background: transparent;
  border-color: var(--line);
  box-shadow: none;
}

html[data-theme="dark"] .calendar-day-card:hover {
  background: rgba(226, 160, 95, 0.08);
  border-color: rgba(226, 160, 95, 0.28);
}

html[data-theme="dark"] .calendar-day-card.is-today {
  box-shadow: inset 0 0 0 2px rgba(226, 160, 95, 0.26);
}

html[data-theme="dark"] .calendar-day-card.is-selected {
  background: rgba(57, 119, 187, 0.2);
  box-shadow: inset 0 0 0 2px rgba(137, 188, 239, 0.32);
}

html[data-theme="dark"] .calendar-day-card.is-outside-month {
  background: rgba(4, 12, 22, 0.2);
}

html[data-theme="dark"] .calendar-day-card__planned {
  color: var(--copper-soft);
}

html[data-theme="dark"] .calendar-unscheduled-chip {
  background: rgba(226, 160, 95, 0.14);
  border-color: rgba(226, 160, 95, 0.36);
  color: var(--copper-soft);
}

html[data-theme="dark"] .calendar-unscheduled-chip:hover,
html[data-theme="dark"] .calendar-unscheduled-chip:focus-visible {
  border-color: rgba(226, 160, 95, 0.5);
  box-shadow: 0 0 0 4px rgba(226, 160, 95, 0.12);
}

html[data-theme="dark"] .dashboard-hero__eyebrow,
html[data-theme="dark"] .dashboard-card__eyebrow,
html[data-theme="dark"] .dashboard-focus__label,
html[data-theme="dark"] .dashboard-pulse__label {
  background: transparent;
  color: var(--copper-soft);
}

html[data-theme="dark"] .dashboard-bar {
  background: rgba(173, 196, 220, 0.12);
}

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .views-copy-row__input {
  background: #0f1822;
  border-color: var(--line);
  color: var(--ink);
  color-scheme: dark;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #8294a6;
}

html[data-theme="dark"] .date-picker__panel,
html[data-theme="dark"] .date-picker__nav {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

html[data-theme="dark"] .multi-check-select__trigger,
html[data-theme="dark"] .multi-check-select__panel {
  color: var(--ink);
  border-color: var(--line);
  background: #172332;
}

html[data-theme="dark"] .multi-check-select__check {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

html[data-theme="dark"] .multi-check-select__option:hover,
html[data-theme="dark"] .multi-check-select__option:focus-within,
html[data-theme="dark"] .multi-check-select__option:has(input:checked) {
  background: #203044;
  color: var(--ink);
}

html[data-theme="dark"] .date-picker__display:disabled {
  background: var(--surface-muted);
}

html[data-theme="dark"] .date-picker__icon {
  border-color: var(--line-strong);
  background:
    linear-gradient(rgba(216, 234, 255, 0.12), rgba(216, 234, 255, 0.12)) 0.18rem 0.22rem / calc(100% - 0.36rem) 0.18rem no-repeat,
    linear-gradient(90deg, rgba(216, 234, 255, 0.72), rgba(216, 234, 255, 0.72)) 0.3rem 0.52rem / calc(100% - 0.6rem) 0.08rem no-repeat,
    linear-gradient(90deg, rgba(216, 234, 255, 0.72), rgba(216, 234, 255, 0.72)) 0.3rem 0.78rem / calc(100% - 0.6rem) 0.08rem no-repeat,
    var(--surface-alt);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .date-picker__day {
  color: var(--ink);
}

html[data-theme="dark"] .date-picker__day:hover,
html[data-theme="dark"] .date-picker__day:focus-visible {
  background: rgba(80, 138, 190, 0.14);
  border-color: rgba(128, 177, 222, 0.22);
}

html[data-theme="dark"] .date-picker__day.is-outside-month {
  color: rgba(170, 184, 200, 0.58);
}

html[data-theme="dark"] .date-picker__day.is-selected {
  background: linear-gradient(180deg, #23557a, #173954);
  color: var(--ink);
}

html[data-theme="dark"] .date-picker__footer {
  border-top-color: var(--line);
}

html[data-theme="dark"] .btn--secondary,
html[data-theme="dark"] .btn--ghost-danger,
html[data-theme="dark"] .info-tooltip__trigger,
html[data-theme="dark"] .activity-toolbar__toggle {
  background: #172332;
  border-color: var(--line);
  color: var(--navy);
}

html[data-theme="dark"] .filter-select {
  border-color: var(--line);
  background:
    linear-gradient(45deg, transparent 50%, var(--navy) 50%) calc(100% - 1.05rem) 50% / 0.38rem 0.38rem no-repeat,
    linear-gradient(135deg, var(--navy) 50%, transparent 50%) calc(100% - 0.78rem) 50% / 0.38rem 0.38rem no-repeat,
    #172332;
  color: var(--ink);
}

html[data-theme="dark"] .btn--secondary:hover,
html[data-theme="dark"] .activity-toolbar__toggle:hover {
  background: #203044;
}

html[data-theme="dark"] .filter-select:hover {
  border-color: rgba(153, 178, 206, 0.38);
}

html[data-theme="dark"] .filter-select-control__trigger,
html[data-theme="dark"] .filter-select-control__panel {
  border-color: var(--line);
  background: #172332;
  color: var(--ink);
}

html[data-theme="dark"] .filter-select-control__option {
  color: var(--ink);
}

html[data-theme="dark"] .filter-select-control__option:hover,
html[data-theme="dark"] .filter-select-control__option:focus-visible,
html[data-theme="dark"] .filter-select-control__option.is-selected {
  background: #203044;
  color: var(--ink);
}

html[data-theme="dark"] .theme-mode-indicator {
  background: rgba(226, 160, 95, 0.12);
  border-color: rgba(226, 160, 95, 0.28);
  color: var(--copper-soft);
}

html[data-theme="dark"] .theme-mode-indicator__icon--light {
  display: none;
}

html[data-theme="dark"] .theme-mode-indicator__icon--dark {
  display: inline-flex;
}

html[data-theme="dark"] .activity-grid__head {
  background: #172332;
}

html[data-theme="dark"] .header-actions .language-switcher {
  color: var(--navy);
}

html[data-theme="dark"] .header-actions .language-switcher__trigger {
  background: #172332;
  border-color: var(--line);
  color: var(--navy);
}

html[data-theme="dark"] .header-actions .language-switcher__trigger:hover,
html[data-theme="dark"] .header-actions .language-switcher__trigger:focus-visible,
html[data-theme="dark"] .header-actions .language-switcher.is-open .language-switcher__trigger {
  color: var(--copper-soft);
}

html[data-theme="dark"] .header-actions .language-switcher__panel {
  background: #172332;
  border-color: var(--line);
}

html[data-theme="dark"] .header-actions .language-switcher__option span {
  color: var(--navy);
}

html[data-theme="dark"] .header-actions .language-switcher__option:hover,
html[data-theme="dark"] .header-actions .language-switcher__option:focus-visible,
html[data-theme="dark"] .header-actions .language-switcher__option.is-selected {
  background: #203044;
}

html[data-theme="dark"] .views-grid-table__row.is-current {
  background:
    linear-gradient(180deg, rgba(36, 69, 100, 0.88), rgba(18, 35, 52, 0.96));
}

html[data-theme="dark"] .session-grid__row.is-current {
  background:
    linear-gradient(180deg, rgba(36, 69, 100, 0.88), rgba(18, 35, 52, 0.96));
}

html[data-theme="dark"] .activity-grid__row:hover {
  background: rgba(64, 142, 216, 0.08);
}

html[data-theme="dark"] .route-activity-option:hover,
html[data-theme="dark"] .route-activity-option:focus-within {
  border-color: rgba(226, 160, 95, 0.36);
  background: rgba(226, 160, 95, 0.08);
}

html[data-theme="dark"] .route-activity-option:has(input:checked) {
  border-color: rgba(137, 188, 239, 0.36);
  background: rgba(57, 119, 187, 0.2);
}

html[data-theme="dark"] .route-itinerary-card--start {
  background: rgba(57, 119, 187, 0.12);
  border-color: rgba(137, 188, 239, 0.24);
}

html[data-theme="dark"] .route-itinerary-card__sequence {
  background: rgba(137, 188, 239, 0.14);
  border: 1px solid rgba(137, 188, 239, 0.24);
  color: var(--navy);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .landing-band {
  background: var(--surface-subtle);
}

html[data-theme="dark"] .landing-band--soft {
  background: #0b1724;
}

html[data-theme="dark"] .landing-cta {
  background: #07111d;
}

html[data-theme="dark"] .views-grid-table__row.is-current:hover,
html[data-theme="dark"] .views-grid-table__row.is-current:focus-within,
html[data-theme="dark"] .session-grid__row.is-current:hover,
html[data-theme="dark"] .session-grid__row.is-current:focus-within {
  background:
    linear-gradient(180deg, rgba(43, 82, 118, 0.92), rgba(20, 41, 61, 0.98));
}

html[data-theme="dark"] .info-tooltip__panel {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  html[data-theme="dark"] .activity-list-grid,
  html[data-theme="dark"] .route-list-grid {
    background: transparent;
    border-color: transparent;
  }

  html[data-theme="dark"] .activity-list-grid .activity-grid__row,
  html[data-theme="dark"] .route-list-grid .activity-grid__row {
    background: linear-gradient(180deg, rgba(18, 35, 52, 0.96), rgba(12, 24, 37, 0.96));
    border-color: var(--line);
  }
}

html[data-theme="dark"] .activity-group-chip,
html[data-theme="dark"] .info-tooltip__item .activity-group-tooltip__name {
  background: rgba(64, 142, 216, 0.16);
  border-color: rgba(128, 177, 222, 0.24);
  color: var(--ink);
}

html[data-theme="dark"] .grid-badge--neutral,
html[data-theme="dark"] .activity-group-chip--count,
html[data-theme="dark"] .activity-group-chip--empty,
html[data-theme="dark"] .status-badge--soft {
  background: rgba(197, 216, 234, 0.08);
  border-color: var(--line);
  color: var(--navy);
}

html[data-theme="dark"] .security-factor__header .status-badge--soft {
  background: rgba(197, 216, 234, 0.08);
  border-color: rgba(128, 177, 222, 0.22);
  color: var(--ink);
}

html[data-theme="dark"] .grid-badge--done,
html[data-theme="dark"] .status-badge--done {
  color: #a9efbf;
}

html[data-theme="dark"] .grid-badge--cancelled,
html[data-theme="dark"] .status-badge--cancelled {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(197, 216, 234, 0.18);
  color: rgba(231, 237, 245, 0.72);
}

html[data-theme="dark"] .grid-badge--link,
html[data-theme="dark"] .calendar-day-card__tag {
  background: rgba(226, 160, 95, 0.14);
  border-color: rgba(226, 160, 95, 0.24);
  color: var(--copper-soft);
}

html[data-theme="dark"] .alert--error {
  background: rgba(190, 83, 83, 0.14);
  color: #ffb4b4;
}

html[data-theme="dark"] .alert--success {
  background: rgba(47, 138, 81, 0.16);
  color: #a9efbf;
}

html[data-theme="dark"] .alert--warning-soft {
  background: rgba(226, 160, 95, 0.14);
  color: var(--copper-soft);
}

html[data-theme="dark"] .site-footer {
  background: #071827;
  color: rgba(231, 237, 245, 0.78);
}

html[data-theme="dark"] .site-footer strong {
  color: var(--ink);
}
