/* Avenix CRM — composants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: var(--primary);
box-shadow: 0 5px 15px -6px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: var(--primary-strong);
box-shadow: 0 7px 18px -7px rgba(37, 99, 235, 0.68);
}

.btn-secondary {
  color: var(--text-soft);
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

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

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-3);
}

.btn-soft {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: transparent;
}

.btn-soft:hover {
  background: var(--primary-muted);
}

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

.btn-danger:hover {
  background: #b91c1c;
}

.btn-success {
  color: #fff;
  background: var(--success);
}

.btn-success:hover {
  background: #15803d;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10.5px;
}

.btn-sm svg {
  width: 13px;
  height: 13px;
}

.btn-lg {
  height: 46px;
  padding: 0 20px;
  font-size: 12.5px;
  border-radius: 11px;
}

.btn-icon-only {
  width: 36px;
  padding: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  transition: var(--transition);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-3);
}

.icon-btn-sm {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.icon-btn-sm svg {
  width: 14px;
  height: 14px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  font-size: 10.5px;
  font-weight: 550;
  color: var(--primary);
  border: 0;
  background: transparent;
}

.text-link:hover {
  color: var(--primary-strong);
}

.text-link svg {
  width: 12px;
  height: 12px;
}

/* Avatars and logos */
.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  border-radius: 50%;
  background: var(--avatar-color, var(--primary));
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.avatar-sm {
  width: 29px;
  height: 29px;
  flex-basis: 29px;
  font-size: 8.5px;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  font-size: 14px;
}

.avatar-xl {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  font-size: 18px;
}

.avatar-stack {
  display: flex;
  padding-left: 7px;
}

.avatar-stack .avatar {
  margin-left: -7px;
  box-shadow: 0 0 0 2px var(--surface);
}

.company-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--logo-color);
  border-radius: 9px;
  background: color-mix(in srgb, var(--logo-color) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--logo-color) 18%, var(--border));
}

.company-logo-sm {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  font-size: 8px;
  border-radius: 7px;
}

