:root {
  --nav: #26328f;
  --nav-2: #343bb0;
  --panel: #f4f7fb;
  --text: #273043;
  --muted: #7b8497;
  --line: #dfe5ee;
  --blue: #32a8df;
  --cyan: #50c7d7;
  --mint: #3ed7b5;
  --orange: #ffb000;
  --green: #19b96f;
  --shadow: 0 18px 45px rgba(28, 41, 84, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font:
    15px/1.4 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #eef3f8;
}

.auth-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(50, 48, 160, 0.94), rgba(20, 43, 116, 0.96)),
    #202a88;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.auth-card {
  width: min(480px, 100%);
  padding: 30px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(5, 14, 55, 0.34);
}
.auth-brand {
  display: grid;
  gap: 6px;
  margin-bottom: 24px;
}
.auth-brand span {
  color: #26328f;
  font-size: 30px;
  font-weight: 900;
}
.auth-brand small,
.auth-form p,
.auth-switch,
.auth-note {
  color: #7b8497;
}
.auth-form {
  display: grid;
  gap: 14px;
}
.auth-form h1 {
  margin: 0;
  color: #202942;
}
.auth-form p {
  margin: -6px 0 4px;
}
.auth-form label {
  display: grid;
  gap: 7px;
  color: #697386;
  font-weight: 700;
}
.auth-form input {
  height: 46px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  padding: 0 12px;
  color: #273043;
  background: #fff;
}
.auth-form .primary {
  width: 100%;
  margin-top: 4px;
}
.auth-switch a {
  color: #1266b3;
  font-weight: 800;
  text-decoration: none;
}
.auth-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #9f1d26;
  background: #ffe2e5;
  font-weight: 800;
}
.auth-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f3f6fa;
  font-size: 13px;
}

button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
}

.shell {
  min-height: 100vh;
}

.top-main {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.top-brand {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  font-size: 23px;
  font-weight: 800;
  flex: 0 0 auto;
}
.top-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}
.top-brand.active,
.top-brand:hover {
  background: transparent;
}

.workspace {
  flex: 1;
  min-width: 0;
}

.topbar {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 0 42px 0 12px;
  color: #fff;
  background: linear-gradient(90deg, #3836a3, #2a3192);
}

.top-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.top-tab {
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  font-size: 17px;
}
.top-tab.active,
.top-tab:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.search {
  position: relative;
  width: 300px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}
.search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(11, 21, 52, 0.28);
}
.search-results.active {
  display: block;
}
.search-results button {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f6;
  color: #273043;
  background: #fff;
  text-align: left;
}
.search-results button:hover {
  background: #f4f8fd;
}
.search-results button:last-child {
  border-bottom: 0;
}
.search-results strong {
  color: #1266b3;
}
.search-results span,
.search-empty {
  color: #7b8497;
  font-size: 13px;
}
.search-empty {
  padding: 14px;
  background: #fff;
}
.avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #dce5ef;
  color: #28324b;
  font-weight: 800;
  overflow: hidden;
  line-height: 1;
}
.avatar.has-image {
  background: transparent;
}
.avatar.has-image img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.page {
  display: none;
  padding: 28px;
}
.page.active {
  display: block;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.1;
  color: #fff;
}
.page-head p {
  margin: -4px 0 0;
  color: rgba(255, 255, 255, 0.76);
}
.workspace {
  background: linear-gradient(180deg, #3030a0 0, #3030a0 215px, #eef3f8 215px);
}

.head-actions,
.view-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
}
.view-tabs {
  gap: 6px;
  padding: 4px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(16, 24, 84, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.view-tabs button,
.filter {
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.11);
  font-weight: 800;
  letter-spacing: 0;
  transition:
    background 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}
.view-tabs button.active,
.filter:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.primary {
  height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 12px 28px rgba(25, 185, 111, 0.28);
  transition:
    background 0.14s ease,
    transform 0.14s ease,
    box-shadow 0.14s ease;
}
.primary:hover {
  background: #16a866;
  box-shadow: 0 16px 34px rgba(25, 185, 111, 0.34);
  transform: translateY(-1px);
}
.danger {
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  color: #fff;
  background: #e5484d;
  font-weight: 800;
}
.danger:hover {
  background: #cf3439;
}
.done {
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  color: #fff;
  background: #19b96f;
  font-weight: 800;
}
.done:hover {
  background: #159d5f;
}

.deals-view {
  display: none;
  margin-top: 0;
}
.deals-view.active {
  display: block;
}
#dealsPage .deals-view.active {
  margin-top: 0;
}
#dealsPage .page-head {
  min-height: 64px;
}
#kanbanView {
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 0;
}
.deals-head-actions {
  gap: 8px;
  margin-left: auto;
}

.analytics-head-actions {
  display: grid;
  grid-template-columns: minmax(260px, 360px) max-content max-content;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}
.analytics-head-actions .kanban-period,
.analytics-head-actions .period-custom {
  flex-wrap: nowrap;
}
.analytics-head-actions .primary {
  white-space: nowrap;
}

.analytics-company-filter {
  display: grid;
  min-width: 0;
  width: 100%;
}
.analytics-company-filter span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
}
.analytics-company-filter select {
  height: 42px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  padding: 0 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 300;
  outline: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analytics-company-filter option {
  color: #202942;
}

.public-body {
  min-height: 100vh;
  padding: 24px clamp(20px, 3vw, 48px);
  background: linear-gradient(180deg, #f8fbff 0%, #eef3f8 100%);
}

.public-shell {
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(28, 41, 84, 0.16);
}

.public-nav {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid #e8edf5;
  background: rgba(255, 255, 255, 0.94);
}

.public-brand,
.public-links,
.public-actions,
.hero-actions,
.public-note-row,
.support-panel,
.workflow-step {
  display: flex;
  align-items: center;
}

.public-brand {
  gap: 12px;
  color: #121b2f;
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
}

.public-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.public-links {
  gap: 26px;
}

.public-links a,
.public-login {
  color: #253047;
  font-weight: 800;
  text-decoration: none;
}

.public-links a.active,
.public-links a:hover,
.public-login:hover {
  color: #4b2cff;
}

.public-actions {
  gap: 10px;
  justify-content: flex-end;
}

.public-primary,
.public-outline {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.public-primary {
  color: #fff;
  background: linear-gradient(135deg, #5f35ff 0%, #3824e8 100%);
  box-shadow: 0 14px 28px rgba(79, 44, 255, 0.24);
}

.public-outline {
  color: #4b2cff;
  border: 1px solid rgba(75, 44, 255, 0.42);
  background: #fff;
}

.public-outline.purple {
  color: #604cff;
  border-color: rgba(96, 76, 255, 0.28);
}

.public-primary.wide,
.public-outline.wide {
  width: 100%;
}

.public-page-title {
  padding: 40px 28px 18px;
  text-align: center;
}

.public-page-title h1,
.hero-copy h1 {
  margin: 0;
  color: #172238;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.public-page-title p,
.hero-copy p,
.price-card p,
.contact-card p,
.support-panel p,
.workflow-panel p,
.public-note-row p {
  color: #64728a;
}

.public-page-title p {
  max-width: 680px;
  margin: 14px auto 0;
  font-size: 20px;
}

.landing-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 430px);
  gap: 64px;
  align-items: center;
  overflow: hidden;
  padding: 78px 42px 84px;
  background:
    radial-gradient(circle at 76% 44%, rgba(225, 220, 255, 0.9) 0 24%, transparent 42%),
    radial-gradient(circle at 90% 76%, rgba(240, 236, 255, 0.88) 0 16%, transparent 34%),
    #fff;
}

.landing-hero::after {
  content: "";
  position: absolute;
  top: 34px;
  right: 118px;
  width: 92px;
  height: 92px;
  opacity: 0.38;
  background-image: radial-gradient(rgba(100, 73, 255, 0.32) 1.6px, transparent 1.6px);
  background-size: 13px 13px;
}

.landing-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
}

.landing-copy h1 {
  margin: 0;
  color: #101a31;
  font-size: clamp(46px, 5.4vw, 68px);
  line-height: 1.14;
  letter-spacing: 0;
}

.landing-copy h1 span {
  color: #4b2cff;
}

.landing-copy p {
  max-width: 530px;
  margin: 0;
  color: #41506a;
  font-size: 19px;
  line-height: 1.55;
}

.today-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  padding: 28px 34px;
  border: 1px solid rgba(223, 231, 241, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 26px 64px rgba(28, 41, 84, 0.16);
  backdrop-filter: blur(10px);
}

.today-head,
.today-row,
.today-company {
  display: flex;
  align-items: center;
}

.today-head {
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid #dfe7f1;
}

.today-head h2 {
  margin: 0;
  color: #101a31;
  font-size: 22px;
}

.today-head span {
  color: #172238;
  font-size: 24px;
  letter-spacing: 2px;
}

.today-row {
  gap: 22px;
  min-height: 90px;
  border-bottom: 1px solid #dfe7f1;
}

.today-row strong {
  flex: 1;
  color: #101a31;
  font-size: 24px;
}

.today-row em {
  color: #263247;
  font-size: 34px;
  font-style: normal;
  font-weight: 300;
}

.today-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #4b2cff;
  background: #f0eaff;
}

.today-icon svg,
.feature-icon svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.today-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 2.2;
}

