:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #059669;
  --tf-brand-900: #083f34;
  --tf-brand-800: #0b5645;
  --tf-brand-700: #0f6e56;
  --tf-brand-600: #138a6b;
  --tf-brand-100: #dff4ec;
  --tf-brand-50: #f1faf7;
  --tf-navy-900: #10233f;
  --tf-navy-700: #254266;
  --tf-surface: #ffffff;
  --tf-surface-soft: #f7faf9;
  --tf-border: #dce8e4;
  --tf-text: #17242f;
  --tf-text-muted: #64748b;
  --color-background-info: #dbeafe;
  --color-text-info: #1d4ed8;
  --layout-gap-sm: 0.5rem;
  --layout-gap-md: 0.75rem;
  --layout-gap-lg: 1rem;
  --layout-gap-xl: 1.5rem;
  --layout-pad-page: 1.5rem;
  --layout-pad-card: 1rem;
  --layout-radius: 0.9rem;
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 20px;
  --ui-space-6: 24px;
  --ui-space-8: 32px;
  --ui-text-xs: 12px;
  --ui-text-sm: 14px;
  --ui-text-md: 16px;
  --ui-title-sm: 18px;
  --ui-title-md: 20px;
  --ui-radius-sm: 10px;
  --ui-radius-md: 12px;
  --ui-radius-lg: 16px;
  --ui-radius-xl: 20px;
  --ui-control-sm: 40px;
  --ui-control-md: 44px;
  --ui-control-lg: 48px;
  --ui-modal-sm: 680px;
  --ui-modal-md: 920px;
  --ui-modal-lg: 1120px;
  --ui-z-dropdown: 40;
  --ui-z-sticky: 50;
  --ui-z-overlay: 80;
  --ui-z-modal: 90;
  --ui-z-toast: 100;
  --ui-color-surface: var(--panel);
  --ui-color-surface-muted: #f8fafc;
  --ui-color-overlay: rgba(15, 23, 42, 0.55);
  --ui-color-border: var(--line);
  --ui-color-border-strong: #cdd9d3;
  --ui-color-text: var(--text);
  --ui-color-muted: var(--muted);
  --ui-color-brand: var(--brand);
  --ui-color-brand-strong: #047857;
  --ui-color-danger: #b91c1c;
  --ui-shadow-card: 0 8px 32px rgba(15, 23, 42, 0.04);
  --ui-shadow-modal: 0 22px 70px rgba(15, 23, 42, 0.18);
  --ui-shadow-floating: 0 18px 36px rgba(15, 23, 42, 0.16);
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98)),
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.08), transparent 34%);
  color: var(--text);
}

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

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.ui-modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

.nav-item,
.icon-button,
.secondary-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar {
  width: 16rem;
  min-width: 16rem;
  position: relative;
  border-right-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(9, 33, 39, 0.98), rgba(11, 55, 60, 0.98)),
    radial-gradient(circle at top left, rgba(61, 233, 184, 0.16), transparent 38%);
  color: #e6f6f1;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
  transition: width 0.18s ease, min-width 0.18s ease;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 18px 16px auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(91, 226, 177, 0), rgba(91, 226, 177, 0.26), rgba(91, 226, 177, 0));
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  position: relative;
}

.sidebar-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar-header .brand-text {
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar-brand-mark {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, #10b981, #0f766e) !important;
  box-shadow: 0 18px 28px rgba(5, 150, 105, 0.22);
}

.sidebar-brand-mark span {
  position: relative;
  z-index: 1;
}

.sidebar-brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.sidebar .brand-text .text-sm,
.sidebar .brand-text .text-xs,
.sidebar .session-card,
.sidebar .session-card * {
  color: inherit;
}

.sidebar .brand-text .text-sm {
  color: #f8fffd;
}

.sidebar .brand-text .text-xs {
  color: rgba(216, 244, 235, 0.76);
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: #d8f4eb;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  position: relative;
  z-index: 20;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .sidebar-toggle {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}

.sidebar-toggle:focus-visible {
  outline: 2px solid rgba(91, 226, 177, 0.35);
  outline-offset: 2px;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-item {
  width: 100%;
  justify-content: flex-start;
  min-height: 44px;
  padding: 0.8rem 0.95rem;
  color: rgba(226, 247, 241, 0.82);
  background: transparent;
  border-color: transparent;
}

.nav-label {
  display: inline-flex;
  min-width: 0;
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0.75rem;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

.sidebar-nav-group {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.3rem;
  height: auto;
  min-height: 0;
}

.sidebar-nav-group + .sidebar-nav-group {
  margin-top: 0;
  padding-top: 0.9rem;
}

.sidebar-nav-group + .sidebar-nav-group::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0.35rem;
  right: 0.35rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(164, 230, 207, 0.22), rgba(255, 255, 255, 0));
}

.sidebar-group-toggle {
  width: 100%;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem 0.35rem;
  border: 0;
  background: transparent;
  color: rgba(216, 244, 235, 0.72);
  text-align: left;
  cursor: pointer;
  border-radius: 0.85rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-group-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f4fff9;
}

.sidebar-group-toggle:focus-visible {
  outline: 2px solid rgba(91, 226, 177, 0.35);
  outline-offset: 2px;
}

.sidebar-group-title {
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-group-chevron {
  width: 0.65rem;
  height: 0.65rem;
  flex-shrink: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.sidebar-nav-group.is-collapsed .sidebar-group-chevron {
  transform: rotate(-45deg);
}

.sidebar-nav-group-items {
  display: grid;
  grid-template-rows: 1fr;
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  opacity: 1;
  transition: grid-template-rows 0.18s ease, opacity 0.18s ease;
}

.sidebar-nav-group.is-collapsed .sidebar-nav-group-items {
  grid-template-rows: 0fr;
  opacity: 0;
}

.sidebar-nav-group-items-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.3rem;
}

.nav-item {
  flex: 0 0 auto;
  height: auto;
}

.nav-item i,
.nav-item svg {
  color: rgba(231, 249, 243, 0.9);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f5fffb;
}

.nav-item.active {
  color: #f4fff9;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.92), rgba(15, 118, 110, 0.95));
  border-color: rgba(167, 243, 208, 0.22);
  box-shadow: 0 10px 24px rgba(4, 120, 87, 0.24);
}

.icon-button {
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-color: rgba(148, 163, 184, 0.22);
  background: #ffffff;
  color: #334155;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.icon-button:hover,
.secondary-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.nav-item:disabled,
.icon-button:disabled,
.secondary-button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.sidebar.sidebar-collapsed {
  width: 76px;
  min-width: 76px;
}

.sidebar.sidebar-collapsed .brand-text,
.sidebar.sidebar-collapsed .nav-label,
.sidebar.sidebar-collapsed .sidebar-group-toggle,
.sidebar.sidebar-collapsed .session-card {
  display: none;
}

.sidebar.sidebar-collapsed .nav-item {
  justify-content: center;
}

body.sidebar-is-collapsed .sidebar {
  width: 76px;
  min-width: 76px;
}

body.sidebar-is-collapsed .sidebar .brand-text,
body.sidebar-is-collapsed .sidebar .nav-label,
body.sidebar-is-collapsed .sidebar .sidebar-group-toggle,
body.sidebar-is-collapsed .sidebar .session-card {
  display: none;
}

body.sidebar-is-collapsed .sidebar .nav-item {
  justify-content: center;
}

.sidebar.sidebar-collapsed .sidebar-nav,
body.sidebar-is-collapsed .sidebar .sidebar-nav {
  gap: 0.65rem;
}

.sidebar.sidebar-collapsed .sidebar-nav-group,
body.sidebar-is-collapsed .sidebar .sidebar-nav-group {
  gap: 0;
}

.sidebar.sidebar-collapsed .sidebar-nav-group + .sidebar-nav-group,
body.sidebar-is-collapsed .sidebar .sidebar-nav-group + .sidebar-nav-group {
  padding-top: 0.75rem;
}

.sidebar .session-card {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.sidebar .session-card > div {
  border-color: rgba(204, 251, 241, 0.14) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar .session-card .text-xs {
  color: rgba(216, 244, 235, 0.68) !important;
}

.sidebar #current-user-name {
  color: #f5fffb;
}

.sidebar #current-user-role {
  color: rgba(216, 244, 235, 0.72) !important;
}

.app-main-shell {
  background:
    linear-gradient(180deg, rgba(244, 249, 247, 0.96), rgba(247, 250, 249, 0.98)),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 28%);
}

.app-topbar {
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
  background: rgba(248, 251, 250, 0.88) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.app-topbar-inner {
  min-height: 82px;
}

.app-topbar-context h1 {
  color: #10233f;
  letter-spacing: -0.03em;
}

.app-topbar-kicker {
  color: #0f6e56 !important;
  font-weight: 700;
}

.app-topbar-description {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.app-topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.app-topbar-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.18), rgba(37, 99, 235, 0.12));
  color: #0f6e56;
}

.app-topbar-user-copy {
  display: grid;
  min-width: 0;
}

.app-topbar-user-copy strong {
  max-width: 12rem;
  overflow: hidden;
  color: #10233f;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-topbar-user-copy span {
  max-width: 12rem;
  overflow: hidden;
  color: #64748b;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secondary-button,
.primary-button {
  padding: 0.7rem 1rem;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
}

.secondary-button {
  border-color: rgba(148, 163, 184, 0.2);
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.secondary-button.danger {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}

.primary-button {
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff;
  box-shadow: 0 14px 26px rgba(5, 150, 105, 0.22);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.icon-button:focus-visible,
.nav-item:focus-visible,
.tf-dashboard-icon-button:focus-visible,
.tf-dashboard-new-job:focus-visible,
.tf-dashboard-search input:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.28);
  outline-offset: 2px;
}

.view.hidden {
  display: none;
}

.view {
  min-width: 0;
  padding: var(--layout-pad-page) !important;
}

.hidden {
  display: none !important;
}

body > .flex {
  min-width: 0;
}

main {
  min-width: 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--layout-radius);
  background: var(--panel);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.04);
  padding: var(--layout-pad-card);
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--layout-gap-md);
  margin-bottom: var(--layout-gap-lg);
  min-width: 0;
}

.panel-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--layout-radius);
  background: var(--panel);
  padding: var(--layout-pad-card);
  min-width: 0;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.metric-value {
  margin-top: 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.dashboard-filters-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .dashboard-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dashboard-custom-dates {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .dashboard-custom-dates {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dashboard-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.dashboard-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.dashboard-legend-swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75);
}

.dashboard-chart {
  position: relative;
  min-height: 320px;
}

.dashboard-chart canvas {
  width: 100% !important;
  height: 320px !important;
}

.dashboard-funnel {
  display: grid;
  gap: 1rem;
}

.dashboard-funnel-row {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
}

.dashboard-funnel-meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-funnel-stage {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-funnel-stage-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #0f6e56;
  font-size: 0.78rem;
  font-weight: 700;
}

.dashboard-funnel-metrics {
  min-width: 7rem;
}

.dashboard-funnel-track {
  height: 0.875rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.dashboard-funnel-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #0f766e);
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.22);
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table thead th {
  padding: 0 1rem 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}

.dashboard-table thead th button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.dashboard-table tbody td {
  border-bottom: 1px solid var(--line);
}

.dashboard-shell {
  display: grid;
  gap: 1rem;
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 58%, #eefbf6 100%);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.dashboard-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dashboard-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #334155;
  font-size: 0.75rem;
  font-weight: 650;
}

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

@media (min-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(20rem, 0.8fr);
  }
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 0.85rem;
}

.dashboard-kpi-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  min-height: 9.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  border-color: rgba(148, 163, 184, 0.26);
}

.dashboard-kpi-icon {
  display: inline-flex;
  width: 2.2rem;
  height: 2.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  background: #ecfdf5;
  color: var(--brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.dashboard-kpi-content {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.dashboard-kpi-label,
.dashboard-kpi-context {
  color: var(--muted);
  font-size: 0.78rem;
}

.dashboard-kpi-value {
  color: var(--text);
  font-size: 1.85rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.dashboard-kpi-delta {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: normal;
}

.dashboard-kpi-delta.positive {
  background: #ecfdf5;
  color: #047857;
  border-color: rgba(16, 185, 129, 0.18);
}

.dashboard-kpi-delta.negative {
  background: #fff1f2;
  color: #be123c;
  border-color: rgba(244, 63, 94, 0.16);
}

.dashboard-kpi-card--emerald .dashboard-kpi-icon {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.18);
}

.dashboard-kpi-card--blue .dashboard-kpi-icon {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.18);
}

.dashboard-kpi-card--violet .dashboard-kpi-icon {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.18);
}

.dashboard-kpi-card--amber .dashboard-kpi-icon {
  color: #c2410c;
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.18);
}

.dashboard-kpi-card--teal .dashboard-kpi-icon {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.18);
}

.dashboard-skeleton-card {
  min-height: 9.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f8fafc 63%);
  background-size: 400% 100%;
  animation: dashboard-shimmer 1.35s ease infinite;
}

@keyframes dashboard-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.dashboard-chart.is-empty canvas {
  opacity: 0.18;
}

.dashboard-source-row,
.dashboard-ranking-row,
.dashboard-interview-row,
.dashboard-alert-row,
.dashboard-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
}

.dashboard-source-row:last-child,
.dashboard-ranking-row:last-child,
.dashboard-interview-row:last-child,
.dashboard-alert-row:last-child,
.dashboard-summary-row:last-child {
  border-bottom: 0;
}

.dashboard-source-row strong,
.dashboard-ranking-row strong,
.dashboard-interview-row strong,
.dashboard-summary-row strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
}

.dashboard-source-row span,
.dashboard-ranking-row small,
.dashboard-interview-row span,
.dashboard-summary-row span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.dashboard-source-bar {
  flex: 0 0 min(38%, 10rem);
  height: 0.48rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.dashboard-source-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #059669, #2563eb);
}

.dashboard-alert-row {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
}

.dashboard-alert-row.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.dashboard-alert-row.critical {
  border-color: #fecdd3;
  background: #fff1f2;
}

.dashboard-alert-row strong {
  color: var(--text);
  font-size: 1rem;
}

.dashboard-click-row,
.dashboard-ranking-row,
.dashboard-interview-row {
  cursor: pointer;
}

.dashboard-click-row:hover,
.dashboard-ranking-row:hover,
.dashboard-interview-row:hover,
.dashboard-alert-row:hover {
  background: #f8fafc;
}

.dashboard-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
}

.dashboard-ranking-main {
  min-width: 0;
  flex: 1;
}

.dashboard-ranking-score {
  display: grid;
  justify-items: end;
  gap: 0.25rem;
}

.dashboard-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
}

.dashboard-badge.hot {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.dashboard-badge.warm {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.dashboard-badge.cold {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.dashboard-badge.status-open,
.dashboard-badge.status-active {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.dashboard-badge.status-paused,
.dashboard-badge.status-talent_pool {
  border-color: #fde68a;
  background: #fffbeb;
  color: #a16207;
}

.dashboard-badge.status-closed,
.dashboard-badge.status-cancelled,
.dashboard-badge.status-rejected {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

@media (max-width: 768px) {
  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-hero-meta {
    justify-content: flex-start;
  }

  .dashboard-source-row,
  .dashboard-interview-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-source-bar {
    flex-basis: auto;
    width: 100%;
  }
}

.field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.field > span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.75rem 0.875rem;
  font: inherit;
  color: var(--text);
  box-sizing: border-box;
  min-width: 0;
}

.field textarea {
  min-height: 6rem;
  max-height: 16rem;
  resize: vertical;
  overflow-y: auto;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.list-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  min-width: 0;
}

.list-row + .list-row {
  border-top: 1px solid var(--line);
}

.conversation-row {
  display: block;
  position: relative;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  min-width: 0;
}

.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  flex: 0 0 auto;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
  min-width: 0;
  scrollbar-gutter: stable;
}

#view-conversations {
  height: calc(100dvh - 73px);
  min-height: calc(100dvh - 73px);
  box-sizing: border-box;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  overflow: hidden;
}

#view-conversations > .conversation-layout {
  height: 100%;
  align-items: stretch;
  min-width: 0;
}

.conversation-sidebar,
.conversation-panel {
  min-height: 0;
  height: 100%;
  min-width: 0;
}

.conversation-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.8rem;
}

.conversation-sidebar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.conversation-sidebar-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 15;
  display: grid;
  gap: 0.25rem;
  min-width: 180px;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.conversation-sidebar-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  color: #334155;
  text-align: left;
}

.conversation-sidebar-menu-item:hover {
  background: #f8fafc;
}

.conversation-toolbar {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.conversation-toolbar-compact {
  align-items: stretch;
}

.conversation-toolbar-row {
  display: flex;
  align-items: end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.conversation-search-field {
  width: 100%;
  min-width: min(100%, 320px);
}

.conversation-filter-field {
  flex: 1 1 auto;
  min-width: 0;
  min-width: 170px;
}

#conversation-department-filter-wrapper {
  min-width: 210px;
}

#conversation-department-filter-wrapper[hidden] {
  display: none !important;
}

.conversation-filter-count {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #f8fafc;
  padding: 0.45rem 0.55rem;
  min-width: 78px;
  text-align: right;
}

.conversation-panel-header {
  align-items: flex-start;
}

#conversation-detail-status {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.25rem;
  min-width: 0;
}

.conversation-detail-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
}

.conversation-header-contact {
  flex-wrap: nowrap;
  align-items: center;
}

.conversation-header-identity {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 180px;
}

.conversation-header-identity .conversation-detail-meta {
  font-size: 0.78rem;
  line-height: 1.2;
}

.conversation-detail-meta-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.25;
  color: #475569;
}

.conversation-detail-meta-item strong {
  color: #334155;
}

.conversation-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}

.secondary-button-compact {
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
}

.conversation-icon-button {
  min-width: 2.3rem;
  min-height: 2.3rem;
}

.conversation-row .list-row {
  align-items: stretch;
}

.conversation-row-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.42rem;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.95rem;
  background: #fff;
  padding: 0.42rem 0.52rem;
  min-height: 72px;
}

.conversation-avatar {
  display: inline-flex;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, #d1fae5, #e0f2fe);
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.conversation-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conversation-avatar-header {
  width: 2.65rem;
  height: 2.65rem;
}

.conversation-avatar-large {
  width: 4rem;
  height: 4rem;
  font-size: 1.1rem;
}

.conversation-row-main {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.conversation-row-title-group {
  gap: 0.03rem;
}

.conversation-row:hover .conversation-row-body {
  background: #f8fafc;
}

.conversation-row.selected .conversation-row-body {
  background: #f4fbf7;
  border-color: rgba(187, 247, 208, 0.78);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.05);
}

.conversation-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  min-width: 0;
}

.conversation-row-top > .min-w-0 {
  min-width: 0;
  flex: 1;
}

.conversation-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row-title-group {
  display: grid;
  gap: 0.04rem;
  min-width: 0;
}

.conversation-meta,
.conversation-time,
.conversation-status {
  font-size: 0.7rem;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-status.blocked,
.badge.blocked {
  background: #fee2e2;
  color: #991b1b;
}

.badge-status-open {
  background: var(--color-background-info);
  color: var(--color-text-info);
}

.badge-status-closed {
  background: #f1f5f9;
  color: #475569;
}

.conversation-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
}

.conversation-row-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  min-width: 0;
  flex-wrap: nowrap;
}

.conversation-row-snippet {
  display: flex;
  align-items: center;
  gap: 0.24rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.conversation-secondary-meta {
  font-size: 0.72rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
}

.conversation-snippet-separator {
  flex: 0 0 auto;
  color: #94a3b8;
}

.conversation-preview {
  margin: 0;
  font-size: 0.76rem;
  color: #334155;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  min-width: 0;
  flex: 1 1 auto;
}

.conversation-row-badges {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.3rem;
  min-width: 0;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.conversation-row-badges .badge,
.conversation-row-badges .chip,
.conversation-row-badges .conversation-label-chip,
.conversation-row-badges .conversation-unread-count {
  max-width: 100%;
}

.conversation-row-badges .badge,
.conversation-row-badges .conversation-unread-count,
.conversation-row-badges .conversation-label-chip {
  flex: 0 0 auto;
}

.conversation-unread-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0 0.28rem;
}

.conversation-row-badges .conversation-label-chip {
  padding: 0.16rem 0.38rem;
  font-size: 0.64rem;
}

.conversation-row-badges .badge {
  padding: 0.18rem 0.44rem;
  font-size: 0.66rem;
}

.conversation-search-field .field,
.conversation-search-field input {
  min-height: 2.4rem;
}

.conversation-search-field input,
.conversation-toolbar select {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.84rem;
}

.conversation-filter-field span,
.conversation-search-field span {
  font-size: 0.68rem;
}

.conversation-filter-count .text-lg,
.conversation-filter-count #conversation-filter-count {
  font-size: 0.92rem;
  line-height: 1;
}

.conversation-filter-count .text-xs {
  font-size: 0.68rem;
}

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

.conversation-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.conversation-panel > .panel-header {
  flex: 0 0 auto;
  margin-bottom: 0;
  padding: 0.85rem 0.9rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.conversation-thread {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem;
  overflow: hidden;
}

.evolution-instance-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
}

.evolution-instance-main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 0.45rem;
}

.evolution-instance-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.evolution-instance-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.evolution-instance-meta {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-word;
}

.evolution-instance-meta-grid {
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  font-size: 0.8rem;
  color: #334155;
}

.evolution-instance-meta-grid span {
  font-weight: 700;
  color: #475569;
}

.evolution-instance-badges,
.evolution-instance-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.evolution-instance-actions {
  flex-shrink: 0;
  max-width: 290px;
}

.evolution-instance-actions .secondary-button {
  padding: 0.5rem 0.7rem;
  font-size: 0.75rem;
}

.conversation-cleanup-checkbox {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: #f8fafc;
  padding: 0.75rem 0.85rem;
  font-size: 0.85rem;
  color: #334155;
}

.conversation-cleanup-checkbox input {
  margin: 0;
}

.evolution-qr-details {
  max-width: 100%;
  word-break: break-word;
}

.evolution-modal-shell {
  width: min(1200px, calc(100vw - 32px));
  max-width: 1200px;
}

.evolution-modal-header {
  border-bottom: 1px solid #e2e8f0;
}

.evolution-modal-close {
  flex-shrink: 0;
}

.evolution-modal-body {
  overflow: auto;
  background: #fff;
}

.evolution-connect-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.4fr) minmax(0, 0.6fr);
  gap: 1.25rem;
  align-items: start;
}

.evolution-connect-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.evolution-connect-card {
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.evolution-qr-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 46%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.evolution-qr-frame {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.evolution-qr-surface {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
}

.evolution-qr-image {
  display: block;
  width: min(100%, 320px);
  max-width: 320px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 1rem;
}

.evolution-qr-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 260px;
  padding: 1.25rem;
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
}

.evolution-modal-meta {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.5;
  word-break: break-word;
}

.evolution-instance-identity {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  color: #0f172a;
}

.evolution-instance-identity strong {
  font-size: 1.05rem;
  line-height: 1.35;
}

.evolution-instance-identity span {
  color: #64748b;
  font-size: 0.92rem;
}

.evolution-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 36px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.evolution-status-badge-connected {
  background: #dcfce7;
  color: #166534;
}

.evolution-status-badge-waiting {
  background: #ffedd5;
  color: #c2410c;
}

.evolution-status-badge-connecting {
  background: #dbeafe;
  color: #1d4ed8;
}

.evolution-status-badge-disconnected,
.evolution-status-badge-error {
  background: #f1f5f9;
  color: #475569;
}

.evolution-status-badge-error {
  background: #fee2e2;
  color: #b91c1c;
}

.evolution-qr-refresh-button,
.evolution-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 48px;
}

.evolution-button-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
}

.evolution-button-icon svg {
  width: 100%;
  height: 100%;
}

.evolution-instructions-card,
.evolution-status-card,
.evolution-settings-card {
  padding: 1.25rem;
}

.evolution-section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

.evolution-section-heading h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 700;
}

.evolution-section-heading p {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.evolution-steps-grid {
  display: grid;
  gap: 0.85rem;
}

.evolution-step-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.evolution-step-card p {
  margin: 0;
  color: #1e293b;
  font-size: 0.94rem;
  line-height: 1.45;
}

.evolution-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 800;
}

.evolution-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 80%);
}

.evolution-status-copy {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.55;
}

.evolution-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.22);
  flex-shrink: 0;
}

.evolution-status-icon svg {
  width: 1.8rem;
  height: 1.8rem;
}

.evolution-modal-actions-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.evolution-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.evolution-settings-form .conversation-cleanup-checkbox,
.evolution-settings-form .conversation-transfer-modal-footer {
  grid-column: 1 / -1;
}

.evolution-settings-footer {
  padding-top: 0.35rem;
}

.conversation-thread {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 0.75rem;
}

.jobs-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  min-width: 0;
}

.users-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px)) minmax(0, 1fr);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  min-width: 0;
}

.talent-pool-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(150px, 0.8fr)) minmax(150px, 0.9fr);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  min-width: 0;
}

.jobs-summary-box {
  display: grid;
  justify-items: end;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #f8fafc;
  padding: 0.85rem 1rem;
  min-height: 100%;
  min-width: 0;
}

.users-summary-box {
  display: grid;
  justify-items: end;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #f8fafc;
  padding: 0.85rem 1rem;
  min-height: 100%;
  min-width: 0;
}

.talent-pool-summary-box {
  display: grid;
  justify-items: end;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #f8fafc;
  padding: 0.85rem 1rem;
  min-height: 100%;
  min-width: 0;
}

.organization-grid {
  align-items: stretch;
  min-height: 0;
}

#view-organization {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 7.5rem);
  overflow: hidden;
}

.organization-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.organization-panel .panel-header {
  align-items: flex-start;
  gap: 0.75rem;
}

.organization-panel .panel-header .panel-title {
  line-height: 1.1;
}

.organization-panel .panel-header .secondary-button,
.organization-panel .panel-header .primary-button {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.organization-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
}

.organization-status {
  min-height: 1.1rem;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: #64748b;
}

.organization-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
  margin-top: 0.5rem;
}

.organization-row {
  gap: 0.55rem;
  padding: 0.72rem 0.8rem;
}

.organization-row-main {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.organization-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.organization-row-description {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #475569;
}

.organization-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.organization-row .users-row-title {
  font-size: 0.92rem;
  line-height: 1.2;
}

.organization-row .badge {
  white-space: nowrap;
}

.organization-row-actions {
  gap: 0.35rem;
}

.organization-row-actions .secondary-button {
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
}

.jobs-list {
  display: grid;
  gap: 0.75rem;
}

.jobs-row {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 0.95rem 1rem;
  min-width: 0;
}

.jobs-row:hover {
  background: #f8fafc;
}

.jobs-row.selected {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.12);
  background: #f0fdf4;
}

