:root {
  --primary: #6e26d9;
  --primary-hover: #5420a9;
  --primary-soft: #efe7fb;
  --secondary: #0e152f;
  --foreground: #0e152f;
  --background: #f9f8fc;
  --surface: #fff;
  --surface-muted: #eff1f5;
  --muted: #616b89;
  --line: #e0dce9;
  --destructive: #dc2828;
  --destructive-hover: #b91c1c;
  --destructive-soft: #fee2e2;
  --field-background: #f6f5fa;
  --control-height: 38px;
  --control-radius: 6px;
  --scrollbar-size: 9px;
  --scrollbar-size-sm: 6px;
  --scrollbar-track: #f1eef9;
  --scrollbar-thumb: #c3b2e6;
  --scrollbar-thumb-hover: #8643e5;
  --scrollbar-thumb-active: var(--primary-hover);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-soft: rgba(139, 92, 246, 0.18);
  --secondary: #e2e8f0;
  --foreground: #f1f5f9;
  --background: #0b0f19;
  --surface: #131b2e;
  --surface-muted: #1e293b;
  --muted: #94a3b8;
  --line: #263248;
  --destructive: #ef4444;
  --destructive-hover: #dc2626;
  --destructive-soft: rgba(239, 68, 68, 0.18);
  --field-background: #0f172a;
  --scrollbar-track: #0f172a;
  --scrollbar-thumb: #334155;
  --scrollbar-thumb-hover: #8b5cf6;
  --scrollbar-thumb-active: #7c3aed;
  color-scheme: dark;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid var(--scrollbar-track);
  background-clip: padding-box;
  transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

::-webkit-scrollbar-thumb:active {
  background-color: var(--scrollbar-thumb-active);
}

::-webkit-scrollbar-corner {
  background: transparent;
}
:root { font: 15px Figtree, system-ui, sans-serif; color: var(--foreground); background: var(--background); }
* { box-sizing: border-box; }
body { margin: 0; }
#shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; align-items: start; transition: grid-template-columns .18s ease; }
#shell.sidebar-collapsed { grid-template-columns: 74px minmax(0, 1fr); }
#shell > aside { position: sticky; top: 0; height: 100vh; height: 100dvh; max-height: 100dvh; overflow: hidden; background: var(--secondary); color: #cbd5e1; border-right: 1px solid #1e293b; padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; }
a { color: inherit; text-decoration: none; }
.brand-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 6px; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; min-width: 0; }
.brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .15em; }
.logo { background: var(--primary); color: white; padding: 7px 12px; border-radius: 10px; }
#shell > aside .brand { color: var(--background); }
#shell > aside .logo { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 10px; font-size: 17px; font-weight: 800; background: linear-gradient(135deg, #9251eb 0%, #8643e5 55%, var(--primary) 100%); box-shadow: 0 4px 14px rgba(110, 38, 217, .35); flex-shrink: 0; }
.brand-copy { display: grid; gap: 1px; min-width: 0; }
.brand-title { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; color: var(--background); line-height: 1.15; white-space: nowrap; }
.brand-badge { display: inline-block; padding: 1px 6px; border-radius: 5px; border: 1px solid #3c2462; background: rgba(110, 38, 217, .16); color: #c8a4ff; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; }
#shell > aside .brand small { color: #64748b; font-size: 11px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.sidebar-toggle { background: transparent; border: 0; color: #94a3b8; padding: 0 5px; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; }
.sidebar-toggle:hover { background: #172033; color: var(--background); }
nav { flex: 1 1 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #334155 transparent; display: flex; flex-direction: column; gap: 1px; padding-right: 2px; }
nav::-webkit-scrollbar { width: 5px; height: 5px; }
nav::-webkit-scrollbar-track { background: transparent; }
nav::-webkit-scrollbar-thumb { background-color: #334155; border: 1px solid transparent; border-radius: 999px; }
nav::-webkit-scrollbar-thumb:hover { background-color: #8643e5; }
nav p { margin: 10px 10px 3px; font-size: 10px; letter-spacing: .09em; font-weight: 700; text-transform: uppercase; color: #64748b; flex-shrink: 0; }
nav p:first-child { margin-top: 2px; }
nav a { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 13.5px; line-height: 1.25; font-weight: 500; color: #cbd5e1; flex-shrink: 0; transition: background .15s, color .15s; }
.nav-icon { display: inline-grid; place-items: center; width: 17px; height: 17px; color: #c8a4ff; flex-shrink: 0; }
.nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: #1e293b; color: #c7a5f0; font-size: 11px; font-weight: 700; line-height: 1.35; }
nav a:hover, .switch:hover { color: var(--surface); background: #172033; }
nav a[aria-current] { color: var(--surface); background: linear-gradient(90deg, var(--primary) 0%, #8643e5 100%); font-weight: 700; box-shadow: 0 3px 10px rgba(110, 38, 217, .35); }
nav a[aria-current] .nav-icon { color: var(--surface); }
nav a[aria-current] .nav-badge { background: var(--primary-hover); color: var(--surface); }
.sidebar-footer { flex-shrink: 0; margin-top: auto; padding-top: 8px; border-top: 1px solid #1e293b; display: grid; gap: 6px; }
.switch { display: flex; align-items: center; gap: 10px; padding: 0 10px; color: #94a3b8; font-size: 13px; font-weight: 500; }
.switch .nav-icon, .switch-ext { color: #64748b; display: inline-grid; place-items: center; }
.switch-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch[aria-current] { color: var(--surface); background: #1e293b; font-weight: 700; }
.switch[aria-current] .nav-icon, .switch[aria-current] .switch-ext { color: #c8a4ff; }
.sidebar-workspace { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 8px; background: #131c2e; border: 1px solid #1f2d46; }
.sidebar-workspace:empty { display: none; }
.workspace-avatar { width: 24px; height: 24px; border-radius: 6px; background: #3c2462; color: #c8a4ff; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.workspace-meta { display: grid; line-height: 1.05; min-width: 0; flex: 1; }
.workspace-meta strong { color: var(--background); font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-plan { display: inline-flex; align-items: center; gap: 5px; color: #10b981; font-size: 11px; font-weight: 600; white-space: nowrap; }
.plan-dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; box-shadow: 0 0 6px #10b981; flex-shrink: 0; }
.workspace-card-select { position: absolute; inset: -1px; opacity: 0; cursor: pointer; width: calc(100% + 2px); }
.sidebar-workspace:focus-within { outline: 2px solid #c8a4ff; outline-offset: 1px; }
.sidebar-brand-logo { display: block; height: 34px; width: auto; max-width: 170px; object-fit: contain; }
.sidebar-brand-icon, .sidebar-brand-fallback-icon { display: none; }
#shell.sidebar-collapsed .brand-copy, #shell.sidebar-collapsed .sidebar-brand-logo, #shell.sidebar-collapsed nav p, #shell.sidebar-collapsed .nav-label, #shell.sidebar-collapsed .nav-badge, #shell.sidebar-collapsed .switch-label, #shell.sidebar-collapsed .switch-ext, #shell.sidebar-collapsed .workspace-meta { display: none; }
#shell.sidebar-collapsed .sidebar-brand-icon { display: block; width: 34px; height: 34px; object-fit: contain; }
#shell.sidebar-collapsed .sidebar-brand-fallback-icon { display: grid; }
.brand-logo { display: block; height: 40px; width: auto; max-width: 220px; object-fit: contain; }
#shell.sidebar-collapsed .brand-bar { flex-direction: column; gap: 6px; }
#shell.sidebar-collapsed nav a, #shell.sidebar-collapsed .switch, #shell.sidebar-collapsed .sidebar-workspace { justify-content: center; padding-inline: 8px; }
main { padding: 0 32px 32px; min-width: 0; }
#shell > main > header { position: sticky; top: 0; z-index: 20; background: var(--surface); margin-inline: -32px; padding-inline: 32px; min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
#environment, #account { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; white-space: nowrap; }
.topbar-env { color: #64748b; font-weight: 500; }
.topbar-sep { color: #94a3b8; font-size: 15px; line-height: 1; }
.topbar-page { color: var(--secondary); font-weight: 700; }
.topbar-divider { width: 1px; height: 22px; background: var(--line); flex-shrink: 0; }
.topbar-context { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 9px; background: var(--background); border: 1px solid var(--line); font-size: 13px; color: var(--secondary); white-space: nowrap; }
.topbar-briefcase { display: inline-grid; place-items: center; color: var(--primary); }
.topbar-context-name { font-weight: 700; color: #1e293b; }
.topbar-context-badge { padding: 2px 6px; border-radius: 5px; background: var(--primary-soft); color: var(--primary-hover); font-size: 10.5px; font-weight: 700; }
.topbar-chevron { display: inline-grid; place-items: center; color: #94a3b8; }
.topbar-search { display: flex; align-items: center; gap: 6px; padding: 0 8px; height: 34px; border-radius: 8px; background: var(--background); border: 1px solid var(--line); width: clamp(104px, 14vw, 168px); min-width: 0; }
.topbar-search:focus-within { background: var(--surface); border-color: var(--focus-border); box-shadow: var(--focus-shadow); }
.topbar-search-icon { display: inline-grid; place-items: center; color: #94a3b8; flex-shrink: 0; }
.topbar-search input { border: 0; padding: 0; background: transparent; font-size: 12.5px; color: var(--secondary); flex: 1; width: 0; min-width: 0; height: 100%; min-height: 0; outline: none; }
.topbar-search-shortcut { flex-shrink: 0; padding: 2px 4px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: inherit; font-size: 10px; line-height: 1; white-space: nowrap; }
@media (max-width: 760px) { .topbar-search-shortcut { display: none; } }
.topbar-icon-btn { position: relative; background: transparent; border: 0; color: #64748b; padding: 6px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; }
.topbar-icon-btn:hover { background: var(--surface-muted); color: var(--secondary); }
.topbar-action-svg { display: inline-grid; place-items: center; }
.notif-dot { position: absolute; top: 4px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--destructive); border: 1.5px solid var(--surface); }
.topbar-user-info { display: grid; gap: 1px; min-width: 0; flex: 1; text-align: left; line-height: 1.15; }
.topbar-user-name { font-size: 13.5px; font-weight: 700; color: var(--foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-email { font-size: 11.5px; font-weight: 500; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-role { font-size: 11px; color: var(--muted); font-weight: 500; }
.topbar-avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: var(--surface); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.user-menu { position: relative; min-width: 0; }
.user-menu-trigger { display: flex; align-items: center; gap: 11px; max-width: 280px; min-height: 44px; height: auto; padding: 5px 12px 5px 7px; border: 1px solid #ddcdf7; border-radius: 12px; background: var(--primary-soft); cursor: pointer; list-style: none; transition: background .15s, border-color .15s, box-shadow .15s; }
.user-menu-trigger:hover { background: var(--primary-soft); border-color: #b69ada; }
.user-menu-trigger::-webkit-details-marker { display: none; }
.user-menu-chevron { display: inline-grid; place-items: center; color: var(--primary); margin-left: 2px; flex-shrink: 0; transition: transform .18s ease; }
.user-menu[open] .user-menu-trigger { border-color: var(--focus-border); box-shadow: var(--focus-shadow); }
.user-menu[open] .user-menu-chevron { transform: rotate(180deg); }
.user-menu-panel { position: absolute; z-index: 20; inset: calc(100% + 6px) 0 auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px rgb(15 23 42 / 14%); }
.user-menu-identity { display: grid; gap: 2px; padding: 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; }
.user-menu-identity strong { color: var(--foreground); font-size: 13px; }
.user-menu-email { color: var(--primary); font-weight: 500; }
.user-menu-panel .user-menu-action { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; padding-inline: 10px; background: var(--surface); border-color: transparent; color: #1e293b; text-align: left; }
.user-menu-action:hover { background: var(--primary-soft); }
.user-menu-panel .user-menu-logout { color: var(--destructive); }
.user-menu-logout:hover { background: var(--destructive-soft); }
.user-menu-dialog { width: min(400px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--foreground); overflow: hidden; }
.user-menu-dialog::backdrop { background: rgb(14 21 47 / 65%); }
.user-menu-dialog dd { margin: 2px 0 12px; overflow-wrap: anywhere; }
.user-menu-dialog dt { font-weight: 700; }
.logout-dialog { width: min(480px, calc(100% - 32px)); padding: 0; }
.logout-dialog p { margin: 0; color: var(--muted); }
button.logout-confirm { display: inline-flex; align-items: center; gap: 6px; background: var(--destructive); border-color: var(--destructive); }
button.logout-confirm:hover { background: var(--destructive-hover); border-color: var(--destructive-hover); }
.topbar-logout-svg { display: inline-grid; place-items: center; }
#workspace:not(:empty) { margin-top: 20px; }
h1 { margin: 0; font-size: clamp(27px, 4vw, 36px); letter-spacing: -.04em; }
h2 { margin: 0 0 12px; font-size: 17px; }
p { line-height: 1.55; }
.subtitle { color: var(--muted); margin: 7px 0 24px; }
.panel, .metric { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 18px; }
.metric strong { display: block; margin-top: 10px; font-size: 25px; overflow-wrap: anywhere; }
.metric span, .empty { color: var(--muted); }
.pipeline-header, .pipeline-actions, .pipeline-title, .pipeline-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pipeline-picker { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 16px; }
.pipeline-picker a, .pipeline-actions a { color: var(--primary); font-weight: 700; }
.pipeline-picker a { padding-block: 8px; }
.pipeline-header { justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pipeline-view { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; }
.pipeline-view button { background: var(--surface); border-color: transparent; color: var(--muted); }
.pipeline-view button[aria-pressed=true] { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.pipeline-toolbar { margin: 12px 0; }
.pipeline-toolbar input[type=search] { width: min(100%, 270px); margin-left: auto; }
.pipeline-total { padding: 4px 9px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); font-size: 13px; }
.pipeline-board { display: flex; align-items: stretch; gap: 12px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); }
.pipeline-board::-webkit-scrollbar { height: 8px; }
.pipeline-board::-webkit-scrollbar-track { background: var(--scrollbar-track); border-radius: 999px; }
.pipeline-board::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: 999px; border: 2px solid var(--scrollbar-track); }
.pipeline-board::-webkit-scrollbar-thumb:hover { background-color: var(--scrollbar-thumb-hover); }
.pipeline-column { flex: 0 0 clamp(290px, 28vw, 336px); min-width: 0; min-height: 240px; padding: 6px; border: 1px solid transparent; border-radius: 10px; background: var(--surface-muted); }
.pipeline-column.drop-target { border-color: var(--primary); background: var(--primary-soft); }
.pipeline-column-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.pipeline-column-heading h2 { margin: 0; overflow-wrap: anywhere; }
.pipeline-collapse { padding: 0 8px; border: 0; background: var(--primary-soft); color: var(--primary); font-size: 20px; line-height: 1.2; }
.pipeline-column.is-collapsed { flex-basis: 58px; }
.pipeline-column.is-collapsed .pipeline-column-heading { flex-direction: column-reverse; align-items: center; padding: 8px 4px; }
.pipeline-column.is-collapsed h2 { max-height: 190px; overflow: hidden; writing-mode: vertical-rl; font-size: 14px; }
.pipeline-column.is-collapsed .pipeline-column-heading p { display: none; }
.pipeline-column-heading p, .pipeline-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pipeline-card {
  margin-bottom: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow-wrap: anywhere;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pipeline-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
}
.pipeline-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgb(110 38 217 / 14%);
}
.pipeline-card[draggable=true] { cursor: grab; }
.pipeline-card[draggable=true]:active { cursor: grabbing; }
.pipeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.pipeline-card-title {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex: 1;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
button.pipeline-card-title:hover {
  background: transparent;
  color: var(--primary-hover);
}
.pipeline-card-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  margin: 0;
  border: 1.5px solid var(--primary);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  flex-shrink: 0;
  transition: background-color 0.15s, border-color 0.15s;
}
.pipeline-card-checkbox:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}
.pipeline-card-checkbox:checked::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--surface);
  border-bottom: 2px solid var(--surface);
  transform: rotate(-45deg) translate(1px, -1px);
}
.pipeline-card-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.pipeline-card-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
}
.pipeline-card-label {
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}
.pipeline-card-value {
  color: #475569;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pipeline-card-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pipeline-contact-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.pipeline-contact-name {
  color: #475569;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pipeline-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 2px;
}
button.pipeline-icon-btn,
.pipeline-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  box-shadow: none;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}
button.pipeline-icon-btn:hover,
.pipeline-icon-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: transparent;
}
button.pipeline-icon-btn:focus-visible,
.pipeline-icon-btn:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: transparent;
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
button.pipeline-icon-btn:active,
.pipeline-icon-btn:active {
  background: #e2d4f8;
}
.pipeline-icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.pipeline-icon-btn svg path.icon-fill,
.pipeline-icon-btn svg .icon-fill,
.btn-icon svg path.icon-fill,
.btn-icon svg .icon-fill {
  fill: currentColor !important;
  stroke: none !important;
}
.pipeline-icon-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary-hover);
  color: var(--surface);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 1.5px var(--surface);
  pointer-events: none;
}
.pipeline-card .pipeline-amount { color: var(--foreground); font-weight: 700; }
.pipeline-card > select { display: block; width: 100%; margin-top: 10px; font-size: 13px; }
.pipeline-empty { margin: 6px 0; padding: 12px; border: 1px dashed #d8d3e6; border-radius: 8px; color: var(--muted); font-size: 13px; }
dialog[open] { display: flex; flex-direction: column; flex-wrap: nowrap; max-height: 85vh; padding: 0; overflow: hidden; }
#content dialog { width: min(100% - 24px, 560px); max-height: 85vh; padding: 0; border: 1px solid var(--line); border-radius: 12px; color: inherit; overflow: hidden; }
#content dialog.opp-modal-dialog {
  width: min(100% - 28px, 920px);
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--foreground);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}
#content dialog.opp-modal-dialog .opp-modal-form {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: min(86vh, 720px);
  max-height: 90vh;
}
.opp-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}
.opp-modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.opp-modal-title {
  margin: 0;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}
.opp-modal-close {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
button.opp-modal-close:hover {
  background: var(--surface-muted);
  color: var(--foreground);
}
.opp-modal-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.4;
}
.opp-modal-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.opp-modal-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.opp-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.opp-nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: auto;
  min-height: 36px;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
button.opp-nav-item:hover {
  background: var(--surface-muted);
  color: var(--foreground);
}
button.opp-nav-item.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.opp-manage-fields {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}
.opp-manage-fields:hover {
  background: var(--primary-soft);
}
.opp-modal-main {
  padding: 20px 24px 28px;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--surface);
}
.opp-tab-panel[hidden] {
  display: none !important;
}
.opp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.opp-section-header-spaced {
  margin-top: 26px;
}
.opp-section-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.opp-section-title {
  color: var(--foreground);
  font-size: 15px;
  font-weight: 500;
}
.opp-section-icon {
  display: inline-flex;
  align-items: center;
  color: var(--foreground);
}
.opp-hide-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}
.opp-checkbox {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  accent-color: var(--primary);
  cursor: pointer;
}
.opp-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.opp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.opp-field[hidden] {
  display: none !important;
}
.opp-field-full {
  grid-column: 1 / -1;
}
.opp-field-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  min-height: 18px;
  margin: 0;
  line-height: 1.3;
}
.opp-required {
  color: var(--destructive);
  font-weight: 600;
}
#content dialog.opp-modal-dialog select,
#content dialog.opp-modal-dialog input,
#content dialog.opp-modal-dialog .opp-input,
#content dialog.opp-modal-dialog .opp-select {
  width: 100%;
  height: 40px;
  margin: 0 !important;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background-color: var(--surface);
  color: var(--foreground);
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#content dialog.opp-modal-dialog select,
#content dialog.opp-modal-dialog .opp-select {
  padding-inline: 12px 30px;
  cursor: pointer;
}
#content dialog.opp-modal-dialog .opp-input::placeholder {
  color: var(--muted);
}
#content dialog.opp-modal-dialog .opp-input:focus,
#content dialog.opp-modal-dialog .opp-select:focus,
#content dialog.opp-modal-dialog .opp-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
#content dialog.opp-modal-dialog .opp-input-chevron {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
.opp-amount-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  margin: 0 !important;
  box-sizing: border-box;
}
.opp-currency-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  line-height: 1;
}
#content dialog.opp-modal-dialog .opp-input-amount {
  width: 100%;
  height: 40px;
  margin: 0 !important;
  padding-left: 36px;
  box-sizing: border-box;
}
#content dialog.opp-modal-dialog .opp-textarea {
  width: 100%;
  min-height: 92px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--foreground);
  font-size: 14px;
  resize: vertical;
}
.opp-helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.opp-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}
.opp-modal-audit {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.opp-audit-link {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
button.opp-audit-link:hover {
  background: transparent;
  color: var(--primary-hover);
  text-decoration: underline;
}
.opp-audit-id-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.opp-audit-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}
button.opp-audit-copy:hover {
  background: var(--primary-soft);
}
.opp-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
#content dialog.opp-modal-dialog .opp-status-msg {
  flex-basis: auto;
  margin-right: 8px;
  font-size: 13px;
}
.opp-btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--destructive-soft);
  border-radius: 8px;
  background: var(--surface);
  color: var(--destructive);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
button.opp-btn-delete:hover,
.opp-btn-delete.is-confirming {
  background: var(--destructive-soft);
  border-color: var(--destructive);
}
.opp-btn-cancel {
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
button.opp-btn-cancel:hover {
  background: var(--surface-muted);
  border-color: var(--muted);
}
.opp-btn-submit {
  height: 40px;
  padding: 0 24px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: var(--surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.opp-btn-submit:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
@media (max-width: 720px) {
  .opp-modal-body {
    grid-template-columns: 1fr;
  }
  .opp-modal-sidebar {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 14px;
  }
  .opp-nav-list {
    flex-direction: row;
    overflow-x: auto;
  }
  .opp-nav-item {
    white-space: nowrap;
  }
  .opp-grid-2 {
    grid-template-columns: 1fr;
  }
}
#content dialog::backdrop { background: rgb(14 21 47 / 65%); }
#content .pipeline-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(100%, 460px); height: 100%; max-width: 100%; max-height: 100%; border-radius: 0; background: var(--surface); }
#content .lead-sheet { width: min(100%, 640px); background: var(--surface); }
.lead-heading > button, .lead-heading-actions { margin-inline-start: auto; }
.lead-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.view-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); }
.view-switch button { background: transparent; border-color: transparent; color: var(--muted); border-radius: 6px; padding: 6px 11px; font-size: 13px; font-weight: 600; box-shadow: none; }
.view-switch button:hover { color: var(--foreground); background: transparent; border-color: transparent; }
.view-switch button[aria-pressed=true] { background: var(--surface); border-color: var(--line); color: var(--foreground); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
.project-kanban-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.project-kanban-progress { margin-top: 10px; }
.project-kanban-status { display: grid; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.project-table-wrap .table { margin-top: 0; }
.project-table-wrap th { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.project-table-wrap td { vertical-align: middle; }
.project-table-wrap td:nth-child(3),
.project-table-wrap td:nth-child(4),
.project-table-wrap td:nth-child(5),
.project-table-wrap td:nth-child(6) { white-space: nowrap; }
.project-table-wrap th:first-child,
.project-table-wrap td:first-child { width: 260px; max-width: 260px; }
.project-row-cell { display: grid; gap: 5px; min-width: 0; max-width: 240px; }
.project-row-cell > strong,
.project-row-cell > a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-title-link { color: var(--foreground); font-weight: 700; text-decoration: none; }
.project-title-link:hover { color: var(--primary); text-decoration: underline; }
.task-project-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; margin-bottom: 18px; }
.task-project-banner-info { display: grid; gap: 6px; min-width: 0; }
.task-project-banner-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-project-banner-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.task-project-banner-link { color: var(--primary); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.task-project-banner-link:hover { text-decoration: underline; }
.lead-panel.task-list-panel { overflow: visible; }
.task-saved-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--background); border-radius: 12px 12px 0 0; }
.task-saved-tab-wrap { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.task-saved-tab-wrap.is-active { border-color: var(--primary); background: var(--primary-soft); }
.task-saved-tab { background: transparent; border: 0; color: var(--muted); padding: 5px 10px; font-size: 12.5px; font-weight: 600; border-radius: 0; }
.task-saved-tab:hover { color: var(--foreground); background: transparent; }
.task-saved-tab-wrap.is-active .task-saved-tab { color: var(--primary); font-weight: 700; }
.task-saved-tab-del { background: transparent; border: 0; border-left: 1px solid var(--line); color: var(--muted); padding: 5px 7px; font-size: 12px; line-height: 1; border-radius: 0; }
.task-saved-tab-del:hover { background: #fee2e2; color: var(--destructive); }
.task-save-filter-btn { margin-inline-start: auto; }
.task-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--surface); border-bottom: 1px solid var(--line); border-radius: 0; }
.task-search-box { position: relative; flex: 1.2 1 180px; min-width: 160px; }
.task-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--muted); pointer-events: none; }
.task-search-box input[type=search] { width: 100%; max-width: none; padding-left: 34px; background: var(--surface); }
.task-toolbar .enterprise-combobox-root { width: auto !important; flex: 0.9 1 125px; min-width: 115px; }
.task-toolbar .enterprise-combobox-root.task-combo-wide { flex: 1.2 1 175px; min-width: 150px; }
.task-toolbar input.enterprise-input-combobox { width: 100% !important; max-width: none !important; background: var(--surface); padding-right: 34px !important; }
.task-toolbar .enterprise-combobox-root.has-value input.enterprise-input-combobox { padding-right: 56px !important; }
.task-clear-filters { flex-shrink: 0; }
.task-clear-filters[hidden] { display: none; }
.task-manage-stages[hidden] { display: none; }
.project-toolbar { border-radius: 12px 12px 0 0; }
.project-search-box { flex: 1.5 1 240px; }
.project-filter-panel { margin-bottom: 14px; }
.task-kanban-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.task-kanban-card > * { min-width: 0; }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-card-hours { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.task-card-hours svg, .task-card-project svg, .task-card-meta-item svg { width: 13px; height: 13px; flex-shrink: 0; }
.task-card-title { font-size: 14px; line-height: 1.35; color: var(--foreground); }
.task-card-desc { margin: 0; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-card-project { display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; padding: 3px 8px; border-radius: 6px; background: var(--surface-muted); color: var(--primary); font-size: 11.5px; font-weight: 600; text-decoration: none; }
.task-card-project span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card-project:hover { background: var(--primary-soft); text-decoration: underline; }
.task-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.task-card-meta-item { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.task-card-meta-item span { min-width: 0; overflow-wrap: anywhere; }
.task-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--line); }
.task-overdue { color: var(--destructive); font-weight: 700; }
select.task-status-pill, span.task-status-pill { display: inline-flex; align-items: center; gap: 6px; width: auto; height: auto; min-height: 0; padding: 5px 11px; border-radius: 999px; border: 1px solid transparent; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; cursor: pointer; }
span.task-status-pill { cursor: default; }
select.task-status-pill::picker-icon { border-color: currentColor; flex-shrink: 0; margin-inline: 2px 0; }
.task-status-pill.is-backlog { background-color: var(--surface-muted); color: var(--muted); border-color: var(--line); }
.task-status-pill.is-todo { background-color: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.task-status-pill.is-in_progress { background-color: var(--primary-soft); color: var(--primary); border-color: #ddcdf7; }
.task-status-pill.is-in_review { background-color: #fef3c7; color: #92400e; border-color: #fde68a; }
.task-status-pill.is-blocked { background-color: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.task-status-pill.is-completed { background-color: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.project-row-progress { margin-top: 0; }
.project-row-progress progress { width: 88px; height: 6px; }
.project-row-progress span { font-size: 12px; color: var(--muted); font-weight: 600; }
.project-priority-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--foreground); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; flex-shrink: 0; }
.project-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--muted); }
.project-priority-pill.is-low .project-dot { background: #64748b; }
.project-priority-pill.is-medium .project-dot { background: #d97706; }
.project-priority-pill.is-high .project-dot { background: #ea580c; }
.project-priority-pill.is-critical .project-dot { background: #dc2626; }
select.project-status-pill, span.project-status-pill { display: inline-flex; align-items: center; gap: 6px; width: auto; height: auto; min-height: 0; padding: 5px 11px; border-radius: 999px; border: 1px solid transparent; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; cursor: pointer; }
span.project-status-pill { cursor: default; }
select.project-status-pill::picker-icon { border-color: currentColor; flex-shrink: 0; margin-inline: 2px 0; }
.project-status-pill.is-planning { background-color: var(--surface-muted); color: var(--muted); border-color: var(--line); }
.project-status-pill.is-in_progress { background-color: var(--primary-soft); color: var(--primary); border-color: #ddcdf7; }
.project-status-pill.is-in_review { background-color: #fef3c7; color: #92400e; border-color: #fde68a; }
.project-status-pill.is-completed { background-color: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.project-status-pill.is-canceled { background-color: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.project-row-actions { justify-content: flex-end; }
.project-icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; }
.project-icon-btn:hover { background: var(--primary-soft); border-color: #ddcdf7; color: var(--primary); }
.project-icon-btn.project-danger { color: var(--destructive); }
.project-icon-btn.project-danger:hover { background: #fee2e2; border-color: #fecaca; color: var(--destructive-hover); }
.project-action-count { line-height: 1; }
.dialog-form { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; flex: 1 1 auto; gap: 0; width: 100%; min-width: 0; min-height: 0; max-height: 85vh; overflow: hidden; }
#content .pipeline-drawer > .dialog-form { height: 100%; max-height: 100%; }
.dialog-header { flex-shrink: 0; display: grid; gap: 4px; padding: 18px 24px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dialog-header h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.dialog-header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.dialog-content { flex: 1 1 auto; min-height: 0; min-width: 0; overflow-y: auto; overflow-x: hidden; padding: 20px 24px; display: grid; align-content: start; gap: 18px; }
.dialog-content:focus-visible, .opp-modal-main:focus-visible, .opp-modal-sidebar:focus-visible { outline: none; }
.dialog-content > * { min-width: 0; margin: 0; }
.dialog-content .table { overflow-x: hidden; }
.dialog-footer { flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface); }
#content dialog .dialog-footer [role=status], .dialog-footer [role=status] { flex: 1 1 auto; margin: 0; color: #a12629; font-size: 13px; }
#content dialog [role=status]:empty, .dialog-footer [role=status]:empty { display: none; }
.lead-sheet-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.lead-sheet-form legend { margin-bottom: 12px; color: var(--muted); font-weight: 700; }
.lead-sheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.lead-sheet-form textarea { height: auto; min-height: 84px; resize: vertical; }
.lead-search-field { position: relative; }
.lead-search-field input { width: 100%; background: var(--surface); padding-inline-end: 58px; }
.lead-search-field:focus-within input { border-color: #237439; box-shadow: none; }
.lead-search-field > button {
  position: absolute; bottom: 1px; display: inline-grid; place-items: center; align-content: center;
  width: 24px; height: calc(var(--control-height) - 2px);
  padding: 0; background: transparent; border: 0; color: var(--muted);
}
.lead-search-field > button:first-of-type { right: 25px; }
.lead-search-field > button:last-of-type { right: 4px; }
.lead-search-options {
  position: absolute; inset: calc(100% + 8px) 0 auto; z-index: 2;
  max-height: 190px; overflow: auto; padding: 4px;
  border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--surface);
}
.lead-search-options button {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  width: 100%; height: 34px; text-align: start;
  background: transparent; border-color: transparent; color: var(--foreground);
}
.lead-search-options button:is(:hover, :focus-visible) { background: var(--surface-muted); }
.lead-search-options p { margin: 8px; color: var(--muted); }
#content dialog .panel { display: grid; padding: 0; margin-bottom: 12px; border: 0; }
.pipeline-secondary { background: var(--field-background); border-color: #cfc8de; color: var(--foreground); font-weight: 600; }
.pipeline-secondary:hover:not(:disabled) { background-color: #f0eef6; }
.pipeline-stage-settings { flex: 1 0 100%; display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.pipeline-stage-settings li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
.task-stage-panel { padding: 18px; }
.task-stage-panel > [role="status"]:empty { display: none; }
.task-stage-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.task-stage-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.task-stage-name { display: flex; flex: 1 1 230px; align-items: center; gap: 8px; min-width: 0; }
.task-stage-name input { flex: 1; min-width: 0; }
.task-stage-name .badge-pill { white-space: nowrap; }
.task-stage-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.task-stage-actions .project-danger { color: var(--destructive); }
.task-stage-create { margin-top: 16px; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); }
.task-stage-field { display: grid; flex: 1 1 230px; gap: 4px; font-size: 13px; font-weight: 600; }
.task-stage-checkbox { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; font-size: 13px; }
.task-stage-checkbox input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--primary); }
button, input, select, textarea, nav a, .switch, .sidebar-workspace, .wa-link {
  height: var(--control-height);
  border-radius: var(--control-radius);
}
button, input, select, textarea { font: inherit; border: 1px solid #b9b2cd; padding: 0 10px; min-width: 0; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { background-color: var(--field-background); }
input::placeholder, textarea::placeholder { font-size: 13px; color: var(--muted); opacity: 1; }
.topbar-search input[type="search"] { background-color: transparent; }
select {
  appearance: none;
  padding-inline-end: 30px;
  border-color: #d8d3e6;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 14px center, right 10px center;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  color: inherit;
  cursor: pointer;
}
select:not(:disabled):hover { border-color: #a79cbe; }

@supports (appearance: base-select) and selector(select::picker(select)) {
  select, select::picker(select) { appearance: base-select; }
  select {
    align-items: center;
    gap: 8px;
    padding-inline: 12px 10px;
    background-image: none !important;
  }
  #content dialog.opp-modal-dialog select,
  #content dialog.opp-modal-dialog .opp-select {
    padding-inline: 12px 10px;
    background-image: none !important;
  }
  select::picker-icon {
    content: '';
    width: 7px;
    height: 7px;
    margin-inline: auto 2px;
    border: solid var(--muted);
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.15s ease;
  }
  select:open::picker-icon { transform: translateY(2px) rotate(225deg); }
  select::picker(select) {
    margin-block: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: var(--surface);
    color: var(--foreground);
    box-shadow: 0 8px 22px rgb(15 23 42 / 14%);
  }
  select option {
    min-height: var(--control-height);
    padding: 5px 8px;
    border-radius: var(--control-radius);
  }
  select option:checked { background: var(--primary-soft); color: var(--primary-hover); font-weight: 700; }
  select option:is(:hover, :focus-visible) { background: var(--primary-soft); }
  select option::checkmark { color: var(--primary); }
}
@media (forced-colors: active) {
  select { appearance: auto; background-image: none; }
  select::picker(select) { appearance: auto; }
}
textarea { width: 100%; padding-block: 5px; resize: none; }
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
:where(button:not(:disabled)):hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-icon { display: inline-grid; place-items: center; flex-shrink: 0; line-height: 0; }
.btn-icon svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.btn-sm .btn-icon svg { width: 13.5px; height: 13.5px; }
.btn-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dialog-content::-webkit-scrollbar,
.opp-modal-main::-webkit-scrollbar,
.opp-modal-sidebar::-webkit-scrollbar,
.lead-search-options::-webkit-scrollbar,
.table::-webkit-scrollbar,
textarea::-webkit-scrollbar {
  width: var(--scrollbar-size-sm);
  height: var(--scrollbar-size-sm);
}
button:disabled, select:disabled { opacity: .65; cursor: wait; }
form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
label { display: grid; gap: 5px; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; width: 100%; align-items: end; }

.tasting-form {
  display: grid;
  gap: 20px;
  width: 100%;
}

.tasting-signup-link a {
  overflow-wrap: anywhere;
}

.traffic-link-editor {
  display: grid;
  gap: 12px;
}

.traffic-link-output {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.traffic-link-output input {
  flex: 1 1 16rem;
  min-width: 0;
}

.tasting-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tasting-form [hidden] {
  display: none;
}

.tasting-form legend {
  margin-bottom: 10px;
  padding: 0;
  font-weight: 700;
}

.tasting-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tasting-actions .settings-status {
  margin: 0 auto 0 0;
}

.tasting-actions .settings-status:empty {
  display: none;
}
.project-field-full { grid-column: 1 / -1; }
.project-review-notice { display: grid; gap: 4px; margin-top: 8px; }
.project-review-notice p { margin: 0; }
.project-task-description { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
#content dialog.project-editor-dialog { width: min(760px, calc(100% - 24px)); }
#content dialog.project-tasks-dialog { width: min(1100px, calc(100% - 24px)); }
.project-tasks-dialog .dialog-content .table { overflow-x: auto; }
.project-tasks-dialog button[hidden] { display: none; }
.project-tasks-dialog .table table { min-width: 880px; }
.project-tasks-dialog th, .project-tasks-dialog td:nth-child(4), .project-tasks-dialog td:nth-child(5) { white-space: nowrap; }
.project-tasks-dialog td select { min-width: 140px; }
.form-full { grid-column: 1 / -1; width: 100%; }
.wa-link { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; background: #e2f9ef; color: #087554; font-size: 12px; font-weight: 700; }
.wa-link:hover { background: #c9f2df; }
.badge-pill { display: inline-block; padding: 3px 8px; border-radius: 20px; background: var(--surface-muted); color: #43546d; font-size: 12px; font-weight: 600; }
.badge-protected { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.badge-role-locked { background: var(--primary-soft); color: var(--primary-hover); border: 1px solid var(--line); }
.owner-name-badge { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.opp-members-actions { margin-top: 12px; }
.ws-open-link { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid #a6b6cf; border-radius: 8px; font-weight: 600; }
.tenant-manager-email { font-size: 12px; }
.dialog-subtitle-spaced { margin-bottom: 12px; }
.progress-wrap { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.progress-wrap progress { width: 72px; height: 8px; accent-color: var(--primary); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
table td .card-actions { margin-top: 0; flex-wrap: nowrap; }
.btn-sm { padding: 5px 9px; font-size: 12px; }
.component-catalog { display: grid; gap: 16px; }
.component-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-muted); border-radius: var(--control-radius); }
.component-tabs button { background: transparent; border-color: transparent; color: var(--muted); }
.component-tabs button:hover { color: var(--primary); }
.component-tabs button[aria-pressed="true"] { background: var(--surface); border-color: var(--line); color: var(--foreground); }
.component-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.component-panels[hidden] { display: none; }
.component-palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.component-swatch { display: block; height: 38px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: var(--control-radius); }
.component-swatch-primary { background: var(--primary); }
.component-swatch-secondary { background: var(--secondary); }
.component-swatch-background { background: var(--background); }
.component-swatch-surface { background: var(--surface); }
.component-swatch-surface-muted { background: var(--surface-muted); }
.component-swatch-destructive { background: var(--destructive); }
.component-palette small { display: block; margin-top: 2px; color: var(--muted); }
button.component-secondary { background: var(--secondary); border-color: var(--secondary); }
button.component-destructive { background: var(--destructive); border-color: var(--destructive); }
button.component-destructive:hover { background: var(--destructive-hover); border-color: var(--destructive-hover); }
.component-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.component-feedback { color: #087554; }
.component-feedback:empty { margin: 0; }
.component-catalog .lead-metrics { margin-bottom: 0; }
.table { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.lead-page { padding-top: 12px; }
.lead-heading, .lead-metric-top, .lead-toolbar, .lead-footer, .lead-pagination, .lead-identity { display: flex; align-items: center; gap: 10px; }
.lead-heading { flex-wrap: wrap; }
.lead-heading h1 { font-size: 28px; }
.lead-page .subtitle { margin: 4px 0 14px; }
.lead-count { border: 1px solid #ddcdf7; border-radius: 20px; padding: 3px 9px; background: var(--primary-soft); color: var(--primary-hover); font-size: 12px; font-weight: 700; }
.lead-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr)); gap: 14px; margin-bottom: 22px; }
.lead-metric { min-width: 0; padding: 16px; }
.lead-metric-top { justify-content: space-between; font-size: 13px; font-weight: 700; }
.lead-metric strong { font-size: clamp(19px, 2vw, 26px); }
.lead-metric:last-child strong { font-size: 18px; }
.lead-metric p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.lead-icon { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 8px; background: var(--tint); }
.lead-metric .lead-icon { color: var(--accent); }
.lead-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lead-create { margin-bottom: 22px; padding: 18px; }
.lead-create h2 { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.lead-create form { padding: 0; border: 0; gap: 12px; }
.lead-create label { flex: 1 1 140px; font-size: 13px; font-weight: 600; }
.lead-create label:nth-child(-n+2) { flex-grow: 1.4; }
.lead-create input, .lead-create select { width: 100%; }
.lead-toolbar, .lead-footer { flex-wrap: wrap; padding: 14px 16px; background: var(--background); }
.lead-toolbar input { flex: 1 1 175px; max-width: 270px; }
.lead-toolbar > select, .lead-pagination { margin-left: auto; }
.lead-tabs { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 8px; background: var(--surface-muted); }
.lead-tabs button { padding: 4px 8px; background: transparent; color: #42536b; border: 1px solid transparent; font-size: 13px; }
.lead-tabs button[aria-pressed=true] { background: var(--surface); color: var(--foreground); border-color: var(--line); font-weight: 700; }
.lead-panel .table { margin: 0; }
.lead-panel table { min-width: 600px; font-size: 13px; }
.lead-panel th { text-transform: uppercase; font-size: 11px; letter-spacing: .03em; background: var(--surface-muted); color: #43546d; }
.lead-panel th, .lead-panel td { padding: 12px 16px; }
.lead-panel tr:hover td { background: var(--background); }
.lead-identity strong { font-weight: 700; }
.lead-avatar { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 8px; font-size: 11px; font-weight: 800; }
.lead-source, span.lead-stage { display: inline-block; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--control-radius); }
.lead-source, .lead-stage { font-size: 12px; }
.lead-source, .lead-avatar, .lead-stage { background-color: var(--lead-tint, var(--surface-muted)); color: var(--lead-ink, #43546d); }
.lead-stage-qualificado, .lead-stage-ganho { --lead-tint: #e2f9ef; --lead-ink: #087554; }
.lead-stage-perdido { --lead-tint: var(--destructive-soft); --lead-ink: #ac1641; }
.lead-stage-novo { --lead-tint: var(--primary-soft); --lead-ink: var(--primary-hover); }
.lead-stage-proposta { --lead-tint: #fff1d7; --lead-ink: #805500; }
.lead-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  background-color: var(--lead-tint, var(--surface-muted));
  color: var(--lead-ink, #43546d);
  border: 1px solid var(--lead-border, transparent);
}
.lead-status-novo {
  --lead-tint: #f0f9ff;
  --lead-ink: #0284c7;
  --lead-border: #bae6fd;
}
.lead-status-em_contato {
  --lead-tint: #fffbeb;
  --lead-ink: #d97706;
  --lead-border: #fde68a;
}
.lead-status-qualificado {
  --lead-tint: #f0fdf4;
  --lead-ink: #16a34a;
  --lead-border: #bbf7d0;
}
.lead-status-desqualificado {
  --lead-tint: #fef2f2;
  --lead-ink: #dc2626;
  --lead-border: #fecaca;
}

/* Botões de Ação na Tabela e Modais */
.btn-table-action {
  height: 30px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  gap: 4px !important;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-qualify {
  background-color: #16a34a !important;
  border: 1px solid #15803d !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}
.btn-qualify:hover:not(:disabled) {
  background-color: #15803d !important;
  border-color: #166534 !important;
}

.btn-qualify-subtle {
  background-color: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #15803d !important;
  font-weight: 600 !important;
}
.btn-qualify-subtle:hover:not(:disabled) {
  background-color: #dcfce7 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

.btn-disqualify {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  font-weight: 500 !important;
}
.btn-disqualify:hover:not(:disabled) {
  background-color: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}

.btn-disqualify-submit {
  background-color: #dc2626 !important;
  border: 1px solid #b91c1c !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}
.btn-disqualify-submit:hover:not(:disabled) {
  background-color: #b91c1c !important;
  border-color: #991b1b !important;
}

/* Modal Exclusivo de Detalhes do Lead (Clean & Fluid) */
#content dialog.lead-modal-dialog {
  width: min(100% - 32px, 760px);
  max-height: 90vh;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

#content dialog.lead-modal-dialog .lead-modal-form {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-height: 88vh;
}

.lead-modal-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}

.lead-modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lead-modal-title {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.lead-modal-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 6px;
  font-size: 13px;
  color: #64748b;
}

.lead-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  background: #f8fafc;
}

.lead-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.lead-section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
}

.lead-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .lead-grid-2 {
    grid-template-columns: 1fr;
  }
}

.lead-action-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.lead-action-banner-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lead-action-banner-info strong {
  font-size: 13.5px;
  color: #1e293b;
}

.lead-action-banner-info span {
  font-size: 12px;
  color: #64748b;
}

.lead-action-banner-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lead-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}

.lead-modal-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.lead-modal-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.disqualify-reason-tag { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.lead-footer { color: var(--muted); font-size: 13px; }
.lead-footer label { display: flex; align-items: center; gap: 6px; }
.lead-pagination button { background: var(--surface); border-color: var(--line); color: var(--primary); }
.lead-pagination button:disabled { cursor: default; }
.lead-empty { padding: 18px; margin: 0; color: var(--muted); border-block: 1px solid var(--line); }
.dashboard-eyebrow { margin: 24px 0 4px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dashboard-date { margin-bottom: 20px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 146px), 1fr)); gap: 12px; margin-bottom: 18px; }
.dashboard-card { display: block; padding: 14px; border-radius: 9px; }
.dashboard-card:hover { border-color: #b69ada; }
.dashboard-card strong { margin: 8px 0 2px; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.15; }
.dashboard-card > span { font-size: 13px; }
.dashboard-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dashboard-card .dashboard-icon { display: grid; place-items: center; min-width: 32px; height: 32px; border-radius: 8px; font-size: 15px; font-weight: 800; color: var(--accent); background: var(--tint); }
.tone-blue, .stage-novo { --accent: var(--primary-hover); --tint: var(--primary-soft); }
.tone-violet, .stage-qualificado { --accent: #6241a0; --tint: #efe7ff; }
.tone-amber, .stage-proposta { --accent: #815400; --tint: #fff1cc; }
.tone-green, .stage-ganho { --accent: #176242; --tint: #dff5e8; }
.tone-red, .stage-perdido { --accent: #a12629; --tint: var(--destructive-soft); }
.dashboard-panels { display: grid; grid-template-columns: minmax(0, 3fr) minmax(240px, 2fr); align-items: start; gap: 16px; }
.dashboard-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.dashboard-panel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 16px; border-bottom: 1px solid var(--line); }
.dashboard-panel-heading h2 { margin: 0; font-size: 16px; }
.dashboard-panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.dashboard-panel-heading a { color: var(--primary); font-weight: 700; font-size: 13px; }
.dashboard-panel-heading a:hover { text-decoration: underline; }
.dashboard-panel .table { margin: 0; }
.dashboard-panel th, .dashboard-panel td { padding: 11px 14px; font-size: 13px; }
.dashboard-panel th { background: var(--background); }
.dashboard-panel tbody tr:last-child td { border-bottom: 0; }
.dashboard-panel th:last-child, .dashboard-panel td:last-child { text-align: right; white-space: nowrap; }
.dashboard-stage { display: inline-block; padding: 3px 8px; border-radius: 20px; background: var(--tint); color: var(--accent); font-size: 12px; font-weight: 700; }
.dashboard-stages { display: grid; gap: 14px; padding: 16px; margin: 0; list-style: none; }
.dashboard-stage-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.dashboard-stages progress { display: block; width: 100%; height: 8px; margin-top: 6px; accent-color: var(--accent); }
.dashboard-empty { margin: 0; padding: 16px; color: var(--muted); }

.traffic-devices {
  display: grid;
  gap: 12px;
  padding: 16px;
}
.traffic-devices label > span {
  display: flex;
  justify-content: space-between;
}
.traffic-devices progress {
  width: 100%;
  accent-color: var(--primary);
}
.traffic-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
}
.traffic-panels {
  margin-block: 16px;
}
#status { color: #a12629; }
:root {
  --focus-border: var(--primary);
  --focus-shadow: 0 0 0 2px rgb(110 38 217 / 14%);
}
:focus-visible { outline: 2px solid var(--focus-border); outline-offset: 1px; }
:is(input:not([type=checkbox]):not([type=radio]), select, textarea):focus {
  border-color: var(--focus-border);
  box-shadow: var(--focus-shadow);
  outline: 2px solid transparent;
  outline-offset: 0;
}
.topbar-search input[type="search"]:focus { box-shadow: none; outline: none; }
.auth { min-height: 100svh; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth [hidden] { display: none; }
.auth-access { display: grid; grid-template-rows: auto 1fr auto; gap: 36px; padding: 28px clamp(20px, 5vw, 80px); }
.auth .auth-card { width: min(100%, 420px); place-self: center; padding-block: 12px; }
.auth .brand { width: fit-content; }
.auth-footer { font-size: 12px; color: var(--muted); }
.auth form { display: grid; align-items: stretch; gap: 16px; }
.auth button { font-weight: 700; }
.auth input { width: 100%; }
.auth-password { display: grid; gap: 5px; }
.auth-field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.auth-field-heading a { font-size: 13px; }
.auth-password-input { position: relative; }
.auth-password-input input { padding-inline-end: 94px; }
.auth-password-input button { position: absolute; inset: 0 0 0 auto; width: 90px; color: var(--primary); background: transparent; border-color: transparent; font-size: 12px; gap: 4px; }
.auth-password-input button:hover { background: transparent; border-color: transparent; color: var(--primary-hover); }
.auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 20px; }
.auth-links a, .auth-field-heading a { color: var(--primary); font-weight: 700; }
.auth-links a:hover, .auth-field-heading a:hover { text-decoration: underline; }
.auth .auth-product { position: static; display: grid; place-items: center; height: auto; max-height: none; padding: clamp(28px, 5vw, 80px); border: 0; background: var(--secondary); color: #cbd5e1; }
.auth-product-content { width: min(100%, 490px); }
.auth-product h2 { color: var(--background); font-size: clamp(25px, 3vw, 42px); line-height: 1.15; letter-spacing: -.035em; }
.auth-pipeline { margin-block: 24px; padding: 18px; border: 1px solid #253551; border-radius: 12px; background: #131c2e; }
.auth-pipeline p { margin: 0 0 12px; color: var(--background); font-weight: 700; }
.auth-pipeline ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.auth-pipeline li { flex: 1 0 auto; padding: 8px; border-top: 2px solid #c8a4ff; border-radius: var(--control-radius); background: #1e293b; color: var(--background); font-size: 13px; }
@media (max-width: 760px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-access { min-height: 100svh; }
  .auth .auth-product { display: none; }
}
#auth-message:empty { display: none; }
#auth-message { color: #176242; }
#auth-message.auth-error { color: #a12629; }
@media (max-width: 960px) {
  .dashboard-panels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  #shell, #shell.sidebar-collapsed { grid-template-columns: 1fr; }
  #shell > aside { position: static; height: auto; max-height: none; overflow: visible; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  nav { flex: initial; overflow-y: visible; display: flex; flex-direction: row; flex-wrap: wrap; gap: 3px; }
  nav p { display: none; }
  nav a { font-size: 13px; }
  main { padding: 0 15px 24px; }
  #shell header { margin-inline: -15px; padding-inline: 15px; }
  header { flex-wrap: wrap; padding: 10px 0; }
}

/* ==========================================================================
   Configurações (Layout com sidebar interna desktop / seletor mobile)
   ========================================================================== */

.settings-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  width: 100%;
  margin-top: 18px;
}

.settings-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  width: 240px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: transparent;
  border: none;
  padding: 0;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px;
  box-shadow: 0 1px 3px rgba(14, 21, 47, 0.04);
}

.settings-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 12px 4px;
  margin: 0;
}

.settings-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.settings-nav-item:hover {
  background: var(--surface-muted);
  color: var(--foreground);
}

.settings-nav-item[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.settings-nav-item .btn-icon {
  display: inline-grid;
  place-items: center;
  color: #64748b;
}

.settings-nav-item[aria-current="page"] .btn-icon {
  color: var(--primary);
}

.settings-nav-item[aria-current="page"] .btn-icon svg {
  stroke: var(--primary);
}

.settings-mobile-picker {
  display: none;
}

.settings-panel {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
}

.settings-panel-header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.settings-panel-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--foreground);
}

.settings-panel-header p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.settings-panel-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}

.settings-loading {
  color: var(--muted);
  font-size: 13.5px;
}

.settings-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(14, 21, 47, 0.03);
}

.settings-card-header {
  padding: 16px 20px 14px;
  background: #faf9fd;
  border-bottom: 1px solid var(--line);
}

.settings-card-header-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-card-header h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--foreground);
}

.settings-card-header p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

.settings-card-body {
  padding: 20px;
  width: 100%;
}

.settings-card-table {
  padding: 0;
}

.settings-card-table .table {
  margin: 0;
}

.settings-card-table table {
  min-width: 540px;
  font-size: 13px;
}

.settings-card-table th {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.03em;
  background: var(--surface-muted);
  color: #43546d;
  padding: 12px 18px;
}

.settings-card-table td {
  padding: 12px 18px;
}

.settings-card-table tr:hover td {
  background: var(--background);
}

.settings-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
  font-size: 13px;
}

.settings-field-label {
  font-weight: 600;
  color: #334155;
  font-size: 13px;
}

.settings-field-hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.settings-field input,
.settings-field select,
.settings-field textarea {
  width: 100%;
}

.settings-chips-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  min-height: var(--control-height);
  width: 100%;
  background: var(--field-background);
  border: 1px solid #b9b2cd;
  border-radius: var(--control-radius);
  cursor: text;
}

.settings-chips-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.settings-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.settings-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  border-radius: 14px;
}

.settings-chip-remove {
  all: unset;
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  color: var(--primary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.settings-chip-remove:hover {
  background: var(--primary);
  color: #fff;
}

.settings-chip-entry {
  flex: 1 1 140px;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  height: 24px !important;
  box-shadow: none !important;
  outline: none !important;
  font-size: 13px;
}

.settings-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.settings-check-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.settings-check-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px 14px;
  margin-top: 8px;
}

.settings-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}

.settings-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex: none;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
}

.settings-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  margin: 0;
  width: 100%;
}

.settings-notice[hidden], .settings-notice:empty { display: none; }

.settings-notice-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.settings-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 18px;
}

.settings-actions {
  position: sticky;
  bottom: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px -4px rgba(14, 21, 47, 0.12);
  z-index: 10;
}

.settings-actions-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-actions-state {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.settings-form.is-dirty .settings-actions-state {
  color: #b45309;
}

.settings-actions-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-status {
  font-size: 12.5px;
  margin: 0;
  color: #b91c1c;
}

.settings-status.is-success {
  color: #15803d;
}

.settings-usage {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-block: 4px;
}

.settings-usage-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: #334155;
}

.settings-usage-line strong {
  font-size: 13px;
}

.settings-usage progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  accent-color: var(--primary);
}

.settings-usage progress.is-warning {
  accent-color: #f59e0b;
}

.settings-usage progress.is-full {
  accent-color: var(--destructive);
}

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

.settings-summary > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-summary dt {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  color: var(--muted);
}

.settings-summary dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.settings-link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #e0dce9;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}

.settings-link-button:hover {
  background: var(--primary-soft);
  border-color: #cfc8de;
}

.settings-inline-link {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.settings-inline-link:hover {
  text-decoration: underline;
}

.settings-stage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.settings-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-role-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.settings-role-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f0f5;
}

.settings-role-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-role-list strong {
  font-size: 14px;
}

.settings-role-list p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 2px 0 0;
}

.settings-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  width: 100%;
}

.settings-plan-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--background);
}

.settings-plan-card.is-current {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(110, 38, 217, 0.08);
}

.settings-plan-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  border: none;
}

.settings-plan-card header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.settings-badge-current {
  background: var(--primary-soft);
  color: var(--primary);
}

.settings-plan-price {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.settings-plan-price strong {
  font-size: 22px;
  color: var(--foreground);
}

.settings-plan-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: #475569;
}

.settings-plan-card li::before {
  content: "✓ ";
  color: #16a34a;
  font-weight: 700;
}

@media (max-width: 960px) {
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .settings-sidebar {
    display: none;
  }
  .settings-mobile-picker {
    display: grid;
    gap: 6px;
    margin-bottom: 6px;
    width: 100%;
  }
  .settings-mobile-picker select {
    width: 100%;
  }
}

.proposal-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px; }
.proposal-toolbar h2 { margin: 0; font-size: 18px; }
.proposal-filters { justify-content: flex-start; }
.proposal-filters input { flex: 1 1 220px; max-width: 420px; }
.proposal-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.proposal-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; color: #145b46; background: var(--surface); border: 1px solid var(--line); }
.proposal-icon:hover { background: var(--surface-muted); color: #145b46; }
.proposal-icon.proposal-danger { color: #a12629; }
.proposal-badge { display: inline-block; padding: 4px 8px; border-radius: 16px; font-weight: 700; font-size: 11px; text-transform: uppercase; background: #edf0f3; color: #374151; }
.proposal-badge.sent { background: #e3efff; color: #174b8e; }
.proposal-badge.approved, .proposal-success { background: #e3f4e9; color: #145b46; }
.proposal-badge.expired { background: #fff0d6; color: #854501; }
.proposal-badge.declined { background: #fde9e9; color: #9f2525; }
.proposal-message { margin: 0 16px; color: #a12629; }
#content .proposal-drawer { width: min(720px, 100vw); }
.proposal-drawer .dialog-header, .proposal-link-dialog .dialog-header { grid-template-columns: 1fr auto; align-items: center; }
.proposal-drawer .dialog-header p:empty, .proposal-link-dialog .dialog-header p:empty { display: none; }
.proposal-drawer fieldset { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.proposal-drawer legend { padding: 0 6px; font-weight: 700; }
.proposal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.proposal-combobox { position: relative; display: grid; gap: 5px; min-width: 0; }
.proposal-combobox.is-open { z-index: 30; }
.proposal-combobox-control { position: relative; display: flex; align-items: center; width: 100%; border: 1px solid #b9b2cd; border-radius: var(--control-radius); background: var(--field-background); transition: border-color 0.15s, box-shadow 0.15s; }
.proposal-combobox-control:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.proposal-combobox-control .proposal-combobox-input { width: 100%; height: var(--control-height); padding: 0 58px 0 12px !important; border: none !important; outline: none !important; background: transparent !important; box-shadow: none !important; font: inherit; color: var(--foreground); }
.proposal-combobox-control .proposal-combobox-input::placeholder { color: var(--muted); opacity: 1; font-size: 13px; }
.proposal-combobox-actions { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 6px; user-select: none; z-index: 2; }
.proposal-combobox-clear { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0 !important; border: none !important; background: transparent !important; color: #64748b; cursor: pointer; border-radius: 4px; transition: color 0.15s, background-color 0.15s; }
.proposal-combobox-clear:hover { color: var(--foreground); background: var(--surface-muted) !important; }
.proposal-combobox-arrows { display: inline-grid; place-items: center; width: 18px; height: 18px; color: #64748b; cursor: pointer; transition: color 0.15s; }
.proposal-combobox-arrows:hover { color: var(--foreground); }
.proposal-combobox-actions svg { display: block; pointer-events: none; }
.proposal-combobox-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 100; max-height: 220px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--control-radius); box-shadow: 0 8px 24px rgb(15 23 42 / 18%); }
.proposal-combobox-menu[hidden] { display: none !important; }
.proposal-combobox-item { padding: 8px 10px; font-size: 13px; border-radius: 6px; cursor: pointer; color: var(--foreground); transition: background-color 0.12s, color 0.12s; }
.proposal-combobox-item:hover, .proposal-combobox-item.is-focused { background: var(--primary-soft); color: var(--primary-hover); font-weight: 600; }
.proposal-combobox-item.is-selected { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.proposal-combobox-empty { padding: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.proposal-items { display: grid; gap: 10px; }
.proposal-item { display: grid; gap: 8px; padding: 10px; border-radius: 8px; background: var(--surface-muted); }
.proposal-item-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.proposal-item-grid :is(input, output) { height: 40px; box-sizing: border-box; }
.proposal-item:has(.is-open),
.proposal-grid:has(.is-open) { position: relative !important; z-index: 40 !important; }
.proposal-item-grid output { display: block; padding-block: 9px; }
.proposal-drawer :is(input, textarea, select), .proposal-copy input { width: 100%; min-width: 0; }
.proposal-drawer textarea {
  height: auto;
  min-height: 110px;
  padding: 10px 12px;
  line-height: 1.5;
  box-sizing: border-box;
  resize: vertical;
}
.proposal-summary { display: flex; justify-content: space-between; gap: 8px; width: 100%; }
.proposal-summary span:last-child { color: #145b46; }
#content .proposal-link-dialog { width: min(480px, calc(100vw - 24px)); }
.proposal-link-dialog .dialog-footer button { width: 100%; }
.proposal-success { border-radius: 8px; padding: 12px; }
.proposal-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.proposal-copy label { text-transform: uppercase; font-size: 12px; }
.proposal-copy .proposal-pin { font: 700 24px monospace; letter-spacing: .45em; }
.public-proposal { min-height: 100vh; min-height: 100svh; display: grid; justify-items: center; align-items: start; padding: clamp(16px, 5vw, 48px) 16px; background: var(--background); }
.public-proposal:has(#proposal-document[hidden]) { align-items: center; }
.public-proposal-card { width: min(100%, 780px); padding: clamp(20px, 5vw, 36px); background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.public-proposal-card:has(#proposal-document[hidden]) { max-width: 440px; }
.public-proposal-card [hidden] { display: none; }
.public-proposal-brand { margin-bottom: 24px; }
.public-proposal-card form { display: grid; gap: 16px; }
.public-proposal-card h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.15; overflow-wrap: anywhere; }
.public-proposal-card header p { color: var(--muted); margin: 8px 0 0; }
.public-proposal-card article header { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.public-proposal-card article h2 { margin-top: 24px; }
.proposal-company-logo { display: block; max-width: min(180px, 100%); max-height: 64px; object-fit: contain; }
.public-proposal-card p { white-space: pre-wrap; overflow-wrap: anywhere; }
.public-proposal-card label { display: grid; gap: 6px; font-weight: 600; }
.public-proposal-card :is(input, textarea) { width: 100%; }
.public-proposal-card .proposal-actions { margin-top: 12px; }
.public-proposal-card .proposal-actions a { padding: 8px; color: var(--primary); text-decoration: underline; }
.public-proposal-card .table { border: 1px solid var(--line); border-radius: var(--control-radius); }
.public-proposal-card th { background: var(--surface-muted); }
.public-proposal-card td:not(:first-child) { white-space: nowrap; }
.proposal-mobile-column { display: none; }
#proposal-confirmation {
  width: min(448px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--foreground);
  box-shadow: 0 20px 48px rgb(14 21 47 / 18%);
}
#proposal-confirmation::backdrop { background: rgb(14 21 47 / 60%); backdrop-filter: blur(2px); }
.proposal-confirmation-heading, .proposal-confirmation-actions { display: flex; align-items: center; gap: 8px; }
.proposal-confirmation-heading h2 { flex: 1; margin: 0; }
.proposal-confirmation-heading span { flex: 0 0 32px; display: grid; place-items: center; height: 32px; color: var(--primary); background: var(--primary-soft); border-radius: 50%; }
.proposal-confirmation-close { background: transparent; border-color: transparent; color: var(--muted); font-size: 20px; }
.proposal-confirmation-close:hover { background: var(--surface-muted); border-color: transparent; }
#proposal-confirmation p { margin: 0; color: var(--muted); font-size: 13px; }
.proposal-confirmation-actions { justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 600px) {
  .proposal-items-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .proposal-items-table :is(table, tbody, tr) { display: block; }
  .proposal-items-table tbody tr { padding: 12px; }
  .proposal-items-table tbody tr + tr { border-top: 1px solid var(--line); }
  .proposal-items-table td { display: block; padding: 4px 0; border: 0; }
  .proposal-items-table td:first-child p { margin: 4px 0 8px; }
  .public-proposal-card .proposal-items-table td:not(:first-child) { display: flex; justify-content: space-between; gap: 8px; white-space: normal; }
  .proposal-mobile-column { display: inline; color: var(--muted); }
}
.public-proposal-card dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 12px; }
.public-proposal-card dl div { padding: 12px; border-radius: 8px; background: var(--surface-muted); }
.public-proposal-card dt { color: var(--muted); font-size: 13px; }
.public-proposal-card dd { margin: 4px 0 0; font-weight: 700; overflow-wrap: anywhere; }
#proposal-feedback { margin: 16px 0 0; color: var(--destructive-hover); }
#proposal-feedback:empty { display: none; }
@media (max-width: 540px) {
  .proposal-item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proposal-item-grid > :first-child { grid-column: 1 / -1; }
  .proposal-drawer .dialog-content { padding: 12px; }
}

/* ==========================================================================
   Design System Enterprise - Formulários & Inputs (Nativo & Auto-contido)
   ========================================================================== */
.component-panels-full {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}

.component-panels-full[hidden] {
  display: none !important;
}

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

.hidden {
  display: none !important;
}

/* Card Principal */
.enterprise-form-card {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background-color: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  padding: 28px 32px !important;
  margin-bottom: 24px !important;
}

@media (max-width: 640px) {
  .enterprise-form-card {
    padding: 20px 16px !important;
  }
}

/* Cabeçalho do Card */
.enterprise-form-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding-bottom: 20px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin-bottom: 24px !important;
}

.enterprise-header-main {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

.enterprise-header-left {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-width: 0 !important;
}

.enterprise-header-top {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.enterprise-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

.enterprise-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 3px 10px !important;
  background-color: #f5f3ff !important;
  color: #6d28d9 !important;
  border: 1px solid #ede9fe !important;
  border-radius: 9999px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.enterprise-subtitle {
  font-size: 13.5px !important;
  color: #64748b !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

/* Botão Principal no Cabeçalho (Cor primária oficial do CRM) */
button.enterprise-primary-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 18px !important;
  border-radius: var(--control-radius, 8px) !important;
  background: var(--primary) !important;
  color: var(--surface, #ffffff) !important;
  border: 1px solid var(--primary) !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 6px rgba(110, 38, 217, 0.25) !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease !important;
  flex-shrink: 0 !important;
}

button.enterprise-primary-btn:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  box-shadow: 0 4px 12px rgba(110, 38, 217, 0.35) !important;
}

button.enterprise-primary-btn:active {
  transform: scale(0.98) !important;
}

button.enterprise-primary-btn .btn-icon {
  display: inline-grid !important;
  place-items: center !important;
  width: 17px !important;
  height: 17px !important;
  color: var(--surface, #ffffff) !important;
}

button.enterprise-primary-btn .btn-icon svg {
  width: 17px !important;
  height: 17px !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  fill: none !important;
}

/* Seções e Títulos */
.enterprise-section {
  display: block !important;
  width: 100% !important;
}

.enterprise-section-divider {
  margin-top: 24px !important;
  padding-top: 24px !important;
  border-top: 1px solid #f1f5f9 !important;
}

.enterprise-group-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #64748b !important;
  margin: 0 0 16px 0 !important;
}

.enterprise-group-bullet {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background-color: #7c3aed !important;
  flex-shrink: 0 !important;
}

/* Grids Responsivos */
.enterprise-grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
}

.enterprise-grid-5 {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
}

.enterprise-grid-4 {
  display: grid !important;
  grid-template-columns: 1fr 3fr !important;
  gap: 20px !important;
  width: 100% !important;
}

@media (max-width: 1120px) {
  .enterprise-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 860px) {
  .enterprise-grid-3,
  .enterprise-grid-4 {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 680px) {
  .enterprise-grid-5 {
    grid-template-columns: 1fr !important;
  }
}

/* Campos e Controles */
.enterprise-field {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.enterprise-label {
  display: block !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-bottom: 6px !important;
  line-height: 1.3 !important;
}

.enterprise-label-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 6px !important;
}

.enterprise-counter {
  font-size: 11.5px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: #94a3b8 !important;
  font-weight: 500 !important;
}

.enterprise-counter.is-warning {
  color: #d97706 !important;
  font-weight: 700 !important;
}

.enterprise-input-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* RESET E ESTILO DOS INPUTS ENTERPRISE */
input.enterprise-input {
  display: block !important;
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 14px !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  color: #1e293b !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
  outline: none !important;
}

input.enterprise-input::placeholder,
textarea.enterprise-textarea::placeholder {
  color: #94a3b8 !important;
  font-size: 13.5px !important;
}

input.enterprise-input:hover:not(:disabled),
textarea.enterprise-textarea:hover:not(:disabled) {
  border-color: #cbd5e1 !important;
}

input.enterprise-input:focus,
textarea.enterprise-textarea:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12) !important;
  background-color: #ffffff !important;
}

/* Estilo ativo inicial do e-mail */
input.enterprise-input-focused {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12) !important;
}

/* Campo Desativado */
input.enterprise-input-disabled {
  background-color: #f8fafc !important;
  color: #94a3b8 !important;
  border-color: #e2e8f0 !important;
  cursor: not-allowed !important;
  user-select: none !important;
  box-shadow: none !important;
}

/* Textarea Enterprise */
textarea.enterprise-textarea {
  display: block !important;
  width: 100% !important;
  min-height: 88px !important;
  padding: 10px 14px !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  color: #1e293b !important;
  box-sizing: border-box !important;
  resize: vertical !important;
  line-height: 1.5 !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

/* ==========================================================================
   ISOLAMENTO TOTAL DOS BOTÕES INTERNOS DO FORMULÁRIO ENTERPRISE
   (Sobrescreve qualquer estilo global de 'button' do style.css)
   ========================================================================== */
.enterprise-input-wrap button,
.enterprise-icon-btn,
.enterprise-stepper-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: normal !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  height: auto !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}

.enterprise-input-wrap button:hover,
.enterprise-icon-btn:hover {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
}

/* Botão de Senha */
input.enterprise-input-password {
  padding-right: 42px !important;
}

.enterprise-password-btn {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 28px !important;
  height: 28px !important;
}

/* Stepper Numérico Vertical */
input.enterprise-input-number {
  padding-right: 36px !important;
}

.enterprise-stepper-controls {
  position: absolute !important;
  right: 1px !important;
  top: 1px !important;
  bottom: 1px !important;
  width: 28px !important;
  display: flex !important;
  flex-direction: column !important;
  border-left: 1px solid #e2e8f0 !important;
  background-color: #f8fafc !important;
  border-top-right-radius: 7px !important;
  border-bottom-right-radius: 7px !important;
  overflow: hidden !important;
}

.enterprise-stepper-btn {
  flex: 1 1 50% !important;
  width: 100% !important;
  border-radius: 0 !important;
  color: #64748b !important;
}

.enterprise-stepper-btn:last-child {
  border-top: 1px solid #e2e8f0 !important;
}

.enterprise-stepper-btn:hover {
  background-color: #ede9fe !important;
  color: #6d28d9 !important;
}

/* DatePicker */
input.enterprise-input-date {
  padding-right: 42px !important;
}

.enterprise-date-btn {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 28px !important;
  height: 28px !important;
}

.enterprise-date-btn:hover {
  background-color: #f5f3ff !important;
  color: #7c3aed !important;
}

/* Busca */
input.enterprise-input-search {
  padding-left: 36px !important;
  padding-right: 34px !important;
}

.enterprise-search-icon {
  position: absolute !important;
  left: 11px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #94a3b8 !important;
  pointer-events: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.enterprise-search-clear {
  position: absolute !important;
  right: 7px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
}

/* Searchable Combobox */
.enterprise-combobox-root {
  position: relative !important;
  width: 100% !important;
}

.enterprise-combobox-root.is-open {
  z-index: 60 !important;
}

input.enterprise-input-combobox {
  padding-right: 56px !important;
}

.enterprise-combobox-actions {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
}

.enterprise-combobox-clear {
  width: 22px !important;
  height: 22px !important;
  border-radius: 4px !important;
}
.enterprise-icon-btn.hidden,
.enterprise-combobox-clear.hidden {
  display: none !important;
}

.enterprise-combobox-indicator {
  width: 22px !important;
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.enterprise-combobox-dropdown {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: 0 !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  padding: 6px !important;
  max-height: 220px !important;
  overflow-y: auto !important;
  z-index: 100 !important;
}

.enterprise-combobox-option {
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 13.5px !important;
  color: #1e293b !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  transition: all 0.12s ease !important;
}

.enterprise-combobox-option:hover,
.enterprise-combobox-option.is-focused {
  background-color: #f5f3ff !important;
  color: #6d28d9 !important;
  font-weight: 500 !important;
}

.enterprise-combobox-option.is-selected {
  background-color: #ede9fe !important;
  color: #5b21b6 !important;
  font-weight: 600 !important;
}

.enterprise-combobox-empty {
  padding: 12px !important;
  font-size: 13px !important;
  color: #94a3b8 !important;
  text-align: center !important;
  font-style: italic !important;
}

/* Select Dropdown (Idêntico ao seletor de Fase do modal de oportunidade) */
.enterprise-field select.opp-select,
.enterprise-field select {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background-color: var(--surface) !important;
  color: var(--foreground) !important;
  font-size: 14px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
  padding-inline: 12px 30px !important;
}

.enterprise-field select.opp-select:focus,
.enterprise-field select:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-soft) !important;
}

@supports (appearance: base-select) and selector(select::picker(select)) {
  .enterprise-field select,
  .enterprise-field select.opp-select {
    appearance: base-select !important;
    align-items: center !important;
    gap: 8px !important;
    padding-inline: 12px 10px !important;
    background-image: none !important;
  }
}

/* Rodapé e Botão Principal "Validar formulário" */
.enterprise-form-footer {
  margin-top: 28px !important;
  padding-top: 20px !important;
  border-top: 1px solid #f1f5f9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

button.enterprise-submit-btn {
  background-color: #7c3aed !important;
  color: #ffffff !important;
  border: 1px solid #7c3aed !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 22px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

button.enterprise-submit-btn:hover {
  background-color: #6d28d9 !important;
  border-color: #6d28d9 !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35) !important;
}

button.enterprise-submit-btn:active {
  transform: scale(0.98) !important;
}

/* Feedback de Validação */
.enterprise-group-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 16px !important;
}

.enterprise-group-header .enterprise-group-title {
  margin: 0 !important;
}

.enterprise-option-name {
  display: block !important;
  font-weight: 500 !important;
  color: #1e293b !important;
}

.enterprise-option-segment {
  display: block !important;
  font-size: 11.5px !important;
  color: #94a3b8 !important;
  margin-top: 2px !important;
}

.enterprise-option-check {
  color: #7c3aed !important;
  display: flex !important;
  align-items: center !important;
}

.form-feedback-success {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 14px !important;
  background-color: #f0fdf4 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  animation: fadeInFeedback 0.25s ease-out !important;
}

@keyframes fadeInFeedback {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Design System Enterprise - Top Header, Abas & Fundamentos Visuais
   ========================================================================== */

/* Top Header */
.ds-page-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
  flex-wrap: wrap !important;
}

.ds-page-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.ds-page-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #7c3aed 0%, #6e2cf3 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(110, 44, 243, 0.25) !important;
  flex-shrink: 0 !important;
}

.ds-page-title-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.ds-page-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.ds-page-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

.ds-version-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 8px !important;
  background-color: #f3e8ff !important;
  color: #7c3aed !important;
  border: 1px solid #e9d5ff !important;
  border-radius: 9999px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.ds-page-subtitle {
  font-size: 13px !important;
  color: #64748b !important;
  margin: 0 !important;
}

.ds-header-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.ds-header-action-btn:hover {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* Barra de Abas do Design System */
.component-catalog .component-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 6px !important;
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  margin-bottom: 24px !important;
}

.component-catalog .component-tabs button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 14px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.component-catalog .component-tabs button:hover {
  color: #1e293b !important;
  background-color: #f1f5f9 !important;
}

.component-catalog .component-tabs button[aria-pressed="true"] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.component-catalog .component-tabs button[aria-pressed="true"] svg {
  color: #6e2cf3 !important;
  stroke: #6e2cf3 !important;
}

.ds-tab-dot-online {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background-color: #10b981 !important;
  display: inline-block !important;
  margin-left: 2px !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

/* Card Principal da Primeira Aba (Fundamentos Visuais) */
.ds-foundation-card {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 28px 32px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

@media (max-width: 640px) {
  .ds-foundation-card {
    padding: 20px 16px !important;
  }
}

.ds-foundation-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  margin-bottom: 24px !important;
}

.ds-foundation-header-left {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.ds-foundation-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.ds-foundation-subtitle {
  font-size: 13px !important;
  color: #64748b !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

.ds-foundation-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 14px !important;
  background-color: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9999px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

/* Grid de 2 colunas */
.ds-foundation-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) !important;
  gap: 24px !important;
  align-items: stretch !important;
}

@media (max-width: 960px) {
  .ds-foundation-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Subcards internos (Cores e Tipografia) */
.ds-subcard {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  background-color: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
}

.ds-subcard-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  margin: 0 0 16px 0 !important;
}

.ds-subcard-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 16px !important;
}

.ds-subcard-header .ds-subcard-title {
  margin: 0 !important;
}

/* Grids de Cores */
.ds-color-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 12px !important;
}

.ds-color-grid-row2 {
  margin-top: 16px !important;
}

@media (max-width: 600px) {
  .ds-color-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.ds-color-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  cursor: pointer !important;
  transition: transform 0.15s ease !important;
}

.ds-color-item:hover {
  transform: translateY(-2px) !important;
}

.ds-color-swatch {
  height: 60px !important;
  border-radius: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 5px !important;
  transition: box-shadow 0.15s ease !important;
}

.ds-color-item:hover .ds-color-swatch {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12) !important;
}

.ds-color-name {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ds-color-token {
  font-size: 11px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ds-color-hex {
  font-size: 11px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-weight: 600 !important;
}

/* Tipografia */
.ds-typo-card {
  gap: 16px !important;
}

.ds-typo-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 3px 8px !important;
  background-color: #f8fafc !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

.ds-typo-preview-box {
  background-color: #f8fafc !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 8px !important;
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.ds-typo-fontname {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  font-family: 'Figtree', sans-serif !important;
  letter-spacing: -0.01em !important;
}

.ds-typo-specimen-1 {
  font-size: 13.5px !important;
  color: #475569 !important;
  font-family: 'Figtree', sans-serif !important;
}

.ds-typo-specimen-2 {
  font-size: 12px !important;
  color: #94a3b8 !important;
  font-family: 'Figtree', sans-serif !important;
}

.ds-typo-scales {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  margin-top: 4px !important;
}

.ds-scale-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.ds-scale-row .ds-h1 {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
}

.ds-scale-row .ds-h2 {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
}

.ds-scale-row .ds-body {
  font-size: 13.5px !important;
  font-weight: 400 !important;
  color: #334155 !important;
  line-height: 1.2 !important;
}

.ds-badge-mono {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 10px !important;
  background-color: #f5f3ff !important;
  color: #6e2cf3 !important;
  border: 1px solid #ede9fe !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-weight: 500 !important;
}

.ds-scale-spec {
  font-size: 11.5px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
}

/* Prompt & Instalação Card */
.ds-prompt-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 28px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

.ds-code-block {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  padding: 16px !important;
  border-radius: 10px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  overflow-x: auto !important;
  position: relative !important;
}

.ds-icon-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.ds-prompt-body {
  margin-top: 20px !important;
}

.ds-prompt-copy-btn {
  margin-top: 16px !important;
}

.ds-modal-code {
  margin: 12px 0 !important;
}

/* Swatches e Cores semânticas (compatível com CSP sem style inline) */
.ds-swatch-primary { background-color: #6e2cf3 !important; }
.ds-swatch-secondary { background-color: #111827 !important; }
.ds-swatch-background { background-color: #f8fafc !important; border: 1px solid #e2e8f0 !important; }
.ds-swatch-surface { background-color: #ffffff !important; border: 1px solid #e2e8f0 !important; }
.ds-swatch-surface-muted { background-color: #f1f5f9 !important; border: 1px solid #e2e8f0 !important; }
.ds-swatch-destructive { background-color: #dc2626 !important; }
.ds-swatch-success { background-color: #10b981 !important; }
.ds-swatch-warning { background-color: #f59e0b !important; }

.ds-hex-primary { color: #6e2cf3 !important; }
.ds-hex-secondary { color: #111827 !important; }
.ds-hex-neutral { color: #64748b !important; }
.ds-hex-destructive { color: #dc2626 !important; }
.ds-hex-success { color: #10b981 !important; }
.ds-hex-warning { color: #f59e0b !important; }

/* ==========================================================================
   Design System Enterprise - Aba 2: Botões e Indicadores
   ========================================================================== */

.ds-header-divider {
  padding-bottom: 20px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin-bottom: 24px !important;
}

.ds-badge-purple-soft {
  background-color: #f5f3ff !important;
  color: #6e2cf3 !important;
  border-color: #ede9fe !important;
}

.ds-section-block {
  margin-bottom: 26px !important;
}

.ds-section-heading {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin: 0 0 16px 0 !important;
}

.ds-section-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background-color: #6e2cf3 !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

/* Hierarquia de Botões */
.ds-btn-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 12px !important;
}

.ds-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 38px !important;
  padding: 0 18px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: 'Figtree', sans-serif !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  border: 1px solid transparent !important;
  line-height: 1 !important;
}

.ds-btn-primary {
  background-color: #6e2cf3 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(110, 44, 243, 0.2) !important;
}

.ds-btn-primary:hover {
  background-color: #5b21b6 !important;
}

.ds-btn-secondary {
  background-color: #111827 !important;
  color: #ffffff !important;
}

.ds-btn-secondary:hover {
  background-color: #1f2937 !important;
}

.ds-btn-destructive {
  background-color: #dc2626 !important;
  color: #ffffff !important;
}

.ds-btn-destructive:hover {
  background-color: #b91c1c !important;
}

.ds-btn-outline {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.ds-btn-outline:hover {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

.ds-btn-ghost {
  background-color: transparent !important;
  color: #334155 !important;
}

.ds-btn-ghost:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

.ds-btn-link {
  background-color: transparent !important;
  color: #6e2cf3 !important;
  padding: 0 10px !important;
}

.ds-btn-link:hover {
  text-decoration: underline !important;
  background-color: #f5f3ff !important;
}

.ds-btn-loading {
  background-color: #8b5cf6 !important;
  color: #ffffff !important;
  opacity: 0.9 !important;
  cursor: wait !important;
}

@keyframes dsSpin {
  to { transform: rotate(360deg); }
}

.ds-spinner-icon {
  animation: dsSpin 1s linear infinite !important;
}

/* Grupo de Botões (Button Group) */
.ds-btn-group {
  display: inline-flex !important;
  align-items: center !important;
  padding: 3px !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  gap: 2px !important;
}

.ds-btn-group button {
  padding: 7px 14px !important;
  border: none !important;
  background: transparent !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.ds-btn-group button:hover {
  color: #0f172a !important;
  background-color: #f8fafc !important;
}

.ds-btn-group button[aria-pressed="true"] {
  background-color: #f5f3ff !important;
  color: #6e2cf3 !important;
  font-weight: 600 !important;
}

/* Badges e Indicadores de Status */
.ds-badges-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
}

.ds-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 12px !important;
  border-radius: 9999px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border: 1px solid transparent !important;
  line-height: 1.25 !important;
}

.ds-status-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.ds-status-active {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #059669 !important;
}
.ds-status-active .ds-status-dot { background-color: #10b981 !important; }

.ds-status-pending {
  background-color: #fffbeb !important;
  border-color: #fde68a !important;
  color: #d97706 !important;
}
.ds-status-pending .ds-status-dot { background-color: #f59e0b !important; }

.ds-status-suspended {
  background-color: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}
.ds-status-suspended .ds-status-dot { background-color: #ef4444 !important; }

.ds-status-pro {
  background-color: #f5f3ff !important;
  border-color: #ddd6fe !important;
  color: #6e2cf3 !important;
}
.ds-status-pro .ds-status-dot { background-color: #7c3aed !important; }

.ds-status-neutral {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
  border-radius: 6px !important;
}

/* Grid Avatares + Armazenamento */
.ds-indicators-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
  margin-top: 24px !important;
}

@media (max-width: 820px) {
  .ds-indicators-grid {
    grid-template-columns: 1fr !important;
  }
}

.ds-indicator-box {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  background-color: #ffffff !important;
}

.ds-indicator-box-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  margin: 0 0 14px 0 !important;
}

/* Avatares */
.ds-avatars-row {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.ds-avatar {
  position: relative !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  flex-shrink: 0 !important;
}

.ds-avatar-primary {
  background-color: #6e2cf3 !important;
  color: #ffffff !important;
}

.ds-avatar-secondary {
  background-color: #111827 !important;
  color: #ffffff !important;
}

.ds-avatar-muted {
  background-color: #e2e8f0 !important;
  color: #475569 !important;
}

.ds-avatar-badge {
  position: absolute !important;
  right: -1px !important;
  bottom: -1px !important;
  width: 11px !important;
  height: 11px !important;
  border-radius: 50% !important;
  border: 2px solid #ffffff !important;
  box-sizing: border-box !important;
}

.ds-avatar-badge-online { background-color: #10b981 !important; }
.ds-avatar-badge-away { background-color: #f59e0b !important; }
.ds-avatar-badge-offline { background-color: #94a3b8 !important; }

/* Barra de Progresso Enterprise */
.ds-progress-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.ds-progress-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}

.ds-progress-value {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #6e2cf3 !important;
}

.ds-progress-track {
  width: 100% !important;
  height: 8px !important;
  background-color: #f1f5f9 !important;
  border-radius: 9999px !important;
  overflow: hidden !important;
  margin: 12px 0 10px 0 !important;
}

.ds-progress-fill {
  height: 100% !important;
  background-color: #6e2cf3 !important;
  border-radius: 9999px !important;
  transition: width 0.3s ease !important;
}

.ds-progress-68 { width: 68% !important; }

.ds-progress-caption {
  font-size: 12px !important;
  color: #64748b !important;
  margin: 0 !important;
}

/* ==========================================================================
   Design System Enterprise - Aba 3: Inputs e Formulários (Controles Extras)
   ========================================================================== */

.enterprise-header-split {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

.enterprise-label-inline {
  margin-bottom: 0 !important;
}

/* Busca com ícone à direita (conforme Print 1) */
.enterprise-input-search-right {
  padding-left: 12px !important;
  padding-right: 34px !important;
}

.enterprise-search-icon-right {
  position: absolute !important;
  right: 11px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #94a3b8 !important;
  display: inline-flex !important;
  align-items: center !important;
  pointer-events: none !important;
}

.enterprise-search-clear-shifted {
  right: 30px !important;
}

/* Cards de Seleções Booleanas & Switches */
.ds-bool-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 14px 16px !important;
  background-color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-height: 66px !important;
  box-sizing: border-box !important;
}

.ds-bool-card-left {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  justify-content: flex-start !important;
}

.ds-bool-card-col {
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 8px !important;
}

.ds-bool-copy {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.ds-bool-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
}

.ds-bool-desc {
  font-size: 11.5px !important;
  color: #94a3b8 !important;
  line-height: 1.3 !important;
}

/* Toggle Switch */
.ds-switch {
  position: relative !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  box-sizing: border-box !important;
  border-radius: 9999px !important;
  border: none !important;
  background-color: #cbd5e1 !important;
  padding: 2px !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.ds-switch[aria-checked="true"] {
  background-color: #6e2cf3 !important;
}

.ds-switch-thumb {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.2s ease !important;
  display: block !important;
}

.ds-switch[aria-checked="true"] .ds-switch-thumb {
  transform: translateX(18px) !important;
}

/* Checkbox Customizado */
.ds-checkbox-label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  cursor: pointer !important;
  width: 100% !important;
  user-select: none !important;
}

.ds-checkbox-box {
  width: 18px !important;
  height: 18px !important;
  border-radius: 5px !important;
  border: 1.5px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
  margin-top: 1px !important;
}

.ds-checkbox-box.is-checked {
  background-color: #6e2cf3 !important;
  border-color: #6e2cf3 !important;
}

/* Radio Group */
.ds-radio-group {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  flex-wrap: wrap !important;
}

.ds-radio-option {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  color: #334155 !important;
  font-weight: 500 !important;
  user-select: none !important;
}

.ds-radio-circle {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  border: 1.5px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: border-color 0.15s ease !important;
  box-sizing: border-box !important;
}

.ds-radio-circle.is-selected {
  border-color: #6e2cf3 !important;
  border-width: 5px !important;
}

/* Dropzone de Anexo de Documento */
.ds-dropzone-wrap {
  margin-top: 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.ds-dropzone {
  border: 1.5px dashed #cbd5e1 !important;
  border-radius: 12px !important;
  background-color: #fafbfd !important;
  padding: 28px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: border-color 0.15s ease, background-color 0.15s ease !important;
}

.ds-dropzone:hover,
.ds-dropzone.is-dragover {
  border-color: #6e2cf3 !important;
  background-color: #f5f3ff !important;
}

.ds-dropzone-icon {
  color: #94a3b8 !important;
  margin-bottom: 4px !important;
}

.ds-dropzone-text {
  font-size: 13px !important;
  color: #475569 !important;
}

.ds-dropzone-link {
  color: #6e2cf3 !important;
  font-weight: 600 !important;
}

.ds-dropzone-hint {
  font-size: 11.5px !important;
  color: #94a3b8 !important;
}

.ds-dropzone-file {
  margin-top: 4px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #059669 !important;
}

/* Rodapé com botão à esquerda */
.enterprise-form-footer-left {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  padding-top: 20px !important;
  margin-top: 24px !important;
  border-top: 1px solid #f1f5f9 !important;
  flex-wrap: wrap !important;
}

/* ==========================================================================
   DatePicker Enterprise Customizado (Popover)
   ========================================================================== */
.ds-datepicker-root {
  position: relative !important;
}

.ds-datepicker-popover {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  width: 284px !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04) !important;
  padding: 14px !important;
  z-index: 80 !important;
  box-sizing: border-box !important;
  animation: fadeInFeedback 0.15s ease-out !important;
}

.ds-datepicker-popover.hidden {
  display: none !important;
}

.ds-datepicker-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
  gap: 8px !important;
}

.ds-datepicker-month-label {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  text-transform: capitalize !important;
}

.ds-datepicker-nav {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.ds-datepicker-nav-btn {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 1px solid #e2e8f0 !important;
  background-color: #ffffff !important;
  color: #475569 !important;
  border-radius: 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.ds-datepicker-nav-btn:hover {
  background-color: #f5f3ff !important;
  border-color: #ddd6fe !important;
  color: #6e2cf3 !important;
}

.ds-datepicker-weekdays {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  margin-bottom: 6px !important;
  text-align: center !important;
}

.ds-datepicker-weekday {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  padding: 4px 0 !important;
}

.ds-datepicker-days {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 2px !important;
}

.ds-datepicker-day {
  height: 32px !important;
  min-height: 32px !important;
  width: 100% !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #1e293b !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  border-radius: 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
}

.ds-datepicker-day:hover {
  background-color: #f5f3ff !important;
  color: #6e2cf3 !important;
}

.ds-datepicker-day.is-outside {
  color: #cbd5e1 !important;
}

.ds-datepicker-day.is-outside:hover {
  color: #6e2cf3 !important;
}

.ds-datepicker-day.is-today {
  border-color: #ddd6fe !important;
  color: #6e2cf3 !important;
  font-weight: 700 !important;
}

.ds-datepicker-day.is-selected {
  background-color: #6e2cf3 !important;
  border-color: #6e2cf3 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(110, 44, 243, 0.25) !important;
}

.ds-datepicker-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 12px !important;
  padding-top: 10px !important;
  border-top: 1px solid #f1f5f9 !important;
}

.ds-datepicker-clear-btn {
  padding: 5px 10px !important;
  min-height: auto !important;
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
}

.ds-datepicker-clear-btn:hover {
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
}

.ds-datepicker-today-btn {
  padding: 5px 12px !important;
  min-height: auto !important;
  background-color: #f5f3ff !important;
  border: 1px solid #ede9fe !important;
  color: #6e2cf3 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
}

.ds-datepicker-today-btn:hover {
  background-color: #ede9fe !important;
}

/* ==========================================================================
   Design System Enterprise - Aba 4: Navegação e Estrutura de Layout
   ========================================================================== */

/* Breadcrumbs */
.ds-breadcrumbs {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  font-size: 13px !important;
  color: #64748b !important;
}

.ds-breadcrumb-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #64748b !important;
  text-decoration: none !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  padding: 2px 4px !important;
  min-height: auto !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 5px !important;
}

.ds-breadcrumb-item:hover {
  color: #6e2cf3 !important;
  background-color: #f5f3ff !important;
}

.ds-breadcrumb-sep {
  color: #cbd5e1 !important;
  user-select: none !important;
}

.ds-breadcrumb-current {
  color: #0f172a !important;
  font-weight: 600 !important;
}

/* Navbar de Exemplo */
.ds-navbar-demo {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  padding: 12px 18px !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
}

.ds-navbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
}

.ds-navbar-logo {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  background-color: #6e2cf3 !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  letter-spacing: -0.02em !important;
  flex-shrink: 0 !important;
}

.ds-navbar-links {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.ds-navbar-link {
  padding: 6px 12px !important;
  min-height: auto !important;
  border-radius: 7px !important;
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.ds-navbar-link:hover {
  color: #0f172a !important;
  background-color: #f8fafc !important;
}

.ds-navbar-link[aria-current="page"] {
  color: #6e2cf3 !important;
  font-weight: 600 !important;
}

.ds-navbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.ds-navbar-search-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}

.ds-navbar-search-icon {
  position: absolute !important;
  left: 11px !important;
  color: #94a3b8 !important;
  display: inline-flex !important;
  pointer-events: none !important;
}

.ds-navbar-search {
  height: 36px !important;
  width: 210px !important;
  padding: 0 12px 0 34px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background-color: #f8fafc !important;
  color: #0f172a !important;
  font-size: 12.5px !important;
  box-sizing: border-box !important;
}

.ds-navbar-search:focus {
  outline: none !important;
  background-color: #ffffff !important;
  border-color: #6e2cf3 !important;
  box-shadow: 0 0 0 3px rgba(110, 44, 243, 0.1) !important;
}

.ds-navbar-avatar {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background-color: #111827 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* Grid Inferior: Sidebar de Exemplo + Paginação Completa */
.ds-layout-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) !important;
  gap: 20px !important;
  margin-top: 24px !important;
}

@media (max-width: 900px) {
  .ds-layout-grid {
    grid-template-columns: 1fr !important;
  }
}

.ds-sidebar-demo-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.ds-sidebar-demo-item {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 9px 12px !important;
  min-height: auto !important;
  border-radius: 8px !important;
  border: none !important;
  background: transparent !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: all 0.15s ease !important;
}

.ds-sidebar-demo-item:hover {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

.ds-sidebar-demo-item[aria-current="page"] {
  background-color: #f5f3ff !important;
  color: #6e2cf3 !important;
  font-weight: 600 !important;
}

.ds-pagination-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 180px !important;
}

.ds-pagination-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  margin-top: auto !important;
}

.ds-pagination-summary {
  font-size: 12.5px !important;
  color: #64748b !important;
  margin: 0 !important;
}

.ds-pagination-summary strong {
  color: #0f172a !important;
  font-weight: 600 !important;
}

.ds-pagination-controls {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.ds-page-btn {
  height: 32px !important;
  min-height: 32px !important;
  min-width: 32px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  border: 1px solid #e2e8f0 !important;
  background-color: #ffffff !important;
  color: #334155 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.ds-page-btn:hover:not(:disabled) {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.ds-page-btn[aria-current="page"] {
  background-color: #6e2cf3 !important;
  border-color: #6e2cf3 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(110, 44, 243, 0.25) !important;
}

.ds-page-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

.ds-page-ellipsis {
  padding: 0 4px !important;
  color: #94a3b8 !important;
  font-size: 12.5px !important;
}

/* Branding uploaders (Configurações > Branding) */
.branding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.branding-grid-single {
  grid-template-columns: minmax(0, 360px);
}
.branding-uploader {
  display: grid;
  gap: 10px;
  align-content: start;
}
.branding-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.branding-dim-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
}
.branding-dim-badge[data-status="ok"] {
  background: #ecfdf5;
  color: #047857;
}
.branding-dim-badge[data-status="warn"] {
  background: #fffbeb;
  color: #b45309;
}
.branding-preview {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 18px;
  border-radius: 12px;
  border: 1.5px dashed #cbd5e1;
  transition: border-color .15s, background-color .15s;
}
.branding-preview.is-dragover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.branding-preview-light {
  background: #ffffff;
  color: #64748b;
}
.branding-preview-dark {
  background: #0b1121;
  border-color: #1e293b;
  color: #94a3b8;
}
.branding-preview-favicon {
  background: #f8fafc;
  color: #64748b;
}
.branding-preview-logo-img {
  display: block;
  max-width: 100%;
  max-height: 68px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.branding-preview-favicon-img {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgb(15 23 42 / 12%);
}
.branding-preview-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.branding-field-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.branding-file-input {
  display: none;
}
.branding-remove-btn {
  color: var(--destructive);
}
.branding-upload-feedback {
  margin: 0;
  font-size: 12.5px;
  color: #047857;
  min-height: 1.2em;
}
.branding-upload-feedback.is-error {
  color: var(--destructive);
}
@media (max-width: 820px) {
  .branding-grid, .branding-grid-single {
    grid-template-columns: 1fr;
  }
}




.announcement-admin-grid { align-items: start; }
@media (min-width: 821px) {
  .announcement-admin-grid { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
}
.announcement-admin-toggle { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.announcement-admin-toggle input { width: 18px; height: 18px; accent-color: var(--primary); }

/* ==========================================================================
   Drawer Completo de Tarefas (Campos, Timer, Checklist, Anexos e Comentários)
   ========================================================================== */
#content .task-drawer {
  width: min(100%, 680px);
}
.task-drawer .dialog-content {
  gap: 16px;
}
.task-drawer .enterprise-combobox-option {
  gap: 10px;
}
.task-drawer .enterprise-combobox-option > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}
.task-drawer .enterprise-option-name {
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.task-main-grid textarea {
  min-height: 76px;
  padding: 8px 10px;
  line-height: 1.45;
  resize: vertical;
}
.task-section-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf9fd;
}
.task-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.task-section-header h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--foreground);
}
.task-section-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
}
.task-section-body {
  display: grid;
  gap: 10px;
}
.task-subblock {
  display: grid;
  gap: 7px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.task-sublabel {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--foreground);
}
.task-inline-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.task-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.task-chip-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid #ddcdf7;
  font-size: 12px;
  font-weight: 600;
}
.task-chip-remove,
.task-item-del {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.task-chip-remove:hover,
.task-item-del:hover {
  background: #fee2e2;
  color: var(--destructive);
}
.task-dependencies-list {
  display: grid;
  gap: 6px;
}
.task-dep-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12.5px;
}
.task-dep-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-deadline-warning {
  color: #b45309;
  font-weight: 600;
}
.task-deadline-warning:empty {
  display: none;
}

/* Timer & Apontamentos */
.task-timer-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #ddcdf7;
  border-radius: 9px;
  background: var(--surface);
}
.task-timer-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--foreground);
}
.task-timer-clock.is-running {
  background: #fee2e2;
  color: #b91c1c;
}
button.task-timer-btn.is-running {
  background: #dc2626;
  border-color: #dc2626;
}
button.task-timer-btn.is-running:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}
.task-manual-time-bar {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.task-time-entries-list {
  display: grid;
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
}
.task-time-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12.5px;
}
.task-entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.task-entry-author {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.task-entry-date {
  color: var(--muted);
  font-size: 11.5px;
}
.task-entry-note {
  grid-column: 1 / 2;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* Checklist / Subtarefas */
.task-checklist-progress {
  width: 100%;
  height: 7px;
  accent-color: var(--primary);
}
.task-checklist-progress[hidden] {
  display: none;
}
.task-subtasks-list {
  display: grid;
  gap: 6px;
}
.task-subtask-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.task-subtask-label {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
  font-size: 13px;
}
.task-subtask-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.task-subtask-title {
  overflow-wrap: anywhere;
}
.task-subtask-title.is-done {
  text-decoration: line-through;
  color: var(--muted);
}

/* Anexos e Evidências */
.task-attachment-composer {
  display: grid;
  grid-template-columns: auto minmax(110px, 0.8fr) minmax(140px, 1.2fr) auto;
  gap: 8px;
  align-items: center;
}
.task-attachments-list {
  display: grid;
  gap: 7px;
}
.task-attachment-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.task-attachment-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.task-attachment-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}
.task-attachment-info {
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.task-attachment-name {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-attachment-date {
  font-size: 11px;
  color: var(--muted);
}
.task-attachment-open {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.task-attachment-open:hover {
  text-decoration: underline;
}

/* Comentários */
.task-comment-composer {
  display: grid;
  gap: 8px;
}
.task-comment-composer textarea {
  min-height: 62px;
  padding: 8px 10px;
  line-height: 1.45;
  resize: vertical;
  background: var(--surface);
}
.task-comment-actions {
  display: flex;
  justify-content: flex-end;
}
.task-comments-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}
.task-comment-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.task-comment-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.task-comment-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.task-comment-body {
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}
.task-comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
}
.task-comment-date {
  font-size: 11px;
  color: var(--muted);
}
.task-comment-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--foreground);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.task-empty-inline,
.task-empty-block {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.task-delete-btn {
  margin-right: auto;
}

/* Badges de metadados na Lista e Kanban de Tarefas */
.task-title-trigger {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  font-weight: 700;
  color: var(--foreground);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-title-trigger .btn-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--muted);
}
.task-title-trigger:hover,
.task-card-title.is-clickable:hover {
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}
.task-title-trigger:hover .btn-icon {
  color: var(--primary);
}
.task-meta-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}
.task-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.task-meta-pill .btn-icon svg {
  width: 11.5px;
  height: 11.5px;
}
.task-meta-pill.is-done {
  background: #dcfce7;
  color: #15803d;
}
.task-type-pill.is-feature { background: #eff6ff; color: #1d4ed8; }
.task-type-pill.is-delivery { background: var(--primary-soft); color: var(--primary); }
.task-type-pill.is-improvement { background: #f0fdf4; color: #15803d; }
.task-type-pill.is-bug { background: #fee2e2; color: #b91c1c; }
.task-type-pill.is-research { background: #fef3c7; color: #92400e; }
.task-timer-active-pill {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
}
.task-label-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f3e8ff;
  color: #6d28d9;
  font-size: 10.5px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .task-timer-bar,
  .task-manual-time-bar,
  .task-attachment-composer {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Página de Perfil Profissional (/app/perfil, /admin/perfil)
   ========================================================================== */
.topbar-avatar {
  overflow: hidden;
}
.topbar-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.profile-page-layout {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 1040px;
  margin-top: 12px;
}
.profile-hero-card {
  padding: 20px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #faf8ff 100%);
  overflow: visible;
}
.profile-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.profile-hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  flex: 1 1 420px;
}
.profile-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.profile-avatar-visual {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  border: 3px solid #ffffff;
  box-shadow: 0 6px 18px rgba(110, 38, 217, 0.16);
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.profile-avatar-visual:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 22px rgba(110, 38, 217, 0.24);
}
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-initials {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.profile-avatar-hint {
  font-size: 11.5px;
  color: var(--muted);
}
.profile-hero-info {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.profile-hero-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.profile-hero-name {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  color: var(--foreground);
}
.profile-hero-subtitle {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}
.profile-hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.profile-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
}
.profile-meta-chip[hidden] {
  display: none;
}
.profile-meta-chip .btn-icon svg {
  width: 13px;
  height: 13px;
  color: var(--primary);
}

/* Barra de Abas do Perfil */
.profile-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
button.profile-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
button.profile-tab-btn:hover {
  background: var(--background);
  color: var(--foreground);
}
button.profile-tab-btn.is-active,
button.profile-tab-btn[aria-selected="true"] {
  background: var(--primary-soft);
  border-color: #ddcdf7;
  color: var(--primary);
  font-weight: 700;
}
button.profile-tab-btn.is-active .btn-icon svg,
button.profile-tab-btn[aria-selected="true"] .btn-icon svg {
  stroke: var(--primary);
}

/* Painéis e Grid de Campos Alinhados pelo Topo */
.profile-tab-panel,
.profile-tab-form {
  display: block;
  width: 100%;
}
.profile-tab-panel .settings-card {
  overflow: visible;
}
.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  align-items: start;
  width: 100%;
}
.profile-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  width: 100%;
}
.profile-field.is-full {
  grid-column: 1 / -1;
}
.profile-field-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.profile-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
}
.profile-field-hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}
.profile-input-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.profile-field-error {
  color: var(--destructive) !important;
  font-weight: 600;
}
.profile-field-error:empty {
  display: none;
}
input.enterprise-input.is-invalid {
  border-color: var(--destructive) !important;
  background-color: var(--destructive-soft) !important;
}
input.enterprise-input.is-invalid:focus {
  border-color: var(--destructive) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
}
.profile-security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  width: 100%;
}
.profile-subform {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.profile-prefs-list {
  display: grid;
  gap: 12px;
}
.profile-pref-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--background);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.profile-pref-item:hover {
  border-color: #cbd5e1;
}
.profile-pref-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}
.profile-pref-copy {
  display: grid;
  gap: 3px;
}
.profile-pref-copy strong {
  font-size: 13.5px;
  color: var(--foreground);
}
.profile-pref-copy span {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.profile-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  width: 100%;
}
.profile-feedback {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  flex: 1 1 auto;
}
.profile-feedback:empty {
  display: none;
}
.profile-feedback.is-success {
  color: #15803d;
}
.profile-feedback.is-error {
  color: var(--destructive);
}
.profile-pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.profile-pwd-wrap input.enterprise-input {
  width: 100%;
  padding-right: 40px !important;
}
.profile-pwd-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.profile-pwd-toggle:hover {
  background: var(--surface-muted);
  color: var(--foreground);
}
.profile-pwd-strength {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}
.profile-pwd-strength[data-tone="weak"] { color: var(--destructive); }
.profile-pwd-strength[data-tone="medium"] { color: #d97706; }
.profile-pwd-strength[data-tone="good"] { color: #0284c7; }
.profile-pwd-strength[data-tone="strong"] { color: #15803d; }
.profile-ws-list {
  display: grid;
  gap: 10px;
}
.profile-ws-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--background);
}
.profile-ws-info {
  display: grid;
  gap: 3px;
}
.profile-ws-info strong {
  font-size: 14px;
}
.profile-ws-meta {
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 880px) {
  .profile-security-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
  .profile-hero-bar,
  .profile-hero-left {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-hero-right {
    align-items: flex-start;
    width: 100%;
  }
}

/* ==========================================================================
   Seletor de Tema (Página de Perfil + Ícone no Header) & Modo Escuro Global
   ========================================================================== */
.topbar-theme-btn {
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.topbar-theme-btn:hover {
  color: var(--primary);
}
.topbar-theme-btn:active {
  transform: scale(0.93);
}

.profile-theme-card .settings-card-body {
  display: grid;
  gap: 12px;
}
.profile-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 780px) {
  .profile-theme-grid {
    grid-template-columns: 1fr;
  }
}
button.profile-theme-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  height: auto;
  min-height: 0;
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--background);
  color: var(--foreground);
  text-align: left;
  white-space: normal;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}
button.profile-theme-option:hover {
  background: var(--surface);
  border-color: var(--primary);
  transform: translateY(-1px);
}
button.profile-theme-option.is-active,
button.profile-theme-option[aria-checked="true"] {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.profile-theme-preview {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  height: 64px;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  width: 100%;
}
.profile-theme-preview-sidebar {
  background: #0e152f;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-theme-preview-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px 8px;
}
.profile-theme-preview-topbar {
  height: 8px;
  width: 55%;
  border-radius: 4px;
}
.profile-theme-preview-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  flex: 1;
}
.profile-theme-preview-card {
  border-radius: 5px;
  border: 1px solid transparent;
}
.profile-theme-preview.is-light .profile-theme-preview-main {
  background: #f8f7fc;
}
.profile-theme-preview.is-light .profile-theme-preview-topbar {
  background: #d8d0ec;
}
.profile-theme-preview.is-light .profile-theme-preview-card {
  background: #ffffff;
  border-color: #e2dce9;
}
.profile-theme-preview.is-dark .profile-theme-preview-sidebar {
  background: #070b14;
}
.profile-theme-preview.is-dark .profile-theme-preview-main {
  background: #0b0f19;
}
.profile-theme-preview.is-dark .profile-theme-preview-topbar {
  background: #28354d;
}
.profile-theme-preview.is-dark .profile-theme-preview-card {
  background: #151f36;
  border-color: #263248;
}
.profile-theme-preview.is-system .profile-theme-preview-main {
  background: linear-gradient(115deg, #f8f7fc 0%, #f8f7fc 50%, #0b0f19 50.5%, #0b0f19 100%);
}
.profile-theme-preview.is-system .profile-theme-preview-topbar {
  background: linear-gradient(90deg, #6e26d9 0%, #8b5cf6 100%);
}
.profile-theme-preview.is-system .profile-theme-preview-card:first-child {
  background: #ffffff;
  border-color: #e2dce9;
}
.profile-theme-preview.is-system .profile-theme-preview-card:last-child {
  background: #151f36;
  border-color: #263248;
}
.profile-theme-option-copy {
  display: grid;
  gap: 5px;
  width: 100%;
}
.profile-theme-option-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.profile-theme-option-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}
.profile-theme-option-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
}
.profile-theme-option-check {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.profile-theme-option-check .btn-icon {
  display: none;
}
button.profile-theme-option.is-active .profile-theme-option-check,
button.profile-theme-option[aria-checked="true"] .profile-theme-option-check {
  background: var(--primary);
  color: #ffffff;
}
button.profile-theme-option.is-active .profile-theme-option-check .btn-icon,
button.profile-theme-option[aria-checked="true"] .profile-theme-option-check .btn-icon {
  display: inline-grid;
}
button.profile-theme-option.is-active .profile-theme-option-check .btn-icon svg,
button.profile-theme-option[aria-checked="true"] .profile-theme-option-check .btn-icon svg {
  width: 12px;
  height: 12px;
  stroke: #ffffff;
}
.profile-theme-option-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* Adaptações de Modo Escuro (:root[data-theme="dark"]) */
:root[data-theme="dark"] #shell > aside,
:root[data-theme="dark"] .auth .auth-product {
  background: #090d18;
  border-right-color: #1e293b;
}
:root[data-theme="dark"] #shell > aside .brand,
:root[data-theme="dark"] #shell > aside .brand-title,
:root[data-theme="dark"] #shell > aside .workspace-meta strong,
:root[data-theme="dark"] #shell > aside .sidebar-toggle:hover,
:root[data-theme="dark"] #shell > aside nav a:hover,
:root[data-theme="dark"] #shell > aside nav a[aria-current],
:root[data-theme="dark"] #shell > aside nav a[aria-current] .nav-icon,
:root[data-theme="dark"] #shell > aside nav a[aria-current] .nav-badge,
:root[data-theme="dark"] #shell > aside .switch:hover,
:root[data-theme="dark"] #shell > aside .switch[aria-current],
:root[data-theme="dark"] .auth-product h2,
:root[data-theme="dark"] .auth-pipeline p,
:root[data-theme="dark"] .auth-pipeline li {
  color: #f8fafc;
}
:root[data-theme="dark"] button,
:root[data-theme="dark"] .opp-btn-submit,
:root[data-theme="dark"] .topbar-avatar,
:root[data-theme="dark"] .pipeline-icon-badge {
  color: #ffffff;
}
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .metric {
  background: var(--surface);
}
:root[data-theme="dark"] .topbar-context-name,
:root[data-theme="dark"] .user-menu-panel .user-menu-action,
:root[data-theme="dark"] .profile-field-label,
:root[data-theme="dark"] .settings-field-label,
:root[data-theme="dark"] .settings-usage-line,
:root[data-theme="dark"] .pipeline-card-value,
:root[data-theme="dark"] .pipeline-contact-name,
:root[data-theme="dark"] .settings-plan-card ul {
  color: var(--foreground);
}
:root[data-theme="dark"] .user-menu-panel .user-menu-logout {
  color: var(--destructive);
}
:root[data-theme="dark"] .user-menu-trigger {
  border-color: rgba(139, 92, 246, 0.35);
}
:root[data-theme="dark"] .user-menu-trigger:hover {
  border-color: rgba(139, 92, 246, 0.6);
}
:root[data-theme="dark"] .topbar-icon-btn {
  color: var(--muted);
}
:root[data-theme="dark"] .topbar-icon-btn:hover {
  color: var(--foreground);
  background: var(--surface-muted);
}
:root[data-theme="dark"] button:not([class]),
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  border-color: var(--line);
}
:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  color: var(--foreground);
}
:root[data-theme="dark"] .pipeline-secondary {
  background: var(--surface-muted);
  border-color: var(--line);
  color: var(--foreground);
}
:root[data-theme="dark"] .pipeline-secondary:hover:not(:disabled) {
  background: #283548;
  border-color: #3b4c66;
}
:root[data-theme="dark"] .pipeline-Secondary.project-danger,
:root[data-theme="dark"] .pipeline-secondary.project-danger {
  color: var(--destructive);
}
:root[data-theme="dark"] .settings-card-header,
:root[data-theme="dark"] .task-section-card {
  background: rgba(15, 23, 42, 0.55);
}
:root[data-theme="dark"] .profile-hero-card {
  background: linear-gradient(135deg, #131b2e 0%, #1c1638 100%);
}
:root[data-theme="dark"] .profile-avatar-visual {
  border-color: var(--surface);
}
:root[data-theme="dark"] button.profile-tab-btn {
  color: var(--muted);
}
:root[data-theme="dark"] button.profile-tab-btn:hover {
  background: var(--surface-muted);
  color: var(--foreground);
}
:root[data-theme="dark"] button.profile-tab-btn.is-active,
:root[data-theme="dark"] button.profile-tab-btn[aria-selected="true"] {
  background: var(--primary-soft);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}
:root[data-theme="dark"] button.profile-tab-btn.is-active .btn-icon svg,
:root[data-theme="dark"] button.profile-tab-btn[aria-selected="true"] .btn-icon svg {
  stroke: #c4b5fd;
}
:root[data-theme="dark"] button.profile-theme-option {
  color: var(--foreground);
}
:root[data-theme="dark"] .settings-nav-item,
:root[data-theme="dark"] .lead-panel th,
:root[data-theme="dark"] .settings-card-table th,
:root[data-theme="dark"] .badge-pill {
  color: var(--muted);
}
:root[data-theme="dark"] .settings-badge-current {
  background: var(--primary-soft);
  color: #c4b5fd;
}
:root[data-theme="dark"] .badge-protected {
  background: rgba(22, 163, 74, 0.18);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
}
:root[data-theme="dark"] input.enterprise-input,
:root[data-theme="dark"] textarea.enterprise-textarea {
  background-color: var(--field-background) !important;
  border-color: var(--line) !important;
  color: var(--foreground) !important;
}
:root[data-theme="dark"] input.enterprise-input:hover:not(:disabled),
:root[data-theme="dark"] textarea.enterprise-textarea:hover:not(:disabled) {
  border-color: #3b4c66 !important;
}
:root[data-theme="dark"] input.enterprise-input:focus,
:root[data-theme="dark"] textarea.enterprise-textarea:focus {
  background-color: var(--surface) !important;
  border-color: var(--primary) !important;
}
:root[data-theme="dark"] input.enterprise-input-disabled {
  background-color: rgba(15, 23, 42, 0.5) !important;
  color: var(--muted) !important;
  border-color: var(--line) !important;
}
:root[data-theme="dark"] .enterprise-combobox-dropdown,
:root[data-theme="dark"] .ds-datepicker-popover,
:root[data-theme="dark"] .enterprise-form-card,
:root[data-theme="dark"] .ds-foundation-card,
:root[data-theme="dark"] .ds-subcard,
:root[data-theme="dark"] .ds-indicator-box,
:root[data-theme="dark"] .ds-bool-card,
:root[data-theme="dark"] .ds-navbar-demo,
:root[data-theme="dark"] .ds-prompt-card,
:root[data-theme="dark"] #content dialog.lead-modal-dialog,
:root[data-theme="dark"] .lead-modal-header,
:root[data-theme="dark"] .lead-section-card,
:root[data-theme="dark"] .lead-action-banner,
:root[data-theme="dark"] .lead-modal-footer {
  background-color: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--foreground) !important;
}
:root[data-theme="dark"] .lead-modal-body {
  background-color: var(--background) !important;
}
:root[data-theme="dark"] .enterprise-combobox-option,
:root[data-theme="dark"] .enterprise-option-name,
:root[data-theme="dark"] .enterprise-title,
:root[data-theme="dark"] .enterprise-label,
:root[data-theme="dark"] .lead-modal-title,
:root[data-theme="dark"] .lead-action-banner-info strong,
:root[data-theme="dark"] .ds-page-title,
:root[data-theme="dark"] .ds-foundation-title,
:root[data-theme="dark"] .ds-subcard-title,
:root[data-theme="dark"] .ds-bool-title {
  color: var(--foreground) !important;
}
:root[data-theme="dark"] .enterprise-combobox-option:hover,
:root[data-theme="dark"] .enterprise-combobox-option.is-focused,
:root[data-theme="dark"] .enterprise-combobox-option.is-selected {
  background-color: var(--primary-soft) !important;
  color: #c4b5fd !important;
}

/* ==========================================================================
   Modal Moderno de Confirmação de Exclusão (Task / Registros)
   ========================================================================== */
@keyframes confirmDialogIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

dialog.confirm-delete-dialog[open],
.confirm-delete-dialog {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 18px !important;
  background: var(--surface, #ffffff);
  color: var(--foreground, #0f172a);
  padding: 0 !important;
  width: min(460px, calc(100vw - 32px));
  max-width: 460px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(239, 68, 68, 0.12);
  animation: confirmDialogIn .18s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden !important;
  z-index: 100000;
}

.confirm-delete-dialog::backdrop {
  background: rgba(10, 15, 30, 0.68);
  backdrop-filter: blur(4px);
  animation: confirmDialogIn .15s ease-out;
}

.confirm-delete-content {
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
}

.confirm-delete-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  margin-bottom: 16px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
  flex-shrink: 0;
}

.confirm-delete-icon-wrap svg {
  width: 22px;
  height: 22px;
  stroke: #ef4444;
  display: block;
}

.confirm-delete-title {
  font-size: 18.5px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--foreground);
  line-height: 1.3;
}

.confirm-delete-desc {
  font-size: 13.5px;
  color: var(--muted, #64748b);
  margin: 0 0 18px;
  line-height: 1.5;
}

.confirm-delete-preview-box {
  background: var(--background, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-delete-preview-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted, #64748b);
  margin-bottom: 3px;
}

.confirm-delete-task-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
  word-break: break-word;
}

.confirm-delete-project-chip {
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-top: 6px;
  width: fit-content;
}

.confirm-delete-note {
  font-size: 12px;
  color: #d97706;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding-top: 9px;
  border-top: 1px dashed var(--line, #e2e8f0);
}

.confirm-delete-note-icon {
  display: inline-flex;
  flex-shrink: 0;
  margin-top: 1px;
}

.confirm-delete-error {
  font-size: 12.5px;
  color: #dc2626;
  margin: 0 0 14px;
  padding: 9px 12px;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.confirm-delete-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-delete-cancel-btn {
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-confirm-delete-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  padding: 9px 18px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  transition: opacity .15s ease, transform .1s ease;
}

.btn-confirm-delete-danger .btn-icon,
.btn-confirm-delete-danger .btn-icon svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

.btn-confirm-delete-danger:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-confirm-delete-danger:active {
  transform: translateY(0);
}

.btn-confirm-delete-danger.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

:root[data-theme="dark"] .confirm-delete-dialog {
  background: #151d30 !important;
  border-color: #273552 !important;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(239, 68, 68, 0.25) !important;
}

:root[data-theme="dark"] .confirm-delete-preview-box {
  background: #0f1626 !important;
  border-color: #222f48 !important;
}

:root[data-theme="dark"] .confirm-delete-note {
  color: #fbbf24 !important;
}


