:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-soft: #eef2ff;
  --text: #122033;
  --muted: #5d6a7d;
  --line: #d6deeb;
  --primary: #1d4ed8;
  --primary-soft: #dbeafe;
  --green: #15803d;
  --green-soft: #dcfce7;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --neutral: #64748b;
  --neutral-soft: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.08), transparent 24rem),
    radial-gradient(circle at top left, rgba(21, 128, 61, 0.08), transparent 20rem),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

body {
  padding: 28px;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
}

.app-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
}

.subhead {
  margin: 10px 0 0;
  max-width: 72rem;
  color: var(--muted);
  line-height: 1.55;
}

.header-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-outline {
  border: 1px solid rgba(18, 32, 51, 0.14);
  background: rgba(255, 255, 255, 0.75);
}

.badge-solid {
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  color: #fff;
}

.badge-danger {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #fff;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#appTop,
#actionsSection,
#syncSection,
#measureSection,
#summarySection,
#monitoringSection,
#filtersSection,
#timeplanSection,
#matrixSection,
#participantsSection,
#participantOverviewPanel,
#participantDetailShell,
#importReviewSection,
#conflictSection,
#profilingMonitorSection {
  scroll-margin-top: 156px;
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(214, 222, 235, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.panel-head p,
.meta-row,
.stacked-meta,
.card-meta,
.summary-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.actions-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tool-drawer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tool-drawer summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #173a69;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.tool-drawer summary::-webkit-details-marker {
  display: none;
}

.tool-drawer summary::before {
  content: "▸";
  font-size: 0.9rem;
  transition: transform 120ms ease;
}

.tool-drawer[open] summary::before {
  transform: rotate(90deg);
}

.tool-drawer .action-group {
  margin-top: 12px;
}

.settings-shortcuts {
  margin-bottom: 14px;
}

.action-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-group.wrap {
  align-items: flex-start;
}

.action-group.right {
  margin-left: auto;
}

.sync-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.sync-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(207, 224, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.sync-card h3 {
  margin: 0;
  font-size: 1rem;
}

.sync-card p {
  margin: 0;
}

.sync-detail {
  color: var(--muted);
  line-height: 1.45;
}

.device-mode-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.device-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #d8e3f5;
  background: #ffffff;
  color: #17325e;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

.device-mode-button:hover {
  transform: translateY(-1px);
}

.device-mode-button.is-active {
  background: #eef4ff;
  border-color: #9dbcf6;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.12);
}

.device-mode-button.is-resolved:not(.is-active) {
  border-color: #b9d4c6;
  box-shadow: inset 0 0 0 1px rgba(21, 128, 61, 0.14);
}

.btn,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
  text-decoration: none;
}

.btn:hover,
.link-button:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.22);
}

.btn-secondary {
  background: #eef4ff;
  color: #17325e;
  border-color: #cfe0ff;
}

.btn-ghost,
.link-button {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: #fecaca;
}

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

#summaryCards {
  display: contents;
}

.quick-nav-shell {
  position: sticky;
  top: 10px;
  z-index: 24;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(214, 222, 235, 0.98);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.quick-nav-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.quick-nav-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quick-nav-hint {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.quick-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.quick-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d6deeb;
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.quick-nav-btn:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  color: #1d4ed8;
}

.quick-nav-btn.is-active {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18);
}

.quick-nav-btn.is-accent {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.users-panel {
  display: grid;
  gap: 14px;
}

#usersContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.user-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.user-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.user-card-head h3 {
  margin: 0 0 6px;
}

.user-card-head p {
  margin: 0;
  color: var(--muted);
}

.measure-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.measure-switch-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #cfe0ff;
  background: #eef4ff;
  color: #17325e;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}

.measure-switch-btn:hover {
  transform: translateY(-1px);
}

.measure-switch-btn.active {
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.18);
}

.monitoring-panel {
  padding-bottom: 12px;
}

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

.conflict-card {
  border: 1px solid #fecaca;
  background: linear-gradient(180deg, #fff7f7, #fff);
  border-radius: 18px;
  padding: 12px 14px;
}

.conflict-card h3 {
  margin: 0 0 4px;
  font-size: 0.96rem;
}

.conflict-card p {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.1;
}

.conflict-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.conflict-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.monitoring-toolbar {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.conflict-item {
  border: 1px solid #fee2e2;
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
}

.conflict-item-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
}

.conflict-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.conflict-item-body {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #fecaca;
  color: #7f1d1d;
}

.conflict-link {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 8px 10px;
}

.conflict-link:hover {
  background: #fff8f8;
  border-color: #fca5a5;
}

.conflict-toggle {
  display: grid;
  gap: 4px;
}

.conflict-item strong {
  display: block;
  margin-bottom: 4px;
}

.conflict-item small {
  color: var(--muted);
}

.summary-card {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(246, 249, 255, 0.92)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-height: 138px;
  position: relative;
  overflow: hidden;
}

.summary-card::after {
  content: "";
  position: absolute;
  inset: auto -25px -25px auto;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.06);
}

.summary-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
}

.summary-value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  position: relative;
  z-index: 22;
}

.filter-groups {
  display: grid;
  gap: 16px;
}

.section-filter-strip {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  position: relative;
  z-index: 24;
}

.timeplan-filter-strip,
.participant-cockpit-filter-strip {
  margin-bottom: 0;
}

.filter-subsection {
  border: 1px solid rgba(214, 222, 235, 0.9);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98));
  padding: 16px;
}

.filter-subsection.is-multi-select-open-section {
  position: relative;
  z-index: 360;
}

.filter-subsection-head {
  margin-bottom: 14px;
}

.filter-subsection-head h3 {
  margin: 0 0 5px;
  font-size: 0.98rem;
}

.filter-subsection-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.filters-panel {
  position: relative;
  z-index: 25;
  overflow: visible;
}

.field,
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field {
  position: relative;
}

.field.is-multi-select-open-host,
.dropdown-field.is-multi-select-open-host {
  z-index: 1180;
}

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

.field-inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.field-inline-actions .btn {
  min-height: 38px;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.appointment-reschedule-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.04);
}

.field-action button {
  width: 100%;
}

.field-static {
  justify-content: flex-end;
}

.static-pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(29, 78, 216, 0.18);
  background: linear-gradient(135deg, #eef4ff, #f8fbff);
  color: #173a69;
  font-weight: 700;
}

.field span {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  background: #fff;
  color: var(--text);
  min-height: 44px;
}

.field input[readonly] {
  background: #f8fafc;
  color: var(--text);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(29, 78, 216, 0.14);
  border-color: var(--primary);
}

.field-span-2 {
  grid-column: span 2;
}

.dropdown-field details {
  min-height: 44px;
  position: relative;
}

.multi-select {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  min-height: 44px;
  isolation: isolate;
}

.multi-select summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 14px;
  font-weight: 600;
  color: var(--text);
}

.multi-select summary::-webkit-details-marker {
  display: none;
}

.multi-select[open] {
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
  z-index: 1240;
}

.multi-select.is-top-layer[open] {
  z-index: 1420;
}

.multi-select-body {
  position: absolute;
  z-index: 1260;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  max-height: min(420px, 60vh);
  overflow: auto;
}

.multi-select.is-top-layer .multi-select-body {
  z-index: 1430;
}

#calendarParticipantInput .multi-select-body {
  min-width: 100%;
  width: min(920px, calc(100vw - 56px));
  max-width: min(920px, calc(100vw - 56px));
  right: auto;
}

#calendarParticipantInput {
  display: block;
  width: 100%;
}

#calendarParticipantInput summary {
  display: block;
  width: 100%;
}

.multi-select-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  border-radius: inherit;
  z-index: -1;
}

.multi-select-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

body.has-open-multi-select .field-action button,
body.has-open-multi-select .link-button,
body.has-open-multi-select .btn {
  transition: opacity 120ms ease;
}

body.has-open-multi-select .field:not(.is-multi-select-open-host),
body.has-open-multi-select .dropdown-field:not(.is-multi-select-open-host),
body.has-open-multi-select .field-action,
body.has-open-multi-select .link-button,
body.has-open-multi-select .btn,
body.has-open-multi-select .small-btn {
  pointer-events: none;
}

body.has-open-multi-select .is-multi-select-open-host,
body.has-open-multi-select .is-multi-select-open-host *,
body.has-open-multi-select details.multi-select.is-top-layer,
body.has-open-multi-select details.multi-select.is-top-layer * {
  pointer-events: auto;
}