.jobs-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem;
}

.jobs-row-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.jobs-row-subtitle,
.jobs-row-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.jobs-row-operational {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.45;
}

.jobs-row-meta-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-top: 0.6rem;
}

.jobs-row-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.jobs-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 0.45rem;
  min-width: 0;
}

.users-list {
  display: grid;
  gap: 0.75rem;
}

.users-row {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 0.95rem 1rem;
  min-width: 0;
}

.users-row:hover {
  background: #f8fafc;
}

.users-row.selected {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.12);
  background: #f0fdf4;
}

.users-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem;
}

.users-row-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.users-row-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.users-row-meta-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-top: 0.6rem;
}

.users-row-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.users-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 0.45rem;
  min-width: 0;
}

.talent-pool-list {
  display: grid;
  gap: 0.75rem;
}

.talent-pool-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  min-width: 0;
}

.talent-pool-card.selected {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.12);
  background: #f0fdf4;
}

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

.talent-pool-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.talent-pool-card-meta,
.talent-pool-card-summary,
.talent-pool-card-notes {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.talent-pool-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.talent-pool-card-summary {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

.talent-pool-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.talent-pool-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.conversation-message-stack {
  display: grid;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 0.35rem 0.2rem 0.2rem;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 1)),
    linear-gradient(180deg, rgba(5, 150, 105, 0.03), transparent 28%);
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 1rem;
}

.message-bubble {
  display: inline-grid;
  width: fit-content;
  gap: 0.35rem;
  max-width: min(60%, 700px);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: #f8fafc;
  padding: 0.78rem 0.9rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  min-width: 0;
}

.message-bubble.inbound {
  justify-self: start;
  width: fit-content;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.message-bubble.outbound {
  justify-self: end;
  width: fit-content;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
}

.message-bubble.system {
  justify-self: center;
  max-width: 72%;
  width: fit-content;
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.message-bubble.internal {
  justify-self: center;
  width: min(72%, 760px);
  max-width: 72%;
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: none;
  padding: 0.65rem 0.8rem;
}

.message-bubble-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.message-bubble-head-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
  margin-left: auto;
}

.message-bubble-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #0f766e;
  line-height: 1;
}

.message-bubble.outbound .message-bubble-label {
  color: #047857;
}

.message-bubble.system .message-bubble-label {
  color: #475569;
}

.message-bubble.internal .message-bubble-label {
  color: #475569;
}

.message-bubble-time {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.message-bubble-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.message-bubble-status.sent {
  background: #dcfce7;
  color: #166534;
}

.message-bubble-status.failed {
  background: #fee2e2;
  color: #991b1b;
}

.message-bubble-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.message-bubble-content {
  white-space: pre-wrap;
  font-size: 0.875rem;
  line-height: 1.42;
  color: var(--text);
  word-break: break-word;
}

.message-internal-note {
  justify-self: center;
  display: grid;
  gap: 0.35rem;
  width: min(72%, 760px);
  max-width: 72%;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.message-internal-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.message-internal-note-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  padding: 0.22rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.message-internal-note-content {
  font-size: 0.875rem;
  line-height: 1.42;
  color: #334155;
  word-break: break-word;
}

.empty-state {
  padding: 1.2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 1rem;
  background: #fafafa;
}

.empty-state.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.list-title {
  margin: 0;
  font-weight: 600;
}

.list-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.candidates-toolbar {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  min-width: 0;
}

.candidate-search-field {
  width: min(720px, 100%);
}

.candidate-search-field input {
  min-height: 2.75rem;
  padding-block: 0.625rem;
  background: #fff;
}

.candidates-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  min-width: 0;
}

.candidates-table-head,
.candidate-row {
  display: grid;
  grid-template-columns:
    minmax(190px, 1.25fr)
    minmax(124px, 0.85fr)
    minmax(104px, 0.7fr)
    minmax(140px, 0.9fr)
    minmax(150px, 1fr)
    minmax(124px, 0.8fr)
    minmax(300px, 1.35fr);
  gap: 0.625rem;
  align-items: center;
  min-width: 1150px;
}

.candidates-table-head {
  padding: 0.65rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.candidate-row {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.candidate-row:last-child {
  border-bottom: 0;
}

.candidate-row:hover,
.candidate-row:focus-visible {
  background: #f8fafc;
}

.candidate-row:focus-visible {
  outline: 2px solid rgba(5, 150, 105, 0.3);
  outline-offset: -2px;
}

.candidate-cell {
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--text);
}

.candidate-cell-name {
  display: grid;
  gap: 0.1rem;
}

.candidate-cell-phone,
.candidate-cell-stage,
.candidate-cell-role,
.candidate-cell-updated {
  color: var(--muted);
}

.candidate-cell-status {
  justify-self: start;
}

.candidate-actions-cell {
  display: flex;
  justify-content: flex-end;
}

.candidate-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: 0;
}

.candidate-actions .secondary-button-compact {
  min-height: 2rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.75rem;
  line-height: 1.15;
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: #ecfeff;
  color: #0f766e;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.badge-neutral {
  background: #ecfeff;
  color: #0f766e;
}

.badge-status-info {
  background: #e0f2fe;
  color: #0f4c81;
}

.badge-status-warning {
  background: #fef3c7;
  color: #9a5b08;
}

.badge-status-danger {
  background: #fee2e2;
  color: #b42318;
}

.badge-hot,
.badge-status-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warm,
.badge-status-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-cold,
.badge-status-muted {
  background: #e2e8f0;
  color: #334155;
}

.badge-status-open {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-status-closed {
  background: #f1f5f9;
  color: #475569;
}

.pipeline-card .badge {
  padding: 0.2rem 0.42rem;
  font-size: 0.66rem;
}

.operational-panel {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  padding: 1rem;
}

.operational-panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.operational-grid {
  display: grid;
  gap: 0.75rem;
}

.operational-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.space-operational {
  display: grid;
  gap: 0.9rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.section-title {
  margin-top: 0.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.section-meta {
  margin-top: 0.25rem;
  font-size: 0.825rem;
  color: var(--muted);
}

.operational-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.9rem;
}

.ranking-metric .metric-value,
.operational-card .metric-value {
  margin-top: 0.5rem;
}

.conversation-detail-meta {
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-detail-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  min-width: 0;
  line-height: 1.35;
  overflow: hidden;
}

.conversation-detail-strong {
  font-weight: 700;
  color: var(--text);
}

.conversation-label-strip {
  gap: 0.35rem;
}

.conversation-label-empty {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.conversation-label-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--conversation-label-color, #10b981);
  background: rgba(16, 185, 129, 0.1);
  color: var(--conversation-label-color, #0f172a);
  padding: 0.24rem 0.55rem;
  font-size: 0.71rem;
  font-weight: 700;
  max-width: 100%;
}

.conversation-label-chip.inactive {
  opacity: 0.72;
}

.conversation-label-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.conversation-modal-shell {
  width: min(860px, calc(100vw - 2rem));
  border-radius: 1.1rem;
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.conversation-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 0.9rem;
  padding-right: 0.15rem;
  padding-bottom: 0.35rem;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.conversation-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding-top: 0.75rem;
  padding-bottom: 0.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), #fff 55%);
  backdrop-filter: blur(8px);
}

.conversation-label-catalog {
  display: grid;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.85rem;
}

.conversation-label-catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.conversation-label-search {
  width: min(100%, 240px);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.6rem 0.75rem;
  background: #fff;
}

.conversation-label-list {
  display: grid;
  gap: 0.35rem;
  max-height: 280px;
  overflow: auto;
  padding-right: 0.1rem;
}

.conversation-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.7rem 0.8rem;
  text-align: left;
}

.conversation-label-row.assigned {
  border-color: rgba(5, 150, 105, 0.2);
  background: #ecfdf5;
}

.conversation-label-row-action {
  font-size: 0.75rem;
  font-weight: 700;
  color: #166534;
  white-space: nowrap;
}

.conversation-label-create {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 0.85rem;
}

.conversation-label-create-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) 160px;
}

.conversation-composer-body {
  flex: 0 0 auto;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
  margin-top: 0;
}

.conversation-composer {
  display: grid;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 0.6rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.conversation-composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.conversation-composer-tabs,
.conversation-composer-toolbar,
.conversation-composer-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.conversation-composer-tabs {
  justify-content: flex-start;
}

.conversation-tab {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.56rem;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.conversation-tab.active {
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.2);
  color: #166534;
}

.conversation-tab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.conversation-note-draft {
  width: 100%;
  min-height: 56px;
  max-height: min(28dvh, 168px);
  resize: vertical;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #f8fafc;
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.conversation-reply-draft {
  background: #f0fdf4;
}

.conversation-note-draft:focus {
  outline: none;
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

.conversation-reply-draft:focus {
  border-color: rgba(5, 150, 105, 0.4);
}

.conversation-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.38rem 0.55rem;
  color: var(--muted);
  min-width: 2.35rem;
  min-height: 2.35rem;
}

.conversation-icon-button:not(:disabled):hover {
  background: #f8fafc;
  color: #0f766e;
}

.conversation-icon-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.conversation-emoji-shell {
  position: relative;
  display: inline-flex;
}

.conversation-emoji-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.35rem);
  z-index: 25;
  display: flex;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.3rem;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.conversation-emoji-item {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 1rem;
}

.conversation-emoji-item:hover {
  background: #f1f5f9;
}

.conversation-note-draft:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.conversation-icon-svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke-width: 2;
}

.conversation-mention-picker {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.conversation-mention-picker-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.35rem);
  z-index: 20;
  width: min(100%, 320px);
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
  padding: 0.45rem;
}

.conversation-mention-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.conversation-mention-item:hover {
  background: #f8fafc;
}

.conversation-mention-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.conversation-mention-item-role {
  font-size: 0.72rem;
  color: var(--muted);
}

.conversation-composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 0.55rem;
  flex-wrap: wrap;
}

.conversation-composer-status {
  margin: 0;
  min-width: 0;
  flex: 1 1 260px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #334155;
}

.conversation-composer-footer-actions {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  align-items: center;
  gap: 0.5rem;
}

#conversation-composer-action {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: max-content;
  padding-inline: 1rem;
  white-space: nowrap;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.18);
}

.conversation-header-actions {
  gap: 0.35rem;
}

.conversation-more-actions {
  position: relative;
}

.conversation-more-actions-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 20;
  min-width: 220px;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.conversation-more-action-item {
  display: flex;
  width: 100%;
  align-items: center;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: #334155;
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  text-align: left;
}

.conversation-more-action-item:hover {
  background: #f8fafc;
}

.conversation-more-action-item.danger {
  color: #b91c1c;
}

.conversation-more-action-item.danger:hover {
  background: #fef2f2;
}

.conversation-contact-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow-y: auto;
  padding: 1rem;
}

.conversation-contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(3px);
}

.conversation-contact-panel {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  width: min(390px, 100%);
  height: auto;
  max-height: calc(100dvh - 2rem);
  flex-direction: column;
  gap: 0.9rem;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #fff;
  padding: 1rem;
  box-shadow: -22px 0 44px rgba(15, 23, 42, 0.18);
}

.conversation-contact-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.conversation-contact-head h2 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-contact-head p {
  margin: 0.15rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-contact-close {
  width: 2.1rem;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 999px;
  font-size: 1.15rem;
  line-height: 1;
}

.conversation-contact-grid {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.85rem;
}

.conversation-contact-grid span {
  color: var(--muted);
  font-size: 0.76rem;
}

.conversation-contact-grid strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-contact-form {
  display: grid;
  gap: 0.75rem;
}

.conversation-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.conversation-contact-actions .secondary-button {
  flex: 1 1 150px;
  justify-content: center;
}

.conversation-action-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
}

.conversation-action-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.conversation-action-shell {
  position: relative;
  width: min(620px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 1.4rem;
  border: 1px solid var(--line);
  background: #fff;
  padding: 1.1rem;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.conversation-action-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.conversation-action-title {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
}

.conversation-action-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.conversation-action-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  padding-right: 0.15rem;
}

.conversation-action-grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.9rem;
}

.conversation-action-grid span {
  color: var(--muted);
  font-size: 0.76rem;
}

.conversation-action-grid strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.84rem;
  word-break: break-word;
}

.conversation-action-input {
  width: 100%;
}

.conversation-action-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1rem;
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding-top: 0.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), #fff);
}

.conversation-action-summary {
  border: 1px solid #bbf7d0;
  border-radius: 1rem;
  background: #f0fdf4;
  padding: 0.9rem;
}

.conversation-action-summary h3 {
  margin: 0 0 0.5rem;
  color: #166534;
  font-size: 0.95rem;
}

.conversation-action-summary ul {
  margin: 0;
  padding-left: 1.15rem;
  color: #166534;
  font-size: 0.84rem;
}

.conversation-action-summary li + li {
  margin-top: 0.25rem;
}

#conversation-labels-modal,
#conversation-assignee-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
}

#conversation-labels-modal .conversation-modal-shell,
#conversation-assignee-modal .conversation-modal-shell {
  width: min(860px, 100%);
}

.tf-toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: grid;
  gap: 0.5rem;
  pointer-events: none;
}

.tf-toast {
  min-width: 240px;
  max-width: min(420px, calc(100vw - 2rem));
  border-radius: 0.95rem;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  animation: tf-toast-in 140ms ease-out;
}

.tf-toast.success {
  background: linear-gradient(135deg, #059669, #10b981);
}

.tf-toast.error {
  background: linear-gradient(135deg, #dc2626, #f97316);
}

.tf-toast.hide {
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 160ms ease, transform 160ms ease;
}

@keyframes tf-toast-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#conversation-composer-action:hover {
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.22);
}

.conversation-transfer-modal-shell {
  width: min(680px, calc(100vw - 2rem));
  border-radius: 1.1rem;
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.conversation-transfer-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 0.9rem;
  padding-right: 0.15rem;
  padding-bottom: 0.35rem;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.conversation-transfer-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding-top: 0.75rem;
  padding-bottom: 0.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), #fff 55%);
  backdrop-filter: blur(8px);
}

.ranking-metric {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  padding: 1rem;
}

.ranking-table {
  display: grid;
  gap: 0.75rem;
}

.ranking-table-head,
.ranking-table-row {
  display: grid;
  grid-template-columns: 1.8fr 0.7fr 0.9fr 1.3fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.ranking-table-head {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ranking-table-row {
  padding: 0.9rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.ranking-table-row:hover {
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.22);
}

.ranking-table-row.selected {
  background: #dcfce7;
  border-color: rgba(22, 163, 74, 0.35);
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.08);
}

.ranking-score {
  display: grid;
  gap: 0.3rem;
}

.ranking-score-value {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

.ranking-score-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ecfeff;
  color: #0f766e;
}

.ranking-score-label.hot {
  background: #dcfce7;
  color: #166534;
}

.ranking-score-label.warm {
  background: #fef3c7;
  color: #92400e;
}

.ranking-score-label.cold {
  background: #e2e8f0;
  color: #334155;
}

@media (max-width: 1024px) {
  .ranking-table-head,
  .ranking-table-row {
    grid-template-columns: 1fr;
  }
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.9rem;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.detail-value {
  margin-top: 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.detail-subvalue {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.message-block {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.9rem;
}

.message-block.internal {
  background: #fdf4ff;
  border-color: #e9d5ff;
}

.message-block.outbound {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.message-block.inbound {
  background: #f8fafc;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ranking-score .badge {
  margin-top: 0.15rem;
}

.pipeline-kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(316px, 344px);
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
  overflow-x: auto;
  padding: 0 0.35rem 0.55rem 0;
  scrollbar-gutter: stable;
  background:
    linear-gradient(90deg, rgba(248, 250, 252, 0), rgba(15, 23, 42, 0.08)) right / 22px 100% no-repeat;
}

#view-pipeline .panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100dvh - 118px);
}

#pipeline-board {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.pipeline-kanban::-webkit-scrollbar {
  height: 0.75rem;
}

.pipeline-kanban::-webkit-scrollbar-thumb {
  border: 3px solid #f8fafc;
  border-radius: 999px;
  background: #cbd5e1;
}

.pipeline-kanban::-webkit-scrollbar-track {
  background: #f8fafc;
}

.pipeline-column {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  min-width: 320px;
  overflow: hidden;
}

.pipeline-column.selected {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.12);
}

.pipeline-column-tone-neutral {
  border-top: 3px solid #94a3b8;
}

.pipeline-column-tone-success {
  border-top: 3px solid #10b981;
}

.pipeline-column-tone-danger {
  border-top: 3px solid #ef4444;
}

.pipeline-column-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem 0.72rem 0.65rem;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.pipeline-column-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.pipeline-column-title {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  flex: 1 1 auto;
}

.pipeline-column-title-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.pipeline-column-title-text {
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
}

.pipeline-stage-menu {
  position: relative;
  flex: 0 0 auto;
}

.pipeline-stage-menu > summary {
  list-style: none;
}

.pipeline-stage-menu > summary::-webkit-details-marker {
  display: none;
}

.pipeline-stage-menu-button {
  min-width: 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  justify-content: center;
}

.pipeline-stage-menu-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 220px;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.pipeline-stage-menu-item {
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  padding: 0.55rem 0.7rem;
  font-size: 0.8rem;
  text-align: left;
  color: #334155;
  cursor: pointer;
}

.pipeline-stage-menu-item:hover {
  background: #f8fafc;
}

.pipeline-stage-menu-item.danger {
  color: #b91c1c;
}

.pipeline-column-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.45rem 0 0;
  background: transparent;
}

.pipeline-column-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.72rem;
  background: #fff;
  overflow-y: auto;
  flex: 1 1 auto;
  scrollbar-gutter: stable;
}

.pipeline-card {
  display: grid;
  gap: 0.42rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.78rem 0.78rem 0.72rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  min-width: 0;
}

.pipeline-card.selected {
  border-color: rgba(5, 150, 105, 0.35);
  background: #f0fdf4;
}

.pipeline-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  min-width: 0;
}

.pipeline-card-head-main {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 auto;
}

.pipeline-card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  min-width: 0;
}

.pipeline-card-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 auto;
}

.pipeline-card-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-card-info-line {
  display: flex;
  align-items: flex-start;
  gap: 0.38rem;
  min-width: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.pipeline-card-line-icon {
  width: 0.82rem;
  height: 0.82rem;
  margin-top: 0.08rem;
  flex: 0 0 auto;
  color: #64748b;
}

.pipeline-card-info-value {
  min-width: 0;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pipeline-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pipeline-card-badges .badge {
  font-size: 0.69rem;
}

.pipeline-card-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pipeline-card-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.pipeline-card-score-high {
  border: 1px solid rgba(5, 150, 105, 0.22);
  background: #ecfdf5;
  color: #166534;
}

.pipeline-card-score-medium {
  border: 1px solid rgba(217, 119, 6, 0.24);
  background: #fffbeb;
  color: #92400e;
}

.pipeline-card-score-low {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.pipeline-card-subline {
  font-size: 0.76rem;
  color: var(--muted);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-card-capture {
  display: grid;
  gap: 0.28rem;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.95), rgba(236, 253, 245, 0.85));
  border: 1px solid rgba(5, 150, 105, 0.12);
  padding: 0.52rem 0.58rem;
}

.pipeline-card-capture-bar {
  height: 0.35rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
}

.pipeline-card-capture-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #059669);
}

.pipeline-card-capture-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.71rem;
  color: #475569;
}

.pipeline-card-field-summary {
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-card-actions {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.pipeline-card-primary-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.35rem;
  min-width: 0;
}

.pipeline-card-primary-action {
  justify-content: center;
  min-width: 0;
  padding-inline: 0.45rem;
  font-size: 0.74rem;
  white-space: nowrap;
}

.pipeline-card-quick-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
  min-width: 0;
  flex-wrap: wrap;
}

.pipeline-card-actions-menu {
  position: relative;
  flex-shrink: 0;
  min-width: 0;
}

.pipeline-card-actions-menu[open] {
  width: 100%;
}

.pipeline-card-actions-menu > summary {
  list-style: none;
}

.pipeline-card-actions-menu > summary::-webkit-details-marker {
  display: none;
}

.pipeline-card-actions-menu-panel {
  position: static;
  display: grid;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
  margin-top: 0.35rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.pipeline-card-action-item {
  width: 100%;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  text-align: left;
  color: #334155;
}

.pipeline-card-action-item:hover {
  background: #f8fafc;
}

.pipeline-card-nav {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.pipeline-card-nav-button {
  min-width: 2rem;
  padding-inline: 0.45rem;
}

.pipeline-card-role {
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
}

.pipeline-card-details {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  overflow: hidden;
}

.pipeline-card-details-summary {
  cursor: pointer;
  list-style: none;
  padding: 0.42rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
}

.pipeline-card-details-summary::-webkit-details-marker {
  display: none;
}

.pipeline-card-details-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding: 0 0.6rem 0.6rem;
}

.pipeline-card-detail-row {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.pipeline-card-detail-row span {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #64748b;
}

.pipeline-card-detail-row strong {
  font-size: 0.76rem;
  font-weight: 600;
  color: #0f172a;
  min-width: 0;
  word-break: break-word;
}

.pipeline-card-detail-row-wide {
  grid-column: 1 / -1;
}

.pipeline-card-empty-note {
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.52rem 0.62rem;
  font-size: 0.74rem;
  color: #64748b;
}

.pipeline-card-updated {
  font-size: 0.72rem;
  color: #64748b;
}

.pipeline-card-capture-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.3);
  padding-top: 0.45rem;
  font-size: 0.72rem;
  color: #475569;
}

.pipeline-card-capture-summary-label {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.63rem;
  font-weight: 700;
  color: #64748b;
}

.pipeline-column .empty-state {
  padding: 0.85rem 0.7rem;
  font-size: 0.82rem;
  background: #ffffff;
  border-style: solid;
  color: #475569;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .pipeline-card-detail-row-wide {
    grid-column: auto;
  }
}

@media (min-width: 1025px) {
  .pipeline-card-details-body {
    grid-template-columns: 1fr;
  }
}

.pipeline-detail-stack {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.pipeline-detail-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.9rem;
}

.pipeline-field-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.75rem 0.85rem;
}

.pipeline-field-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.pipeline-field-meta {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.pipeline-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.pipeline-modal.hidden {
  display: none;
}

.pipeline-modal-shell {
  width: min(1240px, 100%);
  max-height: calc(100vh - 32px);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

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

.users-modal-shell {
  width: min(920px, 100%);
}

.talent-pool-modal-shell,
.users-modal-shell,
.jobs-modal-shell,
.pipeline-editor-modal-shell {
  max-height: calc(100vh - 32px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pipeline-modal-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.pipeline-modal-status {
  position: sticky;
  top: 4.7rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.pipeline-editor-modal-shell {
  width: min(1120px, 100%);
}

.pipeline-editor-modal-header {
  position: sticky;
  top: 0;
}

.pipeline-editor-heading {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.pipeline-editor-heading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.pipeline-editor-modal-status {
  top: 5.25rem;
}

.pipeline-editor-modal-shell .pipeline-modal-header {
  padding: 1rem 1.15rem;
}

.pipeline-editor-modal-shell .pipeline-modal-status {
  padding: 0.75rem 1.15rem;
}

.pipeline-editor-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  padding: 1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.candidate-modal-shell {
  width: min(1080px, 100%);
}

.candidate-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.candidate-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.1rem 1.1rem;
  scrollbar-gutter: stable;
}

.candidate-detail-layout {
  display: grid;
  gap: 0.85rem;
}

.candidate-detail-summary {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

.candidate-detail-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.candidate-detail-name {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.candidate-detail-meta {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.candidate-detail-grid {
  display: grid;
  gap: 0.75rem;
}

.candidate-detail-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #f8fafc;
  padding: 0.85rem 0.9rem;
}

.candidate-detail-actions {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.candidate-detail-note {
  font-size: 0.75rem;
  color: var(--muted);
}

.candidate-detail-notes {
  display: grid;
  gap: 0.75rem;
}

.candidate-modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  background: #fff;
}

.candidate-modal-form-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 1rem 1.1rem 0.9rem;
  min-height: 0;
  overflow: visible;
}

.candidate-field-wide {
  grid-column: 1 / -1;
}

.candidate-form-note {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #f8fafc;
  padding: 0.85rem 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.candidate-modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), #ffffff);
}

.conversation-detail-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}

.conversation-detail-strong {
  font-weight: 600;
  color: var(--text);
}

.conversation-more-actions-menu {
  min-width: 250px;
}

.conversation-more-action-item {
  display: flex;
  width: 100%;
  align-items: center;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  color: #334155;
  text-align: left;
}

.conversation-more-action-item:hover {
  background: #f8fafc;
}

.conversation-more-action-item.danger {
  color: #b91c1c;
}

.agent-department-select,
.agent-sector-select {
  width: 100%;
}

.candidate-form-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.candidate-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.pipeline-editor-card {
  display: grid;
  gap: 0.75rem;
  min-height: 0;
}

.pipeline-editor-summary {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 0.9rem 1rem;
}

.pipeline-editor-title-wrap {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.pipeline-editor-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.pipeline-editor-candidate-link {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.pipeline-editor-candidate-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.pipeline-editor-candidate-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 0.2rem;
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-editor-candidate-link {
    transition: none;
  }
}

.pipeline-editor-meta-row,
.pipeline-editor-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.pipeline-editor-meta {
  font-size: 0.74rem;
  color: var(--muted);
}

.pipeline-editor-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.05rem;
}

.pipeline-editor-tab {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.55rem 0.2rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.pipeline-editor-tab.active {
  color: #166534;
}

.pipeline-editor-tab-label {
  position: relative;
  display: inline-block;
}

.pipeline-editor-tab.active .pipeline-editor-tab-label::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 999px;
  background: #16a34a;
}

.pipeline-editor-body-scroll {
  display: grid;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding-right: 0.15rem;
}

.pipeline-editor-panel {
  display: none;
  min-width: 0;
}

.pipeline-editor-panel.active {
  display: block;
}

.pipeline-editor-panel-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  min-width: 0;
}

.pipeline-stage-editor-flags {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pipeline-editor-panel-spacer {
  flex: 1 1 auto;
}

.pipeline-editor-panel-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.72), #fff);
  padding-top: 0.75rem;
}

.pipeline-compact-list {
  display: grid;
  gap: 0.4rem;
}

.pipeline-compact-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.55rem 0.7rem;
}

.pipeline-compact-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.pipeline-compact-value {
  font-size: 0.84rem;
  color: var(--text);
  word-break: break-word;
}

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

.pipeline-fields-compact-grid .field input,
.pipeline-fields-compact-grid .field select,
.pipeline-fields-compact-grid .field textarea {
  min-width: 0;
}

.pipeline-fields-compact-grid .field {
  min-width: 0;
}

.pipeline-modal-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  padding: 1rem;
  overflow: auto;
}

