:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --line: #dce2ea;
  --line-strong: #c7d0dc;
  --text: #111827;
  --muted: #667085;
  --red: #f43a3a;
  --red-soft: #fff0f0;
  --green: #d4e15c;
  --green-soft: #eef9f0;
  --blue: #5292e6;
  --yellow: #fbc860;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1060px;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: linear-gradient(135deg, #ffffff 0%, #f2f5f8 100%);
}

.login-panel {
  width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 34px;
  border-radius: 8px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.brand-row img {
  height: 30px;
  object-fit: contain;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.login h1 {
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 8px;
}

.login p,
.muted {
  color: var(--muted);
}

.form-stack {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 12px;
  font-weight: 700;
  color: #384252;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field select[multiple] {
  min-height: 92px;
}

.readonly-field input {
  color: var(--muted);
  background: #f8fafc;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  transition: grid-template-columns 0.2s ease;
}

.app:has(.sidebar--collapsed) {
  grid-template-columns: 56px 1fr;
}

.sidebar {
  background: #10141b;
  color: #fff;
  padding: 22px 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  overflow: hidden;
  transition: padding 0.2s ease;
}

.sidebar--collapsed {
  padding: 42px 6px 16px;
  align-items: center;
  overflow: visible;
}

.sidebar--collapsed .nav {
  padding-top: 8px;
}

.sidebar--collapsed .logo-stack,
.sidebar--collapsed .sidebar-footer,
.sidebar--collapsed .nav-section-title span {
  display: none;
}

.sidebar--collapsed .nav-section-title {
  margin: 10px 0 2px;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.sidebar-collapse-btn {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #aab3c1;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.logo-stack {
  display: grid;
  gap: 12px;
  padding: 8px 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
}

.logo-stack img {
  height: 26px;
  max-width: 165px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.nav {
  display: grid;
  gap: 6px;
  width: 100%;
}

.nav-section-title {
  margin: 14px 0 3px;
  padding: 0 12px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  color: #d5dbe5;
  background: transparent;
  border-radius: 6px;
  padding: 0 11px;
  text-align: left;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-link.active {
  background: #ffffff;
  color: var(--green);
}

.nav-link.subitem {
  margin-left: 0;
  padding-left: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.sidebar--collapsed .nav-link {
  justify-content: center;
  padding: 0;
  min-height: 40px;
  width: 40px;
  position: relative;
  overflow: visible;
}

.sidebar--collapsed .nav-link span {
  display: none;
}

.sidebar--collapsed .nav-link.subitem {
  padding-left: 0;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar--collapsed .nav-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  padding: 7px 10px;
  border-radius: 8px;
  background: #f8fafc;
  color: #10141b;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.08s ease, transform 0.08s ease, visibility 0.08s ease;
  z-index: 30;
}

.sidebar--collapsed .nav-link:hover::after,
.sidebar--collapsed .nav-link:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.sidebar-footer {
  margin-top: auto;
  color: #aab3c1;
  font-size: 12px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: 68px 1fr;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.topbar h1 {
  font-size: 20px;
  margin: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.content {
  min-width: 0;
  padding: 22px;
  overflow: auto;
}

.save-indicator {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 11px;
  border: 1px solid #d8e6dc;
  background: #ffffff;
  color: #216e37;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  font-size: 12px;
}

.save-indicator span {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.save-indicator.saving span {
  animation: spin 0.9s linear infinite;
}

.save-indicator.error {
  border-color: #f1b3b3;
  color: var(--red);
}

.save-indicator.error span {
  background: var(--red-soft);
  color: var(--red);
  animation: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  padding: 0 13px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.btn.secondary {
  background: #fff;
  color: #1f2937;
  border: 1px solid var(--line);
}

.btn.red {
  background: var(--red);
}

.btn.green {
  background: var(--green);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  color: #344054;
}

.icon-btn.danger {
  border-color: #f5b5b5;
  color: var(--red);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.panel-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 15px;
}

.panel-body {
  padding: 14px;
}

.offer-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.doc-shell {
  padding: 18px;
  background: #eef2f6;
}

.document {
  width: 100%;
  min-height: 560px;
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  padding: 42px 52px;
}

.document-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #111827;
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.document-header img {
  height: 34px;
  max-width: 180px;
  object-fit: contain;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.toolbar button,
.toolbar select {
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 10px;
  color: #344054;
  font-weight: 700;
}

.editor {
  min-height: 360px;
  outline: 0;
  line-height: 1.62;
}

.document-blocks {
  display: grid;
  gap: 18px;
}

.offer-block {
  position: relative;
}

.html-block .editor {
  min-height: 80px;
}

.warning-block {
  background: #fff7ed;
  padding: 14px 16px;
}

.warning-block .editor {
  min-height: 68px;
}

.warning-block h2 {
  margin-top: 0;
  color: #92400e;
}

.block-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.offer-block:hover .block-actions {
  opacity: 1;
}

.mini-btn {
  min-height: 26px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.mini-btn.danger {
  border-color: #f1b3b3;
  color: var(--red);
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.table-title-input {
  width: 60%;
  border: 0;
  background: transparent;
  color: #d4e15c;
  font-size: 16px;
  font-weight: 850;
}

.table-title-input:focus {
  outline: 0;
}

.editor h1 {
  font-size: 35px;
  line-height: 1.18;
  margin: 36px 0 20px;
  color: #d4e15c;
}

.editor h2 {
  font-size: 20px;
  margin: 26px 0 8px;
}

.meeting-workspace {
  grid-template-columns: minmax(720px, 1fr) 320px;
}

.meeting-document {
  min-height: 680px;
}

.meeting-document-head {
  display: grid;
  gap: 4px;
  border-bottom: 2px solid #111827;
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.meeting-document-head span,
.meeting-document-head small {
  color: var(--muted);
  font-size: 13px;
}

.meeting-document-head strong {
  font-size: 28px;
  line-height: 1.18;
}

.meeting-editor {
  min-height: 520px;
}

.client-rich-note {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.client-rich-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.client-rich-note-head h3 {
  margin: 0;
}

.rich-editor-toolbar {
  justify-content: flex-end;
}

.client-rich-editor {
  min-height: 190px;
  padding: 16px;
}

.rich-checklist {
  padding-left: 0;
  list-style: none;
}

.rich-checklist li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 5px 0;
}

.rich-checklist input[type="checkbox"] {
  flex: 0 0 auto;
}

.rich-task-link,
.rich-task-placeholder {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 3px;
  border: 1px solid #b7c6e8;
  border-radius: 6px;
  background: #eff4ff;
  color: #254b87;
  padding: 3px 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.rich-task-link {
  cursor: pointer;
}

.rich-task-link:hover {
  border-color: #6f91d0;
  background: #e1ebff;
}

.rich-task-link.missing {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--muted);
}

.rich-task-placeholder {
  border-style: dashed;
  color: var(--muted);
}

.meeting-editor h1 {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 34px;
}

.meeting-editor h1[data-client-id]::before {
  content: "Klient";
  display: block;
  margin-bottom: 5px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meeting-side {
  display: grid;
  gap: 14px;
}

.client-picker {
  display: grid;
  gap: 8px;
}

.client-picker:not(.open) .meeting-client-list {
  display: none;
}

.client-picker input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
}

.meeting-client-list,
.meeting-client-summary {
  display: grid;
  gap: 7px;
}

.meeting-client-list button,
.meeting-client-summary button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  text-align: left;
}

.meeting-client-list button:hover,
.meeting-client-summary button:hover {
  border-color: var(--line-strong);
  background: #f8fafc;
}

.meeting-client-list span,
.meeting-client-summary span {
  color: var(--muted);
  font-size: 12px;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.pricing-table .col-drag {
  width: 34px;
}

.pricing-table .col-md {
  width: 74px;
}

.pricing-table .col-hours {
  width: 76px;
}

.pricing-table .col-fixed {
  width: 92px;
}

.pricing-table .col-range {
  width: 84px;
}

.pricing-table .col-total {
  width: 128px;
}

.pricing-table .col-actions {
  width: 76px;
}

.pricing-table .col-custom {
  width: 118px;
}

.pricing-table th,
.pricing-table td {
  border-bottom: 0;
  padding: 8px;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
}

.pricing-table th {
  background: #d4e15c;
  color: #243018;
  font-size: 12px;
}

.pricing-table tbody tr:nth-child(even) {
  background: #f6f7f9;
}

.pricing-table tfoot th {
  background: #fff;
  border-top: 3px solid #d4e15c;
  color: #d4e15c;
  font-size: 14px;
  font-weight: 850;
}

.pricing-table input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 7px;
  background: transparent;
  min-width: 0;
}

.pricing-table input:focus {
  border-color: var(--blue);
  background: #fff;
  outline: 0;
}

.pricing-table .num {
  text-align: right;
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
}

.column-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.column-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-head input {
  padding: 5px;
}

.tiny-remove {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: #667085;
  font-weight: 800;
  line-height: 1;
}

.tiny-remove:hover {
  color: var(--red);
  border-color: #f1b3b3;
  background: var(--red-soft);
}

.drag-cell {
  width: 32px;
}

.drag-handle {
  width: 26px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: #667085;
  cursor: grab;
}

.drag-over {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.row-actions {
  width: 76px;
  white-space: nowrap;
}

.row-actions .icon-btn {
  margin-left: 4px;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.summary-row strong {
  font-size: 18px;
}

.version-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.version-panel-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.version-panel h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.version-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.version-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.version-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eef1f5;
}

.version-row:first-child {
  border-top: 0;
}

.version-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.editor-help {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.editor-help h4 {
  margin: 0 0 8px;
  color: #344054;
  font-size: 13px;
}

.editor-help p {
  margin: 6px 0;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 20px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 5px;
  background: #fff;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}

.slash-menu {
  position: absolute;
  z-index: 50;
  width: 250px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  padding: 6px;
}

.slash-menu button {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  color: #1f2937;
}

.slash-menu button:hover {
  background: #f3f6fa;
}

.slash-menu span {
  color: var(--muted);
  font-size: 12px;
}

.grid-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.grid-table th,
.grid-table td {
  border-bottom: 0;
  padding: 9px 10px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

.grid-table th {
  position: sticky;
  top: 0;
  background: #d4e15c;
  z-index: 1;
  color: #243018;
  font-size: 12px;
}

.grid-table tbody tr.client-group-base>td {
  background: #fff;
}

.grid-table tbody tr.client-group-alt>td {
  background: #f6f7f9;
}

.grid-table tbody tr.selected-row>td {
  background: #fff7ed;
}

.client-offer-col,
.client-offer-cell {
  width: 36px;
  text-align: center !important;
  font-weight: 900;
}

.client-finance-col {
  min-width: 150px;
}

.client-finance-cell {
  min-width: 150px;
}

.client-finance-progress {
  display: grid;
  gap: 4px;
}

.client-finance-progress.compact {
  min-width: 130px;
}

.client-finance-progress small {
  color: #475467;
  font-size: 11px;
  white-space: nowrap;
}

.client-finance-bar {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.client-finance-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d4e368 0%, #7fb33b 100%);
}

.client-finance-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.client-finance-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-finance-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.client-finance-panel-head h3 {
  margin: 0;
}

.client-finance-offer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
}

.client-finance-offer-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-finance-offer-copy>div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.client-finance-offer-copy strong,
.client-finance-offer-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-finance-offer-copy small {
  color: #667085;
  font-size: 12px;
}

.client-finance-offer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.client-finance-status-field {
  min-width: 180px;
  padding: 8px 10px;
}

.client-finance-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.client-finance-stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.client-finance-stat strong {
  font-size: 20px;
  line-height: 1.1;
}

.client-finance-stat span {
  color: #475467;
  font-size: 12px;
}

.client-finance-progress-wrap {
  display: grid;
  gap: 8px;
}

.client-finance-progress-wrap.empty {
  color: #667085;
  font-size: 13px;
}

.client-finance-payments {
  display: grid;
  gap: 8px;
}

.client-finance-payment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
}

.client-finance-payment-item span {
  color: #667085;
  font-size: 12px;
}

@media (max-width: 900px) {
  .my-tasks-filters {
    grid-template-columns: 1fr;
  }

  .my-workload {
    --person-width: 170px;
  }

  .client-detail-dual-panels,
  .client-finance-grid {
    grid-template-columns: 1fr;
  }

  .client-finance-panel-head,
  .client-finance-offer-card,
  .client-finance-payment-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-finance-offer-actions,
  .client-finance-head-actions {
    width: 100%;
  }
}

.client-title-row td {
  padding-top: 18px;
  padding-bottom: 3px;
  border-top: 12px solid #fff;
}

.client-title-btn {
  display: inline-flex;
  width: auto;
  min-height: 0;
  border: 0;
  background: transparent;
  color: #101828;
  padding: 0;
  text-align: left;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
  cursor: pointer;
}

.client-title-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.client-title-btn:hover {
  color: #d4e368;
  text-decoration: none;
}

.client-project-row td {
  padding-top: 0;
  padding-bottom: 3px;
  border-top: 0;
  height: auto;
  line-height: 1.2;
  vertical-align: top;
}

.client-project-row.empty td {
  height: 8px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 8px;
}

.client-project-description-text {
  display: block;
  width: 100%;
  min-height: 18px;
  border: 0;
  background: transparent;
  color: #475467;
  padding: 0;
  text-align: left;
  font: inherit;
  font-weight: 400;
  line-height: 1.35;
  white-space: wrap;
  cursor: default;
}

.client-project-description-text.empty {
  color: transparent;
  min-height: 8px;
  line-height: 8px;
  text-align: left;
}

.client-project-row:hover .client-project-description-text.empty {
  color: #98a2b3;
}

.client-project-row.empty .client-project-description-text.empty {
  height: 14px;
  min-height: 14px;
  overflow: hidden;
  padding: 0;
  margin: 0;
  display: block;
}

.client-project-row.empty:hover .client-project-description-text.empty {
  height: 14px;
  min-height: 14px;
  overflow: visible;
}

.client-project-description.editor {
  width: 100%;
  min-height: 48px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: #475467;
  padding: 7px 8px;
  font: inherit;
  font-weight: 400;
  line-height: 1.35;
}

.client-project-description.editor:focus {
  border-color: var(--line-strong);
  background: #fff;
  outline: none;
}

.grid-table tbody tr.client-global-note-row td {
  padding-top: 0;
  border-top: 0;
}

.grid-table tbody tr.client-kanban-state-row td {
  padding-top: 0;
  padding-bottom: 10px;
  border-top: 0;
  height: auto;
  vertical-align: top;
  overflow: visible;
}

.grid-table tbody tr.client-kanban-state-row {
  height: auto;
}

.grid-table tbody tr.client-feed-state-row td {
  padding-top: 0;
  border-top: 0;
}

.client-global-note-preview {
  margin-top: -6px;
  padding-top: 5px;
  color: #7c2d12;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.reminder-pill {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  border-left: 3px solid #f59e0b;
  border-radius: 5px;
  background: #fff7ed;
  padding: 5px 7px;
}

.reminder-orange {
  --reminder-border: #f59e0b;
  --reminder-bg: #fff7ed;
  --reminder-text: #7c2d12;
  --reminder-muted: #9a3412;
}

.reminder-blue {
  --reminder-border: #2f80ed;
  --reminder-bg: #eef6ff;
  --reminder-text: #175cd3;
  --reminder-muted: #1d4ed8;
}

.reminder-green {
  --reminder-border: #22c55e;
  --reminder-bg: #ecfdf3;
  --reminder-text: #166534;
  --reminder-muted: #15803d;
}

.reminder-red {
  --reminder-border: #ef4444;
  --reminder-bg: #fef2f2;
  --reminder-text: #991b1b;
  --reminder-muted: #b91c1c;
}

.reminder-purple {
  --reminder-border: #8b5cf6;
  --reminder-bg: #f5f3ff;
  --reminder-text: #6d28d9;
  --reminder-muted: #7c3aed;
}

.reminder-gray {
  --reminder-border: #64748b;
  --reminder-bg: #f8fafc;
  --reminder-text: #334155;
  --reminder-muted: #64748b;
}

.reminder-pill {
  border-left-color: var(--reminder-border, #f59e0b);
  background: var(--reminder-bg, #fff7ed);
}

.reminder-pill.clickable {
  cursor: pointer;
}

.reminder-pill:first-child {
  margin-top: 0;
}

.reminder-pill strong {
  color: var(--reminder-text, #7c2d12);
  font-size: 11px;
  line-height: 1.3;
}

.reminder-pill small {
  color: var(--reminder-muted, #9a3412);
  font-size: 10px;
}

.client-tag-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.client-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.client-tag-list.compact {
  gap: 4px;
}

.client-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  border: 1px solid var(--reminder-border, #f59e0b);
  border-radius: 999px;
  background: var(--reminder-bg, #fff7ed);
  color: var(--reminder-text, #7c2d12);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.client-tag-list.compact .client-tag-chip {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.client-tag-remove {
  border: 0;
  background: transparent;
  color: var(--reminder-text, #7c2d12);
  padding: 0;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.client-tag-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #f8fafc;
}

.client-tag-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.client-tag-panel-head h3 {
  margin: 0;
}

.client-tag-panel-head small {
  color: var(--muted);
}

.client-tag-list-wrap {
  min-height: 24px;
}

.client-tag-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px auto;
  gap: 8px;
}

.client-tag-form input,
.client-tag-form select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.color-swatch-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.color-swatch-picker.compact {
  gap: 6px;
}

.color-swatch-picker input[type="hidden"] {
  display: none;
}

.color-swatch {
  width: 34px;
  height: 34px;
  border: 2px solid #94a3b8;
  border-radius: 8px;
  background: var(--reminder-bg, #fff7ed);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.color-swatch-picker.compact .color-swatch {
  width: 30px;
  height: 30px;
}

.color-swatch:hover {
  transform: translateY(-1px);
  border-color: var(--reminder-border, #f59e0b);
}

.color-swatch.selected {
  border-color: var(--reminder-border, #f59e0b);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.92), 0 0 0 3px var(--reminder-border, #f59e0b);
}

.color-swatch.reminder-orange {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.color-swatch.reminder-blue {
  background: linear-gradient(135deg, #2f80ed 0%, #175cd3 100%);
}

.color-swatch.reminder-green {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
}

.color-swatch.reminder-red {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.color-swatch.reminder-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.color-swatch.reminder-gray {
  background: linear-gradient(135deg, #94a3b8 0%, #475569 100%);
}

.task-card-reminders {
  display: grid;
  gap: 5px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.inline-check input {
  width: auto;
}

.client-kanban-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
  align-items: start;
  overflow-x: auto;
  padding: 4px 0 14px;
}

.client-kanban-mini-phase {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: start;
  border-radius: 5px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.1);
  padding: 5px 6px;
}

.client-kanban-mini-phase span {
  overflow: hidden;
  color: #344054;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-kanban-mini-phase strong {
  color: #167033;
  font-size: 10px;
  font-weight: 900;
}

.client-kanban-mini-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf3;
}

.client-kanban-mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #d4e15c;
}

.client-kanban-mini-tasks {
  display: grid;
  gap: 4px;
  margin-top: 2px;
}

.client-kanban-mini-task {
  appearance: none;
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 4px 5px;
  border-radius: 6px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.client-kanban-mini-task:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.client-kanban-mini-task-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.client-kanban-mini-task-status {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.client-kanban-mini-task-status.todo {
  background: #eef2f6;
  color: #475467;
}

.client-kanban-mini-task-status.planned {
  background: #e0f2fe;
  color: #075985;
}

.client-kanban-mini-task-status.progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.client-kanban-mini-task-status.approval {
  background: #ede9fe;
  color: #6d28d9;
}

.client-kanban-mini-task-status.client {
  background: #ffedd5;
  color: #c2410c;
}

.client-kanban-mini-task-status.waiting {
  background: #fef3c7;
  color: #92400e;
}

.client-kanban-mini-task-status.done {
  background: #dcfce7;
  color: #166534;
}

.client-kanban-mini-task-status.blocked {
  background: #fee2e2;
  color: #b91c1c;
}

.client-kanban-mini-task small {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #344054;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phase-reminders {
  display: grid;
  gap: 3px;
  margin-top: 2px;
}

.phase-reminder {
  width: 100%;
  min-height: 22px;
  border: 1px solid var(--reminder-border, #f59e0b);
  border-radius: 5px;
  background: var(--reminder-bg, #fff7ed);
  color: var(--reminder-text, #7c2d12);
  padding: 3px 5px;
  text-align: left;
  cursor: pointer;
}

.phase-reminder span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
}

.client-overview-feed {
  margin: 2px 0 14px;
  border-top: 1px solid rgba(152, 162, 179, 0.35);
  padding-top: 8px;
}

.client-overview-feed>strong {
  display: block;
  margin-bottom: 6px;
  color: #475467;
  font-size: 11px;
  text-transform: uppercase;
}

.client-overview-kanban-title {
  display: block;
  margin: 2px 0 6px;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-overview-feed>div {
  display: grid;
  gap: 5px;
}

.client-overview-feed-item {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid rgba(152, 162, 179, 0.35);
  border-left: 3px solid #d4e15c;
  border-radius: 5px;
  background: #fff;
  padding: 6px 8px;
  text-align: left;
}

.client-overview-feed-item.closed-reminder {
  border-left-color: #22c55e;
  background: #f0fdf4;
}

.client-overview-feed-item span {
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}

.client-overview-feed-item small,
.client-overview-feed-item em {
  color: #667085;
  font-size: 10px;
  font-style: normal;
  line-height: 1.3;
}

.grid-table input,
.grid-table select {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 5px;
  padding: 6px;
}

.grid-table input:focus,
.grid-table select:focus {
  outline: 0;
  background: #fff;
  border-color: var(--blue);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  background: #edf2f7;
  color: #344054;
}

.status-pill.done {
  background: var(--green-soft);
  color: #167033;
}

.status-pill.progress {
  background: #fff7e7;
  color: #956100;
}

.status-pill.todo {
  background: #eef2f6;
  color: #475467;
}

.client-overview-table {
  min-width: 1180px;
}

.client-offer-col,
.client-offer-cell {
  width: 36px;
  text-align: center !important;
  font-weight: 900;
}

.client-table-wrap {
  max-height: calc(100vh - 155px);
  overflow: auto;
}

.archive-panel {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.archive-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: #344054;
  padding: 8px 12px;
  font-weight: 900;
  cursor: pointer;
}

.archived-table-wrap {
  margin-top: 10px;
  max-height: 340px;
}

.status-select {
  min-width: 145px;
  min-height: 34px;
  border: 1px solid var(--line-strong) !important;
  border-radius: 6px;
  background-color: #fff !important;
  color: #111827 !important;
  font-weight: 800;
  appearance: auto;
}

.status-select.done {
  background-color: var(--green-soft) !important;
  color: #167033 !important;
}

.status-select.progress {
  background-color: #eef6ff !important;
  color: #175cd3 !important;
}

.status-select.waiting {
  background-color: #fff7e7 !important;
  color: #956100 !important;
}

.status-select.blocked {
  background-color: var(--red-soft) !important;
  color: var(--red) !important;
}

.status-select.new {
  background-color: #eef2f6 !important;
  color: #475467 !important;
}

.status-select.archived {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
}

.activity-date {
  display: block;
  font-weight: 700;
}

.stale-note {
  display: block;
  margin-top: 2px;
  color: #b45309;
  font-weight: 800;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #e9edf3;
  overflow: hidden;
}

.progress>span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--green));
}

.client-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.status-filter-wrap {
  position: relative;
}

.status-filter-btn {
  white-space: nowrap;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #175cd3;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
}

.status-filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 10px 14px 12px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-filter-dropdown .inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 0;
}

.status-filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.status-filter-actions .btn {
  flex: 1;
  font-size: 12px;
  padding: 4px 8px;
  height: 30px;
}

.detail-grid {
  display: grid;
  gap: 12px;
}

.step-map {
  display: grid;
  gap: 10px;
}

.step-row {
  display: grid;
  grid-template-columns: 1fr 112px 92px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.step-title {
  font-weight: 800;
  font-size: 13px;
}

.client-detail-panel {
  min-width: 0;
}

.client-detail-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  margin-top: 24px;
}

.client-detail-hero-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.client-detail-hero h2 {
  margin: 0;
  color: #101828;
  font-size: clamp(42px, 7vw, 74px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: none;
}

.client-summary-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

.client-summary-card>div,
.client-summary-field {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}

.client-summary-card span,
.client-summary-field>span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.client-summary-field {
  display: grid;
  gap: 4px;
}

.client-summary-field input,
.client-summary-field select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 10px;
  color: #101828;
  font-weight: 800;
}

.client-table-person {
  display: block;
  color: #344054;
  font-weight: 800;
}

.quick-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.client-detail-toolbar {
  display: grid;
  gap: 12px;
}

.client-hero-tags {
  min-height: 24px;
}

.client-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.client-clickup-linked {
  border-color: #b7e3c7;
  background: #ecfdf3;
  color: #166534;
}

.quick-link-stack {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-link {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  background: #eef6ff;
  color: #175cd3;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
}

.quick-link.disabled {
  background: #eef2f6;
  color: #98a2b3;
}

.offer-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.offer-status-badge.draft {
  background: #eef2f6;
  color: #475467;
}

.offer-status-badge.sent {
  background: #fff4cc;
  color: #a15c00;
}

.offer-status-badge.approved {
  background: #dcfce7;
  color: #166534;
}

.client-info-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #f8fafc;
}

.client-detail-dual-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: 12px;
  align-items: start;
}

.client-detail-single-panel {
  display: grid;
  gap: 12px;
}

.client-resource-stack {
  display: grid;
  gap: 12px;
}

.drive-documents-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}

.gmail-emails-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}

.gmail-emails-list,
.gmail-search-results {
  display: grid;
  gap: 8px;
}

.gmail-email-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.gmail-email-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.gmail-email-copy strong,
.gmail-email-copy small,
.gmail-email-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmail-email-copy strong {
  color: #101828;
  font-size: 13px;
}

.gmail-email-copy small,
.gmail-email-copy p {
  color: #667085;
  font-size: 11px;
}

.gmail-email-copy p {
  margin: 0;
}

.gmail-email-note {
  min-height: 32px;
  resize: vertical;
  border: 1px solid #dbe4ee;
  border-radius: 6px;
  background: #fff;
  padding: 6px 8px;
  color: #344054;
  font: inherit;
  font-size: 12px;
}

.task-modal.gmail-email-modal {
  width: min(1280px, calc(100vw - 32px));
  height: min(820px, 92vh);
  grid-template-columns: minmax(0, 1fr);
}

.task-modal.gmail-email-modal .task-modal-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 28px 34px;
}

.gmail-email-modal-content {
  display: grid;
  grid-template-columns: minmax(300px, 2fr) minmax(0, 3fr);
  min-height: min(620px, calc(100vh - 180px));
  border-top: 1px solid var(--line);
}

.gmail-email-sidebar {
  min-width: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 0 16px 16px 0;
}

.gmail-search-form {
  margin: 16px 0 10px;
}

.gmail-search-form input {
  min-width: 260px;
  flex: 1;
}

.gmail-preview-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  gap: 8px;
  overflow: hidden;
  padding: 16px 0 16px 20px;
}

.gmail-preview-panel h4,
.gmail-preview-panel p {
  margin: 0;
}

.gmail-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gmail-preview-panel pre {
  min-height: 0;
  max-height: none;
  overflow: auto;
  margin: 0;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: #344054;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 640px) {
  .gmail-email-modal-content {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .gmail-email-sidebar {
    max-height: 48vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
  }

  .gmail-preview-panel {
    min-height: 300px;
    padding-left: 0;
  }

  .gmail-email-item {
    grid-template-columns: 1fr;
  }

  .gmail-search-form input {
    min-width: 0;
  }
}

.drive-documents-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.drive-documents-head h3 {
  margin: 0;
  font-size: 15px;
}

.drive-documents-list {
  display: grid;
  gap: 8px;
}

.drive-document-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.drive-document-badge {
  min-width: 42px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.drive-document-badge.offer {
  background: #fff4cc;
  color: #a15c00;
}

.drive-document-badge.doc {
  background: #e0ecff;
  color: #175cd3;
}

.drive-document-badge.sheet {
  background: #ddfbe6;
  color: #067647;
}

.drive-document-badge.file {
  background: #eef2f6;
  color: #475467;
}

.drive-document-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.drive-document-copy strong,
.drive-document-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-document-copy strong {
  color: #101828;
  font-size: 13px;
}

.drive-document-copy small {
  color: #667085;
  font-size: 11px;
}

.drive-document-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.drive-documents-note,
.drive-documents-error {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}

.drive-documents-note {
  background: #fff;
  border: 1px dashed #cbd5e1;
  color: #475467;
}

.drive-documents-error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
}

.drive-preview-modal {
  width: min(1120px, calc(100vw - 32px));
}

.drive-preview-body {
  min-height: 70vh;
}

.drive-preview-frame {
  width: 100%;
  min-height: 70vh;
  border: 0;
  border-radius: 10px;
  background: #fff;
}

.detail-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.detail-fields.compact-notes {
  grid-template-columns: 1fr;
}

.detail-fields .field:last-child {
  grid-column: 1 / -1;
}

.kanban-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.task-form {
  display: grid;
  grid-template-columns: 1.4fr 180px 1fr 150px 150px;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}

.task-form[hidden] {
  display: none;
}

.task-form input,
.task-form select,
.task-form textarea {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
}

.task-form textarea {
  grid-column: 1 / -2;
}

.client-kanban {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.task-column {
  position: relative;
  align-self: flex-start;
  flex: 0 0 280px;
  min-height: 360px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 10px 54px;
}

.task-column.collapsed {
  flex-basis: 54px;
  width: 54px;
  min-width: 54px;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 8px 5px;
  cursor: pointer;
}

.collapsed-phase-label {
  display: grid;
  justify-items: center;
  gap: 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: #344054;
  font-weight: 900;
}

.collapsed-phase-label span {
  color: #167033;
}

.collapsed-phase-label small {
  color: var(--muted);
}

.task-column-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-column-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.task-column-head h4 {
  margin: 0;
  font-size: 13px;
}

.task-column-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.phase-toggle {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #344054;
  font-weight: 900;
  cursor: pointer;
}

.phase-add-task {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #d4e15c;
  color: #1f2937;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
}

.task-card {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #d8dee8;
  border-left: 4px solid #94a3b8;
  padding: 10px;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.task-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.task-card.done {
  border-left-color: #22c55e;
}

.task-card.planned {
  border-left-color: #38bdf8;
}

.task-card.progress {
  border-left-color: #2f80ed;
  height: auto;
  overflow: visible;
}

.task-card.waiting {
  border-left-color: #f59e0b;
}

.task-card.blocked {
  border-left-color: var(--red);
}

.task-card strong {
  font-size: 14px;
  line-height: 1.3;
}

.task-card-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.task-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 4px;
  padding: 0 6px;
  background: #eef2f6;
  color: #475467;
  font-size: 11px;
  font-weight: 900;
}

.task-tag.done {
  background: #dcfce7;
  color: #166534;
}

.task-tag.planned {
  background: #e0f2fe;
  color: #075985;
}

.task-tag.progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.task-tag.waiting {
  background: #fef3c7;
  color: #92400e;
}

.task-tag.blocked {
  background: #fee2e2;
  color: #b91c1c;
}

.task-tag.priority {
  background: #f3e8ff;
  color: #7e22ce;
}

.task-card-progress {
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.task-card-progress span {
  display: block;
  height: 100%;
  background: #d4e15c;
}

.task-meta-assignee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.task-meta-assignee span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-assignee-badges {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.task-assignee-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: linear-gradient(135deg, #e2f0ff 0%, #c7e0ff 100%);
  color: #0f3d75;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.task-assignee-badge+.task-assignee-badge {
  margin-left: -7px;
}

.task-assignee-badge.empty {
  background: #f8fafc;
  color: #94a3b8;
  padding: 0;
}

.task-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.task-comments {
  display: grid;
  gap: 5px;
  color: #475467;
  font-size: 12px;
}

.task-card-footer {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.my-tasks-page {
  display: grid;
  gap: 16px;
}

.my-tasks-panel {
  min-width: 0;
}

.my-tasks-head {
  align-items: flex-start;
}

.my-tasks-head h2 {
  margin: 0 0 4px;
}

.my-tasks-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.my-tasks-nav strong {
  min-width: 170px;
  text-align: center;
  font-size: 13px;
}

.my-tasks-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(240px, 0.8fr);
  gap: 12px;
  padding: 0 18px 16px;
}

.my-filter-group {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.my-filter-group strong {
  font-size: 12px;
}

.my-filter-group>div {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
}

.my-client-filter {
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.my-client-filter select {
  min-height: 128px;
}

.my-workload {
  --person-width: 210px;
  display: grid;
  gap: 0;
  padding: 0 18px 18px;
  overflow-x: auto;
}

.my-workload-header,
.my-workload-row {
  display: grid;
  grid-template-columns: var(--person-width) minmax(900px, 1fr);
}

.my-workload-person {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  background: #fff;
  font-size: 13px;
}

.my-workload-header .my-workload-person {
  font-weight: 900;
  background: #f8fafc;
}

.my-workload-days,
.my-workload-lane {
  display: grid;
  grid-template-columns: repeat(var(--workload-days), minmax(54px, 1fr));
}

.my-workload-day {
  min-height: 42px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid #edf1f5;
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
}

.my-workload-day.today {
  background: #fff4f4;
  color: #c62828;
}

.my-workload-day span {
  text-transform: uppercase;
}

.my-workload-lane {
  position: relative;
  min-height: 52px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, #fff 0, #fff calc((100% / var(--workload-days)) - 1px), #edf1f5 calc((100% / var(--workload-days)) - 1px), #edf1f5 calc(100% / var(--workload-days)));
}

.my-workload-bar {
  grid-column: var(--bar-start) / span var(--bar-span);
  min-width: 0;
  height: 30px;
  margin: 0 4px;
  border-radius: 6px;
  border-left: 4px solid #94a3b8;
  background: #e9eef5;
  color: #1f2937;
  padding: 0 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
}

.my-workload-bar span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-workload-bar.done {
  border-left-color: #22c55e;
  background: #dcfce7;
}

.my-workload-bar.planned {
  border-left-color: #38bdf8;
  background: #e0f2fe;
}

.my-workload-bar.progress {
  border-left-color: #2f80ed;
  background: #dbeafe;
}

.my-workload-bar.waiting {
  border-left-color: #f59e0b;
  background: #fef3c7;
}

.my-workload-bar.blocked {
  border-left-color: var(--red);
  background: #fee2e2;
}

.my-workload-empty {
  min-width: calc(var(--person-width) + 900px);
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.my-task-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.my-task-box {
  margin-bottom: 0;
  min-height: 230px;
  align-content: start;
}

.my-task-context {
  display: grid;
  gap: 3px;
  color: #475467;
  font-size: 12px;
  line-height: 1.3;
}

.my-task-context span:first-child {
  color: #111827;
  font-weight: 800;
}

.my-task-note {
  display: grid;
  gap: 3px;
  border-radius: 6px;
  background: #f8fafc;
  padding: 8px;
}

.my-task-note small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.my-task-note p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-warning {
  border-radius: 6px;
  background: #fff7ed;
  color: #b45309;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
}

.task-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(15, 23, 42, 0.38);
}

.task-modal {
  width: min(1380px, 96vw);
  height: min(820px, 92vh);
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 455px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.task-modal-main {
  min-width: 0;
  overflow: auto;
  padding: 28px 34px;
}

.task-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 26px;
}

.task-detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.task-client-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #475569;
}

.task-modal-actions,
.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.modal-footer-actions {
  margin-top: 18px;
}

.mini-btn.danger {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.mini-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.new-task-modal {
  grid-template-columns: minmax(620px, 1fr) 360px;
}

.new-client-modal {
  width: min(920px, 94vw);
  height: auto;
  max-height: 90vh;
  grid-template-columns: minmax(0, 1fr) 280px;
}

.new-client-modal .task-modal-main {
  padding: 32px 36px;
}

.reminder-edit-modal {
  width: min(620px, 94vw);
  height: auto;
  max-height: 90vh;
  grid-template-columns: minmax(0, 1fr);
}

.reminder-edit-form {
  display: grid;
  gap: 14px;
}

.reminder-edit-form textarea {
  min-height: 120px;
}

.new-client-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 14px;
}

.new-client-form .wide {
  grid-column: 1 / -1;
}

.new-client-form textarea {
  min-height: 104px;
}

.client-modal-side {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 32px 26px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.client-modal-side-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.client-modal-side-card strong {
  color: var(--text);
  font-size: 14px;
}

.client-modal-side-card.accent {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.task-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
}

.task-detail-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.task-detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  color: #475467;
  font-size: 26px;
  line-height: 1;
}

.modal-close:hover {
  background: #eef2f6;
}

.task-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.task-detail-grid .wide {
  grid-column: 1 / -1;
}

.task-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.clickup-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #f8fafc;
}

.clickup-panel-head,
.clickup-actions,
.clickup-task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.clickup-panel small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.clickup-panel-compact {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
}

.feed-reminder-card .btn {
  justify-self: start;
}

.clickup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.task-clickup-panel {
  margin-top: 14px;
}

.clickup-task-meta {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 13px;
}

.task-detail-columns h4 {
  margin: 0 0 8px;
}

.checklist {
  display: grid;
  gap: 7px;
}

.checklist label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 7px;
  align-items: center;
}

.checklist input[type="text"],
.checklist input:not([type]) {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 7px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.inline-form input {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
}

.task-activity {
  min-width: 0;
  display: grid;
  grid-template-rows: 58px 1fr auto;
  border-left: 1px solid var(--line);
  background: #fafafa;
}

.task-activity-head {
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.task-activity-head h3 {
  margin: 0;
  font-size: 15px;
}

.task-thread {
  display: grid;
  gap: 8px;
  overflow: auto;
  align-content: start;
  padding: 18px;
}

.activity-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  color: #475467;
}

.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #98a2b3;
  margin-top: 7px;
}

.activity-reminder .activity-dot {
  background: var(--reminder-border, #f59e0b);
}

.activity-reminder.closed .activity-dot {
  background: #22c55e;
}

.activity-item strong {
  display: block;
  color: #344054;
  font-size: 13px;
}

.activity-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.activity-item p {
  margin: 6px 0 0;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 9px;
  color: #344054;
}

.activity-reminder p {
  border-color: var(--reminder-border, #f59e0b);
  background: var(--reminder-bg, #fff7ed);
  color: var(--reminder-text, #7c2d12);
}

.activity-reminder.closed p {
  border-color: #22c55e;
  background: #ecfdf3;
  color: #166534;
}

.activity-delete {
  margin-top: 6px;
}

.task-comment-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.task-comment-box textarea {
  min-height: 52px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}

.client-feed {
  display: grid;
  gap: 8px;
}

.client-admin-page {
  display: grid;
  gap: 16px;
}

.client-admin-page .panel-head {
  align-items: flex-start;
}

.client-admin-page .panel-head p {
  margin: 5px 0 0;
}

.client-admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.client-admin-summary div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.client-admin-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.client-admin-summary strong {
  font-size: 24px;
}

.client-admin-table-wrap {
  overflow: auto;
}

.client-admin-table input,
.client-admin-table select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 8px;
}

.client-admin-table .archived-client-row {
  background: #f8fafc;
  color: #667085;
}

.template-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 160px;
}

.template-pill-list button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 3px 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.template-pill-list button:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #eef6ff;
}

.client-admin-edit-modal {
  max-width: 780px;
}

.client-admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-template-editor {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.client-template-editor h3 {
  margin: 0;
  font-size: 15px;
}

.template-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.template-toggle input {
  margin-top: 3px;
}

.template-toggle span {
  display: grid;
  gap: 3px;
}

.template-toggle small {
  color: var(--muted);
}

.client-meeting-notes {
  display: grid;
  gap: 10px;
}

.client-meeting-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.client-meeting-note header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.meeting-note-body {
  color: #344054;
  line-height: 1.55;
}

.meeting-note-body> :first-child {
  margin-top: 0;
}

.meeting-note-body> :last-child {
  margin-bottom: 0;
}

.global-feed-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.global-feed-controls>div {
  display: grid;
  gap: 8px;
}

.global-feed-controls textarea {
  min-height: 72px;
}

.global-feed-controls input,
.global-feed-controls select,
.task-comment-box select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 9px;
}

.feed-item {
  border-left: 3px solid #f8fafc;
  background: #f8fafc;
  border-radius: 6px;
  padding: 10px;
}

.feed-item.global-note,
.feed-item.reminder-event.open {
  border-left-color: var(--reminder-border, #f59e0b);
  background: var(--reminder-bg, #fff7ed);
}

.feed-item.reminder-event.closed {
  border-left-color: #22c55e;
  background: #ecfdf3;
}

.feed-item.reminder-event button {
  margin-top: 7px;
}

.reminder-box {
  border-top: 0;
  background: #fff7ed;
}

.reminder-box {
  grid-template-columns: 1fr;
}

.reminder-box .btn {
  justify-self: start;
}

.feed-item.clickable {
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}

.feed-item.clickable:hover {
  background: #eef6ff;
  transform: translateY(-1px);
}

.feed-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.feed-item p {
  margin: 6px 0 0;
}

.client-detail-modal {
  width: min(720px, 94vw);
  height: auto;
  max-height: 90vh;
  grid-template-columns: minmax(0, 1fr);
}

.client-detail-modal-wide {
  width: min(980px, 94vw);
}

.client-modal-form {
  display: grid;
  gap: 14px;
}

.client-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.client-modal-grid .field {
  min-width: 0;
}

.client-detail-modal-backdrop {
  z-index: 90;
}

.client-time-list {
  display: grid;
  gap: 6px;
}

.step-owner {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.comment {
  border-left: 3px solid var(--line-strong);
  padding: 8px 0 8px 10px;
}

.comment strong {
  font-size: 13px;
}

.comment p {
  margin: 4px 0 0;
  color: #344054;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(9, minmax(160px, 1fr));
  gap: 10px;
  overflow: auto;
  padding-bottom: 6px;
}

.kanban-col {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 420px;
}

.kanban-col h3 {
  font-size: 13px;
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.work-card {
  margin: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.work-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 7px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.settings-user-table-wrap {
  overflow-x: auto;
}

.user-management-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.user-management-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.user-management-header h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.user-management-header p {
  margin: 0;
}

.user-management-block--form {
  align-content: start;
}

.settings-user-table select {
  min-width: 150px;
}

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

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.error {
  color: var(--red);
  font-weight: 700;
  min-height: 20px;
}

.success-note {
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 10px 12px;
  color: #166534;
  background: #f0fdf4;
  font-size: 13px;
  font-weight: 700;
}

.error-note {
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 10px 12px;
  color: #991b1b;
  background: #fef2f2;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  body {
    min-width: 0;
  }

  .workspace,
  .client-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .user-management-layout {
    grid-template-columns: 1fr;
  }

  .task-modal,
  .new-client-modal,
  .reminder-edit-modal {
    width: min(96vw, 960px);
    height: auto;
    max-height: 92vh;
    grid-template-columns: 1fr;
  }

  .task-modal-main {
    padding: 24px 20px;
  }

  .client-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-finance-offer-copy strong,
  .client-finance-offer-copy small {
    white-space: normal;
  }

  .client-modal-grid,
  .client-summary-card,
  .global-feed-controls {
    grid-template-columns: 1fr;
  }

  .client-modal-side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .new-client-form {
    grid-template-columns: 1fr;
  }
}