.multi-select-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

#calendarParticipantInput .multi-select-actions {
  justify-content: flex-start;
  gap: 18px;
}

.multi-select-clear-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
}

.multi-select-clear-btn:hover {
  background: #f1f6ff;
}

.multi-select-group-label {
  padding: 8px 10px 4px;
  font-size: 0.77rem;
  font-weight: 800;
  color: #173a69;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.monitoring-panel,
.timeplan-switch-panel,
.matrix-panel,
.participants-panel {
  position: relative;
  z-index: 1;
}

.timeplan-switch-panel {
  display: grid;
  gap: 14px;
}

.timeplan-workspace {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.timeplan-plan-host {
  display: grid;
  gap: 14px;
}

.timeplan-plan-host:empty {
  display: none;
}

.timeplan-plan-host .participant-overview,
.timeplan-workspace .matrix-panel {
  box-shadow: none;
}

.timeplan-view-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeplan-view-button {
  border: 1px solid rgba(29, 78, 216, 0.16);
  background: #fff;
  color: #173a69;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.timeplan-view-button:hover {
  background: #f5f9ff;
  border-color: rgba(29, 78, 216, 0.28);
}

.timeplan-view-button.is-active {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.22);
}

.timeplan-summary {
  margin: 0;
  color: var(--muted);
}

.multi-select-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
}

.multi-select-item:hover {
  background: #f8fbff;
}

.multi-select-item input {
  margin: 0;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 6px;
  border-radius: 999px;
}

.dot.green { background: var(--green); }
.dot.amber { background: var(--amber); }
.dot.red { background: var(--red); }
.dot.neutral { background: var(--neutral); }

.matrix-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  background: #fff;
}

.matrix-table th,
.matrix-table td {
  border-bottom: 1px solid #e9eef6;
  border-right: 1px solid #eef2f9;
  padding: 10px 12px;
  vertical-align: top;
}

.matrix-table th {
  position: sticky;
  top: 0;
  background: #f8fbff;
  z-index: 2;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.matrix-period-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  padding: 0;
}

.matrix-period-btn:hover {
  color: #1d4ed8;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}

.matrix-name {
  min-width: 240px;
}

.matrix-person {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.matrix-person strong {
  font-size: 0.98rem;
}

.matrix-person small {
  color: var(--muted);
}

.matrix-cell {
  position: relative;
  min-width: 125px;
  cursor: pointer;
}

.matrix-cell button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 10px;
  background: #f8fbff;
  cursor: pointer;
  text-align: left;
}

.matrix-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.matrix-split.segments-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.matrix-half {
  border-radius: 12px;
  padding: 10px 10px 9px;
  min-height: 92px;
}

.matrix-half-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  margin-bottom: 6px;
}

.matrix-half-value {
  font-size: 0.9rem;
  font-weight: 800;
}

.matrix-split.segments-3 .matrix-half {
  min-height: 84px;
  padding-left: 8px;
  padding-right: 8px;
}

.matrix-split.segments-3 .matrix-half-label {
  font-size: 0.68rem;
}

.matrix-split.segments-3 .matrix-half-value {
  font-size: 0.82rem;
}

.matrix-value {
  font-size: 1rem;
  font-weight: 800;
}

.matrix-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.traffic-green button,
.traffic-green.matrix-half { background: var(--green-soft); }
.traffic-amber button,
.traffic-amber.matrix-half { background: var(--amber-soft); }
.traffic-red button,
.traffic-red.matrix-half { background: var(--red-soft); }
.traffic-neutral button,
.traffic-neutral.matrix-half { background: var(--neutral-soft); }

.participants-panel {
  padding-bottom: 24px;
}

.participant-workbench {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.participant-main-column {
  display: grid;
  gap: 18px;
}

.participant-navigator {
  position: sticky;
  top: 88px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  overflow: hidden;
  max-height: calc(100vh - 120px);
}

.participant-navigator-head {
  padding: 16px 18px;
  border-bottom: 1px solid #edf2fb;
}

.participant-navigator-head h3 {
  margin: 0 0 6px;
}

.participant-navigator-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.participant-navigator-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  overflow: auto;
  max-height: calc(100vh - 210px);
}

.participant-nav-btn {
  width: 100%;
  border: 1px solid #dbe4f3;
  border-radius: 14px;
  background: #fff;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 12px 12px;
  cursor: pointer;
}

.participant-nav-btn strong {
  font-size: 0.93rem;
}

.participant-nav-btn span,
.participant-nav-btn small {
  color: var(--muted);
}

.participant-nav-btn.selected {
  border-color: rgba(29, 78, 216, 0.42);
  background: #eef4ff;
}

.participant-overview,
.participant-detail-shell {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  overflow: hidden;
}

.participant-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf2fb;
}

.participant-overview-head h3 {
  margin: 0 0 6px;
}

.participant-overview-head p {
  margin: 0;
  color: var(--muted);
}

.participant-timeline-wrap {
  overflow: auto;
}

.participant-timeline-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  background: #fff;
}

.participant-timeline-table th,
.participant-timeline-table td {
  border-bottom: 1px solid #e9eef6;
  border-right: 1px solid #eef2f9;
  padding: 0;
  vertical-align: top;
}

.participant-timeline-table thead th {
  background: #f8fbff;
  z-index: 2;
}

.participant-timeline-table th:first-child,
.participant-timeline-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}

.participant-overview-name-head {
  min-width: 240px;
  padding: 14px 16px !important;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.participant-timeline-month-head {
  min-width: 160px;
}

.timeline-month-toggle {
  width: 100%;
  min-height: 72px;
  border: 0;
  background: #f8fbff;
  display: grid;
  gap: 4px;
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
  color: #17325e;
}

.timeline-month-toggle small {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

.timeline-month-toggle.expanded {
  background: #eef4ff;
}

.participant-timeline-week-head {
  min-width: 120px;
  padding: 10px 8px !important;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: center;
}

.participant-timeline-week-head.collapsed {
  color: #94a3b8;
}

.participant-overview-row.selected td {
  background: #f8fbff;
}

.participant-overview-row.focused-row td,
.participant-detail-card.focused-card {
  box-shadow: inset 0 0 0 9999px rgba(29, 78, 216, 0.06);
}

.participant-overview-name {
  min-width: 240px;
}

.participant-select-btn {
  width: 100%;
  min-height: 110px;
  border: 0;
  background: transparent;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}

.participant-select-btn strong {
  font-size: 0.98rem;
}

.participant-select-btn small {
  color: var(--muted);
}

.participant-timeline-cell {
  min-width: 120px;
}

.participant-timeline-btn {
  width: 100%;
  min-height: 110px;
  border: 0;
  display: grid;
  gap: 6px;
  padding: 12px 10px;
  text-align: left;
  cursor: pointer;
  background: #f8fbff;
}

.participant-timeline-state {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  font-weight: 800;
}

.participant-timeline-btn strong {
  font-size: 0.96rem;
}

.participant-timeline-btn small {
  color: var(--muted);
}

.participant-timeline-btn.traffic-green { background: var(--green-soft); }
.participant-timeline-btn.traffic-amber { background: var(--amber-soft); }
.participant-timeline-btn.traffic-red { background: var(--red-soft); }
.participant-timeline-btn.traffic-neutral { background: var(--neutral-soft); }

.timeline-focus-flash {
  animation: timeline-focus-pulse 1.8s ease;
}

@keyframes timeline-focus-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(29, 78, 216, 0.24);
    outline: 0 solid rgba(29, 78, 216, 0.26);
  }
  35% {
    box-shadow: 0 0 0 6px rgba(29, 78, 216, 0.08);
    outline: 2px solid rgba(29, 78, 216, 0.45);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(29, 78, 216, 0);
    outline: 0 solid rgba(29, 78, 216, 0);
  }
}

.participant-detail-shell {
  padding: 18px;
}

.participant-detail-shell .participant-cockpit-filter-strip {
  padding: 0 0 18px;
}

.participant-detail-shell .participant-cockpit-filter-strip .filter-subsection {
  border-radius: 18px;
}

.participant-detail-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.participant-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.participant-card + .participant-card {
  margin-top: 18px;
}

.participant-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf2fb;
  align-items: center;
}

.participant-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.participant-title h3 {
  margin: 0;
  font-size: 1.1rem;
}

.participant-pills,
.appointment-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #eef4ff;
  color: #17325e;
}