.company-logo-lg {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
  font-size: 13px;
  border-radius: 13px;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.user-cell > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-cell strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-cell small {
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-cell-link {
  cursor: pointer;
}

.user-cell-link:hover strong {
  color: var(--primary);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  font-size: 9.5px;
  font-weight: 550;
  white-space: nowrap;
  border-radius: 99px;
  background: var(--surface-3);
  color: var(--muted);
}

.badge::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.badge-blue { color: #2563eb; background: #eff6ff; }
.badge-slate { color: #64748b; background: #f1f5f9; }
.badge-cyan { color: #0891b2; background: #ecfeff; }
.badge-violet { color: #7c3aed; background: #f5f3ff; }
.badge-amber { color: #b45309; background: #fffbeb; }
.badge-green { color: #15803d; background: #f0fdf4; }
.badge-red { color: #b91c1c; background: #fef2f2; }
.badge-orange { color: #c2410c; background: #fff7ed; }

[data-theme='dark'] .badge-blue { color: #93c5fd; background: rgba(37, 99, 235, 0.16); }
[data-theme='dark'] .badge-slate { color: #cbd5e1; background: rgba(100, 116, 139, 0.18); }
[data-theme='dark'] .badge-cyan { color: #67e8f9; background: rgba(8, 145, 178, 0.16); }
[data-theme='dark'] .badge-violet { color: #c4b5fd; background: rgba(124, 58, 237, 0.18); }
[data-theme='dark'] .badge-amber { color: #fcd34d; background: rgba(245, 158, 11, 0.15); }
[data-theme='dark'] .badge-green { color: #86efac; background: rgba(22, 163, 74, 0.16); }
[data-theme='dark'] .badge-red { color: #fca5a5; background: rgba(220, 38, 38, 0.16); }
[data-theme='dark'] .badge-orange { color: #fdba74; background: rgba(234, 88, 12, 0.16); }

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  font-size: 9.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.priority-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--muted-2);
}
.priority-haute { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.priority-moyenne { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.priority-basse { background: var(--muted-2); box-shadow: 0 0 0 3px var(--surface-3); }

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  font-size: 9.5px;
  font-weight: 550;
  white-space: nowrap;
  color: var(--stage-color);
  border-radius: 99px;
  background: var(--stage-bg);
}
.stage-badge span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* Cards and panels */
.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 0;
}

.panel-header.with-border {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

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

.panel-title h2,
.panel-title h3 {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.panel-title p {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-body {
  padding: 18px;
}

.panel-body.tight {
  padding: 12px;
}

.panel-body.no-top {
  padding-top: 0;
}

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

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

.section-heading a,
.section-heading button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 550;
  color: var(--primary);
  border: 0;
  background: none;
}

.section-heading a svg,
.section-heading button svg {
  width: 12px;
  height: 12px;
}

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

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

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

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
  gap: 16px;
}

.three-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 16px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  position: relative;
  min-height: 122px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--border) 75%, var(--primary));
  box-shadow: var(--shadow-md);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -35px;
  right: -35px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--primary-muted);
opacity: 0.8;
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}

.stat-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--stat-color, var(--primary));
  border-radius: 9px;
  background: var(--stat-soft, var(--primary-soft));
}

.stat-icon svg {
  width: 15px;
  height: 15px;
}

.stat-value {
  margin-top: 9px;
  font-size: clamp(22px, 2vw, 27px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.stat-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
  padding-right: 62px;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 600;
}

.stat-trend svg {
  width: 11px;
  height: 11px;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

.stat-period {
  font-size: 9px;
  color: var(--muted-2);
}

.stat-spark {
  position: absolute;
  right: 12px;
  bottom: 11px;
  width: 58px;
  height: 22px;
  opacity: 0.55;
}

/* Toolbar, filters and search */
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-left {
  flex: 1;
}

.search-field,
.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field > svg,
.input-icon > svg {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  pointer-events: none;
  color: var(--muted-2);
}

.search-field input,
.input-icon input {
  width: 100%;
  height: 34px;
  padding: 0 11px 0 32px;
  font-size: 11px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: var(--surface-2);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.search-field input:focus,
.input-icon input:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

.search-field input::placeholder,
.input-icon input::placeholder {
  color: var(--muted-2);
}

.search-field.wide {
  width: 240px;
}

.filter-select {
  height: 34px;
  padding: 0 28px 0 10px;
  font-size: 10.5px;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  appearance: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

.chip-filters {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  transition: var(--transition);
}

.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.chip.active {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.25);
  background: var(--primary-soft);
}

.chip .count {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 8px;
  font-weight: 600;
  color: inherit;
  border-radius: 99px;
  background: rgba(100, 116, 139, 0.1);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}

.segmented button {
  height: 28px;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 550;
  color: var(--muted);
  border: 0;
  border-radius: 7px;
  background: transparent;
  transition: var(--transition);
}

.segmented button.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.view-toggle {
  display: flex;
  gap: 3px;
}

.view-toggle button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
}

.view-toggle button svg {
  width: 14px;
  height: 14px;
}

.view-toggle button.active {
  color: var(--primary);
  border-color: var(--border);
  background: var(--surface);
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.data-table th {
  height: 40px;
  padding: 0 14px;
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table th.sortable:hover {
  color: var(--text);
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.th-sort svg {
  width: 10px;
  height: 10px;
  opacity: 0.5;
}

.data-table td {
  height: 60px;
  padding: 9px 14px;
  font-size: 11px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr.clickable {
  cursor: pointer;
}

.data-table .cell-main {
  display: flex;
  flex-direction: column;
}

.data-table .cell-main strong {
  font-size: 11px;
  font-weight: 550;
  color: var(--text);
}

.data-table .cell-main small {
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted);
}

.data-table .cell-muted {
  font-size: 10.5px;
  color: var(--muted);
}

.data-table .cell-money {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.data-table .cell-actions {
  width: 44px;
  text-align: right;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  opacity: 0.35;
  transition: opacity var(--transition);
}

tr:hover .row-actions {
  opacity: 1;
}

.row-actions .icon-btn {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
}

.row-actions .icon-btn svg {
  width: 13px;
  height: 13px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 15px;
  border-top: 1px solid var(--border);
}

.table-count {
  font-size: 10px;
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 3px;
}

.pagination button {
  min-width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  font-size: 9.5px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}

.pagination button:hover {
  color: var(--text);
  background: var(--surface-3);
}

.pagination button.active {
  color: #fff;
  background: var(--primary);
}

.pagination button:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pagination svg {
  width: 12px;
  height: 12px;
}

/* Progress bars */
.progress {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
transition: width 500ms ease;
}

.progress-sm {
  height: 4px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-row .progress {
  flex: 1;
}

.progress-label {
  min-width: 38px;
  font-size: 9.5px;
  font-weight: 550;
  text-align: right;
  color: var(--muted);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid .form-group.full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-soft);
}

.form-group label span {
  color: var(--danger);
}

.form-control {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  font-size: 11.5px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea.form-control {
  height: auto;
  min-height: 86px;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.55;
}

select.form-control {
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

.form-control::placeholder {
  color: var(--muted-2);
}

.form-hint {
  font-size: 9.5px;
  color: var(--muted);
}

.form-error {
  padding: 8px 10px;
  font-size: 10.5px;
  color: var(--danger);
  border-radius: 7px;
  background: var(--danger-soft);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.switch-row:last-child {
  border-bottom: 0;
}

.switch-copy strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

.switch-copy small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex: 0 0 36px;
}

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

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--border-strong);
  cursor: pointer;
  transition: background var(--transition);
}

.switch span::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform var(--transition);
}

.switch input:checked + span {
  background: var(--primary);
}

.switch input:checked + span::after {
  transform: translateX(16px);
}

/* Dropdowns */
.dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 90;
  width: 340px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px) scale(0.985);
  transform-origin: top right;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}

.dropdown-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 9px;
  border-bottom: 1px solid var(--border);
}

.dropdown-head strong {
  font-size: 12px;
  font-weight: 650;
}

.notification-list {
  max-height: 350px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.notification-item:hover {
  background: var(--surface-2);
}

.notification-icon {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.notification-icon svg {
  width: 14px;
  height: 14px;
}

.notif-warning { color: var(--warning); background: var(--warning-soft); }
.notif-info { color: var(--primary); background: var(--primary-soft); }
.notif-success { color: var(--success); background: var(--success-soft); }
.notif-danger { color: var(--danger); background: var(--danger-soft); }

.notification-item > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.notification-item strong {
  font-size: 10.5px;
  font-weight: 600;
}

.notification-item small {
  margin-top: 2px;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--muted);
}

.notification-item em {
  margin-top: 3px;
  font-size: 8.5px;
  font-style: normal;
  color: var(--muted-2);
}

.dropdown-foot {
  padding: 7px 10px 4px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.notification-btn {
  position: relative;
}

.notification-ping {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--surface);
}

.quick-create .quick-chevron {
  width: 11px;
  height: 11px;
  opacity: 0.7;
}

.dropdown-create {
  width: 295px;
  padding: 6px;
}

.dropdown-create a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 9px;
}

.dropdown-create a:hover {
  background: var(--surface-2);
}

.dropdown-create a > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.dropdown-create strong {
  font-size: 10.5px;
  font-weight: 600;
}

.dropdown-create small {
  margin-top: 1px;
  font-size: 9px;
  color: var(--muted);
}

.quick-icon {
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}

.quick-icon svg {
  width: 15px;
  height: 15px;
}

.quick-icon.blue { color: var(--primary); background: var(--primary-soft); }
.quick-icon.violet { color: var(--violet); background: var(--violet-soft); }
.quick-icon.amber { color: var(--warning); background: var(--warning-soft); }
.quick-icon.green { color: var(--success); background: var(--success-soft); }

/* Modal */
#modal-root {
  position: relative;
  z-index: 200;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.56);
  backdrop-filter: blur(5px);
  animation: overlay-in 180ms ease both;
}

.modal-overlay.is-closing {
  animation: overlay-out 180ms ease both;
}

.modal {
  width: min(580px, 100%);
  max-height: min(86vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 40px 120px -20px rgba(2, 6, 23, 0.5);
  animation: modal-in 220ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.modal-sm { width: min(430px, 100%); }
.modal-lg { width: min(760px, 100%); }
.modal-xl { width: min(980px, 100%); }

.modal-overlay.is-closing .modal {
  animation: modal-out 180ms ease both;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.modal-header p {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
}

.modal-close {
  margin: -4px -4px 0 0;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlay-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modal-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(8px) scale(0.99); } }

.confirm-box {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}

.confirm-box.confirm-danger {
  border-color: color-mix(in srgb, var(--danger) 20%, var(--border));
  background: var(--danger-soft);
}

.confirm-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  color: var(--danger);
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

.confirm-icon svg {
  width: 17px;
  height: 17px;
}

.confirm-box p {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-soft);
}

/* Profile modal */
.profile-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.profile-modal-head > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.profile-modal-head strong {
  font-size: 13px;
}

.profile-modal-head span:not(.avatar):not(.badge) {
  margin: 1px 0 5px;
  font-size: 10px;
  color: var(--muted);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border);
}

.profile-stats div {
  padding: 11px;
  text-align: center;
  background: var(--surface);
}

.profile-stats strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.03em;
}

.profile-stats small {
  font-size: 9px;
  color: var(--muted);
}

.profile-links {
  display: flex;
  flex-direction: column;
}

.profile-links a,
.profile-links button {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--text-soft);
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.profile-links a:hover,
.profile-links button:hover {
  color: var(--primary);
}

.profile-links svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.profile-links button {
  color: var(--danger);
}

/* Toast */
#toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  width: min(360px, calc(100vw - 32px));
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 11px;
  pointer-events: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: toast-in 240ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.toast.is-leaving {
  animation: toast-out 220ms ease both;
}

.toast-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.toast-icon svg {
  width: 15px;
  height: 15px;
}

.toast-success .toast-icon { color: var(--success); background: var(--success-soft); }
.toast-danger .toast-icon { color: var(--danger); background: var(--danger-soft); }
.toast-info .toast-icon { color: var(--primary); background: var(--primary-soft); }
.toast-warning .toast-icon { color: var(--warning); background: var(--warning-soft); }

.toast > div {
  flex: 1;
  min-width: 0;
}

.toast strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
}

.toast small {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted);
}

.toast-close {
  padding: 2px;
  color: var(--muted-2);
  border: 0;
  background: none;
}

.toast-close svg {
  width: 13px;
  height: 13px;
}

@keyframes toast-in { from { opacity: 0; transform: translateX(15px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(12px); } }

/* Empty states */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  color: var(--muted);
  border-radius: 14px;
  background: var(--surface-3);
}

.empty-state > span svg {
  width: 21px;
  height: 21px;
}

.empty-state strong {
  font-size: 12px;
  font-weight: 600;
}

.empty-state p {
  max-width: 320px;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
}

.empty-state.compact {
  padding: 26px 16px;
}

.empty-state.compact > span {
  width: 38px;
  height: 38px;
  margin-bottom: 9px;
}

/* Detail modal / drawer card content */
.detail-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.detail-summary > div {
  min-width: 0;
  flex: 1;
}

.detail-summary h3 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.detail-summary p {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 7px;
}

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

.detail-item {
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}

.detail-item.full {
  grid-column: 1 / -1;
}

.detail-item small {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-item small svg {
  width: 10px;
  height: 10px;
}

.detail-item strong,
.detail-item span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-soft);
  line-height: 1.45;
}

.detail-section {
  margin-top: 18px;
}

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

.detail-section-title h4 {
  font-size: 11px;
  font-weight: 650;
}

.detail-section-title span {
  font-size: 9px;
  color: var(--muted);
}

.detail-note {
  padding: 11px 12px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--text-soft);
  border-left: 2px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: var(--primary-soft);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 19px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 7px;
  left: 5px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 2px;
  left: -19px;
  width: 11px;
  height: 11px;
  display: grid;
  place-items: center;
  color: var(--primary);
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--border);
}

.timeline-dot svg {
  width: 8px;
  height: 8px;
  color: #fff;
}

.timeline-item.done .timeline-dot {
  background: var(--success);
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timeline-head strong {
  font-size: 10.5px;
  font-weight: 600;
}

.timeline-head span {
  flex: 0 0 auto;
  font-size: 8.5px;
  color: var(--muted-2);
}

.timeline-item p {
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* Activity list */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row:hover {
  background: var(--surface-2);
}

.activity-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.activity-icon svg {
  width: 14px;
  height: 14px;
}

.activity-call { color: var(--primary); background: var(--primary-soft); }
.activity-email { color: var(--cyan); background: var(--cyan-soft); }
.activity-meeting { color: var(--violet); background: var(--violet-soft); }
.activity-demo { color: var(--warning); background: var(--warning-soft); }
.activity-followup { color: var(--success); background: var(--success-soft); }
.activity-note { color: var(--muted); background: var(--surface-3); }
.activity-message { color: #c026d3; background: #fdf4ff; }

[data-theme='dark'] .activity-message { color: #f0abfc; background: rgba(192, 38, 211, 0.14); }

.activity-copy {
  min-width: 0;
  flex: 1;
}

.activity-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.activity-copy small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 9px;
  color: var(--muted);
}

.activity-copy small span {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted-2);
}

.activity-time {
  flex: 0 0 auto;
  font-size: 9px;
  color: var(--muted-2);
  text-align: right;
}

.activity-time strong {
  display: block;
  font-size: 9.5px;
  font-weight: 550;
  color: var(--muted);
}

.activity-actions {
  flex: 0 0 auto;
  min-width: 96px;
}

.activity-group + .activity-group {
  border-top: 1px solid var(--border);
}

.activity-row a:hover {
  text-decoration: underline;
}

/* Lead score / probability */
.score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-soft);
}

.score-ring {
  --score: 50;
  --score-color: var(--primary);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--score-color);
}

.score-ring::before {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
}

.score-ring + span {
  color: var(--muted);
}

/* Tabs */
.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  height: 42px;
  padding: 0 13px;
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
  color: var(--muted);
  border: 0;
  background: transparent;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--primary);
}

.tab.active::after {
  content: '';
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--primary);
}

.tab .count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  margin-left: 3px;
  font-size: 8px;
  color: var(--muted);
  border-radius: 99px;
  background: var(--surface-3);
}