.today-icon.bill {
  color: #1d64e8;
  background: #e9f1ff;
}

.today-icon.deal {
  color: #2f8c37;
  background: #eaf8ed;
}

.today-icon.company {
  color: #4b2cff;
  background: #f0eaff;
}

.today-company {
  gap: 22px;
  padding-top: 26px;
}

.today-company strong {
  display: block;
  color: #101a31;
  font-size: 22px;
}

.today-company p {
  margin: 8px 0 8px;
  color: #64728a;
  font-size: 17px;
}

.today-company b {
  color: #4b2cff;
  font-size: 18px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 36px;
  align-items: center;
  margin: 32px 24px 20px;
  padding: 46px 32px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7fbff 0%, #dcefe4 100%);
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.eyebrow {
  color: #168a52;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy p {
  max-width: 520px;
  margin: 0;
  font-size: 18px;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  width: 100%;
  max-width: 430px;
  justify-self: end;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 45px rgba(28, 41, 84, 0.14);
}

.mini-top,
.mini-column h3,
.mini-card,
.workflow-step,
.contact-card,
.price-card,
.public-faq details,
.support-panel,
.workflow-panel,
.benefit-card,
.public-note-row {
  border: 1px solid #dfe7f1;
  background: #fff;
}

.mini-top {
  height: 42px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border-radius: 10px;
}

.mini-top span {
  border-radius: 6px;
  background: #eaf1f8;
}

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

.mini-board div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e3ebf5;
  border-radius: 8px;
  background: #f7fafc;
}

.mini-board b {
  color: #172238;
  font-size: 13px;
  line-height: 1.15;
}

.mini-board em {
  overflow: hidden;
  color: #64728a;
  font-size: 13px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
}

.mini-card strong {
  color: #172238;
}

.mini-card span {
  color: #172238;
  font-size: 14px;
  font-weight: 800;
}

.mini-card::after {
  content: "";
  width: 78%;
  height: 8px;
  display: block;
  border-radius: 99px;
  background: #32a8df;
}

.mini-card small {
  height: 8px;
  width: 56%;
  border-radius: 99px;
  background: #dfe7f1;
}

.benefit-section,
.pricing-grid,
.contact-grid,
.public-faq,
.workflow-panel,
.public-note-row,
.support-panel {
  margin: 22px 28px;
}

.benefit-section h2,
.public-faq h2 {
  margin: 0 0 16px;
  color: #172238;
  font-size: 26px;
}

.benefit-section.centered {
  margin-top: 44px;
  margin-bottom: 34px;
  text-align: center;
}

.benefit-section.centered > p {
  max-width: 560px;
  margin: -4px auto 34px;
  color: #41506a;
  font-size: 18px;
  line-height: 1.5;
}

.benefit-grid,
.pricing-grid,
.contact-grid,
.faq-grid {
  display: grid;
  gap: 16px;
}

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

.benefit-card,
.benefit-grid > div,
.price-card,
.contact-card,
.workflow-panel,
.support-panel {
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(28, 41, 84, 0.08);
}

.benefit-card,
.benefit-grid > div,
.workflow-panel {
  padding: 22px;
}

.benefit-card h3,
.benefit-grid > div strong,
.price-card h2,
.contact-card h2,
.workflow-panel h2,
.support-panel h2 {
  margin: 0;
  color: #172238;
}

.benefit-card p,
.benefit-grid > div p,
.price-card p,
.contact-card p,
.workflow-panel p,
.support-panel p {
  margin: 8px 0 0;
}

.benefit-grid > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 8px;
  align-content: center;
  min-height: 248px;
  border: 1px solid #dfe7f1;
  background: #fff;
  text-align: left;
}

.benefit-grid > div .feature-icon {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  grid-row: span 2;
  border-radius: 18px;
  color: #4b2cff;
  background: #f0eaff;
}

.feature-icon.deals {
  color: #1d64e8;
  background: #e9f1ff;
}

.feature-icon.calendar {
  color: #2f8c37;
  background: #eaf8ed;
}

.feature-icon.history {
  color: #eb8a10;
  background: #fff0df;
}

.feature-icon.analytics {
  color: #4b2cff;
  background: #f0eaff;
}

.feature-icon.import {
  color: #1d64e8;
  background: #e9f1ff;
}

.benefit-grid > div strong {
  align-self: start;
  font-size: 24px;
  line-height: 1.2;
  padding-top: 18px;
}

.benefit-grid > div p {
  grid-column: 2;
  align-self: start;
  max-width: 320px;
  margin-top: 0;
  font-size: 18px;
  line-height: 1.55;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.workflow-step {
  min-height: 74px;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  color: #172238;
  font-weight: 850;
}

.workflow-step span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #4b2cff;
  background: #f0eaff;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.price-card,
.contact-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 22px;
}

.contact-card {
  grid-template-rows: 52px auto 24px minmax(72px, 1fr) auto;
  align-content: start;
  min-height: 256px;
}

.contact-card .public-outline {
  align-self: end;
}

.price-card.featured {
  border-color: rgba(75, 44, 255, 0.42);
}

.price-badge {
  position: absolute;
  top: -14px;
  left: 20px;
  right: 20px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #4b2cff;
  font-size: 13px;
  font-weight: 900;
}

.price-icon,
.contact-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #4b2cff;
  background: #f0eaff;
  font-size: 22px;
  font-weight: 900;
}

.price-icon.purple,
.contact-icon.purple {
  color: #604cff;
  background: #f0ebff;
}

.contact-icon.blue {
  color: #1683dd;
  background: #e9f3ff;
}