.pill.red { background: var(--red-soft); color: var(--red); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.gray { background: var(--neutral-soft); color: #475569; }

.participant-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.participant-body {
  padding: 18px 20px 22px;
  display: grid;
  gap: 16px;
}

.participant-card.focused-card {
  border-color: rgba(29, 78, 216, 0.45);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12), var(--shadow);
}

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

.capacity-proof-panel {
  border: 1px solid #dbe4f3;
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  display: grid;
  gap: 12px;
}

.capacity-proof-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.capacity-proof-head h4 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
}

.capacity-proof-grid {
  display: grid;
  gap: 10px;
}

.capacity-proof-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.capacity-proof-picker {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
}

.capacity-proof-picker span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.capacity-proof-picker select {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid #d7e1ef;
  background: #fff;
  padding: 0 12px;
  font: inherit;
}

.capacity-proof-multi-select {
  flex: 1 1 320px;
  min-width: min(320px, 100%);
}

.capacity-proof-multi-select summary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.capacity-proof-multi-select .multi-select-body {
  min-width: max(100%, 240px);
  width: max(100%, 240px);
  right: auto;
}

.capacity-proof-multi-select .multi-select-item span {
  white-space: nowrap;
}

.capacity-proof-row {
  border: 1px solid #dbe4f3;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: #fff;
}

.capacity-proof-row.tone-open {
  background: linear-gradient(180deg, #fffaf0, #ffffff);
  border-color: #fde68a;
}

.capacity-proof-row.tone-future {
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
  border-color: #bbf7d0;
}

.capacity-proof-row.tone-idle {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  border-color: #dbe4f3;
}

.capacity-proof-row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.capacity-proof-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.capacity-proof-copy {
  display: grid;
  gap: 4px;
  color: #475569;
  line-height: 1.45;
  font-size: 0.92rem;
}

.capacity-proof-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.88rem;
}

.capacity-proof-table tr {
  border-top: 1px solid #e5edf7;
}

.capacity-proof-table tr:first-child {
  border-top: 0;
}