.pipeline-modal-body {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.1rem 1.1rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.pipeline-fields-list {
  display: grid;
  gap: 0.75rem;
  min-height: 0;
  overflow: auto;
  padding-right: 0.15rem;
}

.pipeline-field-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 0.85rem;
}

.pipeline-field-item-main {
  min-width: 0;
}

.pipeline-field-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.pipeline-field-item-meta {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.pipeline-field-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.pipeline-field-item-actions .secondary-button {
  padding: 0.55rem 0.7rem;
}

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

#talentflow-auth-overlay {
  inset: 0;
  padding: 0;
  background: #071d4b;
  overflow: auto;
  overscroll-behavior: contain;
}

#talentflow-auth-overlay .tf-login-layout {
  display: grid;
  grid-template-columns: minmax(440px, 1.04fr) minmax(520px, 0.96fr);
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 85% 8%, rgba(56, 189, 248, 0.07), transparent 24rem),
    #f7faff;
}

#talentflow-auth-overlay .tf-login-hero {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #071d4b;
  background-image: url("/assets/Talent_Flow_login.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

#talentflow-auth-overlay .tf-login-hero::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  box-shadow:
    inset -1px 0 rgba(255, 255, 255, 0.08),
    inset -48px 0 80px rgba(4, 18, 59, 0.08);
}

#talentflow-auth-overlay .tf-login-form-wrapper {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(2rem, env(safe-area-inset-top))
    clamp(2rem, 5vw, 5rem)
    max(1.5rem, env(safe-area-inset-bottom));
  overflow-y: auto;
}

#talentflow-auth-overlay .tf-login-form-wrapper::before,
#talentflow-auth-overlay .tf-login-form-wrapper::after {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  content: "";
  border-radius: 999px;
  border: 1px solid rgba(14, 165, 233, 0.08);
}

#talentflow-auth-overlay .tf-login-form-wrapper::before {
  width: 28rem;
  height: 28rem;
  top: -16rem;
  right: -12rem;
}

#talentflow-auth-overlay .tf-login-form-wrapper::after {
  width: 24rem;
  height: 24rem;
  bottom: -15rem;
  left: -12rem;
}

#talentflow-auth-overlay .tf-login-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 590px);
  margin: auto;
}

#talentflow-auth-overlay .tf-login-card {
  width: 100%;
  padding: clamp(2rem, 4vw, 3.35rem);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 30px 90px rgba(15, 23, 42, 0.11),
    0 8px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(20px);
}

#talentflow-auth-overlay .tf-login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#talentflow-auth-overlay .tf-login-brand-mark {
  width: 4rem;
  height: 4rem;
  flex: 0 0 4rem;
  display: grid;
  place-items: center;
  border-radius: 1.15rem;
  background: linear-gradient(145deg, #0ec5ec 0%, #2878f4 50%, #7c22f2 100%);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.25);
}

#talentflow-auth-overlay .tf-login-brand-copy {
  min-width: 0;
}

#talentflow-auth-overlay .tf-login-brand-name {
  color: #30416b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  line-height: 1.2;
  text-transform: uppercase;
}

#talentflow-auth-overlay .tf-login-brand-status {
  margin-top: 0.28rem;
  color: #10182d;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

#talentflow-auth-overlay .tf-login-heading {
  margin-top: clamp(2.3rem, 5vh, 3.35rem);
}

#talentflow-auth-overlay .tf-login-heading h1 {
  margin: 0;
  color: #0c152b;
  font-size: clamp(2rem, 3.1vw, 2.8rem);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

#talentflow-auth-overlay .tf-login-heading p {
  max-width: 31rem;
  margin: 1rem 0 0;
  color: #53627d;
  font-size: clamp(0.98rem, 1.35vw, 1.1rem);
  line-height: 1.7;
}

#talentflow-auth-overlay .tf-login-form {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(2rem, 4vh, 2.7rem);
}

#talentflow-auth-overlay .tf-login-field {
  display: grid;
  gap: 0.55rem;
}

#talentflow-auth-overlay .tf-login-label {
  color: #111827;
  font-size: 0.9rem;
  font-weight: 700;
}

#talentflow-auth-overlay .tf-login-control {
  position: relative;
  display: flex;
  align-items: center;
}

#talentflow-auth-overlay .tf-login-control input {
  width: 100%;
  min-width: 0;
  min-height: 3.65rem;
  padding: 0.9rem 3.4rem;
  border: 1px solid #d8e0eb;
  border-radius: 0.85rem;
  outline: none;
  background: #fff;
  color: #10182d;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

#talentflow-auth-overlay .tf-login-control input::placeholder {
  color: #98a5ba;
  opacity: 1;
}

#talentflow-auth-overlay .tf-login-control input:hover {
  border-color: #b8c5d6;
}

#talentflow-auth-overlay .tf-login-control input:focus-visible {
  border-color: #168be5;
  box-shadow:
    0 0 0 4px rgba(14, 165, 233, 0.13),
    0 5px 18px rgba(15, 23, 42, 0.04);
}

#talentflow-auth-overlay .tf-login-control-icon {
  position: absolute;
  z-index: 1;
  left: 1.15rem;
  width: 1.3rem;
  height: 1.3rem;
  display: grid;
  place-items: center;
  color: #8292ad;
  pointer-events: none;
}

#talentflow-auth-overlay svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#talentflow-auth-overlay .tf-login-password-toggle {
  position: absolute;
  z-index: 2;
  right: 0.7rem;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  padding: 0.62rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: #8292ad;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

#talentflow-auth-overlay .tf-login-password-toggle:hover {
  background: #f0f6ff;
  color: #2868d8;
}

#talentflow-auth-overlay .tf-login-password-toggle:focus-visible {
  outline: none;
  color: #2868d8;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

#talentflow-auth-overlay
  .tf-login-password-toggle[aria-pressed="false"]
  .tf-login-eye-closed,
#talentflow-auth-overlay
  .tf-login-password-toggle[aria-pressed="true"]
  .tf-login-eye-open {
  display: none;
}

#talentflow-auth-overlay .tf-login-submit {
  width: 100%;
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.25rem;
  padding: 0.9rem 1.25rem;
  border: 0;
  border-radius: 0.9rem;
  background: linear-gradient(105deg, #13bd80 0%, #079267 100%);
  color: #fff;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.18);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

#talentflow-auth-overlay .tf-login-submit svg {
  width: 1.25rem;
  height: 1.25rem;
}

#talentflow-auth-overlay .tf-login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.025);
  box-shadow: 0 16px 34px rgba(5, 150, 105, 0.24);
}

#talentflow-auth-overlay .tf-login-submit:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(16, 185, 129, 0.22),
    0 14px 30px rgba(5, 150, 105, 0.2);
}

#talentflow-auth-overlay .tf-login-submit:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

#talentflow-auth-overlay .tf-login-feedback {
  min-height: 1.3rem;
  margin: -0.35rem 0 0;
  color: #b42318;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

#talentflow-auth-overlay .tf-login-feedback:empty {
  min-height: 0;
}

#talentflow-auth-overlay .tf-login-security {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid #baeaf5;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f0fdff 0%, #eef9ff 100%);
}

#talentflow-auth-overlay .tf-login-security-icon {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  display: grid;
  place-items: center;
  padding: 0.55rem;
  border-radius: 0.85rem;
  background: linear-gradient(145deg, #17c6d4, #008be8);
  color: #fff;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.17);
}

#talentflow-auth-overlay .tf-login-security p {
  margin: 0;
  color: #33415d;
  font-size: 0.93rem;
  line-height: 1.65;
}

#talentflow-auth-overlay .tf-login-copyright {
  margin: 1.5rem 0 0;
  color: #72809a;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 1180px) {
  #talentflow-auth-overlay .tf-login-layout {
    grid-template-columns: minmax(360px, 0.82fr) minmax(500px, 1.18fr);
  }

  #talentflow-auth-overlay .tf-login-form-wrapper {
    padding-inline: 2.5rem;
  }

  #talentflow-auth-overlay .tf-login-card {
    padding: 2.5rem;
  }
}

@media (max-width: 900px) {
  #talentflow-auth-overlay .tf-login-layout {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
  }

  #talentflow-auth-overlay .tf-login-hero {
    display: none;
  }

  #talentflow-auth-overlay .tf-login-form-wrapper {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
      max(1.5rem, env(safe-area-inset-top))
      clamp(1rem, 5vw, 2.5rem)
      max(1.5rem, env(safe-area-inset-bottom));
  }

  #talentflow-auth-overlay .tf-login-panel {
    width: min(100%, 560px);
  }
}

@media (max-width: 560px) {
  #talentflow-auth-overlay .tf-login-form-wrapper {
    align-items: flex-start;
    padding-inline: 0;
    padding-top: 0;
    padding-bottom: 0;
    background: #fff;
  }

  #talentflow-auth-overlay .tf-login-panel {
    width: 100%;
  }

  #talentflow-auth-overlay .tf-login-card {
    min-height: 100vh;
    min-height: 100dvh;
    padding:
      max(1.5rem, env(safe-area-inset-top))
      1.25rem
      max(1.5rem, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #talentflow-auth-overlay .tf-login-brand-mark {
    width: 3.4rem;
    height: 3.4rem;
    flex-basis: 3.4rem;
    border-radius: 1rem;
  }

  #talentflow-auth-overlay .tf-login-heading {
    margin-top: 2.4rem;
  }

  #talentflow-auth-overlay .tf-login-control input {
    min-height: 3.5rem;
  }

  #talentflow-auth-overlay .tf-login-security {
    align-items: flex-start;
  }

  #talentflow-auth-overlay .tf-login-copyright {
    display: none;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  #talentflow-auth-overlay .tf-login-form-wrapper {
    align-items: flex-start;
    padding-block: 1.5rem;
  }

  #talentflow-auth-overlay .tf-login-card {
    padding: 2rem 2.5rem;
  }

  #talentflow-auth-overlay .tf-login-heading {
    margin-top: 1.8rem;
  }

  #talentflow-auth-overlay .tf-login-form {
    margin-top: 1.6rem;
    gap: 1rem;
  }

  #talentflow-auth-overlay .tf-login-security {
    margin-top: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #talentflow-auth-overlay *,
  #talentflow-auth-overlay *::before,
  #talentflow-auth-overlay *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}

@media (max-width: 1024px) {

  .conversation-sidebar,
  .conversation-panel {
    height: auto;
  }

  .conversation-message-stack {
    max-height: none;
  }

  .conversation-header-actions {
    justify-content: flex-start;
  }

  .evolution-instance-card {
    flex-direction: column;
  }

  .evolution-instance-meta-grid {
    grid-template-columns: 1fr;
  }

  .evolution-instance-actions {
    max-width: none;
    justify-content: flex-start;
  }

  .evolution-connect-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1024px) {
  #view-conversations {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  #view-conversations > .conversation-layout {
    height: auto;
    min-height: auto;
  }

  .conversation-sidebar,
  .conversation-panel {
    height: auto;
  }

  .operational-grid.two-up {
    grid-template-columns: 1fr;
  }

  .operational-panel-header {
    flex-direction: column;
  }

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

  .conversation-header-actions {
    width: 100%;
  }

  .conversation-header-actions .secondary-button-compact {
    flex: 1 1 auto;
    justify-content: center;
  }

  .conversation-list {
    max-height: none;
  }

  .conversation-message-stack {
    max-height: none;
  }

  .conversation-row-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .conversation-row-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .conversation-badges {
    justify-content: flex-start;
  }

  .conversation-row-meta-group {
    width: 100%;
  }

  .conversation-composer-toolbar {
    gap: 0.35rem;
  }

  .conversation-composer-footer {
    align-items: flex-start;
  }

  .pipeline-kanban {
    grid-auto-flow: column;
    grid-auto-columns: minmax(288px, 78vw);
    overflow-x: auto;
    height: 100%;
  }

  .pipeline-editor-modal-shell {
    max-height: calc(100dvh - 2rem);
  }

  .pipeline-editor-modal-body {
    padding: 0.85rem;
  }

  .pipeline-editor-body-scroll {
    max-height: none;
  }

  .pipeline-compact-row {
    grid-template-columns: 1fr;
  }

  .pipeline-fields-compact-grid {
    grid-template-columns: 1fr;
  }

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

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

  .talent-pool-toolbar {
    grid-template-columns: 1fr;
  }

  .talent-pool-card-head,
  .talent-pool-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .talent-pool-card-actions {
    justify-content: flex-start;
  }

  .conversation-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  #conversation-department-filter-wrapper,
  .conversation-filter-field {
    min-width: 0;
    width: 100%;
  }

  .conversation-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .conversation-composer-footer-actions {
    width: 100%;
  }

  #conversation-composer-action {
    width: 100%;
  }

  .pipeline-modal,
  .conversation-action-modal,
  .conversation-contact-modal,
  #conversation-labels-modal,
  #conversation-assignee-modal {
    padding: 0.5rem;
  }

  .pipeline-modal-shell,
  .conversation-action-shell,
  .conversation-modal-shell,
  .conversation-transfer-modal-shell {
    width: calc(100vw - 0.75rem);
    max-height: calc(100dvh - 1rem);
  }

  .pipeline-modal-header,
  .pipeline-modal-status,
  .pipeline-modal-body,
  .pipeline-editor-modal-body,
  .conversation-modal-body,
  .conversation-action-body {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .candidate-detail-actions,
  .candidate-modal-form-grid {
    grid-template-columns: 1fr;
  }

  .candidate-modal-footer,
  .candidate-detail-summary-head {
    flex-direction: column;
    align-items: flex-start;
  }

  #view-pipeline .panel {
    height: calc(100dvh - 98px);
  }

  .pipeline-kanban {
    height: 100%;
  }

  .pipeline-column {
    min-width: 280px;
  }

  .pipeline-column-header {
    padding: 0.62rem 0.65rem 0.58rem;
  }

  .pipeline-column-title-text {
    font-size: 0.84rem;
  }

  .pipeline-card {
    padding: 0.72rem 0.72rem 0.66rem;
  }

  .pipeline-card-primary-actions {
    grid-template-columns: 1fr;
  }

  .pipeline-card-primary-action {
    width: 100%;
  }

  .pipeline-card-quick-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pipeline-card-actions-menu,
  .pipeline-card-actions-menu > summary,
  .pipeline-card-more-button {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .ranking-table-head,
  .ranking-table-row {
    grid-template-columns: 1fr;
  }

  .candidate-modal-form-grid,
  .candidate-detail-grid,
  .candidate-detail-actions {
    grid-template-columns: 1fr;
  }

  .candidates-table-head {
    display: none;
  }

  .candidate-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "name status"
      "phone stage"
      "role updated"
      "actions actions";
    gap: 0.6rem 0.8rem;
    padding: 0.9rem 0.95rem;
    min-width: 0;
  }

  .candidate-row > :nth-child(1) {
    grid-area: name;
  }

  .candidate-row > :nth-child(2) {
    grid-area: phone;
  }

  .candidate-row > :nth-child(3) {
    grid-area: status;
    justify-self: end;
  }

  .candidate-row > :nth-child(4) {
    grid-area: stage;
  }

  .candidate-row > :nth-child(5) {
    grid-area: role;
  }

  .candidate-row > :nth-child(6) {
    grid-area: updated;
    justify-self: end;
    text-align: right;
  }

  .candidate-row > :nth-child(7) {
    grid-area: actions;
  }

  .candidate-actions-cell {
    justify-content: flex-start;
  }

  .candidate-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .candidate-actions .secondary-button-compact {
    flex: 1 1 0;
    justify-content: center;
  }
}

.media-studio-shell {
  display: grid;
  gap: 1rem;
}

.media-studio-header {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.media-studio-title {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

.media-studio-subtitle {
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.media-studio-actions,
.media-row-actions,
.media-filter-actions,
.media-script-actions,
.media-modal-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.media-studio-metrics {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.media-studio-filters {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(180px, 1.2fr) repeat(5, minmax(130px, 1fr)) auto;
}

.media-filter-actions {
  align-self: end;
  justify-content: flex-end;
}

.media-studio-list {
  display: grid;
  gap: 0.75rem;
}

.media-content-row {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 104px minmax(0, 1fr);
  padding: 0.85rem;
}

.media-thumb {
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.media-thumb-img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.media-thumb-placeholder {
  align-items: center;
  color: #0f6e56;
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.media-content-main {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.media-content-top,
.media-content-footer {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.media-content-title {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

.media-content-meta {
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  gap: 0.35rem 0.7rem;
  margin-top: 0.25rem;
}

.media-status {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  white-space: nowrap;
}

.media-status-emerald {
  background: #dcfce7;
  color: #166534;
}

.media-status-amber {
  background: #fef3c7;
  color: #92400e;
}

.media-status-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.media-status-rose {
  background: #ffe4e6;
  color: #be123c;
}

.media-status-slate,
.media-status-purple {
  background: #f1f5f9;
  color: #334155;
}

.media-studio-modal-shell {
  max-width: 980px;
  max-height: min(90vh, calc(100vh - 32px));
  min-height: 0;
  overflow: hidden;
}

#media-studio-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.25rem 0;
}

.media-content-form {
  display: grid;
  gap: 1rem;
  min-height: 100%;
}

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

.media-video-preview {
  background: #0f172a;
  border-radius: 0.5rem;
  overflow: hidden;
}

.media-video-preview video {
  display: block;
  max-height: 360px;
  width: 100%;
}

.media-content-form .media-modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  width: auto;
  justify-content: flex-end;
  margin: 0 -1.25rem;
  padding: 0.85rem 1.25rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

@media (max-width: 1200px) {
  .media-studio-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .media-studio-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1440px) {
  :root {
    --layout-pad-page: 1.25rem;
    --layout-gap-xl: 1.25rem;
  }

  .talent-pool-toolbar {
    grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(150px, 0.8fr)) minmax(150px, 0.8fr);
  }

  .talent-pool-summary-box {
    grid-column: 1 / -1;
    justify-items: start;
  }
}

@media (max-width: 1024px) {
  :root {
    --layout-pad-page: 1rem;
  }

  .panel-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .panel-header > * {
    min-width: 0;
  }

  .panel-header > .flex,
  .panel-header > .text-right {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .jobs-row,
  .users-row {
    grid-template-columns: 1fr;
  }

  .jobs-row-actions,
  .users-row-actions {
    justify-content: flex-start;
  }

  .jobs-summary-box,
  .users-summary-box,
  .talent-pool-summary-box {
    justify-items: start;
  }

  .organization-grid {
    min-height: auto;
  }

  #view-organization {
    min-height: auto;
    overflow: visible;
  }
}

@media (max-width: 768px) {
  body > .flex {
    flex-direction: column;
  }

  .sidebar,
  body.sidebar-is-collapsed .sidebar,
  .sidebar.sidebar-collapsed {
    width: 100%;
    min-width: 0;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background:
      linear-gradient(180deg, rgba(9, 33, 39, 0.98), rgba(11, 55, 60, 0.98)),
      radial-gradient(circle at top left, rgba(61, 233, 184, 0.16), transparent 38%);
  }

  .sidebar nav {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.75rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.75rem;
    scrollbar-gutter: stable;
    min-height: 0;
  }

  .sidebar .nav-item {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .sidebar-nav-group {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.35rem;
    height: auto;
    min-height: 0;
  }

  .sidebar-nav-group + .sidebar-nav-group {
    margin-top: 0;
    padding-top: 0.75rem;
  }

  .sidebar-nav-group + .sidebar-nav-group::before {
    left: 0;
    right: 0;
  }

  .sidebar-group-toggle {
    padding-inline: 0.75rem;
  }

  body.sidebar-is-collapsed .sidebar .brand-text,
  body.sidebar-is-collapsed .sidebar .nav-label,
  body.sidebar-is-collapsed .sidebar .sidebar-group-toggle,
  .sidebar.sidebar-collapsed .brand-text,
  .sidebar.sidebar-collapsed .nav-label,
  .sidebar.sidebar-collapsed .sidebar-group-toggle {
    display: inline-flex;
  }

  body.sidebar-is-collapsed .sidebar .session-card,
  .sidebar.sidebar-collapsed .session-card {
    display: block;
  }

  .session-card {
    display: none !important;
  }

  main > header .flex {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .app-topbar-inner {
    min-height: auto;
  }

  .app-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .app-topbar-user {
    width: 100%;
  }

  .view {
    padding: 0.85rem !important;
  }

  .panel,
  .metric-card,
  .operational-panel,
  .talent-pool-card {
    padding: 0.85rem;
  }

  .panel-header {
    gap: 0.65rem;
  }

  .panel-header > .flex,
  .panel-header > div:last-child {
    width: 100%;
  }

  .panel-header .primary-button,
  .panel-header .secondary-button {
    flex: 1 1 140px;
  }

  .dashboard-table {
    min-width: 620px;
  }

  .candidate-row {
    min-width: 0;
  }

  .candidate-actions .secondary-button-compact {
    min-width: min(100%, 9rem);
  }

  .media-studio-header,
  .media-content-top,
  .media-content-footer {
    flex-direction: column;
  }

  .media-studio-actions,
  .media-row-actions,
  .media-filter-actions,
  .media-modal-footer {
    align-items: stretch;
    width: 100%;
  }

  .media-studio-actions > *,
  .media-row-actions > *,
  .media-filter-actions > *,
  .media-modal-footer > * {
    justify-content: center;
    width: 100%;
  }

  .media-studio-metrics,
  .media-studio-filters,
  .media-step-grid,
  .media-content-row {
    grid-template-columns: 1fr;
  }

  .media-thumb {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  :root {
    --layout-pad-page: 0.75rem;
    --layout-pad-card: 0.75rem;
  }

  .sidebar-header {
    padding: 0.75rem !important;
  }

  .sidebar nav {
    padding: 0.55rem;
  }

  .nav-item {
    padding: 0.62rem 0.72rem;
  }

  .app-topbar-description {
    font-size: 0.82rem;
  }

  .app-topbar-user {
    padding: 0.6rem 0.75rem;
  }

  .metric-value {
    font-size: 1.65rem;
  }

  .panel-header .primary-button,
  .panel-header .secondary-button,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .candidate-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "status"
      "phone"
      "stage"
      "role"
      "updated"
      "actions";
  }

  .candidate-row > :nth-child(3),
  .candidate-row > :nth-child(6) {
    justify-self: start;
    text-align: left;
  }

  .candidate-actions {
    flex-direction: column;
  }

  .talent-pool-card-badges,
  .talent-pool-card-actions,
  .jobs-row-actions,
  .users-row-actions {
    width: 100%;
  }
}

@media (max-height: 800px) {
  #talentflow-auth-overlay .tf-login-hero {
    background-size: contain;
    background-position: center center;
    background-color: #0A1850;
  }
}

/* =========================================================
   TALENTFLOW DASHBOARD 2026
   Layout estrutural aprovado
   ========================================================= */

:root {
  --tf-green: #0f6e56;
  --tf-green-dark: #095640;
  --tf-green-soft: #eaf7f1;
  --tf-page: #f8faf9;
  --tf-card: #ffffff;
  --tf-border: #e5ebe8;
  --tf-text: #19231f;
  --tf-muted: #68756f;
  --tf-radius: 12px;
}

.tf-dashboard-view {
  padding: 0 !important;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.07), transparent 24%),
    linear-gradient(180deg, #f4f8f6 0%, #f7faf9 100%);
}

.tf-dashboard {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 24px 26px 40px;
}

.tf-dashboard-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  min-height: 64px;
  padding: 12px 20px;
  border: 1px solid rgba(207, 225, 216, 0.9);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(11, 86, 69, 0.96), rgba(15, 110, 86, 0.92)),
    radial-gradient(circle at top left, rgba(110, 231, 183, 0.14), transparent 36%);
  box-shadow: 0 16px 30px rgba(9, 33, 39, 0.1);
}

.tf-dashboard-welcome-copy {
  display: flex;
  align-items: baseline;
  flex: 1 1 320px;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.tf-dashboard-kicker {
  display: none;
}

.tf-dashboard-welcome h1 {
  flex: 0 0 auto;
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
}

.tf-dashboard-status {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
  min-width: 0;
  margin: 0;
  color: #9fe1cb;
  font-size: 13px;
  line-height: 1.35;
}

.tf-dashboard-status span {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  box-shadow: none;
}

.tf-dashboard-status span + span::before {
  content: "·";
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.6);
}

.tf-dashboard-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
}

.tf-dashboard-search {
  position: relative;
  display: block;
  width: clamp(180px, 18vw, 220px);
  min-width: 0;
}

.tf-dashboard-search > svg,
.tf-dashboard-search > i {
  position: absolute;
  top: 50%;
  left: 10px;
  z-index: 1;
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  transform: translateY(-50%);
}

.tf-dashboard-search input {
  display: block;
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0 10px 0 30px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  box-shadow: none;
}

.tf-dashboard-search input::placeholder {
  color: rgba(255, 255, 255, 0.65);
  opacity: 1;
}

.tf-dashboard-search:focus-within {
  border-radius: 8px;
}

.tf-dashboard-search input:focus-visible {
  border-color: rgba(255, 255, 255, 0.7);
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.tf-dashboard-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(209, 250, 229, 0.16);
  border-radius: 8px;
  color: #f2fffa;
  background: rgba(255, 255, 255, 0.08);
}

.tf-dashboard-icon-button:hover {
  color: #ffffff;
  border-color: rgba(167, 243, 208, 0.24);
  background: rgba(255, 255, 255, 0.16);
}

.tf-dashboard-icon-button svg {
  width: 14px;
  height: 14px;
}

.tf-dashboard-new-job {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  width: auto;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(167, 243, 208, 0.2);
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(145deg, #10b981, var(--tf-green-dark));
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 12px 22px rgba(5, 150, 105, 0.18);
}

.tf-dashboard-new-job svg {
  width: 14px;
  height: 14px;
  color: currentColor;
}

.tf-dashboard-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.tf-dashboard-kpis .dashboard-kpi-card {
  min-height: 122px;
  padding: 16px;
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
}

.tf-dashboard-kpis .dashboard-kpi-value {
  color: #135e49;
  font-size: 26px;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.tf-dashboard-kpis .dashboard-kpi-icon {
  color: var(--tf-green);
  border-color: #d8eee3;
  background: var(--tf-green-soft);
}

.tf-dashboard-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(370px, 0.92fr);
  gap: 14px;
}

.tf-dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
  gap: 14px;
}

.tf-dashboard .panel {
  border: 1px solid rgba(220, 232, 228, 0.96);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 251, 0.96));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.05);
}

.tf-dashboard .panel-header {
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1ef;
}

.tf-dashboard-funnel-panel,
.tf-dashboard-activity-panel {
  min-height: 335px;
}

.tf-dashboard-candidates-panel,
.tf-dashboard-agenda-panel {
  min-height: 320px;
}

.tf-dashboard-activity-list .list-row {
  padding: 14px 0;
  border-bottom: 1px solid #edf1ef;
}

.tf-dashboard-activity-list .list-row:last-child {
  border-bottom: 0;
}

.tf-dashboard .dashboard-funnel {
  gap: 9px;
}

.tf-dashboard .dashboard-funnel-row {
  padding: 0.95rem;
}

.tf-dashboard .dashboard-funnel-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.45), rgba(226, 232, 240, 0.9));
}