/* Kanban */
.kanban-scroll {
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-board {
  display: flex;
  gap: 11px;
  min-width: max-content;
  align-items: flex-start;
}

.kanban-column {
  width: 282px;
  flex: 0 0 282px;
  display: flex;
  flex-direction: column;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-2) 75%, var(--surface));
}

.kanban-column.drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 3px 10px;
}

.kanban-head-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.kanban-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stage-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--stage-color) 12%, transparent);
}

.kanban-head strong {
  font-size: 10.5px;
  font-weight: 650;
}

.kanban-count {
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.kanban-value {
  padding: 0 3px 8px;
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 60px;
}

.kanban-card {
  padding: 11px;
  cursor: grab;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition), opacity var(--transition);
}

.kanban-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.kanban-card.dragging {
  opacity: 0.45;
  transform: rotate(1.5deg);
}

.kanban-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.kanban-card-head strong {
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.kanban-card-company {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 9px;
  color: var(--muted);
}

.kanban-card-company svg {
  width: 10px;
  height: 10px;
}

.kanban-card-value {
  margin-top: 9px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}

.kanban-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.kanban-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  color: var(--muted);
}

.kanban-meta svg {
  width: 10px;
  height: 10px;
}

.kanban-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.kanban-add {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 9.5px;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: transparent;
}