.contact-icon.mail {
  color: #4b2cff;
  background: #f0eaff;
}

.contact-icon.whatsapp {
  color: #1a9f5a;
  background: #e9f8ef;
}

.contact-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-icon img {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
}

.contact-icon.whatsapp img {
  width: 38px;
  height: 38px;
}

.contact-spacer {
  visibility: hidden;
}

.price-title small {
  display: block;
  margin-bottom: 8px;
  color: #172238;
  font-weight: 850;
}

.price-card > span {
  color: #172238;
  font-size: 13px;
  font-weight: 850;
}

.price-card h2 small {
  color: #64728a;
  font-size: 18px;
  font-weight: 850;
}

.price-value {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  color: #4b2cff;
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
}

.price-value.purple {
  color: #604cff;
}

.price-value span {
  color: #64728a;
  font-size: 18px;
  font-weight: 850;
}

.price-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid #e8edf5;
  list-style: none;
}

.price-card li::before {
  content: "✓";
  margin-right: 8px;
  color: #4b2cff;
  font-weight: 900;
}

.public-note-row {
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-radius: 8px;
}

.public-note-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.public-note-row > div span {
  color: #64728a;
}

.note-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.note-item span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #4b2cff;
  background: #f0eaff;
  font-weight: 900;
}

.note-item strong,
.contact-card strong {
  color: #172238;
}

.note-item p {
  margin: 2px 0 0;
}

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

.public-faq details {
  padding: 18px;
  border-radius: 8px;
}

.public-faq summary {
  cursor: pointer;
  color: #172238;
  font-weight: 850;
}

.public-faq p {
  margin: 12px 0 0;
  color: #64728a;
}

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

.contact-card a:not(.public-outline) {
  color: #4b2cff;
  font-weight: 900;
  text-decoration: none;
}

.support-panel {
  gap: 18px;
  padding: 24px;
  background: #f5f2ff;
}

@media (max-width: 980px) {
  .public-body {
    padding: 0;
  }
  .public-shell {
    border-width: 0;
    border-radius: 0;
  }
  .public-nav {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
  .public-links,
  .public-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .hero-card,
  .landing-hero,
  .benefit-grid,
  .pricing-grid,
  .contact-grid,
  .workflow-list,
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .hero-card {
    margin: 18px;
    padding: 28px 18px;
  }
  .landing-hero {
    gap: 28px;
    padding: 44px 24px 52px;
  }
  .today-card {
    justify-self: stretch;
  }
  .benefit-section,
  .pricing-grid,
  .contact-grid,
  .public-faq,
  .workflow-panel,
  .public-note-row,
  .support-panel {
    margin-right: 18px;
    margin-left: 18px;
  }
  .public-note-row,
  .support-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .public-page-title {
    padding: 30px 18px 12px;
    text-align: left;
  }
  .public-page-title p {
    font-size: 16px;
  }
  .public-links {
    gap: 14px;
  }
  .public-actions a,
  .hero-actions a,
  .contact-card .public-outline {
    width: 100%;
  }
  .mini-board {
    grid-template-columns: 1fr;
  }
  .landing-copy h1 {
    font-size: 40px;
  }
  .landing-copy p {
    font-size: 16px;
  }
  .today-card {
    padding: 22px;
  }
  .today-row {
    min-height: 76px;
    gap: 14px;
  }
  .today-row strong {
    font-size: 20px;
  }
  .today-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
  .benefit-grid > div {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 0;
  }
  .benefit-grid > div .feature-icon {
    width: 54px;
    height: 54px;
    font-size: 22px;
  }
  .benefit-grid > div .feature-icon svg {
    width: 30px;
    height: 30px;
  }
  .benefit-grid > div strong {
    font-size: 18px;
  }
  .benefit-grid > div p {
    max-width: none;
    font-size: 15px;
  }
  .price-value {
    font-size: 38px;
  }
}

@media (max-width: 1180px) {
  .analytics-head-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .analytics-head-actions .kanban-period {
    justify-content: flex-start;
  }
  .analytics-head-actions .primary {
    justify-self: end;
  }
}

.kanban-period {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 0;
  padding-bottom: 0;
}
.period-arrow {
  position: relative;
  height: 42px;
  width: 42px;
  border-radius: 10px;
  color: transparent;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0;
  font-weight: 300;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    background 0.14s ease,
    transform 0.14s ease;
}
.period-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 2.5px solid rgba(255, 255, 255, 0.9);
  border-right: 2.5px solid rgba(255, 255, 255, 0.9);
}
#kanbanPeriodPrev::before,
#analyticsPeriodPrev::before {
  transform: translate(-38%, -50%) rotate(-135deg);
}
#kanbanPeriodNext::before,
#analyticsPeriodNext::before {
  transform: translate(-62%, -50%) rotate(45deg);
}
.period-arrow:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.period-custom {
  display: flex;
  gap: 10px;
  align-items: center;
}
.period-custom label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 300;
  line-height: 1;
}
.period-custom label:first-child {
  gap: 0;
  font-size: 0;
}
.period-custom input {
  width: 178px;
  max-width: none;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  padding: 0 12px;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.035);
  background-image: none;
  font-size: 14px;
  font-weight: 300;
  line-height: 1;
  outline: 0;
  box-shadow: none;
}
.period-custom input:focus {
  border-color: rgba(255, 255, 255, 0.22);
  background-color: rgba(255, 255, 255, 0.055);
}
.period-custom input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1);
  opacity: 0.9;
}
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(165px, 1fr));
  gap: 0;
  min-height: calc(100vh - 270px);
  overflow: hidden;
  margin-top: 0;
  padding: 12px 12px 0;
  background: #fff;
}
.stage {
  min-height: 620px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0 10px;
  background: #fff;
  transition:
    background 0.12s ease,
    outline-color 0.12s ease;
}
.stage.drop-target {
  outline: 2px solid rgba(25, 185, 111, 0.55);
  outline-offset: -2px;
  background: rgba(25, 185, 111, 0.08);
}
.stage-head {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 18px;
  border-radius: 8px;
  color: #07152b;
  font-weight: 900;
  font-size: 15px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(28, 41, 84, 0.1);
}
.stage-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-head small {
  flex: 0 0 auto;
}
.stage-body {
  flex: 1;
  margin: 14px -10px 0;
  padding: 0 10px 12px;
  border-left: 1px dashed #d2dae8;
  background: rgba(238, 243, 248, 0.82);
}
.stage:last-child .stage-body {
  border-right: 1px dashed #d2dae8;
}
.stage-sum-row {
  min-height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 12px;
  padding: 0 34px;
}
.stage-sum {
  width: fit-content;
  margin: 0;
  padding: 5px 14px;
  border-radius: 8px;
  color: #111827;
  background: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(28, 41, 84, 0.08);
}
.quick-add {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 8px;
  color: #273043;
  background: transparent;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  transition:
    background 0.14s ease,
    transform 0.14s ease;
}
.quick-add:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-50%) scale(1.04);
}
.deal-card {
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(28, 41, 84, 0.12);
  cursor: grab;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
  user-select: none;
}
.deal-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(28, 41, 84, 0.2);
}
.deal-card:active {
  cursor: grabbing;
}
.deal-card.dragging {
  opacity: 0.55;
  transform: rotate(1deg);
}
.drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 24px 55px rgba(20, 30, 70, 0.28);
}
.is-dragging-deal {
  cursor: grabbing;
}
.deal-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.22;
}
.deal-meta {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
.deal-price {
  color: #202942;
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 800;
}

.list-panel {
  overflow-x: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.crm-list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}
.list-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.list-toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #687386;
  font-weight: 800;
}
.list-toolbar select {
  height: 38px;
  min-width: 220px;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  padding: 0 12px;
  color: #273043;
  background: #f8fafc;
  font: inherit;
  font-weight: 700;
  outline: 0;
}
.list-toolbar select:focus {
  border-color: #7f8be8;
  background: #fff;
}
.crm-list-table th,
.crm-list-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.crm-list-table th {
  color: #687386;
  background: #f8fafc;
  font-size: 15px;
  font-weight: 700;
}
.crm-list-table td span {
  display: block;
  margin-top: 4px;
}
.activity-table {
  table-layout: fixed;
  min-width: 1080px;
}
.activity-table th,
.activity-table td {
  vertical-align: middle;
}
.activity-table th:nth-child(1),
.activity-table td:nth-child(1) {
  width: 56px;
  text-align: center;
}
.activity-table th:nth-child(3),
.activity-table td:nth-child(3) {
  width: 150px;
}
.activity-table th:nth-child(4),
.activity-table td:nth-child(4) {
  width: 230px;
}
.activity-table th:nth-child(5),
.activity-table td:nth-child(5) {
  width: 130px;
}
.activity-table th:nth-child(6),
.activity-table td:nth-child(6) {
  width: 136px;
  padding-left: 10px;
  padding-right: 14px;
  text-align: center;
}
.activity-table td:nth-child(6) {
  vertical-align: top;
  padding-top: 20px;
}
.activity-table .link-text {
  line-height: 1.32;
}
.activity-table .badge {
  width: auto;
  min-width: 112px;
  margin-top: 0;
}
.check-cell {
  width: 46px;
}
.check-cell input {
  width: 18px;
  height: 18px;
}
.link-text {
  color: #1266b3;
}
.company-link {
  color: #1266b3;
  font-weight: 700;
  cursor: pointer;
}
.company-link:hover,
.company-link:focus {
  text-decoration: underline;
}
.muted-line {
  color: #8a94a5;
}
.stage-progress {
  width: 230px;
  max-width: 100%;
  height: 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
  border: 1px solid #bfc8d5;
  border-radius: 3px;
  background: #fff;
}
.stage-progress span {
  margin: 0;
  border-right: 1px solid #d5dbe5;
}
.stage-progress span:last-child {
  border-right: 0;
}
.stage-progress .filled {
  background: #39aee5;
}
.list-summary {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 0 24px;
  color: #5f697a;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  text-transform: uppercase;
}

