:root {
  --ink-900: #0b1320;
  --ink-700: #243044;
  --ink-500: #4a5a72;
  --ink-300: #9aa7bc;
  --line: #d3dbe7;
  --paper: #f2f5fc;
  --paper-strong: #f0e9df;
  --accent: #1e6bd6;
  --accent-strong: #1657ad;
  --accent-wash: #e7f0ff;
  --mint: #2f9f7d;
  --shadow: 0 18px 40px rgba(11, 19, 32, 0.12);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --hour-height: 36px;
  --team-header-height: 28px;
  --tech-header-height: 48px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink-900);
  background: var(--paper);
  overflow: hidden;
}

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 32px 40px;
  gap: 20px;
  overflow: hidden;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--paper);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.topbar-clear {
  background: transparent;
  border-radius: 0;
  padding-inline: 0;
}

.topbar-compact .brand-subtitle {
  display: none;
}

.topbar-compact .brand-title {
  font-size: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
}

.brand-subtitle {
  font-family: "Newsreader", serif;
  font-size: 14px;
  color: var(--ink-500);
}

.host-status {
  display: none;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f5b400;
  box-shadow: 0 0 0 4px #fff1ce;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.controls-compact {
  padding: 6px 8px;
}

.view-tabs {
  display: flex;
  gap: 8px;
  background: white;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.tab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-700);
}

.tab.active {
  background: var(--ink-900);
  color: white;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(240px, 20%) minmax(420px, 60%) minmax(200px, 20%);
  gap: 20px;
  align-items: stretch;
  height: 100%;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow: auto;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 4px 0;
}

.sidebar-brand .brand-title {
  font-size: 16px;
}

.sidebar-brand .brand-subtitle {
  font-size: 12px;
  color: var(--ink-500);
}

.sidebar-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  margin-bottom: 12px;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-height: 52vh;
  overflow: auto;
  padding-right: 4px;
  flex: 1;
  min-height: 0;
}

.filter-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: transparent;
  overflow: hidden;
}

details.filter-group {
  padding: 0;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  padding: 10px 12px;
  background: transparent;
  border: none;
}

details.filter-group > summary.filter-header {
  cursor: pointer;
  list-style: none;
}

details.filter-group > summary.filter-header::-webkit-details-marker {
  display: none;
}

details.filter-group > summary.filter-header::after {
  content: "▾";
  font-size: 12px;
  color: var(--ink-500);
  margin-left: auto;
  transition: transform 0.2s ease;
}

details.filter-group[open] > summary.filter-header::after {
  transform: rotate(180deg);
}

.filter-body {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

details.filter-group:not([open]) .filter-body {
  display: none;
}

.filters-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.filter-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
}

.filter-label {
  font-size: 12px;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-700);
}

.chip-toggle.selected {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--ink-900);
}

.filter-field {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--ink-500);
  gap: 6px;
}

.filter-field input,
.filter-field select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  background: white;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input {
  width: 100%;
  padding-right: 36px;
}

.input-icon-button {
  position: absolute;
  right: 8px;
  border: none;
  background: transparent;
  color: var(--ink-500);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
}

.input-icon-button:hover {
  background: rgba(11, 19, 32, 0.08);
  color: var(--ink-900);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pill-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  background: white;
  cursor: pointer;
  color: var(--ink-700);
}

.pill-button.primary {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: white;
}

.pill-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.icon-button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-700);
}

.location-popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 19, 32, 0.45);
  z-index: 40;
}

.location-popup[aria-hidden="false"] {
  display: flex;
}

.location-popup-card {
  width: min(760px, 92vw);
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

.location-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
}

.location-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.location-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  min-height: 260px;
}

.location-column {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.location-column-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  min-height: 0;
}

.sidebar,
.task-panel,
.view-root,
.filters,
.location-column-list,
.task-list,
.equipment-list {
  scrollbar-width: thin;
  scrollbar-color: #b9c3d6 transparent;
}

.sidebar::-webkit-scrollbar,
.task-panel::-webkit-scrollbar,
.view-root::-webkit-scrollbar,
.filters::-webkit-scrollbar,
.location-column-list::-webkit-scrollbar,
.task-list::-webkit-scrollbar,
.equipment-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.sidebar::-webkit-scrollbar-track,
.task-panel::-webkit-scrollbar-track,
.view-root::-webkit-scrollbar-track,
.filters::-webkit-scrollbar-track,
.location-column-list::-webkit-scrollbar-track,
.task-list::-webkit-scrollbar-track,
.equipment-list::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.task-panel::-webkit-scrollbar-thumb,
.view-root::-webkit-scrollbar-thumb,
.filters::-webkit-scrollbar-thumb,
.location-column-list::-webkit-scrollbar-thumb,
.task-list::-webkit-scrollbar-thumb,
.equipment-list::-webkit-scrollbar-thumb {
  background: #b9c3d6;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.task-panel::-webkit-scrollbar-thumb:hover,
.view-root::-webkit-scrollbar-thumb:hover,
.filters::-webkit-scrollbar-thumb:hover,
.location-column-list::-webkit-scrollbar-thumb:hover,
.task-list::-webkit-scrollbar-thumb:hover,
.equipment-list::-webkit-scrollbar-thumb:hover {
  background: #95a2bb;
  background-clip: content-box;
}

.location-option {
  text-align: start;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--ink-900);
  cursor: pointer;
}