.kanban-add:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.kanban-add svg {
  width: 12px;
  height: 12px;
}

.pipeline-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.summary-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.summary-mini-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  color: var(--summary-color, var(--primary));
  border-radius: 9px;
  background: var(--summary-bg, var(--primary-soft));
}

.summary-mini-icon svg {
  width: 15px;
  height: 15px;
}

.summary-mini div {
  display: flex;
  flex-direction: column;
}

.summary-mini strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.summary-mini small {
  font-size: 9px;
  color: var(--muted);
}

/* Calendar */
.calendar-scroll {
  overflow-x: auto;
}

.agenda-day + .agenda-day {
  border-top: 1px solid var(--border);
}

.agenda-list .meeting-card:hover {
  background: var(--surface-2);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-month {
  min-width: 140px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-align: center;
  text-transform: capitalize;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday {
  padding: 9px 10px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.calendar-day {
  min-height: 116px;
  padding: 7px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background var(--transition);
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day:hover {
  background: var(--surface-2);
}

.calendar-day.other {
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}

.calendar-day.other .calendar-date {
  color: var(--muted-2);
}

.calendar-day.today {
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface));
}

.calendar-date {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 50%;
}

.calendar-day.today .calendar-date {
  font-weight: 700;
  color: #fff;
  background: var(--primary);
}

.calendar-event {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 3px 5px;
  margin-bottom: 3px;
  overflow: hidden;
  font-size: 8.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--event-color);
  border: 0;
  border-left: 2px solid var(--event-color);
  border-radius: 0 4px 4px 0;
  background: color-mix(in srgb, var(--event-color) 9%, var(--surface));
}

.calendar-event:hover {
  background: color-mix(in srgb, var(--event-color) 16%, var(--surface));
}

.calendar-event time {
  font-size: 7.5px;
  opacity: 0.8;
}

.calendar-more {
  padding: 1px 4px;
  font-size: 7.5px;
  color: var(--muted);
  border: 0;
  background: transparent;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 9px;
  color: var(--muted);
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.calendar-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--legend-color);
}

