:root {
  --primary: #7565bd;
  --primary-dark: #54459b;
  --primary-soft: #f2effd;
  --bg: #f8f8fc;
  --card: #ffffff;
  --text: #222734;
  --muted: #747b8a;
  --line: #eceef5;
  --line-strong: #e2e4ee;
  --green: #1f9769;
  --green-soft: #e8f7f0;
  --amber: #cf8028;
  --amber-soft: #fff7e7;
  --shadow: 0 18px 46px -28px rgba(18, 23, 38, 0.34);
}

/* Telegram inbox */
.telegram-inbox-workspace { min-width: 0; height: 100vh; overflow: hidden; }
.telegram-inbox-header { height: 104px; padding: 20px 30px; display:flex; align-items:center; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); }
.telegram-inbox-header h1 { margin:4px 0 0; font-size:32px; }
.telegram-inbox-header-actions { display:flex; gap:10px; }
.telegram-inbox-layout { display:grid; grid-template-columns:minmax(280px, 340px) minmax(380px, 1fr) minmax(260px, 320px); height:calc(100vh - 104px); background:#fff; }
.telegram-dialogs-pane, .telegram-chat-pane, .telegram-context-pane { min-width:0; min-height:0; }
.telegram-dialogs-pane { display:flex; flex-direction:column; border-right:1px solid var(--line); }
.telegram-inbox-search { margin:16px 16px 10px; width:auto; }
.telegram-inbox-filters { margin:0 16px 12px; overflow-x:auto; flex:0 0 auto; }
.telegram-inbox-filters button { padding:8px 11px; white-space:nowrap; }
.telegram-dialog-list { overflow-y:auto; flex:1; }
.telegram-dialog-row { width:100%; display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:10px; align-items:center; padding:14px 16px; border:0; border-top:1px solid var(--line); background:#fff; color:var(--text); text-align:left; cursor:pointer; }
.telegram-dialog-row:hover, .telegram-dialog-row.active { background:#f7f5ff; }
.telegram-dialog-row.unread { background:#faf8ff; }
.telegram-dialog-copy { min-width:0; display:grid; gap:4px; }
.telegram-dialog-title { display:flex; justify-content:space-between; gap:8px; min-width:0; }
.telegram-dialog-title strong, .telegram-dialog-preview { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.telegram-dialog-title time, .telegram-dialog-preview { color:var(--muted); font-size:12px; }
.telegram-dialog-badges { display:flex; gap:5px; }
.telegram-dialog-badges em { font-style:normal; font-size:10px; font-weight:800; color:#5f4db0; background:#eee9ff; padding:2px 6px; border-radius:99px; }
.telegram-dialog-badges em.warning { color:#9b5f17; background:#fff1d5; }
.telegram-dialog-badges em.attention { color:#9b4c1c; background:#ffeadc; }
.telegram-unread-badge { min-width:22px; height:22px; display:grid; place-items:center; border-radius:99px; color:#fff; background:var(--primary); font-size:11px; }
.telegram-load-more { margin:10px 16px 16px; }
.telegram-chat-pane { display:flex; flex-direction:column; background:#f8f8fc; }
.telegram-chat-header { height:74px; flex:0 0 auto; padding:13px 20px; display:flex; align-items:center; gap:12px; border-bottom:1px solid var(--line); background:#fff; }
.telegram-chat-header div { display:grid; gap:2px; }
.telegram-chat-header small { color:var(--muted); }
.telegram-mobile-back { display:none; border:0; background:transparent; font-size:24px; }
.telegram-message-list { flex:1; overflow-y:auto; padding:24px; display:flex; flex-direction:column; gap:10px; }
.telegram-message { max-width:min(76%, 660px); padding:11px 14px 8px; border-radius:18px 18px 18px 5px; background:#fff; box-shadow:0 5px 18px -16px rgba(20,25,40,.8); }
.telegram-message.outgoing { align-self:flex-end; border-radius:18px 18px 5px 18px; color:#33296d; background:#e9e3ff; }
.telegram-message p { margin:0; line-height:1.42; overflow-wrap:anywhere; }
.telegram-message small { display:block; margin-top:5px; color:var(--muted); text-align:right; font-size:10px; }
.telegram-reply-form { flex:0 0 auto; display:flex; align-items:flex-end; gap:10px; padding:14px 18px; border-top:1px solid var(--line); background:#fff; }
.telegram-reply-form textarea { flex:1; min-height:48px; max-height:140px; resize:vertical; border:1px solid var(--line-strong); border-radius:16px; padding:13px 15px; font:inherit; }
.telegram-context-pane { overflow-y:auto; padding:16px; border-left:1px solid var(--line); background:#fff; }
.telegram-context-card { display:grid; gap:9px; padding:18px; margin-bottom:12px; border:1px solid var(--line); border-radius:19px; }
.telegram-context-card.warning { border-color:#f0d9a7; background:#fffbf3; }
.telegram-context-card.recognition { border-color:#d9d0ff; background:#f8f6ff; }
.telegram-context-card.recognition.unlinked { border-color:#f0d9a7; background:#fffbf3; }
.telegram-context-card.recognition.possible_new_deal,
.telegram-context-card.recognition.student_repeat_interest { border-color:#f2c49e; background:#fff8f1; }
.telegram-context-card h2, .telegram-context-card h3, .telegram-context-card p { margin:0; }
.telegram-context-card p, .telegram-empty-context p { color:var(--muted); }
.telegram-context-label { color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.telegram-context-deals { display:grid; gap:8px; }
.telegram-context-deals a { display:grid; gap:3px; padding:11px; border-radius:13px; color:var(--text); background:#f8f8fc; text-decoration:none; }
.telegram-context-deals small { color:var(--muted); }
.telegram-empty-chat { margin:auto; padding:30px; text-align:center; color:var(--muted); }
.telegram-empty-chat span { font-size:50px; color:var(--primary); }
.telegram-empty-chat h2 { margin:12px 0 5px; color:var(--text); }
.telegram-empty-chat p { margin:0; }
.telegram-empty-context { padding:14px 4px; }

@media (max-width: 1100px) {
  .telegram-inbox-layout { grid-template-columns:300px minmax(360px,1fr); }
  .telegram-context-pane { display:none; }
}

@media (max-width: 760px) {
  .telegram-inbox-workspace { height:auto; min-height:100vh; overflow:visible; }
  .telegram-inbox-header { height:auto; padding:16px; align-items:flex-start; }
  .telegram-inbox-header-actions { flex-direction:column; }
  .telegram-inbox-layout { display:block; height:calc(100vh - 110px); }
  .telegram-dialogs-pane { height:100%; border-right:0; }
  .telegram-chat-pane { display:none; position:fixed; inset:0; z-index:30; }
  body.telegram-chat-open .telegram-chat-pane { display:flex; }
  .telegram-mobile-back { display:block; }
  .telegram-message { max-width:88%; }
}

/* Telegram identity review */
.telegram-links-workspace {
  min-width: 0;
  padding-bottom: 48px;
}

.telegram-links-heading {
  align-items: center;
}

.telegram-links-heading .deals-title p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
}

.telegram-broadcast-link {
  text-decoration: none;
}

.telegram-link-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 38px 18px;
}

.telegram-link-summary article {
  display: grid;
  gap: 4px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.telegram-link-summary span,
.telegram-link-summary small {
  color: var(--muted);
}

.telegram-link-summary strong {
  font-size: 34px;
  color: var(--text);
}

.telegram-link-panel {
  margin: 0 38px;
  padding: 0;
  overflow: hidden;
}

.telegram-link-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.telegram-link-search {
  width: min(360px, 100%);
}

.telegram-link-progress {
  padding: 12px 22px;
  color: var(--muted);
  background: #faf9ff;
}

.telegram-link-list {
  display: grid;
}

.telegram-link-item {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(360px, 1.5fr) auto;
  gap: 20px;
  align-items: center;
  padding: 20px 22px;
  border-top: 1px solid var(--line);
}

.telegram-link-item:first-child {
  border-top: 0;
}

.telegram-dialog-person {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.telegram-dialog-person > div,
.telegram-candidate-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.telegram-dialog-person strong,
.telegram-dialog-person small,
.telegram-dialog-person time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-dialog-person small,
.telegram-dialog-person time,
.telegram-candidate small,
.telegram-no-candidate small {
  color: var(--muted);
}

.telegram-dialog-person time {
  font-size: 12px;
}

.telegram-candidate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #dcd4f7;
  border-radius: 18px;
  background: #faf8ff;
}

.telegram-candidate.conflict {
  border-color: #efd8a7;
  background: #fffaf0;
}

.telegram-confidence {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  color: #5f4db0;
  background: #eee9ff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.telegram-candidate.conflict .telegram-confidence {
  color: #946017;
  background: #fff0ce;
}

.telegram-candidate p {
  margin: 3px 0 0;
  color: #585f71;
  font-size: 13px;
}

.telegram-candidate-deals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.telegram-candidate-deals a {
  max-width: 260px;
  padding: 4px 8px;
  overflow: hidden;
  border-radius: 8px;
  color: #315f9f;
  background: #edf5ff;
  font-size: 12px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-no-candidate {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px dashed #d7d9e4;
  border-radius: 18px;
  background: #fbfbfd;
}

.telegram-contact-picker .modal-card {
  width: min(680px, calc(100vw - 30px));
}

.telegram-link-actions {
  display: grid;
  gap: 7px;
  align-content: center;
}

.telegram-create-contact .modal-card {
  width: min(620px, calc(100vw - 28px));
}

.telegram-create-contact select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.telegram-create-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  line-height: 1.45;
}

.telegram-contact-results {
  display: grid;
  gap: 8px;
  min-height: 80px;
  max-height: 430px;
  overflow: auto;
}

.telegram-contact-results > small {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.telegram-contact-results button {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.telegram-contact-results button:hover {
  border-color: var(--primary);
  background: #faf8ff;
}

.telegram-contact-results button span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.telegram-contact-results button small {
  color: var(--muted);
}

.telegram-contact-results button em {
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 980px) {
  .telegram-link-summary {
    grid-template-columns: 1fr;
    padding: 0 18px 14px;
  }

  .telegram-link-panel {
    margin: 0 18px;
  }

  .telegram-link-toolbar,
  .telegram-links-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .telegram-link-item {
    grid-template-columns: 1fr;
  }

  .telegram-link-search {
    width: 100%;
  }
}

.telegram-chat-card {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  padding: 22px;
  min-height: 360px;
}

.telegram-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.telegram-chat-header h2 {
  margin: 3px 0 0;
}

.telegram-kicker {
  color: #229ed9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.telegram-chat-header select {
  width: auto;
  max-width: 240px;
  padding: 10px 14px;
}

.telegram-chat-state {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #242838;
}

.telegram-chat-state span {
  color: #7a8193;
  font-size: 13px;
  line-height: 1.45;
}

.telegram-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 9px;
}

.telegram-chat-search {
  position: relative;
}

.telegram-chat-search input {
  width: 100%;
}

.telegram-chat-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid #e2e4ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(34, 39, 61, .15);
}

.telegram-chat-suggestions:empty {
  display: none;
}

.telegram-chat-suggestions button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #f0f1f5;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.telegram-chat-suggestions button:hover {
  background: #f8f6ff;
}

.telegram-chat-suggestions span,
.telegram-search-empty {
  color: #858b9b;
  font-size: 12px;
}

.telegram-search-empty {
  padding: 12px;
}

.telegram-message-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 160px;
  max-height: 430px;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid #e8e9f2;
  border-radius: 18px;
  background: #f7f8fc;
}

.telegram-message {
  align-self: flex-start;
  max-width: 82%;
  padding: 10px 13px 8px;
  border-radius: 16px 16px 16px 5px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(37, 43, 65, .06);
}

.telegram-message.outgoing {
  align-self: flex-end;
  border-radius: 16px 16px 5px;
  background: #ebe6ff;
}

.telegram-message.failed {
  background: #fff0f0;
}

.telegram-message p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.telegram-message small {
  display: block;
  margin-top: 5px;
  color: #8a90a0;
  font-size: 11px;
  text-align: right;
}

.telegram-empty {
  margin: auto;
  color: #8a90a0;
  font-size: 14px;
}

.telegram-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
}

.telegram-composer textarea {
  min-height: 52px;
  max-height: 150px;
  resize: vertical;
}

/* Student learning workspace */
.student-list-card { margin: 0 32px 32px; }
.student-list { display: grid; gap: 10px; }
.student-row { display: grid; grid-template-columns: 48px minmax(240px,1fr) auto auto 170px; gap: 16px; align-items: center; padding: 16px; color: inherit; text-decoration: none; border: 1px solid var(--border-color, #e8e9ef); border-radius: 16px; }
.student-row:hover { border-color: #cfc6f5; background: #faf9ff; }
.student-row p,.compact-record p,.learning-track p,.learning-assignment p { margin: 5px 0 0; color: #707687; }
.student-avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: #eeeaff; color: #55449f; font-weight: 800; font-size: 18px; }
.review-due { color: #b34b35; font-weight: 700; }
.student-workspace { padding-bottom: 40px; }
.student-hero { display: flex; align-items: center; gap: 18px; padding: 28px 32px 20px; }
.student-hero > div { flex: 1; }
.student-hero h1 { margin: 4px 0; }
.student-hero p { margin: 0; color: #74798a; }
.student-dashboard { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(290px,.8fr); gap: 20px; padding: 0 32px; }
.student-main,.student-side { display: grid; align-content: start; gap: 20px; }
.student-profile-card { background: linear-gradient(145deg,#fff 40%,#f7f3ff); }
.student-map { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.student-map > div { padding: 14px; border: 1px solid #e9e5f5; border-radius: 14px; background: rgba(255,255,255,.76); }
.student-map small { color: #77708c; font-weight: 700; }
.student-map p { margin: 7px 0 0; white-space: pre-wrap; }
.student-summary { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid #ebe7f4; white-space: pre-wrap; }
.learning-track,.learning-assignment { display: grid; grid-template-columns: 1fr 220px; align-items: center; gap: 18px; padding: 15px 0; border-top: 1px solid #ececf1; }
.learning-track:first-child,.learning-assignment:first-child { border-top: 0; }
.learning-track label,.learning-assignment label { font-size: 12px; color: #777; }
.learning-track select,.learning-assignment select { width: 100%; margin-top: 5px; }
.learning-assignment strong { display: block; margin-top: 9px; }
.feedback { padding: 9px 11px; background: #f4f1ff; border-radius: 9px; color: #514587 !important; }
.compact-record { padding: 12px 0; border-top: 1px solid #ececf1; }
.compact-record:first-child { border-top: 0; }
.compact-record strong,.compact-record span { display: block; }
.compact-record span { margin-top: 5px; color: #777d8d; font-size: 13px; }
.metric-progress-table { overflow-x: auto; }
.metric-progress-head,.metric-progress-row { display: grid; grid-template-columns: minmax(210px,1.4fr) repeat(var(--metric-columns),minmax(100px,1fr)); gap: 12px; align-items: center; min-width: 600px; padding: 11px 0; border-bottom: 1px solid #ececf1; }
.metric-progress-head { color: #777d8d; font-size: 12px; }
.metric-progress-row > strong { font-size: 14px; }
.metric-score span { display: block; font-weight: 800; color: #514587; }
.metric-score i { display: block; width: 100%; height: 6px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #ece8f8; }
.metric-score i::after { content: ""; display: block; width: var(--score); height: 100%; border-radius: inherit; background: linear-gradient(90deg,#8574d4,#5d4daf); }
@media (max-width: 900px) {
  .student-dashboard { grid-template-columns: 1fr; padding: 0 18px; }
  .student-row { grid-template-columns: 44px 1fr; }
  .student-row > span { grid-column: 2; }
  .student-map,.learning-track,.learning-assignment { grid-template-columns: 1fr; }
  .student-list-card { margin: 0 18px 24px; }
}

/* Simplified student timeline */
.student-page {
  background:
    radial-gradient(circle at 88% 4%, rgba(132, 112, 214, .12), transparent 28%),
    #f7f7fb;
}

.student-timeline-workspace {
  min-width: 0;
  padding-bottom: 130px;
}

.student-simple-header {
  position: sticky;
  z-index: 12;
  top: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 230px;
  gap: 18px;
  align-items: center;
  padding: 22px max(28px, calc((100vw - 1080px) / 2));
  border-bottom: 1px solid rgba(224, 224, 234, .9);
  background: rgba(247, 247, 251, .88);
  backdrop-filter: blur(18px);
}

.student-round-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #dedee9;
  border-radius: 15px;
  background: #fff;
  color: #454554;
  text-decoration: none;
  font-size: 21px;
}

.student-person {
  display: flex;
  min-width: 0;
  gap: 14px;
  align-items: center;
}

.student-person-avatar {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 19px;
  background: linear-gradient(145deg, #7866cc, #a18fe4);
  color: #fff;
  box-shadow: 0 9px 22px rgba(104, 85, 187, .23);
  font-weight: 800;
}

.student-person h1 {
  overflow: hidden;
  margin: 2px 0 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.035em;
}

.student-person p {
  overflow: hidden;
  margin: 0;
  color: #797b8d;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.student-status-control {
  display: grid;
  gap: 4px;
}

.student-status-control span {
  padding-left: 2px;
  color: #8c8e9e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.student-status-control select {
  width: 100%;
  border-color: #dedee9;
  border-radius: 13px;
  background: #fff;
  font-weight: 700;
}

.student-header-actions {
  display: flex;
  gap: 10px;
  align-items: end;
}

.student-task-button {
  display: grid;
  min-height: 44px;
  padding: 0 15px;
  place-items: center;
  border: 1px solid rgba(117, 101, 189, .28);
  border-radius: 13px;
  background: #fff;
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.student-task-button:hover {
  background: var(--primary-soft);
}

.student-stream-shell {
  width: min(860px, calc(100% - 42px));
  margin: 30px auto 0;
}

.student-pinned-section {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid #e2dcf6;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(246, 243, 255, .95), rgba(255, 255, 255, .96));
}

.student-pinned-section > header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #6656ad;
  font-size: 13px;
  font-weight: 800;
}

.student-pinned-section > header small {
  color: #9b95b6;
  font-weight: 600;
}

.student-pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.student-pinned-grid .stream-entry {
  margin: 0;
  padding: 15px;
  border-radius: 16px;
  box-shadow: none;
}

.student-pinned-grid .request-progress-table {
  max-height: 190px;
}

.student-stream-section {
  position: relative;
}

.student-stream-heading {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.student-stream-heading h2 {
  margin: 0 0 4px;
  font-size: 23px;
  letter-spacing: -.025em;
}

.student-stream-heading p {
  margin: 0;
  color: #888a99;
  font-size: 14px;
}

.student-secondary-button,
.student-inline-action {
  border: 1px solid #dcd7ef;
  border-radius: 13px;
  background: #fff;
  color: #5e4ca8;
  font-weight: 750;
}

.student-secondary-button {
  padding: 11px 15px;
  white-space: nowrap;
}

.student-stream {
  position: relative;
  padding-left: 26px;
}

.student-stream::before {
  position: absolute;
  top: 7px;
  bottom: 14px;
  left: 7px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(#d5cfec, #eeeaf8);
  content: "";
}

.stream-entry {
  position: relative;
  margin-bottom: 16px;
  padding: 20px 22px;
  border: 1px solid #e5e5ed;
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 9px 26px rgba(52, 47, 75, .055);
}

.stream-entry::before {
  position: absolute;
  top: 25px;
  left: -25px;
  width: 10px;
  height: 10px;
  border: 3px solid #f7f7fb;
  border-radius: 50%;
  background: #a69bd3;
  content: "";
}

.stream-entry > header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.entry-type-label {
  color: #6a5ab0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.stream-entry time {
  color: #9a9ba8;
  font-size: 12px;
}

.stream-entry h3 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -.025em;
}

.stream-entry > p {
  margin: 0;
  color: #3f414d;
  line-height: 1.62;
}

.observation-entry {
  width: min(680px, 100%);
}

.request-entry {
  border-color: #ddd6f4;
  background: linear-gradient(155deg, #fff 58%, #faf8ff);
}

.request-entry::before {
  background: #6f5fc1;
}

.request-context {
  margin-bottom: 16px !important;
  color: #727483 !important;
}

.request-progress-table {
  overflow-x: auto;
  margin: 12px -4px 0;
}

.request-progress-head,
.request-progress-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(var(--score-columns), minmax(78px, .65fr));
  min-width: 420px;
  gap: 10px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid #ece9f5;
}

.request-progress-head {
  color: #8a869d;
  font-size: 11px;
}

.request-progress-row > span {
  color: #363743;
  cursor: pointer;
  line-height: 1.35;
}

.request-progress-row > i {
  color: #b4b1c0;
  text-align: center;
  font-style: normal;
}

.request-score {
  width: 52px;
  min-height: 36px;
  margin: 0 auto;
  border: 0;
  border-radius: 11px;
  background: #eeeafd;
  color: #5949a2;
  font-weight: 850;
}

.request-score:hover {
  background: #ded7fb;
}

.measurement-heading {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.measurement-heading button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #bbb6c8;
  font-size: 16px;
  line-height: 1;
}

.add-measurement-button {
  margin-top: 14px;
  padding: 9px 12px;
  border: 0;
  border-radius: 11px;
  background: #f1eefc;
  color: #5b4aa5;
  font-weight: 750;
}

.entry-actions {
  display: flex;
  gap: 13px;
  margin-top: 16px;
  opacity: .35;
  transition: opacity .2s ease;
}

.stream-entry:hover .entry-actions {
  opacity: 1;
}

.entry-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #777887;
  font-size: 12px;
}

.entry-actions .danger-text {
  color: #b45f5f;
}

.stream-system-entry {
  position: relative;
  display: grid;
  grid-template-columns: 115px 12px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  margin-bottom: 5px;
  color: #858695;
  font-size: 13px;
}

.stream-system-entry time {
  text-align: right;
  font-size: 11px;
}

.stream-system-entry span {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  border: 3px solid #f7f7fb;
  border-radius: 50%;
  background: #c1bbd8;
}

.stream-system-entry p {
  margin: 0;
}

.student-stream-empty {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  color: #888a98;
  text-align: center;
}

.student-stream-empty span {
  margin-bottom: 10px;
  color: #8c7bd2;
  font-size: 30px;
}

.student-stream-empty p {
  margin: 5px 0;
}

.student-composer {
  position: fixed;
  z-index: 20;
  right: max(22px, calc((100vw - 980px) / 2));
  bottom: 22px;
  left: max(112px, calc((100vw - 900px) / 2));
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  align-items: end;
  padding: 10px 10px 10px 17px;
  border: 1px solid #dddce8;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 50px rgba(43, 39, 62, .16);
  backdrop-filter: blur(18px);
}

.student-composer textarea {
  min-height: 38px;
  max-height: 150px;
  padding: 9px 0;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  line-height: 1.4;
}

.student-composer button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: #6f5cc5;
  color: #fff;
  font-size: 23px;
  font-weight: 800;
}

.request-items-editor {
  display: grid;
  gap: 9px;
  margin: 15px 0 10px;
}

.request-item-editor {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 80px 32px;
  gap: 8px;
  align-items: center;
}

.request-item-editor > span {
  color: #9693a7;
  text-align: center;
  font-size: 12px;
}

.request-item-editor button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a3a0ad;
  font-size: 20px;
}

.student-inline-action {
  justify-self: start;
  padding: 9px 12px;
}

.measurement-fields {
  display: grid;
  gap: 11px;
}

.measurement-fields label {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 15px;
  align-items: center;
}

.measurement-fields label span {
  line-height: 1.35;
}

@media (max-width: 760px) {
  .student-simple-header {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 14px 16px;
  }

  .student-person-avatar {
    display: none;
  }

  .student-header-actions {
    grid-column: 2;
    align-items: end;
  }

  .student-status-control {
    width: 150px;
  }

  .student-stream-shell {
    width: min(100% - 24px, 860px);
    margin-top: 18px;
  }

  .student-stream-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-stream {
    padding-left: 20px;
  }

  .stream-entry {
    padding: 17px;
  }

  .stream-entry::before {
    left: -19px;
  }

  .stream-system-entry {
    grid-template-columns: 10px 1fr;
    padding-left: 0;
  }

  .stream-system-entry time {
    display: none;
  }

  .student-composer {
    right: 12px;
    bottom: 12px;
    left: 84px;
  }

  .entry-actions {
    opacity: 1;
  }

  .request-item-editor {
    grid-template-columns: 22px minmax(0, 1fr) 68px 26px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.public-form-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(117, 101, 189, 0.16), transparent 28%),
    linear-gradient(135deg, #f7f5ff 0%, #ffffff 46%, #f4f7fb 100%);
}

.pre-enroll-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.pre-enroll-card {
  display: grid;
  gap: 24px;
  width: min(100%, 560px);
  padding: 34px;
  border: 1px solid rgba(117, 101, 189, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 34px 100px -48px rgba(18, 23, 38, 0.45);
  backdrop-filter: blur(18px);
}

.pre-enroll-heading {
  display: grid;
  gap: 10px;
}

.pre-enroll-heading span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.pre-enroll-heading h1 {
  margin: 0;
  font-size: clamp(32px, 7vw, 54px);
  line-height: 0.98;
}

.pre-enroll-heading p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.pre-enroll-form {
  display: grid;
  gap: 16px;
}

.pre-enroll-form label {
  display: grid;
  gap: 8px;
  color: #6f7685;
  font-size: 14px;
  font-weight: 800;
}

.pre-enroll-form input,
.pre-enroll-form textarea {
  width: 100%;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid rgba(117, 101, 189, 0.22);
  border-radius: 14px;
  background: #fbfbff;
  color: var(--text);
  outline: none;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
}

.pre-enroll-form textarea {
  resize: vertical;
}

.pre-enroll-form input:focus,
.pre-enroll-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(117, 101, 189, 0.12);
}

.pre-enroll-result {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.pre-enroll-result.success {
  background: var(--green-soft);
  color: #1f7f5a;
}

.pre-enroll-result.error {
  background: #fff0f2;
  color: #bd3347;
}

.pre-enroll-success {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(31, 151, 105, 0.16);
  border-radius: 22px;
  background: linear-gradient(135deg, #f2fbf7, #ffffff);
}

.pre-enroll-success[hidden] {
  display: none;
}

.pre-enroll-success-icon {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(31, 151, 105, 0.2);
}

.pre-enroll-success-icon::after {
  position: absolute;
  top: 14px;
  left: 18px;
  width: 13px;
  height: 22px;
  border-right: 4px solid var(--green);
  border-bottom: 4px solid var(--green);
  content: "";
  transform: rotate(42deg);
}

.pre-enroll-success h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.pre-enroll-success p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.app-shell {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 22px 8px;
  background: var(--primary);
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
}

.nav {
  display: grid;
  gap: 12px;
  width: 100%;
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 5px;
  width: 68px;
  height: 70px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.nav-item span {
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}

.nav-item small {
  max-width: 60px;
  overflow: hidden;
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.logout-item {
  margin-top: 10px;
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 18%, rgba(117, 101, 189, 0.16), transparent 30%),
    var(--bg);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  display: grid;
  gap: 28px;
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  font-weight: 850;
}

.login-brand h1 {
  margin: 0 0 4px;
  font-size: 26px;
}

.login-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-form input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fafafd;
  color: var(--text);
  outline: none;
}

.form-error {
  margin: 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff0f2;
  color: #bd3347;
  font-size: 13px;
  font-weight: 700;
}

.workspace {
  min-width: 0;
}

.page-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 34px 0;
}

.back-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 28px -24px rgba(18, 23, 38, 0.34);
}

.deals-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 34px 0;
}

.deals-title {
  min-width: 180px;
}

.deals-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.pipeline-pill,
.icon-button {
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  color: var(--primary-dark);
  font-weight: 750;
}

.pipeline-pill {
  min-width: 156px;
  padding: 0 16px;
}

.search-box {
  display: grid;
  grid-template-columns: 22px minmax(160px, 260px);
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  color: var(--muted);
}

.search-box input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.search-box input::placeholder {
  color: #a3a8b5;
}

.icon-button {
  display: grid;
  width: 44px;
  place-items: center;
  color: var(--muted);
  font-size: 18px;
}

.segment-control {
  display: flex;
  height: 44px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
}

.segment-control button {
  min-width: 92px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.segment-control button.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.create-deal-button {
  min-width: 164px;
  height: 44px;
}

.final-stages-button {
  min-width: 44px;
  padding: 0;
  font-size: 17px;
}

.final-stages-button.active {
  border-color: rgba(117, 101, 189, 0.28);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.deals-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 300px;
  grid-template-columns: none;
  gap: 16px;
  padding: 22px 34px 34px;
  overflow-x: auto;
}

.contacts-workspace {
  display: grid;
  align-content: start;
  gap: 20px;
}

.contacts-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
  padding: 0 34px;
}

.tasks-page .contacts-summary {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.summary-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 32px -28px rgba(18, 23, 38, 0.34);
}

.summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.summary-card strong {
  font-size: 28px;
  line-height: 1;
}

.contact-search-filter {
  position: relative;
  width: min(440px, 38vw);
  min-width: 300px;
}

.contact-search-filter[hidden],
.contacts-filter-panel[hidden] {
  display: none;
}

.contact-search-filter-bar {
  display: grid;
  grid-template-columns: 22px minmax(120px, 1fr) auto;
  align-items: center;
  height: 44px;
  padding-left: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  color: var(--muted);
}

.contact-search-filter-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(117, 101, 189, 0.12);
}

.contact-search-filter-bar input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.contact-search-filter-bar input::placeholder {
  color: #a3a8b5;
}

.contact-search-filter-bar > button {
  align-self: stretch;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 14px 14px 0;
  background: transparent;
  color: var(--primary-strong);
  font-weight: 800;
}

.contacts-filter-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 9px);
  right: 0;
  width: min(620px, calc(100vw - 48px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px -28px rgba(29, 25, 56, 0.42);
}

.contacts-filter-heading,
.contacts-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.contacts-filter-heading {
  margin-bottom: 16px;
}

.contacts-filter-heading > div {
  display: grid;
  gap: 3px;
}

.contacts-filter-heading > div > span,
.contact-filter-chips > span {
  color: var(--muted);
  font-size: 12px;
}

.contacts-filter-heading > button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: #f5f3fb;
  color: var(--muted);
  font-size: 20px;
}

.contacts-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contacts-filter-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.contacts-filter-grid label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.contacts-filter-grid select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #f8f7fc;
  color: var(--text);
  font-weight: 750;
}

.contact-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 29px;
  margin: 14px 0;
}

.contact-filter-chips > button {
  padding: 6px 9px;
  border: 0;
  border-radius: 999px;
  background: #eeeafd;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 800;
}

.contacts-filter-footer {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.filter-reset-button {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.filter-result-count {
  align-self: center;
  min-width: 105px;
  color: var(--primary-strong);
  font-size: 12px;
  text-align: right;
}

.contacts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  padding: 0 34px 34px;
}

.company-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.78fr);
  gap: 22px;
  padding: 22px 34px 34px;
}

.company-main {
  display: grid;
  align-content: start;
  gap: 18px;
}

.dashboard-workspace {
  display: grid;
  align-content: start;
  gap: 22px;
  padding-bottom: 34px;
}

.dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 34px 0;
}

.dashboard-actions {
  display: flex;
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 16px;
  padding: 0 34px;
}

.dashboard-widget {
  display: grid;
  min-height: 144px;
  align-content: space-between;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.dashboard-link-widget {
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-link-widget:hover {
  border-color: rgba(117, 101, 189, 0.34);
  box-shadow: 0 22px 56px -34px rgba(18, 23, 38, 0.44);
  transform: translateY(-1px);
}

.dashboard-widget button,
.dashboard-widget a {
  color: inherit;
}

.dashboard-widget p a {
  color: var(--primary-dark);
  text-decoration: none;
}

.quality-widget {
  cursor: pointer;
  text-align: left;
}

.quality-widget.active {
  border-color: rgba(117, 101, 189, 0.44);
  background: var(--primary-soft);
}

.dashboard-widget span,
.dashboard-widget p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-widget strong {
  font-size: 42px;
  line-height: 1;
}

.dashboard-widget.danger strong {
  color: #bd3347;
}

.dashboard-widget.calm strong {
  color: var(--green);
}

.dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  padding: 0 34px;
}

.dashboard-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
}

.dashboard-events {
  display: grid;
  gap: 10px;
}

.dashboard-event {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 82px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafd;
  color: var(--text);
  text-decoration: none;
}

.dashboard-event span,
.dashboard-event small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-event strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-create {
  min-height: 250px;
}

.quick-actions {
  display: grid;
  gap: 12px;
}

.quick-action-button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fafafd;
  color: var(--primary-dark);
  font-weight: 850;
  text-decoration: none;
}

.quick-action-button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.tasks-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  padding: 0 34px 34px;
}

.tasks-list-card,
.task-detail {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.tasks-filter-bar {
  display: flex;
  justify-content: space-between;
}

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

.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 92px;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fafafd;
  color: var(--text);
  text-align: left;
}

.task-row.active {
  border-color: rgba(117, 101, 189, 0.42);
  background: var(--primary-soft);
}

.task-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-row-main strong,
.task-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row-main strong {
  font-size: 14px;
}

.task-row-main small,
.task-row-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-row-meta.danger {
  color: #bd3347;
}

.task-detail {
  position: sticky;
  top: 24px;
}

.task-detail-head {
  display: grid;
  gap: 12px;
}

.task-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-detail-head h2 {
  font-size: 24px;
}

.task-detail-head p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.tasks-kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr)) minmax(260px, 1fr);
  gap: 16px;
  padding: 0 34px 34px;
}

.task-column,
.task-subcolumn {
  display: grid;
  align-content: start;
  gap: 10px;
}

.task-column {
  min-width: 0;
}

.task-column.focused > header,
.task-subcolumn.focused > header {
  border-bottom-color: var(--primary);
}

.task-column.focused {
  border-radius: 18px;
  outline: 2px solid rgba(117, 101, 189, 0.22);
  outline-offset: 8px;
}

.task-column.split {
  gap: 42px;
}

.task-column header,
.task-subcolumn header {
  display: grid;
  gap: 8px;
  min-height: 76px;
  align-content: end;
  padding: 0 0 10px;
  border-bottom: 3px solid var(--line-strong);
  text-align: center;
}

.task-column.danger header {
  border-bottom-color: #ef6b78;
}

.task-column.planning header {
  border-bottom-color: #d3a551;
}

.task-column.success header {
  border-bottom-color: #68c39a;
}

.task-column h2,
.task-subcolumn h2 {
  color: #3e4350;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.task-column header strong,
.task-subcolumn header strong {
  color: var(--muted);
  font-size: 21px;
  font-weight: 500;
}

.task-column-dropzone {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 130px;
  padding: 2px;
  border-radius: 16px;
}

.task-column-dropzone.drag-over {
  background: var(--primary-soft);
  outline: 2px dashed rgba(117, 101, 189, 0.38);
}

.task-kanban-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 8px;
  min-height: 126px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 16px 34px -30px rgba(18, 23, 38, 0.42);
}

.task-kanban-card.dragging {
  opacity: 0.58;
}

.task-card-main {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.task-card-main span,
.task-card-main small,
.task-card-main strong,
.task-card-main i {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card-main strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.task-card-main .task-context-label {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.task-card-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-card-main small.danger {
  color: #ef6b78;
}

.task-card-main .task-source-label {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
}

.task-card-actions {
  display: grid;
  gap: 8px;
  align-content: end;
  justify-items: center;
}

.task-card-edit {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #f7f8fb;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.task-card-edit:hover {
  border-color: rgba(117, 101, 189, 0.28);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.task-origin-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

#taskPriorityField[hidden],
#taskOriginNote[hidden] {
  display: none !important;
}

.task-card-done {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(117, 101, 189, 0.24);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

.task-empty-state {
  display: grid;
  min-height: 90px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.show-more-button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  font-weight: 750;
}

.change-log-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 34px 34px;
}

.change-log-summary {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.change-log-summary h2 {
  font-size: 22px;
  line-height: 1.15;
}

.change-log-summary p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.change-log-list {
  display: grid;
  gap: 14px;
}

.change-log-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.change-log-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.change-log-card header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.change-log-card header strong {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
}

.change-log-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.plans-list-card {
  display: grid;
  gap: 16px;
  margin: 0 34px 34px;
  padding: 20px;
}

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

.plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafd;
}

.plan-card-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.plan-card-main header,
.plan-meta,
.plan-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-card-main header {
  justify-content: space-between;
}

.plan-card-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-card-main p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.plan-card-main p.muted {
  color: #9aa1ad;
}

.plan-meta {
  flex-wrap: wrap;
}

.plan-meta time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.plan-status,
.priority {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.plan-status.idea {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.plan-status.in_progress {
  background: #e8f7f0;
  color: #1f9769;
}

.plan-status.paused {
  background: var(--amber-soft);
  color: var(--amber);
}

.plan-status.done {
  background: #edf1f7;
  color: var(--muted);
}

.priority.low {
  background: #edf1f7;
  color: var(--muted);
}

.priority.medium {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.priority.high {
  background: #fff0f2;
  color: #bd3347;
}

.plan-card-actions {
  justify-content: end;
}

.data-quality-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.data-quality-list-card {
  display: grid;
  gap: 16px;
  margin: 0 34px 34px;
  padding: 20px;
}

.quality-deal-list {
  display: grid;
  gap: 10px;
}

.quality-deal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafafd;
  color: var(--text);
  text-decoration: none;
}

.quality-deal-row div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.quality-deal-row strong,
.quality-deal-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-deal-row strong {
  font-size: 14px;
}

.quality-row-title {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-row-action {
  flex: none;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.quality-deal-row span,
.quality-deal-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.quality-deal-row small {
  flex: none;
  color: var(--primary-dark);
}

.quality-deal-row.compact {
  min-height: 58px;
  border-radius: 14px;
  background: #fff;
}

.quality-duplicate-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fafafd;
}

.quality-duplicate-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}

.quality-duplicate-group header strong {
  color: var(--text);
  font-size: 13px;
}

.quality-duplicate-group header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.quality-duplicate-group > div {
  display: grid;
  gap: 8px;
}

.company-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
  gap: 22px;
  padding: 24px;
}

.company-title-button {
  margin-top: 10px;
  text-align: left;
}

.company-hero p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.company-quick-fields {
  display: grid;
  gap: 10px;
  align-content: start;
}

.quick-field {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafd;
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.quick-field-button {
  cursor: pointer;
}

.quick-field-button:hover {
  border-color: rgba(117, 101, 189, 0.34);
  background: var(--primary-soft);
}

.quick-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-field strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.quick-field input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(117, 101, 189, 0.32);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.quick-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(117, 101, 189, 0.12);
}

.company-section {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.company-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

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

.linked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.linked-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.linked-item span,
.linked-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.linked-item-clickable:hover {
  border-color: rgba(117, 101, 189, 0.38);
  background: var(--primary-soft);
}

.contacts-list-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 620px;
  padding: 18px;
}

.contacts-list-head,
.contact-row {
  display: grid;
  gap: 12px;
  align-items: center;
}

.contacts-grid-contacts {
  grid-template-columns:
    minmax(150px, 1.1fr)
    minmax(170px, 1.25fr)
    minmax(120px, .9fr)
    minmax(90px, .65fr)
    minmax(135px, .85fr);
}

.contacts-grid-companies,
.contacts-grid-all {
  grid-template-columns: minmax(180px, 1.2fr) minmax(190px, 1.25fr) minmax(150px, 1fr);
}

.contacts-list-head {
  padding: 0 12px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.contacts-list {
  display: grid;
  gap: 8px;
}

.contacts-pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.pagination-info {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.pagination-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.pagination-button {
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.pagination-button:hover:not(:disabled),
.pagination-button.active {
  border-color: rgba(117, 101, 189, 0.45);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.pagination-button:disabled {
  cursor: default;
  color: var(--muted);
  opacity: 0.5;
}

.pagination-gap {
  display: inline-grid;
  width: 24px;
  height: 36px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.contact-row {
  width: 100%;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.contact-row:hover,
.contact-row.active {
  border-color: rgba(117, 101, 189, 0.38);
  background: var(--primary-soft);
}

.contact-row strong {
  display: grid;
  gap: 3px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-row strong small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-status-select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid #ded9f2;
  border-radius: 11px;
  outline: 0;
  background: #f3f0fd;
  color: #5b4aa5;
  font-size: 12px;
  font-weight: 800;
}

.student-status-select.none {
  background: #fff;
  color: var(--muted);
}

.student-status-select.active {
  border-color: #cce9dc;
  background: #ebf8f2;
  color: #21815d;
}

.student-status-select.paused {
  border-color: #f0dfbd;
  background: #fff7e8;
  color: #9a6b18;
}

.student-status-select.completed {
  border-color: #dddce6;
  background: #f5f5f8;
  color: #666879;
}

.contact-detail {
  position: sticky;
  top: 24px;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 420px;
  padding: 22px;
}

.contact-detail-head {
  display: grid;
  gap: 16px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-detail-head h2 {
  margin: 12px 0 6px;
  font-size: 24px;
}

.contact-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.detail-fields {
  display: grid;
  gap: 10px;
}

.detail-field {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.detail-field strong {
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.contact-telegram {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dfe9f2;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #f5fbff);
}

.contact-telegram-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.telegram-logo {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: #229ed9;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.contact-telegram-head div,
.contact-telegram-status div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.contact-telegram-head small,
.contact-telegram-status small,
.contact-telegram-chat small {
  color: #7d8493;
  font-size: 12px;
  line-height: 1.4;
}

.contact-telegram-username {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.contact-telegram-username label {
  display: grid;
  gap: 5px;
}

.contact-telegram-username label span {
  color: #7d8493;
  font-size: 11px;
  font-weight: 750;
}

.contact-telegram-status {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 13px;
  border-radius: 15px;
  background: #f4f5f8;
}

.telegram-status-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: #9298a7;
}

.contact-telegram-status.linked {
  background: #eaf8f2;
}

.contact-telegram-status.linked .telegram-status-dot {
  background: #1f9769;
}

.contact-telegram-status.found {
  background: #fff7e7;
}

.contact-telegram-status.found .telegram-status-dot {
  background: #cf8028;
}

.contact-telegram-actions {
  display: flex !important;
  grid-column: 2;
  flex-wrap: wrap;
  gap: 8px !important;
  align-items: center;
}

.contact-telegram-search {
  position: relative;
  display: grid;
  gap: 7px;
}

.contact-telegram-results {
  overflow: hidden;
  border: 1px solid #e3e6ee;
  border-radius: 14px;
  background: #fff;
}

.contact-telegram-results > small {
  display: block;
  padding: 11px 12px;
  color: #858b9b;
}

.contact-telegram-results button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid #eff0f4;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.contact-telegram-results button:hover {
  background: #f6fbfe;
}

.contact-telegram-results button span {
  display: grid;
  gap: 3px;
}

.contact-telegram-results button small {
  color: #858b9b;
}

.contact-telegram-results button em {
  color: #229ed9;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.contact-telegram-chat {
  display: grid;
  gap: 10px;
}

.contact-telegram-chat > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.contact-telegram-chat > header div {
  display: grid;
  gap: 2px;
}

.contact-telegram-chat select {
  width: auto;
  max-width: 220px;
}

.contact-telegram-message-list {
  min-height: 120px;
  max-height: 330px;
}

.contact-telegram-error {
  padding: 15px;
  border-radius: 14px;
  background: #fff0f0;
  color: #9f3c3c;
}

.task-completion-form {
  gap: 18px;
}

.task-completion-form .modal-header p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.plus-badge.success {
  border-color: #9fd8c3;
  background: #e8f7f0;
  color: #1f9769;
}

.task-completion-form > label:not(.task-follow-up-toggle) {
  display: grid;
  gap: 7px;
  color: #73798a;
  font-size: 13px;
  font-weight: 750;
}

.task-result-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.task-result-presets button {
  padding: 8px 11px;
  border: 1px solid #dedeea;
  border-radius: 999px;
  background: #fff;
  color: #5f6473;
  cursor: pointer;
  font-weight: 700;
}

.task-result-presets button:hover {
  border-color: #bdb2e7;
  background: #f7f4ff;
  color: var(--primary-dark);
}

.task-follow-up-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f6f5fb;
  color: #343847;
  cursor: pointer;
  font-weight: 750;
}

.task-follow-up-toggle input {
  width: 18px;
  height: 18px;
}

.task-follow-up-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(150px, .7fr);
  gap: 10px;
}

.task-follow-up-fields[hidden] {
  display: none !important;
}

.task-follow-up-fields label {
  display: grid;
  gap: 6px;
  color: #73798a;
  font-size: 12px;
  font-weight: 750;
}

.task-completion-form .modal-actions {
  flex-wrap: wrap;
}

@media (max-width: 620px) {
  .task-follow-up-fields {
    grid-template-columns: 1fr;
  }
}

.student-telegram-slot {
  margin-bottom: 24px;
}

.student-telegram-slot .contact-telegram {
  box-shadow: 0 16px 38px -30px rgba(34, 158, 217, .45);
}

@media (max-width: 620px) {
  .contact-telegram-username,
  .telegram-composer {
    grid-template-columns: 1fr;
  }
}

.detail-link {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.outline-button.small {
  width: max-content;
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.inline-link-button {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.deal-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 620px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.deal-column.drop-target {
  border-color: rgba(117, 101, 189, 0.72);
  background: rgba(117, 101, 189, 0.08);
  box-shadow: inset 0 0 0 1px rgba(117, 101, 189, 0.16);
}

.deal-column-header {
  display: grid;
  gap: 5px;
  padding-bottom: 4px;
}

.deal-column h2,
.deal-column-header h2 {
  font-size: 15px;
}

.deal-column-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.deal-column-dropzone {
  display: grid;
  gap: 7px;
  min-height: 460px;
  align-content: start;
}

.deal-drag-actions {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 70;
  display: flex;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.deal-drag-actions.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.deal-drag-action {
  display: grid;
  place-items: center;
  min-width: 128px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 18px 42px -26px rgba(18, 23, 38, 0.42);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.deal-drag-action.success {
  border-color: rgba(42, 166, 116, 0.26);
  background: #edf9f3;
  color: #227f5b;
}

.deal-drag-action.failed {
  border-color: rgba(222, 151, 52, 0.3);
  background: #fff7e8;
  color: #b76a1f;
}

.deal-drag-action.delete {
  min-width: 92px;
  border-color: rgba(220, 74, 101, 0.3);
  background: #fff0f3;
  color: #bd334e;
}

.trash-icon {
  position: relative;
  width: 19px;
  height: 20px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 5px 5px;
}

.trash-icon::before,
.trash-icon::after {
  position: absolute;
  content: "";
  left: 50%;
  transform: translateX(-50%);
  background: currentColor;
}

.trash-icon::before {
  top: -7px;
  width: 25px;
  height: 2px;
  border-radius: 999px;
}

.trash-icon::after {
  top: -11px;
  width: 10px;
  height: 2px;
  border-radius: 999px;
}

.deal-drag-action.drop-target {
  border-color: currentColor;
  box-shadow: 0 22px 54px -24px rgba(18, 23, 38, 0.48);
  transform: translateY(-4px);
}

.deal-drag-action.disabled {
  opacity: 0.45;
}

.deal-card-preview {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 10px 22px -22px rgba(18, 23, 38, 0.34);
  cursor: grab;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.deal-card-preview:hover {
  border-color: rgba(117, 101, 189, 0.34);
  box-shadow: 0 16px 34px -24px rgba(18, 23, 38, 0.42);
  transform: translateY(-1px);
}

.deal-card-preview.dragging {
  opacity: 0.48;
  cursor: grabbing;
}

.deal-card-preview strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-card-preview span,
.deal-card-preview small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.deal-card-preview .deal-card-money {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.deal-card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.deal-card-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-card-line.compact {
  justify-content: flex-start;
}

.deal-card-tags {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px;
}

.deal-card-tags span,
.deal-card-tags small {
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.task-indicator {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 850;
}

.task-indicator.empty {
  border: 1px solid #f0c47d;
  background: var(--amber-soft);
  color: #a66019;
}

.task-indicator.danger {
  background: #fff0f2;
  color: #bd3347;
}

.task-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.task-badge.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.mini-task-link {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.breadcrumbs {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.pipeline-select-wrap,
.deal-filter-wrap {
  position: relative;
}

.deal-filter-button {
  min-width: 168px;
  padding: 0 14px;
}

.pipeline-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  width: 260px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px -30px rgba(18, 23, 38, 0.42);
  backdrop-filter: blur(12px);
}

.pipeline-menu[hidden] {
  display: none;
}

.pipeline-menu-item {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
}

.pipeline-menu-item:hover,
.pipeline-menu-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.pipeline-menu-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.empty-board {
  display: grid;
  min-height: 360px;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
}

h2 {
  font-size: 20px;
  line-height: 1.15;
}

.deal-layout {
  display: grid;
  grid-template-columns: minmax(520px, 620px) minmax(560px, 1fr);
  gap: 28px;
  min-height: calc(100vh - 92px);
  padding: 22px 34px 34px;
}

.left-column,
.right-column {
  min-width: 0;
}

.left-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.card {
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.deal-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.editable-title {
  min-width: 0;
}

.editable-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.title-display span:first-child {
  overflow-wrap: anywhere;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.15;
}

.pill-display {
  min-height: 100%;
}

.edit-mark {
  color: var(--muted);
  font-size: 13px;
}

.inline-edit-form {
  display: grid;
  gap: 10px;
  width: 100%;
}

.inline-edit-form input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(117, 101, 189, 0.34);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
  font: inherit;
  font-weight: 750;
}

.title-inline-edit input {
  height: 48px;
  font-size: 22px;
  font-weight: 800;
}

.inline-edit-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(117, 101, 189, 0.12);
}

.inline-edit-actions {
  display: flex;
  gap: 8px;
}

.mini-save-button,
.mini-cancel-button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.mini-save-button {
  border: 0;
  background: var(--primary);
  color: #fff;
}

.mini-cancel-button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
}

.stage-control {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fafafd;
  text-align: left;
}

.stage-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 700;
}

.stage-copy span {
  white-space: nowrap;
}

.stage-line {
  --progress: 32%;
  position: relative;
  display: block;
  height: 26px;
}

.stage-line::before,
.stage-line::after {
  position: absolute;
  top: 11px;
  left: 0;
  height: 5px;
  border-radius: 999px;
  content: "";
}

.stage-line::before {
  right: 0;
  background: #e4e0f4;
}

.stage-line::after {
  width: var(--progress);
  background: var(--primary);
}

.stage-line i {
  position: absolute;
  top: 5px;
  z-index: 1;
  width: 17px;
  height: 17px;
  transform: translateX(-50%);
  border: 3px solid #fafafd;
  border-radius: 50%;
  background: #dcd7f1;
  box-shadow: 0 0 0 1px #dcd7f1;
}

.stage-line i.done,
.stage-line i.current {
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.stage-line i.current {
  width: 21px;
  height: 21px;
  top: 3px;
  box-shadow: 0 8px 20px -8px rgba(117, 101, 189, 0.9), 0 0 0 1px var(--primary);
}

.deal-fields {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
}

.field-pill {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--text);
  text-align: left;
}

.field-pill small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.field-pill strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-payment-summary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.net-profit-button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.entity-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deal-payments-list {
  display: grid;
  gap: 8px;
}

.payment-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.payment-row.planned {
  border-style: dashed;
}

.payment-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.payment-state {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-delete-button {
  border: 0;
  background: transparent;
  color: #b94b5c;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.payment-source-lock {
  color: var(--muted);
  font-size: 12px;
}

.field-pill .inline-edit-form {
  gap: 8px;
}

.field-pill .inline-edit-actions {
  justify-content: flex-end;
}

.tags-field {
  grid-column: 1 / -1;
}

.tags-display {
  display: grid;
  width: 100%;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.deal-tags-list {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.deal-tags-list i,
.deal-tags-list em {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.deal-tags-list em {
  color: var(--muted);
}

.tags-inline-edit input {
  width: 100%;
}

.new-deal-field {
  display: grid;
  gap: 8px;
}

.new-deal-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.new-deal-field input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(117, 101, 189, 0.32);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  outline: none;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
}

.new-deal-field.compact input {
  height: 38px;
  font-size: 15px;
}

.new-deal-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(117, 101, 189, 0.12);
}

.new-deal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}

.entity-section {
  display: grid;
  gap: 10px;
}

.entity-section h2 {
  padding-left: 2px;
  font-size: 18px;
}

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

.deal-tasks-list {
  display: grid;
  gap: 10px;
}

.deal-meetings-list {
  display: grid;
  gap: 10px;
}

.deal-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.deal-task-row.overdue {
  border-color: rgba(207, 128, 40, 0.28);
  background: var(--amber-soft);
}

.deal-task-row.done {
  opacity: 0.66;
}

.deal-task-row strong,
.deal-task-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-task-row strong {
  font-size: 13px;
}

.deal-task-row span,
.deal-task-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.deal-task-row button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.deal-meeting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(117, 101, 189, 0.18);
  border-radius: 14px;
  background: #fbfaff;
}

.deal-meeting-row strong,
.deal-meeting-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-meeting-row strong {
  font-size: 13px;
}

.deal-meeting-row span,
.deal-meeting-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.deal-meeting-row small {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.deal-meeting-row small.danger {
  background: #fff0f3;
  color: #bd334e;
}

.inline-note-link {
  display: inline-block;
  margin-left: 6px;
  color: var(--primary-dark);
  font-weight: 800;
}

.entity-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 30px -24px rgba(18, 23, 38, 0.34);
}

.entity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.entity-head strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.entity-head span {
  color: var(--muted);
}

.entity-fields {
  display: grid;
  gap: 8px;
}

.entity-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.mini-edit-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 750;
}

.entity-field {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  font-size: 13px;
  line-height: 1.35;
}

.entity-field dt {
  color: var(--muted);
  font-weight: 600;
}

.entity-field dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.empty-note {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  font-size: 14px;
}

.action-stack {
  display: grid;
  gap: 12px;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary-button,
.outline-button,
.ghost-button {
  min-height: 42px;
  border-radius: 13px;
  font-weight: 750;
}

.primary-button {
  border: 0;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 28px -18px rgba(84, 69, 155, 0.8);
}

.primary-button.wide {
  min-height: 54px;
  font-size: 15px;
}

.outline-button.wide {
  min-height: 52px;
  padding: 0 20px;
  font-size: 15px;
}

.outline-button,
.ghost-button {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--primary-dark);
}

.ghost-button {
  padding: 0 18px;
  color: var(--text);
}

.timeline-card {
  position: sticky;
  top: 24px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 116px);
  min-height: 720px;
  padding: 24px 28px;
  overflow: hidden;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
}

.timeline-header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.soft-chip {
  flex: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 750;
}

.timeline-list {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 2px 4px 126px 0;
}

.timeline-event {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
}

.event-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.event-body {
  display: grid;
  gap: 6px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.event-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.event-head strong {
  font-size: 14px;
}

.event-head time {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.event-body p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
}

.comment-composer {
  position: absolute;
  right: 28px;
  bottom: 24px;
  left: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(226, 228, 238, 0.86);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 50px -30px rgba(18, 23, 38, 0.48);
  backdrop-filter: blur(10px);
}

.comment-composer input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: #fafafd;
  color: var(--text);
  outline: none;
}

.comment-composer input:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(117, 101, 189, 0.12);
}

.modal {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
}

.modal.compact {
  width: min(520px, calc(100vw - 32px));
}

#stagePickerModal.modal.compact {
  width: min(760px, calc(100vw - 32px));
}

.modal::backdrop {
  background: rgba(28, 31, 42, 0.32);
  backdrop-filter: blur(6px);
}

.modal-card {
  display: grid;
  gap: 16px;
  max-height: min(820px, calc(100vh - 44px));
  overflow: auto;
  padding: 26px 28px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 32px 90px -38px rgba(18, 23, 38, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-header h2 {
  margin: 0;
}

.modal-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.plus-badge {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--primary);
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 28px;
  font-weight: 300;
}

.plus-badge.danger {
  border-color: rgba(220, 74, 101, 0.42);
  background: #fff0f3;
  color: #bd334e;
  font-size: 24px;
  font-weight: 850;
}

.confirm-modal .modal-header {
  align-items: flex-start;
}

.confirm-modal h2 {
  margin-bottom: 6px;
}

.confirm-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.stage-picker {
  display: grid;
  grid-template-columns: minmax(220px, 0.84fr) minmax(260px, 1fr);
  gap: 14px;
}

.picker-column,
.option-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.picker-column h3 {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafafd;
  color: var(--text);
  text-align: left;
}

.picker-option:hover {
  border-color: rgba(117, 101, 189, 0.36);
  background: var(--primary-soft);
}

.picker-option.active {
  border-color: rgba(117, 101, 189, 0.54);
  background: var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgba(117, 101, 189, 0.08);
}

.picker-option span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-option small {
  flex: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid label {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.form-grid .checkbox-field {
  grid-template-columns: 150px auto minmax(0, 1fr);
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.checkbox-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fafafd;
  color: var(--text);
  outline: none;
}

.contact-search-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.contact-suggestions {
  display: grid;
  max-height: 144px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 18px 42px -28px rgba(18, 23, 38, 0.42);
}

.contact-suggestion {
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.contact-suggestion:hover,
.contact-suggestion.active {
  background: var(--primary-soft);
}

.contact-suggestion strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-suggestion small,
.contact-suggestion-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.contact-suggestion-empty {
  padding: 10px;
}

.form-grid textarea {
  min-height: 72px;
  resize: vertical;
}

.voice-workspace {
  display: grid;
  align-content: start;
  gap: 22px;
  padding-bottom: 34px;
}

.voice-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 34px 0;
}

.voice-status {
  min-height: 42px;
  padding: 11px 14px;
  border: 1px solid rgba(117, 101, 189, 0.18);
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.voice-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1fr);
  gap: 18px;
  padding: 0 34px 34px;
}

.voice-recorder,
.voice-result {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
}

.voice-recorder .section-header,
.voice-result .section-header {
  align-items: flex-start;
}

.voice-recorder .section-header p,
.voice-result .section-header p {
  max-width: 640px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.voice-target {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.voice-target select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fafafd;
  color: var(--text);
  outline: none;
}

.voice-prompt {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafafd;
}

.voice-prompt span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.voice-prompt strong {
  font-size: 18px;
  line-height: 1.35;
}

.voice-prompt .outline-button {
  justify-self: start;
  padding: 0 14px;
}

.record-pad {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 13px;
  padding: 24px;
  border: 1px solid rgba(226, 228, 238, 0.9);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(242, 239, 253, 0.52)),
    #fff;
  text-align: center;
}

.record-core {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border-radius: 50%;
  background: rgba(117, 101, 189, 0.12);
}

.record-core span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 18px 34px -20px rgba(84, 69, 155, 0.9);
}

.record-pad.recording .record-core {
  animation: voicePulse 1.25s ease-in-out infinite;
}

.record-pad strong {
  font-size: 24px;
}

.record-pad small {
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

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

.voice-actions button {
  padding: 0 14px;
}

.voice-player {
  width: 100%;
}

.voice-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 13px;
  background: #fff0f2;
  color: #bd3347;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.empty-result {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.empty-result strong {
  color: var(--text);
  font-size: 22px;
}

.empty-result span {
  max-width: 390px;
  font-size: 14px;
  line-height: 1.45;
}

.voice-analysis {
  display: grid;
  gap: 18px;
}

.primary-emotion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  padding: 20px;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.primary-emotion span {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.primary-emotion strong {
  min-width: 0;
  font-size: 28px;
  line-height: 1.1;
}

.primary-emotion b {
  align-self: end;
  font-size: 30px;
  line-height: 1;
}

.emotion-bars {
  display: grid;
  gap: 10px;
}

.emotion-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: center;
}

.emotion-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emotion-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f6;
}

.emotion-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.emotion-row strong {
  font-size: 13px;
  text-align: right;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  display: grid;
  gap: 7px;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fafafd;
}

.metric-card.good {
  border-color: rgba(31, 151, 105, 0.2);
  background: var(--green-soft);
}

.metric-card.warn {
  border-color: rgba(207, 128, 40, 0.24);
  background: var(--amber-soft);
}

.metric-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: 18px;
}

.trainer-block {
  display: grid;
  gap: 10px;
}

.trainer-block h3 {
  margin: 0;
  font-size: 16px;
}

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

.trainer-item {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.trainer-item strong {
  font-size: 14px;
}

.trainer-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@keyframes voicePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(117, 101, 189, 0.22);
  }
  70% {
    box-shadow: 0 0 0 28px rgba(117, 101, 189, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(117, 101, 189, 0);
  }
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.modal-actions button {
  min-width: 112px;
}

.danger-button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: #bd334e;
  color: white;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 18px 34px -22px rgba(189, 51, 78, 0.78);
}

.danger-button:disabled {
  opacity: 0.6;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 14px 16px;
  border-radius: 14px;
  background: #222734;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 20px 50px -24px rgba(18, 23, 38, 0.5);
}

.broadcast-workspace {
  min-width: 0;
  padding-bottom: 48px;
}

.broadcast-heading {
  align-items: flex-end;
}

.broadcast-heading .deals-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.broadcast-heading .breadcrumbs a {
  color: inherit;
}

.broadcast-safe-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #dcd5f5;
  border-radius: 18px;
  background: #f8f6ff;
}

.broadcast-safe-note > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #785fc7;
  color: #fff;
  font-weight: 900;
}

.broadcast-safe-note div {
  display: grid;
  gap: 2px;
}

.broadcast-safe-note small {
  color: var(--muted);
}

.broadcast-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
  padding: 28px 38px 0;
}

.broadcast-main {
  display: grid;
  gap: 20px;
}

.broadcast-card {
  padding: 26px;
}

.broadcast-step-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.broadcast-step-head > span {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: #765bc4;
  color: #fff;
  font-weight: 900;
}

.broadcast-step-head h2,
.recipient-toolbar h2,
.broadcast-explainer h3 {
  margin: 0;
}

.broadcast-step-head p,
.recipient-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.audience-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.audience-source {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid #e3e5ef;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
}

.audience-source.active-source {
  border-color: #866ed0;
  background: #f8f6ff;
  box-shadow: 0 12px 26px -24px #664bb6;
}

.audience-source > input {
  width: 18px;
  height: 18px;
  accent-color: #765bc4;
}

.audience-source-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: #eee9ff;
  color: #6047ad;
  font-weight: 900;
}

.audience-source > span:last-child {
  display: grid;
  gap: 3px;
}

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

.audience-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}

.audience-options[hidden],
.pipeline-options[hidden] {
  display: none !important;
}

.option-label {
  margin-right: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-chip {
  cursor: pointer;
}

.filter-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-chip span {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid #e1e3ed;
  border-radius: 999px;
  color: #596071;
  font-size: 13px;
  font-weight: 750;
}

.filter-chip input:checked + span {
  border-color: #826aca;
  background: #eee9ff;
  color: #5e46a7;
}

.pipeline-options {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: #f7f7fa;
}

.pipeline-options > label {
  display: grid;
  grid-template-columns: 120px minmax(200px, 1fr);
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pipeline-options select,
.broadcast-field input,
.broadcast-field textarea {
  width: 100%;
  border: 1px solid #dfe2ec;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.pipeline-options select,
.broadcast-field input {
  min-height: 46px;
  padding: 0 14px;
}

.stage-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.recipient-card {
  padding: 0;
  overflow: hidden;
}

.recipient-toolbar,
.recipient-select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.recipient-toolbar {
  padding: 24px 26px 18px;
}

.compact-search {
  width: min(310px, 45%);
}

.recipient-select-bar {
  min-height: 46px;
  padding: 0 26px;
  border-top: 1px solid #ececf2;
  border-bottom: 1px solid #ececf2;
  background: #fafafd;
  font-size: 13px;
}

.recipient-select-bar label {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.recipient-select-bar input,
.recipient-check input {
  width: 17px;
  height: 17px;
  accent-color: #765bc4;
}

.broadcast-recipient-list {
  max-height: 510px;
  overflow: auto;
}

.broadcast-recipient {
  display: grid;
  grid-template-columns: 62px minmax(180px, 1fr) minmax(190px, 0.8fr);
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 12px 26px;
  border-bottom: 1px solid #eeeef3;
}

.broadcast-recipient:last-child {
  border-bottom: 0;
}

.broadcast-recipient.unavailable {
  background: #fcfcfd;
}

.recipient-check {
  display: flex;
  gap: 10px;
  align-items: center;
}

.recipient-check .student-avatar,
.unlinked-chat .student-avatar {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.recipient-person,
.recipient-telegram {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.recipient-person small,
.recipient-telegram small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-ready {
  color: #37765a;
  font-size: 13px;
  font-weight: 800;
}

.telegram-missing {
  color: #a15a65;
  font-size: 13px;
  font-weight: 800;
}

.text-button {
  width: max-content;
  padding: 0;
  border: 0;
  background: none;
  color: #654caf;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.broadcast-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.broadcast-field textarea {
  min-height: 150px;
  padding: 14px;
  resize: vertical;
  line-height: 1.55;
}

.message-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.message-footer > span {
  color: var(--muted);
  font-size: 12px;
}

.broadcast-explainer {
  position: sticky;
  top: 22px;
  padding: 26px;
  background: linear-gradient(145deg, #f9f7ff, #fff);
}

.telegram-orb {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 18px;
  background: #775cc4;
  color: #fff;
  font-size: 21px;
  transform: rotate(-15deg);
}

.broadcast-explainer p,
.broadcast-explainer li {
  color: #626979;
  font-size: 14px;
  line-height: 1.55;
}

.broadcast-explainer ol {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.broadcast-explainer-note {
  margin: 18px 0 0;
  padding: 13px;
  border-radius: 14px;
  background: #eee9ff;
  color: #5c479d !important;
}

.broadcast-confirm-modal .modal-card {
  width: min(680px, calc(100vw - 32px));
}

.broadcast-confirm-summary {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: #f7f7fa;
}

.broadcast-confirm-summary > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.broadcast-confirm-summary span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eae5fa;
  color: #5e499d;
  font-size: 12px;
}

.broadcast-message-preview {
  max-height: 280px;
  margin-top: 16px;
  padding: 18px;
  overflow: auto;
  border: 1px solid #e0e3ed;
  border-radius: 16px;
  background: #fff;
  line-height: 1.55;
  white-space: pre-wrap;
}

.unlinked-chat-list {
  display: grid;
  max-height: 380px;
  overflow: auto;
  border: 1px solid #e3e4ec;
  border-radius: 16px;
}

.unlinked-chat {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #ececf1;
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.unlinked-chat:last-child {
  border-bottom: 0;
}

.unlinked-chat:hover {
  background: #f8f6ff;
}

.unlinked-chat > span:last-child {
  display: grid;
  gap: 3px;
}

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

.broadcast-history {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.broadcast-history-item {
  border: 1px solid #e5e6ee;
  border-radius: 16px;
  overflow: hidden;
}

.broadcast-history-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  cursor: pointer;
  list-style: none;
}

.broadcast-history-item summary::-webkit-details-marker {
  display: none;
}

.broadcast-history-item summary > div {
  display: grid;
  gap: 4px;
}

.broadcast-history-item summary small {
  color: var(--muted);
}

.broadcast-history-item > p {
  margin: 0;
  padding: 0 15px 15px;
  color: #555d6d;
  font-size: 14px;
  white-space: pre-wrap;
}

.broadcast-status {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eee9ff;
  color: #6049a8;
  font-size: 12px;
  font-weight: 850;
}

.broadcast-status.completed {
  background: #e8f5ee;
  color: #357359;
}

.broadcast-status.failed,
.broadcast-status.partial {
  background: #fcecef;
  color: #9c4c5b;
}

.history-recipients {
  display: grid;
  border-top: 1px solid #e8e9ef;
}

.history-recipients > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 15px;
  border-bottom: 1px solid #efeff3;
  font-size: 13px;
}

.history-recipients > div:last-child {
  border-bottom: 0;
}

.history-recipients small.sent {
  color: #39765c;
}

.history-recipients small.failed,
.history-recipients small.skipped {
  color: #a14e5e;
}

@media (max-width: 1180px) {
  .deal-layout {
    grid-template-columns: 1fr;
  }

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

  .contact-search-filter {
    width: min(440px, 58vw);
  }

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

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

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .dashboard-main,
  .tasks-layout,
  .change-log-layout {
    grid-template-columns: 1fr;
  }

  .contact-detail {
    position: static;
  }

  .task-detail {
    position: static;
  }

  .deals-board {
    grid-auto-columns: 280px;
  }

  .tasks-kanban {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    overflow-x: auto;
  }

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

  .deals-controls {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .timeline-card {
    position: static;
    height: 760px;
  }

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

  .broadcast-explainer {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 12px;
  }

  .avatar {
    width: 42px;
    height: 42px;
  }

  .nav {
    display: flex;
    width: auto;
    overflow: auto;
  }

  .nav-item {
    width: 62px;
    height: 58px;
  }

  .topbar {
    height: auto;
    padding: 18px;
  }

  .page-intro {
    padding: 18px 18px 0;
  }

  .deal-layout {
    padding: 18px;
  }

  .deals-board {
    padding: 18px;
  }

  .deal-drag-actions {
    right: 14px;
    bottom: 14px;
    gap: 8px;
  }

  .deal-drag-action {
    min-width: 98px;
    min-height: 50px;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 11px;
  }

  .deal-drag-action.delete {
    min-width: 74px;
  }

  .tasks-kanban {
    padding: 0 18px 24px;
  }

  .deals-toolbar {
    padding: 18px 18px 0;
  }

  .contacts-summary,
  .contacts-layout,
  .company-layout,
  .voice-layout,
  .dashboard-grid,
  .dashboard-main,
  .tasks-layout,
  .change-log-layout {
    padding-right: 18px;
    padding-left: 18px;
  }

  .contacts-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-head {
    flex-direction: column;
    align-items: stretch;
    padding-right: 18px;
    padding-left: 18px;
  }

  .voice-head {
    flex-direction: column;
    align-items: stretch;
    padding-right: 18px;
    padding-left: 18px;
  }

  .dashboard-actions {
    flex-direction: column;
  }

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

  .dashboard-event,
  .task-row {
    grid-template-columns: 1fr;
  }

  .contacts-list-head {
    display: none;
  }

  .contact-row,
  .contact-row.contacts-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contacts-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-actions {
    justify-content: flex-start;
  }

  .company-hero,
  .company-fields {
    grid-template-columns: 1fr;
  }

  .deal-fields,
  .action-row,
  .comment-composer,
  .voice-actions,
  .voice-target,
  .stage-picker,
  .form-grid label {
    grid-template-columns: 1fr;
  }

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

  .emotion-row {
    grid-template-columns: 1fr 42px;
  }

  .emotion-row div {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .timeline-card {
    min-height: 680px;
    padding: 20px;
  }

  .comment-composer {
    right: 20px;
    bottom: 20px;
    left: 20px;
  }

  .timeline-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .broadcast-layout {
    padding: 18px;
  }

  .audience-sources {
    grid-template-columns: 1fr;
  }

  .recipient-toolbar,
  .recipient-select-bar,
  .message-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-search {
    width: 100%;
  }

  .recipient-select-bar {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .broadcast-recipient {
    grid-template-columns: 54px 1fr;
  }

  .recipient-telegram {
    grid-column: 2;
  }

  .pipeline-options > label {
    grid-template-columns: 1fr;
  }

  .entity-section-heading,
  .payment-actions {
    align-items: stretch;
    flex-direction: column;
  }

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