.notes-head-actions {
  gap: 14px;
  margin-left: auto;
}
.notes-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  height: calc(100vh - 220px);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.notes-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-right: 1px solid #dfe6ef;
  background: #fbfcfe;
}
.notes-search {
  position: relative;
  display: block;
}
.notes-search input {
  width: 100%;
  height: 42px;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  padding: 0 38px 0 12px;
  color: #273043;
  background: #fff;
  outline: 0;
}
.notes-search span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8792a5;
}
.notes-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
}
.note-list-card {
  position: relative;
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 13px 38px 13px 14px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  color: #273043;
  background: #fff;
  text-align: left;
}
.note-list-card.active {
  border-color: #5d9df8;
  background: #f2f7ff;
  box-shadow: 0 10px 24px rgba(48, 97, 180, 0.12);
}
.note-list-card strong,
.note-list-card span,
.note-list-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-list-card strong {
  color: #202942;
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
}
.note-list-card span {
  display: -webkit-box;
  color: #4f5b70;
  font-size: 13px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.note-list-card small {
  color: #7b8497;
  font-size: 12px;
  white-space: nowrap;
}
.note-list-card em {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #7b8497;
  font-size: 12px;
  font-style: normal;
}
.notes-list-empty {
  display: grid;
  gap: 10px;
  padding: 24px 12px;
  color: #7b8497;
}
.notes-list-empty strong {
  color: #202942;
  font-size: 18px;
}
.notes-list-empty .primary {
  width: fit-content;
  height: 38px;
  padding: 0 14px;
  font-size: 14px;
}
.notes-editor-panel {
  min-width: 0;
  overflow: auto;
  background: #fff;
}
.notes-empty-state {
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 48px;
  color: #7b8497;
  text-align: center;
}
.notes-empty-state[hidden] {
  display: none;
}
.notes-empty-state h2 {
  margin: 0;
  color: #202942;
  font-size: 21px;
}
.notes-empty-state p {
  max-width: 360px;
  margin: 0;
  line-height: 1.5;
}
.notes-empty-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe6ef;
  border-radius: 16px;
  color: #8a98b4;
  background: #f7f9fd;
  font-size: 36px;
}
.note-editor {
  display: grid;
  gap: 14px;
  padding: 20px 24px 24px;
  min-height: 100%;
  align-content: start;
}
.note-editor[hidden] {
  display: none;
}
.note-editor-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e7edf5;
}
.note-back-button {
  display: none;
}
.note-editor label {
  display: grid;
  gap: 7px;
  color: #6f7b8e;
  font-size: 13px;
  font-weight: 800;
}
.note-editor label span {
  color: #9aa3b2;
  font-weight: 600;
}
.note-editor input,
.note-editor select,
.note-editor textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  color: #273043;
  background: #fff;
  font: inherit;
  font-weight: 400;
  outline: 0;
}
.note-editor input,
.note-editor select {
  height: 42px;
  padding: 0 12px;
}
.note-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rich-field {
  display: grid;
  gap: 8px;
}
.rich-label {
  color: #6f7b8e;
  font-size: 13px;
  font-weight: 800;
}
.rich-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  background: #f8fafc;
}
.rich-toolbar select {
  width: auto;
  min-width: 120px;
  height: 34px;
  border-radius: 6px;
  font-size: 13px;
}
.rich-toolbar input[type="color"] {
  width: 38px;
  height: 34px;
  padding: 3px;
  border-radius: 6px;
}
.rich-toolbar button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d7dfeb;
  border-radius: 6px;
  color: #273043;
  background: #fff;
  font-size: 14px;
  font-weight: 900;
}
.rich-toolbar button:hover {
  border-color: #9ebbf2;
  color: #1266b3;
  background: #eef6ff;
}
.rich-editor {
  min-height: 250px;
  max-height: 46vh;
  overflow-y: auto;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  padding: 16px;
  color: #273043;
  background: #fff;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  outline: 0;
}
.rich-editor:focus {
  border-color: #7f9cf5;
  box-shadow: 0 0 0 3px rgba(79, 156, 245, 0.14);
}
.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #98a3b5;
}
.rich-editor h2,
.rich-editor h3,
.rich-editor p {
  margin: 0 0 12px;
}
.rich-editor h2 {
  font-size: 24px;
  line-height: 1.25;
}
.rich-editor h3 {
  font-size: 19px;
  line-height: 1.3;
}
.rich-editor blockquote {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 4px solid #7f9cf5;
  color: #4f5b70;
  background: #f5f8ff;
}
.rich-editor ul,
.rich-editor ol {
  margin: 0 0 12px 22px;
  padding: 0;
}
.note-upload-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.note-upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.note-files {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}
.note-files h2 {
  margin: 0;
  color: #202942;
  font-size: 16px;
}
.note-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.note-image-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fafc;
}
.note-image-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: #eef3f8;
}
.note-image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.note-image-card strong,
.note-image-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-image-card strong {
  color: #273043;
  font-size: 13px;
}
.note-image-card span {
  color: #7b8497;
  font-size: 12px;
}
.note-file-delete {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #4f5868;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 900;
}
.note-file-list {
  display: grid;
  gap: 8px;
}
.note-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
}
.note-file-row .file-preview-link,
.note-file-row strong {
  min-width: 0;
  overflow: hidden;
  color: #1266b3;
  background: transparent;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-file-row span {
  color: #7b8497;
  font-size: 13px;
}
.note-file-row.pending {
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: #bfe8d3;
  background: #f1fff7;
}
.companies-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.companies-controls,
.companies-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.companies-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #687386;
  font-weight: 700;
}
.companies-controls select {
  height: 38px;
  min-width: 86px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
  font-weight: 700;
}
.companies-pager {
  color: #687386;
  font-weight: 800;
}
.table-filter {
  color: #4f5a6d;
  background: #eef3fb;
}
.table-filter:hover:not(:disabled) {
  background: #dfe9f7;
}
.table-filter:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.table-wrap,
.calendar {
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.calendar-mode {
  display: none;
}
.calendar-mode.active {
  display: block;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  color: #7a8496;
  background: #f8fafc;
  font-size: 13px;
  text-transform: uppercase;
}
td strong {
  display: block;
  margin-bottom: 3px;
}
.editable-row {
  cursor: pointer;
  transition: background 0.12s ease;
}
.editable-row:hover {
  background: #f4f8fd;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  color: #16724c;
  background: #ddf7ec;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.crm-list-table td .badge {
  display: inline-flex;
  margin-top: 0;
}
.danger-badge {
  color: #9f1d26;
  background: #ffe2e5;
}
.text-action {
  padding: 0;
  color: #1266b3;
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.section-board {
  display: grid;
  gap: 18px;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metric-card,
.dashboard-card {
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.metric-card {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 18px;
}
.metric-card span,
.metric-card small {
  color: #7b8497;
  font-weight: 700;
}
.metric-card strong {
  color: #202942;
  font-size: 28px;
  line-height: 1.05;
}
.metric-card.warning strong {
  color: #b5212b;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.dashboard-card {
  padding: 22px;
}
.dashboard-card.wide {
  grid-column: 1 / -1;
}
.dashboard-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.dashboard-card h2 {
  margin: 0;
  color: #263149;
  font-size: 21px;
}
.dashboard-card header span {
  color: #8a94a5;
  font-weight: 700;
}
.progress-row,
.funnel-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.progress-row > div:first-child,
.funnel-row > div:first-child,
.stat-line,
.settings-row,
.stage-setting {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.progress-row span,
.funnel-row span,
.stat-line span,
.settings-row span,
.stage-setting span {
  color: #7b8497;
}
.progress-track,
.funnel-track {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf2f7;
}
.progress-track span,
.funnel-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.company-analysis-list {
  display: grid;
  gap: 10px;
}
.company-analysis-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.company-analysis-row:last-child {
  border-bottom: 0;
}
.company-analysis-row > span {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: #11623f;
  background: #dcf8ec;
  font-weight: 800;
  font-size: 13px;
}
.company-analysis-row strong {
  display: block;
  color: #202942;
  font-size: 15px;
  line-height: 1.35;
}
.company-analysis-row small {
  display: block;
  margin-top: 4px;
  color: #7b8497;
  font-weight: 700;
}
.funnel-row {
  grid-template-columns: 260px 1fr;
  align-items: center;
}
.stat-line,
.settings-row,
.stage-setting {
  padding: 12px 0;
  border-bottom: 1px solid #edf1f6;
}
.stat-line:last-child,
.settings-row:last-child,
.stage-setting:last-child {
  border-bottom: 0;
}
.mini-item {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f6;
  color: #273043;
  background: transparent;
  text-align: left;
}
.mini-item:last-child {
  border-bottom: 0;
}
.mini-item span,
.empty-panel {
  color: #7b8497;
}
.settings-list {
  display: grid;
}
.save-status {
  min-width: 110px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 800;
  text-align: right;
}
.prozorro-toolbar {
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #fff;
}
.prozorro-toolbar .view-tabs {
  border-color: rgba(48, 48, 160, 0.16);
  background: rgba(48, 48, 160, 0.08);
  box-shadow: inset 0 0 0 2px rgba(48, 48, 160, 0.06);
}
.prozorro-toolbar .view-tabs button {
  color: #3030a0;
  background: rgba(48, 48, 160, 0.1);
}
.prozorro-toolbar .view-tabs button.active,
.prozorro-toolbar .view-tabs button:hover {
  color: #fff;
  background: #3030a0;
  box-shadow: none;
}
.prozorro-table td {
  vertical-align: top;
}
.prozorro-table {
  table-layout: fixed;
  min-width: 1180px;
}
.prozorro-table th:nth-child(1),
.prozorro-table td:nth-child(1) {
  width: 34%;
}
.prozorro-table th:nth-child(2),
.prozorro-table td:nth-child(2) {
  width: 18%;
}
.prozorro-table th:nth-child(3),
.prozorro-table td:nth-child(3) {
  width: 15%;
}
.prozorro-table th:nth-child(4),
.prozorro-table td:nth-child(4) {
  width: 23%;
}
.prozorro-table th:nth-child(5),
.prozorro-table td:nth-child(5) {
  width: 10%;
  white-space: nowrap;
}
.prozorro-table .company-link,
.prozorro-table strong,
.prozorro-table .muted-line {
  overflow-wrap: anywhere;
}
.prozorro-table .badge,
.prozorro-table .tender-tag {
  display: inline-flex;
}
.prozorro-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}
.tender-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  color: #0960a8;
  background: #eef6ff;
  font-size: 13px;
  font-weight: 800;
}
.muted-line {
  color: #7b8497;
  font-size: 13px;
  line-height: 1.35;
}
.company-prozorro-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.company-prozorro-panel .info-card {
  padding: 26px;
}
.company-prozorro-controls {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0 4px;
}
.company-prozorro-controls label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7b8497;
  font-weight: 800;
}
.company-prozorro-controls select {
  height: 38px;
  min-width: 240px;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  padding: 0 12px;
  color: #273043;
  background: #f8fafc;
  font: inherit;
  font-weight: 800;
}
.company-prozorro-row {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f6;
  color: #273043;
  text-decoration: none;
}
.company-prozorro-row:last-child {
  border-bottom: 0;
}
.company-prozorro-row strong {
  color: #0960a8;
  overflow-wrap: anywhere;
}
.company-prozorro-row span,
.company-prozorro-row small {
  color: #7b8497;
  font-weight: 700;
}
.company-prozorro-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 7px;
}
.company-prozorro-amount {
  color: #202942;
  font-size: 1.08em;
  font-weight: 900;
}
.company-prozorro-amount::before {
  content: "· ";
  color: #7b8497;
}
.company-prozorro-list.large {
  gap: 0;
  margin-top: 8px;
}
.company-prozorro-list.large .company-prozorro-row {
  padding: 14px 0;
}
.company-prozorro-list.large .company-prozorro-row strong {
  font-size: 17px;
  line-height: 1.25;
}
.company-prozorro-list.large .company-prozorro-row span {
  font-size: 14px;
  line-height: 1.35;
}
.company-prozorro-list.large .company-prozorro-row small {
  font-size: 13px;
  line-height: 1.35;
}
.stage-setting {
  justify-content: start;
}
.stage-setting label {
  flex: 1;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: center;
}
.stage-setting label span {
  color: #7b8497;
  font-weight: 800;
}
.stage-setting input {
  width: 100%;
  min-width: 0;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  padding: 10px 12px;
  color: #263149;
  font: inherit;
  font-weight: 800;
  background: #fff;
}
.stage-month-scope {
  flex: 0 0 190px;
  display: flex !important;
  grid-template-columns: none !important;
  justify-content: flex-start;
  gap: 8px !important;
  color: #7b8497;
  font-weight: 800;
}
.stage-month-scope input {
  width: 18px;
  height: 18px;
  padding: 0;
}
.stage-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
}
.stage-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
}
.stage-actions .save {
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
  cursor: pointer;
}
.stage-actions span {
  color: #1cae63;
  font-weight: 800;
}

