:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-2: #eef2f6;
  --text: #17202a;
  --muted: #647182;
  --line: #d7dee8;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --warning: #b45309;
  --danger: #b91c1c;
  --success: #15803d;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
}

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

button {
  border: 0;
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--bg);
}

.login-hero {
  padding: 56px;
  color: white;
  background: #12343b;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-hero h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: 0;
  max-width: 620px;
}

.login-hero p {
  max-width: 560px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.login-panel {
  align-self: center;
  justify-self: center;
  width: min(420px, calc(100vw - 32px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.login-panel h2,
.view-title h1 {
  margin: 0;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  background: #fff;
}

.auth-brand {
  min-height: 100vh;
  padding: 56px;
  color: #fff;
  background: #12343b;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-brand h1 {
  max-width: 620px;
  margin: 0;
  font-size: 44px;
  line-height: 1.08;
}

.auth-brand p {
  max-width: 560px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.auth-panel {
  align-self: center;
  justify-self: center;
  width: min(500px, calc(100vw - 32px));
  padding: 24px 0;
}

#loginForm {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.register-mode .auth-brand {
  display: none;
}

.auth-page.register-mode {
  grid-template-columns: 1fr;
}

.register-mode .auth-panel {
  justify-self: center;
  width: min(520px, calc(100vw - 32px));
}

.trial-register h2 {
  font-size: 24px;
  margin: 0 0 20px;
}

.password-field,
.phone-field {
  position: relative;
}

.password-field button {
  position: absolute;
  right: 8px;
  bottom: 7px;
  height: 30px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.phone-field div {
  display: grid;
  grid-template-columns: 78px 1fr;
}

.phone-field strong {
  display: grid;
  place-items: center;
  border: 1px solid #8ea0b8;
  border-right: 0;
  background: #eef4fb;
  color: #4b5a70;
}

.phone-field input,
.trial-register input:not([type="checkbox"]) {
  border-color: #8ea0b8;
  background: #eef4fb;
  border-radius: 0;
  min-height: 45px;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}

.terms-row input {
  width: auto;
  margin-top: 2px;
}

.terms-row a {
  color: #0b1324;
}

.start-btn {
  min-height: 50px;
  border-radius: 0;
  background: #ed1f27 !important;
  text-transform: uppercase;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.auth-switch span {
  height: 1px;
  background: #9aa8bb;
}

.auth-switch button {
  background: transparent;
  color: var(--muted);
}

.social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}

.social-btn {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
}

.social-btn b {
  width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #2563eb;
  font-size: 20px;
}

.social-btn.google {
  background: #3b82f6;
}

.social-btn.linkedin {
  background: #006699;
}

.stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea,
.toolbar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.btn.secondary {
  background: #e7edf3;
  color: var(--text);
}

.btn.danger {
  background: var(--danger);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
}

.error {
  color: var(--danger);
  min-height: 20px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px 1fr;
}

.shell.sidebar-collapsed {
  grid-template-columns: 74px 1fr;
}

.sidebar {
  background: #20365f;
  color: #f9fafb;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: #0f766e;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand strong {
  display: block;
}

.brand small {
  color: #9ca3af;
}

.sidebar-brand {
  min-height: 48px;
  padding: 8px 4px;
}

.sidebar-brand .brand-mark {
  background: #304f91;
}

.sidebar-toggle {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #304f91;
  color: #fff;
  font-weight: 800;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: #d1d5db;
  text-align: left;
}

.nav-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  border-radius: 6px;
}

.nav-row .nested {
  padding-right: 0;
}

.nav-row .nav-action {
  width: 28px;
  height: 28px;
  margin-right: 4px;
  display: none;
  place-items: center;
  border: 1px solid rgba(209, 213, 219, 0.45);
  border-radius: 6px;
  background: rgba(31, 50, 88, 0.7);
  color: #fff;
  font-weight: 800;
  line-height: 1;
}

.nav-row:hover,
.nav-row.active {
  background: #354c80;
}

.nav-row:hover .nav-action,
.nav-row.active .nav-action,
.nav-action:focus-visible {
  display: grid;
}

.nav-row:hover .nested,
.nav-row.active .nested {
  background: transparent;
  color: #fff;
}

.nav button b {
  font-weight: 650;
  white-space: nowrap;
}

.nav svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav button.active,
.nav button:hover {
  background: #354c80;
  color: #fff;
}

.primary-nav {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.teamspace-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.teamspace-head button {
  margin-left: auto;
  background: transparent;
  color: #d1d5db;
}

.team-badge {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #ff394c;
  font-size: 12px;
  font-weight: 800;
}

.side-search {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 6px;
  border: 1px solid #5a70a1;
  border-radius: 6px;
  padding: 0 8px;
  min-height: 32px;
}

.side-search svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #9eb0d5;
}

.side-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.side-search input::placeholder {
  color: #9eb0d5;
}

.folder-title {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #e7ecff;
}

.folder-title span,
.nav button span {
  width: 20px;
  display: inline-grid;
  place-items: center;
}

.folder-title svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #6f82ff;
}

.folder-title em {
  margin-left: auto;
  font-style: normal;
  color: #b9c7e6;
}

.folder-title button {
  margin-left: auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: transparent;
  color: #b9c7e6;
  font-size: 20px;
  line-height: 1;
}

.folder-title button + em {
  margin-left: 4px;
}

.folder-title button:hover {
  background: #354c80;
  color: #fff;
}

.nav button.nested {
  padding-left: 34px;
  min-height: 32px;
}

.nav button.sub {
  min-height: 34px;
}

.sidebar-actions-menu {
  position: fixed;
  z-index: 70;
  width: 250px;
  padding: 6px;
  border: 1px solid #cdd5e6;
  border-radius: 7px;
  background: #fff;
  color: #2f3b4f;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.sidebar-actions-title {
  padding: 8px 10px;
  color: #647182;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-actions-group {
  display: grid;
  gap: 1px;
  padding: 5px 0;
  border-top: 1px solid #d7ddf0;
}

.sidebar-actions-group:first-of-type {
  border-top: 0;
}

.sidebar-actions-menu button {
  min-height: 31px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 9px;
  border-radius: 5px;
  background: transparent;
  color: #2f3b4f;
  text-align: left;
}

.sidebar-actions-menu button:hover,
.sidebar-actions-menu button:focus-visible {
  background: #eef2fb;
}

.sidebar-actions-menu strong {
  font-weight: 500;
}

.sidebar-actions-menu em {
  color: #647182;
  font-style: normal;
}

.action-glyph {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: #2f3b4f;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-collapsed .sidebar {
  align-items: center;
}

.sidebar-collapsed .sidebar-brand div,
.sidebar-collapsed .teamspace,
.sidebar-collapsed .sidebar-footer,
.sidebar-collapsed .nav button b,
.sidebar-collapsed .nav-action,
.sidebar-collapsed .folder-title button,
.sidebar-collapsed .folder-title strong,
.sidebar-collapsed .folder-title em {
  display: none;
}

.sidebar-collapsed .nav button,
.sidebar-collapsed .nav button.nested,
.sidebar-collapsed .nav-row {
  justify-content: center;
  padding: 0;
  width: 44px;
}

.sidebar-collapsed .nav-row {
  display: block;
}

.sidebar-collapsed .folder-title {
  justify-content: center;
}

.sidebar-footer {
  margin-top: auto;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.5;
}

.content {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

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

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

.profile-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-radius: 6px;
  background: #eef2ff;
  color: #1f2a44;
  font-weight: 700;
}

.avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.avatar.large {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.profile-menu {
  position: fixed;
  z-index: 40;
  width: min(380px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-head,
.edition-row,
.profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.profile-head {
  justify-content: flex-start;
  background: #4f5ff0;
  color: #fff;
}

.profile-head small {
  display: block;
  color: rgba(255, 255, 255, 0.86);
  margin-top: 5px;
}

.trial-strip {
  margin: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f3f6fb;
  color: var(--muted);
}

.edition-row {
  margin: 0 12px 12px;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.edition-dot {
  width: 24px;
  height: 24px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 50%;
  background: #38b44a;
}

.profile-section {
  padding: 14px;
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
  color: var(--text);
}

.profile-actions {
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.danger-text {
  color: var(--danger);
}

.main {
  padding: 24px;
  min-width: 0;
}

.view-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.view-title p {
  color: var(--muted);
  margin: 6px 0 0;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.metric {
  display: grid;
  gap: 8px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.metric strong {
  font-size: 28px;
}

.workqueue-page {
  min-height: calc(100vh - 116px);
  display: grid;
  grid-template-columns: 284px 1fr;
  gap: 16px;
}

.workqueue-panel {
  background: #fff;
  border: 1px solid #d7ddf0;
  border-radius: 6px;
  padding: 14px 0;
}

.workqueue-panel h3,
.workqueue-panel h4,
.queue-section-title {
  margin: 0;
  padding: 0 20px 10px;
}

.workqueue-panel h3 {
  font-size: 16px;
}

.workqueue-panel h4 {
  padding-top: 12px;
  font-size: 14px;
}

.workqueue-panel select {
  width: calc(100% - 40px);
  margin: 0 20px 8px;
  min-height: 28px;
  border: 1px solid #b8c2d8;
  border-radius: 4px;
  background: #fff;
  color: #1f2a44;
}

.queue-section-title {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #d7ddf0;
}

.queue-action,
.icon-tool,
.icon-btn {
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: #2f3b4f;
}

.queue-action {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.queue-action:hover,
.icon-tool:hover,
.icon-btn:hover {
  background: #eef2fb;
}

.queue-action svg,
.icon-tool svg,
.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.queue-item {
  min-height: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 20px;
  color: #162032;
  font-size: 14px;
}

.queue-item.active {
  background: #eef2fb;
  border-left: 3px solid #3158e8;
  font-weight: 750;
}

.queue-item em {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #cfd7eb;
  border-radius: 999px;
  color: #304060;
  font-style: normal;
  background: #fff;
}

.workqueue-main {
  min-width: 0;
  background: #fff;
  border: 1px solid #d7ddf0;
  border-radius: 6px;
  overflow: hidden;
}

.workqueue-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #d7ddf0;
}

.workqueue-header h2 {
  margin: 0;
  font-size: 18px;
}

.workqueue-tools {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  margin-left: 6px;
  border-radius: 5px;
}

.icon-tool {
  min-height: 34px;
  grid-auto-flow: column;
  gap: 7px;
  padding: 0 10px;
  border-radius: 5px;
  font-weight: 700;
}

.icon-tool span {
  line-height: 1;
}

.workqueue-table {
  overflow: auto;
}

.workqueue-table table {
  min-width: 960px;
}

.workqueue-table th {
  background: #fff;
  color: #2f3b4f;
  font-size: 14px;
  text-transform: none;
  border-right: 1px solid #d7ddf0;
}

.workqueue-table td {
  height: 54px;
  color: #2f3b4f;
}

.late-cell {
  color: #ef3340 !important;
}

.leads-view {
  min-height: calc(100vh - 116px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  margin: -24px;
  background: #f4f6fb;
}

.leads-tabs {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 0 0;
  background: #fff;
  border-bottom: 1px solid #d7ddf0;
}

.leads-tabs button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  background: transparent;
  color: #233047;
  font-weight: 700;
}

.leads-tabs button.active {
  background: #edf3ff;
}

.tab-more {
  font-size: 18px;
  line-height: 1;
}

.leads-toolbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  background: #fff;
  border-bottom: 1px solid #d7ddf0;
}

.lead-tools-left,
.lead-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lead-tool,
.view-icon,
.lead-create-menu,
.lead-more {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #233047;
  font-weight: 700;
}

.lead-tool {
  padding: 0 9px;
}

.lead-tool.primary,
.view-icon.active {
  background: #edf3ff;
  border-color: #cfd8ef;
}

.lead-tool svg,
.view-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.view-icon,
.lead-create-menu,
.lead-more {
  width: 34px;
}

.lead-create-menu {
  margin-left: -8px;
  border-radius: 0 6px 6px 0;
  background: #3158e8;
  color: #fff;
}

.lead-more {
  width: 44px;
  background: #f5f7fc;
  border-color: #d7ddf0;
}

.tool-glyph {
  min-width: 16px;
  display: inline-grid;
  place-items: center;
  color: #52658a;
  font-size: 12px;
  font-weight: 800;
}

.leads-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 8px 0 2px;
}

.leads-filter-panel {
  min-height: 0;
  overflow: auto;
  padding: 14px 12px;
  background: #fff;
  border: 1px solid #d7ddf0;
  border-radius: 6px;
}

.leads-filter-panel h3 {
  margin: 4px 6px 14px;
  font-size: 15px;
}

.lead-filter-search {
  min-height: 34px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 6px;
  margin: 0 6px 14px;
  padding: 0 8px;
  border: 1px solid #b9c3d8;
  border-radius: 5px;
  color: #52658a;
}

.lead-filter-search svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.lead-filter-search input {
  min-width: 0;
  border: 0;
  outline: 0;
}

.lead-filter-group {
  display: grid;
  gap: 9px;
  margin: 14px 0 18px;
}

.lead-filter-group h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px 4px;
  font-size: 15px;
}

.lead-filter-group label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 6px;
  align-items: start;
  color: #132033;
  font-size: 14px;
  line-height: 1.15;
}

.lead-filter-group input,
.lead-list-table input {
  width: 15px;
  height: 15px;
  accent-color: #3158e8;
}

.lead-table-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d7ddf0;
  border-radius: 6px;
}

.lead-table-wrap {
  min-height: 0;
  overflow: auto;
}

.lead-list-table {
  min-width: 1180px;
  table-layout: fixed;
}

.lead-list-table th,
.lead-list-table td {
  height: 55px;
  padding: 8px 10px;
  color: #2f3b4f;
  vertical-align: middle;
  border-bottom: 1px solid #e5e9f2;
}

.lead-list-table th {
  height: 37px;
  background: #fff;
  color: #202b3d;
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  border-right: 1px solid #d7ddf0;
}

.lead-list-table td {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.check-col {
  width: 58px;
  text-align: center;
}

.flag-col {
  width: 140px;
}

.settings-col {
  width: 40px;
  text-align: center;
}

.settings-col svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.mini-select {
  margin-left: 12px;
  color: #202b3d;
  font-size: 12px;
  font-weight: 800;
}

.lead-flag {
  min-width: 82px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px 0 9px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  font-size: 12px;
  font-weight: 800;
}

.lead-flag.orange {
  background: #fff0df;
  color: #c86500;
}

.lead-flag.green {
  background: #d9f8ea;
  color: #059669;
}

.lead-flag.red {
  background: #ffe4e6;
  color: #ef3340;
}

.note-col {
  width: 46px;
  text-align: center;
}

.contact-list-table {
  min-width: 1120px;
}

.contact-list-table .flag-col {
  width: 140px;
}

.note-mark {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  overflow: hidden;
  border: 1px solid #334155;
  border-radius: 4px;
  color: transparent;
  position: relative;
}

.note-mark::before {
  content: "";
  width: 9px;
  height: 6px;
  border: 2px solid #334155;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg);
}

.phone-mark {
  margin-left: 8px;
  color: #8a96a8;
  font-size: 11px;
  font-weight: 700;
}

.lead-table-footer {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-top: 1px solid #d7ddf0;
  color: #233047;
  font-size: 14px;
}

.smart-chat {
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-top: 1px solid #d7ddf0;
  background: #fff;
  color: #a0a8b8;
  font-size: 12px;
}

.forecast-page {
  min-height: calc(100vh - 116px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  position: relative;
  margin: -24px;
  overflow: hidden;
  border: 1px solid #d7ddf0;
  border-radius: 8px;
  background: #fff;
}

.forecast-help {
  position: absolute;
  top: 30px;
  right: 26px;
  color: #304060;
  text-decoration: none;
  font-size: 15px;
}

.forecast-help::before {
  content: "?";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  border: 1px solid #52658a;
  border-radius: 2px;
  color: #52658a;
  font-size: 11px;
  font-weight: 800;
}

.forecast-center {
  align-self: center;
  justify-self: center;
  width: min(1040px, calc(100vw - 340px));
  display: grid;
  justify-items: center;
  gap: 34px;
  transform: translateY(-22px);
}

.forecast-center h1 {
  margin: 0 0 4px;
  color: #07111f;
  font-size: 22px;
  line-height: 1.2;
}

.forecast-steps {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 78px;
}

.forecast-step {
  display: grid;
  justify-items: center;
  text-align: center;
}

.forecast-step h2 {
  margin: 14px 0 12px;
  color: #07111f;
  font-size: 16px;
}

.forecast-step p {
  max-width: 280px;
  margin: 0;
  color: #1f2a44;
  font-size: 14px;
  line-height: 1.25;
}

.forecast-illustration {
  width: 230px;
  height: 170px;
  display: grid;
  place-items: center;
}

.forecast-illustration svg {
  width: 230px;
  height: 160px;
}

.forecast-illustration .blob {
  fill: #f1f1f1;
}

.forecast-illustration .orange {
  fill: none;
  stroke: #ffb020;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.forecast-illustration .gray {
  fill: none;
  stroke: #9ca6b4;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.forecast-illustration .glass {
  fill: #fff;
  stroke: #9ca6b4;
  stroke-width: 2.2;
}

.forecast-illustration .orange-fill {
  fill: #fff;
  stroke: #ffb020;
  stroke-width: 2;
}

.forecast-configure {
  min-width: 128px;
  background: #3158e8;
}

.documents-page {
  min-height: calc(100vh - 116px);
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr) 70px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  margin: -24px;
  background: #f4f6fb;
}

.reports-page {
  min-height: calc(100vh - 116px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin: -24px;
  background: #f4f6fb;
}

.reports-toolbar {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px 0 0;
  background: #eef2f8;
  border-bottom: 1px solid #d7ddf0;
}

.reports-view-select {
  min-height: 34px;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid #b9c3d8;
  border-radius: 6px;
  background: #fff;
  color: #233047;
}

.reports-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.reports-search {
  width: 222px;
  min-height: 34px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #b9c3d8;
  border-radius: 6px;
  background: #fff;
  color: #52658a;
}

.reports-search svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.reports-search input {
  min-width: 0;
  border: 0;
  outline: 0;
}

.reports-table-wrap {
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.reports-table {
  min-width: 1280px;
  table-layout: fixed;
}

.reports-table th,
.reports-table td {
  height: 50px;
  padding: 0 18px;
  border-bottom: 1px solid #e5e9f2;
  color: #07111f;
  vertical-align: middle;
}

.reports-table th {
  height: 34px;
  background: #fff;
  color: #07111f;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
}

.reports-table th:nth-child(1),
.reports-table td:nth-child(1) {
  width: 520px;
}

.reports-table th:nth-child(2),
.reports-table td:nth-child(2) {
  width: 420px;
}

.reports-table th:nth-child(3),
.reports-table td:nth-child(3) {
  width: 250px;
}

.reports-table th:nth-child(4),
.reports-table td:nth-child(4) {
  width: 245px;
}

.reports-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.report-name-cell {
  display: grid;
  grid-template-columns: 18px 18px minmax(0, auto) 28px;
  align-items: center;
  gap: 8px;
}

.report-name-cell input {
  width: 15px;
  height: 15px;
  accent-color: #3158e8;
}

.report-name-cell a {
  min-width: 0;
  overflow: hidden;
  color: #3158ff;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-name-cell button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #233047;
  font-weight: 800;
}

.star {
  overflow: hidden;
  color: transparent;
  position: relative;
}

.star::before {
  content: "*";
  position: absolute;
  inset: 0;
  color: #d5dbe7;
  font-size: 20px;
  line-height: 18px;
}

.docs-sidebar {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  margin: 14px 0 12px 0;
  padding: 12px 8px;
  border: 1px solid #d7ddf0;
  border-radius: 8px;
  background: #fff;
}

.docs-folder,
.docs-tree-item,
.workdrive-btn {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 5px;
  background: transparent;
  color: #1f2a44;
  text-align: left;
}

.docs-folder {
  width: 100%;
  padding: 0 12px;
}

.docs-folder.active {
  background: #dfe8fb;
}

.docs-folder svg,
.docs-tree-item svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.docs-section-title {
  min-height: 46px;
  display: grid;
  grid-template-columns: 20px 1fr 26px;
  align-items: end;
  gap: 6px;
  padding: 0 4px 7px;
  color: #7f8fab;
  font-size: 13px;
}

.docs-section-title button {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 1px solid #5871ff;
  border-radius: 50%;
  background: #fff;
  color: #5871ff;
  font-weight: 800;
}

.docs-tree-item {
  align-self: start;
  padding: 0 10px;
}

.docs-tree-item em {
  color: #a0a8b8;
  font-size: 10px;
  font-style: normal;
}

.workdrive-btn {
  justify-content: space-between;
  padding: 0 8px;
  background: #edf3ff;
}

.workdrive-btn span {
  color: #1f2a44;
  font-size: 11px;
}

.docs-workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 14px 0 12px;
  border: 1px solid #d7ddf0;
  border-radius: 8px 0 0 8px;
  background: #fff;
}

.docs-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid #e5e9f2;
}

.docs-breadcrumb,
.docs-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #233047;
}

.docs-breadcrumb strong {
  font-size: 13px;
}

.docs-actions button {
  min-width: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
  color: #334155;
  font-size: 11px;
}

.docs-actions svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
}

.docs-empty {
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  transform: translateY(34px);
  color: #07111f;
}

.docs-empty-art {
  width: 150px;
  height: 118px;
}

.docs-right-rail {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 26px;
  margin: 62px 0 12px -10px;
  padding-top: 30px;
  border-left: 1px solid #e5e9f2;
  background: #fff;
}

.docs-right-rail button {
  min-height: 48px;
  display: grid;
  justify-items: center;
  gap: 6px;
  background: transparent;
  color: #07111f;
  font-size: 12px;
}

.docs-right-rail span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #52658a;
  font-weight: 800;
}

.deals-layout {
  grid-template-columns: 214px minmax(0, 1fr);
}

.deals-board-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.deal-stage-bar {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f4f6fb;
}

.deal-stage-bar button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #b9c3d8;
  border-radius: 5px;
  background: #fff;
  color: #233047;
  font-weight: 700;
}

.deal-stage-bar .stage-edit {
  width: 30px;
  overflow: hidden;
  color: transparent;
  position: relative;
  border: 0;
  background: transparent;
}

.deal-stage-bar .stage-edit::before {
  content: "";
  width: 13px;
  height: 13px;
  display: block;
  border: 2px solid #334155;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
}

.deals-board {
  min-height: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 304px;
  gap: 20px;
  overflow: auto;
  padding: 6px 10px 14px 0;
}

.deal-stage {
  min-height: 708px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #e7edf8;
}

.deal-stage header {
  min-height: 65px;
  padding: 10px 15px;
  border-top: 3px solid #81d5d4;
  background: #d5f4f5;
  color: #0f172a;
}

.deal-stage header strong {
  font-size: 14px;
}

.deal-stage header span,
.deal-stage header em {
  display: inline-grid;
  place-items: center;
  margin-left: 5px;
  font-size: 13px;
  font-style: normal;
}

.deal-stage header span {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #8fd6d9;
  color: #1f5962;
  font-weight: 800;
}

.deal-stage header em::before {
  content: "-";
  margin-right: 8px;
  color: #647182;
}

.deal-stage header b {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.deal-stage-body {
  min-height: 0;
  overflow: auto;
  padding: 10px 0;
}

.deal-board-card {
  margin: 0 0 10px;
  padding: 10px 16px;
  display: grid;
  gap: 4px;
  background: #fff;
  border: 1px solid #dce2ec;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

.deal-board-card strong {
  font-size: 14px;
}

.deal-board-card span {
  line-height: 1.25;
}

.deal-stage.empty {
  background: #dce3ee;
}

.no-deals {
  min-height: 520px;
  display: grid;
  place-items: center;
  color: #0f172a;
}

.trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.trial-banner h2 {
  margin: 8px 0 4px;
  font-size: 21px;
}

.trial-banner p {
  margin: 0;
  color: var(--muted);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan-card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.plan-card.selected {
  border-color: var(--accent-2);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.14);
}

.plan-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
}

.plan-price {
  font-size: 36px;
  font-weight: 800;
}

.plan-price span {
  font-size: 16px;
  margin-right: 4px;
  color: var(--muted);
}

.plan-card p {
  color: var(--muted);
  line-height: 1.55;
}

.plan-card .btn {
  margin-top: auto;
}

.two-col {
  grid-template-columns: 1.2fr 0.8fr;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: 18px;
  margin: 0;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 100px;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 14px;
}

.bar {
  height: 12px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--accent-2);
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: 0;
}

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

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin-bottom: 14px;
}

.table-wrap {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  background: #f8fafc;
}

td {
  font-size: 14px;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7edf3;
  color: #344255;
  font-size: 12px;
  font-weight: 700;
}

.chip.good {
  background: #dcfce7;
  color: #166534;
}

.chip.warn {
  background: #fef3c7;
  color: #92400e;
}

.chip.bad {
  background: #fee2e2;
  color: #991b1b;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
}

.lane {
  background: #e9eef4;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-height: 380px;
}

.lane h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.deal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 30;
}

.modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal-head,
.modal-actions {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

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

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

@media (max-width: 980px) {
  .auth-page,
  .login-page,
  .shell,
  .two-col {
    grid-template-columns: 1fr;
  }

  .auth-page,
  .login-page {
    background: var(--bg);
  }

  .auth-brand,
  .login-hero {
    padding: 32px 20px;
    background: #12343b;
    min-height: auto;
  }

  .auth-brand h1,
  .login-hero h1 {
    font-size: 34px;
  }

  .register-mode .auth-brand {
    display: none;
  }

  .auth-panel,
  .register-mode .auth-panel {
    justify-self: center;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px;
    max-height: 44vh;
  }

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

  .nav button {
    justify-content: center;
    font-size: 12px;
  }

  .sidebar .brand,
  .sidebar-footer {
    display: none;
  }

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

  .toolbar,
  .view-title,
  .topbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions,
  .trial-banner {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .workqueue-panel {
    max-height: 360px;
    overflow: auto;
  }

  .social-row {
    gap: 12px;
  }
}

@media (max-width: 620px) {
  .main {
    padding: 16px;
  }

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

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

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