.capacity-proof-table th,
.capacity-proof-table td {
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.capacity-proof-table th {
  width: 132px;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.capacity-proof-table td {
  color: #1f2937;
  overflow-wrap: anywhere;
}

.capacity-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metric-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.metric-box h4 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.metric-box p {
  margin: 0;
  font-weight: 800;
  font-size: 1.15rem;
}

.metric-detail {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.appointment-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.appointment-structure-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: auto;
}

.appointment-structure-head {
  display: grid;
  grid-template-columns: 110px 180px 110px minmax(520px, 1fr) 180px;
  gap: 0;
  background: #f8fbff;
  border-bottom: 1px solid #dbe7f5;
}

.appointment-structure-head > div {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.appointment-structure-body {
  display: grid;
}

.appointment-structure-week {
  display: grid;
  grid-template-columns: 110px 180px 110px minmax(520px, 1fr) 180px;
  border-bottom: 1px solid #edf2f8;
}

.appointment-structure-week:last-child {
  border-bottom: none;
}

.appointment-structure-col {
  padding: 16px;
  border-right: 1px solid #edf2f8;
}

.appointment-structure-week > .appointment-structure-col:last-child {
  border-right: none;
}

.appointment-structure-col-kw {
  display: grid;
  gap: 6px;
  align-content: start;
}

.appointment-structure-col-kw strong {
  font-size: 1rem;
}

.appointment-structure-col-kw small,
.appointment-structure-col-range {
  color: var(--muted);
  line-height: 1.45;
}

.appointment-structure-col-month {
  display: flex;
  align-items: start;
}

.appointment-structure-col-terms,
.appointment-structure-col-actions {
  display: grid;
  gap: 14px;
}

.appointment-structure-service-row,
.appointment-structure-action-row {
  display: grid;
  gap: 10px;
}

.appointment-structure-service-row {
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: start;
}

.appointment-structure-service-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #475569;
  padding-top: 8px;
}

.appointment-structure-service-content {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.appointment-structure-empty {
  color: var(--muted);
  font-style: italic;
  padding: 8px 0;
}

.appointment-structure-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  border-radius: 999px;
  border: 1px solid #dbe7f5;
  background: #f8fbff;
  color: #334155;
  font: inherit;
  font-weight: 700;
}

.appointment-structure-chip-main {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
  padding: 0;
  cursor: pointer;
}

.appointment-structure-chip-select {
  min-height: 28px;
  max-width: 170px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.85);
  color: inherit;
  padding: 0 10px;
  font: inherit;
  font-size: 0.78rem;
}

.appointment-structure-chip.status-done {
  background: #eaf7ee;
  border-color: #b7ddc2;
  color: #2f6b45;
}

.appointment-structure-chip.status-planned {
  background: #eaf3fb;
  border-color: #bdd3ee;
  color: #24507a;
}

.appointment-structure-chip.status-shifted {
  background: #fff3df;
  border-color: #f1d39a;
  color: #8a5a12;
}

.appointment-structure-chip.status-critical {
  background: #fde2e2;
  border-color: #e06a6a;
  color: #9f1d1d;
}

.appointment-structure-chip.selected {
  border-color: #93c5fd;
  background: #eaf2ff;
  color: #1d4ed8;
}

.appointment-structure-chip.table-conflict {
  background: #fff6f6;
  border-color: #fecaca;
  color: #b42318;
}

.appointment-structure-chip.series-row {
  box-shadow: inset 0 -2px 0 var(--series-accent, #7c3aed);
}

.appointment-structure-chip-date,
.appointment-structure-chip-time,
.appointment-structure-chip-duration {
  color: #475569;
}

.appointment-structure-chip-status {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.78rem;
}

.appointment-structure-chip-status.status-done {
  background: #d7efe0;
  color: #2f6b45;
}

.appointment-structure-chip-status.status-planned {
  background: #d7e9f9;
  color: #24507a;
}

.appointment-structure-chip-status.status-shifted {
  background: #fce5bf;
  color: #8a5a12;
}

.appointment-structure-chip-status.status-critical {
  background: #fecaca;
  color: #9f1d1d;
}

.appointment-structure-chip-status.holiday {
  background: #fee2e2;
  color: #b91c1c;
}

@media (max-width: 1440px) {
  .appointment-structure-head,
  .appointment-structure-week {
    grid-template-columns: 96px 150px 96px minmax(420px, 1fr) 156px;
    min-width: 918px;
  }

  .appointment-structure-service-row {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .calendar-outlook-shell,
  .calendar-outlook-shell.month {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}

.appointment-structure-add-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #fff;
  color: #1f4f7d;
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}

.appointment-structure-action-dropdown {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.appointment-structure-action-dropdown summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
  color: #1f4f7d;
  list-style: none;
}

.appointment-structure-action-dropdown summary::-webkit-details-marker {
  display: none;
}

.appointment-structure-action-dropdown-body {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.appointment-structure-card {
  flex: 1 1 100%;
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  background: #fcfdff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.appointment-structure-card.status-done {
  background: #f7fcf8;
  border-color: #cfe7d7;
}

.appointment-structure-card.status-planned {
  background: #f7fbff;
  border-color: #d4e2f2;
}

.appointment-structure-card.status-shifted {
  background: #fffaf0;
  border-color: #f0ddba;
}

.appointment-structure-card.status-critical {
  background: #fff5f5;
  border-color: #f3c6c6;
}

.appointment-structure-card.table-conflict {
  background: #fff6f6;
}

.appointment-structure-card.import-review-row {
  background: #fffaf0;
}

.appointment-structure-card.focused-appointment-row {
  background: #eaf2ff;
  box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.18), 0 8px 22px rgba(15, 23, 42, 0.04);
}

.appointment-structure-card.series-row {
  box-shadow: inset 4px 0 0 var(--series-accent, #7c3aed), 0 8px 22px rgba(15, 23, 42, 0.04);
}

.appointment-structure-card-head,
.appointment-structure-card-body,
.appointment-structure-card-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.appointment-structure-card-pills,
.appointment-structure-value-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.appointment-structure-status-box {
  flex: 1 1 220px;
}

.appointment-structure-card-notes {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.5;
}

.appointment-import-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.appointment-import-legend-title {
  font-weight: 700;
}

.appointment-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
  background: #fff;
}

.appointment-table th,
.appointment-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf2f8;
  text-align: left;
}

.appointment-table th {
  background: #f8fbff;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.appointment-table tr:hover td {
  background: #fbfdff;
}

.appointment-table tr.table-conflict td {
  background: #fff6f6;
}

.appointment-table tr.import-review-row td {
  background: #fffaf0;
}

.appointment-table tr.focused-appointment-row td {
  background: #eaf2ff;
  box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.18);
}

.appointment-table tr.series-row td:first-child {
  box-shadow: inset 4px 0 0 var(--series-accent, #7c3aed);
}

.series-pill {
  margin-top: 6px;
}

.import-review-note {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
}

.import-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-badge {
  border-width: 1px;
}

.import-badge-manual {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.import-badge-matched {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.import-badge-new-import {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.import-badge-review {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.inline-status-box {
  display: grid;
  gap: 6px;
  min-width: 190px;
}

.inline-status-box small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.inline-status-select {
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid #d7e1ef;
  background: #fff;
  padding: 0 12px;
  font: inherit;
}

.appointment-group-row td {
  background: #f8fbff;
  border-bottom: 1px solid #dbe7f5;
  padding-top: 14px;
  padding-bottom: 14px;
}

.appointment-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #334155;
  font-size: 0.94rem;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1480px) {
  .appointment-structure-wrap {
    overflow: auto;
  }

  .appointment-structure-head,
  .appointment-structure-week {
    min-width: 1180px;
  }
}

.small-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.small-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.small-btn.small-btn-quiet {
  background: #f8fafc;
  color: #475569;
}

.conflict-note-block {
  display: grid;
  gap: 8px;
}

.conflict-note-title {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

.conflict-note-list {
  display: grid;
  gap: 6px;
}

.conflict-inline-link {
  display: inline-flex;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fff;
  color: #991b1b;
  cursor: pointer;
  font-weight: 700;
}

.conflict-inline-link:hover {
  background: #fff1f2;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 6px 0 2px;
}

.checkbox-grid label,
.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.warning-box {
  border: 1px solid #fca5a5;
  background: linear-gradient(180deg, #fff1f1, #fff9f9);
  border-radius: 18px;
  padding: 14px 16px;
  color: #7f1d1d;
}

.warning-box strong {
  display: block;
  margin-bottom: 6px;
}

.warning-box ul {
  margin: 10px 0 0 18px;
  padding: 0;
}

.warning-box li + li {
  margin-top: 6px;
}

.appointment-return-nav {
  display: flex;
  justify-content: flex-start;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.appointment-conflict-live-list {
  list-style: disc;
}

.appointment-conflict-live-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.appointment-conflict-live-item .small-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding-inline: 12px;
}

.profiling-warning-box {
  margin-bottom: 10px;
}

.profiling-phase-shell {
  margin-bottom: 10px;
}

.profiling-phase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 10px;
  margin-top: 10px;
  align-items: start;
}

.profiling-phase-layout.summary-only {
  grid-template-columns: 1fr;
}

.profiling-phase-board {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.profiling-phase-legend {
  margin-top: 8px;
  border: 1px dashed #fecaca;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px 10px;
}

.profiling-phase-legend summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: #7f1d1d;
  list-style: none;
}

.profiling-phase-legend summary::-webkit-details-marker {
  display: none;
}

.profiling-phase-legend-items {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.profiling-phase-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
  font-size: 0.78rem;
}

.profiling-phase-legend-chip strong {
  color: #7c2d12;
}

.profiling-phase-table-wrap {
  overflow: auto;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.profiling-phase-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.profiling-phase-table th,
.profiling-phase-table td {
  border-bottom: 1px solid #fee2e2;
  border-right: 1px solid rgba(252, 165, 165, 0.24);
  padding: 0;
  vertical-align: top;
}

.profiling-phase-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 249, 249, 0.98);
  color: #7f1d1d;
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 12px;
}

.profiling-phase-table th:first-child,
.profiling-phase-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff8f8;
}

.profiling-phase-name-cell {
  min-width: 260px;
}

.profiling-phase-name-btn {
  width: 100%;
  min-height: 84px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  display: grid;
  gap: 5px;
  cursor: pointer;
  color: inherit;
}

.profiling-phase-name-btn strong {
  font-size: 0.92rem;
}

.profiling-phase-name-btn small {
  color: #7f1d1d;
  font-size: 0.76rem;
  line-height: 1.3;
}

.profiling-phase-status-copy {
  color: var(--muted) !important;
}

.profiling-phase-week-cell {
  min-width: 96px;
}

.profiling-phase-week-btn {
  width: 100%;
  min-height: 84px;
  border: 0;
  background: rgba(255, 255, 255, 0.84);
  padding: 10px 8px;
  display: grid;
  gap: 7px;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.profiling-phase-week-btn.is-clear {
  background: rgba(220, 252, 231, 0.86);
}

.profiling-phase-week-btn.is-open {
  background: rgba(254, 243, 199, 0.88);
}

.profiling-phase-week-btn.is-overdue {
  background: rgba(254, 226, 226, 0.92);
}

.profiling-phase-week-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profiling-phase-week-head span {
  font-weight: 800;
  font-size: 0.84rem;
}

.profiling-phase-week-head small {
  color: #7f1d1d;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profiling-phase-cell-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.profiling-phase-cell-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(220, 38, 38, 0.22);
  color: #991b1b;
  font-size: 0.7rem;
  font-weight: 700;
}

.profiling-phase-cell-pill.is-clear {
  border-color: rgba(21, 128, 61, 0.22);
  color: #166534;
}

.profiling-phase-cell-pill.is-phase {
  border-color: rgba(217, 119, 6, 0.24);
  color: #9a3412;
}

.profiling-phase-summary {
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.profiling-phase-summary.is-full-width {
  max-width: none;
}

.profiling-phase-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profiling-phase-summary-meta {
  color: #7f1d1d;
  font-size: 0.8rem;
}

.profiling-phase-summary-list {
  display: grid;
  gap: 6px;
  max-height: 380px;
  overflow: auto;
}

.profiling-phase-summary-link {
  width: 100%;
  border: 1px solid #fca5a5;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 10px;
  padding: 8px 9px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.profiling-phase-summary-link:hover,
.profiling-phase-name-btn:hover,
.profiling-phase-week-btn:hover {
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.1);
}

.profiling-phase-summary-link strong {
  font-size: 0.85rem;
}

.profiling-phase-summary-link small,
.profiling-phase-summary-empty {
  color: #7f1d1d;
  font-size: 0.75rem;
  line-height: 1.35;
}

.profiling-phase-summary-link.is-complete {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.profiling-phase-summary-link.is-complete small {
  color: var(--muted);
}

.profiling-simple-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.profiling-simple-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.profiling-simple-name,
.profiling-simple-box {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #fecaca;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}

.profiling-simple-name {
  display: flex;
  align-items: center;
  color: var(--text);
  font-weight: 700;
}

.profiling-simple-box {
  display: grid;
  gap: 6px;
}

.profiling-simple-box-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7f1d1d;
  font-weight: 800;
}

.profiling-simple-box strong {
  font-size: 0.95rem;
}

.profiling-simple-box small {
  color: #7f1d1d;
  line-height: 1.35;
}

.profiling-mini-grid {
  display: grid;
  grid-template-columns: 44px 50px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: start;
  margin-top: 2px;
  font-size: 0.78rem;
}

.profiling-mini-cell {
  display: block;
  min-width: 0;
  color: #7f1d1d;
  line-height: 1.25;
}

.profiling-mini-cell.is-head {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  color: #991b1b;
  opacity: 0.9;
}

.profiling-mini-cell.is-code,
.profiling-mini-cell.is-count {
  font-weight: 700;
}

.profiling-mini-cell.is-detail {
  overflow-wrap: anywhere;
}

.profiling-mini-cell.is-empty {
  font-style: italic;
  opacity: 0.85;
}

.profiling-simple-name:hover,
.profiling-simple-box:hover {
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.1);
}

.profiling-simple-box.traffic-green {
  background: rgba(220, 252, 231, 0.9);
  border-color: rgba(34, 197, 94, 0.35);
}

.profiling-simple-box.traffic-amber {
  background: rgba(254, 243, 199, 0.92);
  border-color: rgba(245, 158, 11, 0.35);
}

.profiling-simple-box.traffic-red {
  background: rgba(254, 226, 226, 0.92);
  border-color: rgba(239, 68, 68, 0.35);
}

.profiling-simple-box.traffic-neutral {
  background: rgba(226, 232, 240, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
}

.profiling-simple-box.traffic-green .profiling-mini-cell,
.profiling-simple-box.traffic-green small,
.profiling-simple-box.traffic-green .profiling-simple-box-label {
  color: #166534;
}

.profiling-simple-box.traffic-amber .profiling-mini-cell,
.profiling-simple-box.traffic-amber small,
.profiling-simple-box.traffic-amber .profiling-simple-box-label {
  color: #92400e;
}

.profiling-simple-box.traffic-red .profiling-mini-cell,
.profiling-simple-box.traffic-red small,
.profiling-simple-box.traffic-red .profiling-simple-box-label {
  color: #991b1b;
}

.profiling-warning-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.profiling-warning-group {
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  padding: 8px 9px;
}

.profiling-warning-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.monitoring-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.monitoring-compact-text {
  color: #7f1d1d;
  font-size: 0.93rem;
}

.monitoring-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 8px;
}

.monitoring-section-head strong {
  color: #334155;
  font-size: 0.95rem;
}

.import-review-monitor {
  margin-bottom: 10px;
}

.import-review-monitor-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.import-review-monitor-item {
  width: 100%;
  border: 1px solid #fcd34d;
  background: rgba(255, 255, 255, 0.84);
  border-radius: 12px;
  padding: 9px 10px;
  text-align: left;
  display: grid;
  gap: 4px;
  color: inherit;
  cursor: pointer;
}

.import-review-monitor-item:hover {
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
}

.import-review-monitor-item strong {
  margin: 0;
}

.import-review-monitor-item small {
  color: #7c2d12;
  line-height: 1.35;
}

.profiling-warning-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.profiling-warning-link {
  width: 100%;
  border: 1px solid #fca5a5;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 10px;
  padding: 7px 8px;
  display: block;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.profiling-warning-link:hover {
  border-color: #ef4444;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.12);
}

.profiling-warning-link small {
  color: #7f1d1d;
  line-height: 1.28;
}

.profiling-warning-label {
  font-weight: 700;
}

.profiling-warning-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profiling-warning-person {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
}

.profiling-warning-person.is-overdue,
.profiling-warning-label.is-overdue {
  color: #b91c1c;
}

@media (max-width: 1120px) {
  .profiling-phase-layout {
    grid-template-columns: 1fr;
  }

  .profiling-simple-row {
    grid-template-columns: 1fr;
  }
}

.checkbox-line input {
  width: 18px;
  height: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  justify-items: center;
  align-items: start;
  overflow: auto;
  padding: 14px 20px 20px;
  z-index: 30;
}

#seriesScopeModal {
  z-index: 36;
}

.modal {
  width: min(780px, 100%);
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(214, 222, 235, 0.8);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
}

.modal-auth {
  width: min(540px, 100%);
}

.modal-large {
  width: min(1040px, 100%);
}

.modal-xlarge {
  width: min(1480px, calc(100vw - 24px));
}

.modal-signature {
  width: min(900px, calc(100vw - 24px));
}

.modal-head,
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid #edf2f8;
}

.modal-footer {
  border-bottom: 0;
  border-top: 1px solid #edf2f8;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal-head h3 {
  margin: 0;
}

.auth-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-remember-row {
  justify-content: flex-start;
  color: var(--text);
  font-weight: 600;
}

.auth-reset-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.modal-body {
  padding: 22px;
  overflow: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}

.responsibility-modal-body {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.series-scope-body {
  display: grid;
  gap: 14px;
}

.series-scope-meta,
.series-scope-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.browser-hint {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  background: #f8fbff;
  color: #47607f;
  line-height: 1.45;
  font-size: 0.92rem;
}

.series-scope-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.series-scope-actions .btn {
  flex: 1 1 140px;
  min-height: 44px;
  padding-inline: 14px;
}

.series-scope-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.responsibility-list-panel,
.responsibility-form-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.responsibility-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
}

.responsibility-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.responsibility-card h4 {
  margin: 0 0 6px;
}

#responsibilityParticipantsInput .multi-select-body {
  max-height: min(480px, 62vh);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.icon-btn {
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

#signatureCanvas {
  width: 100%;
  height: 220px;
  border: 1px dashed #b8c4d8;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff),
    repeating-linear-gradient(0deg, transparent, transparent 36px, rgba(29, 78, 216, 0.06) 37px);
  touch-action: none;
}

.signature-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}

.small-btn-signature {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.22);
}

.small-btn-signature:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
}

.signature-meta {
  margin-bottom: 14px;
  color: var(--muted);
}

.tooltip {
  position: fixed;
  max-width: 340px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.32);
  z-index: 40;
  pointer-events: none;
  font-size: 0.88rem;
  line-height: 1.5;
}

.tooltip strong {
  display: block;
  margin-bottom: 6px;
}

.coaching-matrix-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.coaching-matrix-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px)) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.coaching-matrix-toolbar .field {
  margin: 0;
}

