/* Authenticated Kraken admin workspace only. Public and authentication pages are untouched. */
.layout.os-layout-v10 {
  --admin-readable-body: 14px;
  --admin-readable-meta: 12px;
  font-size: 15px;
  line-height: 1.45;
}

.layout.os-layout-v10 :where(p, label, input, select, textarea, button, td, th) {
  font-size: var(--admin-readable-body);
}

.layout.os-layout-v10 :where(
  small,
  .eyebrow,
  .module-tag,
  .field > span,
  .card-meta,
  .row-title > span,
  .key-item > span,
  .badge,
  .column-title,
  .muted
) {
  font-size: var(--admin-readable-meta);
  line-height: 1.4;
}

.layout.os-layout-v10 :where(input, select, textarea) {
  min-height: 42px;
  line-height: 1.35;
}

.layout.os-layout-v10 :where(.btn, .tab) {
  font-size: 14px;
}

/* Navigation, module launchers, and work tabs must remain readable at every density. */
.layout.os-layout-v10 :where(.nav-group-toggle, .nav-item, .nav-subitem) {
  min-height: 40px;
  font-size: 14px;
  line-height: 1.3;
}

.layout.os-layout-v10 .nav-module-node .nav-item > span:not(.module-nav-icon),
.layout.os-layout-v10 .nav-group-toggle > span,
.layout.os-layout-v10 .nav-subitem > span {
  font-size: 14px !important;
  line-height: 1.3 !important;
}

.layout.os-layout-v10 :where(.nav-group-toggle, .nav-item) .icon {
  width: 18px;
  height: 18px;
}

.layout.os-layout-v10 .workspace-tabs {
  min-height: 48px;
  height: 48px;
}

.layout.os-layout-v10 :where(.workspace-tab, .settings-module-tab) {
  min-height: 36px;
  font-size: 13px;
}

.layout.os-layout-v10 .workspace-tab {
  height: 36px !important;
  min-height: 36px !important;
  font-size: 13px !important;
}

.layout.os-layout-v10 .workspace-tab > span {
  font-size: 13px !important;
  line-height: 1.25 !important;
}

.layout.os-layout-v10 .workspace-tab > small {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

.layout.os-layout-v10 .module-shortcuts {
  gap: 10px;
}

.layout.os-layout-v10 .module-shortcut {
  min-height: 64px;
  padding: 10px 12px;
}

.layout.os-layout-v10 .module-shortcut strong,
.layout.os-layout-v10 :where(.site-module-name, .settings-module-card) strong {
  font-size: 14px;
  line-height: 1.35;
}

.layout.os-layout-v10 .module-shortcut small,
.layout.os-layout-v10 .site-module-copy > small {
  font-size: 12px;
  line-height: 1.4;
}

.layout.os-layout-v10 .site-module-row {
  min-height: 76px;
  padding: 14px 16px;
}

/* The panel is rendered as a shell-level portal so modal blur never obscures it. */
.layout.os-layout-v10 > .notification-center {
  z-index: 21000;
  filter: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  isolation: isolate;
}

.layout.os-layout-v10 > .notification-center :where(strong, span, small, button) {
  filter: none;
}

.layout.os-layout-v10 .notification-center-copy strong {
  font-size: 14px;
}

.layout.os-layout-v10 .notification-center-copy span {
  font-size: 13px;
}

.layout.os-layout-v10 .notification-center-copy small {
  font-size: 12px;
}

.layout.os-layout-v10 .drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.layout.os-layout-v10 .drawer :is(input, select, textarea, button, .btn),
.layout.os-layout-v10 .drawer .field > span,
.layout.os-layout-v10 .drawer .field > span > small {
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.layout.os-layout-v10 .drawer :is(input, select, textarea, button, .btn) {
  min-height: 42px !important;
}

.layout.os-layout-v10 .drawer textarea[name="email_body"] {
  min-height: 108px !important;
}

.layout.os-layout-v10 .detail-hero h2,
.layout.os-layout-v10 .panel-header h2 {
  font-size: 20px;
  line-height: 1.25;
}

.layout.os-layout-v10 :where(.workflow-card, .deal-card, .task-card) h3 {
  font-size: 15px;
  line-height: 1.35;
}

.layout.os-layout-v10 .topbar strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Keep the pipeline full width. The selected record becomes a closeable floating inspector. */
@media (min-width: 1101px) {
  .layout.os-layout-v10 .board-split:not(.split-page-wide) {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .layout.os-layout-v10 .board-split:not(.split-page-wide) > .lane-board-panel {
    grid-column: 1;
    min-width: 0;
  }

  .layout.os-layout-v10 .board-split:not(.split-page-wide) > .context-panel.lane-detail-panel {
    container: admin-detail / inline-size;
    position: fixed;
    top: auto;
    right: 18px;
    bottom: 18px;
    z-index: 138;
    width: min(360px, calc(100vw - var(--sidebar) - 36px));
    height: min(72dvh, 720px);
    max-height: calc(100dvh - var(--topbar) - 36px);
    border-radius: 16px;
    box-shadow: 0 24px 72px rgba(15, 23, 42, 0.24), 0 6px 18px rgba(15, 23, 42, 0.12);
  }

  .layout.os-layout-v10 .board-split:not(.split-page-wide) > .context-panel.lane-detail-panel .panel-body {
    max-height: none;
    padding: 16px 16px 72px;
  }
}

.layout.os-layout-v10 .lane-detail-panel {
  container: admin-detail / inline-size;
}

.layout.os-layout-v10 .lane-detail-panel .panel-header {
  gap: 12px;
  padding: 16px;
}

.layout.os-layout-v10 .lane-detail-panel .row-actions {
  min-width: 0;
  max-width: 100%;
}

.layout.os-layout-v10 .lane-detail-panel .detail-close {
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 40px;
}

.layout.os-layout-v10 .lane-detail-panel .tab-row {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.layout.os-layout-v10 .lane-detail-panel :where(.field, input, select, textarea, .key-item, .quick-actions) {
  min-width: 0;
  max-width: 100%;
}

.layout.os-layout-v10 .lane-detail-panel :where(input, select, textarea) {
  width: 100%;
}

.layout.os-layout-v10 .lane-detail-panel .key-item {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.layout.os-layout-v10 .lane-detail-panel .key-item strong {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@container admin-detail (max-width: 430px) {
  .form-grid,
  .finance-pill-row,
  .connection-grid,
  .metric-grid,
  .checklist-grid,
  .client-account-lists {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }
}

/* On tablets and phones, put the selected record before the board instead of beside it. */
@media (max-width: 1100px) {
  .layout.os-layout-v10 .board-split:not(.split-page-wide) {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .layout.os-layout-v10 .board-split:not(.split-page-wide) > .context-panel.lane-detail-panel {
    position: relative;
    top: auto;
    order: -1;
    width: 100%;
    height: auto;
    max-height: min(68dvh, 720px);
    border-radius: 14px;
  }

  .layout.os-layout-v10 .board-split:not(.split-page-wide) > .context-panel.lane-detail-panel .panel-body {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .layout.os-layout-v10 {
    --admin-readable-body: 15px;
    --admin-readable-meta: 13px;
  }

  .layout.os-layout-v10 .lane-detail-panel .panel-header,
  .layout.os-layout-v10 .lane-detail-panel .panel-body {
    padding-inline: 12px;
  }
}
