:root {
  --mnb-ivory-50: #f7f3e9;
  --mnb-ivory-100: #f1ead8;
  --mnb-slate-50: #f1f5f9;
  --mnb-slate-100: #e2e8f0;
  --mnb-slate-200: #cbd5e1;
  --mnb-slate-300: #94a3b8;
  --mnb-slate-400: #64748b;
  --mnb-slate-500: #475569;
  --mnb-slate-600: #334155;
  --mnb-slate-700: #1e293b;
  --mnb-indigo-600: #4f46e5;
  --mnb-indigo-700: #4338ca;
  --mnb-indigo-50: #eef2ff;
  --mnb-amber-500: #f59e0b;
  --mnb-emerald-500: #10b981;
  --mnb-emerald-50: #ecfdf5;
  --mnb-shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --calendar-day-width: 104px;
  --calendar-gap: 8px;
  --calendar-listing-width: 196px;
  --dashboard-visual-viewport-height: 100dvh;
  --dashboard-visual-viewport-offset-top: 0px;
  --manager-mobile-safe-top: env(safe-area-inset-top, 0px);
  --manager-mobile-top-reserve: max(50px, calc(var(--manager-mobile-safe-top) + 4px));
  --manager-mobile-nav-height: 58px;
  --manager-mobile-nav-safe-bottom: 0px;
  --manager-mobile-nav-reserved-height: var(--manager-mobile-nav-height);
  --manager-mobile-content-bottom-reserve: calc(var(--manager-mobile-nav-reserved-height) + 6px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
.dashboard-body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--mnb-slate-700);
  font-family: "Inter", "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

.dashboard-body {
  min-height: 100dvh;
  background:
    radial-gradient(140% 80% at 0% 0%, var(--mnb-ivory-100) 0%, transparent 48%),
    linear-gradient(165deg, var(--mnb-ivory-50) 0%, var(--mnb-slate-50) 70%, #f8fafc 100%);
}

.skip-link {
  left: 1rem;
  position: fixed;
  top: 1rem;
  transform: translateY(-140%);
  transition: transform 0.18s ease;
  z-index: 120;
  background: #0f172a;
  color: #fff;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.skip-link:focus {
  transform: translateY(0);
}

.mnb-app-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: 100dvh;
}

.mnb-app-content {
  min-width: 0;
  width: 100%;
  padding: clamp(0.75rem, 1.6vw, 1.15rem);
  background: transparent;
}

.mnb-app-content:has(.dashboard-conversations-page) {
  background: #ffffff;
  padding: 0;
}

.dashboard-page-shell {
  display: grid;
  gap: 1rem;
  min-width: 0;
  width: 100%;
}

.mnb-page-title {
  color: #0f172a;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mnb-page-title::after {
  background: linear-gradient(90deg, var(--mnb-indigo-600), transparent);
  content: "";
  display: block;
  height: 2px;
  margin-top: 0.35rem;
  width: 2.6rem;
}

.mnb-section-title {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Sidebar navigation */
.sidebar-nav {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-right: 1px solid rgba(71, 85, 105, 0.14);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  position: sticky;
  top: 0;
  transition: width 0.2s ease;
  width: 238px;
  flex-shrink: 0;
  z-index: 30;
}

.sidebar-nav.sidebar-collapsed {
  width: 72px;
}

.sidebar-header {
  align-items: center;
  border-bottom: 1px solid rgba(71, 85, 105, 0.1);
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
  padding: 0.82rem 0.75rem;
  min-height: 62px;
}

.sidebar-brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--mnb-indigo-700), #312e81);
  border-radius: 0.5rem;
  box-shadow: 0 8px 18px rgba(76, 63, 240, 0.2);
  color: #ffffff;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.sidebar-brand-title {
  color: #1e293b;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.15;
}

.sidebar-brand-subtitle {
  color: var(--mnb-slate-400);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sidebar-toggle-btn {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(71, 85, 105, 0.17);
  border-radius: 0.5rem;
  color: var(--mnb-slate-500);
  cursor: pointer;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  width: 26px;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: #f1f5f9;
  color: var(--mnb-slate-600);
}

.sidebar-section {
  padding: 0.65rem 0.5rem 0.2rem;
}


.sidebar-scroll {
  display: grid;
  gap: 0.25rem;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 0.6rem;
}

.sidebar-section-theme + .sidebar-section-theme {
  margin-top: 0.15rem;
}

.sidebar-section-theme {
  position: relative;
}

.sidebar-section-theme::before {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.1), transparent 80%);
  border-radius: 999px;
  content: "";
  display: block;
  height: 1px;
  left: 0.65rem;
  position: absolute;
  right: 0.65rem;
  top: 0;
}

.sidebar-section-theme:first-child::before {
  display: none;
}

.sidebar-footer {
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.95));
  backdrop-filter: blur(10px);
}

.sidebar-footer > div {
  align-items: center;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, auto)) 1fr;
}

.sidebar-footer .btn {
  justify-content: center;
  min-width: 0;
}

@media (max-width: 768px) {
  .sidebar-scroll {
    padding-bottom: 0;
  }
}