.coaching-matrix-toolbar-note {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  background: #f8fbff;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.coaching-matrix-table {
  min-width: 1180px;
}

.coaching-matrix-table th {
  text-align: center;
}

.coaching-matrix-date-table {
  min-width: 980px;
}

.coaching-matrix-date-head {
  min-width: 110px;
}

.coaching-matrix-date-head div {
  font-weight: 800;
}

.coaching-matrix-date-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.coaching-matrix-service-head {
  min-width: 88px;
}

.coaching-matrix-name {
  background: #fff;
}

.coaching-mini-cell {
  min-width: 88px;
  text-align: center;
  vertical-align: middle;
  background: #fff;
}

.coaching-mini-cell.empty {
  background: #fcfdff;
}

.coaching-date-cell {
  min-width: 110px;
}

.coaching-date-stack {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.coaching-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  color: #17325e;
  font-weight: 800;
  font-size: 0.76rem;
  cursor: default;
}

.coaching-date-badge {
  min-width: 82px;
  padding: 6px 10px;
  line-height: 1.2;
  text-align: center;
}

.coaching-mini-empty {
  color: #94a3b8;
  font-weight: 700;
}

.inline-field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.free-slots-form {
  margin-bottom: 18px;
}

.free-slots-info {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.free-slots-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.free-slots-summary-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
}

.free-slots-summary-card strong {
  font-size: 1.05rem;
}

.free-slots-summary-card span,
.free-slots-summary-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.free-slots-summary-note {
  margin-bottom: 18px;
}

.free-slots-participant-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.free-slots-participant-picker.empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.free-slots-participant-chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
}

.free-slots-participant-chip.active {
  border-color: #16a34a;
  background: #ecfdf5;
  color: #166534;
}

.free-slots-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.free-slots-column {
  display: grid;
  gap: 18px;
}

.free-slots-list-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.free-slots-list-section h4 {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid #edf2fb;
}

.free-slots-list {
  display: grid;
  gap: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y manipulation;
}

.free-slot-row {
  width: 100%;
  border: 0;
  border-top: 1px solid #edf2fb;
  background: #fff;
  text-align: left;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.free-slot-row:first-child {
  border-top: 0;
}

.free-slot-row.free {
  cursor: pointer;
}

.free-slot-row.free:hover,
.free-slot-track-segment.free:hover {
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.28);
}

.free-slot-row.busy {
  background: #fcfdff;
}

.free-slot-row-main {
  font-weight: 600;
  color: #1e293b;
}

.free-slot-row-side {
  color: var(--muted);
  white-space: nowrap;
}

.free-slots-calendar-section {
  display: grid;
  gap: 14px;
}

.free-slots-calendar-list {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y manipulation;
}

.free-slots-day-row {
  display: grid;
  gap: 8px;
}

.free-slots-day-head,
.free-slots-month-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
}

.free-slots-day-head span,
.free-slots-month-head span {
  color: var(--muted);
}

.free-slot-track {
  position: relative;
  min-height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  overflow: hidden;
  border: 1px solid #dce7f7;
}

.free-slot-track-segment {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border: 0;
  border-radius: 999px;
}