.week-view .calendar-day {
  min-height: 380px;
}

.day-view .calendar-grid {
  min-width: 0;
  grid-template-columns: 1fr;
}

.day-view .calendar-day {
  min-height: 400px;
  padding: 14px;
}

.day-view .calendar-date {
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  font-size: 11px;
}

.day-view .calendar-event {
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 10px;
}

.day-view .calendar-event time {
  font-size: 9px;
}

.day-view .calendar-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.day-view .calendar-empty i {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  color: var(--muted-2);
}

/* Agenda / upcoming list */
.meeting-card {
  display: flex;
  gap: 11px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
}

.meeting-card:last-child {
  border-bottom: 0;
}

.meeting-date {
  width: 39px;
  height: 44px;
  flex: 0 0 39px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}

.meeting-date strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.meeting-date small {
  margin-top: 2px;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.meeting-copy {
  min-width: 0;
  flex: 1;
}

.meeting-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.meeting-copy small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 9px;
  color: var(--muted);
}

.meeting-copy small svg {
  width: 10px;
  height: 10px;
}

.meeting-type {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 6px;
  margin-top: 5px;
  font-size: 8px;
  color: var(--event-color);
  border-radius: 4px;
  background: color-mix(in srgb, var(--event-color) 10%, var(--surface));
}

/* Task list */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.task-item:hover {
  background: var(--surface-2);
}

.task-check {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  color: transparent;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  transition: var(--transition);
}

.task-check svg {
  width: 10px;
  height: 10px;
}

.task-check:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.task-item.done .task-check {
  color: #fff;
  border-color: var(--success);
  background: var(--success);
}

.task-copy {
  flex: 1;
  min-width: 0;
}

.task-copy strong {
  display: block;
  font-size: 10.5px;
  font-weight: 550;
  line-height: 1.4;
}

.task-item.done .task-copy strong {
  color: var(--muted);
  text-decoration: line-through;
}

.task-copy small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 9px;
  color: var(--muted);
}

.task-copy small svg {
  width: 10px;
  height: 10px;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}

.task-due {
  font-size: 8.5px;
}

.task-due.late {
  color: var(--danger);
  font-weight: 600;
}

/* Communications */
.comm-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 250px;
  min-height: 620px;
  overflow: hidden;
}

.comm-context {
  overflow-y: auto;
  max-height: 620px;
  border-left: 1px solid var(--border);
  background: var(--surface-2);
}

.comm-context-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.comm-context-head strong {
  margin-top: 7px;
  font-size: 11px;
  font-weight: 650;
}

.comm-context-head small {
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--muted);
}

.comm-context-head .detail-badges {
  margin-top: 6px;
}

.comm-context-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.comm-context-label {
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.comm-context-section > a,
.comm-context-section > span:not(.comm-context-label) {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  font-size: 9px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comm-context-section a:hover {
  color: var(--primary);
}

.comm-context-section svg {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
}

.comm-opp {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.comm-opp span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.comm-opp strong {
  overflow: hidden;
  font-size: 9px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comm-opp small {
  font-size: 7.5px;
  color: var(--muted);
}

.comm-opp b {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 650;
  color: var(--primary);
}

.comm-sidebar {
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}

.comm-sidebar-head {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.comm-list {
  overflow-y: auto;
  max-height: 560px;
}

.comm-thread {
  display: flex;
  gap: 9px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  transition: background var(--transition);
}

.comm-thread:hover {
  background: var(--surface);
}

.comm-thread.active {
  background: var(--surface);
  box-shadow: inset 2px 0 0 var(--primary);
}

.comm-thread-copy {
  min-width: 0;
  flex: 1;
}

.comm-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.comm-thread-head strong {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.comm-thread-head time {
  flex: 0 0 auto;
  font-size: 8px;
  color: var(--muted-2);
}

.comm-thread-copy > small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.comm-thread-preview {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 9px;
  color: var(--muted-2);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.comm-unread {
  min-width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  font-size: 7.5px;
  font-weight: 650;
  color: #fff;
  border-radius: 99px;
  background: var(--primary);
}

.comm-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.comm-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.comm-main-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.comm-main-head strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.comm-main-head small {
  font-size: 9px;
  color: var(--muted);
}

.comm-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--surface-2, #f1f5f9);
}

.message-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  max-width: 78%;
}

.message-row.me {
  margin-left: auto;
  flex-direction: row-reverse;
}

.message-row.note {
  max-width: 100%;
}

.message-avatar {
  margin-top: 1px;
}

.message-bubble {
  padding: 9px 11px;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 3px 11px 11px 11px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.message-row.me .message-bubble {
  color: #fff;
  border-color: transparent;
  border-radius: 11px 3px 11px 11px;
  background: var(--primary);
}

.message-row.note .message-bubble {
  color: var(--text-soft);
  border: 1px dashed var(--warning);
  border-radius: 8px;
  background: var(--warning-soft);
}

.message-time {
  margin-top: 4px;
  font-size: 7.5px;
  text-align: right;
  color: var(--muted-2);
}

.message-row.me .message-time {
  color: rgba(255, 255, 255, 0.7);
}

.comm-composer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 7px;
}

.composer-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.composer-input textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  padding: 10px 11px;
  font-size: 10.5px;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: 0;
  background: var(--surface-2);
}

.composer-input textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

.template-bar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.template-chip {
  height: 24px;
  padding: 0 8px;
  font-size: 8.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.template-chip:hover {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.3);
}

/* Assistant */
.assistant-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 280px;
  gap: 16px;
  min-height: calc(100vh - 190px);
}

.assistant-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-orb {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 4px auto 12px;
  color: #fff;
  border-radius: 17px;
  background: var(--primary);
box-shadow: 0 14px 36px -10px rgba(37, 99, 235, 0.55);
}

.ai-orb::before,
.ai-orb::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 22px;
  animation: ai-pulse 3s ease-in-out infinite;
}

.ai-orb::after {
  inset: -13px;
  animation-delay: 1.5s;
}

.ai-orb svg {
  width: 25px;
  height: 25px;
}

@keyframes ai-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.96); }
  50% { opacity: 0.7; transform: scale(1.03); }
}