.location-option.all {
  font-weight: 600;
  color: var(--ink-500);
}

.location-option.active {
  background: var(--accent-wash);
  border-color: var(--accent);
}

.location-empty {
  font-size: 12px;
  color: var(--ink-500);
  padding: 6px 8px;
}

.filter-grow {
  flex: 1;
}

.tech-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  max-height: 42vh;
}

.tech-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: transparent;
  cursor: pointer;
}

.tech-card.selected {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.tech-card .tech-name {
  font-weight: 600;
}

.tech-card .tech-skill {
  font-size: 12px;
  color: var(--ink-500);
}

.tech-count {
  font-size: 12px;
  color: var(--ink-500);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}

.map-panel {
  display: flex;
  justify-content: flex-start;
}

.map-shell {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: white;
}

.map-canvas {
  width: 100%;
  height: 200px;
}

.map-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-500);
  font-size: 13px;
}

.content {
  flex: 1;
  min-height: 0;
}

.calendar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.calendar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sort-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  background: white;
  color: var(--ink-700);
  cursor: pointer;
  font-family: inherit;
}

.sort-button.stale {
  border-color: var(--accent);
  color: var(--accent);
}

.sort-button.stale::after {
  content: "•";
  margin-inline-start: 6px;
}

.task-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: auto;
}

.task-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-main {
  flex: 7;
  min-height: 0;
}

.task-equipment {
  flex: 3;
  min-height: 0;
}

.task-list,
.equipment-list {
  display: grid;
  gap: 10px;
  overflow: auto;
}

.task-list {
  flex: 1;
}

.equipment-list {
  flex: 1;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px;
  background: transparent;
  font-size: 12px;
  cursor: grab;
}

.task-card:active {
  cursor: grabbing;
}

.equipment-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  background: white;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

.equipment-filter .equipment-list {
  max-height: 220px;
  overflow: auto;
}

.agent-messages {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
}

.agent-message {
  max-width: 85%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  background: var(--paper);
}

.agent-message.user {
  align-self: flex-end;
  border-color: var(--accent);
  background: var(--accent-wash);
}

.agent-input-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#agent-input {
  width: 100%;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
}

.task-agent {
  flex: 6;
}

.task-agent {
  border-color: rgba(30, 107, 214, 0.35);
  background: linear-gradient(135deg, rgba(30, 107, 214, 0.08), rgba(30, 107, 214, 0.02));
}

.agent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-subtitle {
  font-size: 12px;
  color: var(--ink-500);
}

.agent-badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  background: var(--accent);
  color: white;
}

.agent-messages {
  background: white;
  border-color: rgba(30, 107, 214, 0.25);
}

.agent-message.agent {
  background: rgba(30, 107, 214, 0.08);
  border-color: rgba(30, 107, 214, 0.2);
}

#equipment-search {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
}

.view-root {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 20px;
  box-shadow: var(--shadow);
  min-height: 0;
  flex: 1;
  height: 100%;
  overflow: auto;
}

.view-root.is-day {
  overflow: hidden;
}

.empty {
  padding: 32px;
  text-align: center;
  color: var(--ink-500);
  font-family: "Newsreader", serif;
}

.version-tag {
  position: absolute;
  bottom: 12px;
  inset-inline-end: 16px;
  font-size: 12px;
  color: var(--ink-300);
  letter-spacing: 0.02em;
}

.day-view {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  overflow-x: hidden;
  overflow-y: hidden;
}

.time-axis {
  display: grid;
  grid-template-rows: var(--team-header-height) var(--tech-header-height) repeat(24, var(--hour-height));
  border-right: 1px solid var(--line);
  padding-right: 8px;
  position: sticky;
  left: 0;
  background: transparent;
  z-index: 2;
  width: 96px;
}

.time-axis-team {
  font-weight: 600;
  color: var(--ink-500);
  font-size: 12px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  text-align: start;
  justify-content: flex-start;
}

.time-axis-head {
  font-weight: 600;
  color: var(--ink-900);
  font-size: 13px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  height: var(--tech-header-height);
  text-align: start;
  justify-content: flex-start;
}

.time-slot {
  font-size: 12px;
  color: var(--ink-700);
  padding: 0 8px;
  border-top: 1px dashed #c9d4e5;
  display: flex;
  align-items: center;
  height: var(--hour-height);
  text-align: start;
  justify-content: flex-start;
}

.day-columns {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding-bottom: 6px;
}

.team-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: max-content;
  scroll-snap-align: start;
}

.team-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  height: var(--team-header-height);
  background: transparent;
  border-bottom: 1px solid var(--line);
}