.free-slot-track-segment.busy {
  background: linear-gradient(180deg, #fca5a5, #ef4444);
}

.free-slot-track-segment.free {
  background: linear-gradient(180deg, #86efac, #22c55e);
  cursor: pointer;
}

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

.free-slots-month-day {
  border: 1px solid #e5edf8;
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: #fcfdff;
}

.calendar-panel {
  display: grid;
  gap: 16px;
}

.calendar-panel.is-collapsed {
  gap: 10px;
}

.calendar-head-meta {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.calendar-toolbar .field {
  margin: 0;
}

.calendar-toolbar .dropdown-field.is-multi-select-open-host {
  grid-column: 1 / span 3;
}

.calendar-toolbar .dropdown-field.is-multi-select-open-host #calendarParticipantInput {
  width: 100%;
}

.calendar-toolbar .dropdown-field.is-multi-select-open-host #calendarParticipantInput .multi-select-body {
  width: 100%;
  max-width: none;
}

.calendar-participant-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e4ecf7;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.calendar-participant-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.calendar-participant-head strong {
  color: #0f172a;
}

.calendar-participant-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.calendar-week-section,
.calendar-month-section,
.calendar-agenda-list {
  display: grid;
  gap: 14px;
}

.calendar-week-section h4,
.calendar-month-section h4 {
  margin: 0;
  color: #1e293b;
}

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

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

.calendar-day-card,
.calendar-month-card,
.calendar-agenda-day {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.calendar-day-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-day-card-head strong {
  color: #0f172a;
}

.calendar-day-card-head span {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.calendar-appointment-stack {
  display: grid;
  gap: 10px;
}

.calendar-appointment-stack.compact {
  gap: 8px;
}

.calendar-appointment-chip {
  width: 100%;
  border: 1px solid #dce7f7;
  border-radius: 16px;
  background: #fff;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.calendar-appointment-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.calendar-appointment-chip.status-done {
  background: #eefaf1;
  border-color: #bfdfc7;
}

.calendar-appointment-chip.status-planned {
  background: #eef5ff;
  border-color: #c9dbfb;
}

.calendar-appointment-chip.status-shifted {
  background: #fff6e7;
  border-color: #efd39a;
}

.calendar-appointment-chip.status-critical {
  background: #fde8e8;
  border-color: #e8a1a1;
}

.calendar-appointment-chip.status-neutral {
  background: #f8fafc;
  border-color: #d8e2f0;
}

.calendar-appointment-time {
  font-weight: 800;
  color: #0f172a;
}

.calendar-appointment-label {
  font-weight: 700;
  color: #1d4b7b;
}

.calendar-appointment-status {
  color: var(--muted);
  font-size: 0.84rem;
}

.calendar-appointment-status.holiday {
  color: #b42318;
  font-weight: 700;
}

.calendar-free-pill-row,
.calendar-agenda-section {
  display: grid;
  gap: 8px;
}

.calendar-agenda-section h5 {
  margin: 0;
  color: #334155;
}

.calendar-free-pill {
  border: 1px dashed #97d7af;
  border-radius: 999px;
  background: #f0fff4;
  color: #166534;
  font-weight: 700;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.calendar-free-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.16);
  border-color: #46c86c;
}

.calendar-free-pill.wide {
  border-radius: 16px;
}

.calendar-empty {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 8px 0;
}

.calendar-empty.small {
  font-size: 0.82rem;
}

.calendar-outlook-section {
  background: linear-gradient(180deg, #fdfefe, #f7faff);
  border-color: #d9e5f4;
}

.calendar-outlook-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.calendar-outlook-shell.month {
  grid-template-columns: 220px minmax(0, 1fr);
}

.calendar-outlook-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 12px;
  align-self: start;
}

.calendar-outlook-sidebar-card,
.calendar-outlook-mini-month {
  border: 1px solid #dbe5f2;
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.calendar-outlook-sidebar-card strong {
  color: #0f172a;
}

.calendar-outlook-sidebar-card span,
.calendar-outlook-mini-month h5 {
  margin: 0;
  color: var(--muted);
}

.calendar-outlook-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-outlook-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #dbe5f2;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

.calendar-outlook-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-outlook-mini-month h5 {
  color: #1e293b;
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0;
}

.calendar-outlook-mini-nav {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1.5px solid #b7c9e6;
  background: #f8fbff;
  color: #17325e;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.calendar-outlook-mini-nav:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #7ea3de;
  background: #eef5ff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.calendar-outlook-mini-nav:disabled {
  opacity: 0.42;
  cursor: default;
}

.calendar-outlook-mini-weekdays,
.calendar-outlook-mini-grid {
  display: grid;
  grid-template-columns: 34px repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-outlook-month-weekdays,
.calendar-outlook-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-outlook-month-weekdays.is-hide-weekends,
.calendar-outlook-month-grid.is-hide-weekends {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.calendar-outlook-mini-weekdays span,
.calendar-outlook-month-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.calendar-outlook-mini-weekdays span.is-week-label {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.calendar-outlook-mini-week-cell,
.calendar-outlook-mini-cell {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #334155;
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
}

.calendar-outlook-mini-week-cell {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
}

.calendar-outlook-mini-cell.is-empty {
  opacity: 0;
}

.calendar-outlook-mini-week-cell.is-clickable,
.calendar-outlook-mini-cell.is-clickable {
  cursor: pointer;
}

.calendar-outlook-mini-week-cell.is-clickable:hover,
.calendar-outlook-mini-cell.is-clickable:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.calendar-outlook-mini-cell.is-active {
  background: #eef4ff;
  color: #17325e;
  font-weight: 700;
  border-color: #93b4ea;
}

.calendar-outlook-mini-cell.is-today {
  border: 1px solid #3b82f6;
}

.calendar-outlook-mini-cell.is-outside-month {
  color: #9aa8bb;
}

.calendar-outlook-mini-cell.is-current-week {
  background: #f3f7ff;
}

.calendar-outlook-mini-cell.is-holiday {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
  font-weight: 800;
}

.calendar-outlook-mini-week-cell.is-current-week {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.calendar-outlook-main {
  min-width: 0;
  display: grid;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.calendar-outlook-grid {
  display: grid;
  grid-template-columns: 74px repeat(auto-fit, minmax(180px, 1fr));
  min-width: 980px;
  gap: 12px;
  align-items: start;
  --calendar-outlook-track-height: 700px;
  --calendar-outlook-head-height: 58px;
  --calendar-outlook-column-gap: 10px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.calendar-outlook-grid.is-day {
  grid-template-columns: 74px minmax(240px, 1fr);
  min-width: 340px;
}

.calendar-outlook-hours-column {
  display: grid;
  grid-template-rows: var(--calendar-outlook-head-height) minmax(var(--calendar-outlook-track-height), auto);
  gap: var(--calendar-outlook-column-gap);
}

.calendar-outlook-hours-head {
  min-height: var(--calendar-outlook-head-height);
}

.calendar-outlook-hours-track,
.calendar-outlook-day-track {
  position: relative;
  min-height: var(--calendar-outlook-track-height);
  touch-action: pan-y manipulation;
}

.calendar-outlook-hours-track {
  border-right: 1px solid #dce7f7;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.96));
  border-radius: 16px;
}

.calendar-outlook-day {
  display: grid;
  gap: var(--calendar-outlook-column-gap);
}

.calendar-outlook-day-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding: 0 4px;
  min-height: var(--calendar-outlook-head-height);
}

.calendar-outlook-day-head-main {
  display: grid;
  gap: 6px;
}

.calendar-outlook-day-head strong {
  color: #0f172a;
}

.calendar-outlook-day-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.calendar-outlook-day-track {
  border: 1px solid #dce7f7;
  border-radius: 18px;
  background:
    repeating-linear-gradient(
      to bottom,
      #ffffff 0,
      #ffffff 59px,
      #eef4ff 60px
    );
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.calendar-outlook-day-track.is-holiday,
.calendar-outlook-month-cell.is-holiday {
  border-color: #ef4444;
  background:
    linear-gradient(180deg, rgba(254, 226, 226, 0.72), rgba(255, 255, 255, 0.96)),
    repeating-linear-gradient(
      to bottom,
      #ffffff 0,
      #ffffff 59px,
      #eef4ff 60px
    );
}

.calendar-outlook-holiday-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.calendar-outlook-time-tick {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(191, 219, 254, 0.7);
}

.calendar-outlook-hours-column .calendar-outlook-time-tick {
  border-top: 0;
}

.calendar-outlook-time-tick span {
  position: absolute;
  top: -10px;
  left: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  border-radius: 999px;
}

.calendar-outlook-block-layer {
  position: absolute;
  inset: 0;
}

.calendar-outlook-block {
  position: absolute;
  left: 8px;
  right: 8px;
  width: calc(100% - 16px);
  border-radius: 14px;
  border: 1px solid #dce7f7;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.calendar-outlook-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 14px 0 0 14px;
  background: #94a3b8;
}

.calendar-outlook-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
}

.calendar-outlook-block strong {
  color: #0f172a;
  line-height: 1.15;
}

.calendar-outlook-block span {
  color: #334155;
  font-size: 0.78rem;
  line-height: 1.15;
}

.calendar-outlook-block-participant,
.calendar-outlook-month-pill .calendar-outlook-block-participant {
  font-size: 0.83rem;
  font-weight: 800;
}

.calendar-outlook-block-label,
.calendar-outlook-month-pill .calendar-outlook-block-label {
  font-size: 0.76rem;
  font-weight: 700;
}

.calendar-outlook-block-status {
  font-size: 0.74rem;
  color: #475569;
}

.calendar-outlook-block-linkage {
  font-size: 0.72rem;
  color: #7c2d12;
  font-weight: 700;
}

.calendar-outlook-block-time {
  font-weight: 800;
  padding-right: 8px;
}

.calendar-outlook-block.appointment.provider-gsm,
.calendar-outlook-legend-item.provider-gsm,
.calendar-outlook-month-pill.provider-gsm {
  background: #eefaf2;
  border-color: #b6dfc4;
}

.calendar-outlook-block.appointment.provider-gsm::before {
  background: #0f9f61;
}

.calendar-outlook-block.appointment.provider-median,
.calendar-outlook-legend-item.provider-median,
.calendar-outlook-month-pill.provider-median {
  background: #f2f6ff;
  border-color: #b7c9f8;
}

.calendar-outlook-block.appointment.provider-median::before {
  background: #2563eb;
}

.calendar-outlook-block.appointment.provider-p16k,
.calendar-outlook-legend-item.provider-p16k,
.calendar-outlook-month-pill.provider-p16k {
  background: #fff6ec;
  border-color: #efd0a4;
}

.calendar-outlook-block.appointment.provider-p16k::before {
  background: #d97706;
}

.calendar-outlook-block.appointment.provider-mocco,
.calendar-outlook-legend-item.provider-mocco,
.calendar-outlook-month-pill.provider-mocco {
  background: #fff4f1;
  border-color: #efbbb2;
}

.calendar-outlook-block.appointment.provider-mocco::before {
  background: #ea580c;
}

.calendar-outlook-block.appointment.provider-intern,
.calendar-outlook-legend-item.provider-intern,
.calendar-outlook-month-pill.provider-intern {
  background: #eef3f8;
  border-color: #bfd0e0;
}

.calendar-outlook-block.appointment.provider-intern::before {
  background: #475569;
}

.calendar-outlook-block.appointment.provider-other,
.calendar-outlook-legend-item.provider-other,
.calendar-outlook-month-pill.provider-other {
  background: #f5f7fb;
  border-color: #cdd8e6;
}

.calendar-outlook-block.appointment.provider-other::before {
  background: #64748b;
}

.calendar-outlook-block.appointment.provider-gsm.is-series,
.calendar-outlook-legend-item.provider-gsm.is-series,
.calendar-outlook-month-pill.provider-gsm.is-series {
  background: #dff2e6;
  border-color: #85c79f;
}

.calendar-outlook-block.appointment.provider-median.is-series,
.calendar-outlook-legend-item.provider-median.is-series,
.calendar-outlook-month-pill.provider-median.is-series {
  background: #e1ecff;
  border-color: #87aaf4;
}

.calendar-outlook-block.appointment.provider-p16k.is-series,
.calendar-outlook-legend-item.provider-p16k.is-series,
.calendar-outlook-month-pill.provider-p16k.is-series {
  background: #ffe9cf;
  border-color: #e4b76c;
}

.calendar-outlook-block.appointment.provider-mocco.is-series,
.calendar-outlook-legend-item.provider-mocco.is-series,
.calendar-outlook-month-pill.provider-mocco.is-series {
  background: #ffe3dd;
  border-color: #e5988b;
}

.calendar-outlook-block.appointment.provider-intern.is-series,
.calendar-outlook-legend-item.provider-intern.is-series,
.calendar-outlook-month-pill.provider-intern.is-series {
  background: #dde7f1;
  border-color: #95acc4;
}

.calendar-outlook-block.appointment.provider-other.is-series,
.calendar-outlook-legend-item.provider-other.is-series,
.calendar-outlook-month-pill.provider-other.is-series {
  background: #e8eef7;
  border-color: #9fb2cc;
}

.calendar-outlook-block.appointment.is-rescheduled-origin,
.calendar-outlook-month-pill.is-rescheduled-origin {
  box-shadow: inset 0 0 0 2px rgba(217, 119, 6, 0.28), 0 8px 18px rgba(15, 23, 42, 0.08);
}

.calendar-outlook-block.appointment.is-rescheduled-followup,
.calendar-outlook-month-pill.is-rescheduled-followup {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.22), 0 8px 18px rgba(15, 23, 42, 0.08);
}

.calendar-outlook-block.appointment.is-series,
.calendar-outlook-legend-item.is-series,
.calendar-outlook-month-pill.is-series {
  outline: 1px dashed rgba(15, 23, 42, 0.16);
  outline-offset: -3px;
}

.calendar-day-card.is-focused-date,
.calendar-month-card.is-focused-date,
.calendar-agenda-day.is-focused-date,
.calendar-outlook-day.is-focused-date,
.calendar-outlook-month-cell.is-focused-date {
  outline: 2px solid rgba(43, 99, 217, 0.55);
  outline-offset: -2px;
  box-shadow: 0 0 0 4px rgba(43, 99, 217, 0.12);
}

.calendar-day-card.is-today,
.calendar-month-card.is-today,
.calendar-agenda-day.is-today,
.calendar-outlook-day.is-today,
.calendar-outlook-month-cell.is-today {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.calendar-day-card.is-today .calendar-day-card-head strong,
.calendar-month-card.is-today .calendar-day-card-head strong,
.calendar-agenda-day.is-today .calendar-day-card-head strong,
.calendar-outlook-day.is-today .calendar-outlook-day-head strong,
.calendar-outlook-month-cell.is-today .calendar-outlook-month-date {
  color: #b45309;
}

.calendar-day-card.is-today .calendar-day-card-head strong::after,
.calendar-month-card.is-today .calendar-day-card-head strong::after,
.calendar-agenda-day.is-today .calendar-day-card-head strong::after,
.calendar-outlook-day.is-today .calendar-outlook-day-head strong::after {
  content: "Heute";
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.calendar-outlook-month-cell.is-today .calendar-outlook-month-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  font-weight: 800;
}

.calendar-outlook-month-cell[data-action="calendar-create-day"],
.calendar-outlook-day-track[data-action="calendar-create-at-time"] {
  cursor: pointer;
}

.calendar-outlook-month-cell[data-action="calendar-create-day"]:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.08);
}

.calendar-outlook-block.free {
  background: rgba(34, 197, 94, 0.12);
  border-style: dashed;
  border-color: #74d79a;
  box-shadow: none;
}

.calendar-outlook-block.free::before {
  background: #22c55e;
}

.calendar-outlook-month-board {
  display: grid;
  gap: 12px;
}

.calendar-outlook-month-board h4 {
  margin: 0;
}

.calendar-outlook-month-board.is-active-month h4 {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #bfd3f8;
  color: #17325e;
  font-weight: 800;
}

.calendar-outlook-month-cell {
  min-height: 160px;
  border: 1px solid #dce7f7;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  touch-action: manipulation;
}

.calendar-outlook-month-cell.is-empty {
  background: transparent;
  border-style: dashed;
  opacity: 0.4;
}

.calendar-outlook-month-date {
  font-weight: 800;
  color: #0f172a;
}

.calendar-outlook-month-content {
  display: grid;
  gap: 8px;
}

.calendar-outlook-month-pill {
  width: 100%;
  border: 1px solid #dce7f7;
  border-radius: 12px;
  padding: 7px 9px;
  display: grid;
  gap: 2px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.calendar-outlook-month-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.calendar-outlook-month-pill strong {
  color: #0f172a;
  font-size: 0.8rem;
}

.calendar-outlook-month-pill span {
  color: #334155;
  font-size: 0.74rem;
}

body.calendar-link-mode .quick-nav-shell,
body.calendar-link-mode .quick-nav,
body.calendar-link-mode #syncSection,
body.calendar-link-mode #measureSection,
body.calendar-link-mode #summarySection,
body.calendar-link-mode #monitoringSection,
body.calendar-link-mode #filtersSection,
body.calendar-link-mode #matrixSection,
body.calendar-link-mode #participantsSection,
body.calendar-link-mode #usersPanel {
  display: none;
}

body.calendar-link-mode #actionsSection .action-group:first-child {
  display: none;
}

body.calendar-link-mode #actionsSection .tool-drawer,
body.calendar-link-mode #actionsSection .meta-row {
  display: none;
}

body.calendar-link-mode #actionsSection .actions-grid {
  grid-template-columns: 1fr;
}

body.calendar-link-mode #actionsSection .action-group.right {
  justify-content: flex-start;
}

body.device-mode-tablet .btn,
body.device-mode-tablet .link-button,
body.device-mode-tablet .device-mode-button {
  min-height: 48px;
}

body.device-mode-tablet .filters-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.device-mode-tablet .calendar-toolbar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.calendar-link-mode.device-mode-tablet .calendar-outlook-grid {
  gap: 8px;
}

body.calendar-link-mode.device-mode-tablet .calendar-outlook-day {
  min-width: min(31vw, 220px);
}

body.calendar-link-mode.device-mode-tablet .calendar-outlook-block {
  left: 5px;
  right: 5px;
  width: calc(100% - 10px);
  padding: 6px 7px 6px 9px;
}

body.calendar-link-mode.device-mode-tablet .calendar-outlook-block strong {
  font-size: 0.74rem;
}

body.calendar-link-mode.device-mode-tablet .calendar-outlook-block span {
  font-size: 0.67rem;
}

body.device-mode-tablet .calendar-toolbar .dropdown-field.is-multi-select-open-host {
  grid-column: 1 / -1;
}

body.device-mode-tablet #calendarParticipantInput .multi-select-body,
body.device-mode-smartphone #calendarParticipantInput .multi-select-body {
  width: calc(100vw - 28px);
  max-width: calc(100vw - 28px);
}

body.device-mode-tablet .modal-large,
body.device-mode-tablet .modal-xlarge {
  width: min(1240px, calc(100vw - 22px));
}

body.device-mode-tablet .modal-signature {
  width: min(100%, calc(100vw - 16px));
  min-height: calc(100vh - 20px);
}

body.device-mode-tablet .appointment-structure-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.device-mode-tablet .appointment-structure-card-actions .small-btn-signature {
  grid-column: 1 / -1;
  min-height: 56px;
  font-size: 1rem;
}

body.device-mode-tablet #signatureCanvas {
  height: 380px;
}