.assistant-main {
  display: flex;
  flex-direction: column;
  min-height: 630px;
  overflow: hidden;
}

.assistant-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--border);
}

.assistant-chat-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.assistant-chat-head strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
}

.assistant-chat-head small {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
  font-size: 8.5px;
  color: var(--success);
}

.assistant-chat-head small::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
}

.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--surface-2, #f1f5f9);
}

.ai-message {
  display: flex;
  gap: 9px;
  max-width: 86%;
  margin-bottom: 17px;
}

.ai-message.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.ai-message-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  background: var(--primary);
}

.ai-message-avatar svg {
  width: 14px;
  height: 14px;
}

.ai-message.user .ai-message-avatar {
  color: var(--muted);
  background: var(--surface-3);
}

.ai-bubble {
  padding: 11px 13px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 3px 12px 12px 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.ai-message.user .ai-bubble {
  color: #fff;
  border-color: transparent;
  border-radius: 12px 3px 12px 12px;
  background: var(--primary);
}

.ai-message.user .ai-bubble strong {
  color: #fff;
}

.ai-bubble strong {
  color: var(--text);
  font-weight: 650;
}

.ai-bubble ul {
  margin: 6px 0 0;
  padding-left: 0;
}

.ai-bubble li {
  position: relative;
  padding-left: 14px;
  margin-top: 4px;
}

.ai-bubble li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}

.ai-bubble .ai-highlight {
  color: var(--primary);
  font-weight: 650;
}

.ai-typing {
  display: flex;
  gap: 3px;
  padding: 4px 2px;
}

.ai-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
  animation: typing 1.2s infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.assistant-input-wrap {
  padding: 12px 17px 14px;
  border-top: 1px solid var(--border);
}

.suggestions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.suggestion {
  height: 25px;
  padding: 0 8px;
  font-size: 8.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
}

.suggestion:hover {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.3);
  background: var(--primary-soft);
}

.assistant-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 5px 5px 5px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  transition: var(--transition);
}

.assistant-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

.assistant-input textarea {
  flex: 1;
  min-height: 30px;
  max-height: 100px;
  padding: 6px 0;
  font-size: 10.5px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
}

.assistant-input .btn {
  width: 32px;
  height: 32px;
  padding: 0;
}

.ai-prompt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 9px;
  margin-bottom: 5px;
  font-size: 9.5px;
  line-height: 1.4;
  text-align: left;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: var(--transition);
}

.ai-prompt:hover {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.28);
  background: var(--primary-soft);
}

.ai-prompt svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin-top: 1px;
  color: var(--primary);
}

.ai-insight {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.ai-insight span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  margin-bottom: 7px;
  color: var(--violet);
  border-radius: 8px;
  background: var(--violet-soft);
}

.ai-insight span svg {
  width: 13px;
  height: 13px;
}

.ai-insight strong {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
}

.ai-insight p {
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.5;
  color: var(--muted);
}

/* Settings */
.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-self: start;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.settings-nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 9px;
  font-size: 10.5px;
  font-weight: 500;
  text-align: left;
  color: var(--muted);
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.settings-nav button svg {
  width: 14px;
  height: 14px;
}

.settings-nav button:hover {
  color: var(--text);
  background: var(--surface-2);
}

.settings-nav button.active {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-soft);
}

.settings-panel {
  min-height: 500px;
}

.settings-section {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.settings-section:last-child {
  border-bottom: 0;
}

.settings-section h3 {
  font-size: 12px;
  font-weight: 650;
}

.settings-section > p {
  margin-top: 3px;
  margin-bottom: 16px;
  font-size: 10px;
  color: var(--muted);
}

.logo-upload {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
}

.logo-preview {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 750;
  color: #fff;
  border-radius: 15px;
  background: var(--primary);
}

.logo-upload-copy {
  flex: 1;
}

.logo-upload-copy strong {
  display: block;
  font-size: 10.5px;
}

.logo-upload-copy small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: var(--muted);
}

/* Campaign cards / reports */
.campaign-card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), transform var(--transition);
}

.campaign-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.campaign-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.campaign-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--campaign-color);
  border-radius: 9px;
  background: color-mix(in srgb, var(--campaign-color) 10%, var(--surface));
}

.campaign-icon svg {
  width: 15px;
  height: 15px;
}

.campaign-card h3 {
  margin-top: 11px;
  font-size: 11.5px;
  font-weight: 600;
}

.campaign-card > p {
  margin-top: 2px;
  font-size: 9px;
  color: var(--muted);
}

.campaign-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.campaign-metrics div {
  padding: 7px;
  text-align: center;
  background: var(--surface);
}

.campaign-metrics strong {
  display: block;
  font-size: 11px;
  font-weight: 650;
}