.tf-dashboard .dashboard-funnel-fill {
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #0f766e) !important;
}

.tf-dashboard .dashboard-ranking-row,
.tf-dashboard .dashboard-interview-row {
  padding: 13px 3px;
  border-bottom: 1px solid #edf1ef;
}

.tf-activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: flex-start;
}

.tf-activity-item__marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.95rem;
  background: rgba(16, 185, 129, 0.12);
  color: #0f6e56;
}

.tf-activity-item__content {
  min-width: 0;
}

.tf-activity-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.tf-activity-item__description {
  margin-top: 0.3rem;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tf-activity-item__meta {
  display: grid;
  justify-items: end;
  gap: 0.25rem;
  min-width: 6rem;
}

.tf-activity-item__actor {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #10233f;
}

.tf-dashboard-details {
  overflow: hidden;
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius);
  background: #fff;
}

.tf-dashboard-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  padding: 14px 17px;
  cursor: pointer;
  list-style: none;
}

.tf-dashboard-details > summary::-webkit-details-marker {
  display: none;
}

.tf-dashboard-details > summary > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #26322c;
  font-size: 13px;
  font-weight: 680;
}

.tf-dashboard-details > summary svg {
  width: 17px;
  height: 17px;
  color: var(--tf-green);
}

.tf-dashboard-details > summary small {
  color: #7a8680;
  font-size: 10px;
}

.tf-dashboard-details[open] > summary {
  border-bottom: 1px solid var(--tf-border);
}

.tf-dashboard-details-content {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #f9fbfa;
}

@media (max-width: 1320px) {
  .tf-dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tf-dashboard-primary-grid,
  .tf-dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .tf-dashboard {
    padding: 18px;
  }

  .tf-dashboard-top-actions {
    flex-wrap: wrap;
  }

  .tf-dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .tf-dashboard {
    padding: 13px;
  }

  .tf-dashboard-welcome {
    align-items: stretch;
    padding: 12px 14px;
  }

  .tf-dashboard-welcome-copy,
  .tf-dashboard-top-actions {
    flex: 1 1 100%;
    width: 100%;
  }

  .tf-dashboard-top-actions {
    justify-content: flex-start;
  }

  .tf-dashboard-search {
    flex: 1 1 auto;
    width: auto;
  }

  .tf-dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .tf-dashboard-details > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .tf-activity-item {
    grid-template-columns: auto 1fr;
  }

  .tf-activity-item__meta {
    grid-column: 2;
    justify-items: start;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .tf-dashboard-status {
    flex-basis: 100%;
  }

  .tf-dashboard-top-actions {
    flex-wrap: wrap;
  }

  .tf-dashboard-search {
    flex: 1 1 calc(100% - 40px);
  }

  .tf-dashboard-new-job {
    flex: 1 1 100%;
  }
}

/* =========================================================
   TALENTFLOW 2026 — PADRÃO GLOBAL DE MODAIS E FORMULÁRIOS
   ========================================================= */

:root {
  --tf-form-brand: #0f6e56;
  --tf-form-brand-dark: #095640;
  --tf-form-brand-soft: #eaf7f1;
  --tf-form-bg: #f7f9f8;
  --tf-form-surface: #ffffff;
  --tf-form-border: #dfe7e3;
  --tf-form-border-strong: #cdd9d3;
  --tf-form-text: #17211d;
  --tf-form-muted: #66736d;
  --tf-form-danger: #c24141;
  --tf-form-radius: 12px;
  --tf-form-shadow: 0 22px 70px rgba(15, 23, 42, 0.18);
}

/* ---------- OVERLAYS ---------- */

.pipeline-modal,
.conversation-contact-modal,
.conversation-action-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
}

.pipeline-modal.hidden,
.conversation-contact-modal.hidden,
.conversation-action-modal.hidden {
  display: none !important;
}

/* ---------- SHELL GLOBAL ---------- */

.pipeline-modal-shell,
.conversation-modal-shell,
.conversation-transfer-modal-shell,
.pipeline-editor-modal-shell {
  display: flex;
  flex-direction: column;
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
  max-height: calc(100vh - 32px);
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--tf-form-border);
  border-radius: 16px;
  background: var(--tf-form-surface);
  box-shadow: var(--tf-form-shadow);
}

/* Modais médios */

.users-modal-shell,
.jobs-modal-shell,
.candidate-modal-shell,
.talent-pool-modal-shell {
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
}

/* Modais pequenos */

#organization-department-modal .pipeline-modal-shell,
#organization-sector-modal .pipeline-modal-shell,
#evolution-modal .pipeline-modal-shell {
  width: min(680px, calc(100vw - 32px));
  max-width: 680px;
}

/* Modais grandes */

.media-studio-modal-shell,
.pipeline-editor-modal-shell {
  width: min(1120px, calc(100vw - 32px));
  max-width: 1120px;
}

/* ---------- CABEÇALHO ---------- */

:is(
  #users-modal,
  #jobs-modal,
  #candidate-modal,
  #talent-pool-modal,
  #organization-department-modal,
  #organization-sector-modal
) .pipeline-modal-shell {
  border-color: var(--tf-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 249, 0.98)),
    var(--tf-surface);
  box-shadow:
    0 24px 60px rgba(16, 35, 63, 0.12),
    0 6px 18px rgba(8, 63, 52, 0.06);
}

.pipeline-modal-header,
.pipeline-editor-modal-header,
.conversation-modal-shell > .panel-header,
.conversation-transfer-modal-shell > .panel-header {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  margin: 0;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--tf-form-border);
  background: #ffffff;
}

:is(
  #users-modal,
  #jobs-modal,
  #candidate-modal,
  #talent-pool-modal,
  #organization-department-modal,
  #organization-sector-modal
) .pipeline-modal-header {
  min-height: 80px;
  padding: 18px 22px 16px;
  border-bottom-color: rgba(11, 86, 69, 0.12);
  background:
    linear-gradient(135deg, rgba(241, 250, 247, 0.96), rgba(247, 250, 249, 0.94) 55%, rgba(224, 242, 254, 0.72));
}

.pipeline-modal-header > div:first-child,
.pipeline-editor-modal-header > div:first-child {
  min-width: 0;
}

.pipeline-modal-header .panel-title,
.pipeline-editor-modal-header .panel-title,
.conversation-modal-shell .panel-title {
  color: var(--tf-form-text);
  font-size: 19px;
  font-weight: 730;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.pipeline-modal-header p,
.pipeline-editor-modal-header p,
.conversation-modal-shell .panel-header p {
  max-width: 680px;
  margin-top: 4px !important;
  color: var(--tf-form-muted) !important;
  font-size: 12px !important;
  line-height: 1.5;
}

:is(
  #users-modal,
  #jobs-modal,
  #candidate-modal,
  #talent-pool-modal,
  #organization-department-modal,
  #organization-sector-modal
) .pipeline-modal-header .panel-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--tf-navy-900);
}

:is(
  #users-modal,
  #jobs-modal,
  #candidate-modal,
  #talent-pool-modal,
  #organization-department-modal,
  #organization-sector-modal
) .pipeline-modal-header p {
  color: var(--tf-text-muted) !important;
}

.tf-modal-title-badge {
  padding: 0.34rem 0.72rem;
  border: 1px solid currentColor;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.pipeline-modal-header .secondary-button,
.pipeline-editor-modal-header .secondary-button {
  flex: 0 0 auto;
}

:is(
  #users-modal,
  #jobs-modal,
  #candidate-modal,
  #talent-pool-modal,
  #organization-department-modal,
  #organization-sector-modal
) .pipeline-modal-header .secondary-button {
  min-height: 38px;
  border-color: rgba(16, 35, 63, 0.12);
  color: var(--tf-navy-900);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 18px rgba(16, 35, 63, 0.06);
}

:is(
  #users-modal,
  #jobs-modal,
  #candidate-modal,
  #talent-pool-modal,
  #organization-department-modal,
  #organization-sector-modal
) .pipeline-modal-header .secondary-button:hover {
  border-color: rgba(19, 138, 107, 0.28);
  color: var(--tf-brand-800);
  background: rgba(255, 255, 255, 0.96);
}

/* ---------- STATUS ---------- */

.pipeline-modal-status,
.pipeline-editor-modal-status {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0 22px;
  border-bottom: 0;
  background: #fff;
}

.pipeline-modal-status:has(span:not(:empty)),
.pipeline-editor-modal-status:has(span:not(:empty)) {
  padding-top: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--tf-form-border);
  background: #fbfcfb;
}

.pipeline-modal-status span,
.pipeline-editor-modal-status span {
  color: var(--tf-form-muted);
  font-size: 11px;
}

:is(
  #users-modal,
  #jobs-modal,
  #candidate-modal,
  #talent-pool-modal,
  #organization-department-modal,
  #organization-sector-modal
) .pipeline-modal-status {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 249, 0.88));
}

/* ---------- CORPO COM ROLAGEM ---------- */

.pipeline-editor-body,
.pipeline-modal-body,
.candidate-modal-body,
.candidate-modal-scroll,
.conversation-modal-body,
.conversation-transfer-modal-body,
.pipeline-editor-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 20px 22px;
  background: var(--tf-form-surface);
}

#talent-pool-modal-body,
#jobs-modal-body,
#users-modal-body,
#organization-department-modal-body,
#organization-sector-modal-body,
#media-studio-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 22px;
}

/* Remove alturas e paddings duplicados internos */

.candidate-modal-body .candidate-modal-scroll {
  padding: 0;
  overflow: visible;
}

.pipeline-editor-body > form,
.candidate-modal-scroll > form,
.conversation-modal-body > form {
  width: 100%;
}

/* ---------- FORMULÁRIOS ---------- */

.pipeline-modal form,
.conversation-modal-body,
.conversation-transfer-modal-body,
.candidate-modal-form,
.media-content-form {
  color: var(--tf-form-text);
}

.candidate-modal-form,
.pipeline-editor-panel-form,
.media-content-form {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 18px;
}

.candidate-modal-form-grid,
.media-step-grid,
.pipeline-editor-panel-form .form-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
}

.field > span,
.pipeline-modal label > span,
.conversation-modal-body label > span {
  color: var(--tf-text);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.field input,
.field select,
.field textarea,
.pipeline-modal input:not([type="checkbox"]):not([type="radio"]),
.pipeline-modal select,
.pipeline-modal textarea,
.conversation-modal-body input:not([type="checkbox"]):not([type="radio"]),
.conversation-modal-body select,
.conversation-modal-body textarea,
.conversation-transfer-modal-body input:not([type="checkbox"]):not([type="radio"]),
.conversation-transfer-modal-body select,
.conversation-transfer-modal-body textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--tf-border);
  border-radius: 10px;
  outline: none;
  color: var(--tf-text);
  background: linear-gradient(180deg, #ffffff, #fcfefd);
  font-size: 13px;
  line-height: 1.4;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.field textarea,
.pipeline-modal textarea,
.conversation-modal-body textarea,
.conversation-transfer-modal-body textarea {
  min-height: 104px;
  max-height: 240px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.pipeline-modal input:hover,
.pipeline-modal select:hover,
.pipeline-modal textarea:hover {
  border-color: #b9d5cb;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.pipeline-modal input:focus,
.pipeline-modal select:focus,
.pipeline-modal textarea:focus,
.conversation-modal-body input:focus,
.conversation-modal-body select:focus,
.conversation-modal-body textarea:focus {
  border-color: var(--tf-brand-600);
  box-shadow:
    0 0 0 3px rgba(19, 138, 107, 0.14),
    0 6px 14px rgba(19, 138, 107, 0.08);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled,
.pipeline-modal input:disabled,
.pipeline-modal select:disabled,
.pipeline-modal textarea:disabled {
  cursor: not-allowed;
  color: #73837d;
  background: #f1f5f3;
}

/* Inputs readonly */

.pipeline-modal input[readonly],
.pipeline-modal textarea[readonly],
.conversation-modal-body input[readonly] {
  color: #476059;
  background: #f3f8f5;
}

/* Checkbox e radio */

.pipeline-modal input[type="checkbox"],
.pipeline-modal input[type="radio"],
.conversation-modal-body input[type="checkbox"],
.conversation-modal-body input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--tf-form-brand);
}

/* ---------- SEÇÕES INTERNAS ---------- */

.pipeline-modal .panel,
.conversation-modal-body .panel,
.candidate-form-note,
.pipeline-modal-panel {
  border: 1px solid var(--tf-form-border);
  border-radius: 12px;
  background: #fbfcfb;
  box-shadow: none;
}

.candidate-form-note,
.pipeline-modal-panel {
  padding: 14px;
}

.tf-modal-form-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ui-form-section {
  border: 1px solid var(--tf-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 249, 0.98)),
    var(--tf-surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65), 0 6px 18px rgba(16, 35, 63, 0.04);
}

.ui-form-section__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 0;
}

.ui-form-section__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(19, 138, 107, 0.16);
  border-radius: 10px;
  color: var(--tf-brand-800);
  background: linear-gradient(180deg, rgba(223, 244, 236, 0.95), rgba(241, 250, 247, 0.95));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ui-form-section__title {
  color: var(--tf-navy-900);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.ui-form-section__description {
  margin-top: 4px;
  color: var(--tf-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ui-form-section__body {
  padding: 16px 18px 18px;
}

.ui-form-section__body > .ui-form-grid,
.ui-form-section__body > .candidate-modal-form-grid {
  margin: 0;
}

.tf-modal-inline-note,
.tf-modal-footer-note {
  color: var(--tf-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.tf-modal-inline-note {
  margin: 12px 0 0;
}

.candidate-form-note {
  color: var(--tf-navy-900);
  background: linear-gradient(180deg, rgba(223, 244, 236, 0.72), rgba(241, 250, 247, 0.98));
}

.candidate-form-hint,
.field small,
.pipeline-modal small,
.conversation-modal-body small {
  color: #7a8680;
  font-size: 10px;
  line-height: 1.45;
}

/* ---------- RODAPÉ FIXO ---------- */

.candidate-modal-footer,
.media-modal-footer,
.conversation-modal-footer,
.conversation-transfer-modal-footer,
.pipeline-editor-modal-footer,
.candidate-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: auto;
  margin: 18px -22px -20px;
  padding: 14px 22px;
  border-top: 1px solid var(--tf-form-border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.035);
  backdrop-filter: blur(10px);
}

/* Evita rodapé duplicado do Studio */

.media-content-form .media-modal-footer {
  margin: auto -22px -20px;
  padding: 14px 22px;
}

/* ---------- BOTÕES ---------- */

.pipeline-modal .primary-button,
.pipeline-modal .secondary-button,
.conversation-modal-shell .primary-button,
.conversation-modal-shell .secondary-button,
.conversation-transfer-modal-shell .primary-button,
.conversation-transfer-modal-shell .secondary-button {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 650;
}

.pipeline-modal .primary-button,
.conversation-modal-shell .primary-button,
.conversation-transfer-modal-shell .primary-button {
  border-color: rgba(8, 63, 52, 0.08);
  color: #fff;
  background: linear-gradient(145deg, var(--tf-brand-600), var(--tf-brand-800));
  box-shadow: 0 10px 22px rgba(19, 138, 107, 0.22);
}

.pipeline-modal .secondary-button,
.conversation-modal-shell .secondary-button,
.conversation-transfer-modal-shell .secondary-button {
  border-color: rgba(16, 35, 63, 0.12);
  color: var(--tf-text);
  background: #fff;
}

.pipeline-modal .secondary-button:hover,
.conversation-modal-shell .secondary-button:hover {
  color: var(--tf-brand-800);
  border-color: rgba(19, 138, 107, 0.24);
  background: var(--tf-brand-50);
}

.pipeline-modal .primary-button:hover,
.conversation-modal-shell .primary-button:hover,
.conversation-transfer-modal-shell .primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(19, 138, 107, 0.24);
}

.pipeline-modal .primary-button:focus-visible,
.pipeline-modal .secondary-button:focus-visible,
.conversation-modal-shell .primary-button:focus-visible,
.conversation-modal-shell .secondary-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(19, 138, 107, 0.14);
}

.pipeline-modal .primary-button[disabled],
.pipeline-modal .secondary-button[disabled] {
  transform: none;
  box-shadow: none;
}

.pipeline-modal .secondary-button[data-danger],
.pipeline-modal .danger-button {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.18);
  background: #fff7f7;
}

.pipeline-modal .secondary-button[data-danger]:hover,
.pipeline-modal .danger-button:hover {
  background: #feecec;
}

/* ---------- BANCO DE TALENTOS ---------- */

.talent-pool-modal-shell {
  width: min(calc(100% - 32px), 1120px);
  max-width: 1120px;
  max-height: calc(100dvh - 32px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#talent-pool-modal-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  align-items: stretch;
}

#talent-pool-modal .ui-modal__body > .ui-form,
#talent-pool-modal-body form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: 0;
  gap: 0;
  align-self: stretch;
}

#talent-pool-modal-body form > * {
  min-width: 0;
}

#talent-pool-modal-body .ui-form__content {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px 24px;
  scrollbar-gutter: stable;
  align-self: stretch;
}

#talent-pool-modal-body .ui-form-section {
  width: 100%;
  max-width: none;
  min-width: 0;
}

#talent-pool-modal-body .talent-pool-modal-section-grid {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

#talent-pool-modal-body form > .field,
#talent-pool-modal-body form > label {
  min-width: 0;
}

#talent-pool-modal-body form > .field:has(textarea),
#talent-pool-modal-body form > label:has(textarea),
#talent-pool-modal-body form > .candidate-form-note,
#talent-pool-modal-body form > .candidate-form-actions,
#talent-pool-modal-body form > div:last-child {
  grid-column: 1 / -1;
}

#talent-pool-modal-body textarea {
  min-height: 112px;
}

#talent-pool-modal-body .candidate-modal-footer {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
}

#talent-pool-modal .pipeline-modal-header {
  flex-wrap: wrap;
}

#talent-pool-modal .pipeline-modal-status {
  flex: 0 0 auto;
}

#talent-pool-modal .candidate-modal-footer {
  margin-top: auto;
}

/* ---------- CANDIDATO ---------- */

.candidate-modal-shell {
  max-height: calc(100vh - 32px);
}

.candidate-modal-form-grid {
  align-items: start;
}

.candidate-modal-footer {
  margin-top: auto;
}

/* ---------- VAGAS E USUÁRIOS ---------- */

#jobs-modal-body form:not(.ui-form),
#users-modal-body form:not(.ui-form),
#organization-department-modal-body form:not(.ui-form),
#organization-sector-modal-body form:not(.ui-form) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

#jobs-modal-body form:not(.ui-form) > .field:has(textarea),
#users-modal-body form:not(.ui-form) > .field:has(textarea),
#jobs-modal-body form:not(.ui-form) > div:last-child,
#users-modal-body form:not(.ui-form) > div:last-child {
  grid-column: 1 / -1;
}

/* ---------- RESPONSIVIDADE ---------- */

@media (max-width: 900px) {
  .pipeline-modal,
  .conversation-contact-modal,
  .conversation-action-modal {
    align-items: flex-start;
    padding: 10px;
    overflow-y: auto;
  }

  .pipeline-modal-shell,
  .conversation-modal-shell,
  .conversation-transfer-modal-shell,
  .pipeline-editor-modal-shell,
  .users-modal-shell,
  .jobs-modal-shell,
  .candidate-modal-shell,
  .talent-pool-modal-shell,
  .media-studio-modal-shell {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }

  .candidate-modal-form-grid,
  .media-step-grid,
  .pipeline-editor-panel-form .form-grid,
  .form-grid,
  #jobs-modal-body form:not(.ui-form),
  #users-modal-body form:not(.ui-form),
  #organization-department-modal-body form:not(.ui-form),
  #organization-sector-modal-body form:not(.ui-form) {
    grid-template-columns: 1fr;
  }

  #jobs-modal-body form:not(.ui-form) > *,
  #users-modal-body form:not(.ui-form) > * {
    grid-column: 1;
  }

  #talent-pool-modal.pipeline-modal {
    align-items: center;
    padding: 12px 16px;
    overflow: hidden;
  }

  .talent-pool-modal-shell {
    width: min(calc(100% - 32px), 1120px);
    max-width: 1120px;
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }

  #talent-pool-modal-body,
  #talent-pool-modal-body form {
    min-height: 0;
  }

  #talent-pool-modal-body .talent-pool-modal-section-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-stage-editor-flags {
    grid-template-columns: 1fr;
  }

  .evolution-modal-shell {
    width: min(100%, calc(100vw - 24px));
  }

  .evolution-modal-body {
    padding: 1rem;
  }

  .evolution-qr-surface {
    min-height: 280px;
  }

  .evolution-status-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .evolution-modal-actions-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .pipeline-modal,
  .conversation-contact-modal,
  .conversation-action-modal {
    padding: 12px;
  }

  #talent-pool-modal.pipeline-modal {
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 8px;
    overflow: hidden;
  }

  .pipeline-modal-shell,
  .conversation-modal-shell,
  .conversation-transfer-modal-shell,
  .pipeline-editor-modal-shell {
    width: 100%;
    min-height: 0;
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  .pipeline-modal-header,
  .pipeline-editor-modal-header {
    min-height: 70px;
    padding: 15px 16px;
  }

  .ui-form-section__header,
  .ui-form-section__body {
    padding-right: 16px;
    padding-left: 16px;
  }

  #talent-pool-modal .pipeline-modal-header {
    align-items: flex-start;
    gap: 12px 14px;
  }

  #talent-pool-modal .pipeline-modal-header > div:last-child {
    width: 100%;
    justify-content: flex-end;
  }

  .pipeline-modal-header .panel-title,
  .pipeline-editor-modal-header .panel-title {
    font-size: 17px;
  }

  .pipeline-editor-body,
  .pipeline-modal-body,
  .candidate-modal-body,
  .candidate-modal-scroll,
  .conversation-modal-body,
  .conversation-transfer-modal-body,
  #talent-pool-modal-body,
  #jobs-modal-body,
  #users-modal-body,
  #organization-department-modal-body,
  #organization-sector-modal-body,
  #media-studio-modal-body {
    padding: 16px;
  }

  .pipeline-editor-modal-body {
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .talent-pool-modal-shell {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }

  #talent-pool-modal-body .ui-form__content {
    padding: 16px;
    padding-bottom: 20px;
  }

  #talent-pool-modal-body form,
  #talent-pool-modal-body .talent-pool-modal-section-grid {
    grid-template-columns: 1fr;
  }

  .candidate-modal-footer,
  .media-modal-footer,
  .conversation-modal-footer,
  .conversation-transfer-modal-footer,
  .pipeline-editor-modal-footer,
  .candidate-form-actions {
    margin-right: -16px;
    margin-bottom: -16px;
    margin-left: -16px;
    padding: 12px 16px;
  }

  .candidate-modal-footer,
  .media-modal-footer,
  .conversation-modal-footer,
  .conversation-transfer-modal-footer,
  .candidate-form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .candidate-modal-footer button,
  .media-modal-footer button,
  .conversation-modal-footer button,
  .conversation-transfer-modal-footer button,
  .candidate-form-actions button {
    width: 100%;
  }

  #talent-pool-modal .candidate-modal-footer {
    gap: 12px;
  }

  .ui-form-section__header {
    gap: 10px;
  }

  .ui-form-section__icon {
    width: 30px;
    height: 30px;
  }

  .evolution-modal-shell {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .evolution-modal-header {
    padding-bottom: 1rem;
  }

  .evolution-qr-card,
  .evolution-instructions-card,
  .evolution-status-card,
  .evolution-settings-card {
    padding: 1rem;
  }

  .evolution-qr-surface {
    min-height: 240px;
    padding: 0.75rem;
  }

  .evolution-qr-image {
    width: min(100%, 260px);
  }

  .evolution-qr-placeholder {
    min-height: 220px;
    font-size: 0.9rem;
  }
}

@media (max-height: 760px) {
  .pipeline-stage-editor-flags {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   FASE 2 — FUNDAÇÃO UI CENTRAL
   ========================================================= */

.ui-modal {
  position: fixed;
  inset: 0;
  z-index: var(--ui-z-modal);
  display: none;
  align-items: center;
  justify-items: center;
  padding: var(--ui-space-4);
  overflow: hidden;
  background: var(--ui-color-overlay);
  backdrop-filter: blur(5px);
}

.ui-modal.is-open {
  display: grid;
}

.ui-modal__shell {
  display: flex;
  flex-direction: column;
  width: min(100%, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-color-surface);
  box-shadow: var(--ui-shadow-modal);
}

.ui-modal--sm {
  max-width: var(--ui-modal-sm);
}

.ui-modal--md {
  max-width: var(--ui-modal-md);
}

.ui-modal--lg {
  max-width: var(--ui-modal-lg);
}

.ui-modal__header {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ui-space-4);
  min-width: 0;
  margin: 0;
  padding: var(--ui-space-5) var(--ui-space-6) var(--ui-space-4);
  border-bottom: 1px solid var(--ui-color-border);
  background: var(--ui-color-surface);
}

.ui-modal__title {
  margin: 0;
  color: var(--ui-color-text);
  font-size: var(--ui-title-md);
  font-weight: 730;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.ui-modal__description {
  max-width: 680px;
  margin: var(--ui-space-1) 0 0;
  color: var(--ui-color-muted);
  font-size: var(--ui-text-xs);
  line-height: 1.5;
}

.ui-modal__status {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0 var(--ui-space-6);
  border-bottom: 0;
  background: var(--ui-color-surface);
}

.ui-modal__status:has(span:not(:empty)) {
  padding-top: var(--ui-space-2);
  padding-bottom: var(--ui-space-2);
  border-bottom: 1px solid var(--ui-color-border);
  background: #fbfcfb;
}

.ui-modal__status span {
  color: var(--ui-color-muted);
  font-size: 11px;
}

.ui-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: var(--ui-space-5) var(--ui-space-6);
  background: var(--ui-color-surface);
}

.ui-modal__footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-4);
  width: 100%;
  margin: 0;
  padding: var(--ui-space-4) 0 0;
  border-top: 1px solid var(--ui-color-border);
  background: var(--ui-color-surface);
}

.ui-modal__close {
  flex: 0 0 auto;
}

.ui-form {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: var(--ui-space-5);
  color: var(--ui-color-text);
}

.ui-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ui-space-4) var(--ui-space-5);
}

.ui-form-grid > * {
  min-width: 0;
}

.ui-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
}

.ui-field--full {
  grid-column: 1 / -1;
}