body.device-mode-tablet .signature-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), #fff);
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid #edf2f8;
}

body.device-mode-smartphone .app-header,
body.device-mode-smartphone .panel-head,
body.device-mode-smartphone .participant-head {
  grid-template-columns: 1fr;
  display: flex;
  flex-direction: column;
}

body.device-mode-smartphone .btn,
body.device-mode-smartphone .link-button,
body.device-mode-smartphone .device-mode-button {
  min-height: 50px;
}

body.device-mode-smartphone .form-grid,
body.device-mode-smartphone .responsibility-modal-body,
body.device-mode-smartphone .calendar-toolbar,
body.device-mode-smartphone .free-slots-summary-grid,
body.device-mode-smartphone .free-slots-layout,
body.device-mode-smartphone .inline-field-pair,
body.device-mode-smartphone .participant-workbench {
  grid-template-columns: 1fr;
}

body.device-mode-smartphone .calendar-toolbar .dropdown-field.is-multi-select-open-host {
  grid-column: 1 / -1;
}

body.device-mode-smartphone .field-span-2 {
  grid-column: span 1;
}

body.device-mode-smartphone .modal,
body.device-mode-smartphone .modal-large,
body.device-mode-smartphone .modal-xlarge,
body.device-mode-smartphone .modal-auth {
  width: min(100%, calc(100vw - 12px));
  border-radius: 18px;
}