.company-detail-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.15fr) minmax(260px, 1fr);
  align-items: start;
  gap: 18px;
  margin-bottom: 24px;
}
.company-detail-left-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.company-detail-title {
  min-width: 0;
  text-align: center;
}
.company-detail-head .head-actions {
  justify-content: flex-end;
}
.back-link {
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
}
.company-analysis-button {
  height: 38px;
  align-self: flex-start;
}
.company-analysis-button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
}
.company-detail-head p {
  color: rgba(255, 255, 255, 0.76);
}
.company-detail {
  display: grid;
  grid-template-columns: minmax(330px, 42%) 1fr;
  gap: 28px;
  align-items: start;
}
.company-left {
  display: grid;
  gap: 16px;
}
.info-card,
.activity-composer,
.timeline-card {
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.info-card {
  padding: 22px;
}
.info-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.info-card h2 {
  margin: 0;
  color: #5d6678;
  font-size: 14px;
  text-transform: uppercase;
}
.info-card header button {
  color: #8b94a4;
  background: transparent;
  text-transform: uppercase;
  font-weight: 700;
}
.company-fields {
  display: grid;
  gap: 16px;
  margin: 18px 0 0;
}
.company-fields div {
  display: grid;
  gap: 4px;
}
.company-fields dt {
  color: #9aa3b2;
  font-size: 13px;
}
.company-fields dd {
  margin: 0;
  color: #293244;
  font-size: 19px;
}
.timeline-wrap {
  position: relative;
  display: grid;
  gap: 18px;
}
.activity-composer {
  padding: 16px;
}
.activity-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.activity-tabs button {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  color: #6e788a;
  background: transparent;
  font-weight: 700;
}
.activity-tabs button.active {
  color: #0975df;
  background: #e8f4ff;
  box-shadow: inset 0 0 0 1px #bfe1ff;
}
.activity-composer textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
}
.activity-schedule {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.activity-schedule.active {
  display: grid;
}
.activity-schedule label {
  display: grid;
  gap: 6px;
  color: #7a8496;
}
.activity-schedule input {
  height: 40px;
  border: 1px solid #cfd7e3;
  border-radius: 6px;
  padding: 0 10px;
}
.activity-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  color: #7d8798;
}
.activity-form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.timeline {
  position: relative;
  display: grid;
  gap: 12px;
  padding-left: 58px;
}
#companyTimeline {
  display: grid;
  gap: 14px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: #dce5ef;
}
.timeline-today {
  width: fit-content;
  justify-self: center;
  margin: 0 0 4px;
  padding: 6px 24px;
  border-radius: 16px;
  color: #fff;
  background: #42a8e6;
  font-weight: 800;
}
.timeline-item {
  position: relative;
  display: block;
}
.timeline-icon {
  position: absolute;
  left: -58px;
  top: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #4aaee8;
  font-weight: 900;
  z-index: 1;
}
.timeline-item.call .timeline-icon {
  background: #8dc63f;
}
.timeline-item.task .timeline-icon {
  background: #19b96f;
}
.timeline-item.done .timeline-icon {
  background: #19b96f;
}
.timeline-item.system .timeline-icon {
  background: #b7c1ce;
}
.timeline-card {
  padding: 16px 18px;
}
.timeline-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  color: #8a94a5;
}
.timeline-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.timeline-card-head strong {
  color: #4f5868;
}
.timeline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.timeline-actions .small {
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
}
.done-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #12623f;
  background: #d8f8e6;
  font-weight: 800;
}
.timeline-item.completed .timeline-card {
  border: 1px solid rgba(25, 185, 111, 0.34);
  background: #f1fff7;
  box-shadow: 0 14px 34px rgba(25, 185, 111, 0.12);
}
.timeline-item.completed .timeline-icon {
  background: #19b96f;
}
.timeline-item.completed .timeline-card-head strong {
  color: #12623f;
}
.timeline-item.completed .timeline-card p {
  color: #203c31;
}
.timeline-item.completed .timeline-schedule {
  color: #3f6d54;
  background: #e5f8ed;
}
.timeline-card p {
  margin: 10px 0 0;
  font-size: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.timeline-schedule {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #6a5013;
  background: #fff4cf;
  font-weight: 700;
}
.timeline-empty {
  padding: 18px;
  border-radius: 8px;
  color: #778294;
  background: #fff;
}

.weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.calendar-view-tabs {
  display: flex;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}
.calendar-view-tabs button {
  height: 38px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  font-weight: 800;
}
.calendar-view-tabs button.active,
.calendar-view-tabs button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}
.weekdays span {
  display: grid;
  gap: 3px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  color: #7a8496;
  text-align: center;
  text-transform: uppercase;
  font-size: 13px;
}
.weekdays strong {
  color: #263149;
  font-size: 18px;
}
.weekdays:has(span:only-child),
.day-grid {
  grid-template-columns: 1fr;
}
.day {
  min-height: 150px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.day:nth-child(7n) {
  border-right: 0;
}
.day.today {
  background: #e8fbff;
}
.day.muted {
  color: #a2aabb;
  background: #fbfcfe;
}
.day-num {
  display: block;
  margin-bottom: 8px;
  text-align: right;
  font-weight: 700;
}
.event-pill {
  display: block;
  width: 100%;
  margin-bottom: 5px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  color: #0c4f68;
  background: #d7f4fb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.event-pill.completed {
  color: #2f6f3f;
  background: #dcfce7;
  text-decoration: line-through;
}
.event-pill strong,
.event-pill span {
  display: block;
}
.event-pill-large {
  display: grid;
  gap: 4px;
  min-height: 50px;
  padding: 10px 12px;
  font-size: 14px;
}
.event-pill-large span {
  color: rgba(12, 79, 104, 0.7);
  font-size: 12px;
}
.deal-pill {
  color: #593d00;
  background: #fff1c9;
}
.deal-pill.event-pill-large span {
  color: rgba(89, 61, 0, 0.7);
}
.week-grid .day {
  min-height: 620px;
  max-height: calc(100vh - 265px);
  overflow-y: auto;
}
.full-day {
  min-height: 620px;
  max-height: calc(100vh - 265px);
  overflow-y: auto;
}
.calendar-empty,
.day-empty-state {
  display: block;
  padding: 16px;
  border-radius: 8px;
  color: #7b8497;
  background: #f6f9fc;
  font-weight: 700;
}
.day-empty-state {
  text-align: center;
}

.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: start;
}
.profile-card {
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.profile-summary {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}
.profile-avatar {
  width: 82px;
  height: 82px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2fa7f2;
  font-size: 30px;
  font-weight: 900;
  overflow: hidden;
  line-height: 1;
}
.profile-avatar.has-image {
  background: transparent;
}
.profile-avatar.has-image img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.avatar-upload {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  color: #28324b;
  background: #f7f9fc;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.avatar-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.avatar-status {
  min-height: 16px;
  color: #7b8497;
  font-size: 12px;
}
.profile-card h2 {
  margin: 0;
  color: #263149;
}
.profile-summary p {
  margin: 0;
  color: #7b8497;
}
.logout-btn {
  height: 40px;
  margin-top: 8px;
  padding: 0 16px;
  border-radius: 8px;
  color: #9f1d26;
  background: #ffe2e5;
  font-weight: 800;
}
.logout-btn:hover {
  background: #ffd4d8;
}
.deal-files {
  display: grid;
  gap: 10px;
}
.deal-files-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7b8497;
  font-weight: 700;
}
.file-picker {
  display: inline-flex;
  align-items: center;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border-radius: 8px;
  color: #1266b3;
  background: #eaf5ff;
  cursor: pointer;
  font-weight: 800;
}
.file-picker input {
  display: none;
}
.deal-files-list {
  display: grid;
  gap: 8px;
}
.deal-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px auto auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #f8fafc;
}
.deal-file-row .file-preview-link,
.deal-file-row strong {
  min-width: 0;
  overflow: hidden;
  color: #1266b3;
  background: transparent;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deal-file-row .file-preview-link {
  padding: 0;
  font-weight: 800;
}
.deal-file-row .file-preview-link:hover {
  text-decoration: underline;
}
.deal-file-row span,
.deal-files-hint {
  color: #7b8497;
  font-size: 13px;
}
.deal-file-row > span {
  text-align: right;
}
.file-open-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #526071;
  background: #eef4fb;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.file-open-link:hover {
  color: #1266b3;
  background: #e3f1ff;
}
.deal-file-row.pending {
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: #bfe8d3;
  background: #f1fff7;
}
.file-preview-modal {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
}
.file-preview-shell {
  display: grid;
  grid-template-rows: auto minmax(520px, 78vh);
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}
.file-preview-shell .modal-head {
  padding: 18px 22px;
}
#filePreviewFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f8fafc;
}
.profile-card:not(.profile-summary) {
  grid-column: 2;
}
.profile-card header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.profile-card header span {
  color: #8a94a5;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.profile-grid label {
  display: grid;
  gap: 7px;
  color: #7a8496;
  font-size: 14px;
}
.profile-grid input,
.profile-grid select {
  height: 44px;
  width: 100%;
  border: 1px solid #cfd7e3;
  border-radius: 6px;
  padding: 0 12px;
  color: #273043;
  background: #fff;
}
.profile-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  color: #16724c;
  font-weight: 700;
}