.ui-field__label {
  color: #3e4c45;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.ui-field__help,
.ui-field__error {
  font-size: 10px;
  line-height: 1.45;
}

.ui-field__help {
  color: #7a8680;
}

.ui-field__error {
  color: var(--ui-color-danger);
}

.ui-control {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: var(--ui-control-md);
  padding: 10px 12px;
  border: 1px solid var(--ui-color-border-strong);
  border-radius: var(--ui-radius-sm);
  outline: none;
  color: var(--ui-color-text);
  background: #fff;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.ui-control:hover {
  border-color: #bfcfc7;
}

.ui-control:focus {
  border-color: var(--ui-color-brand);
  box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.11);
}

.ui-control:disabled {
  cursor: not-allowed;
  color: #7b8781;
  background: #f3f6f4;
}

.ui-control[readonly] {
  border-color: #d7e1dc;
  color: #5f6b65;
  background: #f4f7f5;
  box-shadow: none;
  cursor: default;
}

textarea.ui-control {
  min-height: 104px;
  max-height: 240px;
  resize: vertical;
}

.ui-control--textarea-sm {
  min-height: 100px;
}

.ui-control--textarea-md {
  min-height: 120px;
}

.ui-form__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ui-space-3);
  flex-wrap: wrap;
  min-width: 0;
}

.ui-form--modal {
  height: 100%;
  min-height: 0;
  gap: 0;
}

.ui-form__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--ui-space-5) var(--ui-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-4);
}

.ui-form__section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.ui-form-grid--compact {
  gap: 14px 16px;
}

.ui-checkbox-field {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-color-surface-muted);
  color: #425049;
  font-size: 13px;
  line-height: 1.4;
}

.ui-checkbox-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-2);
  min-height: var(--ui-control-sm);
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-sm);
  font-size: var(--ui-text-xs);
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  white-space: nowrap;
}

.ui-button--primary {
  border-color: var(--ui-color-brand);
  color: #fff;
  background: linear-gradient(145deg, #138765, #095640);
}

.ui-button--secondary {
  border-color: var(--ui-color-border-strong);
  color: #425049;
  background: #fff;
}

.ui-button--danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff7f7;
}

.ui-button--compact {
  min-height: var(--ui-control-sm);
  padding-inline: 12px;
}

#users-modal.ui-modal,
#talent-pool-modal.ui-modal {
  z-index: var(--ui-z-modal);
}

#users-modal .ui-modal__shell,
#talent-pool-modal .ui-modal__shell {
  width: min(100%, calc(100vw - 32px));
}

#users-modal .ui-modal__body,
#talent-pool-modal .ui-modal__body,
#jobs-modal .ui-modal__body,
#organization-department-modal .ui-modal__body,
#organization-sector-modal .ui-modal__body {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

#users-modal .ui-modal__body > .ui-form,
#talent-pool-modal .ui-modal__body > .ui-form,
#jobs-modal .ui-modal__body > .ui-form,
#organization-department-modal .ui-modal__body > .ui-form,
#organization-sector-modal .ui-modal__body > .ui-form {
  flex: 1 1 auto;
  min-height: 0;
}

#users-modal .ui-modal__footer,
#talent-pool-modal .ui-modal__footer {
  margin-top: auto;
}

#jobs-modal .ui-modal__footer,
#organization-department-modal .ui-modal__footer,
#organization-sector-modal .ui-modal__footer {
  margin-top: auto;
}

#users-modal .ui-form__actions,
#talent-pool-modal .ui-form__actions {
  margin-left: auto;
}

#users-modal .candidate-modal-footer,
#talent-pool-modal .candidate-modal-footer {
  position: static;
  bottom: auto;
  z-index: auto;
  width: 100%;
  margin: 0;
  padding: var(--ui-space-4) 0 0;
  border-top: 1px solid var(--ui-color-border);
  background: var(--ui-color-surface);
  box-shadow: none;
  backdrop-filter: none;
}

#users-modal .candidate-form-actions,
#talent-pool-modal .candidate-form-actions {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#candidate-modal.ui-modal,
#jobs-modal.ui-modal,
#pipeline-editor-modal.ui-modal,
#pipeline-fields-modal.ui-modal {
  z-index: var(--ui-z-modal);
}

#candidate-modal .ui-modal__shell,
#jobs-modal .ui-modal__shell,
#pipeline-editor-modal .ui-modal__shell,
#pipeline-fields-modal .ui-modal__shell {
  width: min(100%, calc(100vw - 32px));
}

#candidate-modal .ui-modal__body,
#pipeline-editor-modal .ui-modal__body,
#pipeline-fields-modal .ui-modal__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#pipeline-editor-modal .ui-modal__body {
  overflow: hidden;
  padding: 0;
}

#pipeline-editor-modal .ui-modal__shell,
#pipeline-editor-modal .pipeline-editor-modal-shell {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 24px);
  max-height: calc(100dvh - 24px);
  min-height: 0;
  overflow: hidden;
}

#pipeline-editor-modal .pipeline-editor-modal-header,
#pipeline-editor-modal .pipeline-editor-modal-status {
  flex: 0 0 auto;
}

#pipeline-editor-modal #pipeline-detail-body {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding: 0;
}

#pipeline-editor-modal #pipeline-detail-body > .pipeline-editor-modal-body {
  min-height: min-content;
  min-width: 0;
}

#pipeline-editor-modal .pipeline-editor-modal-body--stage {
  overflow: visible;
}

#candidate-modal .ui-modal__body > .ui-form,
#pipeline-fields-modal .ui-modal__body > .ui-form {
  min-height: 100%;
}

#candidate-modal .candidate-modal-footer,
#pipeline-editor-modal .ui-modal__footer,
#pipeline-fields-modal .ui-modal__footer {
  position: static;
  bottom: auto;
  z-index: auto;
  width: 100%;
  margin: 0;
  padding: var(--ui-space-4) 0 0;
  border-top: 1px solid var(--ui-color-border);
  background: var(--ui-color-surface);
  box-shadow: none;
  backdrop-filter: none;
}

#candidate-modal .candidate-form-actions,
#pipeline-editor-modal .ui-form__actions,
#pipeline-fields-modal .ui-form__actions {
  margin-left: auto;
}

#candidate-modal .candidate-form-actions,
#jobs-modal .candidate-form-actions,
#pipeline-editor-modal .pipeline-editor-panel-footer,
#pipeline-fields-modal .candidate-form-actions {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#candidate-modal .candidate-modal-body .candidate-modal-scroll {
  padding: 0;
  overflow: visible;
}

#jobs-modal .ui-form-grid,
#users-modal .ui-form-grid,
#pipeline-editor-modal .ui-form-grid,
#pipeline-fields-modal .ui-form-grid,
#candidate-modal .ui-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#jobs-modal .ui-modal__shell {
  max-width: 940px;
}

#users-modal .ui-modal__shell {
  max-width: 840px;
}

#talent-pool-modal .ui-modal__shell {
  max-width: 1120px;
}

#organization-department-modal.ui-modal,
#organization-sector-modal.ui-modal {
  z-index: var(--ui-z-modal);
}

#organization-department-modal .ui-modal__shell,
#organization-sector-modal .ui-modal__shell {
  width: min(100%, calc(100vw - 32px));
  max-width: 680px;
}

#jobs-modal .ui-form__content,
#users-modal .ui-form__content,
#organization-department-modal .ui-form__content,
#organization-sector-modal .ui-form__content {
  padding: 20px 24px;
}

#jobs-modal .ui-modal__footer,
#users-modal .ui-modal__footer,
#talent-pool-modal .ui-modal__footer,
#organization-department-modal .ui-modal__footer,
#organization-sector-modal .ui-modal__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--ui-color-border);
  background: var(--ui-color-surface);
}

#jobs-modal .ui-form__actions,
#users-modal .ui-form__actions,
#talent-pool-modal .ui-form__actions,
#organization-department-modal .ui-form__actions,
#organization-sector-modal .ui-form__actions {
  margin-left: auto;
}

#jobs-modal .pipeline-detail-block,
#users-modal .pipeline-detail-block {
  gap: 12px;
}

#jobs-modal .section-meta,
#users-modal .section-meta {
  margin-bottom: 0;
}

#jobs-modal textarea.ui-control:not(.ui-control--textarea-md),
#users-modal textarea.ui-control,
#talent-pool-modal textarea.ui-control,
#organization-department-modal textarea.ui-control,
#organization-sector-modal textarea.ui-control {
  min-height: 100px;
}

@media (max-width: 599px) {
  .ui-modal {
    padding: var(--ui-space-2);
    align-items: stretch;
  }

  .ui-modal__shell {
    width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: var(--ui-radius-lg);
  }

  .ui-modal__header,
  .ui-modal__body {
    padding-right: var(--ui-space-4);
    padding-left: var(--ui-space-4);
  }

  .ui-modal__header {
    padding-top: var(--ui-space-4);
    padding-bottom: var(--ui-space-4);
  }

  .ui-modal__body {
    padding-top: var(--ui-space-4);
    padding-bottom: var(--ui-space-4);
  }

  .ui-modal__footer,
  .ui-form__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ui-modal__footer > *,
  .ui-form__actions > * {
    width: 100%;
  }

  #jobs-modal .ui-form-grid,
  #users-modal .ui-form-grid,
  #organization-department-modal .ui-form-grid,
  #organization-sector-modal .ui-form-grid,
  #pipeline-editor-modal .ui-form-grid,
  #pipeline-fields-modal .ui-form-grid,
  #candidate-modal .ui-form-grid {
    grid-template-columns: 1fr;
  }

  .ui-form__content {
    padding: var(--ui-space-4);
  }

  #jobs-modal .ui-modal__footer,
  #users-modal .ui-modal__footer,
  #organization-department-modal .ui-modal__footer,
  #organization-sector-modal .ui-modal__footer {
    padding: 16px;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .ui-modal {
    padding: var(--ui-space-3);
    align-items: start;
    overflow-y: auto;
  }

  .ui-modal__shell {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
  }

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

  #jobs-modal .ui-form-grid,
  #users-modal .ui-form-grid,
  #organization-department-modal .ui-form-grid,
  #organization-sector-modal .ui-form-grid,
  #pipeline-editor-modal .ui-form-grid,
  #pipeline-fields-modal .ui-form-grid,
  #candidate-modal .ui-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .ui-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar-toggle,
  .sidebar-group-toggle,
  .sidebar-group-chevron,
  .sidebar-nav-group-items {
    transition: none;
  }
}

/* TalentFlow login V2 */
#talentflow-auth-overlay {
  inset: 0;
  padding: 0;
  overflow: auto;
  background: #071940;
  overscroll-behavior: contain;
}

#talentflow-auth-overlay .tf-auth {
  display: grid;
  grid-template-columns: minmax(500px, 1.05fr) minmax(480px, 0.95fr);
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

#talentflow-auth-overlay .tf-auth-showcase {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 4vw, 4.5rem);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(
      circle at 75% 78%,
      rgba(124, 58, 237, 0.52),
      transparent 34%
    ),
    radial-gradient(
      circle at 12% 90%,
      rgba(14, 165, 233, 0.38),
      transparent 34%
    ),
    linear-gradient(145deg, #050f35 0%, #092466 54%, #102f8f 100%);
}

#talentflow-auth-overlay .tf-auth-showcase::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.28;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.42) 1px, transparent 1px);
  background-size: 2rem 2rem;
  mask-image: linear-gradient(to bottom, #000, transparent 48%);
}

#talentflow-auth-overlay .tf-auth-showcase-content {
  position: relative;
  z-index: 4;
  width: min(100%, 650px);
}

#talentflow-auth-overlay .tf-auth-showcase-brand,
#talentflow-auth-overlay .tf-auth-card-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

#talentflow-auth-overlay .tf-auth-showcase-mark,
#talentflow-auth-overlay .tf-auth-card-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 850;
  background: linear-gradient(145deg, #0bc5e8, #2874f0 52%, #7928ed);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

#talentflow-auth-overlay .tf-auth-showcase-mark {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 1rem;
}

#talentflow-auth-overlay .tf-auth-showcase-brand > div,
#talentflow-auth-overlay .tf-auth-card-brand > div {
  display: grid;
  gap: 0.15rem;
}

#talentflow-auth-overlay .tf-auth-showcase-brand strong {
  color: #fff;
  font-size: 1.05rem;
}

#talentflow-auth-overlay .tf-auth-showcase-brand div span {
  color: rgba(224, 242, 254, 0.72);
  font-size: 0.78rem;
}

#talentflow-auth-overlay .tf-auth-showcase-copy {
  margin-top: clamp(3rem, 7vh, 5.5rem);
}

#talentflow-auth-overlay .tf-auth-eyebrow {
  margin: 0 0 1rem;
  color: #67e8f9;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#talentflow-auth-overlay .tf-auth-showcase-copy h1 {
  max-width: 650px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.8rem, 5vw, 4.9rem);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

#talentflow-auth-overlay .tf-auth-showcase-description {
  max-width: 570px;
  margin: 1.4rem 0 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.7;
}

#talentflow-auth-overlay .tf-auth-benefits {
  position: relative;
  z-index: 5;
  width: min(100%, 610px);
  display: grid;
  gap: 0.75rem;
  margin: clamp(2rem, 4vh, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

#talentflow-auth-overlay .tf-auth-benefits li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 1rem;
  background: rgba(3, 15, 54, 0.42);
  backdrop-filter: blur(12px);
}

#talentflow-auth-overlay .tf-auth-benefit-icon {
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 2.7rem;
  display: grid;
  place-items: center;
  padding: 0.65rem;
  border-radius: 0.85rem;
  color: #67e8f9;
  background: rgba(14, 165, 233, 0.17);
}

#talentflow-auth-overlay .tf-auth-benefits li > div {
  display: grid;
  gap: 0.14rem;
}

#talentflow-auth-overlay .tf-auth-benefits strong {
  color: #fff;
  font-size: 0.92rem;
}

#talentflow-auth-overlay .tf-auth-benefits li > div span {
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.78rem;
  line-height: 1.4;
}

#talentflow-auth-overlay .tf-auth-visual {
  position: absolute;
  z-index: 1;
  right: -5%;
  bottom: -4%;
  width: min(64%, 610px);
  height: 55%;
  pointer-events: none;
  overflow: hidden;
}

#talentflow-auth-overlay .tf-auth-visual-image {
  position: absolute;
  inset: -95% -12% -5% -10%;
  background-image: url("/assets/Talent_Flow_login.png");
  background-repeat: no-repeat;
  background-position: 50% 84%;
  background-size: 115% auto;
  filter: saturate(1.08) contrast(1.02);
}

#talentflow-auth-overlay .tf-auth-visual-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, #092466 0%, transparent 28%),
    linear-gradient(to top, #102f8f 0%, transparent 42%);
}

#talentflow-auth-overlay .tf-auth-showcase-footer {
  position: relative;
  z-index: 6;
  margin: auto 0 0;
  padding-top: 2rem;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.9rem;
}

#talentflow-auth-overlay .tf-auth-showcase-footer strong {
  color: #67e8f9;
}

#talentflow-auth-overlay .tf-auth-access {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4.5rem);
  overflow-y: auto;
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(14, 165, 233, 0.07),
      transparent 28rem
    ),
    #f5f8fd;
}

#talentflow-auth-overlay .tf-auth-access-inner {
  width: min(100%, 500px);
  margin: auto;
}

#talentflow-auth-overlay .tf-auth-card {
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid #dce5f0;
  border-radius: 1.75rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 28px 75px rgba(15, 23, 42, 0.09),
    0 5px 18px rgba(15, 23, 42, 0.035);
}

#talentflow-auth-overlay .tf-auth-card-mark {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 1rem;
}

#talentflow-auth-overlay .tf-auth-card-product {
  color: #526181;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

#talentflow-auth-overlay .tf-auth-card-brand strong {
  color: #101827;
  font-size: 0.92rem;
}

#talentflow-auth-overlay .tf-auth-heading {
  margin-top: 2.7rem;
}

#talentflow-auth-overlay .tf-auth-heading h2 {
  margin: 0;
  color: #0c1529;
  font-size: clamp(2rem, 3.3vw, 2.65rem);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

#talentflow-auth-overlay .tf-auth-heading p {
  margin: 0.85rem 0 0;
  color: #61708a;
  font-size: 0.97rem;
  line-height: 1.65;
}

#talentflow-auth-overlay .tf-auth-form {
  display: grid;
  gap: 1.15rem;
  margin-top: 2.2rem;
}

#talentflow-auth-overlay .tf-auth-field {
  display: grid;
  gap: 0.5rem;
}

#talentflow-auth-overlay .tf-auth-field > span:first-child {
  color: #182033;
  font-size: 0.82rem;
  font-weight: 750;
}

#talentflow-auth-overlay .tf-auth-control {
  position: relative;
  display: flex;
  align-items: center;
}

#talentflow-auth-overlay .tf-auth-control input {
  width: 100%;
  min-height: 3.55rem;
  padding: 0.85rem 3.3rem;
  border: 1px solid #d8e1ec;
  border-radius: 0.85rem;
  outline: none;
  background: #fff;
  color: #101827;
  font: inherit;
  font-size: 0.96rem;
}

#talentflow-auth-overlay .tf-auth-control input::placeholder {
  color: #98a5b8;
}

#talentflow-auth-overlay .tf-auth-control input:focus-visible {
  border-color: #168de2;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.13);
}

#talentflow-auth-overlay .tf-auth-control-icon {
  position: absolute;
  z-index: 1;
  left: 1.05rem;
  width: 1.2rem;
  height: 1.2rem;
  color: #8492aa;
  pointer-events: none;
}

#talentflow-auth-overlay .tf-auth-password-toggle {
  position: absolute;
  z-index: 2;
  right: 0.65rem;
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  padding: 0.65rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: #8492aa;
  cursor: pointer;
}

#talentflow-auth-overlay .tf-auth-password-toggle:hover {
  color: #2563eb;
  background: #eff6ff;
}

#talentflow-auth-overlay .tf-auth-password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.17);
}

#talentflow-auth-overlay .tf-auth-submit {
  min-height: 3.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.15rem;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 0.85rem;
  color: #fff;
  background: linear-gradient(105deg, #14b87a, #078d64);
  font: inherit;
  font-size: 1rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(5, 150, 105, 0.17);
}

#talentflow-auth-overlay .tf-auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.025);
}

#talentflow-auth-overlay .tf-auth-submit:disabled {
  opacity: 0.68;
  cursor: wait;
}

#talentflow-auth-overlay .tf-auth-submit svg {
  width: 1.15rem;
  height: 1.15rem;
}

#talentflow-auth-overlay .tf-auth-feedback {
  min-height: 1.2rem;
  margin: -0.25rem 0 0;
  color: #b42318;
  font-size: 0.82rem;
  font-weight: 650;
}

#talentflow-auth-overlay .tf-auth-feedback:empty {
  min-height: 0;
}

#talentflow-auth-overlay .tf-auth-security {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.75rem;
  padding: 1rem;
  border: 1px solid #c3edf4;
  border-radius: 0.95rem;
  background: #effcff;
}

#talentflow-auth-overlay .tf-auth-security > span {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  display: grid;
  place-items: center;
  padding: 0.5rem;
  border-radius: 0.75rem;
  color: #fff;
  background: linear-gradient(145deg, #13c4d5, #078fe3);
}

#talentflow-auth-overlay .tf-auth-security p {
  margin: 0;
  color: #41516e;
  font-size: 0.84rem;
  line-height: 1.5;
}

#talentflow-auth-overlay .tf-auth-copyright {
  margin: 1.25rem 0 0;
  color: #76839a;
  font-size: 0.76rem;
  text-align: center;
}

#talentflow-auth-overlay .tf-auth svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 1100px) {
  #talentflow-auth-overlay .tf-auth {
    grid-template-columns: minmax(400px, 0.9fr) minmax(470px, 1.1fr);
  }

  #talentflow-auth-overlay .tf-auth-showcase {
    padding-inline: 2.5rem;
  }

  #talentflow-auth-overlay .tf-auth-showcase-copy h1 {
    font-size: clamp(2.65rem, 4.7vw, 3.9rem);
  }
}

@media (max-width: 900px) {
  #talentflow-auth-overlay .tf-auth {
    display: block;
  }

  #talentflow-auth-overlay .tf-auth-showcase {
    display: none;
  }

  #talentflow-auth-overlay .tf-auth-access {
    width: 100%;
  }
}

@media (max-width: 560px) {
  #talentflow-auth-overlay .tf-auth-access {
    align-items: flex-start;
    padding: 0;
    background: #fff;
  }

  #talentflow-auth-overlay .tf-auth-access-inner {
    width: 100%;
  }

  #talentflow-auth-overlay .tf-auth-card {
    min-height: 100vh;
    min-height: 100dvh;
    padding:
      max(1.5rem, env(safe-area-inset-top))
      1.25rem
      max(1.5rem, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #talentflow-auth-overlay .tf-auth-copyright {
    display: none;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  #talentflow-auth-overlay .tf-auth-showcase-copy {
    margin-top: 2rem;
  }

  #talentflow-auth-overlay .tf-auth-benefits {
    margin-top: 1.5rem;
    gap: 0.55rem;
  }

  #talentflow-auth-overlay .tf-auth-access {
    align-items: flex-start;
    padding-block: 1.25rem;
  }

  #talentflow-auth-overlay .tf-auth-card {
    padding-block: 2rem;
  }

  #talentflow-auth-overlay .tf-auth-heading {
    margin-top: 1.6rem;
  }

  #talentflow-auth-overlay .tf-auth-form {
    margin-top: 1.4rem;
    gap: 0.85rem;
  }

  #talentflow-auth-overlay .tf-auth-security {
    margin-top: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #talentflow-auth-overlay .tf-auth *,
  #talentflow-auth-overlay .tf-auth *::before,
  #talentflow-auth-overlay .tf-auth *::after {
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}

/* TalentFlow login V2 refinement 20260720 */
#talentflow-auth-overlay .tf-auth svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

/* Corrige o ícone gigante do botão */
#talentflow-auth-overlay .tf-auth-submit {
  width: 100%;
  min-height: 3.65rem;
  height: auto;
  position: relative;
  overflow: hidden;
}

#talentflow-auth-overlay .tf-auth-submit svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
}

/* Padroniza ícones do formulário */
#talentflow-auth-overlay .tf-auth-control-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

#talentflow-auth-overlay .tf-auth-password-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
}

#talentflow-auth-overlay .tf-auth-benefit-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

#talentflow-auth-overlay .tf-auth-security svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Reequilibra o painel esquerdo */
#talentflow-auth-overlay .tf-auth-showcase {
  padding-top: clamp(2rem, 4vh, 3.25rem);
  padding-bottom: clamp(2rem, 4vh, 3rem);
}

#talentflow-auth-overlay .tf-auth-showcase-copy {
  margin-top: clamp(2.5rem, 5.5vh, 4.5rem);
}

#talentflow-auth-overlay .tf-auth-showcase-copy h1 {
  max-width: 680px;
  font-size: clamp(2.65rem, 4.7vw, 4.55rem);
  line-height: 1.02;
}

#talentflow-auth-overlay .tf-auth-showcase-description {
  max-width: 620px;
  margin-top: 1.25rem;
}

/* Evita que a arte antiga concorra com os cards HTML */
#talentflow-auth-overlay .tf-auth-visual {
  right: -2%;
  bottom: 0;
  width: min(58%, 560px);
  height: 47%;
  opacity: 0.84;
}

#talentflow-auth-overlay .tf-auth-visual-image {
  inset: -108% -16% -4% -14%;
  background-position: 50% 88%;
  background-size: 120% auto;
  filter:
    saturate(0.92)
    contrast(1.03)
    brightness(0.85);
}

/* Máscara para esconder textos e ícones internos da arte original */
#talentflow-auth-overlay .tf-auth-visual-gradient {
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      #092466 0%,
      rgba(9, 36, 102, 0.96) 10%,
      rgba(9, 36, 102, 0.48) 34%,
      transparent 58%
    ),
    linear-gradient(
      to right,
      #092466 0%,
      rgba(9, 36, 102, 0.68) 18%,
      transparent 42%
    ),
    linear-gradient(
      to top,
      #102f8f 0%,
      rgba(16, 47, 143, 0.55) 22%,
      transparent 58%
    );
}

/* Cards de benefícios com melhor leitura */
#talentflow-auth-overlay .tf-auth-benefits {
  width: min(100%, 640px);
  margin-top: clamp(1.6rem, 3vh, 2.4rem);
  gap: 0.65rem;
}

#talentflow-auth-overlay .tf-auth-benefits li {
  min-height: 4.7rem;
  padding: 0.75rem 1rem;
  background: rgba(4, 20, 69, 0.82);
  box-shadow:
    0 10px 30px rgba(2, 8, 23, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.04);
}

/* Rodapé sem sobreposição */
#talentflow-auth-overlay .tf-auth-showcase-footer {
  position: relative;
  z-index: 10;
  margin-top: auto;
  padding-top: 1.5rem;
  max-width: 620px;
}

/* Card direito mais compacto e sem rolagem desnecessária */
#talentflow-auth-overlay .tf-auth-access {
  padding-block: clamp(1.5rem, 3vh, 2.75rem);
}

#talentflow-auth-overlay .tf-auth-card {
  padding: clamp(2rem, 3.2vw, 2.8rem);
}

#talentflow-auth-overlay .tf-auth-heading {
  margin-top: 2.25rem;
}

#talentflow-auth-overlay .tf-auth-form {
  margin-top: 1.9rem;
}

#talentflow-auth-overlay .tf-auth-security {
  margin-top: 1.5rem;
}

@media (max-height: 820px) and (min-width: 901px) {
  #talentflow-auth-overlay .tf-auth-showcase-copy {
    margin-top: 2rem;
  }

  #talentflow-auth-overlay .tf-auth-showcase-copy h1 {
    font-size: clamp(2.45rem, 4vw, 3.65rem);
  }

  #talentflow-auth-overlay .tf-auth-showcase-description {
    margin-top: 0.9rem;
  }

  #talentflow-auth-overlay .tf-auth-benefits {
    margin-top: 1.25rem;
    gap: 0.5rem;
  }

  #talentflow-auth-overlay .tf-auth-benefits li {
    min-height: 4rem;
    padding-block: 0.55rem;
  }

  #talentflow-auth-overlay .tf-auth-card {
    padding-block: 1.8rem;
  }

  #talentflow-auth-overlay .tf-auth-heading {
    margin-top: 1.5rem;
  }

  #talentflow-auth-overlay .tf-auth-form {
    margin-top: 1.3rem;
    gap: 0.85rem;
  }

  #talentflow-auth-overlay .tf-auth-security {
    margin-top: 1rem;
  }
}

/* TalentFlow login final polish 20260720 */