body.device-mode-smartphone .modal-signature {
  width: min(100%, calc(100vw - 6px));
  min-height: calc(100vh - 10px);
  border-radius: 16px;
}

body.device-mode-smartphone #signatureCanvas {
  height: 360px;
}

body.device-mode-smartphone .appointment-structure-card-actions {
  display: grid;
  grid-template-columns: 1fr;
}

body.device-mode-smartphone .appointment-structure-card-actions .small-btn-signature {
  min-height: 58px;
  font-size: 1rem;
}

body.device-mode-smartphone .signature-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), #fff);
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid #edf2f8;
}

body.device-mode-smartphone .calendar-outlook-shell,
body.device-mode-smartphone .calendar-outlook-shell.month,
body.device-mode-smartphone .calendar-outlook-grid.is-day,
body.device-mode-smartphone .calendar-week-grid,
body.device-mode-smartphone .calendar-month-grid {
  grid-template-columns: 1fr;
}

body.device-mode-smartphone .calendar-outlook-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

body.device-mode-smartphone .calendar-outlook-hours-column {
  display: none;
}

body.device-mode-smartphone .calendar-outlook-day {
  min-width: clamp(108px, 31vw, 160px);
  scroll-snap-align: start;
}

body.device-mode-smartphone .calendar-outlook-day-track {
  min-height: 420px;
}

body.device-mode-smartphone .calendar-outlook-block {
  left: 4px;
  right: 4px;
  width: calc(100% - 8px);
  padding: 5px 6px 5px 8px;
  gap: 1px;
}

body.device-mode-smartphone .calendar-outlook-block strong {
  font-size: 0.68rem;
}

body.device-mode-smartphone .calendar-outlook-block span {
  font-size: 0.62rem;
}

#toastHost {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 50;
}

.toast {
  min-width: 260px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.toast.info { background: #1d4ed8; }
.toast.success { background: #15803d; }
.toast.error { background: #dc2626; }

.empty-state {
  text-align: center;
  padding: 40px 18px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  body {
    padding: 18px;
  }

  .quick-nav-shell {
    top: 8px;
    gap: 8px;
    padding: 10px 12px 12px;
  }

  .quick-nav-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-nav {
    padding-bottom: 8px;
  }

  .participant-head,
  .panel-head,
  .app-header {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }

  .coaching-matrix-toolbar {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar,
  .free-slots-summary-grid,
  .free-slots-layout,
  .inline-field-pair {
    grid-template-columns: 1fr;
  }

  .participant-actions {
    justify-content: flex-start;
  }

  .field-span-2 {
    grid-column: span 1;
  }

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

  .responsibility-modal-body {
    grid-template-columns: 1fr;
  }

  .series-scope-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .participant-workbench {
    grid-template-columns: 1fr;
  }

  .participant-navigator {
    position: static;
    max-height: none;
  }

  .participant-navigator-list {
    max-height: 260px;
  }

  .calendar-week-grid,
  .calendar-month-grid {
    grid-template-columns: 1fr;
  }

  .calendar-participant-head,
  .calendar-day-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-head-meta {
    justify-items: start;
  }

  .calendar-outlook-shell,
  .calendar-outlook-shell.month,
  .calendar-outlook-grid.is-day {
    grid-template-columns: 1fr;
  }

  .calendar-outlook-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .calendar-outlook-hours-column {
    display: none;
  }

  .calendar-outlook-day {
    min-width: clamp(112px, 31vw, 180px);
    scroll-snap-align: start;
  }

  .calendar-outlook-day-track {
    min-height: 500px;
  }

  .calendar-outlook-sidebar {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .calendar-outlook-sidebar-card,
  .calendar-outlook-mini-month {
    padding: 12px;
  }

  .calendar-outlook-block {
    left: 6px;
    right: 6px;
    width: calc(100% - 12px);
    padding: 7px 8px 7px 10px;
    gap: 1px;
  }

  .calendar-outlook-block strong {
    font-size: 0.82rem;
  }

  .calendar-outlook-block span {
    font-size: 0.74rem;
  }
}

@media (max-width: 720px) {
  .quick-nav-label {
    min-height: 26px;
    font-size: 0.74rem;
  }

  .quick-nav-hint {
    font-size: 0.8rem;
  }

  .quick-nav-btn {
    min-height: 32px;
    padding: 0 11px;
    font-size: 0.85rem;
  }
}

@media print {
  body {
    padding: 0;
    background: #fff;
  }

  .panel,
  .app-header {
    box-shadow: none;
  }
}