.modal {
  width: min(760px, calc(100vw - 40px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 90px rgba(9, 18, 48, 0.34);
}
.modal::backdrop {
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(2px);
}
.modal-form {
  padding: 24px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal h2 {
  margin: 0;
  font-size: 28px;
}
.modal label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #7a8496;
  font-size: 14px;
}
.modal input,
.modal select,
.modal textarea {
  height: 44px;
  width: 100%;
  border: 1px solid #cfd7e3;
  border-radius: 6px;
  padding: 0 12px;
  color: #273043;
  background: #fff;
}
.modal textarea {
  min-height: 104px;
  padding: 12px;
  resize: vertical;
  font: inherit;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.contact-editor {
  margin-bottom: 14px;
}
.contact-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #7a8496;
  font-size: 14px;
  font-weight: 700;
}
.contact-list {
  display: grid;
  gap: 10px;
}
.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr 38px;
  gap: 10px;
  align-items: end;
}
.contact-row label {
  margin-bottom: 0;
}
.contact-remove {
  height: 44px;
  border: 1px solid #cfd7e3;
  color: #ef4444;
  background: #fff;
}
.small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}
.deal-date-grid {
  grid-template-columns: 1fr 1fr;
}
.event-company-info {
  margin: 4px 0 16px;
  padding: 14px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fafc;
}
.event-company-info h3 {
  margin: 0 0 10px;
  color: #273043;
  font-size: 16px;
}
.event-company-name {
  color: #273043;
  font-weight: 800;
}
.event-contact-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: #4b5565;
}
.event-company-line,
.event-company-notes {
  margin-top: 8px;
  color: #647084;
}
.event-company-notes {
  padding-top: 8px;
  border-top: 1px solid #e5eaf1;
}
menu {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 22px -24px -24px;
  padding: 16px 24px;
  background: #f6f8fb;
}
.deal-menu {
  justify-content: space-between;
}
.event-menu {
  justify-content: space-between;
}
.event-status-actions {
  display: flex;
  gap: 10px;
}
.modal-actions {
  display: flex;
  gap: 12px;
}
.ghost,
.save {
  height: 44px;
  padding: 0 24px;
  border-radius: 6px;
  font-weight: 800;
}
.ghost {
  background: transparent;
  color: #5e6778;
}
.save {
  background: #b7f000;
  color: #284000;
}