.sidebar-section-label {
  color: var(--mnb-slate-400);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0 0.6rem 0.35rem;
  text-transform: uppercase;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 0.55rem;
  color: #334155;
  cursor: pointer;
  display: flex;
  font-size: 0.8rem;
  font-weight: 500;
  gap: 0.65rem;
  padding: 0.52rem 0.58rem;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.sidebar-link:focus-visible,
.sidebar-toggle-btn:focus-visible,
.team-accordion-trigger:focus-visible,
.checklist-template-card:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.sidebar-link-active {
  background: linear-gradient(110deg, var(--mnb-indigo-50), #ffffff);
  border: 1px solid #c7d2fe;
  color: var(--mnb-indigo-700);
  font-weight: 600;
}

.sidebar-link-active:hover {
  background: #e0e7ff;
}

.sidebar-icon-sprite {
  height: 0;
  overflow: hidden;
  position: absolute;
  width: 0;
}

.sidebar-icon {
  align-items: center;
  background: #e7ecf7;
  border-radius: 0.45rem;
  color: var(--mnb-indigo-700);
  display: inline-flex;
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 700;
  height: 1.8rem;
  justify-content: center;
  line-height: 1;
  width: 1.8rem;
}

.sidebar-icon::before {
  content: attr(data-icon);
}

.sidebar-icon svg {
  display: block;
  fill: none;
  height: 1.18rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
  width: 1.18rem;
}

.sidebar-link-active .sidebar-icon {
  background: rgba(79, 70, 229, 0.16);
}

.sidebar-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  border-top: 1px solid rgba(71, 85, 105, 0.1);
  margin-top: auto;
  padding: 0.72rem;
}

/* Auth shell */
.mnb-auth-page {
  align-items: center;
  display: flex;
  min-height: 100dvh;
  padding: 1rem;
}

.mnb-auth-frame {
  margin: 0 auto;
  width: min(1120px, 100%);
}

.mnb-auth-panel {
  background: #fff;
  border: 1px solid #dbe1ec;
  border-radius: 1.15rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.mnb-auth-brand {
  background: linear-gradient(150deg, #020617, #111827);
  color: #ffffff;
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  min-height: 100%;
}

.mnb-auth-badge {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #dbeafe;
  display: inline-flex;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding: 0.38rem 0.64rem;
  text-transform: uppercase;
}

.mnb-auth-title {
  font-size: 1.55rem;
  line-height: 1.1;
  margin-bottom: 0.45rem;
}

.mnb-auth-subtitle {
  color: #d7def0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.mnb-auth-card-note {
  background: rgba(255, 255, 255, 0.12);
  border: 1px dashed rgba(255, 255, 255, 0.34);
  border-radius: 0.8rem;
  color: #eff6ff;
  font-size: 0.77rem;
  line-height: 1.45;
  padding: 0.7rem;
}

.mnb-auth-form-wrap {
  background: #ffffff;
  padding: clamp(1.3rem, 2.7vw, 2rem);
}

.mnb-auth-form {
  display: grid;
  gap: 1rem;
  max-width: 390px;
}

.mnb-auth-form-title {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.15rem;
}

.mnb-auth-form-subtitle {
  color: #64748b;
  font-size: 0.85rem;
}

.mnb-label {
  color: #334155;
  display: grid;
  font-size: 0.78rem;
  font-weight: 600;
  gap: 0.35rem;
}

.mnb-auth-submit {
  align-items: center;
  background: linear-gradient(135deg, #020617, #111827);
  border: none;
  border-radius: 0.58rem;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 600;
  justify-content: center;
  min-height: 40px;
  padding: 0.62rem 1rem;
  transition: all 0.15s ease;
}

.mnb-auth-submit:hover:not(:disabled) {
  filter: brightness(1.04);
}

.mnb-auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Overview page */
.overview-kpi-card {
  background: #ffffff;
  border: 1px solid #dbe7ff;
  border-radius: 0.9rem;
  padding: 0.9rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.overview-kpi-card:hover {
  border-color: #bfc9f8;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
  transform: translateY(-1px);
}

.overview-kpi-icon {
  align-items: center;
  border-radius: 0.6rem;
  color: #1e293b;
  display: flex;
  font-size: 1.05rem;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.overview-section {
  background: #ffffff;
  border: 1px solid #dbe7ff;
  border-radius: 0.9rem;
  padding: 0.9rem;
}

.overview-section-alert-danger {
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
  border-color: #fecdd3;
}

.overview-section-alert-danger .overview-section-head {
  border-bottom-color: rgba(225, 29, 72, 0.12);
}

.overview-section-alert-danger .overview-count-chip {
  background: #ffe4e6;
  color: #be123c;
}

.overview-section-head {
  align-items: center;
  border-bottom: 1px solid rgba(71, 85, 105, 0.11);
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
}

.overview-count-chip {
  background: #e0e7ff;
  border-radius: 999px;
  color: #4338ca;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.52rem;
  text-transform: uppercase;
}

.panel {
  background: #ffffff;
  border: 1px solid #d9e2ed;
  border-radius: 0.9rem;
  display: flex;
  flex-direction: column;
}

.panel-title {
  background: #fbfdff;
  border-bottom: 1px solid #d9e2ed;
  color: #1e293b;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.8rem;
}

.panel-title-with-meta {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .sidebar-nav {
    width: 72px;
  }

  .sidebar-nav .sidebar-text,
  .sidebar-nav .sidebar-section-label,
  .sidebar-nav .sidebar-footer > div,
  .sidebar-nav .sidebar-header > div:first-child {
    display: none !important;
  }

  .sidebar-toggle-btn {
    display: none;
  }

  .mnb-app-shell {
    grid-template-columns: 72px 1fr;
  }
}

.status-cluster {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.conversation-item {
  appearance: none;
  background: #ffffff;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  color: #0f172a;
  display: block;
  overflow: hidden;
  padding: 0.72rem 0.78rem 0.68rem;
  position: relative;
  text-align: left;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
  width: 100%;
}

.conversation-item:hover {
  background: #ffffff;
  border-color: #c7d2fe;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.conversation-item-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.conversation-item-active::before {
  background: #0b63f6;
  border-radius: 8px 0 0 8px;
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.conversation-avatar {
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 800;
  height: 2.35rem;
  justify-content: center;
  line-height: 1;
  width: 2.35rem;
}

.conversation-name {
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
}

.conversation-listing {
  color: #5d6879;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  margin-top: 0.14rem;
}

.conversation-preview {
  color: #334155;
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 0.42rem;
  padding-left: 0;
}

.conversation-preview.is-unread {
  color: #1e293b;
  font-weight: 700;
}

.conversation-stay-row {
  align-items: center;
  display: flex;
  gap: 0.35rem;
  justify-content: space-between;
  margin-top: 0.2rem;
  padding-left: 0;
}

.conversation-stay-dates {
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0;
}

.conversation-stay-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-height: 1.45rem;
  padding: 0.28rem 0.5rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-stay-badge-current {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.conversation-stay-badge-future {
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.conversation-stay-badge-past,
.conversation-stay-badge-muted {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
}

.conversation-new {
  align-items: center;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  color: #15803d;
  display: inline-flex;
  font-size: 0.62rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-height: 1.42rem;
  padding: 0.28rem 0.46rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-priority-badge {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-height: 1.42rem;
  padding: 0.28rem 0.48rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-priority-urgent {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.conversation-priority-high {
  background: #ffedd5;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.conversation-priority-normal {
  background: #eaf2ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.conversation-priority-low {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.conversation-wait-chip {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  color: #9a3412;
  display: inline-flex;
  font-size: 0.64rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-height: 1.42rem;
  padding: 0.28rem 0.48rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-sla-chip {
  align-items: center;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 7px;
  color: #b91c1c;
  display: inline-flex;
  font-size: 0.64rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-height: 1.42rem;
  padding: 0.28rem 0.48rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-intent-pill {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-size: 0.64rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-height: 1.42rem;
  padding: 0.28rem 0.48rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-inquiry-chip {
  align-items: center;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 7px;
  color: #92400e;
  display: inline-flex;
  font-size: 0.64rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-height: 1.42rem;
  padding: 0.28rem 0.48rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-intent-general {
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.conversation-intent-logistics {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.conversation-intent-issue {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.conversation-intent-ack {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.conversation-intent-other {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.kb-evidence-item {
  border-top: 1px solid #e2e8f0;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
}

.kb-evidence-item:first-of-type {
  border-top: none;
  margin-top: 0.3rem;
  padding-top: 0;
}

.kb-evidence-section {
  background: #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.08rem 0.35rem;
  text-transform: uppercase;
}

.kb-evidence-score {
  color: #475569;
  font-size: 0.65rem;
  font-weight: 700;
}

.dashboard-reservation-button {
  border-color: #c7d2fe;
  color: #4338ca;
  font-weight: 800;
}

.dashboard-thread-header {
  position: sticky;
  top: 0;
  z-index: 35;
}

.dashboard-thread-header-meta {
  min-width: 0;
  overflow: hidden;
}

.dashboard-thread-header .dashboard-toolbar-cluster {
  justify-self: end;
  min-width: max-content;
}

.dashboard-message-composer {
  background: #ffffff;
  display: grid;
  flex: 0 0 auto;
  gap: 0.62rem;
}

.dashboard-message-composer-textarea-wrap {
  position: relative;
}

.dashboard-message-composer-corner-handle {
  bottom: 5px;
  cursor: nwse-resize;
  height: 28px;
  outline: none;
  position: absolute;
  right: 5px;
  touch-action: none;
  user-select: none;
  width: 28px;
  -webkit-user-select: none;
}

.dashboard-message-composer-corner-handle::before,
.dashboard-message-composer-corner-handle::after {
  border-bottom: 2px solid rgba(100, 116, 139, 0.66);
  border-radius: 0 0 5px 0;
  border-right: 2px solid rgba(100, 116, 139, 0.66);
  bottom: 5px;
  content: "";
  height: 12px;
  position: absolute;
  right: 5px;
  width: 12px;
}

.dashboard-message-composer-corner-handle::after {
  bottom: 10px;
  height: 6px;
  right: 10px;
  width: 6px;
}

.dashboard-message-composer-corner-handle:focus-visible {
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.dashboard-composer-resizing {
  cursor: nwse-resize;
  user-select: none;
  -webkit-user-select: none;
}

.dashboard-message-composer-textarea {
  height: 112px;
  max-height: min(40dvh, 320px);
  min-height: 104px;
  overflow: auto;
  padding-bottom: 1.75rem;
  padding-right: 1.95rem;
  resize: none;
}

.manager-reservation-modal-backdrop {
  background: rgba(15, 23, 42, 0.38);
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 90;
}

.manager-reservation-modal {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
  display: grid;
  gap: 0.9rem;
  left: 50%;
  max-height: min(82dvh, 720px);
  overflow-y: auto;
  padding: 1rem;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(94vw, 980px);
  z-index: 95;
}

.manager-reservation-modal-head {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.manager-reservation-eyebrow {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 0.24rem;
  text-transform: uppercase;
}

.manager-reservation-modal-head h2 {
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

.manager-reservation-close {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #334155;
  display: grid;
  flex: 0 0 auto;
  font-size: 1.25rem;
  font-weight: 800;
  height: 38px;
  line-height: 1;
  place-items: center;
  width: 38px;
}

.manager-reservation-loading,
.manager-reservation-empty,
.manager-reservation-no-link {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0;
}

.manager-reservation-modal-content {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  min-width: 0;
}

.manager-reservation-main {
  align-content: start;
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.manager-reservation-detail-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.manager-reservation-detail-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: grid;
  gap: 0.28rem;
  min-height: 62px;
  padding: 0.72rem 0.78rem;
}

.manager-reservation-detail-item span {
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.manager-reservation-detail-item strong {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.manager-reservation-actions {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
  padding-top: 0.85rem;
}

.manager-reservation-beds24-link {
  align-items: center;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.18);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 0 0.95rem;
  text-decoration: none;
}

.manager-reservation-secondary {
  flex: 0 0 auto;
}

.manager-reservation-calendar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  display: grid;
  min-width: 0;
  overflow: hidden;
}

.manager-reservation-calendar-head {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.78rem 0.82rem;
}

.manager-reservation-calendar-eyebrow {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 0.18rem;
  text-transform: uppercase;
}

.manager-reservation-calendar-head h3 {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.2;
  margin: 0;
}

.manager-reservation-calendar-controls {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.35rem;
  justify-content: flex-end;
}

.manager-reservation-calendar-controls .btn {
  font-size: 0.7rem;
  min-height: 2rem;
  padding: 0.34rem 0.58rem;
}

.manager-reservation-calendar-controls .panel-meta-chip {
  align-items: center;
  display: inline-flex;
}

.manager-reservation-calendar-shell {
  border-top: 1px solid #e2e8f0;
  padding: 0.65rem;
}

.messages-area {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  padding: 0.75rem;
}

.dashboard-mobile-back-btn {
  display: none;
}

.dashboard-mobile-message-actions {
  display: grid;
  gap: 0.62rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.62rem;
}

.dashboard-mobile-action-secondary,
.dashboard-mobile-action-primary,
.dashboard-mobile-instruction-generate,
.dashboard-mobile-draft-voice {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  display: inline-flex;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  justify-content: center;
  min-height: 52px;
  padding: 0 0.9rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.dashboard-mobile-action-secondary {
  background: #ffffff;
  border-color: #d1d5db;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  color: #111827;
}

.dashboard-mobile-action-primary,
.dashboard-mobile-instruction-generate,
.dashboard-mobile-draft-voice {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.18);
  color: #ffffff;
}

.dashboard-mobile-action-secondary:disabled,
.dashboard-mobile-action-primary:disabled,
.dashboard-mobile-instruction-generate:disabled,
.dashboard-mobile-draft-voice:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.dashboard-mobile-draft-assistant {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  display: grid;
  gap: 0.68rem;
  margin-top: 0.88rem;
  padding: 0.78rem;
}

.dashboard-mobile-draft-assistant .label {
  color: #172554;
  font-size: 0.72rem;
  font-weight: 900;
  margin: 0;
}

.dashboard-mobile-draft-assistant textarea.field {
  background: #ffffff;
  border-radius: 14px;
  min-height: 72px;
}

.dashboard-mobile-draft-proposed {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  display: grid;
  gap: 0.45rem;
  padding: 0.62rem;
}

.dashboard-mobile-draft-label {
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  margin: 0;
  text-transform: uppercase;
}

.dashboard-mobile-draft-text {
  color: #172554;
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0;
  white-space: pre-wrap;
}

.dashboard-mobile-draft-insert {
  justify-self: start;
}

.dashboard-mobile-draft-meta {
  color: #475569;
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.dashboard-mobile-draft-meta p {
  margin: 0;
}

.dashboard-mobile-draft-instruction {
  border-top: 1px solid #dbeafe;
  display: grid;
  gap: 0.58rem;
  padding-top: 0.68rem;
}

.dashboard-mobile-instruction-actions {
  display: grid;
  gap: 0.56rem;
  grid-template-columns: minmax(0, 1fr) minmax(7.2rem, 0.35fr);
}

.dashboard-mobile-instruction-generate,
.dashboard-mobile-draft-voice {
  border-radius: 13px;
  font-size: 0.78rem;
  min-height: 48px;
}

.dashboard-mobile-draft-voice {
  gap: 0.35rem;
  white-space: nowrap;
}

.dashboard-mobile-draft-voice.recording {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.18);
}

.dashboard-mobile-draft-status {
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.dashboard-mobile-draft-status.pending {
  color: #4338ca;
}

.dashboard-ai-context-draft-assistant {
  display: none;
}

.dashboard-ai-context-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.72rem;
}

.dashboard-ai-context-card-title {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  margin: 0;
  text-transform: uppercase;
}

.dashboard-ai-context-card-text,
.dashboard-ai-context-card-note {
  color: #475569;
  font-size: 0.76rem;
  line-height: 1.4;
  margin: 0.35rem 0 0;
}

.dashboard-ai-context-card-text {
  color: #334155;
}

.dashboard-ai-context-card-warning {
  background: #fffbeb;
  border-color: #fbbf24;
}

.dashboard-ai-context-card-warning .dashboard-ai-context-card-title,
.dashboard-ai-context-warning-text {
  color: #b45309;
}

.dashboard-ai-context-warning-text {
  font-size: 0.76rem;
  line-height: 1.38;
  margin: 0.35rem 0 0;
}

.dashboard-ai-context-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.65rem;
}

.dashboard-ai-context-instruction {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 0.72rem;
}

.dashboard-ai-context-generate {
  min-height: 44px;
  width: 100%;
}

.message-row {
  display: flex;
}

.message-row-guest {
  justify-content: flex-start;
}

.message-row-host {
  justify-content: flex-end;
}

.message-bubble {
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  border: 1px solid transparent;
  max-width: 85%;
  padding: 0.6rem 0.75rem;
}

.message-guest {
  background: #ffffff;
  border-color: #cbd5e1;
  border-radius: 0.2rem 0.75rem 0.75rem 0.75rem;
  color: #0f172a;
}

.message-host {
  background: #1e40af;
  border-color: #1e3a8a;
  border-radius: 0.75rem 0.2rem 0.75rem 0.75rem;
  color: #eff6ff;
}

.message-auto {
  background: #fef3c7;
  border-color: #f59e0b;
  border-radius: 0.75rem 0.2rem 0.75rem 0.75rem;
  color: #78350f;
}

.message-system {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.message-author {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.22rem;
  opacity: 0.75;
  text-transform: uppercase;
}

.message-media-grid {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.message-image-link {
  border-radius: 0.55rem;
  display: block;
  max-width: min(18rem, 72vw);
  overflow: hidden;
}

.message-image {
  aspect-ratio: 4 / 3;
  background: #e2e8f0;
  display: block;
  height: auto;
  max-height: 16rem;
  object-fit: cover;
  width: 100%;
}

.kb-pill {
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  text-transform: uppercase;
}

.kb-pill-edited {
  background: #fef3c7;
  color: #92400e;
}

.kb-pill-as-is {
  background: #dcfce7;
  color: #166534;
}

.kb-pill-manual {
  background: #dbeafe;
  color: #1d4ed8;
}

.kb-pill-muted {
  background: #e2e8f0;
  color: #475569;
}

.kpi-funnel-panel {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 0.6rem;
  padding: 0.6rem;
}

.kpi-funnel-header {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.kpi-funnel-meta {
  color: #64748b;
  font-size: 0.68rem;
  margin-top: 0.15rem;
}

.kpi-funnel-grid {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.55rem;
}

.kpi-funnel-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 0.45rem;
  padding: 0.35rem 0.45rem;
}

.kpi-funnel-label {
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.kpi-funnel-value {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.08rem;
}

.kpi-funnel-sub {
  color: #475569;
  font-size: 0.62rem;
  margin-top: 0.12rem;
}

.diff-count-add {
  background: #dcfce7;
  border-radius: 999px;
  color: #166534;
  font-weight: 700;
  padding: 0.05rem 0.35rem;
}

.diff-count-remove {
  background: #fee2e2;
  border-radius: 999px;
  color: #b91c1c;
  font-weight: 700;
  padding: 0.05rem 0.35rem;
}

.diff-view {
  background: #0f172a;
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.45;
  max-height: 52vh;
  overflow: auto;
  padding: 0.65rem 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.diff-line {
  padding: 0.06rem 0.1rem;
}

.diff-line-add {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.diff-line-remove {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.diff-line-header {
  color: #93c5fd;
}

.diff-line-hunk {
  color: #fde68a;
}

.diff-line-context {
  color: #e2e8f0;
}

.mnb-input,
.field {
  appearance: none;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.58rem;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 0.58rem 0.72rem;
  width: 100%;
}

.mnb-input:focus,
.field:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  outline: none;
}

.mnb-label,
.label {
  color: #334155;
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.22rem;
  text-transform: uppercase;
}

.btn,
.btn-primary {
  border-radius: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.42rem 0.78rem;
  transition: all 0.15s ease;
}

.btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.btn:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #1e3a8a;
}

.btn-primary {
  background: linear-gradient(130deg, var(--mnb-indigo-600), var(--mnb-indigo-700));
  border: 1px solid #4338ca;
  color: #ffffff;
}

.btn-primary:hover {
  filter: brightness(1.04);
}

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

.tab-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
}

.tab-btn-active {
  background: var(--mnb-indigo-50);
  border-color: #a5b4fc;
}

.doc-shell {
  background: #eef2f7;
  border: 1px solid #d7e0ea;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.doc-toolbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d7e0ea;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.doc-canvas {
  display: flex;
  flex: 1;
  justify-content: center;
  overflow-y: auto;
  padding: 1.25rem;
}

.doc-editor {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.35rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100%;
  outline: none;
  padding: 2.5rem 3rem;
  resize: none;
  width: min(100%, 980px);
}

.doc-editor:focus {
  border-color: #93c5fd;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.kb-doc-mode {
  background: #eef2f7;
  display: grid;
  min-height: 0;
  flex: 1;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
}

.kb-doc-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  min-width: 0;
}

.kb-doc-toolbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem;
}

.kb-doc-helper {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.kb-doc-selection-card {
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 0.75rem;
  padding: 0.7rem;
}

.kb-doc-editor-shell {
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  flex: 1 1 auto;
  min-height: 0;
  min-height: 520px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem;
}

.kb-doc-editor {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.4rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 auto;
  max-width: 920px;
  min-height: calc(100% - 0.1rem);
  outline: none;
  padding: 2.25rem 2.5rem;
}

.kb-doc-editor:focus {
  border-color: #93c5fd;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.kb-doc-editor h1,
.kb-doc-editor h2,
.kb-doc-editor h3,
.kb-doc-editor h4 {
  color: #0f172a;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin: 1.2rem 0 0.6rem;
}

.kb-doc-editor h1 {
  font-size: 1.65rem;
}

.kb-doc-editor h2 {
  font-size: 1.3rem;
}

.kb-doc-editor h3 {
  font-size: 1.12rem;
}

.kb-doc-editor p {
  margin: 0.5rem 0;
}

.kb-doc-editor ul,
.kb-doc-editor ol {
  margin: 0.6rem 0 0.8rem;
  padding-left: 1.45rem;
}

.kb-doc-editor blockquote {
  border-left: 3px solid #cbd5e1;
  color: #334155;
  margin: 0.8rem 0;
  padding: 0.1rem 0 0.1rem 0.8rem;
}

.kb-doc-editor a {
  color: #1d4ed8;
  text-decoration: underline;
}

.kb-doc-side {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.kb-assist-modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.25rem;
  position: fixed;
  z-index: 90;
}

.kb-assist-modal {
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 0.85rem;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.33);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: min(92vh, 980px);
  max-width: min(1200px, 98vw);
  width: 100%;
}

.kb-assist-modal-head {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.9rem 1rem;
}

.kb-assist-modal-body {
  display: grid;
  gap: 0.8rem;
  overflow-y: auto;
  padding: 0 1rem;
}

.kb-assist-meta {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
}

.kb-assist-proposal-editor {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  height: min(34vh, 280px);
  line-height: 1.45;
}

.kb-assist-diff {
  max-height: min(34vh, 280px);
}

.kb-assist-modal-actions {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 0.8rem 1rem;
}

.kb-workspace-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.kb-surface-card {
  background: #ffffff;
  border: 1px solid #d4deeb;
  border-radius: 0.75rem;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  padding: 0.85rem;
}

.kb-category-card {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 0.75rem;
  padding: 0.7rem;
}

.kb-category-header {
  display: grid;
  gap: 0.6rem;
}

.kb-category-main {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.kb-category-title-input {
  flex: 1 1 280px;
  min-width: 220px;
}

.kb-category-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.kb-block-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 0.65rem;
  padding: 0.75rem;
}

.kb-block-header {
  display: grid;
  gap: 0.55rem;
}

.kb-block-main {
  align-items: flex-start;
  display: flex;
  gap: 0.55rem;
  min-width: 0;
}

.kb-block-headline-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.kb-block-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-left: 2.25rem;
}

.kb-block-kicker {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kb-block-title {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.kb-block-preview {
  color: #475569;
  font-size: 0.74rem;
  line-height: 1.4;
  margin-top: 0.22rem;
}

.kb-field-label {
  color: #475569;
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.kb-subblock-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 0.55rem;
  padding: 0.55rem;
}

.kb-count-chip {
  background: #e2e8f0;
  border-radius: 999px;
  color: #334155;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.4rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.kb-collapse-btn {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 0.45rem;
  color: #3730a3;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  height: 1.65rem;
  justify-content: center;
  line-height: 1;
  min-width: 1.65rem;
  padding: 0;
}

.kb-transfer-toggle {
  align-items: center;
  color: #334155;
  display: inline-flex;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
  white-space: nowrap;
}

.kb-transfer-item {
  border: 1px solid #dbe3ef;
  border-radius: 0.45rem;
  padding: 0.35rem 0.45rem;
}

.kb-v2-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr) minmax(290px, 340px);
}

.kb-v2-column {
  min-width: 0;
}

.kb-v2-section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.kb-v2-map-list {
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.kb-v2-map-item {
  background: #f8fbff;
  border: 1px solid #d5e2f2;
  border-radius: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  padding: 0.65rem;
}

.kb-v2-map-item-active {
  background: #eef4ff;
  border-color: #a9c2f0;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.kb-v2-map-item-head {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.kb-v2-map-category-btn {
  align-items: center;
  background: transparent;
  border: 0;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  flex: 1 1 auto;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.35rem;
  justify-content: space-between;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.kb-v2-map-category-btn:hover {
  color: #1d4ed8;
}

.kb-v2-transfer-inline {
  align-items: center;
  color: #475569;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.66rem;
  font-weight: 700;
  gap: 0.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.kb-v2-map-item-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.kb-v2-map-item-actions .btn {
  flex: 1 1 0;
}

.kb-v2-block-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.kb-v2-block-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 0.55rem;
  display: flex;
  gap: 0.45rem;
  padding: 0.3rem 0.4rem;
}

.kb-v2-block-row-active {
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.kb-v2-block-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.kb-v2-block-btn:hover p:first-child {
  color: #1d4ed8;
}

.kb-v2-editor-card {
  display: flex;
  flex-direction: column;
}

.kb-v2-editor-stack {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.8rem;
}

.kb-v2-editor-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kb-v2-subblocks-grid {
  display: grid;
  gap: 0.5rem;
}

.sop-page-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
}

.sop-page-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sop-page-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-replies-snippet-label {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.ai-improvement-kpi-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.ai-improvement-kpi-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 48%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.05);
  min-height: 9.4rem;
  padding: 1rem;
}

.ai-improvement-kpi-label {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
}

.ai-improvement-kpi-value {
  color: #0f172a;
  font-size: clamp(1.8rem, 2.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0.8rem 0 0;
}

.ai-improvement-kpi-meta {
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.55;
  margin: 0.75rem 0 0;
}

.ai-improvement-stack {
  display: grid;
  gap: 0.9rem;
}

.ai-improvement-list-row {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
}

.ai-improvement-list-row > span:first-child {
  min-width: 0;
}

.ai-improvement-stackbar {
  background: #e2e8f0;
  border-radius: 999px;
  display: flex;
  gap: 1px;
  height: 0.55rem;
  margin-top: 0.7rem;
  overflow: hidden;
}

.ai-improvement-stackbar-segment {
  display: block;
  height: 100%;
}

.ai-improvement-stackbar-segment-good {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.ai-improvement-stackbar-segment-warn {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.ai-improvement-stackbar-segment-muted {
  background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 100%);
}

.ai-improvement-draft-feed {
  display: grid;
  gap: 0.9rem;
}

.ai-improvement-draft-card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.ai-improvement-draft-foot {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
}

.ai-improvement-draft-details {
  border-top: 1px solid #e2e8f0;
  margin-top: 0.2rem;
  padding-top: 0.85rem;
}

.ai-improvement-mini-list {
  display: grid;
  gap: 0.35rem;
  list-style: disc;
  margin: 0;
  padding-left: 1rem;
}

.history-block-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
}

.business-rules-markdown {
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.65;
}

.business-rules-markdown > * + * {
  margin-top: 0.85rem;
}

.business-rules-markdown p {
  margin: 0;
}

.business-rules-markdown ul,
.business-rules-markdown ol {
  margin: 0;
  padding-left: 1.25rem;
}

.business-rules-markdown li + li {
  margin-top: 0.35rem;
}

.business-rules-markdown strong {
  color: #0f172a;
  font-weight: 700;
}

.business-rules-markdown code {
  background: #e2e8f0;
  border-radius: 0.375rem;
  color: #0f172a;
  font-size: 0.82em;
  padding: 0.1rem 0.35rem;
}

@media (max-width: 1140px) {
  .kb-assist-modal {
    max-height: 96vh;
  }

  .kb-doc-mode {
    grid-template-columns: minmax(0, 1fr);
  }

  .kb-doc-editor-shell {
    min-height: 360px;
  }

  .kb-v2-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .kb-v2-map-list {
    max-height: none;
  }

  .kb-v2-editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .kb-category-header {
    align-items: stretch;
  }

  .kb-block-header {
    align-items: stretch;
  }

  .kb-transfer-toggle {
    justify-content: flex-start;
  }

  .kb-block-actions {
    padding-left: 0;
  }

  .kb-category-title-input {
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .status-cluster {
    display: none;
  }

  .tab-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
  }

  .panel-title {
    font-size: 0.78rem;
    padding: 0.55rem 0.65rem;
  }

  .message-bubble {
    max-width: 92%;
  }
}

@media (min-width: 1141px) and (max-width: 1460px) {
  .kb-v2-layout {
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(250px, 300px);
  }
}


/* Spark worker: ops surfaces */
/* Operations surfaces */
.ops-page {
  position: relative;
  z-index: 1;
}

.ops-page::before {
  background: linear-gradient(115deg, rgba(99, 102, 241, 0.04), rgba(14, 165, 233, 0.03));
  border-radius: 0.75rem;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.ops-page-header {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  display: flex;
  flex-wrap: wrap;
}

.ops-page-title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
}

.ops-page-subtitle {
  color: var(--ops-muted);
  font-size: 0.75rem;
}

.ops-panel-head {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.ops-cockpit-section {
  border-left: 4px solid #c7d2fe;
}

.ops-count-chip {
  align-items: center;
  background: #edf2ff;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  text-transform: none;
}

.ops-inline-chip {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
}

.ops-filter-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ops-filter-input {
  max-width: 150px;
}

.ops-action-btn {
  border-color: transparent !important;
}

.ops-meta-grid {
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.ops-empty-state {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.ops-notice {
  border-radius: 0.8rem;
  border-left: 4px solid #818cf8;
  box-shadow: 0 5px 18px rgba(30, 64, 175, 0.06);
}

.ops-kpi-grid {
  align-items: stretch;
}

.ops-metric-card {
  position: relative;
}

.ops-metric-card::after {
  content: none;
}

.ops-section {
  border-left: 4px solid #cbd5e1;
}

.overview-section-alert-danger.ops-section {
  border-left-color: #fda4af;
}

.input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 0.55rem 0.7rem;
  width: 100%;
}

.input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.input-sm {
  font-size: 0.78rem;
  padding: 0.45rem 0.55rem;
}

.btn-plain {
  background: transparent;
  border-color: transparent;
}

.btn-plain:hover {
  background: #f1f5f9;
  transform: none;
}

.btn-plain:active {
  background: #e2e8f0;
}

.btn:disabled,
.btn-primary:disabled,
.btn-plain:disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.btn:focus-visible,
.btn-primary:focus-visible,
.btn-plain:focus-visible,
.input:focus-visible,
.field:focus-visible {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}

/* Team */
.team-members-grid {
  grid-auto-rows: 1fr;
}

.team-member-card {
  background: #ffffff;
  border-radius: 0.9rem;
  border: 1px solid #dbeafe;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.team-member-card__head {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.team-member-card__avatar {
  background: #0ea5e9;
}

.team-chip-inline {
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.team-member-card__actions {
  background: #f8fafc;
  margin-top: auto;
}

.team-accordion-trigger {
  border: 1px solid #e2e8f0;
}

.team-notif-row {
  border: 1px solid #e2e8f0;
  margin-bottom: 0.25rem;
}

.team-form-shell {
  border: 1px solid #cbd5e1;
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  margin-block: auto;
  max-height: min(92dvh, 860px);
  overflow: hidden;
}

.team-form-body {
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
}

.team-form-footer {
  background: #ffffff;
  flex: 0 0 auto;
}

/* Dashboard calendar */
.calendar-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.calendar-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-board {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.calendar-shell {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  padding: 0;
}

.calendar-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.calendar-grid {
  min-width: calc(var(--calendar-listing-width) + (var(--calendar-day-width) * var(--day-count)) + (var(--calendar-gap) * var(--day-count)));
}

.calendar-header,
.calendar-row {
  display: grid;
  grid-template-columns: var(--calendar-listing-width) 1fr;
}

.calendar-corner,
.calendar-listing {
  padding: 14px 16px;
  background: #fff;
  border-right: 1px solid #e2e8f0;
}

.calendar-corner {
  position: sticky;
  left: 0;
  z-index: 8;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-listing {
  position: sticky;
  left: 0;
  z-index: 7;
  display: grid;
  align-content: center;
  gap: 4px;
}

.calendar-listing-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.calendar-listing-name {
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
}

.calendar-clean-indicator {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.calendar-clean-indicator.clean {
  background: #58c4a6;
}

.calendar-clean-indicator.dirty {
  background: #e66b57;
}

.calendar-clean-indicator-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.calendar-clean-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.calendar-clean-toggle:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
}

.calendar-clean-toggle:disabled {
  opacity: 0.6;
  cursor: wait;
}

.calendar-days,
.calendar-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--day-count), var(--calendar-day-width));
  gap: var(--calendar-gap);
  padding: 0 12px 0 0;
}

.calendar-header .calendar-days {
  padding-top: 8px;
  padding-bottom: 8px;
  background: rgba(248, 250, 252, 0.9);
}

.calendar-day-head,
.calendar-day-cell {
  border-left: 1px solid #e2e8f0;
}

.calendar-day-head {
  display: grid;
  gap: 4px;
  place-items: center;
  min-height: 68px;
  color: #475569;
}

.calendar-day-head.today,
.calendar-day-cell.today {
  background: rgba(254, 243, 199, 0.5);
}

.calendar-day-number {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
}

.calendar-day-weekday {
  font-size: 11px;
  text-transform: uppercase;
  color: #94a3b8;
}

.calendar-row + .calendar-row {
  border-top: 1px solid #e2e8f0;
}

.calendar-track {
  min-height: 84px;
  align-items: stretch;
  background: #fff;
}

.calendar-day-cell {
  min-height: 84px;
  background: rgba(248, 250, 252, 0.5);
}

.calendar-bar {
  position: absolute;
  top: 16px;
  height: 42px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  overflow: visible;
  white-space: nowrap;
  text-overflow: ellipsis;
  z-index: 1;
}

.calendar-unavailable-bar {
  position: absolute;
  top: 26px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #64748b;
  background: rgba(203, 213, 225, 0.82);
  pointer-events: none;
  z-index: 0;
}

.calendar-unavailable-bar span {
  display: inline-grid;
  width: 12px;
  height: 12px;
  place-items: center;
  border-radius: 999px;
  color: #64748b;
  font-size: 10px;
  line-height: 1;
}

.calendar-bar.airbnb,
.calendar-bar.booking,
.calendar-bar.direct,
.calendar-bar.default,
.calendar-channel.airbnb,
.calendar-channel.booking,
.calendar-channel.direct,
.calendar-channel.default {
  background: #0f9f99;
}

.calendar-channel {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.calendar-bar .calendar-channel {
  background: rgba(255, 255, 255, 0.24);
}

.calendar-bar-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-calendar-tooltip {
  position: fixed;
  z-index: 70;
  max-width: min(360px, calc(100vw - 24px));
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
  pointer-events: none;
  white-space: nowrap;
}

.dashboard-calendar-tooltip.above {
  transform: translate(-50%, -100%);
}

.dashboard-calendar-tooltip.below {
  transform: translate(-50%, 0);
}

.dashboard-calendar-page {
  --calendar-day-width: 78px;
  --calendar-gap: 2px;
  --calendar-listing-width: 188px;
}

.dashboard-calendar-page .page-hero-head {
  gap: 0.75rem;
  padding-block: 0.65rem;
}

.dashboard-calendar-page .page-eyebrow {
  margin-bottom: 0.15rem;
}

.dashboard-calendar-page .mnb-page-title {
  font-size: 1.9rem;
}

.dashboard-calendar-page .page-subtitle {
  font-size: 0.76rem;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.dashboard-calendar-page .page-meta-chip {
  padding: 0.35rem 0.6rem;
}

.dashboard-calendar-page .calendar-toolbar {
  padding: 10px 12px;
}

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

.dashboard-calendar-title {
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.dashboard-calendar-toolbar-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.dashboard-calendar-month-picker {
  align-items: center;
  background: #fff;
  border: 2px solid #12b8b2;
  border-radius: 12px;
  color: #111827;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  height: 42px;
  letter-spacing: 0;
  margin: 0;
  min-width: 128px;
  padding: 0 12px;
  position: relative;
}

.dashboard-calendar-month-picker input {
  cursor: pointer;
  height: 100%;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 2;
}

.dashboard-calendar-month-icon {
  align-items: center;
  border: 2px solid currentColor;
  border-radius: 4px;
  color: #111827;
  display: inline-flex;
  font-size: 0;
  height: 18px;
  justify-content: center;
  position: relative;
  width: 18px;
  z-index: 1;
}

.dashboard-calendar-month-icon::before {
  border-bottom: 2px solid currentColor;
  border-top: 3px solid currentColor;
  content: "";
  height: 7px;
  width: 9px;
}

.dashboard-calendar-month-picker span:last-child {
  position: relative;
  z-index: 1;
}

.dashboard-calendar-refresh-button {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.dashboard-calendar-refresh-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.dashboard-calendar-page .calendar-board {
  padding: 0 12px 12px;
}

.dashboard-calendar-page .calendar-corner,
.dashboard-calendar-page .calendar-listing {
  background: #fff;
  padding: 6px 10px;
}

.dashboard-calendar-page .dashboard-calendar-today-corner {
  align-items: center;
  background: #fff;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  border-top: 0;
  box-shadow: none;
  cursor: pointer;
  display: flex;
  gap: 6px;
  min-height: 38px;
  text-align: left;
  text-transform: none;
}

.dashboard-calendar-page .dashboard-calendar-today-corner span:last-child {
  font-size: 11px;
  line-height: 1.1;
  min-width: 0;
}

.dashboard-calendar-today-icon {
  background: rgba(18, 184, 178, 0.12);
  border-radius: 999px;
  color: #0f8f8a;
  display: inline-grid;
  flex: 0 0 auto;
  font-size: 11px;
  height: 15px;
  line-height: 1;
  place-items: center;
  width: 15px;
}

.dashboard-calendar-page .calendar-listing-name {
  font-size: 12px;
  line-height: 1.25;
}

.dashboard-calendar-page .calendar-listing-head {
  gap: 6px;
}

.dashboard-calendar-page .calendar-clean-indicator {
  width: 8px;
  height: 8px;
}

.dashboard-calendar-page .calendar-header .calendar-days {
  padding-top: 4px;
  padding-bottom: 4px;
}

.dashboard-calendar-page .calendar-day-head {
  gap: 2px;
  min-height: 38px;
}

.dashboard-calendar-page .calendar-day-number {
  font-size: 15px;
}

.dashboard-calendar-page .calendar-day-weekday {
  font-size: 8px;
}

.dashboard-calendar-page .calendar-track,
.dashboard-calendar-page .calendar-day-cell {
  min-height: 46px;
}

.dashboard-calendar-page .calendar-bar {
  top: 10px;
  height: 24px;
  border-radius: 10px;
  gap: 4px;
  padding: 0 8px;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  z-index: 3;
}

.dashboard-calendar-page .calendar-unavailable-bar {
  position: absolute;
  top: 14px;
  height: 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #94a3b8;
  background: rgba(226, 232, 240, 0.78);
  pointer-events: none;
  z-index: 0;
}

.dashboard-calendar-page .calendar-unavailable-bar span {
  display: inline-grid;
  width: 10px;
  height: 10px;
  place-items: center;
  border-radius: 4px;
  color: #64748b;
  font-size: 9px;
  line-height: 1;
}

.dashboard-calendar-page .calendar-channel {
  width: 10px;
  height: 10px;
  border-width: 1px;
}

@media (max-width: 640px) {
  .team-form-shell {
    margin-block: 0.25rem;
    max-height: calc(100dvh - 0.5rem);
  }

  .team-form-body .grid.grid-cols-2 {
    grid-template-columns: 1fr;
  }

  :root {
    --calendar-day-width: 58px;
    --calendar-gap: 4px;
    --calendar-listing-width: 116px;
  }

  .calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .calendar-nav {
    justify-content: stretch;
  }

  .calendar-nav button {
    flex: 1 1 0;
  }

  .calendar-board {
    padding: 0 12px 12px;
  }

  .calendar-corner,
  .calendar-listing {
    padding: 10px 8px;
  }

  .calendar-listing-name {
    font-size: 12px;
    line-height: 1.25;
  }

  .calendar-header .calendar-days {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .calendar-day-head {
    min-height: 54px;
    gap: 2px;
  }

  .calendar-day-number {
    font-size: 16px;
  }

  .calendar-day-weekday {
    font-size: 9px;
  }

  .calendar-track,
  .calendar-day-cell {
    min-height: 62px;
  }

  .calendar-bar {
    top: 11px;
    height: 32px;
    border-radius: 14px;
    gap: 6px;
    padding: 0 8px;
    font-size: 11px;
  }

  .calendar-channel {
    width: 12px;
    height: 12px;
    border-width: 1.5px;
  }

  .dashboard-calendar-page {
    --calendar-day-width: 62px;
    --calendar-gap: 3px;
    --calendar-listing-width: 128px;
  }

  .dashboard-calendar-page .page-hero-head {
    padding-block: 0.55rem;
  }

  .dashboard-calendar-page .calendar-track,
  .dashboard-calendar-page .calendar-day-cell {
    min-height: 44px;
  }

  .dashboard-calendar-page .calendar-bar {
    top: 10px;
    height: 22px;
    font-size: 9px;
  }
}

@media (max-width: 430px) {
  :root {
    --calendar-day-width: 52px;
    --calendar-listing-width: 102px;
  }

  .calendar-corner,
  .calendar-listing {
    padding: 9px 6px;
  }

  .calendar-listing-name {
    font-size: 11px;
  }

  .calendar-day-number {
    font-size: 15px;
  }

  .calendar-track,
  .calendar-day-cell {
    min-height: 58px;
  }

  .calendar-bar {
    top: 10px;
    height: 30px;
    padding: 0 7px;
    font-size: 10px;
  }

  .calendar-channel {
    width: 11px;
    height: 11px;
  }

  .dashboard-calendar-page {
    --calendar-day-width: 56px;
    --calendar-listing-width: 116px;
  }
}

/* Tasks */
.task-stats-grid {
  grid-auto-rows: 1fr;
}

.task-stat-card {
  min-height: 100%;
}

.tasks-group-header {
  align-items: center;
  display: flex;
  margin-bottom: 0.4rem;
}

.tasks-list {
  overflow: hidden;
}

.task-row {
  align-items: flex-start;
  min-height: 104px;
}

.task-row-clickable {
  cursor: pointer;
}

.task-row-clickable:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: -2px;
}

.task-row:hover {
  background: #f8fbff;
}

.task-row .text-sm.font-medium {
  font-size: 1.05rem;
  line-height: 1.35;
}

.task-row .text-\[11px\].text-slate-400 {
  gap: 0.55rem;
}

.task-detail-drawer {
  max-width: min(94vw, 680px);
}

.task-detail-drawer-body {
  background: #f8fafc;
}

.task-detail-loading {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 220px;
}

.task-detail-fact-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-detail-fact-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
}

.task-detail-assignment-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.task-detail-assignee-select {
  color-scheme: light;
  flex: 1 1 220px;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.task-detail-assignee-select option {
  background: #ffffff;
  color: #0f172a;
}

.task-detail-assignment-button {
  flex: 0 0 124px;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  width: 124px;
}

.task-reassignment-date-picker {
  align-items: center;
  display: flex;
  position: relative;
}

.task-reassignment-date-input {
  padding-right: 2.4rem;
}

.task-reassignment-date-clear {
  align-items: center;
  background: #e2e8f0;
  border: 0;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 800;
  height: 1.55rem;
  justify-content: center;
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.55rem;
}

.task-reassignment-date-clear:hover {
  background: #cbd5e1;
}

.task-reassignment-date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.task-reassignment-date-chip {
  align-items: center;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 999px;
  color: #0e7490;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 750;
  gap: 0.35rem;
  line-height: 1.2;
  min-height: 1.9rem;
  padding: 0.3rem 0.62rem;
}

.task-reassignment-date-chip:hover {
  background: #cffafe;
  border-color: #67e8f9;
}

.task-reassignment-calendar .flatpickr-day.selected,
.task-reassignment-calendar .flatpickr-day.startRange,
.task-reassignment-calendar .flatpickr-day.endRange,
.task-reassignment-calendar .flatpickr-day.selected:hover {
  background: #0891b2;
  border-color: #0891b2;
  color: #ffffff;
}

.task-reassignment-monitor {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.85rem;
}

.task-reassignment-monitor-toggle {
  align-items: flex-start;
  display: flex;
  gap: 0.65rem;
}

.task-reassignment-monitor-toggle input {
  margin-top: 0.2rem;
}

.task-reassignment-monitor-toggle strong {
  color: #0f172a;
  display: block;
  font-size: 0.82rem;
}

.task-reassignment-monitor-toggle small {
  color: #64748b;
  display: block;
  font-size: 0.72rem;
  line-height: 1.35;
  margin-top: 0.18rem;
}

.task-reassignment-monitor-body {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  margin-top: 0.85rem;
}

.task-reassignment-monitor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.task-reassignment-monitor-listing {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  min-height: 1.85rem;
  padding: 0.32rem 0.62rem;
}

.task-reassignment-monitor-listing-active {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #075985;
}

@media (max-width: 720px) {
  .task-reassignment-monitor-body {
    grid-template-columns: 1fr;
  }
}

.task-detail-fact-label {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.task-detail-fact-value {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.task-detail-checklist-groups {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.8rem;
}

.task-detail-checklist-group {
  display: grid;
  gap: 0.45rem;
}

.task-detail-checklist-title {
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.task-detail-checklist-items {
  display: grid;
  gap: 0.38rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.task-detail-checklist-item {
  align-items: flex-start;
  color: #334155;
  display: flex;
  font-size: 0.88rem;
  gap: 0.55rem;
  line-height: 1.45;
}

.task-detail-checklist-bullet {
  background: #4f46e5;
  border-radius: 999px;
  height: 0.42rem;
  margin-top: 0.42rem;
  width: 0.42rem;
}

.task-detail-history-list {
  display: grid;
  gap: 0.7rem;
}

.task-detail-history-item {
  border-top: 1px solid #eef2f7;
  display: grid;
  gap: 0.2rem;
  padding-top: 0.7rem;
}

.task-detail-history-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.task-detail-history-title {
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 600;
  margin: 0;
}

.task-detail-history-meta {
  color: #94a3b8;
  font-size: 0.75rem;
  margin: 0;
}

.task-detail-history-note {
  color: #475569;
  font-size: 0.83rem;
  line-height: 1.45;
  margin: 0.1rem 0 0;
}

@media (max-width: 720px) {
  .task-detail-fact-grid {
    grid-template-columns: 1fr;
  }
}

/* Checklists */
.checklist-template-grid {
  grid-auto-rows: 1fr;
}

.ops-checklist-panel {
  border-left: 4px solid #c7d2fe;
}

.checklist-template-card {
  border-radius: 0.95rem;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.checklist-template-card:hover {
  transform: translateY(-1px);
}

.checklist-scope-panel,
.checklist-editor-shell,
.checklist-group-card,
.checklist-item-row {
  border-color: #dbeafe;
}

/* Spark worker: dashboard and finance */
.app-content-shell {
  background: radial-gradient(circle at 12% 10%, #f0f9ff 0%, transparent 45%), radial-gradient(circle at 88% 0%, #ecfeff 0%, transparent 34%), #eef2ff;
  min-height: 100vh;
}

.panel-title-with-meta .panel-meta-chip,
.panel-meta-chip {
  background: #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.14rem 0.45rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-shell {
  align-items: start;
  gap: 1rem;
  grid-template-rows: minmax(0, 1fr);
}

.dashboard-conversations-page {
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: #ffffff;
  min-height: 0;
  max-width: none !important;
  width: 100%;
}

.dashboard-conversations-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-conversations-panel > .panel-title {
  background: #ffffff;
}

.dashboard-conversations-page .dashboard-conversations-panel > .dashboard-toolbar:first-child {
  padding-top: 0.7rem;
}

.dashboard-conversations-page .dashboard-conversations-panel > .panel-title:first-child {
  min-height: 3.45rem;
}

.dashboard-conversations-page .dashboard-conversations-panel > .panel-title:first-child .text-slate-500 {
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-toolbar {
  background: #ffffff;
  border-bottom: 0;
  display: grid;
  gap: 0.68rem;
  padding: 0.7rem 0.78rem 0.62rem;
}

.dashboard-search-wrap {
  display: block;
  position: relative;
}

.dashboard-search-icon {
  color: #64748b;
  fill: none;
  height: 1.25rem;
  left: 0.72rem;
  pointer-events: none;
  position: absolute;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
}

.dashboard-conversation-search {
  border-color: #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: #0f172a;
  font-size: 0.86rem;
  min-height: 2.55rem;
  padding: 0.54rem 0.75rem 0.54rem 2.48rem;
  width: 100%;
}

.dashboard-conversation-search::placeholder {
  color: #8a94a6;
}

.dashboard-filter-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dashboard-filter-label {
  color: #5c6678;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-right: 0.05rem;
  text-transform: uppercase;
}

.dashboard-filter-btn {
  align-items: center;
  background: #ffffff;
  border-color: #d7dee8;
  border-radius: 999px;
  color: #111827;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 0.4rem;
  justify-content: center;
  line-height: 1;
  min-height: 2.05rem;
  padding: 0.52rem 0.75rem;
}

.dashboard-filter-btn.tab-btn-active {
  background: #0b63f6;
  border-color: #0b63f6;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
  color: #ffffff;
}

.dashboard-filter-count {
  align-items: center;
  background: #e8eef8;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 1.35rem;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0 0.32rem;
}

.dashboard-filter-btn.tab-btn-active .dashboard-filter-count {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.dashboard-toolbar-cluster {
  align-items: center;
  display: flex;
  gap: 0.45rem;
}

.dashboard-btn-secondary {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #312e81;
}

.dashboard-btn-secondary:hover {
  background: #e0e7ff;
}

.dashboard-conversation-list {
  background: #f8fafc;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.62rem;
  margin: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0.62rem 0.72rem 0.82rem;
}

.dashboard-conversation-item {
  flex: 0 0 auto;
}

.dashboard-conversation-item:hover {
  background: #ffffff;
}

.dashboard-conversation-item:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.dashboard-conversation-card-head {
  align-items: flex-start;
  column-gap: 0.62rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  row-gap: 0.22rem;
}

.dashboard-conversation-copy {
  min-width: 0;
}

.dashboard-conversation-title-line {
  align-items: center;
  display: flex;
  gap: 0.4rem;
  min-width: 0;
}

.dashboard-conversation-status {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  justify-content: flex-end;
  max-width: 11rem;
  min-width: 0;
  padding-top: 0.08rem;
}

.dashboard-conversation-card-head .conversation-preview {
  grid-column: 2 / -1;
  margin-top: 0.12rem;
}

.conversation-language {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: lowercase;
}

.dashboard-conversation-divider {
  background: #d9e1ea;
  height: 1px;
  margin: 0.58rem 0 0.5rem;
}

.dashboard-conversation-tag-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: flex-end;
}

.dashboard-conversation-meta-row {
  align-items: center;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.5rem;
  line-height: 1.25;
  margin-top: 0.58rem;
}

.dashboard-conversation-meta-item {
  align-items: center;
  display: inline-flex;
  gap: 0.36rem;
  min-width: 0;
}

.dashboard-conversation-meta-item svg {
  color: #64748b;
  fill: none;
  flex: 0 0 auto;
  height: 1.05rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1.05rem;
}

.dashboard-conversation-meta-separator {
  background: #d9e1ea;
  display: inline-flex;
  height: 1.15rem;
  width: 1px;
}

.conversation-calendar-panel {
  flex: 0 0 auto;
}

.dashboard-shell-conversations {
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
}

.conversation-side-column {
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.conversation-side-panel .panel-title {
  padding: 0.68rem 0.8rem;
}

.conversation-side-panel .panel-title > div > span {
  font-size: 0.84rem;
}

.conversation-side-panel .panel-title > div > p {
  font-size: 0.66rem;
}

.conversation-side-panel .dashboard-toolbar-cluster {
  gap: 0.35rem;
}

.conversation-side-panel .dashboard-toolbar-cluster .btn,
.conversation-side-panel .dashboard-toolbar-cluster .btn-primary {
  font-size: 0.7rem;
  min-height: 2rem;
  padding: 0.34rem 0.58rem;
}

.conversation-calendar-shell {
  border-top: 1px solid #e2e8f0;
  padding: 0.55rem 0.62rem 0.65rem;
}

.conversation-calendar-empty,
.conversation-calendar-error {
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.45;
}

.conversation-calendar-error {
  color: #b91c1c;
}

.conversation-calendar-body {
  display: grid;
  gap: 0.45rem;
}

.conversation-calendar-meta {
  align-items: flex-start;
  display: flex;
  gap: 0.55rem;
  justify-content: space-between;
}

.conversation-calendar-listing {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.conversation-calendar-focus {
  color: #64748b;
  font-size: 0.62rem;
  line-height: 1.4;
  margin-top: 0.2rem;
}

.conversation-calendar-count {
  background: #eef2ff;
  border-radius: 999px;
  color: #4338ca;
  flex: 0 0 auto;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.42rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-mini-calendar {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}

.conversation-mini-calendar-weekdays,
.conversation-mini-calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.conversation-mini-calendar-weekdays {
  background: rgba(248, 250, 252, 0.95);
}

.conversation-mini-calendar-weekday {
  color: #94a3b8;
  font-size: 0.52rem;
  font-weight: 700;
  padding: 0.25rem 0;
  text-align: center;
  text-transform: uppercase;
}

.conversation-mini-calendar-week {
  position: relative;
}

.conversation-mini-calendar-week + .conversation-mini-calendar-week {
  border-top: 1px solid #e2e8f0;
}

.conversation-mini-calendar-day {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.9);
  border-left: 1px solid #e2e8f0;
  display: flex;
  min-height: 42px;
  padding: 0.22rem 0.26rem;
}

.conversation-mini-calendar-day:first-child {
  border-left: 0;
}

.conversation-mini-calendar-day.is-outside-month {
  background: rgba(248, 250, 252, 0.88);
}

.conversation-mini-calendar-day.is-focus-day {
  background: rgba(224, 231, 255, 0.45);
}

.conversation-mini-calendar-day.is-today {
  background: rgba(254, 243, 199, 0.6);
}

.conversation-mini-calendar-day-number {
  color: #1e293b;
  font-size: 0.66rem;
  font-weight: 700;
}

.conversation-mini-calendar-day.is-outside-month .conversation-mini-calendar-day-number {
  color: #94a3b8;
}

.conversation-mini-calendar-segments {
  inset: 1.12rem 0 0.26rem;
  pointer-events: none;
  position: absolute;
}

.conversation-mini-calendar-segment {
  align-items: center;
  background: #8ddfdc;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  display: flex;
  font-size: 0.54rem;
  font-weight: 700;
  height: 0.9rem;
  padding: 0 0.28rem;
  pointer-events: auto;
  position: absolute;
  white-space: nowrap;
}

.conversation-mini-calendar-segment.is-selected {
  background: #0f9f99;
  box-shadow: 0 0 0 2px rgba(15, 159, 153, 0.15), 0 4px 12px rgba(15, 23, 42, 0.12);
  color: #fff;
  z-index: 2;
}

.conversation-mini-calendar-segment.is-continued-start {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
}

.conversation-mini-calendar-segment.is-continued-end {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.conversation-mini-calendar-segment-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-side-panel .label {
  font-size: 0.72rem;
  margin-bottom: 0.22rem;
}

.conversation-side-panel .field {
  font-size: 0.82rem;
  min-height: 2.4rem;
  padding: 0.55rem 0.72rem;
}

.conversation-side-panel textarea.field {
  line-height: 1.45;
}

.conversation-side-panel .space-y-3 {
  gap: 0.65rem;
}

.conversation-side-panel .overflow-y-auto {
  padding: 0.78rem;
}

.conversation-side-panel .kb-evidence-item {
  padding: 0.38rem 0;
}

.conversation-side-panel .kb-evidence-section,
.conversation-side-panel .kb-evidence-score {
  font-size: 0.62rem;
}

@media (min-width: 1024px) {
  .dashboard-conversations-page {
    height: 100dvh;
    overflow: hidden;
    padding: 0.75rem !important;
  }

  .dashboard-conversations-page .dashboard-shell-conversations {
    height: 100%;
    min-height: 0;
  }

  .dashboard-conversations-page .dashboard-conversations-panel {
    height: 100%;
  }

  .dashboard-conversation-thread-panel .dashboard-thread-draft-generate,
  .dashboard-conversation-thread-panel .dashboard-mobile-draft-assistant {
    display: none !important;
  }

  .dashboard-conversation-thread-panel .dashboard-mobile-message-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-ai-context-draft-assistant {
    display: grid;
    gap: 0.72rem;
  }

  .dashboard-ai-context-draft-assistant .dashboard-mobile-draft-proposed {
    gap: 0.55rem;
    padding: 0.72rem;
  }

  .dashboard-ai-context-draft-assistant .dashboard-mobile-draft-text {
    max-height: 13rem;
    overflow-y: auto;
  }

  .dashboard-ai-context-draft-assistant .dashboard-mobile-draft-insert {
    min-height: 38px;
  }

  .dashboard-ai-context-draft-assistant .dashboard-mobile-instruction-actions {
    grid-template-columns: minmax(0, 1fr) minmax(6.5rem, auto);
  }

  .dashboard-ai-context-draft-assistant .dashboard-mobile-instruction-generate,
  .dashboard-ai-context-draft-assistant .dashboard-mobile-draft-voice {
    font-size: 0.74rem;
    min-height: 42px;
  }
}

@media (min-width: 1280px) {
  .dashboard-conversations-page .dashboard-shell-conversations {
    grid-template-columns: 360px minmax(0, 1fr) 360px;
  }
}

@media (min-width: 1700px) {
  .dashboard-conversations-page .dashboard-shell-conversations {
    grid-template-columns: 360px minmax(700px, 1fr) 440px;
  }
}

.finance-shell {
  display: flex;
  flex-direction: column;
}

.finance-shell .panel-title-with-meta {
  align-items: flex-start;
}

.finance-chip-cluster {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.finance-meta-chip {
  background: #f1f5f9;
  border-radius: 999px;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.16rem 0.5rem;
  text-transform: uppercase;
}

.finance-meta-inline {
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.finance-status-pill {
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.16rem 0.5rem;
}

.finance-status-pill-ok {
  background: #dcfce7;
  color: #166534;
}

.finance-status-pill-warn {
  background: #fee2e2;
  color: #991b1b;
}

.finance-refresh-btn {
  background: #1d4ed8;
  border-radius: 999px;
  border: 1px solid #1e40af;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  min-height: 36px;
}

.finance-refresh-btn:hover {
  background: #1e40af;
}

.finance-currency-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  display: inline-flex;
  padding: 0.12rem;
}

.finance-currency-label {
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0 0.35rem;
  text-transform: uppercase;
}

.finance-currency-btn {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
}

.finance-currency-btn:hover {
  background: #f1f5f9;
}

.finance-currency-btn-active {
  background: #0f172a;
  color: #ffffff;
}

.finance-view-tabs {
  align-items: center;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  display: inline-flex;
  padding: 0.12rem;
}

.finance-view-tab {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  min-height: 31px;
  padding: 0.42rem 0.72rem;
  white-space: nowrap;
}

.finance-view-tab:hover {
  background: #f8fafc;
}

.finance-view-tab-active {
  background: #0f172a;
  color: #ffffff;
}

.finance-metrics-grid {
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.8rem;
}

.finance-summary-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  padding: 0.55rem;
}

.finance-period-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.finance-period-preset-btn {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  min-width: 2.45rem;
  padding: 0.48rem 0.58rem;
  text-align: center;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.finance-period-preset-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #312e81;
}

.finance-period-preset-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.finance-metric-card-copyable {
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.finance-metric-card-copyable:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.finance-metric-card-copyable:focus-visible {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
  outline: none;
}

.finance-metric-card-copyable:active {
  transform: translateY(1px);
}

.finance-metric-label {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.finance-metric-value {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

.finance-metric-copy-hint {
  color: #94a3b8;
  font-size: 0.66rem;
  font-weight: 600;
  margin-top: 0.28rem;
}

.finance-rules-layout,
.finance-rules-content {
  display: grid;
  gap: 0.9rem;
}

.finance-rules-overview {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 0.55rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.finance-rules-title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
}

.finance-rules-description {
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.5;
  margin-top: 0.35rem;
  max-width: 62rem;
}

.finance-rules-meta {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: max-content;
}

.finance-rules-meta span {
  background: #f1f5f9;
  border-radius: 999px;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.18rem 0.5rem;
  text-transform: uppercase;
}

.finance-rules-channel-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-rule-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  overflow: hidden;
  padding: 0.9rem;
}

.finance-rule-card-airbnb {
  border-top: 3px solid #ff5a5f;
}

.finance-rule-card-booking {
  border-top: 3px solid #2563eb;
}

.finance-rule-card-direct {
  border-top: 3px solid #059669;
}

.finance-rule-card-ota {
  border-top: 3px solid #d97706;
}

.finance-rule-card-neutral {
  border-top: 3px solid #64748b;
}

.finance-rule-card-head {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.finance-rule-card-kicker {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finance-rule-card-title {
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 0.16rem;
  overflow-wrap: anywhere;
}

.finance-rule-count {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  flex: 0 0 auto;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.finance-rule-summary {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.55;
}

.finance-rule-list {
  display: grid;
  gap: 0.48rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.finance-rule-list li {
  color: #334155;
  display: grid;
  font-size: 0.78rem;
  gap: 0.48rem;
  grid-template-columns: 0.42rem minmax(0, 1fr);
  line-height: 1.45;
}

.finance-rule-list li::before {
  background: #94a3b8;
  border-radius: 999px;
  content: "";
  height: 0.36rem;
  margin-top: 0.42rem;
  width: 0.36rem;
}

.finance-rule-list strong,
.finance-rule-summary strong {
  color: #0f172a;
  font-weight: 800;
}

.finance-rule-list code,
.finance-rule-summary code {
  background: #e2e8f0;
  border-radius: 0.35rem;
  color: #0f172a;
  font-size: 0.86em;
  font-weight: 700;
  padding: 0.08rem 0.28rem;
}

@media (max-width: 900px) {
  .finance-metrics-grid {
    grid-template-columns: 1fr;
  }

  .finance-summary-grid {
    grid-template-columns: 1fr;
  }

  .finance-rules-overview {
    display: grid;
  }

  .finance-rules-meta {
    align-items: flex-start;
    min-width: 0;
  }

  .finance-rules-channel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .finance-shell .page-hero-head {
    align-items: flex-start;
    display: grid;
  }

  .finance-shell .page-toolbar {
    justify-content: flex-start;
    width: 100%;
  }

  .finance-chip-cluster {
    align-items: flex-start;
  }

  .finance-meta-inline {
    line-height: 1.2;
  }
}

.finance-currency-btn,
.finance-refresh-btn,
.finance-filter-btn,
.finance-view-tab,
.finance-channel-pill,
.finance-table-amount {
  white-space: nowrap;
}

.ui-data-table thead th,
.finance-table-head {
  background: #f8fafc;
  border-bottom: 1px solid #dbe3ef;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.55rem;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

.finance-table-cell {
  padding: 0.48rem 0.55rem;
  vertical-align: top;
}

.finance-table-text {
  color: #334155;
}

.finance-table-text-compact,
.finance-table-head-compact {
  white-space: nowrap;
  width: 1%;
}

.finance-table-date {
  color: #475569;
  white-space: nowrap;
}

.finance-table-money {
  text-align: right;
}

.finance-table-value {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
}

.finance-table-warning {
  color: #b45309;
  font-weight: 700;
}

.finance-table-amount {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.finance-reservation-row-danger > td {
  background: #fef2f2;
  border-top-color: #fecaca;
}

.finance-reservation-row-danger .finance-table-cell,
.finance-reservation-row-danger .finance-table-text,
.finance-reservation-row-danger .finance-table-date,
.finance-reservation-row-danger .finance-table-amount {
  color: #991b1b;
}

.finance-reservation-warning-chip {
  align-items: center;
  background: #fee2e2;
  border-radius: 999px;
  color: #991b1b;
  display: inline-flex;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.08rem 0.35rem;
  text-transform: uppercase;
}

.finance-table-total-row {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem 1rem;
}

.finance-table-total-row-mobile {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 0.8rem 0.95rem;
}

.finance-table-total-label {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.finance-table-total-value {
  color: #0f172a;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  white-space: nowrap;
}

.finance-channel-pill {
  background: #f1f5f9;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.08rem 0.35rem;
  text-transform: uppercase;
}

.finance-channel-pill-compact {
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  padding: 0.06rem 0.28rem;
}

.finance-channel-pill-soft {
  background: #ecfeff;
  color: #0c4a6e;
}

.finance-mobile-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 0.75rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  padding: 0.85rem;
}

.finance-mobile-card-danger {
  background: #fff5f5;
  border-color: #fecaca;
}

.finance-mobile-card .finance-mobile-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.finance-mobile-payout-card {
  border: 1px solid #dbe3ef;
  border-radius: 0.7rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
}

.finance-mobile-card-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.finance-mobile-alert {
  color: #991b1b;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 0.45rem;
}

.conversation-item:focus-visible,
.btn:focus-visible,
.btn-primary:focus-visible,
.field:focus-visible,
.finance-currency-btn:focus-visible,
.finance-refresh-btn:focus-visible,
.finance-view-tab:focus-visible,
.dashboard-btn-secondary:focus-visible,
.dashboard-filter-btn:focus-visible,
.finance-currency-btn-active:focus-visible {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}


.page-hero-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.page-hero-head {
  align-items: end;
  gap: 1rem;
  padding-block: 1rem;
}

.page-eyebrow {
  color: var(--mnb-slate-400);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 0.3rem;
  text-transform: uppercase;
}

.page-subtitle {
  color: var(--mnb-slate-400);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0.35rem 0 0;
  max-width: 64ch;
}

.page-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.page-hero-head > div:first-child {
  min-width: 0;
}

.page-meta-chip {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.45rem 0.7rem;
}

.ia-page-grid {
  display: grid;
  gap: 1rem;
}

.ia-page-grid-2col {
  grid-template-columns: 1fr;
}

.ia-page-grid-wide {
  grid-template-columns: 1fr;
}

.ia-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.ai-replies-layout {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  width: 100%;
}

.ai-replies-library-shell {
  display: grid;
  grid-template-rows: auto auto 1fr;
  justify-self: stretch;
  max-width: none;
  min-height: calc(100vh - 32px);
  width: 100%;
}

.ai-replies-toolbar {
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.ai-replies-toolbar-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
}

.ai-replies-theme-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ai-replies-library-scroll {
  min-height: 0;
  overflow-y: auto;
  width: 100%;
}

.ai-replies-stack {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.ai-replies-learning {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.ai-replies-learning-summary {
  align-items: start;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.06), rgba(16, 185, 129, 0.04)),
    #f8fbff;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.1rem 1.15rem;
}

.ai-replies-learning-metrics {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, minmax(5.5rem, 1fr));
}

.ai-replies-learning-metric {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.75rem;
  display: grid;
  gap: 0.1rem;
  min-height: 4.2rem;
  padding: 0.7rem 0.8rem;
}

.ai-replies-learning-metric span {
  color: #0f172a;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.ai-replies-learning-metric small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-replies-learning-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
}

.ai-replies-learning-select-all {
  align-items: center;
  color: #475569;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.5rem;
  min-height: 2.25rem;
}

.ai-replies-learning-list {
  display: grid;
  gap: 0.85rem;
}

.ai-replies-learning-card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.ai-replies-learning-card-handled {
  background: #f8fafc;
  opacity: 0.74;
}

.ai-replies-learning-card-head {
  align-items: start;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1.4rem minmax(0, 1fr);
}

.ai-replies-learning-checkbox {
  align-items: center;
  display: inline-flex;
  height: 1.5rem;
  justify-content: center;
  width: 1.4rem;
}

.ai-replies-learning-title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0.55rem 0 0.2rem;
}

.ai-replies-learning-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-replies-learning-draft {
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.85rem;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.6;
  padding: 0.85rem;
}

.ai-replies-learning-draft p {
  margin: 0.25rem 0 0;
}

.ai-replies-learning-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  min-height: 2.3rem;
}

@media (max-width: 720px) {
  .ai-replies-learning-metrics,
  .ai-replies-learning-grid {
    grid-template-columns: 1fr;
  }

  .ai-replies-learning-card-actions {
    justify-content: flex-start;
  }
}

.ai-replies-general-intro {
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(99, 102, 241, 0.02)),
    #f8fbff;
  border: 1px solid rgba(129, 140, 248, 0.18);
  border-radius: 1.25rem;
  padding: 1.1rem 1.15rem;
}

.ai-replies-general-intro-head {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.ai-replies-general-kicker {
  color: #6366f1;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

.ai-replies-general-title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0;
}

.ai-replies-general-copy {
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0.75rem 0 0;
  max-width: 78ch;
}

.ai-replies-prompt-shell {
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1.35rem;
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  width: 100%;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.05);
}

.ai-replies-prompt-meta {
  align-items: start;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.ai-replies-prompt-kicker {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

.ai-replies-prompt-path {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.3rem 0 0;
}

.ai-replies-prompt-meta-chips {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.ai-replies-prompt-editor-wrap {
  display: grid;
}

.ai-replies-prompt-hint {
  color: #64748b;
  display: block;
  font-size: 0.8rem;
  line-height: 1.6;
  margin-top: 0.4rem;
  max-width: 80ch;
}

.ai-replies-prompt-editor {
  background: rgba(248, 250, 252, 0.85);
  border-radius: 1.1rem;
  font-family: "SFMono-Regular", "SF Mono", "IBM Plex Mono", "Menlo", monospace;
  font-size: 0.84rem;
  line-height: 1.72;
  min-height: 28rem;
  padding: 1rem 1.05rem;
  resize: vertical;
}

.ai-replies-prompt-editor:focus {
  background: #fff;
}

.ai-replies-prompt-commit-note {
  align-items: start;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
}

.ai-replies-prompt-commit-title {
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0;
  text-transform: uppercase;
}

.ai-replies-prompt-commit-copy {
  color: #475569;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0.15rem 0 0;
}

.ai-replies-prompt-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: space-between;
  padding-top: 0.15rem;
}

.ai-replies-prompt-summary-block {
  min-width: 0;
}

.ai-replies-prompt-summary-label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

.ai-replies-prompt-summary-text {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0.35rem 0 0;
  max-width: 72ch;
}

.ai-replies-item-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 1rem;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.ai-replies-item-card-clickable {
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.ai-replies-item-card-clickable:hover {
  border-color: #93c5fd;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.ai-replies-item-head {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.ai-replies-item-title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.ai-replies-item-meta {
  color: #64748b;
  font-size: 0.75rem;
  margin: 0.25rem 0 0;
}

.ai-replies-item-body {
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

.ai-replies-item-path {
  color: #64748b;
  font-size: 0.72rem;
  margin: 0;
}

.ai-replies-empty-state {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 1.25rem;
}

.ai-replies-context-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 1rem;
  margin: 0.9rem;
  overflow: hidden;
}

.ai-replies-context-card summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 0.95rem;
  font-weight: 700;
  justify-content: space-between;
  list-style: none;
  padding: 1rem 1rem 0.95rem;
}

.ai-replies-context-card summary::-webkit-details-marker {
  display: none;
}

.ai-replies-context-body {
  border-top: 1px solid #eef2f7;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.ai-replies-context-kpi {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.ai-replies-context-muted {
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
}

.ai-replies-coverage-row {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: 0.84rem;
  gap: 0.75rem;
  justify-content: space-between;
}

.ai-replies-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ai-replies-tag {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
}

.ai-replies-modal-backdrop {
  align-items: stretch;
  background: rgba(15, 23, 42, 0.34);
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 80;
}

.ai-replies-fact-drawer {
  background: #ffffff;
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.16);
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  max-width: min(92vw, 560px);
  width: 100%;
}

.ai-replies-sop-drawer {
  max-width: min(96vw, 760px);
}

.ai-replies-fact-drawer-head {
  align-items: flex-start;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.5rem;
}

.ai-replies-fact-drawer-body {
  display: grid;
  gap: 1rem;
  overflow-y: auto;
  padding: 1.5rem;
}

.ai-replies-fact-drawer-actions {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
}

.playground-mode-switch {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 0.6rem;
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.12rem;
}

.playground-mode-switch .btn {
  min-width: 6.4rem;
}

.playground-real-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.playground-real-board-shell,
.playground-summary-rail {
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: calc(100vh - 32px);
}

.playground-real-controls {
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
}

.playground-real-control-group {
  min-width: 0;
}

.playground-real-controls .label {
  color: #475569;
  font-size: 0.69rem;
}

.playground-real-controls .field {
  min-height: 1.95rem;
}

.playground-real-control-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.playground-review-board {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem;
}

.playground-review-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 0.72rem;
  display: grid;
  gap: 0.42rem;
  padding: 0.62rem 0.7rem;
}

.playground-review-card-active {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.playground-review-card-head {
  align-items: flex-start;
  display: grid;
  gap: 0.45rem;
}

.playground-review-card-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.72rem;
  font-weight: 700;
  gap: 0.45rem;
  margin: 0;
  min-width: 0;
}

.playground-review-card-title span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playground-review-card-meta-chip {
  background: #f8fafc;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.06rem 0.38rem;
  text-transform: uppercase;
}

.playground-review-card-score {
  color: #334155;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.playground-review-card-message {
  color: #334155;
  font-size: 0.74rem;
  line-height: 1.45;
  margin: 0;
}

.playground-review-card-meta {
  color: #64748b;
  display: grid;
  font-size: 0.64rem;
  gap: 0.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.playground-review-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.playground-review-card-actions .btn {
  height: 1.95rem;
}

.playground-summary-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.playground-summary-card {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 0.6rem;
  padding: 0.55rem;
}

.playground-summary-kpi {
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

.playground-summary-kpi-label {
  color: #475569;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin: 0.2rem 0 0;
  text-transform: uppercase;
}

.playground-summary-note {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.8rem;
}

.playground-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.playground-summary-actions .btn {
  flex: 1 1 125px;
}

.ia-surface-card {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.75rem;
  padding: 1rem;
}

.panel-title {
  padding-inline: 1rem;
}

.panel-title-with-meta {
  gap: 0.85rem;
}

@media (max-width: 900px) {
  .page-hero-head {
    align-items: start;
  }

  .page-toolbar {
    justify-content: flex-start;
  }

  .page-meta-chip {
    width: fit-content;
  }

  .ai-improvement-kpi-card {
    min-height: auto;
  }

  .sop-page-form-grid,
  .sop-page-filter-grid,
  .sop-page-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-replies-context-card {
    margin: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .ia-page-grid-2col {
    grid-template-columns: 390px minmax(0, 1fr);
  }

  .ia-page-grid-wide {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .playground-real-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .ai-replies-toolbar-grid {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .playground-review-board {
    max-height: calc(100vh - 220px);
  }
}

@media (min-width: 720px) {
  .ai-improvement-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .ai-improvement-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Operations cockpit refresh */
:root {
  --ops-bg: #f6f8fb;
  --ops-surface: #ffffff;
  --ops-border: #dfe7f0;
  --ops-border-strong: #cfd9e6;
  --ops-text: #0f1b33;
  --ops-muted: #62708a;
  --ops-soft: #f8fafc;
  --ops-teal: #0f9aa5;
  --ops-blue: #2563eb;
  --ops-amber: #d97706;
  --ops-emerald: #16a34a;
  --ops-rose: #e11d48;
}

.dashboard-body {
  background: var(--ops-bg);
}

.sidebar-nav {
  background: #fff;
  border-right: 1px solid var(--ops-border);
  box-shadow: none;
  width: 258px;
}

.sidebar-nav.sidebar-collapsed {
  width: 72px;
}

.sidebar-header {
  border-bottom-color: var(--ops-border);
  min-height: 80px;
  padding: 1rem 1.05rem;
}

.sidebar-brand-mark {
  background: transparent;
  border-radius: 8px;
  box-shadow: none;
  font-size: 0;
  height: 40px;
  letter-spacing: 0;
  overflow: hidden;
  width: 40px;
}

.sidebar-brand-mark img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.sidebar-brand-title {
  color: var(--ops-text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.sidebar-brand-subtitle {
  color: #66748b;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  line-height: 1.2;
}

.sidebar-section {
  padding: 0.98rem 0.85rem 0.2rem;
}

.sidebar-section-label {
  color: #52617a;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding-inline: 0.38rem;
}

.sidebar-section-theme::before {
  background: #eef2f7;
  left: 0.75rem;
  right: 0.75rem;
}

.sidebar-links {
  gap: 0.16rem;
}

.sidebar-link {
  border-radius: 8px;
  color: #16233b;
  font-size: 0.87rem;
  font-weight: 600;
  gap: 0.68rem;
  min-height: 2.55rem;
  padding: 0.62rem 0.62rem;
}

.sidebar-link:hover {
  background: #f3f7fb;
}

.sidebar-link-active,
.sidebar-link-active:hover {
  background: #eaf8f9;
  border: 0;
  color: #007a83;
}

.sidebar-icon {
  background: transparent;
  border-radius: 6px;
  color: currentColor;
  font-size: 1rem;
  height: 1.55rem;
  line-height: 1;
  width: 1.55rem;
}

.sidebar-icon svg {
  height: 1.2rem;
  stroke-width: 1.75;
  width: 1.2rem;
}

.sidebar-link-active .sidebar-icon {
  background: transparent;
}

.sidebar-toggle-btn {
  border-radius: 8px;
  height: 32px;
  width: 32px;
}

.sidebar-footer {
  background: #fbfdff;
  border-top-color: var(--ops-border);
  padding: 0.95rem 1rem 1rem;
}

.sidebar-footer > div {
  display: grid !important;
  gap: 0.8rem !important;
  grid-template-columns: 1fr;
}

.sidebar-footer .status-cluster {
  align-items: flex-start;
  border-left: 0;
  gap: 0.22rem;
  padding-left: 1.05rem;
  position: relative;
}

.sidebar-footer .status-cluster::before {
  background: #22c55e;
  border-radius: 999px;
  content: "";
  height: 0.48rem;
  left: 0;
  position: absolute;
  top: 0.2rem;
  width: 0.48rem;
}

.sidebar-footer .btn {
  border-radius: 8px;
  min-height: 2.45rem;
  width: 100%;
}

.manager-bottom-nav,
.manager-mobile-menu-backdrop,
.manager-mobile-menu-sheet {
  display: none;
}

.mnb-app-content:has(.ops-command-center) {
  background: var(--ops-bg);
  padding: 0;
}

.ops-command-center {
  color: var(--ops-text);
  display: grid;
  gap: 0.85rem;
  max-width: 1680px;
  padding: 1.2rem 1.25rem 1.25rem 1.8rem;
  width: 100%;
}

.ops-command-center .mnb-page-title {
  color: var(--ops-text);
  font-size: clamp(1.35rem, 1.55vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
}

.ops-command-center .mnb-page-title::after {
  display: none;
}

.ops-command-center .ops-page-subtitle {
  color: var(--ops-muted);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.ops-command-bar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 3rem;
}

.ops-command-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1.12rem;
  justify-content: flex-end;
}

.ops-command-status {
  align-items: center;
  border-left: 1px solid var(--ops-border);
  display: flex;
  gap: 0.6rem;
  min-height: 2.35rem;
  padding-left: 1rem;
}

.ops-command-status span:not(.ops-status-dot):not(.ops-clock-icon) {
  color: var(--ops-muted);
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.2;
}

.ops-command-status strong {
  color: var(--ops-text);
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 0.12rem;
}

.ops-status-dot {
  border-radius: 999px;
  display: inline-flex;
  height: 0.55rem;
  width: 0.55rem;
}

.ops-status-dot.is-ok {
  background: var(--ops-emerald);
}

.ops-status-dot.is-warn {
  background: var(--ops-amber);
}

.ops-clock-icon {
  align-items: center;
  border: 1.5px solid var(--ops-border-strong);
  border-radius: 999px;
  color: var(--ops-text);
  display: inline-flex;
  font-size: 0.85rem;
  height: 1.55rem;
  justify-content: center;
  width: 1.55rem;
}

.ops-refresh-button {
  align-items: center;
  background: #fff;
  border: 1.5px solid #10a7b2;
  border-radius: 8px;
  color: #007a83;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 800;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0 0.9rem;
}

.ops-refresh-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ops-focus-stack {
  display: grid;
  gap: 0.9rem;
}

.ops-payment-card,
.ops-action-center,
.ops-priority-card,
.ops-kpi-card,
.ops-list-card {
  background: var(--ops-surface);
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 27, 51, 0.035);
}

.ops-payment-card {
  background: #fffafb;
  border-color: #fecdd3;
  box-shadow: 0 14px 28px rgba(190, 18, 60, 0.05);
  overflow: hidden;
  padding: 0 1rem;
}

.ops-action-center {
  overflow: hidden;
}

.ops-action-head {
  align-items: center;
  border-bottom: 1px solid var(--ops-border);
  display: flex;
  gap: 0.85rem;
  justify-content: space-between;
  min-height: 4.15rem;
  padding: 0.82rem 1rem;
}

.ops-action-head h3 {
  align-items: center;
  color: var(--ops-text);
  display: flex;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
}

.ops-action-head h3 span {
  align-items: center;
  background: #e0f2fe;
  border-radius: 8px;
  color: #0369a1;
  display: inline-flex;
  height: 1.8rem;
  justify-content: center;
  width: 1.8rem;
}

.ops-action-head p {
  color: var(--ops-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0.28rem;
}

.ops-action-count {
  align-items: center;
  background: #f1f5f9;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 850;
  min-height: 1.65rem;
  justify-content: center;
  padding: 0 0.7rem;
  white-space: nowrap;
}

.ops-action-empty {
  align-items: center;
  color: #8190a7;
  display: grid;
  font-size: 0.78rem;
  font-weight: 650;
  justify-items: center;
  min-height: 6.1rem;
  padding: 1rem;
  text-align: center;
}

.ops-action-list {
  display: grid;
}

.ops-action-row {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  color: var(--ops-text);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 2.35rem minmax(0, 1fr) auto minmax(7rem, auto) auto;
  min-height: 4.1rem;
  padding: 0.72rem 1rem;
  text-align: left;
  width: 100%;
}

.ops-action-row:last-child {
  border-bottom: 0;
}

.ops-action-row:hover {
  background: #f8fbfd;
}

.ops-action-row.is-critical {
  background: #fff7f8;
}

.ops-action-row.is-warning {
  background: #fffdfa;
}

.ops-action-marker {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 2.3rem;
  justify-content: center;
  width: 2.3rem;
}

.ops-action-marker.is-danger {
  background: #ffe4e8;
  color: #be123c;
}

.ops-action-marker.is-warn {
  background: #ffedd5;
  color: #b45309;
}

.ops-action-marker.is-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.ops-action-main {
  min-width: 0;
}

.ops-action-main strong {
  color: var(--ops-text);
  display: block;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ops-action-main small {
  color: var(--ops-muted);
  display: block;
  font-size: 0.69rem;
  line-height: 1.28;
  margin-top: 0.18rem;
  overflow-wrap: anywhere;
}

.ops-action-meta {
  color: #475569;
  font-size: 0.7rem;
  font-weight: 800;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-action-cta {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #0f766e;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 850;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0 0.7rem;
  white-space: nowrap;
}

.ops-payment-head,
.ops-priority-head,
.ops-list-head {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.ops-payment-head,
.ops-priority-head {
  min-height: 3.9rem;
}

.ops-payment-head {
  border-bottom: 1px solid #ffe4e8;
}

.ops-priority-head {
  border-bottom: 1px solid var(--ops-border);
  padding: 0 1rem;
}

.ops-payment-head h3,
.ops-priority-head h3,
.ops-list-head h3 {
  align-items: center;
  color: var(--ops-text);
  display: flex;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
}

.ops-payment-head h3 span,
.ops-priority-head h3 span,
.ops-list-head h3 span {
  align-items: center;
  color: var(--ops-text);
  display: inline-flex;
  font-size: 0.9rem;
  justify-content: center;
  width: 1.35rem;
}

.ops-payment-count {
  align-items: center;
  background: #ffe4e8;
  border-radius: 999px;
  color: #be123c;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 800;
  min-height: 1.55rem;
  justify-content: center;
  padding: 0 0.7rem;
  white-space: nowrap;
}

.ops-priority-head button,
.ops-list-head button {
  background: transparent;
  border: 0;
  color: #007a83;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0;
}

.ops-empty-row {
  align-items: center;
  color: #8190a7;
  display: grid;
  font-size: 0.76rem;
  justify-items: center;
  min-height: 7rem;
  text-align: center;
}

.ops-payment-list,
.ops-priority-list,
.ops-data-list {
  display: grid;
}

.ops-payment-row {
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  color: var(--ops-text);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(13rem, 1fr) auto auto minmax(10rem, auto) auto;
  min-height: 4.15rem;
  padding: 0.75rem 0;
  text-align: left;
}

.ops-payment-row:last-child {
  border-bottom: 0;
}

.ops-payment-main strong,
.ops-priority-main strong,
.ops-row-main strong {
  color: var(--ops-text);
  display: block;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
}

.ops-payment-main small,
.ops-priority-main small,
.ops-row-main small {
  color: var(--ops-muted);
  display: block;
  font-size: 0.68rem;
  line-height: 1.25;
  margin-top: 0.2rem;
}

.ops-payment-date {
  color: #243149;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.ops-payment-detail {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 850;
  justify-content: center;
  line-height: 1;
  min-height: 1.55rem;
  padding: 0 0.6rem;
  white-space: nowrap;
}

.ops-payment-detail.is-danger {
  background: #ffe4e8;
  color: #be123c;
}

.ops-payment-detail.is-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.ops-payment-detail.is-ok {
  background: #dcfce7;
  color: #166534;
}

.ops-payment-detail.is-warn {
  background: #fff7cd;
  color: #b45309;
}

.ops-payment-action {
  background: #fffafb;
  border: 1px solid #fda4af;
  border-radius: 999px;
  color: #be123c;
  font-size: 0.68rem;
  font-weight: 850;
  min-height: 1.85rem;
  padding: 0 0.85rem;
  white-space: nowrap;
}

.ops-state-pill,
.ops-ok-pill,
.ops-source-pill {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  min-height: 1.55rem;
  padding: 0 0.55rem;
  white-space: nowrap;
}

.ops-state-pill.is-danger {
  background: #ffe4e8;
  color: #be123c;
}

.ops-state-pill.is-warn {
  background: #ffedd5;
  color: #b45309;
}

.ops-state-pill.is-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.ops-state-pill.is-ok,
.ops-ok-pill.is-ok {
  background: #dcfce7;
  color: #166534;
}

.ops-state-pill.is-muted,
.ops-ok-pill.is-warn {
  background: #f1f5f9;
  color: #64748b;
}

.ops-priority-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-priority-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.ops-priority-card {
  min-height: 16rem;
  overflow: hidden;
}

.ops-priority-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  color: var(--ops-text);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto auto;
  min-height: 4.05rem;
  padding: 0.72rem 1rem;
  text-align: left;
  width: 100%;
}

.ops-priority-row:hover {
  background: #f8fbfd;
}

.ops-priority-avatar {
  align-items: center;
  border-radius: 999px;
  color: #16304a;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 850;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.ops-priority-avatar.is-conversation {
  background: #e0f2fe;
}

.ops-priority-avatar.is-task {
  background: #dcfce7;
  color: #166534;
}

.ops-priority-side {
  color: #546179;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.ops-kpi-icon {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
}

.ops-kpi-icon.is-blue {
  background: #dbeafe;
  color: #2563eb;
}

.ops-kpi-row {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1.16fr 1.22fr 1.07fr 1.05fr 0.76fr 0.95fr;
}

.ops-kpi-card {
  align-items: center;
  color: var(--ops-text);
  display: flex;
  gap: 0.85rem;
  min-height: 7.9rem;
  padding: 1rem;
  text-align: left;
}

.ops-kpi-card:hover {
  border-color: #b9c8da;
  transform: translateY(-1px);
}

.ops-kpi-icon {
  flex: 0 0 auto;
  font-size: 1.15rem;
  height: 3rem;
  width: 3rem;
}

.ops-kpi-icon.is-amber {
  background: #fef3c7;
  color: #b45309;
}

.ops-kpi-icon.is-emerald {
  background: #dcfce7;
  color: #15803d;
}

.ops-kpi-icon.is-violet {
  background: #ede9fe;
  color: #6d28d9;
}

.ops-kpi-icon.is-orange {
  background: #ffedd5;
  color: #c2410c;
}

.ops-kpi-icon.is-rose {
  background: #ffe4e6;
  color: #be123c;
}

.ops-kpi-card small {
  color: #52617a;
  display: block;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ops-kpi-card strong {
  color: var(--ops-text);
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  margin-top: 0.35rem;
}

.ops-kpi-card em {
  color: var(--ops-muted);
  display: block;
  font-size: 0.68rem;
  font-style: normal;
  line-height: 1.25;
  margin-top: 0.4rem;
}

.ops-stay-grid,
.ops-work-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.35rem;
}

.ops-lower-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.45rem;
}

.ops-list-card {
  min-height: 15.6rem;
  overflow: hidden;
}

.ops-work-grid .ops-list-card {
  min-height: 19.5rem;
}

.ops-stay-card {
  min-height: 16rem;
}

.ops-lower-grid .ops-list-card {
  min-height: 12rem;
}

.ops-finance-card {
  display: flex;
  flex-direction: column;
}

.ops-finance-summary {
  align-items: start;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 0.42rem;
  padding: 1.05rem 1rem 0.9rem;
  text-align: left;
  width: 100%;
}

.ops-finance-summary:hover .ops-finance-label,
.ops-finance-summary:focus-visible .ops-finance-label {
  color: #0f766e;
}

.ops-finance-label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ops-finance-summary strong {
  color: #0f172a;
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.ops-finance-summary small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 650;
}

.ops-finance-meta {
  border-top: 1px solid #edf1f6;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding: 0.76rem 1rem;
}

.ops-finance-meta span {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.2;
  padding: 0.35rem 0.55rem;
}

.ops-list-card-wide {
  grid-column: 1 / -1;
}

.ops-list-head {
  border-bottom: 1px solid var(--ops-border);
  min-height: 3.55rem;
  padding: 0 1rem;
}

.ops-list-head h3 {
  font-size: 0.86rem;
  min-width: 0;
  white-space: nowrap;
}

.ops-data-row {
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 4.1rem minmax(0, 1fr) auto;
  min-height: 3.65rem;
  padding: 0.7rem 1rem;
}

.ops-stay-row {
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 3.9rem;
  padding: 0.68rem 1rem;
}

.ops-stay-row:last-child {
  border-bottom: 0;
}

.ops-task-row {
  grid-template-columns: 4.1rem minmax(0, 1fr) auto auto;
}

.ops-row-date {
  color: #243149;
  font-size: 0.72rem;
  font-weight: 850;
}

.ops-source-pill {
  background: #f5f7fb;
  color: #334155;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-stay-main {
  min-width: 0;
}

.ops-stay-main strong {
  color: var(--ops-text);
  display: block;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.2;
}

.ops-stay-main small {
  color: var(--ops-muted);
  display: block;
  font-size: 0.7rem;
  line-height: 1.25;
  margin-top: 0.22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-date-pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 850;
  justify-content: center;
  line-height: 1;
  min-height: 1.55rem;
  padding: 0 0.62rem;
  white-space: nowrap;
}

.ops-date-pill.is-arrival-today {
  background: #d5fbe4;
  color: #047857;
}

.ops-date-pill.is-arrival-tomorrow,
.ops-date-pill.is-arrival-after {
  background: #dbeafe;
  color: #1d4ed8;
}

.ops-date-pill.is-departure-today {
  background: #ffedd5;
  color: #c2410c;
}

.ops-date-pill.is-departure-tomorrow {
  background: #fef3c7;
  color: #b45309;
}

.ops-date-pill.is-departure-after {
  background: #ffedd5;
  color: #c2410c;
}

.ops-date-pill.is-muted {
  background: #f1f5f9;
  color: #64748b;
}

@media (max-width: 1280px) {
  .ops-kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (min-width: 1281px) {
  .ops-command-meta {
    margin-right: clamp(4.5rem, 7vw, 7rem);
  }
}

@media (max-width: 900px) {
  .sidebar-nav {
    width: 72px;
  }

  .sidebar-nav .sidebar-header > div:first-child {
    display: flex !important;
  }

  .sidebar-nav .sidebar-header > div:first-child > div,
  .sidebar-nav .sidebar-text,
  .sidebar-nav .sidebar-section-label,
  .sidebar-nav .sidebar-footer > div {
    display: none !important;
  }

  .sidebar-toggle-btn {
    display: none !important;
  }

  .mnb-app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .ops-command-center {
    padding: 0.85rem;
  }

  .ops-command-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-command-meta {
    justify-content: flex-start;
    width: 100%;
  }

  .ops-command-status {
    border-left: 0;
    padding-left: 0;
  }

  .ops-payment-row,
  .ops-action-row,
  .ops-priority-grid,
  .ops-stay-grid,
  .ops-kpi-row,
  .ops-work-grid,
  .ops-lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-priority-row,
  .ops-kpi-card,
  .ops-data-row,
  .ops-task-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-action-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-action-marker {
    display: none;
  }

  .ops-action-meta,
  .ops-action-cta {
    justify-self: start;
    max-width: 100%;
    white-space: normal;
  }

  .ops-kpi-icon {
    display: none;
  }

  .ops-payment-row {
    align-items: start;
  }

  .ops-payment-action {
    justify-self: start;
  }

  .ops-priority-side {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  html,
  body,
  .dashboard-body {
    background: #ffffff;
    height: var(--dashboard-visual-viewport-height, 100dvh);
    max-width: 100%;
    overflow: hidden;
    overflow-x: hidden;
    scroll-padding-bottom: var(--manager-mobile-content-bottom-reserve);
    scroll-padding-top: 0;
  }

  .dashboard-body {
    min-height: 0;
  }

  .dashboard-body::after {
    background: #ffffff;
    bottom: 0;
    content: "";
    height: 96px;
    left: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    z-index: 38;
  }

  .dashboard-body:has(.manager-bottom-nav-hidden)::after {
    display: none;
  }

  .mnb-app-shell {
    display: block;
    height: var(--dashboard-visual-viewport-height, 100dvh);
    min-height: 0;
    padding-bottom: 0;
  }

  .mnb-app-content {
    -webkit-overflow-scrolling: touch;
    background:
      radial-gradient(140% 80% at 0% 0%, var(--mnb-ivory-100) 0%, transparent 48%),
      linear-gradient(165deg, var(--mnb-ivory-50) 0%, var(--mnb-slate-50) 70%, #f8fafc 100%);
    height: calc(var(--dashboard-visual-viewport-height, 100dvh) - var(--manager-mobile-top-reserve) - var(--manager-mobile-nav-reserved-height));
    left: 0;
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(0.65rem, 2.5vw, 0.95rem);
    position: fixed;
    right: 0;
    top: calc(var(--dashboard-visual-viewport-offset-top, 0px) + var(--manager-mobile-top-reserve));
    width: 100%;
  }

  .mnb-app-content:has(.dashboard-mobile-composer-focused) {
    height: calc(var(--dashboard-visual-viewport-height, 100dvh) - var(--manager-mobile-top-reserve));
  }

  .mnb-app-content:has(.dashboard-conversations-page) {
    padding: 0;
  }

  .sidebar-nav {
    background: transparent;
    border-right: 0;
    border-top: 0;
    bottom: 0;
    box-shadow: none;
    display: block;
    height: 0;
    left: 0;
    overflow: visible;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: auto;
    width: 100% !important;
    z-index: 40;
  }

  .sidebar-header,
  .sidebar-footer,
  .sidebar-section-label,
  .sidebar-section-theme::before {
    display: none !important;
  }

  .sidebar-scroll {
    display: none !important;
  }

  .manager-bottom-nav {
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.94);
    border: 0;
    border-top: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 0;
    bottom: calc(-1 * var(--manager-mobile-nav-safe-bottom));
    box-sizing: border-box;
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: calc(var(--manager-mobile-nav-height) + var(--manager-mobile-nav-safe-bottom));
    left: 0;
    margin: 0;
    max-width: none;
    min-height: 0;
    padding: 3px max(10px, env(safe-area-inset-left)) 0 max(10px, env(safe-area-inset-right));
    pointer-events: auto;
    position: fixed;
    right: 0;
    transform: translateZ(0);
    z-index: 60;
  }

  .manager-bottom-nav.manager-bottom-nav-hidden {
    display: none;
  }

  .manager-bottom-nav-item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #4b5563;
    display: flex;
    flex-direction: column;
    font: inherit;
    gap: 3px;
    justify-content: center;
    min-height: 54px;
    min-width: 0;
    padding: 3px 4px 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  .manager-bottom-nav-item::before {
    background: transparent;
    border-radius: 999px;
    content: "";
    height: 3px;
    left: 25%;
    position: absolute;
    right: 25%;
    top: -4px;
  }

  .manager-bottom-nav-item.active {
    background: transparent;
    color: var(--mnb-indigo-600);
  }

  .manager-bottom-nav-item.active::before {
    background: var(--mnb-indigo-600);
  }

  .manager-bottom-nav-icon {
    border-radius: 999px;
    color: #4b5563;
    display: grid;
    height: 28px;
    place-items: center;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
    width: 28px;
  }

  .manager-bottom-nav-icon svg {
    fill: none;
    height: 21px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 21px;
  }

  .manager-bottom-nav-item.active .manager-bottom-nav-icon {
    background: linear-gradient(135deg, var(--mnb-indigo-600), #3550e8);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
    color: #fff;
  }

  .manager-bottom-nav-item.active .manager-bottom-nav-icon svg {
    height: 16px;
    width: 16px;
  }

  .manager-bottom-nav-label {
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
  }

  .manager-bottom-nav-item.active .manager-bottom-nav-label {
    color: var(--mnb-indigo-600);
  }

  .manager-mobile-menu-backdrop {
    background: rgba(15, 23, 42, 0.3);
    bottom: 0;
    display: block;
    left: 0;
    pointer-events: auto;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 50;
  }

  .manager-mobile-menu-sheet {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 24px 24px 0 0;
    bottom: var(--manager-mobile-nav-reserved-height);
    box-shadow: 0 -20px 44px rgba(15, 23, 42, 0.18);
    display: block;
    left: 0;
    max-height: min(68dvh, 560px);
    overflow-y: auto;
    padding: 0.75rem 0.9rem 1rem;
    pointer-events: auto;
    position: fixed;
    right: 0;
    z-index: 55;
    -webkit-overflow-scrolling: touch;
  }

  .manager-mobile-menu-handle {
    background: #cbd5e1;
    border-radius: 999px;
    height: 4px;
    margin: 0 auto 0.75rem;
    width: 42px;
  }

  .manager-mobile-menu-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
  }

  .manager-mobile-menu-head h2 {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 0;
  }

  .manager-mobile-menu-eyebrow {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 0.18rem;
    text-transform: uppercase;
  }

  .manager-mobile-menu-close {
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #334155;
    display: grid;
    font-size: 1.2rem;
    font-weight: 700;
    height: 36px;
    line-height: 1;
    place-items: center;
    width: 36px;
  }

  .manager-mobile-menu-grid {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-mobile-menu-item {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    color: #1f2937;
    display: flex;
    gap: 0.7rem;
    min-height: 48px;
    padding: 0.7rem 0.72rem;
    text-align: left;
  }

  .manager-mobile-menu-item-active {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: var(--mnb-indigo-600);
  }

  .manager-mobile-menu-icon {
    align-items: center;
    background: #fff;
    border-radius: 12px;
    color: currentColor;
    display: grid;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
    width: 34px;
  }

  .manager-mobile-menu-icon svg {
    fill: none;
    height: 19px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 19px;
  }

  .manager-mobile-menu-item span:last-child {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.15;
    min-width: 0;
  }

  .manager-reservation-modal {
    border-radius: 24px 24px 0 0;
    bottom: var(--manager-mobile-nav-reserved-height);
    left: 0;
    max-height: min(82dvh, 720px);
    padding: 0.9rem 0.9rem 1rem;
    right: 0;
    top: auto;
    transform: none;
    width: 100%;
  }

  .manager-reservation-modal-head h2 {
    font-size: 1rem;
  }

  .manager-reservation-modal-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .manager-reservation-detail-grid {
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr);
  }

  .manager-reservation-detail-item {
    min-height: 54px;
    padding: 0.65rem 0.72rem;
  }

  .manager-reservation-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .manager-reservation-beds24-link,
  .manager-reservation-secondary {
    width: 100%;
  }

  .manager-reservation-calendar-head {
    display: grid;
    gap: 0.55rem;
  }

  .manager-reservation-calendar-controls {
    justify-content: space-between;
    width: 100%;
  }

  .manager-reservation-calendar-controls .panel-meta-chip {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .manager-reservation-calendar-shell {
    padding: 0.55rem;
  }

  .dashboard-page-shell {
    padding: 0.85rem !important;
  }

  .dashboard-page-shell.dashboard-calendar-page {
    padding-bottom: 0.85rem !important;
  }

  .dashboard-page-shell.dashboard-conversations-page {
    padding: 0 !important;
  }

  .dashboard-page-shell > *,
  .dashboard-page-shell .panel,
  .dashboard-page-shell .ops-checklist-panel,
  .dashboard-page-shell .checklist-editor-shell,
  .dashboard-page-shell .checklist-group-card,
  .dashboard-page-shell .checklist-item-row {
    min-width: 0;
    max-width: 100%;
  }

  .page-hero-head,
  .panel-title-with-meta {
    align-items: flex-start;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .page-toolbar,
  .finance-chip-cluster,
  .dashboard-toolbar-cluster {
    justify-content: flex-start;
    width: 100%;
  }

  .page-meta-chip {
    line-height: 1.2;
    max-width: 100%;
    min-height: 34px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .mnb-page-title {
    font-size: clamp(1.35rem, 7vw, 1.85rem);
    line-height: 1.08;
  }

  .page-subtitle {
    font-size: 0.8rem;
    max-width: none;
  }

  .btn,
  .btn-primary,
  .tab-btn,
  .dashboard-filter-btn,
  .finance-refresh-btn,
  .finance-view-tab,
  .finance-currency-btn,
  .finance-period-preset-btn,
  .ops-payment-action {
    min-height: 38px;
  }

  .mnb-app-content button:not(.sidebar-link):not(.sidebar-toggle-btn) {
    min-height: 36px;
  }

  .conversation-side-panel .dashboard-toolbar-cluster .btn,
  .conversation-side-panel .dashboard-toolbar-cluster .btn-primary {
    min-height: 38px;
    min-width: 38px;
  }

  .field,
  .mnb-input,
  .input,
  .mnb-app-content select {
    min-height: 42px;
  }

  .dashboard-conversations-page {
    background: #f8fafc;
    min-height: 100%;
  }

  .dashboard-mobile-thread-open {
    bottom: 0;
    height: 100%;
    left: 0;
    min-height: 0;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 30;
  }

  .dashboard-mobile-thread-open.dashboard-mobile-composer-focused {
    height: 100%;
  }

  .dashboard-conversations-page .dashboard-shell-conversations {
    display: block;
    gap: 0;
    min-height: inherit;
    overflow: visible;
  }

  .dashboard-mobile-thread-open .dashboard-shell-conversations {
    height: 100%;
    min-height: 0;
  }

  .dashboard-conversations-page .dashboard-conversations-panel {
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    max-height: none;
  }

  .dashboard-conversations-page:not(.dashboard-mobile-thread-open) .dashboard-conversation-thread-panel,
  .dashboard-conversations-page:not(.dashboard-mobile-thread-open) .conversation-side-column,
  .dashboard-mobile-thread-open .dashboard-conversation-list-panel,
  .dashboard-mobile-thread-open .conversation-side-column {
    display: none !important;
  }

  .dashboard-conversation-list-panel,
  .dashboard-conversation-thread-panel {
    min-height: inherit;
  }

  .dashboard-conversation-list-panel {
    background: #f8fafc;
    border-bottom: 0 !important;
    padding-bottom: 1rem;
  }

  .dashboard-conversations-page .dashboard-conversation-list-panel > .dashboard-toolbar:first-child {
    background: #f8fafc;
    gap: 0.62rem;
    margin-top: 0;
    padding: 0.75rem 0.75rem 0.65rem;
  }

  .dashboard-conversation-search {
    background: rgba(255, 255, 255, 0.94);
    border-color: #cbd5e1;
    border-radius: 18px;
    box-shadow: none;
    font-size: 0.94rem;
    font-weight: 700;
    min-height: 44px;
    padding: 0.62rem 0.9rem 0.62rem 2.55rem;
  }

  .dashboard-conversation-search:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  }

  .dashboard-filter-label {
    display: none;
  }

  .dashboard-filter-row {
    gap: 0.45rem;
  }

  .dashboard-filter-btn {
    border-color: #cbd5e1;
    min-height: 42px;
    padding: 0 0.75rem;
  }

  .dashboard-conversation-list {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 0;
    margin: 0 0.75rem 1rem;
    max-height: none;
    overflow: hidden;
    padding: 0;
  }

  .dashboard-conversation-item {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0.88rem 0.75rem;
    transform: none;
  }

  .dashboard-conversation-item + .dashboard-conversation-item {
    border-top: 1px solid #eef2f7;
  }

  .dashboard-conversation-item:hover {
    background: #f8fafc;
    box-shadow: none;
    transform: none;
  }

  .dashboard-conversation-item.conversation-item-active {
    background: #eff6ff;
  }

  .dashboard-conversation-item.conversation-item-active::before {
    display: none;
  }

  .dashboard-conversation-card-head {
    column-gap: 0.62rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .conversation-avatar {
    height: 42px;
    width: 42px;
  }

  .conversation-name {
    font-size: 0.94rem;
  }

  .conversation-listing {
    font-size: 0.74rem;
  }

  .dashboard-conversation-status {
    max-width: 6.5rem;
  }

  .dashboard-conversation-card-head .conversation-preview {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #475569;
    display: -webkit-box;
    font-size: 0.82rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
  }

  .dashboard-conversation-divider {
    display: none;
  }

  .dashboard-conversation-tag-row {
    justify-content: flex-start;
    margin-top: 0.55rem;
  }

  .dashboard-conversation-meta-row {
    color: #94a3b8;
    font-size: 0.74rem;
    gap: 0.4rem 0.65rem;
    margin-top: 0.55rem;
  }

  .dashboard-conversation-meta-separator {
    display: none;
  }

  .dashboard-conversation-thread-panel {
    background: #f8fafc;
    border-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  .dashboard-mobile-thread-open .dashboard-conversation-thread-panel {
    height: 100%;
    min-height: 100%;
  }

  .dashboard-conversation-thread-panel > .dashboard-thread-header {
    align-items: center;
    backdrop-filter: blur(18px);
    background: rgba(248, 250, 252, 0.96);
    border-bottom: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 0.62rem;
    flex: 0 0 auto;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 0.5rem 0.75rem;
    position: sticky;
    top: 0;
    z-index: 55;
  }

  .dashboard-mobile-back-btn {
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    color: #0f172a;
    display: inline-grid;
    font-size: 1.1rem;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    line-height: 1;
    width: 42px;
  }

  .dashboard-conversation-thread-panel .panel-title .dashboard-toolbar-cluster {
    justify-content: flex-end;
    width: auto;
  }

  .dashboard-conversation-thread-panel .panel-title .btn-primary {
    border-radius: 12px;
    font-size: 0.7rem;
    min-height: 38px;
    padding: 0 0.7rem;
  }

  .dashboard-conversation-thread-panel .panel-title .text-slate-500 {
    color: #64748b;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-conversation-thread-panel .conversation-inquiry-chip {
    font-size: 0.58rem;
    min-height: 1.35rem;
    padding: 0.22rem 0.46rem;
  }

  .messages-area {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    -webkit-overflow-scrolling: touch;
    flex: 1 1 0;
    gap: 0.5rem;
    max-height: none;
    min-height: 0;
    overscroll-behavior: contain;
    padding: 0.72rem 0.75rem;
  }

  .dashboard-conversation-thread-panel .dashboard-message-composer {
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
    border-color: rgba(203, 213, 225, 0.9) !important;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.05);
    flex: 0 0 auto;
    max-height: min(58dvh, calc(var(--dashboard-visual-viewport-height, 100dvh) - 108px));
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.65rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .dashboard-message-composer-corner-handle {
    bottom: 5px;
    right: 5px;
  }

  .dashboard-conversation-thread-panel .dashboard-message-composer-textarea {
    border-radius: 14px;
    font-size: 16px;
    height: 112px;
    line-height: 1.42;
    max-height: min(40dvh, 280px);
    min-height: 92px;
    overflow-y: auto;
    resize: none;
  }

  .dashboard-mobile-message-actions {
    display: grid;
    gap: 0.62rem;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0.62rem;
  }

  .dashboard-mobile-action-secondary,
  .dashboard-mobile-action-primary,
  .dashboard-mobile-instruction-generate,
  .dashboard-mobile-draft-voice {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 14px;
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 900;
    justify-content: center;
    min-height: 52px;
    padding: 0 0.9rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  }

  .dashboard-mobile-action-secondary {
    background: #ffffff;
    border-color: #d1d5db;
    color: #111827;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  }

  .dashboard-mobile-action-primary,
  .dashboard-mobile-instruction-generate,
  .dashboard-mobile-draft-voice {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.18);
  }

  .dashboard-mobile-action-secondary:disabled,
  .dashboard-mobile-action-primary:disabled,
  .dashboard-mobile-instruction-generate:disabled,
  .dashboard-mobile-draft-voice:disabled {
    cursor: not-allowed;
    opacity: 0.55;
  }

  .dashboard-mobile-draft-assistant {
    background: #f8fbff;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    display: grid;
    gap: 0.62rem;
    margin-top: 0.78rem;
    padding: 0.72rem;
  }

  .dashboard-mobile-draft-assistant .label {
    color: #172554;
    font-size: 0.72rem;
    font-weight: 900;
    margin: 0;
  }

  .dashboard-mobile-draft-assistant textarea.field {
    background: #ffffff;
    border-radius: 14px;
    max-height: 118px;
    min-height: 64px;
    overflow-y: auto;
    resize: vertical;
  }

  .dashboard-mobile-draft-proposed {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    display: grid;
    gap: 0.45rem;
    padding: 0.62rem;
  }

  .dashboard-mobile-draft-label {
    color: #1d4ed8;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    margin: 0;
    text-transform: uppercase;
  }

  .dashboard-mobile-draft-text {
    color: #172554;
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0;
    max-height: 7.5rem;
    overflow-y: auto;
    white-space: pre-wrap;
  }

  .dashboard-mobile-draft-insert {
    justify-self: start;
  }

  .dashboard-mobile-draft-meta {
    color: #475569;
    display: grid;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    max-height: 4.75rem;
    overflow-y: auto;
  }

  .dashboard-mobile-draft-meta p {
    margin: 0;
  }

  .dashboard-mobile-draft-instruction {
    border-top: 1px solid #dbeafe;
    display: grid;
    gap: 0.58rem;
    padding-top: 0.68rem;
  }

  .dashboard-mobile-instruction-actions {
    display: grid;
    gap: 0.56rem;
    grid-template-columns: minmax(0, 1fr) minmax(7.2rem, 0.35fr);
  }

  .dashboard-mobile-instruction-generate,
  .dashboard-mobile-draft-voice {
    border-radius: 13px;
    font-size: 0.78rem;
    min-height: 48px;
  }

  .dashboard-mobile-draft-voice {
    gap: 0.35rem;
    white-space: nowrap;
  }

  .dashboard-mobile-draft-voice.recording {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.18);
  }

  .dashboard-mobile-draft-status {
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
  }

  .dashboard-mobile-draft-status.pending {
    color: #4338ca;
  }

  .message-bubble {
    border-radius: 14px;
    box-shadow: none;
    max-width: 88%;
    padding: 0.5rem 0.62rem;
  }

  .message-bubble p {
    font-size: 0.78rem;
    line-height: 1.38;
  }

  .message-author {
    font-size: 0.58rem;
    margin-bottom: 0.16rem;
  }

  .message-host {
    background: linear-gradient(135deg, #020617, #111827);
    border-color: #020617;
    color: #ffffff;
  }

  .message-guest {
    background: #ffffff;
    border-color: #e2e8f0;
  }

  .message-image-link {
    max-width: min(240px, 72vw);
  }

  .conversation-side-column {
    gap: 0.85rem;
    overflow: visible;
  }

  .finance-chip-cluster.page-toolbar {
    align-items: flex-start;
  }

  .finance-currency-toggle,
  .finance-view-tabs,
  .playground-mode-switch {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .finance-currency-toggle::-webkit-scrollbar,
  .finance-view-tabs::-webkit-scrollbar,
  .playground-mode-switch::-webkit-scrollbar {
    display: none;
  }

  .playground-mode-switch .btn {
    min-width: 0;
  }

  .ai-replies-library-shell,
  .playground-real-board-shell,
  .playground-summary-rail {
    min-height: auto;
  }

  .ai-replies-fact-drawer {
    height: calc(100dvh - env(safe-area-inset-bottom, 0px));
    max-width: 100vw;
  }

  .ai-replies-fact-drawer-head,
  .ai-replies-fact-drawer-body,
  .ai-replies-fact-drawer-actions {
    padding: 1rem;
  }

  .kb-assist-modal-backdrop {
    align-items: stretch;
    padding: 0.5rem;
  }

  .kb-assist-modal {
    max-height: calc(100dvh - 1rem);
    max-width: calc(100vw - 1rem);
  }

  .team-form-shell button {
    min-width: 36px;
  }

  .fixed.inset-0 button,
  button[class*="p-1"][class*="rounded"] {
    min-width: 36px;
  }

  .ops-checklist-panel .flex.items-center.justify-between,
  .checklist-group-card .flex.items-center.justify-between,
  .checklist-item-row .flex.items-center {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-checklist-panel .flex.items-center.gap-2,
  .checklist-group-card .flex.items-center.gap-2 {
    align-items: stretch;
    flex-wrap: wrap;
    width: 100%;
  }

  .checklist-group-card .flex-1,
  .checklist-item-row .input {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .mnb-app-content {
    padding: 0.6rem;
  }

  .dashboard-page-shell {
    padding: 0.6rem !important;
  }

  .dashboard-page-shell.dashboard-conversations-page {
    padding: 0 !important;
  }

  .panel-title {
    padding-inline: 0.75rem;
  }

  .page-toolbar,
  .finance-chip-cluster,
  .dashboard-filter-row {
    gap: 0.4rem;
  }

  .finance-metrics-grid {
    padding: 0.65rem;
  }

  .finance-refresh-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .dashboard-toolbar {
    padding-inline: 0.65rem;
  }

  .dashboard-conversation-list {
    padding-inline: 0.65rem;
  }
}