.campaign-metrics small {
  font-size: 7.5px;
  color: var(--muted);
}

.campaign-progress {
  margin-top: 11px;
}

.campaign-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 8.5px;
  color: var(--muted);
}

.ranking-list {
  display: flex;
  flex-direction: column;
}

.ranking-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.ranking-row:last-child {
  border-bottom: 0;
}

.rank-number {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  border-radius: 6px;
  background: var(--surface-3);
}

.rank-number.top {
  color: #92400e;
  background: #fef3c7;
}

[data-theme='dark'] .rank-number.top {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.15);
}

.ranking-copy {
  flex: 1;
  min-width: 0;
}

.ranking-copy strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
}

.ranking-copy small {
  font-size: 8.5px;
  color: var(--muted);
}

.ranking-value {
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.ranking-value small {
  display: block;
  font-size: 8px;
  font-weight: 400;
  color: var(--muted);
}

.team-card {
  padding: 18px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition);
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.team-card .avatar {
  margin: 0 auto 9px;
}

.team-card h3 {
  font-size: 12px;
  font-weight: 650;
}

.team-card > p {
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted);
}

.team-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 13px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.team-card-metrics div {
  padding: 8px;
  background: var(--surface);
}

.team-card-metrics strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
}

.team-card-metrics small {
  font-size: 8px;
  color: var(--muted);
}

/* KPI cards (reports) */
.kpi-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.kpi-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.kpi-mini span {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  color: var(--kpi-color, var(--primary));
  border-radius: 8px;
  background: var(--kpi-bg, var(--primary-soft));
}

.kpi-mini span svg {
  width: 14px;
  height: 14px;
}

.kpi-mini strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.kpi-mini small {
  font-size: 8.5px;
  color: var(--muted);
}

/* Export button group */
.export-group {
  display: flex;
  gap: 6px;
}

/* Landing */
.landing-hero {
  position: relative;
  padding: 80px 0 56px;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top: -220px;
  left: 50%;
  width: 900px;
  height: 650px;
  transform: translateX(-50%);
  background: var(--primary-muted);
pointer-events: none;
}

[data-theme='dark'] .landing-hero::before {
  background: var(--primary-muted);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 54px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 6px;
  margin-bottom: 22px;
  font-size: 10px;
  font-weight: 550;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.hero-badge span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 8.5px;
  font-weight: 650;
  color: var(--primary);
  border-radius: 99px;
  background: var(--primary-soft);
}

.hero-badge svg {
  width: 11px;
  height: 11px;
}

.hero-title {
  font-size: clamp(38px, 5.1vw, 66px);
  line-height: 1.02;
  font-weight: 750;
  letter-spacing: -0.065em;
  color: var(--text);
}

.hero-title em {
  position: relative;
  font-style: normal;
  color: var(--primary);
}

.hero-title em::after {
  content: '';
  position: absolute;
  height: 8px;
  right: 0;
  bottom: 3px;
  left: 0;
  z-index: -1;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.16);
}

.hero-text {
  max-width: 530px;
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font-size: 10px;
  color: var(--muted);
}

.hero-proof .avatar-stack .avatar {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  font-size: 8px;
}

.hero-proof strong {
  color: var(--text-soft);
  font-weight: 600;
}

.hero-preview-wrap {
  position: relative;
}

.hero-preview-glow {
  position: absolute;
  inset: 8% -5% -5% 5%;
  border-radius: 32px;
  background: var(--primary-muted);
filter: blur(30px);
}

.hero-preview {
  position: relative;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 40px 90px -32px rgba(15, 23, 42, 0.35);
  transform: perspective(1200px) rotateY(-3deg) rotateX(1deg);
}

.hero-preview-inner {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--bg);
}

.mini-browser {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.mini-browser i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
}

.mini-browser span {
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 7px;
  color: var(--muted-2);
  border-radius: 4px;
  background: var(--surface-2);
}

.hero-app {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  min-height: 335px;
}

.hero-app-side {
  padding: 12px 8px;
  background: #0b1220;
}

.hero-app-logo {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 15px;
  color: #fff;
  font-size: 8px;
  font-weight: 650;
}

.hero-app-logo span {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  font-size: 8px;
  border-radius: 5px;
  background: var(--primary);
}

.hero-app-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 5px;
  margin-bottom: 2px;
  font-size: 6.5px;
  color: #64748b;
  border-radius: 4px;
}

.hero-app-nav.active {
  color: #e2e8f0;
  background: rgba(37, 99, 235, 0.22);
}

.hero-app-nav i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.6;
}

.hero-app-main {
  padding: 12px;
}

.hero-app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.hero-app-top strong {
  font-size: 8.5px;
  font-weight: 650;
  color: var(--text);
}

.hero-app-top span {
  width: 46px;
  height: 13px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 7px;
}

.hero-kpi {
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}

.hero-kpi small {
  display: block;
  font-size: 5px;
  color: var(--muted);
}

.hero-kpi strong {
  display: block;
  margin-top: 2px;
  font-size: 8px;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-kpi em {
  display: block;
  width: 70%;
  height: 2px;
  margin-top: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--primary) 20%, var(--surface-3));
}

.hero-kpi em::after {
  content: '';
  display: block;
  width: 72%;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.hero-chart-card {
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}

.hero-chart-card > span {
  display: block;
  width: 50px;
  height: 3px;
  margin-bottom: 7px;
  border-radius: 2px;
  background: var(--surface-3);
}

.hero-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 71px;
}