[dir="rtl"] .team-header {
  flex-direction: row-reverse;
  text-align: right;
  justify-content: flex-end;
}

.team-line {
  display: none;
}

.team-columns {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 12px;
}

.tech-column {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: grid;
  grid-template-rows: var(--tech-header-height) 1fr;
  min-height: 100%;
  scroll-snap-align: start;
  min-width: 220px;
  background: transparent;
}

.tech-header {
  padding: 8px 16px 6px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.tech-name {
  font-weight: 600;
}

.tech-meta {
  font-size: 12px;
  color: var(--ink-500);
}

.tech-grid {
  display: grid;
  grid-template-rows: repeat(24, var(--hour-height));
}

.day-columns::-webkit-scrollbar {
  height: 10px;
}

.day-columns::-webkit-scrollbar-thumb {
  background: #d3dbe7;
  border-radius: 999px;
}

.tech-slot {
  border-top: 1px dashed #c9d4e5;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: white;
  position: relative;
  overflow: visible;
}

.tech-slot.has-event {
  z-index: 2;
}

.tech-slot.drag-over {
  background: var(--accent-wash);
}

.event-card {
  background: var(--event-bg, white);
  border: 1px solid var(--event-border, var(--line));
  border-left: 4px solid var(--event-color, var(--accent));
  padding: 6px 8px;
  border-radius: 0;
  font-size: 12px;
  cursor: grab;
  box-shadow: none;
  margin: 0;
  position: absolute;
  inset: 0;
  height: calc(var(--hour-height) * var(--span, 1));
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.event-card.resizing {
  cursor: ns-resize;
}

.resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  cursor: ns-resize;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.08), transparent);
}

[dir="rtl"] .resize-handle {
  left: 0;
  right: 0;
}

.drag-ghost {
  opacity: 0.92;
  pointer-events: none;
}

.event-card.warning {
  border-left-color: #f5b400;
  background: #fff6dd;
  border-color: rgba(245, 180, 0, 0.35);
}

.event-card:active {
  cursor: grabbing;
}

.event-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-meta,
.event-time {
  color: var(--ink-500);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.severity-dot {
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background: var(--event-color, var(--accent));
  flex-shrink: 0;
}

.task-card {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.task-card .task-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-card .event-meta,
.task-card .event-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal {
  z-index: 200;
}

.modal-backdrop {
  z-index: 200;
}

.modal-card {
  z-index: 210;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--paper);
  cursor: pointer;
  display: grid;
  gap: 8px;
  min-height: 120px;
}

.summary-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(239, 111, 80, 0.15);
}

.summary-muted {
  opacity: 0.5;
}

.summary-date {
  font-weight: 600;
}

.summary-count {
  font-size: 22px;
  font-weight: 700;
}

.summary-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-500);
}

.list-view {
  display: grid;
  gap: 16px;
}

.list-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--paper);
  font-weight: 600;
}

.list-count {
  font-size: 12px;
  color: var(--ink-500);
}

.list-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px dashed #eef1f6;
  background: white;
}

.list-time {
  font-size: 12px;
  color: var(--ink-500);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 19, 32, 0.6);
}

.modal-card {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  width: min(720px, 92vw);
  max-height: 80vh;
  overflow: auto;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--ink-500);
}

.icon-button {
  background: var(--ink-900);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}

.modal-body {
  margin-top: 16px;
  display: grid;
  gap: 16px;
}

.modal-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
}

.modal-group-header {
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px dashed #c9d4e5;
}

[dir="rtl"] .time-axis {
  border-right: none;
  border-left: 1px solid var(--line);
  padding-right: 8px;
  padding-left: 0;
  left: auto;
  right: 0;
}

[dir="rtl"] .time-axis-team,
[dir="rtl"] .time-axis-head,
[dir="rtl"] .time-slot {
  text-align: right;
  justify-content: flex-end;
}

[dir="rtl"] .filters {
  justify-content: flex-start;
}

[dir="rtl"] .filters-row {
  justify-content: flex-start;
}

[dir="rtl"] details.filter-group > summary.filter-header::after {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .location-popup-actions {
  justify-content: flex-start;
}

[dir="rtl"] .input-with-icon input {
  padding-right: 12px;
  padding-left: 36px;
}

[dir="rtl"] .input-icon-button {
  right: auto;
  left: 8px;
}

[dir="rtl"] .filters {
  padding-right: 0;
  padding-left: 4px;
}

[dir="rtl"] .team-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .content-grid {
  grid-template-columns: minmax(200px, 20%) minmax(420px, 60%) minmax(240px, 20%);
}

[dir="rtl"] .map-panel {
  justify-content: flex-start;
}

@media (max-width: 960px) {
  .day-view {
    grid-template-columns: 1fr;
  }

  .time-axis {
    display: none;
  }

  .filters {
    align-items: stretch;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .location-columns {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 720px) {
  .app {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .view-root {
    padding: 16px;
  }

  .location-columns {
    grid-template-columns: 1fr;
  }
}