/* A arte original possui textos incorporados e não deve competir com o HTML. */
#talentflow-auth-overlay .tf-auth-visual {
  display: none;
}

/* Cria profundidade visual sem depender de imagem fechada. */
#talentflow-auth-overlay .tf-auth-showcase::after {
  position: absolute;
  z-index: 0;
  right: -14rem;
  bottom: -18rem;
  width: 48rem;
  height: 48rem;
  border-radius: 50%;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(
      circle,
      rgba(77, 124, 255, 0.44) 0%,
      rgba(93, 52, 211, 0.24) 32%,
      rgba(14, 165, 233, 0.1) 52%,
      transparent 72%
    );
  filter: blur(4px);
}

/* Mantém o conteúdo acima dos efeitos decorativos. */
#talentflow-auth-overlay .tf-auth-showcase-content,
#talentflow-auth-overlay .tf-auth-benefits,
#talentflow-auth-overlay .tf-auth-showcase-footer {
  position: relative;
  z-index: 2;
}

/* Limita o título para melhorar ritmo e leitura. */
#talentflow-auth-overlay .tf-auth-showcase-copy h1 {
  max-width: 42rem;
}

/* Dá mais espaço entre texto introdutório e benefícios. */
#talentflow-auth-overlay .tf-auth-benefits {
  margin-top: clamp(1.75rem, 3.5vh, 2.5rem);
}

/* Cards mais leves e integrados ao fundo. */
#talentflow-auth-overlay .tf-auth-benefits li {
  border-color: rgba(125, 211, 252, 0.16);
  background:
    linear-gradient(
      110deg,
      rgba(5, 25, 81, 0.9),
      rgba(8, 34, 101, 0.72)
    );
  box-shadow:
    0 14px 30px rgba(2, 8, 23, 0.14),
    inset 0 1px rgba(255, 255, 255, 0.045);
}

/* Evita que o rodapé pareça solto ou duplicado. */
#talentflow-auth-overlay .tf-auth-showcase-footer {
  width: fit-content;
  margin-top: auto;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(125, 211, 252, 0.13);
  color: rgba(226, 232, 240, 0.75);
}

/* Equilibra o card de autenticação com o painel institucional. */
#talentflow-auth-overlay .tf-auth-card {
  width: 100%;
  max-width: 500px;
}

/* Mantém o botão simples e estável. */
#talentflow-auth-overlay .tf-auth-submit {
  min-height: 3.75rem;
}

/* Reduz conteúdo em notebooks de baixa altura. */
@media (max-height: 780px) and (min-width: 901px) {
  #talentflow-auth-overlay .tf-auth-showcase {
    padding-top: 1.75rem;
    padding-bottom: 1.5rem;
  }

  #talentflow-auth-overlay .tf-auth-showcase-copy {
    margin-top: 1.75rem;
  }

  #talentflow-auth-overlay .tf-auth-showcase-copy h1 {
    font-size: clamp(2.4rem, 3.7vw, 3.4rem);
  }

  #talentflow-auth-overlay .tf-auth-showcase-description {
    max-width: 570px;
    margin-top: 0.75rem;
  }

  #talentflow-auth-overlay .tf-auth-benefits {
    margin-top: 1.15rem;
  }

  #talentflow-auth-overlay .tf-auth-benefits li {
    min-height: 3.75rem;
  }

  #talentflow-auth-overlay .tf-auth-showcase-footer {
    padding-top: 0.85rem;
  }
}

/* TalentFlow login autofill normalization */
#talentflow-auth-overlay .tf-auth-control input:-webkit-autofill,
#talentflow-auth-overlay .tf-auth-control input:-webkit-autofill:hover,
#talentflow-auth-overlay .tf-auth-control input:-webkit-autofill:focus {
  -webkit-text-fill-color: #101827;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  box-shadow: 0 0 0 1000px #ffffff inset;
  caret-color: #101827;
  transition: background-color 9999s ease-out 0s;
}

@media (min-width: 901px) and (max-width: 1200px) {
  #talentflow-auth-overlay .tf-auth-showcase-copy h1 {
    font-size: clamp(2.65rem, 4vw, 3.75rem);
  }
}

@media (max-width: 600px) {
  #pipeline-editor-modal .ui-modal__shell,
  #pipeline-editor-modal .pipeline-editor-modal-shell {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }
}

/* TalentFlow password access flow */
#talentflow-auth-overlay .tf-auth-form[hidden] {
  display: none;
}

#talentflow-auth-overlay .tf-auth-link,
#talentflow-auth-overlay .tf-auth-back {
  width: fit-content;
  padding: 0.25rem 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

#talentflow-auth-overlay .tf-auth-link {
  justify-self: end;
  margin-top: -0.35rem;
}

#talentflow-auth-overlay .tf-auth-back {
  justify-self: center;
}

#talentflow-auth-overlay .tf-auth-link:hover,
#talentflow-auth-overlay .tf-auth-back:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

#talentflow-auth-overlay .tf-auth-link:focus-visible,
#talentflow-auth-overlay .tf-auth-back:focus-visible {
  outline: none;
  border-radius: 0.35rem;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.17);
}

#talentflow-auth-overlay .tf-auth-hint {
  margin: -0.35rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
}

#talentflow-auth-overlay .tf-auth-feedback.is-success {
  color: #047857;
}

#talentflow-auth-overlay .tf-auth-feedback.is-error {
  color: #b42318;
}

.tf-user-access-note {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.85rem;
  background: #eff6ff;
}

.tf-user-access-note strong {
  color: #1e3a8a;
  font-size: 0.86rem;
}

.tf-user-access-note span {
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.5;
}

@media (max-width: 560px) {
  #talentflow-auth-overlay .tf-auth-link {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  #talentflow-auth-overlay .tf-auth-link,
  #talentflow-auth-overlay .tf-auth-back {
    transition: none;
  }
}

/* ---------- CANDIDATOS: DENSIDADE VISUAL ---------- */

#view-candidates .panel {
  padding: 1rem;
}

#view-candidates .panel-header {
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

#view-candidates .panel-title {
  font-size: 1.125rem;
  line-height: 1.3;
}

#view-candidates .panel-header .primary-button {
  min-height: 2.5rem;
  padding: 0.625rem 1rem;
}

#view-candidates .list-title {
  font-size: 0.875rem;
  line-height: 1.3;
}

#view-candidates .list-subtitle {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  line-height: 1.25;
}

@media (max-width: 1024px) {
  #view-candidates .candidate-row {
    padding: 0.7rem 0.8rem;
  }

  #view-candidates .candidate-actions {
    flex-wrap: wrap;
  }

  #view-candidates .candidate-actions .secondary-button-compact {
    min-height: 2.25rem;
  }
}

@media (max-width: 480px) {
  #view-candidates .panel {
    padding: 0.75rem;
  }

  #view-candidates .candidate-row {
    padding: 0.75rem;
  }

  #view-candidates .candidate-actions {
    flex-direction: column;
  }
}


/* ---------- USUARIOS: DENSIDADE VISUAL ---------- */

#view-users .panel {
  padding: 0.875rem;
}

#view-users .panel-header {
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

#view-users .panel-title {
  font-size: 1.0625rem;
  line-height: 1.25;
}

#view-users .panel-header .primary-button,
#view-users .panel-header .secondary-button {
  min-height: 2.25rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
}

#view-users .users-toolbar {
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

#view-users .users-toolbar .field {
  gap: 0.25rem;
}

#view-users .users-toolbar select,
#view-users .users-toolbar input {
  min-height: 2.5rem;
  padding-block: 0.5rem;
  font-size: 0.8125rem;
}

#view-users .users-summary-box {
  min-height: 2.5rem;
  padding: 0.5rem 0.875rem;
}

#view-users #users-count {
  margin-top: 0.125rem;
  font-size: 1rem;
  line-height: 1.2;
}

#view-users #users-status {
  margin-top: 0.125rem;
}

#view-users #users-list {
  gap: 0.5rem;
}

#view-users #users-list > .users-row {
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
}

#view-users #users-list .users-row-head {
  align-items: center;
  gap: 0.375rem;
}

#view-users #users-list .users-row-title {
  font-size: 0.875rem;
  line-height: 1.2;
}

#view-users #users-list .users-row-subtitle {
  margin-top: 0.0625rem;
  font-size: 0.71875rem;
  line-height: 1.2;
}

#view-users #users-list .badge,
#view-users #users-list .chip {
  padding: 0.15rem 0.425rem;
  font-size: 0.65625rem;
  line-height: 1.15;
}

#view-users #users-list .users-row-meta-stack {
  gap: 0.2rem 0.625rem;
  margin-top: 0.25rem;
}

#view-users #users-list .users-row-meta-item {
  gap: 0.25rem;
  font-size: 0.71875rem;
  line-height: 1.2;
}

#view-users #users-list .users-row-actions {
  flex-wrap: nowrap;
  align-items: center;
  align-content: center;
  gap: 0.3rem;
}

#view-users #users-list .users-row-actions button {
  min-height: 1.875rem;
  padding: 0.35rem 0.625rem;
  font-size: 0.71875rem;
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  #view-users #users-list > .users-row {
    align-items: stretch;
    padding: 0.625rem 0.75rem;
  }

  #view-users #users-list .users-row-actions {
    flex-wrap: wrap;
  }

  #view-users #users-list .users-row-actions button {
    min-height: 2.125rem;
  }
}

@media (max-width: 480px) {
  #view-users .panel {
    padding: 0.625rem;
  }

  #view-users #users-list > .users-row {
    padding: 0.625rem;
  }

  #view-users #users-list .users-row-actions {
    width: 100%;
  }

  #view-users #users-list .users-row-actions button {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* ---------- USUARIOS: DENSIDADE VISUAL FIM ---------- */
/* ==========================================================================
   Relatórios executivos
   ========================================================================== */

.reports-view {
  min-width: 0;
  overflow-x: hidden;
}

.reports-shell {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.reports-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.reports-kicker {
  margin: 0 0 0.35rem;
  color: rgb(5 150 105);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reports-header h1 {
  margin: 0;
  color: rgb(15 23 42);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.reports-description {
  max-width: 42rem;
  margin: 0.45rem 0 0;
  color: rgb(100 116 139);
  font-size: 0.925rem;
  line-height: 1.6;
}

.reports-header-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.reports-period-field {
  min-width: 11.5rem;
}

.reports-header-actions .ui-button {
  min-height: 2.75rem;
}

.reports-header-actions .ui-button svg {
  width: 1rem;
  height: 1rem;
}

.reports-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reports-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 1.875rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 999px;
  background: rgb(248 250 252);
  color: rgb(71 85 105);
  font-size: 0.75rem;
  font-weight: 600;
}

.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.reports-kpi-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  min-height: 7.25rem;
  padding: 1rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 1rem;
  background: rgb(255 255 255);
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.05);
}

.reports-kpi-icon {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 auto;
  border-radius: 0.8rem;
  background: rgb(236 253 245);
  color: rgb(5 150 105);
}

.reports-kpi-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.reports-kpi-card > div {
  min-width: 0;
}

.reports-kpi-label {
  display: block;
  margin-bottom: 0.25rem;
  color: rgb(100 116 139);
  font-size: 0.78rem;
  font-weight: 650;
}

.reports-kpi-value {
  display: block;
  overflow-wrap: anywhere;
  color: rgb(15 23 42);
  font-size: 1.5rem;
  line-height: 1.1;
}

.reports-primary-grid,
.reports-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: 1rem;
  min-width: 0;
}

.reports-panel {
  min-width: 0;
}

.reports-funnel {
  display: grid;
  gap: 1rem;
}

.reports-funnel-row {
  display: grid;
  gap: 0.45rem;
}

.reports-funnel-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgb(51 65 85);
  font-size: 0.85rem;
}

.reports-funnel-heading span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reports-funnel-heading strong {
  color: rgb(15 23 42);
}

.reports-funnel-track {
  position: relative;
  height: 0.65rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(226 232 240);
}

.reports-funnel-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgb(16 185 129),
    rgb(5 150 105)
  );
  transition: width 180ms ease;
}

.reports-funnel-row small {
  color: rgb(100 116 139);
  font-size: 0.72rem;
}

.reports-list {
  display: grid;
}

.reports-list-row,
.reports-alert-row,
.reports-limitation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgb(226 232 240);
}

.reports-list-row:last-child,
.reports-alert-row:last-child,
.reports-limitation-row:last-child {
  border-bottom: 0;
}

.reports-list-row > div,
.reports-alert-row > div {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.reports-list-row strong,
.reports-alert-row strong,
.reports-limitation-row strong {
  color: rgb(30 41 59);
  font-size: 0.84rem;
}

.reports-list-row span,
.reports-alert-row span,
.reports-limitation-row span {
  color: rgb(100 116 139);
  font-size: 0.75rem;
  line-height: 1.45;
}

.reports-list-value {
  text-align: right;
}

.reports-alert-row {
  padding-inline: 0.65rem;
  border-radius: 0.7rem;
}

.reports-alert-row.warning {
  background: rgb(255 251 235);
}

.reports-alert-row.critical {
  background: rgb(254 242 242);
}

.reports-alert-row.ok {
  background: rgb(240 253 250);
}

.reports-limitation-row {
  align-items: flex-start;
  justify-content: flex-start;
}

.reports-limitation-row > svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  flex: 0 0 auto;
  color: rgb(71 85 105);
}

.reports-limitation-row > div {
  display: grid;
  gap: 0.2rem;
}

.reports-table-wrapper {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.reports-table {
  min-width: 58rem;
}

.reports-table td:first-child {
  min-width: 12rem;
}

.reports-table-empty {
  padding: 2rem 1rem;
  color: rgb(100 116 139);
  text-align: center;
}

.reports-empty {
  display: grid;
  place-items: center;
  min-height: 8rem;
  padding: 1.25rem;
  border: 1px dashed rgb(203 213 225);
  border-radius: 0.85rem;
  color: rgb(100 116 139);
  text-align: center;
}

.reports-empty strong {
  color: rgb(51 65 85);
  font-size: 0.9rem;
}

.reports-empty span {
  max-width: 28rem;
  font-size: 0.78rem;
}

@media (max-width: 1100px) {
  .reports-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-primary-grid,
  .reports-secondary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .reports-view {
    padding: 1rem;
  }

  .reports-header {
    align-items: stretch;
    flex-direction: column;
  }

  .reports-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .reports-period-field {
    width: 100%;
    min-width: 0;
  }

  .reports-header-actions .ui-button {
    width: 100%;
  }

  .reports-kpi-grid {
    grid-template-columns: 1fr;
  }

  .reports-kpi-card {
    min-height: 5.75rem;
  }

  .reports-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .reports-meta span {
    justify-content: center;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reports-funnel-track span {
    transition: none;
  }
}


/* Filtros operacionais: Candidatos e Banco de Talentos */
.recruitment-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  align-items: end;
  gap: 0.75rem;
}

.recruitment-filter-search {
  grid-column: span 2;
}

.recruitment-filter-actions {
  display: flex;
  min-height: 2.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
}

.recruitment-active-filters {
  color: var(--text-muted, #64748b);
  font-size: 0.75rem;
  line-height: 1.25rem;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .recruitment-filters-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .recruitment-filter-search {
    grid-column: span 1;
  }

  .recruitment-filter-actions {
    align-items: stretch;
    justify-content: stretch;
  }

  .recruitment-filter-actions .secondary-button {
    width: 100%;
  }

  .recruitment-active-filters {
    width: 100%;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .recruitment-filters-grid *,
  .recruitment-filter-actions * {
    scroll-behavior: auto;
  }
}

/* Paginação do Banco de Talentos */
.talent-pool-pagination {
  display: flex;
  margin-top: 1rem;
  padding: 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 1rem;
  background: var(--surface-color, #ffffff);
}

.talent-pool-pagination-summary,
.talent-pool-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.talent-pool-pagination-summary {
  color: var(--text-muted, #64748b);
  font-size: 0.8125rem;
}

.talent-pool-page-size-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.talent-pool-page-size-field select {
  min-height: 2.5rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.75rem;
  background: #ffffff;
}

.talent-pool-page-indicator {
  min-width: 7.5rem;
  color: var(--text-muted, #64748b);
  font-size: 0.8125rem;
  text-align: center;
}

.talent-pool-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 767px) {
  .talent-pool-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .talent-pool-pagination-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .talent-pool-pagination-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .talent-pool-pagination-controls .secondary-button {
    width: 100%;
    justify-content: center;
  }

  .talent-pool-page-indicator {
    min-width: 0;
    padding: 0.25rem;
  }
}

/* TALENT POOL COMPACT START */

/* Banco de Talentos: lista operacional em uma linha por candidato */

#view-talent-pool {
  padding: 0.75rem !important;
}

#view-talent-pool > .panel {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  padding: 0.875rem;
}

#view-talent-pool .panel-header {
  margin-bottom: 0.625rem;
  padding-bottom: 0.625rem;
}

#view-talent-pool .talent-pool-toolbar.recruitment-filters-grid {
  grid-template-columns:
    minmax(15rem, 1.4fr)
    repeat(4, minmax(9rem, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

#view-talent-pool .recruitment-filter-search {
  grid-column: span 1;
}

#view-talent-pool .field {
  gap: 0.2rem;
}

#view-talent-pool .field > span {
  font-size: 0.7rem;
  line-height: 1.15;
}

#view-talent-pool .field input,
#view-talent-pool .field select {
  width: 100%;
  min-height: 2.35rem;
  height: 2.35rem;
  padding: 0.4rem 0.65rem;
  border-radius: 0.65rem;
  font-size: 0.8rem;
}

#view-talent-pool .recruitment-filter-actions {
  min-height: 2.35rem;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.45rem;
}

#view-talent-pool .recruitment-active-filters {
  font-size: 0.72rem;
  white-space: nowrap;
}

#view-talent-pool .recruitment-filter-actions .secondary-button,
#view-talent-pool #talent-pool-refresh-button {
  min-height: 2.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
}

#view-talent-pool .talent-pool-summary-box {
  grid-column: span 2;
  display: flex;
  min-height: 2.5rem;
  padding: 0.4rem 0.75rem;
  align-items: center;
  justify-content: flex-start;
  justify-items: initial;
  gap: 0.65rem;
  border-radius: 0.65rem;
}

#view-talent-pool .talent-pool-summary-box > div {
  margin-top: 0;
}

#view-talent-pool #talent-pool-count {
  font-size: 1rem;
  line-height: 1;
}

#view-talent-pool #talent-pool-status-message {
  font-size: 0.72rem;
}

#view-talent-pool .talent-pool-list {
  display: grid;
  gap: 0.35rem;
}

/* Uma linha horizontal por candidato */
#view-talent-pool .talent-pool-row {
  display: grid;
  grid-template-columns:
    minmax(11rem, 1.4fr)
    minmax(10rem, 1.2fr)
    minmax(3.5rem, 0.4fr)
    minmax(8rem, 1fr)
    minmax(9rem, 1.2fr)
    minmax(8rem, 0.9fr)
    minmax(7rem, 0.75fr)
    auto
    auto;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  align-items: center;
  gap: 0.45rem 0.8rem;
  border-radius: 0.7rem;
}

#view-talent-pool .talent-pool-row > * {
  min-width: 0;
}

#view-talent-pool .talent-pool-row-candidate {
  min-width: 0;
}

#view-talent-pool .talent-pool-card-title {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-talent-pool .talent-pool-card-meta {
  overflow: hidden;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-talent-pool .talent-pool-row-cell {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

#view-talent-pool .talent-pool-row-cell > span:last-child {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-talent-pool .talent-pool-row-cell small {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.65rem;
}

#view-talent-pool .talent-pool-row-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
}

#view-talent-pool .talent-pool-row-score {
  text-align: center;
}

#view-talent-pool .talent-pool-card-badges {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

#view-talent-pool .talent-pool-card-badges .badge {
  padding: 0.18rem 0.4rem;
  font-size: 0.64rem;
  white-space: nowrap;
}

#view-talent-pool .talent-pool-card-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.3rem;
}

#view-talent-pool .talent-pool-card-actions .secondary-button {
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.7rem;
  white-space: nowrap;
}

#view-talent-pool .talent-pool-pagination {
  margin-top: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.7rem;
}

@media (max-width: 1400px) {
  #view-talent-pool .talent-pool-row {
    grid-template-columns:
      minmax(10rem, 1.3fr)
      minmax(9rem, 1fr)
      minmax(3rem, 0.35fr)
      minmax(7rem, 0.9fr)
      minmax(8rem, 1fr)
      minmax(6.5rem, 0.7fr)
      auto
      auto;
  }

  #view-talent-pool .talent-pool-row-reason,
  #view-talent-pool .talent-pool-row-cell:nth-of-type(6) {
    display: none;
  }
}

@media (max-width: 1024px) {
  #view-talent-pool .talent-pool-toolbar.recruitment-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #view-talent-pool .talent-pool-summary-box {
    grid-column: span 2;
  }

  #view-talent-pool .talent-pool-row {
    grid-template-columns:
      minmax(11rem, 1.4fr)
      minmax(9rem, 1fr)
      minmax(4rem, 0.4fr)
      minmax(7rem, 0.75fr)
      auto
      auto;
  }

  #view-talent-pool .talent-pool-row-cell:nth-of-type(4),
  #view-talent-pool .talent-pool-row-cell:nth-of-type(5),
  #view-talent-pool .talent-pool-row-reason {
    display: none;
  }
}

@media (max-width: 767px) {
  #view-talent-pool {
    padding: 0.5rem !important;
  }

  #view-talent-pool > .panel {
    padding: 0.75rem;
  }

  #view-talent-pool .talent-pool-toolbar.recruitment-filters-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #view-talent-pool .talent-pool-summary-box {
    grid-column: span 1;
    flex-wrap: wrap;
  }

  #view-talent-pool .talent-pool-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.65rem;
    align-items: start;
  }

  #view-talent-pool .talent-pool-row-candidate {
    grid-column: 1;
  }

  #view-talent-pool .talent-pool-card-badges {
    grid-column: 2;
    grid-row: 1;
  }

  #view-talent-pool .talent-pool-row-cell {
    grid-column: 1 / -1;
  }

  #view-talent-pool .talent-pool-row-cell:nth-of-type(4),
  #view-talent-pool .talent-pool-row-cell:nth-of-type(5),
  #view-talent-pool .talent-pool-row-cell:nth-of-type(6),
  #view-talent-pool .talent-pool-row-reason {
    display: grid;
  }

  #view-talent-pool .talent-pool-card-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  #view-talent-pool .talent-pool-card-actions .secondary-button {
    flex: 1 1 0;
    justify-content: center;
  }
}

/* TALENT POOL COMPACT END */

/* Dashboard: perfil do Banco de Talentos */
.tf-dashboard-talent-pool {
  min-width: 0;
}

.tf-dashboard-talent-pool-total {
  display: grid;
  justify-items: end;
  gap: 0.15rem;
  flex: 0 0 auto;
}

.tf-dashboard-talent-pool-total span {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
}

.tf-dashboard-talent-pool-total strong {
  color: #047857;
  font-size: 1.75rem;
  line-height: 1;
}

.tf-dashboard-talent-pool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tf-dashboard-profile-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
}

.tf-dashboard-profile-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tf-dashboard-profile-card__icon {
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  place-items: center;
  border-radius: 0.8rem;
  background: #e7f7f1;
  color: #047857;
}

.tf-dashboard-profile-card__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.tf-dashboard-profile-card__header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
}

.tf-dashboard-profile-card__header p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.4;
}