.hero-chart i {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--primary);
}

.hero-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: float 5s ease-in-out infinite;
}

.hero-float svg {
  width: 14px;
  height: 14px;
}

.hero-float strong {
  display: block;
  font-size: 8px;
  font-weight: 600;
}

.hero-float small {
  display: block;
  font-size: 6.5px;
  color: var(--muted);
}

.hero-float-one {
  top: 12%;
  left: -30px;
}

.hero-float-two {
  right: -22px;
  bottom: 12%;
  animation-delay: 1.4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.landing-logos {
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.landing-logos .landing-shell {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.landing-logos p {
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.03em;
  opacity: 0.65;
}

.logo-row span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.logo-row i {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: currentColor;
  opacity: 0.55;
}

.landing-section {
  padding: 68px 0;
}

.section-kicker {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.landing-section-head {
  max-width: 630px;
  margin-bottom: 34px;
}

.landing-section-head h2 {
  margin-top: 9px;
  font-size: clamp(25px, 3.2vw, 37px);
  line-height: 1.17;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.landing-section-head p {
  margin-top: 13px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--feature-color);
  border-radius: 10px;
  background: color-mix(in srgb, var(--feature-color) 10%, var(--surface));
}

.feature-icon svg {
  width: 18px;
  height: 18px;
}

.feature-card h3 {
  margin-top: 13px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.feature-card p {
  margin-top: 5px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
}

.feature-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 9px;
  color: var(--muted);
}

.feature-stat strong {
  font-size: 13px;
  color: var(--text);
  letter-spacing: -0.03em;
}

.landing-cta {
  position: relative;
  padding: 48px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--navy);
box-shadow: var(--shadow-lg);
}

.landing-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background: rgba(255, 255, 255, 0.04);
}

.landing-cta > div {
  position: relative;
  max-width: 580px;
}

.landing-cta .section-kicker {
  color: #93c5fd;
}

.landing-cta h2 {
  margin-top: 10px;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.045em;
  color: #fff;
}

.landing-cta p {
  margin-top: 13px;
  font-size: 12px;
  line-height: 1.7;
  color: #94a3b8;
}

.landing-cta .hero-actions {
  margin-top: 23px;
}

.landing-cta .btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.landing-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Conversion page */
.conversion-body {
  background: var(--bg);
}

.conversion-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 28px 80px;
}

.conversion-hero {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.conversion-hero h1 {
  margin-top: 18px;
  font-size: clamp(32px, 4.7vw, 56px);
  line-height: 1.07;
  font-weight: 750;
  letter-spacing: -0.06em;
}

.conversion-hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.conversion-hero > p {
  max-width: 650px;
  margin: 20px auto 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.conversion-benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin: 36px 0;
}

.conversion-benefit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.conversion-benefit span {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  color: var(--success);
  border-radius: 7px;
  background: var(--success-soft);
}

.conversion-benefit span svg {
  width: 13px;
  height: 13px;
}

.conversion-benefit strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

.conversion-benefit small {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted);
}

.conversion-form-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.conversion-form-card h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.conversion-form-card > p {
  margin-top: 5px;
  margin-bottom: 20px;
  font-size: 11px;
  color: var(--muted);
}

.contact-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 10px;
  color: var(--muted);
}

.contact-cta-row a {
  color: var(--primary);
  font-weight: 550;
}

/* Search modal */
.global-search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.global-search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

.global-search-field svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.global-search-field input {
  flex: 1;
  height: 44px;
  font-size: 12px;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-result-meta {
  margin-bottom: 7px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.global-search-results {
  max-height: 400px;
  overflow-y: auto;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 8px;
}

.search-result:hover {
  background: var(--surface-2);
}

.search-result-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  color: var(--primary);
  border-radius: 8px;
  background: var(--primary-soft);
}

.search-result-icon svg {
  width: 14px;
  height: 14px;
}

.search-result-copy {
  min-width: 0;
  flex: 1;
}

.search-result-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-result-copy small {
  display: block;
  overflow: hidden;
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-result-type {
  font-size: 8.5px;
  color: var(--muted-2);
}

.search-result-arrow {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

/* Misc */
.divider {
  height: 1px;
  background: var(--border);
}

.dot-sep {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted-2);
}

.inline-flex {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.icon-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: var(--muted);
}

.icon-text svg {
  width: 11px;
  height: 11px;
}

.skeleton {
  border-radius: 6px;
  background: var(--surface-3);
  animation: skeleton 1.4s ease infinite;
}

@keyframes skeleton {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}

.alert svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
}

.alert-info {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.18);
  background: var(--primary-soft);
}

.alert-warning {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.2);
  background: var(--warning-soft);
}

.alert-danger {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.18);
  background: var(--danger-soft);
}

.alert strong {
  font-weight: 600;
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.notif-row .notification-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.notif-row strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
}

.notif-row p {
  margin-top: 2px;
  font-size: 9px;
  color: var(--muted);
}

.notif-row time {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  color: var(--muted-2);
}

/* Landing & conversion additions */
.landing-mobile-toggle {
  display: none;
}

.form-control.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.landing-nav.open {
  display: flex;
  position: absolute;
  top: 66px;
  right: 18px;
  left: 18px;
  z-index: 50;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.landing-nav.open a {
  padding: 10px;
  font-size: 12px;
  border-radius: 7px;
}

.landing-nav.open a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

@media (max-width: 700px) {
  .landing-mobile-toggle {
    display: grid;
  }
}