.confirm-popover {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(2px);
}
.confirm-popover[hidden] {
  display: none;
}
.confirm-card {
  width: min(520px, 100%);
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(9, 18, 48, 0.34);
}
.confirm-card h2 {
  margin: 0 0 12px;
  color: #202942;
  font-size: 24px;
}
.confirm-card p {
  margin: 0;
  color: #4f5868;
  font-size: 16px;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.toast-stack {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 120;
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 16px 16px 15px;
  border: 1px solid #ffd2d7;
  border-left: 5px solid #ef4444;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(28, 41, 84, 0.22);
  pointer-events: auto;
  animation: toast-in 0.18s ease-out;
}
.toast strong {
  display: block;
  margin-bottom: 5px;
  color: #202942;
  font-size: 15px;
  font-weight: 900;
}
.toast p {
  margin: 0;
  color: #5e6778;
  font-size: 14px;
  line-height: 1.35;
}
.toast button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  color: #7b8497;
  background: #f1f5f9;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.toast button:hover {
  color: #202942;
  background: #e7edf6;
}
.toast.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.form-alert {
  padding: 12px 14px;
  border: 1px solid #ffd2d7;
  border-left: 5px solid #ef4444;
  border-radius: 8px;
  color: #9f1239;
  background: #fff5f6;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}
.form-alert[hidden] {
  display: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-tab,
.view-tabs button,
.filter,
.primary,
.danger,
.done,
.period-arrow,
.period-custom label,
.period-custom input,
.stage-head,
.stage-sum,
.quick-add,
.badge,
.done-badge,
.calendar-view-tabs button,
.list-toolbar label,
.list-toolbar select,
.table-filter {
  font-weight: 300;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }
  .topbar,
  .page-head {
    align-items: stretch;
    flex-direction: column;
    height: auto;
  }
  .company-detail-head {
    align-items: stretch;
    flex-direction: column;
  }
  .topbar {
    padding: 12px;
  }
  .top-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .top-tabs,
  .view-tabs,
  .head-actions,
  .companies-toolbar,
  .period-custom {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .top-tabs::-webkit-scrollbar,
  .view-tabs::-webkit-scrollbar,
  .head-actions::-webkit-scrollbar,
  .companies-toolbar::-webkit-scrollbar,
  .period-custom::-webkit-scrollbar {
    display: none;
  }
  .companies-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .companies-controls,
  .companies-pager {
    justify-content: space-between;
  }
  .top-tab,
  .view-tabs button,
  .filter,
  .primary {
    flex: 0 0 auto;
  }
  .top-actions {
    width: 100%;
  }
  .page {
    padding: 20px 12px;
  }
  .filter {
    color: #445064;
    background: rgba(255, 255, 255, 0.78);
  }
  .kanban-period {
    justify-content: flex-start;
    min-width: 0;
  }
  .period-custom {
    width: 100%;
  }
  .search {
    width: 100%;
  }
  .pipeline {
    grid-template-columns: 1fr;
  }
  .stage {
    min-height: 260px;
  }
  .company-detail {
    grid-template-columns: 1fr;
  }
  .profile-layout,
  .profile-card:not(.profile-summary),
  .profile-grid,
  .metric-row,
  .dashboard-grid,
  .funnel-row {
    grid-template-columns: 1fr;
    grid-column: auto;
  }
  .profile-summary {
    position: static;
  }
  .timeline {
    padding-left: 0;
  }
  .timeline::before {
    display: none;
  }
  .timeline-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }
  .timeline-icon {
    position: static;
  }
  .timeline-card-head {
    grid-template-columns: 1fr;
  }
  .timeline-actions {
    justify-content: flex-start;
  }
  .activity-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .activity-form-buttons {
    justify-content: stretch;
  }
  .activity-form-buttons button {
    width: 100%;
  }
  .activity-schedule {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }
  body {
    font-size: 14px;
  }
  .workspace {
    background: linear-gradient(180deg, #3030a0 0, #3030a0 430px, #eef3f8 430px);
  }
  .topbar {
    gap: 12px;
    padding: 14px 12px;
  }
  .top-main {
    width: 100%;
    gap: 12px;
  }
  .top-brand {
    height: 36px;
    font-size: 22px;
  }
  .top-brand img {
    width: 32px;
    height: 32px;
  }
  .top-tabs {
    width: 100%;
    gap: 6px;
    padding-bottom: 2px;
  }
  .top-tab {
    height: 38px;
    padding: 0 14px;
    font-size: 15px;
    white-space: nowrap;
  }
  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .search {
    height: 40px;
    min-width: 0;
  }
  .avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
  .page {
    padding: 24px 12px;
  }
  .page-head,
  .company-detail-head {
    display: grid;
    gap: 16px;
    min-height: 150px;
    margin-bottom: 18px;
    align-content: start;
  }
  .page-head h1,
  .company-detail-head h1 {
    margin-bottom: 8px;
    font-size: 30px;
    overflow-wrap: anywhere;
  }
  .page-head p,
  .company-detail-head p {
    max-width: 34ch;
    font-size: 14px;
    line-height: 1.35;
  }
  .head-actions {
    width: 100%;
    align-items: center;
    flex-wrap: wrap;
    overflow: visible;
  }
  .head-actions > .primary {
    margin-left: auto;
  }
  .deals-head-actions,
  .analytics-head-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .deals-head-actions .primary,
  .analytics-head-actions .primary {
    justify-self: end;
    width: auto;
    margin-left: 0;
  }
  .view-tabs {
    width: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
  .view-tabs button,
  .calendar-view-tabs button {
    min-width: 0;
    padding: 0 12px;
    white-space: nowrap;
  }
  .kanban-period {
    width: 100%;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: center;
    justify-content: stretch;
  }
  .period-arrow {
    width: 42px;
    height: 42px;
  }
  .period-custom {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    overflow: visible;
  }
  .period-custom label,
  .period-custom label:first-child {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    font-size: 13px;
  }
  .period-custom input {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
    font-size: 13px;
  }
  #kanbanView {
    overflow: hidden;
    border-radius: 8px;
  }
  .pipeline {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 10px;
    overflow: visible;
  }
  .stage {
    min-height: auto;
    padding: 0;
  }
  .stage + .stage {
    margin-top: 14px;
  }
  .stage-body {
    min-height: 170px;
    margin: 10px 0 14px;
    padding: 0 10px 12px;
    border-right: 1px dashed #d2dae8;
  }
  .stage-head {
    height: 38px;
    padding: 0 14px;
    font-size: 15px;
  }
  .stage-sum-row {
    min-height: 46px;
    margin: 8px 0 10px;
  }
  .deal-card {
    padding: 12px;
  }
  .table-wrap,
  .list-panel,
  .calendar {
    width: 100%;
    overflow-x: auto;
  }
  .table-wrap table {
    min-width: 760px;
  }
  .crm-list-table {
    min-width: 760px;
  }
  .companies-toolbar {
    gap: 12px;
    padding: 12px;
  }
  .companies-controls,
  .companies-pager {
    width: 100%;
    flex-wrap: nowrap;
  }
  #companiesPage .head-actions,
  .company-detail-head .head-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  #companiesPage .head-actions button,
  .company-detail-head .head-actions button {
    width: 100%;
  }
  .weekdays,
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 0;
  }
  .day,
  .event-pill {
    min-width: 0;
  }
  .event-pill {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .day {
    min-height: 122px;
    padding: 8px;
  }
  .week-grid .day,
  .full-day {
    min-height: 420px;
    max-height: none;
  }
  .calendar-view-tabs {
    flex: 1 1 100%;
  }
  .profile-layout {
    gap: 14px;
  }
  .profile-card,
  .info-card,
  .activity-composer,
  .timeline-card,
  .dashboard-card,
  .metric-card {
    padding: 18px;
  }
  .profile-card header,
  .dashboard-card header,
  .info-card header {
    align-items: flex-start;
    flex-direction: column;
  }
  .profile-actions,
  .confirm-actions,
  menu,
  .deal-menu,
  .event-menu,
  .modal-actions,
  .event-status-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .profile-actions .primary,
  menu button,
  .modal-actions button,
  .event-status-actions button {
    width: 100%;
  }
  .company-detail {
    gap: 16px;
  }
  .company-fields dd {
    font-size: 17px;
    overflow-wrap: anywhere;
  }
  .timeline-item {
    grid-template-columns: 34px 1fr;
    gap: 10px;
  }
  .timeline-icon {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
  .timeline-card p {
    font-size: 15px;
  }
  .modal {
    width: calc(100vw - 20px);
  }
  .modal-form {
    padding: 18px;
  }
  .modal h2 {
    font-size: 22px;
  }
  .contact-row,
  .deal-file-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .notes-head-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .notes-filters {
    width: 100%;
  }
  .notes-layout {
    grid-template-columns: 1fr;
    height: calc(100vh - 260px);
    min-height: 560px;
  }
  .notes-list-panel {
    border-right: 0;
  }
  .notes-layout.editing-note .notes-list-panel {
    display: none;
  }
  .notes-editor-panel {
    min-height: 0;
  }
  .note-editor-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .note-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .note-editor-actions > * {
    flex: 1 1 160px;
  }
  .note-link-grid,
  .note-file-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #notesPage {
    padding-left: 12px;
    padding-right: 12px;
  }
  .notes-head .page-head,
  .notes-head-actions {
    gap: 10px;
  }
  .notes-filters {
    grid-auto-columns: minmax(0, 1fr);
  }
  .notes-filters button {
    padding: 0 8px;
    font-size: 12px;
  }
  .notes-layout {
    border-radius: 8px;
  }
  .note-editor {
    padding: 14px;
  }
  .rich-editor {
    min-height: 180px;
  }
  .note-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