.tf-dashboard-profile-list {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.tf-dashboard-profile-row {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.tf-dashboard-profile-row__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.tf-dashboard-profile-row__meta strong {
  overflow: hidden;
  color: #1e293b;
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-dashboard-profile-row__meta span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.7rem;
  white-space: nowrap;
}

.tf-dashboard-profile-bar {
  overflow: hidden;
  height: 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.tf-dashboard-profile-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #0f766e);
  transition: width 180ms ease;
}

@media (max-width: 1100px) {
  .tf-dashboard-talent-pool-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tf-dashboard-profile-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .tf-dashboard-talent-pool .panel-header {
    align-items: flex-start;
  }

  .tf-dashboard-talent-pool-grid {
    grid-template-columns: 1fr;
  }

  .tf-dashboard-profile-card:last-child {
    grid-column: auto;
  }

  .tf-dashboard-profile-row__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
  }

  .tf-dashboard-profile-row__meta strong {
    white-space: normal;
  }

  .tf-dashboard-profile-row__meta span {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tf-dashboard-profile-bar span {
    transition: none;
  }
}

/* Bases operacionais */
.operational-units-panel {
  min-width: 0;
}

.operational-units-header {
  align-items: flex-start;
}

.operational-units-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.operational-units-metric {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--ui-border, #e2e8f0);
  border-radius: 1rem;
  background: var(--ui-surface-soft, #f8fafc);
}

.operational-units-metric span {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.operational-units-metric strong {
  display: block;
  margin-top: 0.35rem;
  color: #0f172a;
  font-size: 1.5rem;
  line-height: 1;
}

.operational-units-toolbar {
  display: grid;
  grid-template-columns:
    minmax(14rem, 2fr)
    repeat(5, minmax(9rem, 1fr));
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.operational-units-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.operational-units-status {
  min-height: 1.25rem;
  margin-bottom: 0.75rem;
  color: #64748b;
  font-size: 0.8125rem;
}

.operational-units-list {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.operational-unit-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--ui-border, #e2e8f0);
  border-radius: 1rem;
  background: #fff;
}

.operational-unit-card-main {
  flex: 1 1 auto;
  min-width: 0;
}

.operational-unit-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.operational-unit-card-heading h3 {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}

.operational-unit-card-heading p {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.8125rem;
}

.operational-unit-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.operational-unit-address {
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 0.875rem;
}

.operational-unit-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 0.75rem;
}

.operational-unit-metadata strong {
  color: #475569;
}

.operational-unit-error {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.operational-unit-actions {
  display: flex;
  flex: 0 0 13rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.operational-units-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ui-border, #e2e8f0);
}

.operational-units-pagination-summary,
.operational-units-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #64748b;
  font-size: 0.8125rem;
}

.operational-units-page-size-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.operational-units-page-size-field select {
  min-height: 2.25rem;
  padding: 0 0.65rem;
  border: 1px solid var(--ui-border, #cbd5e1);
  border-radius: 0.65rem;
  background: #fff;
}

.operational-units-page-indicator {
  min-width: 6rem;
  text-align: center;
}

@media (max-width: 1180px) {
  .operational-units-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operational-units-search-field {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .operational-units-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operational-units-toolbar {
    grid-template-columns: 1fr;
  }

  .operational-units-search-field,
  .operational-units-filter-actions {
    grid-column: auto;
  }

  .operational-units-filter-actions,
  .operational-unit-card,
  .operational-units-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .operational-unit-card-heading {
    flex-direction: column;
  }

  .operational-unit-badges {
    justify-content: flex-start;
  }

  .operational-unit-actions {
    flex-basis: auto;
  }

  .operational-units-pagination-summary,
  .operational-units-pagination-controls {
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .operational-units-summary {
    grid-template-columns: 1fr;
  }

  .operational-units-pagination-summary,
  .operational-units-pagination-controls {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .operational-unit-card {
    scroll-behavior: auto;
  }
}

/* TALENT POOL NEARBY BASES START */

#view-talent-pool .talent-pool-card-actions {
  flex-wrap: wrap;
}

.talent-pool-nearby-bases-shell {
  max-height: min(90vh, 52rem);
}

#talent-pool-nearby-bases-body {
  min-height: 0;
  overflow-y: auto;
}

.talent-pool-nearby-state {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 2rem;
  text-align: center;
}

.talent-pool-nearby-state h3 {
  margin: 0;
  color: var(--ui-text);
  font-size: 1rem;
  font-weight: 700;
}

.talent-pool-nearby-state p {
  max-width: 34rem;
  margin: 0;
  color: var(--ui-text-muted);
  line-height: 1.55;
}

.talent-pool-nearby-state small {
  max-width: 34rem;
  color: var(--ui-text-subtle);
  line-height: 1.45;
}

.talent-pool-nearby-state--error {
  color: var(--ui-danger);
}

.talent-pool-nearby-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--ui-border);
  border-radius: 0.85rem;
  background: var(--ui-surface-muted);
}

.talent-pool-nearby-summary > div {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  white-space: nowrap;
}

.talent-pool-nearby-summary strong {
  font-size: 1.2rem;
}

.talent-pool-nearby-summary p {
  margin: 0;
  color: var(--ui-text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: right;
}

.talent-pool-nearby-list {
  display: grid;
  gap: 0.75rem;
}

.talent-pool-nearby-card {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.9rem;
  border: 1px solid var(--ui-border);
  border-radius: 0.9rem;
  background: var(--ui-surface);
}

.talent-pool-nearby-rank {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 999px;
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
  font-weight: 800;
}

.talent-pool-nearby-content {
  min-width: 0;
}

.talent-pool-nearby-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.talent-pool-nearby-heading h3 {
  margin: 0;
  color: var(--ui-text);
  font-size: 0.95rem;
  font-weight: 750;
}

.talent-pool-nearby-heading p,
.talent-pool-nearby-address {
  margin: 0.2rem 0 0;
  color: var(--ui-text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.talent-pool-nearby-distance {
  flex: 0 0 auto;
  color: var(--ui-primary);
  font-size: 1rem;
  white-space: nowrap;
}

.talent-pool-nearby-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  margin-top: 0.65rem;
  color: var(--ui-text-subtle);
  font-size: 0.7rem;
}

@media (max-width: 767px) {
  .talent-pool-nearby-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .talent-pool-nearby-summary p {
    text-align: left;
  }

  .talent-pool-nearby-heading {
    flex-direction: column;
    gap: 0.4rem;
  }

  .talent-pool-nearby-card {
    grid-template-columns: 2rem minmax(0, 1fr);
    padding: 0.75rem;
  }

  .talent-pool-nearby-rank {
    width: 1.9rem;
    height: 1.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .talent-pool-nearby-card {
    scroll-behavior: auto;
  }
}

/* TALENT POOL NEARBY BASES END */

/* TALENT POOL UNIT SELECTION START */

#view-talent-pool .talent-pool-row-unit {
  min-width: 0;
}

#view-talent-pool .talent-pool-row-unit--selected {
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: 0.65rem;
  background: rgba(236, 253, 245, 0.72);
}

#view-talent-pool .talent-pool-row-unit-name {
  overflow: hidden;
  color: var(--ui-text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-talent-pool .talent-pool-row-unit small {
  display: block;
  margin-top: 0.15rem;
  color: var(--ui-primary);
  font-size: 0.68rem;
  font-weight: 650;
}

#view-talent-pool .talent-pool-row-unit-empty {
  color: var(--ui-text-subtle);
}

.talent-pool-nearby-card--selected {
  border-color: rgba(16, 185, 129, 0.5);
  background:
    linear-gradient(
      180deg,
      rgba(236, 253, 245, 0.82),
      var(--ui-surface)
    );
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.08);
}

.talent-pool-nearby-card--selected
.talent-pool-nearby-rank {
  background: var(--ui-primary);
  color: #fff;
}

.talent-pool-nearby-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.7rem;
}

.talent-pool-nearby-footer
.talent-pool-nearby-meta {
  margin-top: 0;
}

.talent-pool-nearby-selected-label {
  color: var(--ui-primary);
  font-weight: 750;
}

.talent-pool-nearby-select {
  min-width: 9.5rem;
  flex: 0 0 auto;
  justify-content: center;
}

.talent-pool-nearby-select:disabled {
  cursor: default;
  opacity: 0.72;
}

@media (max-width: 767px) {
  .talent-pool-nearby-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .talent-pool-nearby-select {
    width: 100%;
  }

  #view-talent-pool .talent-pool-row-unit {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .talent-pool-nearby-card--selected {
    transition: none;
  }
}

/* TALENT POOL UNIT SELECTION END */

/* TALENT POOL CARD ALIGNMENT START */

#view-talent-pool .talent-pool-row {
  align-items: center;
  grid-template-columns:
    minmax(13rem, 1.45fr)
    minmax(9rem, 1.15fr)
    minmax(4rem, 0.45fr)
    minmax(7rem, 0.75fr)
    minmax(7rem, 0.85fr)
    minmax(9rem, 1fr)
    minmax(8.5rem, 0.9fr)
    minmax(7rem, 0.75fr)
    auto;
  column-gap: 0.9rem;
  row-gap: 0.65rem;
  padding: 0.85rem 1rem;
}

#view-talent-pool .talent-pool-row-candidate,
#view-talent-pool .talent-pool-row-cell,
#view-talent-pool .talent-pool-card-badges {
  align-self: center;
  min-width: 0;
}

#view-talent-pool .talent-pool-row-cell {
  display: grid;
  align-content: center;
  gap: 0.12rem;
}

#view-talent-pool .talent-pool-row-unit--selected {
  min-height: 4rem;
  padding: 0.45rem 0.6rem;
  align-content: center;
}

#view-talent-pool .talent-pool-row-unit-name {
  max-width: 100%;
  font-size: 0.78rem;
  line-height: 1.25;
}

#view-talent-pool .talent-pool-row-unit small {
  margin-top: 0.05rem;
  font-size: 0.68rem;
  line-height: 1.25;
}

#view-talent-pool .talent-pool-card-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  width: auto;
  margin-top: 0.1rem;
}

#view-talent-pool .talent-pool-card-actions .secondary-button {
  min-width: auto;
  min-height: 2.45rem;
  flex: 0 0 auto;
  padding-inline: 0.8rem;
  white-space: nowrap;
}

#view-talent-pool .talent-pool-card-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}

@media (max-width: 1450px) {
  #view-talent-pool .talent-pool-row {
    grid-template-columns:
      minmax(12rem, 1.4fr)
      minmax(8rem, 1fr)
      minmax(4rem, 0.45fr)
      minmax(6.5rem, 0.7fr)
      minmax(8rem, 0.85fr)
      minmax(8rem, 0.9fr)
      minmax(8rem, 0.85fr)
      minmax(6.5rem, 0.7fr)
      auto;
    column-gap: 0.65rem;
  }
}

@media (max-width: 1100px) {
  #view-talent-pool .talent-pool-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  #view-talent-pool .talent-pool-row-candidate {
    grid-column: 1;
  }

  #view-talent-pool .talent-pool-card-badges {
    grid-column: 2;
    grid-row: 1;
  }

  #view-talent-pool .talent-pool-row-cell,
  #view-talent-pool .talent-pool-row-unit {
    grid-column: 1 / -1;
  }

  #view-talent-pool .talent-pool-card-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  #view-talent-pool .talent-pool-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  #view-talent-pool .talent-pool-card-actions .secondary-button {
    width: 100%;
    justify-content: center;
  }

  #view-talent-pool
  .talent-pool-card-actions
  .secondary-button:last-child {
    grid-column: 1 / -1;
  }
}

/* TALENT POOL CARD ALIGNMENT END */

/* Pipeline: busca de candidato por nome ou CPF */
.pipeline-candidate-combobox {
  position: relative;
  width: 100%;
}

.pipeline-candidate-search-wrap {
  position: relative;
}

.pipeline-candidate-search {
  width: 100%;
  padding-right: 2.75rem;
}

.pipeline-candidate-search::-webkit-search-cancel-button {
  cursor: pointer;
}

.pipeline-candidate-search-icon {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  align-items: center;
  justify-content: center;
  color: var(--slate-500, #64748b);
  pointer-events: none;
  transform: translateY(-50%);
}

.pipeline-candidate-search-icon svg {
  width: 1rem;
  height: 1rem;
}

.pipeline-candidate-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.4rem);
  right: 0;
  left: 0;
  max-height: min(20rem, 45vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.4rem;
  border: 1px solid #dbe3ec;
  border-radius: 0.875rem;
  background: #fff;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.14),
    0 3px 10px rgba(15, 23, 42, 0.08);
}

.pipeline-candidate-results[hidden] {
  display: none;
}

.pipeline-candidate-option {
  display: flex;
  width: 100%;
  min-height: 3.5rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.pipeline-candidate-option:hover,
.pipeline-candidate-option:focus-visible,
.pipeline-candidate-option.active {
  background: #f0fdfa;
  outline: none;
}

.pipeline-candidate-option:focus-visible {
  box-shadow: inset 0 0 0 2px #0f766e;
}

.pipeline-candidate-option-name {
  color: #17211d;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
}

.pipeline-candidate-option-cpf {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.pipeline-candidate-empty {
  padding: 1rem;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}

.pipeline-candidate-error {
  color: #b42318;
}

@media (max-width: 640px) {
  .pipeline-candidate-results {
    max-height: min(17rem, 40vh);
  }

  .pipeline-candidate-option {
    min-height: 3.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-candidate-option {
    scroll-behavior: auto;
  }
}

/* Public admission documents */
.admission-public-page[hidden] {
  display: none;
}


body.admission-public-mode .app-shell {
  display: none;
}

body.admission-public-mode {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(19, 138, 107, 0.12),
      transparent 32rem
    ),
    linear-gradient(
      180deg,
      var(--tf-brand-50),
      var(--ui-color-surface-muted)
    );
}

.admission-public-page {
  min-height: 100vh;
  padding: clamp(16px, 4vw, 48px);
}

.admission-public-content {
  width: min(100%, 960px);
  margin: 0 auto;
}

.admission-public-shell {
  display: grid;
  gap: var(--ui-space-6);
}

.admission-public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-4);
}

.admission-public-brand {
  display: flex;
  align-items: center;
  gap: var(--ui-space-3);
}

.admission-public-brand-mark {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--ui-radius-md);
  background: var(--ui-color-brand);
  color: #fff;
  font-weight: 800;
}

.admission-public-brand-copy {
  display: grid;
  line-height: 1.2;
}

.admission-public-brand-copy strong {
  color: var(--ui-color-text);
  font-size: var(--ui-text-md);
}

.admission-public-brand-copy small {
  margin-top: 3px;
  color: var(--ui-color-muted);
  font-size: var(--ui-text-xs);
}

.admission-public-secure {
  display: inline-flex;
  align-items: center;
  gap: var(--ui-space-2);
  color: var(--tf-brand-700);
  font-size: var(--ui-text-sm);
  font-weight: 700;
}

.admission-public-secure svg {
  width: 18px;
  height: 18px;
}

.admission-public-hero,
.admission-public-card,
.admission-public-state {
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-xl);
  background: var(--ui-color-surface);
  box-shadow: var(--ui-shadow-card);
}

.admission-public-hero {
  padding: clamp(24px, 5vw, 48px);
}

.admission-public-kicker {
  margin: 0 0 var(--ui-space-2);
  color: var(--tf-brand-700);
  font-size: var(--ui-text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admission-public-hero h1,
.admission-public-state h1 {
  margin: 0;
  color: var(--ui-color-text);
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.08;
}

.admission-public-hero > p:not(.admission-public-kicker),
.admission-public-state > p {
  max-width: 680px;
  margin: var(--ui-space-4) 0 0;
  color: var(--ui-color-muted);
  font-size: var(--ui-text-md);
  line-height: 1.65;
}

.admission-public-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ui-space-3);
  margin-top: var(--ui-space-8);
}

.admission-public-summary > div {
  display: grid;
  gap: var(--ui-space-1);
  min-width: 0;
  padding: var(--ui-space-4);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-color-surface-muted);
}

.admission-public-summary span {
  color: var(--ui-color-muted);
  font-size: var(--ui-text-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.admission-public-summary strong {
  overflow-wrap: anywhere;
  color: var(--ui-color-text);
  font-size: var(--ui-text-sm);
}

.admission-public-card {
  overflow: hidden;
}

.admission-public-card-header {
  padding: var(--ui-space-6);
  border-bottom: 1px solid var(--ui-color-border);
}

.admission-public-card-header h2 {
  margin: 0;
  color: var(--ui-color-text);
  font-size: var(--ui-title-md);
}

.admission-public-card-header p:last-child {
  margin: var(--ui-space-2) 0 0;
  color: var(--ui-color-muted);
  font-size: var(--ui-text-sm);
}

.admission-document-list {
  display: grid;
}

.admission-document-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--ui-space-4);
  align-items: start;
  padding: var(--ui-space-5) var(--ui-space-6);
  border-bottom: 1px solid var(--ui-color-border);
}

.admission-document-item:last-child {
  border-bottom: 0;
}

.admission-document-index {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--tf-brand-100);
  color: var(--tf-brand-700);
  font-size: var(--ui-text-sm);
  font-weight: 800;
}

.admission-document-copy {
  min-width: 0;
}

.admission-document-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ui-space-3);
}

.admission-document-heading h2 {
  margin: 0;
  color: var(--ui-color-text);
  font-size: var(--ui-text-md);
  line-height: 1.4;
}

.admission-document-description,
.admission-document-meta {
  margin: var(--ui-space-2) 0 0;
  color: var(--ui-color-muted);
  font-size: var(--ui-text-sm);
  line-height: 1.55;
}

.admission-document-meta {
  font-size: var(--ui-text-xs);
  font-weight: 700;
}

.admission-document-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.admission-document-status--approved,
.admission-document-status--uploaded {
  background: #dcfce7;
  color: #166534;
}

.admission-document-status--processing {
  background: #dbeafe;
  color: #1d4ed8;
}

.admission-document-status--rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.admission-public-footer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--ui-space-2);
  padding: 0 var(--ui-space-4);
  color: var(--ui-color-muted);
  font-size: var(--ui-text-xs);
  text-align: center;
}

.admission-public-footer svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.admission-public-footer p {
  margin: 0;
}

.admission-public-state {
  display: grid;
  justify-items: center;
  min-height: min(560px, calc(100vh - 64px));
  align-content: center;
  padding: clamp(32px, 8vw, 72px);
  text-align: center;
}

.admission-public-state > p {
  margin-left: auto;
  margin-right: auto;
}

.admission-public-state-icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--ui-space-5);
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
}

.admission-public-state-icon svg {
  width: 28px;
  height: 28px;
}

.admission-public-support {
  font-size: var(--ui-text-sm) !important;
}

.admission-public-spinner {
  width: 44px;
  height: 44px;
  margin-bottom: var(--ui-space-5);
  border: 4px solid var(--tf-brand-100);
  border-top-color: var(--ui-color-brand);
  border-radius: 50%;
  animation: admission-public-spin 0.75s linear infinite;
}

.admission-public-empty {
  padding: var(--ui-space-8);
  color: var(--ui-color-muted);
  text-align: center;
}

@keyframes admission-public-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .admission-public-page {
    padding: var(--ui-space-4);
  }

  .admission-public-header {
    align-items: flex-start;
  }

  .admission-public-secure {
    font-size: 0;
  }

  .admission-public-secure svg {
    width: 22px;
    height: 22px;
  }

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

  .admission-public-card-header,
  .admission-document-item {
    padding-left: var(--ui-space-4);
    padding-right: var(--ui-space-4);
  }

  .admission-document-heading {
    display: grid;
    justify-content: stretch;
  }

  .admission-document-status {
    justify-self: start;
  }
}

@media (max-width: 420px) {
  .admission-public-hero {
    padding: var(--ui-space-5);
  }

  .admission-document-item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: var(--ui-space-3);
  }

  .admission-document-index {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admission-public-spinner {
    animation-duration: 1.5s;
  }
}

/* Public admission upload controls */
.admission-public-feedback {
  padding: var(--ui-space-4) var(--ui-space-5);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-color-surface);
  color: var(--ui-color-text);
  font-size: var(--ui-text-sm);
  line-height: 1.5;
}

.admission-public-feedback[hidden] {
  display: none;
}

.admission-public-feedback--success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.admission-public-feedback--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.admission-public-feedback--info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.admission-document-rejection {
  margin: var(--ui-space-3) 0 0;
  padding: var(--ui-space-3);
  border-radius: var(--ui-radius-sm);
  background: #fef2f2;
  color: #b91c1c;
  font-size: var(--ui-text-sm);
  line-height: 1.5;
}

.admission-upload-control {
  display: grid;
  justify-items: start;
  gap: var(--ui-space-2);
  margin-top: var(--ui-space-4);
}

.admission-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.admission-file-label {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-2);
  padding: 0 var(--ui-space-4);
  border: 1px solid var(--ui-color-brand);
  border-radius: var(--ui-radius-md);
  background: var(--ui-color-brand);
  color: #fff;
  font-size: var(--ui-text-sm);
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

.admission-file-label:hover {
  transform: translateY(-1px);
  box-shadow: var(--ui-shadow-sm);
}

.admission-file-label:active {
  transform: translateY(0);
}

.admission-file-label[aria-disabled="true"] {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.admission-file-input:focus-visible + .admission-file-label {
  outline: 3px solid rgba(19, 138, 107, 0.3);
  outline-offset: 3px;
}

.admission-file-label svg {
  width: 17px;
  height: 17px;
}

.admission-upload-help {
  margin: 0;
  color: var(--ui-color-muted);
  font-size: var(--ui-text-xs);
  line-height: 1.5;
}

.admission-uploaded-files {
  display: grid;
  gap: var(--ui-space-2);
  margin: var(--ui-space-4) 0 0;
  padding: 0;
  list-style: none;
}

.admission-uploaded-file {
  display: grid;
  grid-template-columns:
    34px minmax(0, 1fr) auto;
  gap: var(--ui-space-3);
  align-items: center;
  padding: var(--ui-space-3);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-color-surface-muted);
}

.admission-uploaded-file-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
}

.admission-uploaded-file-icon svg {
  width: 17px;
  height: 17px;
}

.admission-uploaded-file-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admission-uploaded-file-copy strong {
  overflow: hidden;
  color: var(--ui-color-text);
  font-size: var(--ui-text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admission-uploaded-file-copy small {
  color: var(--ui-color-muted);
  font-size: var(--ui-text-xs);
}

.admission-file-delete {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 var(--ui-space-3);
  border: 1px solid #fecaca;
  border-radius: var(--ui-radius-sm);
  background: #fff;
  color: #b91c1c;
  font-size: var(--ui-text-xs);
  font-weight: 800;
  cursor: pointer;
}

.admission-file-delete:hover:not(:disabled) {
  background: #fef2f2;
}

.admission-file-delete:focus-visible,
.admission-public-submit:focus-visible {
  outline: 3px solid rgba(19, 138, 107, 0.3);
  outline-offset: 3px;
}

.admission-file-delete:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.admission-file-delete svg {
  width: 15px;
  height: 15px;
}

.admission-public-submit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-6);
  padding: var(--ui-space-6);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-xl);
  background: var(--ui-color-surface);
  box-shadow: var(--ui-shadow-card);
}

.admission-public-submit-card h2 {
  margin: 0;
  color: var(--ui-color-text);
  font-size: var(--ui-title-md);
}

.admission-public-submit-card p {
  margin: var(--ui-space-2) 0 0;
  color: var(--ui-color-muted);
  font-size: var(--ui-text-sm);
  line-height: 1.5;
}

.admission-public-submit {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-2);
  padding: 0 var(--ui-space-5);
  border: 1px solid var(--ui-color-brand);
  border-radius: var(--ui-radius-md);
  background: var(--ui-color-brand);
  color: #fff;
  font-size: var(--ui-text-sm);
  font-weight: 800;
  cursor: pointer;
}

.admission-public-submit:hover:not(:disabled) {
  filter: brightness(0.95);
}

.admission-public-submit:disabled {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  cursor: wait;
}

.admission-public-submit svg {
  width: 18px;
  height: 18px;
}

.admission-button-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(100, 116, 139, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: admission-public-spin 0.75s linear infinite;
}

.admission-public-state-icon--success {
  background: #dcfce7;
  color: #166534;
}

@media (max-width: 720px) {
  .admission-public-submit-card {
    display: grid;
    gap: var(--ui-space-4);
  }

  .admission-public-submit {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .admission-uploaded-file {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .admission-file-delete {
    grid-column: 1 / -1;
    width: 100%;
  }

  .admission-file-label {
    width: 100%;
  }

  .admission-upload-control {
    justify-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admission-file-label {
    transition: none;
  }

  .admission-file-label:hover {
    transform: none;
  }

  .admission-button-spinner {
    animation-duration: 1.5s;
  }
}

/* Public admission camera action */
.admission-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-3);
}

.admission-file-label--camera {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface);
  color: var(--ui-color-text);
}

.admission-file-label--camera:hover {
  border-color: var(--ui-color-brand);
  background: var(--ui-color-surface-muted);
}

.admission-file-label--camera[aria-disabled="true"] {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
}

@media (max-width: 520px) {
  .admission-upload-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admission-upload-actions .admission-file-label {
    width: 100%;
  }
}


/* Pre-validacao de qualidade dos documentos admissionais */
.admission-quality-dialog-open {
  overflow: hidden;
}

.admission-quality-dialog {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: var(--ui-space-4);
}

.admission-quality-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.admission-quality-dialog__panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(920px, calc(100vw - 32px));
  height: min(900px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-xl);
  background: var(--ui-color-surface);
  box-shadow: var(--ui-shadow-card);
}

.admission-quality-dialog__header,
.admission-quality-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-4);
  padding: var(--ui-space-4) var(--ui-space-5);
  background: var(--ui-color-surface);
}

.admission-quality-dialog__header {
  border-bottom: 1px solid var(--ui-color-border);
}

.admission-quality-dialog__header h2 {
  margin: var(--ui-space-1) 0 0;
  color: var(--ui-color-text);
  font-size: var(--ui-title-md);
}

.admission-quality-dialog__close {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-color-surface);
  color: var(--ui-color-text);
  cursor: pointer;
}

.admission-quality-dialog__close:hover {
  background: var(--ui-color-surface-muted);
}

.admission-quality-dialog__close:focus-visible,
.admission-quality-dialog__footer button:focus-visible {
  outline: 3px solid rgba(19, 138, 107, 0.3);
  outline-offset: 3px;
}

.admission-quality-dialog__body {
  display: grid;
  align-content: start;
  gap: var(--ui-space-4);
  min-height: 0;
  padding: var(--ui-space-5);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.admission-quality-preview {
  display: grid;
  min-height: clamp(180px, 32dvh, 340px);
  max-height: clamp(240px, 42dvh, 420px);
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-lg);
  background:
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
    linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
}

.admission-quality-preview canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(220px, 40dvh, 400px);
  object-fit: contain;
}

.admission-quality-result {
  padding: var(--ui-space-4);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-md);
  line-height: 1.5;
}

.admission-quality-result strong {
  display: block;
}

.admission-quality-result p,
.admission-quality-result ul {
  margin: var(--ui-space-2) 0 0;
}

.admission-quality-result--success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.admission-quality-result--warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.admission-quality-result--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.admission-quality-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ui-space-3);
  margin: 0;
}

.admission-quality-metrics > div {
  padding: var(--ui-space-3);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-color-surface-muted);
}

.admission-quality-metrics dt {
  color: var(--ui-color-muted);
  font-size: var(--ui-text-xs);
}

.admission-quality-metrics dd {
  margin: var(--ui-space-1) 0 0;
  color: var(--ui-color-text);
  font-size: var(--ui-text-sm);
  font-weight: 800;
}

.admission-quality-guidance {
  padding: var(--ui-space-4);
  border-radius: var(--ui-radius-md);
  background: var(--ui-color-surface-muted);
  color: var(--ui-color-text);
  font-size: var(--ui-text-sm);
  line-height: 1.5;
}

.admission-quality-guidance ul {
  margin: var(--ui-space-2) 0 0;
  padding-left: 1.25rem;
}

.admission-quality-dialog__footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--ui-color-border);
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.06);
}

.admission-quality-rotation-actions,
.admission-quality-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
}

@media (max-width: 760px) {
  .admission-quality-dialog {
    align-items: end;
    padding: 0;
  }

  .admission-quality-dialog__panel {
    width: 100%;
    height: 96dvh;
    max-height: 96dvh;
    border-radius:
      var(--ui-radius-xl)
      var(--ui-radius-xl)
      0
      0;
  }

  .admission-quality-dialog__header,
  .admission-quality-dialog__footer {
    padding: var(--ui-space-4);
  }

  .admission-quality-dialog__body {
    padding: var(--ui-space-4);
  }

  .admission-quality-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admission-quality-dialog__footer {
    display: grid;
  }

  .admission-quality-rotation-actions,
  .admission-quality-primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .admission-quality-metrics {
    grid-template-columns: 1fr;
  }

  .admission-quality-rotation-actions,
  .admission-quality-primary-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admission-quality-dialog *,
  .admission-quality-dialog *::before,
  .admission-quality-dialog *::after {
    scroll-behavior: auto;
  }
}

/* Documentos admissionais no detalhe do card */
.pipeline-admission-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pipeline-admission-summary span {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--ui-border-color, #dfe3e8);
  border-radius: 999px;
  background: var(--ui-surface-muted, #f7f8fa);
  font-size: 0.78rem;
  line-height: 1.2;
}

.pipeline-admission-list {
  display: grid;
  gap: 0.75rem;
}

.pipeline-admission-item {
  padding: 0.9rem;
  border: 1px solid var(--ui-border-color, #dfe3e8);
  border-radius: var(--ui-radius-md, 10px);
  background: var(--ui-surface, #fff);
}

.pipeline-admission-item__header,
.pipeline-admission-file {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.pipeline-admission-files {
  display: grid;
  gap: 0.5rem;
}

.pipeline-admission-file {
  padding-top: 0.65rem;
  border-top: 1px solid var(--ui-border-color, #e7e9ed);
}

.pipeline-admission-file strong {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .pipeline-admission-item__header,
  .pipeline-admission-file {
    flex-direction: column;
  }

  .pipeline-admission-summary {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.pipeline-admission-operation {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--ui-radius-md, 10px);
  background: rgba(5, 150, 105, 0.08);
  color: #075f4b;
}

.pipeline-admission-operation__spinner {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: pipeline-admission-spin 0.75s linear infinite;
}

@keyframes pipeline-admission-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-admission-operation__spinner {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.55;
  }
}

.pipeline-admission-file__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pipeline-admission-file__reason {
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(185, 28, 28, 0.2);
  border-radius: var(--ui-radius-sm, 8px);
  background: rgba(185, 28, 28, 0.06);
  color: #991b1b;
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .pipeline-admission-file__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .pipeline-admission-file__actions .ui-button {
    flex: 1 1 auto;
  }
}

.admission-file-review-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.admission-file-review-status--pending {
  background: rgba(180, 83, 9, 0.1);
  color: #92400e;
}

.admission-file-review-status--approved {
  background: rgba(21, 128, 61, 0.1);
  color: #166534;
}

.admission-file-review-status--rejected {
  background: rgba(185, 28, 28, 0.1);
  color: #991b1b;
}

.admission-file-review-help {
  display: block;
  margin-top: 0.25rem;
  color: var(--ui-text-muted, #64748b);
  font-size: 0.78rem;
  line-height: 1.4;
}

.admission-file-rejection-reason {
  display: block;
  margin-top: 0.45rem;
  color: #991b1b;
  line-height: 1.4;
}

.admission-file-reupload-help {
  display: block;
  margin-top: 0.25rem;
  color: var(--ui-text-muted, #64748b);
  line-height: 1.4;
}


/* Validação operacional de documentos admissionais */
.admission-document-review-modal {
  z-index: 1180;
}

.admission-review-shell {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.admission-review-body {
  display: grid;
  gap: 20px;
  min-height: 0;
  overflow-y: auto;
}

.admission-review-section {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.admission-review-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admission-review-section-header h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.admission-review-section-header p {
  margin: 4px 0 0;
  color: var(--slate-500, #64748b);
  font-size: 0.875rem;
}

.admission-review-preview-container {
  min-height: 360px;
  max-height: 62vh;
  overflow: auto;
  border: 1px solid var(--ui-border, #dbe3ec);
  border-radius: 12px;
  background: #f8fafc;
}

.admission-review-preview {
  display: block;
  width: 100%;
  border: 0;
}

.admission-review-preview--pdf {
  min-height: 600px;
  height: 62vh;
  background: #ffffff;
}

.admission-review-image-container {
  display: flex;
  justify-content: center;
  min-height: 360px;
  padding: 16px;
}

.admission-review-preview--image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}

.admission-review-table-wrapper {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ui-border, #dbe3ec);
  border-radius: 12px;
}

.admission-review-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.admission-review-table th,
.admission-review-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ui-border, #e2e8f0);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.admission-review-table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admission-review-table tbody th {
  min-width: 150px;
  font-weight: 700;
}

.admission-review-table tbody tr:last-child th,
.admission-review-table tbody tr:last-child td {
  border-bottom: 0;
}

.admission-review-value {
  font-weight: 700;
}

.admission-review-empty {
  padding: 18px;
  border: 1px dashed var(--ui-border, #cbd5e1);
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  line-height: 1.55;
}

.admission-review-footer {
  gap: 16px;
}

@media (max-width: 760px) {
  .admission-review-shell {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .admission-review-body {
    padding-inline: 14px;
  }

  .admission-review-preview-container,
  .admission-review-image-container {
    min-height: 280px;
  }

  .admission-review-preview--pdf {
    min-height: 480px;
    height: 58vh;
  }

  .admission-review-section-header {
    flex-direction: column;
  }

  .admission-review-table-wrapper {
    overflow: visible;
    border: 0;
  }

  .admission-review-table,
  .admission-review-table tbody,
  .admission-review-table tr,
  .admission-review-table th,
  .admission-review-table td {
    display: block;
    width: 100%;
  }

  .admission-review-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .admission-review-table tbody {
    display: grid;
    gap: 12px;
  }

  .admission-review-table tbody tr {
    padding: 14px;
    border: 1px solid var(--ui-border, #dbe3ec);
    border-radius: 12px;
    background: #ffffff;
  }

  .admission-review-table tbody th,
  .admission-review-table tbody td {
    display: grid;
    grid-template-columns: minmax(110px, 38%) 1fr;
    gap: 10px;
    min-width: 0;
    padding: 8px 0;
    border-bottom: 1px solid #eef2f7;
  }

  .admission-review-table tbody td::before,
  .admission-review-table tbody th::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .admission-review-table tbody tr > :last-child {
    border-bottom: 0;
  }

  .admission-review-footer {
    align-items: stretch;
  }

  .admission-review-footer .ui-form__actions {
    display: grid;
    width: 100%;
  }

  .admission-review-footer .ui-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admission-document-review-modal,
  .admission-review-shell {
    animation: none;
    transition: none;
  }
}

/* =========================================================
   Candidate preferences
   Zona / Turno / Escala
   ========================================================= */

#organization-candidate-preferences-panel {
  min-width: 0;
}

.organization-preferences-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding-block: 12px;
}

.organization-preferences-toolbar .ui-field {
  width: min(100%, 280px);
  margin: 0;
}

#organization-candidate-preferences-list .organization-row {
  align-items: flex-start;
}

#organization-candidate-preferences-list .organization-row-main {
  min-width: 0;
}

#organization-candidate-preferences-list .organization-row-description {
  overflow-wrap: anywhere;
}

#organization-candidate-preferences-list .organization-row-actions {
  flex: 0 0 auto;
}

#candidate-preference-modal.ui-modal {
  padding: 20px;
}

#candidate-preference-modal .ui-modal__shell {
  max-height: calc(100dvh - 40px);
}

#candidate-preference-modal .ui-modal__body {
  min-height: 0;
  overflow-y: auto;
}

#candidate-preference-modal .ui-form {
  min-height: 0;
}

#candidate-preference-modal .ui-form-grid {
  align-items: start;
}

#candidate-preference-modal textarea.ui-control {
  resize: vertical;
  min-height: 96px;
}

@media (max-width: 767px) {
  .organization-preferences-toolbar {
    align-items: stretch;
  }

  .organization-preferences-toolbar .ui-field {
    width: 100%;
  }

  #organization-candidate-preferences-list .organization-row {
    align-items: stretch;
  }

  #organization-candidate-preferences-list .organization-row-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  #organization-candidate-preferences-list .organization-row-actions button {
    flex: 1 1 140px;
  }

  #candidate-preference-modal.ui-modal {
    padding: 12px;
  }

  #candidate-preference-modal .ui-modal__shell {
    max-height: calc(100dvh - 24px);
  }

  #candidate-preference-modal .ui-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #candidate-preference-modal .ui-modal__footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  #candidate-preference-modal .ui-modal__footer button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #candidate-preference-modal,
  #candidate-preference-modal .ui-modal__shell {
    scroll-behavior: auto;
  }
}

/* Talent Pool - Contact history */
.talent-pool-contact-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.talent-pool-contact-form {
  display: grid;
  gap: 0.875rem;
}

.talent-pool-contact-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.talent-pool-contact-last {
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
}

.talent-pool-contact-feedback {
  margin: 0;
}

.talent-pool-contact-history {
  display: grid;
  gap: 0.875rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.talent-pool-contact-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.talent-pool-contact-history__head > div {
  display: grid;
  gap: 0.125rem;
}

.talent-pool-contact-history__head span {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

.talent-pool-contact-timeline {
  display: grid;
}

.talent-pool-contact-timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 1rem;
}

.talent-pool-contact-timeline__item:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 0.875rem;
  bottom: -0.125rem;
  left: 0.3125rem;
  width: 1px;
  background: var(--border-color, #e2e8f0);
}

.talent-pool-contact-timeline__marker {
  position: relative;
  z-index: 1;
  width: 0.6875rem;
  height: 0.6875rem;
  margin-top: 0.25rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: var(--surface, #fff);
}

.talent-pool-contact-timeline__content {
  min-width: 0;
  display: grid;
  gap: 0.375rem;
}

.talent-pool-contact-timeline__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.talent-pool-contact-timeline__header span {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

.talent-pool-contact-timeline__content p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.talent-pool-contact-history-empty {
  padding: 0.875rem;
  border: 1px dashed var(--border-color, #e2e8f0);
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
}

@media (max-width: 640px) {
  .talent-pool-contact-actions,
  .talent-pool-contact-history__head {
    align-items: stretch;
    flex-direction: column;
  }

  .talent-pool-contact-actions .ui-button,
  .talent-pool-contact-history__head .ui-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .talent-pool-contact-timeline__item {
    scroll-behavior: auto;
  }
}

/* Pipeline candidate message notification */
.pipeline-card-message-alert {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.65rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 0.65rem;
  background: rgba(245, 158, 11, 0.10);
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
}

.pipeline-card-message-alert-icon {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
}

/* ==========================================================================
   Conversations — clean operational layout
   Scope: #view-conversations
   ========================================================================== */

#view-conversations {
  padding: 0.75rem 1rem;
  background: #f8faf9;
}

#view-conversations > .conversation-layout {
  gap: 1rem;
  grid-template-columns: 340px minmax(0, 1fr);
}

/* --------------------------------------------------------------------------
   Containers
   -------------------------------------------------------------------------- */

#view-conversations .conversation-sidebar,
#view-conversations .conversation-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.15rem;
  background: #ffffff;
  box-shadow: none;
}

#view-conversations .conversation-sidebar {
  padding: 0;
}

#view-conversations .conversation-sidebar > .panel-header {
  flex: 0 0 auto;
  margin: 0;
  padding: 1.1rem 1.15rem 0.8rem;
  border-bottom: 0;
}

#view-conversations .conversation-sidebar .panel-title {
  font-size: 1.08rem;
  line-height: 1.2;
}

#view-conversations .conversation-sidebar .text-xs {
  margin-top: 0.18rem;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   Sidebar toolbar
   -------------------------------------------------------------------------- */

#view-conversations .conversation-toolbar {
  gap: 0.7rem;
  margin: 0;
  padding: 0.45rem 1.15rem 0.9rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

#view-conversations .conversation-search-field input,
#view-conversations .conversation-toolbar select {
  min-height: 2.75rem;
  border-color: #e2e8f0;
  border-radius: 0.8rem;
  background: #ffffff;
  box-shadow: none;
}

#view-conversations .conversation-search-field input::placeholder {
  color: #94a3b8;
}

#view-conversations .conversation-filter-field span,
#view-conversations .conversation-search-field span {
  font-size: 0.7rem;
  font-weight: 600;
  color: #475569;
}

#view-conversations .conversation-toolbar-row {
  align-items: stretch;
  gap: 0.5rem;
}

#view-conversations .conversation-filter-count {
  display: grid;
  align-content: center;
  min-width: 74px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.15rem 0;
  text-align: left;
}

#view-conversations .conversation-filter-count .text-xs {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

#view-conversations .conversation-filter-count #conversation-filter-count {
  margin-top: 0.15rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
}

/* --------------------------------------------------------------------------
   Conversation list
   -------------------------------------------------------------------------- */

#view-conversations .conversation-list {
  flex: 1 1 auto;
  gap: 0.18rem;
  padding: 0.55rem 0.65rem 0.8rem;
  scrollbar-gutter: stable;
}

#view-conversations .conversation-row {
  border-radius: 0.9rem;
}

#view-conversations .conversation-row-body {
  min-height: 76px;
  gap: 0.65rem;
  border: 0;
  border-radius: 0.9rem;
  background: transparent;
  padding: 0.7rem 0.7rem;
  box-shadow: none;
  transition:
    background-color 140ms ease,
    box-shadow 140ms ease;
}

#view-conversations .conversation-row:hover .conversation-row-body {
  background: #f8faf9;
}

#view-conversations .conversation-row.selected .conversation-row-body {
  border: 0;
  background: #edf8f4;
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.1);
}

#view-conversations .conversation-avatar {
  width: 2.55rem;
  height: 2.55rem;
  background: #e3f4ee;
  box-shadow: none;
  color: #087461;
}

#view-conversations .conversation-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #17231f;
}

#view-conversations .conversation-time {
  padding-top: 0.05rem;
  font-size: 0.68rem;
  color: #64748b;
}

#view-conversations .conversation-row-main {
  gap: 0.2rem;
}

#view-conversations .conversation-row-bottom {
  display: grid;
  gap: 0.28rem;
}

#view-conversations .conversation-row-snippet {
  width: 100%;
}

#view-conversations .conversation-secondary-meta {
  font-size: 0.7rem;
  color: #718078;
}

#view-conversations .conversation-preview {
  font-size: 0.76rem;
  color: #62706a;
}

#view-conversations .conversation-row-badges {
  justify-content: flex-start;
  gap: 0.25rem;
}

#view-conversations .conversation-row-badges .badge,
#view-conversations .conversation-row-badges .chip,
#view-conversations .conversation-row-badges .conversation-label-chip {
  border: 0;
  box-shadow: none;
  padding: 0.15rem 0.42rem;
  font-size: 0.63rem;
}

/* --------------------------------------------------------------------------
   Conversation header
   -------------------------------------------------------------------------- */

#view-conversations .conversation-panel > .panel-header {
  padding: 1rem 1.25rem 0.95rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

#view-conversations .conversation-panel-header {
  gap: 1rem;
}

#view-conversations .conversation-panel-header > .min-w-0 {
  flex: 1 1 auto;
}

#view-conversations #conversation-panel-title {
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 750;
  color: #15231e;
}

#view-conversations #conversation-detail-status {
  gap: 0.5rem;
  margin-top: 0.35rem;
}

#view-conversations .conversation-detail-main {
  gap: 0.4rem;
}

#view-conversations .conversation-header-contact {
  align-items: center;
}

#view-conversations .conversation-avatar-header {
  width: 2.7rem;
  height: 2.7rem;
}

#view-conversations .conversation-header-identity {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 0.35rem;
}

#view-conversations .conversation-header-identity .conversation-detail-meta {
  font-size: 0.75rem;
  color: #64748b;
}

#view-conversations .conversation-header-identity
  [data-conversation-sync-status]:not([hidden])::before {
  content: "·";
  margin-right: 0.35rem;
  color: #94a3b8;
}

/* --------------------------------------------------------------------------
   Header metadata chips
   -------------------------------------------------------------------------- */

#view-conversations .conversation-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

#view-conversations .conversation-detail-meta-item {
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.38rem;
  max-width: 100%;
  min-height: 2rem;
  border: 1px solid #e4e9e6;
  border-radius: 999px;
  background: #f8faf9;
  padding: 0.32rem 0.62rem;
  font-size: 0.72rem;
  line-height: 1.1;
  color: #18251f;
}

#view-conversations .conversation-detail-meta-label {
  flex: 0 0 auto;
  color: #748179;
  font-weight: 500;
}

#view-conversations .conversation-detail-meta-value {
  min-width: 0;
  overflow: hidden;
  color: #25312c;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-conversations
  .conversation-detail-meta-item[data-meta-label="Responsável"] {
  border-color: #eedcb8;
  background: #fff8ed;
}

#view-conversations
  .conversation-detail-meta-item[data-meta-label="Responsável"]
  .conversation-detail-meta-value {
  color: #9a6722;
}

#view-conversations .conversation-label-strip:empty {
  display: none;
}

/* --------------------------------------------------------------------------
   Header actions
   -------------------------------------------------------------------------- */

#view-conversations .conversation-header-actions {
  align-self: flex-start;
  gap: 0.4rem;
}

#view-conversations .conversation-header-actions .secondary-button-compact {
  min-height: 2.25rem;
  border-color: #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 0.42rem 0.72rem;
  box-shadow: none;
  color: #43524b;
  font-size: 0.76rem;
}

#view-conversations .conversation-header-actions .secondary-button-compact:hover {
  background: #f8faf9;
  border-color: #d7dfda;
}

#view-conversations #conversation-status-button {
  color: #b3463a;
}

/* --------------------------------------------------------------------------
   Thread
   -------------------------------------------------------------------------- */

#view-conversations .conversation-thread {
  gap: 0;
  padding: 0;
  background: #ffffff;
}

#view-conversations .conversation-message-stack {
  gap: 0.65rem;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  padding: 1.5rem 1.5rem 1.1rem;
}

#view-conversations .message-bubble {
  max-width: min(68%, 680px);
  border: 0;
  border-radius: 1rem;
  padding: 0.72rem 0.88rem;
  box-shadow: none;
}

#view-conversations .message-bubble.inbound {
  background: #f4f6f5;
}

#view-conversations .message-bubble.outbound {
  background: #ddf7e9;
}

#view-conversations .message-bubble.internal {
  background: #f7f8f7;
  border: 1px solid #e5e9e7;
}

#view-conversations .message-bubble-label {
  color: #52625a;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
}

#view-conversations .message-bubble-time {
  font-size: 0.66rem;
  color: #87938d;
}

#view-conversations .message-bubble-content {
  font-size: 0.86rem;
  line-height: 1.48;
  color: #1f2c26;
}

/* --------------------------------------------------------------------------
   Composer
   -------------------------------------------------------------------------- */

#view-conversations .conversation-composer-body {
  border-top: 1px solid #e8ecea;
  padding: 0.8rem 1.25rem 1rem;
  background: #ffffff;
}

#view-conversations .conversation-composer {
  gap: 0.55rem;
  border: 1px solid #e4e9e6;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.75rem;
  box-shadow: none;
}

#view-conversations .conversation-composer-tabs {
  gap: 0.15rem;
}

#view-conversations .conversation-tab {
  min-height: 2rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  padding: 0.32rem 0.6rem;
  color: #7a8781;
}

#view-conversations .conversation-tab.active {
  border: 0;
  background: #e8f5f0;
  color: #08745d;
}

#view-conversations .conversation-composer-toolbar {
  gap: 0.3rem;
}

#view-conversations .conversation-icon-button {
  min-width: 2.15rem;
  min-height: 2.15rem;
  border-color: #e5e9e7;
  border-radius: 0.7rem;
  padding: 0.3rem;
  box-shadow: none;
}

#view-conversations .conversation-note-draft {
  min-height: 72px;
  max-height: min(24dvh, 150px);
  border: 0;
  border-radius: 0.8rem;
  background: #fafcfb;
  padding: 0.7rem 0.75rem;
  box-shadow: inset 0 0 0 1px #e5e9e7;
}

#view-conversations .conversation-note-draft:focus {
  border: 0;
  box-shadow:
    inset 0 0 0 1px rgba(5, 150, 105, 0.45),
    0 0 0 3px rgba(5, 150, 105, 0.06);
}

#view-conversations .conversation-composer-footer {
  gap: 0.75rem;
  padding-top: 0.15rem;
}

#view-conversations .conversation-composer-status {
  color: #66746d;
  font-size: 0.73rem;
}

#view-conversations #conversation-composer-action {
  min-height: 2.55rem;
  border-radius: 0.75rem;
  padding-inline: 1rem;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1280px) {
  #view-conversations > .conversation-layout {
    grid-template-columns: 310px minmax(0, 1fr);
  }

  #view-conversations .conversation-detail-meta-item {
    max-width: 230px;
  }

  #view-conversations .conversation-header-actions {
    max-width: 360px;
  }
}

@media (max-width: 1024px) {
  #view-conversations {
    padding: 0.75rem;
  }

  #view-conversations > .conversation-layout {
    grid-template-columns: 1fr;
  }

  #view-conversations .conversation-sidebar {
    max-height: none;
  }

  #view-conversations .conversation-panel-header {
    flex-direction: column;
  }

  #view-conversations .conversation-header-actions {
    width: 100%;
    max-width: none;
  }

  #view-conversations .conversation-header-actions .secondary-button-compact {
    flex: 0 1 auto;
  }

  #view-conversations .conversation-message-stack {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  #view-conversations {
    padding: 0.5rem;
  }

  #view-conversations .conversation-toolbar-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  #view-conversations .conversation-filter-count {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
  }

  #view-conversations .conversation-panel > .panel-header {
    padding: 0.9rem;
  }

  #view-conversations .conversation-header-contact {
    flex-wrap: wrap;
  }

  #view-conversations .conversation-header-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  #view-conversations .conversation-detail-meta-item {
    width: 100%;
    max-width: none;
    justify-content: space-between;
  }

  #view-conversations .conversation-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #view-conversations .conversation-header-actions .secondary-button-compact,
  #view-conversations .conversation-more-actions {
    width: 100%;
  }

  #view-conversations .conversation-more-actions-button {
    width: 100%;
    justify-content: center;
  }

  #view-conversations .conversation-message-stack {
    min-height: 360px;
    padding: 1rem 0.75rem;
  }

  #view-conversations .message-bubble {
    max-width: 88%;
  }

  #view-conversations .conversation-composer-body {
    padding: 0.7rem;
  }

  #view-conversations .conversation-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  #view-conversations .conversation-composer-footer-actions,
  #view-conversations #conversation-composer-action {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #view-conversations .conversation-row-body {
    transition: none;
  }
}

/* End Conversations — clean operational layout */

/* ==========================================================================
   Conversations — clean operational layout / pass 2
   ========================================================================== */

#view-conversations .conversation-panel > .panel-header {
  padding-top: 0.85rem;
  padding-bottom: 0.75rem;
}

#view-conversations #conversation-detail-status {
  margin-top: 0.25rem;
  gap: 0.38rem;
}

#view-conversations .conversation-detail-main {
  gap: 0.32rem;
}

#view-conversations .conversation-header-contact {
  min-height: 2.45rem;
}

#view-conversations .conversation-avatar-header {
  width: 2.5rem;
  height: 2.5rem;
}

#view-conversations .conversation-header-identity {
  gap: 0.28rem;
}

#view-conversations .conversation-header-identity .conversation-detail-meta {
  font-size: 0.72rem;
}

#view-conversations .conversation-detail-main > .secondary-button {
  min-height: 2.1rem;
  padding: 0.34rem 0.62rem;
  border-radius: 0.68rem;
  font-size: 0.72rem;
  box-shadow: none;
}

#view-conversations .conversation-header-meta {
  gap: 0.3rem;
}

#view-conversations .conversation-detail-meta-item {
  min-height: 1.85rem;
  padding: 0.27rem 0.55rem;
  font-size: 0.69rem;
}

#view-conversations .conversation-header-actions {
  gap: 0.32rem;
}

#view-conversations .conversation-header-actions .secondary-button-compact {
  min-height: 2.15rem;
  padding: 0.36rem 0.68rem;
  font-size: 0.73rem;
}

#view-conversations .conversation-message-stack {
  padding-top: 1.15rem;
}

#view-conversations .conversation-composer-body {
  padding-top: 0.65rem;
}

#view-conversations .conversation-composer {
  padding: 0.65rem;
}

#view-conversations .conversation-note-draft {
  min-height: 64px;
}

#view-conversations .conversation-list {
  padding-top: 0.42rem;
}

#view-conversations .conversation-row-body {
  min-height: 70px;
  padding-top: 0.58rem;
  padding-bottom: 0.58rem;
}

#view-conversations .conversation-toolbar {
  padding-bottom: 0.75rem;
}

@media (min-width: 1281px) {
  #view-conversations > .conversation-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

/* End Conversations — clean operational layout / pass 2 */

/* ==========================================================================
   Conversations — maximize chat workspace
   ========================================================================== */

@media (min-width: 1025px) {
  #view-conversations > .conversation-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 0.75rem;
  }

  #view-conversations .conversation-panel > .panel-header {
    padding: 0.7rem 1rem 0.65rem;
  }

  #view-conversations #conversation-panel-title {
    font-size: 1rem;
  }

  #view-conversations #conversation-detail-status {
    gap: 0.28rem;
    margin-top: 0.2rem;
  }

  #view-conversations .conversation-header-contact {
    min-height: 2rem;
    gap: 0.25rem;
  }

  #view-conversations .conversation-avatar-header {
    width: 2.25rem;
    height: 2.25rem;
  }

  #view-conversations .conversation-header-identity {
    gap: 0.22rem;
  }

  #view-conversations .conversation-detail-main > .badge,
  #view-conversations .conversation-detail-main > .chip {
    padding-top: 0.18rem;
    padding-bottom: 0.18rem;
  }

  #view-conversations .conversation-detail-main > .secondary-button {
    min-height: 1.95rem;
    padding: 0.27rem 0.52rem;
    font-size: 0.69rem;
  }

  #view-conversations .conversation-header-meta {
    gap: 0.25rem;
  }

  #view-conversations .conversation-detail-meta-item {
    min-height: 1.65rem;
    padding: 0.2rem 0.46rem;
    font-size: 0.65rem;
  }

  #view-conversations .conversation-header-actions {
    gap: 0.25rem;
  }

  #view-conversations .conversation-header-actions .secondary-button-compact {
    min-height: 1.95rem;
    padding: 0.28rem 0.55rem;
    font-size: 0.69rem;
  }

  #view-conversations .conversation-thread {
    flex: 1 1 auto;
    min-height: 0;
  }

  #view-conversations .conversation-message-stack {
    flex: 1 1 0;
    min-height: 0;
    padding: 0.85rem 1.15rem;
  }

  #view-conversations .conversation-composer-body {
    flex: 0 0 auto;
    padding: 0.55rem 1rem 0.7rem;
  }

  #view-conversations .conversation-composer {
    gap: 0.35rem;
    padding: 0.55rem;
  }

  #view-conversations .conversation-composer-tabs {
    gap: 0.1rem;
  }

  #view-conversations .conversation-tab {
    min-height: 1.75rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.68rem;
  }

  #view-conversations .conversation-composer-toolbar {
    gap: 0.22rem;
  }

  #view-conversations .conversation-icon-button {
    min-width: 1.95rem;
    min-height: 1.95rem;
  }

  #view-conversations .conversation-note-draft {
    min-height: 52px;
    height: 72px;
    max-height: 120px;
    padding: 0.55rem 0.65rem;
  }

  #view-conversations .conversation-composer-footer {
    gap: 0.4rem;
  }

  #view-conversations .conversation-composer-status {
    font-size: 0.68rem;
  }

  #view-conversations #conversation-composer-action {
    min-height: 2.2rem;
    padding-inline: 0.85rem;
  }

  #view-conversations .conversation-sidebar > .panel-header {
    padding: 0.85rem 0.9rem 0.6rem;
  }

  #view-conversations .conversation-toolbar {
    padding: 0.35rem 0.9rem 0.65rem;
    gap: 0.5rem;
  }

  #view-conversations .conversation-search-field input,
  #view-conversations .conversation-toolbar select {
    min-height: 2.45rem;
  }

  #view-conversations .conversation-list {
    padding-inline: 0.5rem;
  }

  #view-conversations .conversation-row-body {
    min-height: 64px;
    padding: 0.48rem 0.55rem;
  }
}

/* End Conversations — maximize chat workspace */
