/* Attendance and leave management */
.attendance-page-root {
  --att-ink: #172033;
  --att-muted: #718096;
  --att-line: #e7eaf1;
  --att-panel: rgba(255, 255, 255, 0.94);
  --att-violet: #6d5dfc;
  color: var(--att-ink);
}

.attendance-page-root svg {
  width: 1.15em;
  height: 1.15em;
}

.attendance-workspace {
  position: relative;
  display: grid;
  gap: 1.25rem;
  max-width: 1480px;
  margin: 0 auto;
}

.attendance-hero,
.attendance-admin-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 5%, rgba(255, 255, 255, 0.16), transparent 27%),
    radial-gradient(circle at 5% 100%, rgba(124, 58, 237, 0.38), transparent 38%),
    linear-gradient(128deg, #121a37 0%, #27346b 52%, #6044d9 100%);
  color: #fff;
  box-shadow: 0 22px 48px rgba(30, 41, 89, 0.2);
}

.attendance-hero::before,
.attendance-admin-hero::before {
  position: absolute;
  top: -100px;
  right: -52px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 36px rgba(255, 255, 255, 0.025),
    0 0 0 74px rgba(255, 255, 255, 0.018);
  content: "";
}

.attendance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.6fr);
  align-items: center;
  min-height: 286px;
  padding: 2.5rem 2.8rem;
}

.attendance-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 660px;
}

.attendance-eyebrow {
  display: inline-flex;
  margin-bottom: 0.5rem;
  color: #8b7cf8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.attendance-hero .attendance-eyebrow,
.attendance-admin-hero .attendance-eyebrow {
  color: #bcb4ff;
}

.attendance-hero h2,
.attendance-admin-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.055em;
}

.attendance-hero-copy > p,
.attendance-admin-hero > div > p {
  max-width: 650px;
  margin: 0.8rem 0 0;
  color: rgba(236, 240, 255, 0.76);
  font-size: 0.93rem;
  line-height: 1.65;
}

.attendance-today-date {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.35rem;
  padding: 0.64rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
  color: #f8faff;
  font-size: 0.78rem;
  font-weight: 650;
  backdrop-filter: blur(10px);
}

.attendance-clock-card {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.35rem 1.7rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.attendance-clock-label {
  color: rgba(228, 232, 255, 0.64);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.attendance-clock-card > strong {
  margin: 0.45rem 0 0.7rem;
  color: #fff;
  font-size: clamp(2.25rem, 4vw, 3.35rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
}

.attendance-clock-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.attendance-clock-meta span {
  display: grid;
  gap: 0.18rem;
  text-align: center;
}

.attendance-clock-meta small {
  color: rgba(226, 232, 255, 0.58);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.attendance-clock-meta i {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.18);
}

.attendance-primary-action {
  display: inline-flex;
  min-width: 180px;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.72rem 1.1rem;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #4737c9;
  box-shadow: 0 11px 24px rgba(8, 15, 48, 0.22);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.attendance-primary-action:hover:not(:disabled) {
  box-shadow: 0 15px 28px rgba(8, 15, 48, 0.3);
  transform: translateY(-2px);
}

.attendance-primary-action:disabled {
  opacity: 0.62;
  cursor: default;
}

.attendance-late-note {
  margin: 0.55rem 0 -0.5rem;
  color: #fed7aa;
  font-size: 0.66rem;
}

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

.attendance-metric {
  display: flex;
  min-height: 108px;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem;
  border: 1px solid var(--att-line);
  border-radius: 20px;
  background: var(--att-panel);
  box-shadow: 0 9px 25px rgba(30, 41, 59, 0.055);
}

.attendance-metric-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 15px;
}

.attendance-metric-icon svg {
  width: 21px;
  height: 21px;
}

.attendance-metric.is-blue .attendance-metric-icon { background: #eaf2ff; color: #3b70ed; }
.attendance-metric.is-violet .attendance-metric-icon { background: #f0edff; color: #7158eb; }
.attendance-metric.is-amber .attendance-metric-icon { background: #fff4db; color: #d58a15; }
.attendance-metric.is-green .attendance-metric-icon { background: #e5f8ef; color: #20a667; }

.attendance-metric div {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.attendance-metric strong {
  overflow: hidden;
  color: var(--att-ink);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-metric span:last-child {
  color: var(--att-muted);
  font-size: 0.73rem;
  font-weight: 650;
}

.attendance-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.72fr);
  gap: 1rem;
}

.attendance-panel,
.attendance-admin-board {
  overflow: hidden;
  border: 1px solid var(--att-line);
  border-radius: 22px;
  background: var(--att-panel);
  box-shadow: 0 9px 28px rgba(30, 41, 59, 0.05);
}

.attendance-panel {
  padding: 1.35rem;
}

.attendance-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.attendance-panel-head h3 {
  margin: 0;
  color: var(--att-ink);
  font-size: 1.05rem;
  letter-spacing: -0.025em;
}

.attendance-panel-head .attendance-eyebrow {
  margin-bottom: 0.18rem;
  font-size: 0.58rem;
}

.attendance-request-btn,
.attendance-filter-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border: 0;
  border-radius: 10px;
  background: #6554e8;
  color: #fff;
  font-size: 0.73rem;
  font-weight: 750;
  cursor: pointer;
}

.attendance-request-btn span {
  font-size: 1.1rem;
  line-height: 0;
}

.attendance-leave-list {
  display: grid;
  gap: 0.7rem;
}

.attendance-leave-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem;
  border: 1px solid var(--att-line);
  border-radius: 15px;
  background: rgba(248, 250, 252, 0.66);
}

.attendance-leave-type-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: #f0edff;
  color: #6d5dfc;
}

.attendance-leave-type-icon.is-sick,
.attendance-leave-type-icon.is-emergency { background: #fff0f1; color: #dc5663; }
.attendance-leave-type-icon.is-annual { background: #eaf8f1; color: #27a66d; }
.attendance-leave-type-icon.is-unpaid { background: #fff4dd; color: #c98920; }

.attendance-leave-card-main {
  min-width: 0;
}

.attendance-leave-card-main > div {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.attendance-leave-card-main strong {
  color: var(--att-ink);
  font-size: 0.8rem;
}

.attendance-leave-card-main p {
  margin: 0.3rem 0 0;
  color: var(--att-muted);
  font-size: 0.7rem;
}

.attendance-leave-card-main p span { color: #a6afbf; }

.attendance-leave-card-main small {
  display: block;
  overflow: hidden;
  margin-top: 0.36rem;
  color: #7668a9;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-status {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.52rem;
  border-radius: 20px;
  background: #fff4dd;
  color: #b27716;
  font-size: 0.6rem;
  font-weight: 800;
}

.attendance-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.attendance-status.is-approved,
.attendance-status.is-present { background: #e8f8f0; color: #168856; }
.attendance-status.is-rejected { background: #fff0f1; color: #c7434e; }
.attendance-status.is-late { background: #fff4dd; color: #b8750e; }

.attendance-icon-btn {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--att-line);
  border-radius: 9px;
  background: var(--att-panel);
  color: #7e8797;
  cursor: pointer;
}

.attendance-month-panel {
  display: flex;
  flex-direction: column;
}

.attendance-ring {
  display: grid;
  width: 155px;
  height: 155px;
  margin: 0.6rem auto 1.25rem;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#705df2 calc(var(--attendance-value) * 1%), #ececf4 0);
}

.attendance-ring::before {
  grid-area: 1 / 1;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: var(--att-panel);
  content: "";
}

.attendance-ring > div {
  z-index: 1;
  display: grid;
  grid-area: 1 / 1;
  text-align: center;
}

.attendance-ring strong { color: var(--att-ink); font-size: 1.75rem; letter-spacing: -0.06em; }
.attendance-ring span { color: var(--att-muted); font-size: 0.64rem; }

.attendance-summary-rows {
  display: grid;
  gap: 0.72rem;
  margin-top: auto;
}

.attendance-summary-rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--att-muted);
  font-size: 0.72rem;
}

.attendance-summary-rows span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.attendance-summary-rows i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.attendance-summary-rows i.is-green { background: #2ab278; }
.attendance-summary-rows i.is-amber { background: #e5a32e; }
.attendance-summary-rows i.is-violet { background: #705df2; }
.attendance-summary-rows strong { color: var(--att-ink); }

.attendance-leave-form-wrap {
  position: fixed;
  z-index: 180;
  inset: 0;
}

.attendance-form-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}

.attendance-leave-form {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(610px, 100%);
  height: 100%;
  flex-direction: column;
  overflow-y: auto;
  padding: 2rem;
  background: #fff;
  box-shadow: -24px 0 70px rgba(15, 23, 42, 0.24);
  animation: attendance-form-in 220ms ease-out;
}

@keyframes attendance-form-in {
  from { opacity: 0; transform: translateX(36px); }
  to { opacity: 1; transform: translateX(0); }
}

.attendance-form-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid #e9ebf1;
}

.attendance-form-head h3 {
  margin: 0;
  color: #192033;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.attendance-form-head p {
  margin: 0.4rem 0 0;
  color: #7a8495;
  font-size: 0.78rem;
}

.attendance-form-head > button {
  width: 38px;
  height: 38px;
  border: 1px solid #e3e6ed;
  border-radius: 11px;
  background: #f8fafc;
  color: #637083;
  font-size: 1.35rem;
  cursor: pointer;
}

.attendance-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
}

.attendance-form-grid label {
  display: grid;
  gap: 0.43rem;
}

.attendance-form-grid label.is-full { grid-column: 1 / -1; }

.attendance-form-grid label > span {
  color: #3a4354;
  font-size: 0.7rem;
  font-weight: 750;
}

.attendance-form-grid em {
  margin-left: 0.25rem;
  color: #9ca5b3;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 500;
}

.attendance-form-grid input,
.attendance-form-grid select,
.attendance-form-grid textarea {
  width: 100%;
  border: 1px solid #dfe3eb;
  border-radius: 11px;
  background: #fbfcfe;
  color: #1f2937;
  font: inherit;
  font-size: 0.78rem;
  outline: none;
}

.attendance-form-grid input,
.attendance-form-grid select { height: 44px; padding: 0 0.8rem; }
.attendance-form-grid textarea { min-height: 82px; padding: 0.8rem; resize: vertical; }
.attendance-form-grid :is(input, select, textarea):focus { border-color: #7b6af0; box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.1); }

.attendance-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #e9ebf1;
}

.attendance-secondary-btn,
.attendance-submit-btn {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: 11px;
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
}

.attendance-secondary-btn { border: 1px solid #dfe3eb; background: #fff; color: #536072; }
.attendance-submit-btn { border: 0; background: linear-gradient(135deg, #6757e8, #4938c9); color: #fff; box-shadow: 0 10px 22px rgba(84, 65, 211, 0.22); }
.attendance-submit-btn svg { order: 2; }
.attendance-submit-btn:disabled { opacity: 0.55; cursor: wait; }

.attendance-admin-hero {
  display: flex;
  min-height: 185px;
  align-items: center;
  justify-content: space-between;
  padding: 2.1rem 2.5rem;
}

.attendance-live-badge {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.68rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  color: #e7e9ff;
  font-size: 0.68rem;
  font-weight: 700;
}

.attendance-live-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #65e6a5;
  box-shadow: 0 0 0 5px rgba(101, 230, 165, 0.13);
}

.attendance-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--att-line);
}

.attendance-tabs {
  display: flex;
  gap: 0.2rem;
  padding: 0.25rem;
  border-radius: 11px;
  background: #f2f3f7;
}

.attendance-tabs button {
  min-height: 36px;
  padding: 0.55rem 0.78rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #727b8b;
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
}

.attendance-tabs button.is-active {
  background: #fff;
  color: #4f42c9;
  box-shadow: 0 3px 10px rgba(30, 41, 59, 0.08);
}

.attendance-tabs button span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 0.3rem;
  place-items: center;
  border-radius: 10px;
  background: #e9e6ff;
  color: #604fe1;
  font-size: 0.58rem;
}

.attendance-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.attendance-filters > input,
.attendance-filters > select,
.attendance-search {
  height: 38px;
  border: 1px solid var(--att-line);
  border-radius: 9px;
  background: var(--att-panel);
  color: var(--att-ink);
  font-size: 0.68rem;
}

.attendance-filters > input,
.attendance-filters > select { padding: 0 0.65rem; }

.attendance-search {
  display: flex;
  min-width: 190px;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.65rem;
}

.attendance-search span { color: #8d96a6; font-size: 1.05rem; }
.attendance-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; }

.attendance-admin-table-wrap { overflow-x: auto; }

.attendance-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.attendance-table th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--att-line);
  background: rgba(247, 248, 251, 0.8);
  color: #8c95a5;
  font-size: 0.58rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.attendance-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--att-line);
  color: #5d6778;
  font-size: 0.7rem;
  vertical-align: middle;
}

.attendance-table tbody tr:last-child td { border-bottom: 0; }
.attendance-table tbody tr:hover { background: rgba(247, 248, 252, 0.7); }
.attendance-table td > strong { display: block; color: var(--att-ink); font-size: 0.73rem; }
.attendance-table td > small { display: block; margin-top: 0.2rem; color: #8b94a3; font-size: 0.62rem; }

.attendance-person {
  display: flex;
  min-width: 175px;
  align-items: center;
  gap: 0.65rem;
}

.attendance-person > span {
  display: grid;
  gap: 0.12rem;
}

.attendance-person strong { color: var(--att-ink); font-size: 0.72rem; }
.attendance-person small { color: #8b94a3; font-size: 0.61rem; }

.attendance-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  object-fit: cover;
}

.attendance-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ddd8ff, #b9d9ff);
  color: #4637b0;
  font-size: 0.65rem;
  font-weight: 850;
}

.attendance-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.attendance-row-actions button {
  display: inline-grid;
  min-width: 31px;
  height: 31px;
  place-items: center;
  padding: 0 0.65rem;
  border: 1px solid var(--att-line);
  border-radius: 8px;
  background: var(--att-panel);
  color: #616c7d;
  font-size: 0.63rem;
  font-weight: 700;
  cursor: pointer;
}

.attendance-row-actions button.is-approve { padding: 0; border-color: #ccebdc; background: #ecfaf3; color: #198958; }
.attendance-row-actions button.is-reject { padding: 0; border-color: #f2d2d5; background: #fff2f3; color: #c53f49; font-size: 1rem; }
.attendance-row-actions svg { width: 14px; height: 14px; }

.attendance-empty,
.attendance-loading,
.attendance-error {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.attendance-empty > svg,
.attendance-error > svg {
  width: 38px;
  height: 38px;
  margin-bottom: 0.7rem;
  color: #a49be9;
}

.attendance-empty h4,
.attendance-error h3 { margin: 0; color: var(--att-ink); font-size: 0.9rem; }
.attendance-empty p,
.attendance-error p { max-width: 390px; margin: 0.35rem 0 0; color: var(--att-muted); font-size: 0.7rem; }
.attendance-error button { margin-top: 1rem; padding: 0.6rem 0.9rem; border: 0; border-radius: 9px; background: #6656e8; color: #fff; font-weight: 700; cursor: pointer; }

.attendance-loading {
  min-height: 420px;
  flex-direction: row;
  gap: 0.35rem;
}

.attendance-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7261eb;
  animation: attendance-pulse 900ms infinite ease-in-out alternate;
}

.attendance-loading span:nth-child(2) { animation-delay: 180ms; }
.attendance-loading span:nth-child(3) { animation-delay: 360ms; }
.attendance-loading p { margin-left: 0.6rem; color: var(--att-muted); font-size: 0.75rem; }

@keyframes attendance-pulse {
  to { opacity: 0.3; transform: translateY(-5px); }
}

.attendance-letter-modal { border-radius: 22px !important; }
.attendance-letter { color: #475569; font-size: 0.78rem; text-align: left; }
.attendance-letter-person { display: flex; align-items: center; gap: 0.75rem; padding-bottom: 1rem; border-bottom: 1px solid #e8eaf0; }
.attendance-letter-person > div { display: grid; flex: 1; }
.attendance-letter-person strong { color: #1e293b; font-size: 0.85rem; }
.attendance-letter-person span { color: #8791a1; font-size: 0.66rem; }
.attendance-letter-dates { display: grid; grid-template-columns: 1fr 24px 1fr auto; align-items: center; gap: 0.7rem; margin: 1rem 0; padding: 0.9rem; border-radius: 13px; background: #f6f7fb; }
.attendance-letter-dates > div { display: grid; gap: 0.18rem; }
.attendance-letter-dates small,
.attendance-letter section small { color: #958ba9; font-size: 0.56rem; font-weight: 800; letter-spacing: 0.1em; }
.attendance-letter-dates strong { color: #283247; font-size: 0.7rem; }
.attendance-letter-dates b { padding: 0.35rem 0.5rem; border-radius: 8px; background: #eae6ff; color: #5949cc; font-size: 0.63rem; }
.attendance-letter section { margin-top: 0.7rem; padding: 0.9rem; border: 1px solid #e8eaf0; border-radius: 12px; }
.attendance-letter section p { margin: 0.4rem 0 0; color: #435065; line-height: 1.6; white-space: pre-wrap; }
.attendance-letter section.is-manager { border-color: #ddd8ff; background: #f7f5ff; }
.attendance-letter footer { margin-top: 1rem; color: #929baa; font-size: 0.61rem; text-align: center; }

html.theme-dark .attendance-page-root {
  --att-ink: #eef2ff;
  --att-muted: #9ca8bd;
  --att-line: rgba(148, 163, 184, 0.15);
  --att-panel: rgba(17, 25, 43, 0.94);
}

html.theme-dark .attendance-metric,
html.theme-dark .attendance-panel,
html.theme-dark .attendance-admin-board {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

html.theme-dark .attendance-metric.is-blue .attendance-metric-icon { background: rgba(59, 112, 237, 0.15); }
html.theme-dark .attendance-metric.is-violet .attendance-metric-icon { background: rgba(113, 88, 235, 0.16); }
html.theme-dark .attendance-metric.is-amber .attendance-metric-icon { background: rgba(213, 138, 21, 0.15); }
html.theme-dark .attendance-metric.is-green .attendance-metric-icon { background: rgba(32, 166, 103, 0.15); }
html.theme-dark .attendance-leave-card,
html.theme-dark .attendance-table tbody tr:hover { background: rgba(31, 41, 59, 0.62); }
html.theme-dark .attendance-ring { background: conic-gradient(#7c6cf4 calc(var(--attendance-value) * 1%), #293348 0); }
html.theme-dark .attendance-tabs { background: #111a2b; }
html.theme-dark .attendance-tabs button.is-active { background: #263249; color: #b7adff; }
html.theme-dark .attendance-table th { background: rgba(11, 18, 32, 0.72); }
html.theme-dark .attendance-leave-form { background: #111827; }
html.theme-dark .attendance-form-head { border-color: #293347; }
html.theme-dark .attendance-form-head h3,
html.theme-dark .attendance-form-grid label > span { color: #eff3ff; }
html.theme-dark .attendance-form-head > button,
html.theme-dark .attendance-form-grid :is(input, select, textarea),
html.theme-dark .attendance-secondary-btn {
  border-color: #303b50;
  background: #192235;
  color: #e2e8f0;
}
html.theme-dark .attendance-form-actions { border-color: #293347; }

@media (max-width: 1120px) {
  .attendance-hero { grid-template-columns: 1fr 340px; padding: 2rem; }
  .attendance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attendance-admin-toolbar { align-items: stretch; flex-direction: column; }
  .attendance-filters { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .attendance-hero { grid-template-columns: 1fr; gap: 1.4rem; padding: 1.5rem; }
  .attendance-content-grid { grid-template-columns: 1fr; }
  .attendance-admin-hero { min-height: 210px; align-items: flex-start; flex-direction: column; padding: 1.5rem; }
  .attendance-live-badge { margin-top: 1rem; }
  .attendance-metrics { gap: 0.65rem; }
  .attendance-metric { min-height: 92px; padding: 0.85rem; }
  .attendance-metric-icon { width: 39px; height: 39px; flex-basis: 39px; }
  .attendance-metric strong { font-size: 1.1rem; }
  .attendance-panel { padding: 1rem; }
  .attendance-panel-head { align-items: flex-start; }
  .attendance-leave-form { padding: 1.25rem; }
  .attendance-form-grid { grid-template-columns: 1fr; }
  .attendance-form-grid label.is-full { grid-column: auto; }
  .attendance-tabs { width: 100%; }
  .attendance-tabs button { flex: 1; }
  .attendance-search { min-width: 100%; }
  .attendance-filters > input { flex: 1; min-width: 130px; }
}

@media (max-width: 470px) {
  .attendance-metrics { grid-template-columns: 1fr 1fr; }
  .attendance-metric { align-items: flex-start; flex-direction: column; gap: 0.5rem; }
  .attendance-panel-head { flex-direction: column; }
  .attendance-request-btn { width: 100%; justify-content: center; }
  .attendance-leave-card { grid-template-columns: 38px minmax(0, 1fr); }
  .attendance-leave-card .attendance-icon-btn { display: none; }
}
/* Mpowerr OS ??? premium shell */

:root {
  --os-bg: #e9eef6;
  --os-bg-accent: #dbe7f8;
  --os-sidebar: rgba(255, 255, 255, 0.78);
  --os-surface: #ffffff;
  --os-surface-2: #f8fafc;
  --os-surface-soft: var(--os-surface-2);
  --os-surface-muted: #f1f5f9;
  --os-input: #ffffff;
  --os-border: rgba(15, 23, 42, 0.08);
  --os-border-strong: rgba(15, 23, 42, 0.12);
  --os-text: #0b1220;
  --os-muted: #64748b;
  --os-accent: #1d4ed8;
  --os-accent-soft: #eff6ff;
  --os-primary: var(--os-accent);
  --os-radius: 18px;
  --os-radius-sm: 12px;
  --os-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.06);
  --os-shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.14);
  --os-font: "Manrope", "Segoe UI", sans-serif;

  /* Mpowerr brand blues */
  --mp-dark: #1e3a8a;
  --mp-dark-text: #1e3a8a;
  --mp-dark-bg: #e8eefc;
  --mp-dark-border: #a8bceb;
  --mp-light: #3b82f6;
  --mp-light-text: #2563eb;
  --mp-light-bg: #eff6ff;
  --mp-light-border: #bfdbfe;
  --mp-infinite: #0e7490;
  --mp-infinite-text: #0e7490;
  --mp-infinite-bg: #ecfeff;
  --mp-infinite-border: #67e8f9;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--os-font);
  background:
    radial-gradient(1200px 600px at -10% -20%, rgba(37, 99, 235, 0.16), transparent 55%),
    radial-gradient(900px 500px at 110% 0%, rgba(14, 116, 144, 0.12), transparent 50%),
    linear-gradient(180deg, #f5f8fc 0%, var(--os-bg) 45%, #e8eef7 100%);
  background-attachment: fixed;
  color: var(--os-text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* Shell */
.os-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.22s ease;
}

.os-shell.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.os-sidebar {
  background: var(--os-sidebar);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--os-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
  transition: opacity 0.18s ease, transform 0.22s ease;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.03);
}

.os-shell.sidebar-collapsed .os-sidebar {
  opacity: 0;
  pointer-events: none;
  border-right-color: transparent;
  transform: translateX(-8px);
}

.os-brand {
  padding: 1.25rem 1rem 1.1rem 1.2rem;
  border-bottom: 1px solid var(--os-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.os-brand-mark {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.os-brand-text {
  min-width: 0;
}

.sidebar-close-btn,
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--os-border);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-close-btn:hover,
.sidebar-toggle:hover {
  background: #fff;
  color: #0f172a;
  border-color: var(--os-border-strong);
  box-shadow: var(--os-shadow);
}

.sidebar-close-btn {
  border-color: transparent;
  background: transparent;
}

.sidebar-close-btn:hover {
  background: rgba(15, 23, 42, 0.04);
}

.os-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}

.os-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 14px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--os-border);
  padding: 4px;
  box-shadow: var(--os-shadow);
}

.os-brand h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.os-brand p {
  margin: 0.15rem 0 0;
  font-size: 0.65rem;
  color: var(--os-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 650;
}

.os-nav-label {
  padding: 1.15rem 1.3rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.os-app-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.2rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.os-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0.9rem;
  border: none;
  background: transparent;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 650;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.os-nav-item:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.os-nav-item.is-active {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.os-nav-item.is-active svg {
  opacity: 1;
}

.os-nav-item svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.os-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.os-nav-parent {
  position: relative;
}

.os-nav-parent .os-nav-chevron {
  margin-left: auto;
  opacity: 0.65;
  transition: transform 0.18s ease;
}

.os-nav-group.is-open .os-nav-parent .os-nav-chevron {
  transform: rotate(180deg);
}

.os-nav-group.is-open .os-nav-parent:not(.is-active) {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
}

.os-nav-sub {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.15rem 0 0.35rem 0.55rem;
  margin: 0 0 0.15rem 0.85rem;
  border-left: 2px solid rgba(37, 99, 235, 0.18);
}

.os-nav-sub[hidden] {
  display: none !important;
}

.os-nav-subitem {
  width: 100%;
  display: block;
  border: none;
  background: transparent;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease;
}

.os-nav-subitem:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
}

.os-nav-subitem.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.os-shell.sidebar-collapsed .os-nav-sub {
  display: none !important;
}

.os-shell.sidebar-collapsed .os-nav-parent .os-nav-chevron {
  display: none;
}

.os-sidebar-foot {
  padding: 0.85rem;
  border-top: 1px solid var(--os-border);
  background: rgba(255, 255, 255, 0.35);
}

.os-nav-logout {
  color: #b91c1c;
}

.os-nav-logout:hover {
  background: #fef2f2;
  color: #991b1b;
  box-shadow: none;
}

.os-page[hidden] {
  display: none !important;
}

.page-empty {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 22px;
  padding: 4rem 1.75rem;
  text-align: center;
  color: var(--os-muted);
  box-shadow: var(--os-shadow);
  backdrop-filter: blur(10px);
}

.page-empty h3 {
  margin: 0 0 0.45rem;
  color: var(--os-text);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-empty p {
  margin: 0;
  font-size: 0.92rem;
}

.employees-grid {
  display: block;
}

.employees-shell {
  display: grid;
  gap: 1.25rem;
}

.employees-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  padding: 0.15rem 0.1rem 0.35rem;
}

.employees-summary > div {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
}

.employees-summary strong {
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.employees-summary span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.employees-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.employee-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.95rem;
  padding: 1.15rem 1.1rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  text-align: left;
  box-shadow: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
  font-family: inherit;
  color: var(--os-text);
}

.employee-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.28);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.employee-card:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.employee-card-media {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto;
}

.employee-status-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #94a3b8;
}

.employee-status-dot.is-active {
  background: #22c55e;
}

.employee-status-dot.is-inactive {
  background: #94a3b8;
}

.employee-account-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.55rem 0 0;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}

.employee-account-status.is-active {
  color: #64748b;
}

.employee-account-label {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.employee-card-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.employee-card-contact {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.55rem;
  text-align: left;
}

.employee-card-contact-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.35rem;
  align-items: baseline;
  font-size: 0.72rem;
  line-height: 1.35;
}

.employee-card-contact-row span {
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.employee-card-contact-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--os-text);
  font-size: 14px;
  font-weight: 700;
}

.employee-view-btn,
.employee-edit-btn,
.employee-account-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: var(--os-surface-2, #f8fafc);
  color: var(--os-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.employee-view-btn {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: #1d4ed8;
}

.employee-view-btn:hover,
.employee-edit-btn:hover,
.employee-account-btn:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
  background: #eff6ff;
}

.profile-login-hint {
  margin: -0.35rem 0 0.85rem;
  color: var(--os-muted, #64748b);
  font-size: 0.72rem;
  line-height: 1.4;
}

.profile-login-hint.is-active {
  color: #166534;
}

html.theme-dark .employee-account-status {
  color: #94a3b8;
}

html.theme-dark .employee-account-status.is-active {
  color: #cbd5e1;
}

html.theme-dark .employee-account-label {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.employee-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center top;
  background: linear-gradient(145deg, #e2e8f0, #f8fafc);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #334155;
  border: 0;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.employee-card-meta {
  min-width: 0;
  width: 100%;
  text-align: center;
}

.employee-card-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.employee-card-name {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.employee-card-role {
  margin: 0.28rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employees-empty {
  grid-column: 1 / -1;
}

/* ?? Task board (Trello-style) ??????????????????????????????????????????? */

#page-tasks {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: calc(100vh - 120px);
}

.task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.7rem 0.85rem;
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  box-shadow: var(--os-shadow);
}

.task-toolbar-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}

.task-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 200px;
  max-width: 280px;
  flex: 1;
  padding: 0.4rem 0.7rem;
  background: var(--os-input);
  border: 1px solid var(--os-border);
  border-radius: 10px;
  color: var(--os-muted);
}

.task-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  font-size: 0.85rem;
  color: var(--os-text);
}

.task-filters {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.task-filters select {
  height: 34px;
  padding: 0 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  color: #334155;
}

.task-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.task-filter-clear {
  padding: 0.3rem 0.55rem !important;
  font-size: 0.75rem !important;
}

.task-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.18rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
}

.task-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.28rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.task-view-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.task-view-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #4f46e5);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.22);
}

.task-bubble-view {
  position: relative;
  display: flex;
  min-height: calc(100vh - 220px);
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(37, 99, 235, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 110%, rgba(59, 130, 246, 0.12), transparent 50%),
    linear-gradient(180deg, #070b16 0%, #0b1220 48%, #111827 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.task-bubble-rail {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 5;
  display: grid;
  width: 28px;
  height: 56px;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  font-size: 1rem;
  cursor: pointer;
}

.task-bubble-create-root {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 8;
  min-height: 40px;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(30, 58, 138, 0.92);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.task-bubble-create-root:hover {
  background: rgba(37, 99, 235, 0.98);
}

.bubble-focus-modal {
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 16px !important;
  padding: 1.1rem 1rem 1.2rem !important;
}

.bubble-focus-form {
  display: grid;
  gap: 0.85rem;
  text-align: left;
}

.bubble-focus-form label {
  display: grid;
  gap: 0.35rem;
}

.bubble-focus-form label > span,
.bubble-focus-colors > span {
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
}

#bubble-form-label,
#bubble-form-description {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: #0b1220;
  color: #f8fafc;
  font: inherit;
  font-size: 0.86rem;
}

#bubble-form-description {
  resize: vertical;
  min-height: 84px;
}

.bubble-focus-colors {
  display: grid;
  gap: 0.55rem;
}

.bubble-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.bubble-color-swatch {
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.bubble-color-swatch.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.85);
}

.bubble-custom-color {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #94a3b8;
  font-size: 0.76rem;
}

.bubble-custom-color input[type='color'] {
  width: 100%;
  max-width: 220px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.task-bubble-canvas {
  position: relative;
  flex: 1;
  min-height: 480px;
  width: 100%;
}

.task-bubble-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.task-bubble-node text {
  pointer-events: none;
  user-select: none;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.45);
}

.task-bubble-node:hover .task-bubble-core {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 2.5;
}

.task-bubble-burst {
  pointer-events: none;
}

.task-bubble-node:hover .task-bubble-halo {
  fill: rgba(59, 130, 246, 0.22);
}

.task-bubble-menu {
  position: absolute;
  z-index: 20;
  min-width: 176px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.task-bubble-menu button {
  display: block;
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: transparent;
  color: #e2e8f0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.task-bubble-menu button:last-child {
  border-bottom: 0;
}

.task-bubble-menu button:hover {
  background: rgba(51, 65, 85, 0.7);
}

.task-bubble-menu button.is-danger {
  color: #f87171;
}

.task-bubble-menu button.is-danger:hover {
  background: rgba(127, 29, 29, 0.35);
}

.task-bubble-dock {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.task-bubble-dock-handle {
  display: grid;
  width: 72px;
  height: 22px;
  margin-bottom: 0.35rem;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  cursor: pointer;
  pointer-events: auto;
}

.task-bubble-dock-handle span {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: #94a3b8;
}

.task-bubble-dock-panel {
  display: flex;
  width: min(420px, calc(100% - 1.5rem));
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.task-bubble-view.is-dock-open .task-bubble-dock-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.task-bubble-dock-panel button {
  min-height: 36px;
  padding: 0.45rem 0.85rem;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  pointer-events: auto;
}

.task-bubble-dock-panel small {
  color: #94a3b8;
  font-size: 0.68rem;
  line-height: 1.35;
}

.task-bubble-empty {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  min-height: 360px;
  padding: 2rem;
  color: #94a3b8;
  text-align: center;
}

.task-bubble-tag-grid {
  display: grid;
  gap: 0.45rem;
  text-align: left;
}

.task-bubble-tag-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.2rem;
  color: #e2e8f0;
  cursor: pointer;
}

.task-bubble-tag-option .task-label {
  width: 28px;
  height: 12px;
  border-radius: 4px;
}

.board-detail-view.is-bubble-layout .task-board {
  display: none;
}

.board-detail-view.is-bubble-layout {
  background: transparent !important;
}

.board-detail-view.is-bubble-layout .task-toolbar {
  margin-bottom: 0.75rem;
}

html.theme-dark .task-view-toggle {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
}

html.theme-dark .task-view-btn:hover {
  color: #f8fafc;
  background: rgba(51, 65, 85, 0.8);
}

.task-toolbar-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.task-stat {
  font-size: 0.75rem;
  color: #64748b;
}

.task-stat strong {
  color: #0f172a;
  font-weight: 750;
}

.task-stat.is-warn strong {
  color: #dc2626;
}

.task-board {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.15rem 0.15rem 0.85rem;
  min-height: calc(100vh - 210px);
  scrollbar-width: thin;
}

.task-column {
  --col-accent: #64748b;
  width: 288px;
  min-width: 288px;
  max-height: calc(100vh - 210px);
  background: #ebecf0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.task-column.is-drop-target {
  background: #e2e8f0;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.28);
}

.task-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.7rem 0.65rem 0.45rem 0.75rem;
  flex-shrink: 0;
}

.task-column-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.task-column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--col-accent);
  flex-shrink: 0;
}

.task-column-head h3 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 750;
  color: #172b4d;
}

.task-column-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #475569;
  font-size: 0.68rem;
  font-weight: 750;
}

.task-column-menu-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.task-column-menu-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.task-column-body {
  padding: 0.2rem 0.55rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 48px;
  scrollbar-width: thin;
}

.task-column-empty {
  margin: 0.15rem 0;
  padding: 1.1rem 0.65rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.78rem;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.task-card {
  position: relative;
  background: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.65rem 0.55rem;
  box-shadow: 0 1px 0 rgba(9, 30, 66, 0.25);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  user-select: none;
}

.task-card:hover {
  background: #f8fafc;
  box-shadow: 0 1px 0 rgba(9, 30, 66, 0.25), 0 6px 16px rgba(15, 23, 42, 0.08);
}

.task-card-edit {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #64748b;
  background: rgba(241, 245, 249, 0.96);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  opacity: 0;
  cursor: pointer;
  transform: translateY(-2px);
  transition: opacity 0.14s ease, transform 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.task-card:hover .task-card-edit,
.task-card:focus-within .task-card-edit {
  opacity: 1;
  transform: translateY(0);
}

.task-card-edit:hover {
  color: #1d4ed8;
  background: #dbeafe;
}

.task-card-edit:focus-visible {
  opacity: 1;
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  transform: translateY(0);
}

.task-card-title {
  padding-right: 1.8rem;
}

.task-card.is-dragging {
  opacity: 0.4;
  cursor: grabbing;
  transform: rotate(2deg);
}

.task-card.is-drop-before {
  box-shadow: 0 -3px 0 0 #2563eb, 0 1px 0 rgba(9, 30, 66, 0.25);
}

.task-card-title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.35;
  color: #172b4d;
  word-break: break-word;
}

.task-card-progress {
  margin-top: 0.45rem;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.task-card-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: inherit;
}

.task-card-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.task-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
}

.task-clockify-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 24px;
  padding: 0.25rem 0.48rem;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 7px;
  color: #0369a1;
  background: #e0f2fe;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.task-clockify-btn:hover {
  color: #fff;
  background: #0284c7;
  transform: translateY(-1px);
}

.task-clockify-btn.is-loading {
  opacity: 0.65;
  cursor: wait;
}

.task-clockify-btn.is-running {
  border-color: rgba(34, 197, 94, 0.24);
  color: #15803d;
  background: #dcfce7;
  cursor: default;
}

.task-clockify-btn.is-running [data-task-clock-live] {
  min-width: 52px;
  font-family: "Segoe UI", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.task-clockify-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
  animation: task-clockify-pulse 1.6s ease-in-out infinite;
}

@keyframes task-clockify-pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }
}

/* Grouped administrator sidebar navigation */
.admin-workspace .admin-nav-menu {
  margin: 0.08rem 0;
}

.admin-workspace .admin-nav-menu .admin-nav-sub {
  gap: 0.18rem;
  margin: 0.2rem 0 0.35rem 1.05rem;
  padding: 0.25rem 0 0.25rem 0.65rem;
  border-left-color: rgba(37, 99, 235, 0.22);
}

.admin-workspace .admin-nav-menu .os-nav-subitem {
  min-height: 36px;
  padding: 0.48rem 0.7rem;
  color: #677386;
  font-size: 0.72rem;
}

.admin-workspace .admin-nav-menu .os-nav-subitem::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: #c0c8d5;
  content: "";
  vertical-align: middle;
}

.admin-workspace .admin-nav-menu .os-nav-subitem:hover::before,
.admin-workspace .admin-nav-menu .os-nav-subitem.is-active::before {
  background: #3973e6;
  box-shadow: 0 0 0 4px rgba(57, 115, 230, 0.1);
}

.admin-workspace .admin-nav-menu .os-nav-subitem.is-active {
  background: linear-gradient(90deg, #eef4ff, rgba(238, 244, 255, 0.35));
  color: #2459ba;
}

.admin-workspace .admin-nav-menu .os-nav-chevron {
  transition: transform 160ms ease;
}

.admin-workspace .admin-nav-menu.is-open .os-nav-chevron {
  transform: rotate(180deg);
}

html.theme-dark .admin-workspace .admin-nav-menu .admin-nav-sub {
  border-left-color: rgba(96, 165, 250, 0.22);
}

html.theme-dark .admin-workspace .admin-nav-menu .os-nav-subitem {
  color: #aeb8c9;
}

html.theme-dark .admin-workspace .admin-nav-menu .os-nav-subitem:hover,
html.theme-dark .admin-workspace .admin-nav-menu .os-nav-subitem.is-active {
  background: rgba(41, 71, 126, 0.35);
  color: #dce9ff;
}

html.theme-dark .admin-workspace .admin-nav-menu .os-nav-subitem::before {
  background: #56647a;
}

html.theme-dark .admin-workspace .admin-nav-menu .os-nav-subitem:hover::before,
html.theme-dark .admin-workspace .admin-nav-menu .os-nav-subitem.is-active::before {
  background: #76a9ff;
}

/* Reminder center */
.reminders-root {
  --reminder-ink: #172033;
  --reminder-muted: #718096;
  min-height: 100%;
}

.reminders-page {
  display: grid;
  gap: 18px;
  padding-bottom: 22px;
}

.reminders-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 176px;
  padding: 28px 34px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 15%, rgba(255, 255, 255, 0.7), transparent 24%),
    linear-gradient(125deg, #f1f5ff 0%, #f5f1ff 52%, #ecfbff 100%);
  color: var(--reminder-ink);
  box-shadow: 0 18px 42px rgba(76, 81, 145, 0.1);
}

.reminders-hero > div:first-child {
  position: relative;
  z-index: 2;
  max-width: 690px;
}

.reminders-eyebrow {
  color: #635bdf;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.reminders-hero h2 {
  margin: 8px 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.12;
}

.reminders-hero p {
  max-width: 610px;
  margin: 0;
  color: #69758b;
  font-size: 0.88rem;
  line-height: 1.65;
}

.reminder-hero-art {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 34px;
  background: linear-gradient(145deg, #7668f4, #4b71e8);
  box-shadow: 0 20px 35px rgba(80, 85, 205, 0.3);
  transform: rotate(7deg);
}

.reminder-hero-art span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.reminder-hero-art svg,
.reminder-form-icon svg,
.reminder-card-mark svg,
.reminder-metric svg,
.reminder-search svg,
.reminder-card-actions svg,
.reminder-card-meta svg,
.reminder-empty > svg {
  width: 20px;
  height: 20px;
}

.reminder-hero-art i {
  position: absolute;
  border-radius: 50%;
  background: #ffd35a;
  box-shadow: 0 0 0 5px rgba(255, 211, 90, 0.18);
}

.reminder-hero-art i:nth-child(2) { top: 7px; right: 12px; width: 10px; height: 10px; }
.reminder-hero-art i:nth-child(3) { bottom: 13px; left: -7px; width: 7px; height: 7px; background: #57d7bf; }
.reminder-hero-art i:nth-child(4) { top: -12px; left: 20px; width: 5px; height: 5px; background: #fa7ba5; }

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

.reminder-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #e8edf5;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(15, 23, 42, 0.05);
}

.reminder-metric > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
}

.reminder-metric.is-blue > span { background: #eaf1ff; color: #3974e8; }
.reminder-metric.is-violet > span { background: #f1ebff; color: #7955db; }
.reminder-metric.is-orange > span { background: #fff1df; color: #df7a22; }
.reminder-metric.is-green > span { background: #e6f8ef; color: #159461; }

.reminder-metric div {
  display: grid;
  gap: 2px;
}

.reminder-metric strong { color: var(--reminder-ink); font-size: 1.22rem; }
.reminder-metric small { color: var(--reminder-muted); font-size: 0.7rem; font-weight: 650; }

.reminder-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.75fr) minmax(500px, 1.6fr);
  gap: 18px;
  align-items: start;
}

.reminder-form,
.reminder-list-panel {
  border: 1px solid #e6ebf3;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 9px 30px rgba(25, 35, 58, 0.055);
}

.reminder-form {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 15px;
  padding: 21px;
}

.reminder-form > header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 4px;
}

.reminder-form-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #6c63e9, #4676e7);
  color: #fff;
  box-shadow: 0 9px 20px rgba(82, 89, 211, 0.24);
}

.reminder-form header small {
  color: #756bea;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.reminder-form h3,
.reminder-list-panel h3 {
  margin: 3px 0 0;
  color: var(--reminder-ink);
  font-size: 1rem;
}

.reminder-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.reminder-form label > span {
  color: #5b667a;
  font-size: 0.69rem;
  font-weight: 750;
}

.reminder-form label em {
  color: #9aa4b4;
  font-style: normal;
  font-weight: 500;
}

.reminder-form input,
.reminder-form select,
.reminder-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dfe5ee;
  border-radius: 11px;
  outline: none;
  background: #fbfcff;
  color: #253047;
  font: inherit;
  font-size: 0.76rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.reminder-form input,
.reminder-form select { height: 42px; padding: 0 11px; }
.reminder-form textarea { resize: vertical; padding: 10px 11px; line-height: 1.5; }

.reminder-form input:focus,
.reminder-form select:focus,
.reminder-form textarea:focus {
  border-color: #7770e8;
  box-shadow: 0 0 0 3px rgba(119, 112, 232, 0.12);
}

.reminder-form-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.9fr;
  gap: 9px;
}

.reminder-audience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 11px;
  border-radius: 13px;
  background: #f5f7fc;
}

.reminder-form footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 3px;
}

.reminder-form footer > span { color: #929bab; font-size: 0.63rem; }

.reminder-btn-primary,
.reminder-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
}

.reminder-btn-primary {
  padding: 0 15px;
  background: linear-gradient(135deg, #675ee4, #4276e8);
  color: #fff;
  box-shadow: 0 8px 17px rgba(77, 91, 215, 0.22);
}

.reminder-btn-primary svg { width: 16px; height: 16px; }
.reminder-btn-primary:disabled { opacity: 0.55; cursor: wait; }
.reminder-btn-ghost { padding: 0 13px; background: #eef1f6; color: #647086; }

.reminder-list-panel {
  min-width: 0;
  overflow: hidden;
}

.reminder-list-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 21px 14px;
}

.reminder-search {
  display: flex;
  align-items: center;
  width: min(245px, 42%);
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #e0e6ef;
  border-radius: 11px;
  color: #8d98aa;
  background: #fafbfe;
}

.reminder-search input {
  width: 100%;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #273349;
  font: inherit;
  font-size: 0.73rem;
}

.reminder-search svg { width: 16px; height: 16px; }

.reminder-tabs {
  display: flex;
  gap: 5px;
  padding: 0 21px 13px;
  border-bottom: 1px solid #edf0f5;
}

.reminder-tabs button {
  border: 0;
  border-radius: 9px;
  padding: 7px 11px;
  background: transparent;
  color: #778297;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
}

.reminder-tabs button.is-active { background: #edf1ff; color: #4c5bd4; }

.reminder-list {
  display: grid;
  gap: 9px;
  max-height: 660px;
  overflow: auto;
  padding: 14px;
}

.reminder-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid #e8ecf3;
  border-radius: 15px;
  background: #fff;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.reminder-card:hover {
  border-color: #cfd8ea;
  box-shadow: 0 10px 24px rgba(25, 36, 63, 0.07);
  transform: translateY(-1px);
}

.reminder-card.is-overdue { border-left: 3px solid #ee8a37; }
.reminder-card.is-completed { opacity: 0.65; }
.reminder-card.is-completed h4 { text-decoration: line-through; }

.reminder-card-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: #edf2ff;
  color: #5173d9;
}

.reminder-card.is-urgent .reminder-card-mark { background: #ffe9ed; color: #e14962; }
.reminder-card.is-high .reminder-card-mark { background: #fff0e3; color: #df7829; }
.reminder-card.is-low .reminder-card-mark { background: #eaf8f2; color: #28936b; }

.reminder-card-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.reminder-card-kicker span {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reminder-category { background: #eef2f8; color: #667389; }
.reminder-priority { background: #f0edff; color: #6b57c6; }
.reminder-snoozed { background: #fff3dd; color: #b76b22; }

.reminder-card h4 {
  margin: 6px 0 3px;
  color: var(--reminder-ink);
  font-size: 0.83rem;
}

.reminder-card-main > p {
  margin: 0 0 8px;
  color: var(--reminder-muted);
  font-size: 0.7rem;
  line-height: 1.48;
}

.reminder-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.reminder-card-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7d8798;
  font-size: 0.62rem;
}

.reminder-card-meta svg { width: 13px; height: 13px; }
.reminder-card-meta b { color: #59657a; font-weight: 700; }
.reminder-card-meta small { color: #9aa3b2; }
.reminder-card-meta .is-late,
.reminder-card-meta .is-late b,
.reminder-card-meta .is-late small { color: #d56e26; }

.reminder-person i {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #e6eaff;
  color: #5964c8;
  font-size: 0.5rem;
  font-style: normal;
  font-weight: 800;
}

.reminder-card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.reminder-card:hover .reminder-card-actions,
.reminder-card:focus-within .reminder-card-actions { opacity: 1; }

.reminder-card-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #e2e7ef;
  border-radius: 9px;
  background: #fff;
  color: #6d788b;
  cursor: pointer;
}

.reminder-card-actions button:hover { border-color: #bfc9dc; color: #4e5fce; }
.reminder-card-actions button.is-danger:hover { border-color: #f0bdc6; color: #d83e55; }
.reminder-card-actions svg { width: 14px; height: 14px; }

.reminder-empty,
.reminders-loading {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 30px;
  color: #8d97a9;
  text-align: center;
}

.reminder-empty > svg { width: 40px; height: 40px; color: #b5bfd0; }
.reminder-empty h4 { margin: 4px 0 0; color: #4d596d; }
.reminder-empty p { margin: 0; font-size: 0.75rem; }
.reminder-empty button { margin-top: 8px; border: 0; border-radius: 9px; padding: 8px 13px; background: #5d61d9; color: #fff; cursor: pointer; }

.reminders-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid #e1e6f1;
  border-top-color: #6865df;
  border-radius: 50%;
  animation: reminder-spin 0.75s linear infinite;
}

.reminders-loading p { margin: 0; font-size: 0.76rem; }
@keyframes reminder-spin { to { transform: rotate(360deg); } }

html.theme-dark .reminders-root {
  --reminder-ink: #eef3fb;
  --reminder-muted: #9aa8bd;
}

html.theme-dark .reminders-hero {
  border-color: rgba(117, 130, 214, 0.2);
  background: radial-gradient(circle at 80% 0, rgba(91, 81, 176, 0.24), transparent 28%), linear-gradient(130deg, #19233b, #211d3e 58%, #172f3b);
}

html.theme-dark .reminders-hero p { color: #a7b2c5; }
html.theme-dark .reminder-form,
html.theme-dark .reminder-list-panel,
html.theme-dark .reminder-metric,
html.theme-dark .reminder-card { border-color: #2d3950; background: #1d2739; }
html.theme-dark .reminder-audience,
html.theme-dark .reminder-search { border-color: #36435a; background: #182234; }
html.theme-dark .reminder-form label > span,
html.theme-dark .reminder-card-meta b { color: #b8c3d5; }
html.theme-dark .reminder-form input,
html.theme-dark .reminder-form select,
html.theme-dark .reminder-form textarea {
  border-color: #37445a;
  background: #182234;
  color: #e5ebf5;
  color-scheme: dark;
}
html.theme-dark .reminder-search input { color: #e5ebf5; }
html.theme-dark .reminder-tabs { border-bottom-color: #2c384d; }
html.theme-dark .reminder-tabs button.is-active { background: #303b66; color: #bdc7ff; }
html.theme-dark .reminder-card-actions button { border-color: #3b485e; background: #202b3d; color: #aab5c7; }
html.theme-dark .reminder-category { background: #2d394c; color: #b7c1d1; }
html.theme-dark .reminder-card-mark { background: #293858; }
html.theme-dark .reminder-empty h4 { color: #dbe3ef; }

@media (max-width: 1080px) {
  .reminder-layout { grid-template-columns: 1fr; }
  .reminder-form { position: static; }
  .reminder-list { max-height: none; }
}

@media (max-width: 720px) {
  .reminders-hero { min-height: 155px; padding: 22px; }
  .reminder-hero-art { display: none; }
  .reminder-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reminder-form-row,
  .reminder-audience { grid-template-columns: 1fr; }
  .reminder-list-panel > header { align-items: stretch; flex-direction: column; }
  .reminder-search { width: 100%; }
  .reminder-card { grid-template-columns: 38px minmax(0, 1fr); }
  .reminder-card-actions { grid-column: 2; opacity: 1; }
}

/* Salary history, employee payslips and printable salary slip */
.salary-row-actions button.is-slip {
  border-color: #cad9f7;
  background: #edf4ff;
  color: #2d63bd;
}

.salary-history-page,
.payslips-page {
  display: grid;
  max-width: 1480px;
  margin: 0 auto;
  gap: 1rem;
}

.salary-history-hero,
.payslips-hero {
  position: relative;
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  padding: 2.2rem 2.6rem;
  border-radius: 27px;
  color: #fff;
  box-shadow: 0 22px 50px rgba(26, 42, 78, 0.18);
}

.salary-history-hero {
  background:
    radial-gradient(circle at 85% 10%, rgba(106, 210, 255, 0.22), transparent 29%),
    linear-gradient(125deg, #17223e, #294b79 58%, #286776);
}

.payslips-hero {
  background:
    radial-gradient(circle at 84% 8%, rgba(186, 164, 255, 0.28), transparent 29%),
    linear-gradient(125deg, #1a2240, #34336f 58%, #4456a0);
}

.salary-history-hero > div:first-child,
.payslips-hero > div:first-child {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.salary-history-hero > div:first-child > span,
.payslips-hero > div:first-child > span,
.salary-history-panel > header > div > span,
.payslips-panel > header > div > span {
  color: #7ed7d0;
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.payslips-hero > div:first-child > span { color: #bbb5ff; }

.salary-history-hero h2,
.payslips-hero h2 {
  max-width: 700px;
  margin: 0.5rem 0 0;
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.salary-history-hero p,
.payslips-hero p {
  max-width: 650px;
  margin: 0.8rem 0 0;
  color: rgba(230, 239, 250, 0.72);
  font-size: 0.79rem;
  line-height: 1.7;
}

.salary-history-orbit {
  position: relative;
  display: grid;
  width: 120px;
  height: 120px;
  flex: 0 0 120px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 35px rgba(3, 12, 34, 0.22);
  backdrop-filter: blur(12px);
  transform: rotate(7deg);
}

.salary-history-orbit svg {
  width: 50px;
  height: 50px;
  color: #95e6da;
}

.salary-history-orbit i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffce67;
  box-shadow: 0 0 0 6px rgba(255, 206, 103, 0.16);
}
.salary-history-orbit i:nth-child(2) { top: 10px; right: 9px; }
.salary-history-orbit i:nth-child(3) { bottom: 6px; left: -5px; background: #78dfe6; }

.salary-history-metrics,
.payslips-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

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

.salary-history-metrics article,
.payslips-metrics article {
  display: flex;
  min-height: 96px;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #e4e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 40, 67, 0.05);
}

.salary-history-metrics article > svg,
.payslips-metrics article > svg {
  width: 42px;
  height: 42px;
  padding: 11px;
  border-radius: 13px;
  background: #eaf3ff;
  color: #3d70cb;
}

.salary-history-metrics article:nth-child(3) > svg,
.payslips-metrics article:nth-child(3) > svg { background: #e8f8f0; color: #269666; }
.salary-history-metrics article:nth-child(4) > svg { background: #fff2df; color: #cc8123; }

.salary-history-metrics article div,
.payslips-metrics article div { display: grid; min-width: 0; }
.salary-history-metrics strong,
.payslips-metrics strong { overflow: hidden; color: #202b40; font-size: 1.05rem; text-overflow: ellipsis; white-space: nowrap; }
.salary-history-metrics span,
.payslips-metrics span { color: #8792a4; font-size: 0.61rem; }

.salary-history-panel,
.payslips-panel {
  overflow: hidden;
  border: 1px solid #e3e8f0;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 41, 59, 0.05);
}

.salary-history-panel > header,
.payslips-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #e8ebf1;
}

.salary-history-panel h3,
.payslips-panel h3 { margin: 0.15rem 0 0; color: #202b3f; font-size: 1rem; }
.payslips-panel > header > p { margin: 0; color: #8a95a6; font-size: 0.65rem; }

.salary-history-filters {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.salary-history-filters label {
  display: flex;
  width: 225px;
  height: 38px;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.65rem;
  border: 1px solid #dfe4ec;
  border-radius: 9px;
  color: #8b95a4;
  background: #fbfcfe;
}

.salary-history-filters input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #28344a;
  font: inherit;
  font-size: 0.65rem;
}

.salary-history-filters select {
  height: 38px;
  border: 1px solid #dfe4ec;
  border-radius: 9px;
  padding: 0 0.55rem;
  background: #fbfcfe;
  color: #5d687a;
  font-size: 0.63rem;
}

.salary-history-table-wrap { overflow-x: auto; }
.salary-history-table { width: 100%; min-width: 940px; border-collapse: collapse; }
.salary-history-table th { padding: 0.72rem 0.85rem; border-bottom: 1px solid #e7ebf1; background: #f8fafc; color: #8d97a7; font-size: 0.53rem; text-align: left; text-transform: uppercase; letter-spacing: 0.08em; }
.salary-history-table td { padding: 0.82rem 0.85rem; border-bottom: 1px solid #e9ecf2; color: #697589; font-size: 0.63rem; }
.salary-history-table tbody tr:hover { background: #fbfcfe; }
.salary-history-table td > strong { display: block; color: #334056; font-size: 0.68rem; }
.salary-history-table td > small { display: block; margin-top: 0.16rem; color: #99a2b0; font-size: 0.53rem; }
.salary-slip-sent { color: #248258; font-size: 0.58rem; font-weight: 750; }
.salary-slip-waiting { color: #b87825; font-size: 0.58rem; font-weight: 700; }

.salary-history-actions button {
  min-height: 32px;
  padding: 0 0.65rem;
  border: 1px solid #ccd8ed;
  border-radius: 8px;
  background: #edf4ff;
  color: #3164b7;
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 750;
}

.salary-history-actions button.is-generate { border-color: #c8e5d8; background: #edf9f4; color: #27785c; }
.salary-history-actions button:disabled { opacity: 0.38; cursor: not-allowed; }

.salary-history-empty,
.payslips-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  padding: 2rem;
  color: #8c97a8;
  text-align: center;
}
.salary-history-empty > svg,
.payslips-empty > svg { width: 44px; height: 44px; color: #b8c2d1; }
.salary-history-empty h4,
.payslips-empty h4 { margin: 0.2rem 0 0; color: #435066; }
.salary-history-empty p,
.payslips-empty p { margin: 0; font-size: 0.7rem; }
.salary-history-empty button,
.payslips-empty button { margin-top: 0.5rem; border: 0; border-radius: 9px; padding: 0.55rem 0.8rem; background: #426dcc; color: #fff; cursor: pointer; }

.payslips-hero-card {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 275px;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}
.payslips-hero-card > svg { width: 30px; height: 30px; margin-bottom: 1rem; color: #c5c1ff; }
.payslips-hero-card small { color: rgba(231, 231, 255, 0.64); font-size: 0.56rem; font-weight: 800; letter-spacing: 0.1em; }
.payslips-hero-card strong { margin-top: 0.25rem; color: #fff; font-size: 1.8rem; letter-spacing: -0.05em; }
.payslips-hero-card span { color: rgba(231, 235, 255, 0.64); font-size: 0.62rem; }

.payslip-grid { display: grid; gap: 0.7rem; padding: 1rem; }
.payslip-card {
  display: grid;
  grid-template-columns: 48px minmax(170px, 1.3fr) minmax(160px, 0.7fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem;
  border: 1px solid #e5e9f0;
  border-radius: 15px;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.payslip-card:hover { transform: translateY(-1px); box-shadow: 0 10px 25px rgba(26, 37, 65, 0.07); }
.payslip-file-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: #eef1ff; color: #5968d2; }
.payslip-file-icon svg { width: 21px; height: 21px; }
.payslip-card-copy small { color: #929cad; font-size: 0.52rem; }
.payslip-card-copy h4 { margin: 0.12rem 0; color: #263249; font-size: 0.78rem; }
.payslip-card-copy p { margin: 0; color: #929cac; font-size: 0.56rem; }
.payslip-card-amount { display: grid; }
.payslip-card-amount > span { color: #929cac; font-size: 0.54rem; }
.payslip-card-amount > strong { color: #276a57; font-size: 0.8rem; }
.payslip-card-amount > b { width: max-content; margin-top: 0.18rem; border-radius: 10px; padding: 0.15rem 0.4rem; background: #e9f8f1; color: #26835c; font-size: 0.48rem; text-transform: uppercase; }
.payslip-card > button { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid #d7def0; border-radius: 9px; padding: 0.55rem 0.7rem; background: #f4f6ff; color: #4c5fc4; cursor: pointer; font-size: 0.58rem; font-weight: 750; }
.payslip-card > button svg { width: 13px; height: 13px; }

.salary-slip-layer { position: fixed; z-index: 250; inset: 0; overflow: auto; padding: 1.2rem; }
.salary-slip-backdrop { position: fixed; inset: 0; background: rgba(8, 14, 27, 0.76); backdrop-filter: blur(6px); }
.salary-slip-viewer { position: relative; width: min(850px, 100%); margin: 0 auto; }
.salary-slip-viewer-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-bottom: 0.7rem; }
.salary-slip-viewer-actions button { display: inline-flex; min-height: 38px; align-items: center; gap: 0.4rem; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 9px; padding: 0 0.8rem; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; font-size: 0.64rem; font-weight: 700; }
.salary-slip-viewer-actions button.is-print { border: 0; background: #fff; color: #274d98; }
.salary-slip-viewer-actions svg { width: 15px; height: 15px; }

.salary-slip-document {
  padding: 2.6rem;
  border-radius: 5px;
  background: #fff;
  color: #263145;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}
.salary-slip-document > header { display: flex; justify-content: space-between; gap: 2rem; padding-bottom: 1.3rem; border-bottom: 2px solid #253f77; }
.salary-slip-brand { display: flex; align-items: center; gap: 0.75rem; }
.salary-slip-brand img { width: 44px; height: 44px; border-radius: 12px; }
.salary-slip-brand div,
.salary-slip-document > header > div:last-child { display: grid; }
.salary-slip-brand strong { color: #1e2b45; font-size: 1rem; }
.salary-slip-brand span,
.salary-slip-document > header span { color: #7d8798; font-size: 0.57rem; }
.salary-slip-document > header > div:last-child { text-align: right; }
.salary-slip-document > header small { color: #315fae; font-size: 0.55rem; font-weight: 850; letter-spacing: 0.15em; }
.salary-slip-document > header > div:last-child > strong { margin: 0.2rem 0; color: #1f2e49; font-size: 1.05rem; }

.salary-slip-employee { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: 2rem; padding: 1.4rem 0; }
.salary-slip-employee > div { display: grid; align-content: start; }
.salary-slip-employee small,
.salary-slip-period small,
.salary-slip-notes small { color: #7c8799; font-size: 0.52rem; font-weight: 800; letter-spacing: 0.1em; }
.salary-slip-employee > div strong { margin-top: 0.3rem; color: #1e2d47; font-size: 0.94rem; }
.salary-slip-employee > div span { color: #738094; font-size: 0.62rem; }
.salary-slip-employee dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem 1rem; margin: 0; }
.salary-slip-employee dl div { display: grid; }
.salary-slip-employee dt { color: #8b95a4; font-size: 0.53rem; }
.salary-slip-employee dd { overflow-wrap: anywhere; margin: 0.1rem 0 0; color: #3e495c; font-size: 0.61rem; font-weight: 650; }

.salary-slip-period { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 0.85rem 1rem; border-radius: 10px; background: #f3f6fa; }
.salary-slip-period div { display: grid; }
.salary-slip-period strong { margin-top: 0.18rem; color: #2d3b52; font-size: 0.65rem; }
.salary-slip-breakdown { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1rem; margin-top: 1.2rem; }
.salary-slip-table { overflow: hidden; border: 1px solid #e1e6ee; border-radius: 10px; }
.salary-slip-table header,
.salary-slip-table p,
.salary-slip-table footer { display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: 0.65rem 0.8rem; }
.salary-slip-table header { background: #edf2f8; color: #526076; font-size: 0.57rem; font-weight: 800; text-transform: uppercase; }
.salary-slip-table p { border-bottom: 1px solid #edf0f4; color: #707b8d; font-size: 0.6rem; }
.salary-slip-table p strong { color: #3c485d; }
.salary-slip-table footer { background: #f8fafc; color: #2b374c; font-size: 0.62rem; font-weight: 800; }
.salary-slip-net { display: grid; margin-top: 1.2rem; padding: 1.1rem; border-radius: 12px; background: linear-gradient(125deg, #20345e, #286b72); color: #fff; text-align: right; }
.salary-slip-net span { color: #9fd6d1; font-size: 0.55rem; font-weight: 800; letter-spacing: 0.12em; }
.salary-slip-net strong { margin-top: 0.15rem; font-size: 1.5rem; }
.salary-slip-net small { color: rgba(231, 243, 246, 0.6); font-size: 0.52rem; }
.salary-slip-notes { margin-top: 1rem; padding: 0.8rem; border: 1px solid #e3e7ee; border-radius: 9px; }
.salary-slip-notes p { margin: 0.25rem 0 0; color: #657185; font-size: 0.6rem; line-height: 1.5; }
.salary-slip-document > footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; padding-top: 0.8rem; border-top: 1px solid #e1e6ed; color: #8d96a5; font-size: 0.5rem; }
.salary-slip-document > footer p { margin: 0; }

html.theme-dark .salary-history-metrics article,
html.theme-dark .payslips-metrics article,
html.theme-dark .salary-history-panel,
html.theme-dark .payslips-panel,
html.theme-dark .payslip-card { border-color: #303c50; background: #1e293b; }
html.theme-dark .salary-history-metrics strong,
html.theme-dark .payslips-metrics strong,
html.theme-dark .salary-history-panel h3,
html.theme-dark .payslips-panel h3,
html.theme-dark .payslip-card-copy h4 { color: #edf2fa; }
html.theme-dark .salary-history-panel > header,
html.theme-dark .payslips-panel > header { border-bottom-color: #303c50; }
html.theme-dark .salary-history-filters label,
html.theme-dark .salary-history-filters select { border-color: #3b475b; background: #182234; color: #bbc4d2; }
html.theme-dark .salary-history-filters input { color: #e6ecf5; }
html.theme-dark .salary-history-table th { border-bottom-color: #344055; background: #182234; color: #9ca8ba; }
html.theme-dark .salary-history-table td { border-bottom-color: #303b4f; }
html.theme-dark .salary-history-table td > strong { color: #dce4f0; }
html.theme-dark .salary-history-table tbody tr:hover { background: #222f43; }
html.theme-dark .payslip-card-amount > strong { color: #71d1ad; }

@media (max-width: 900px) {
  .salary-history-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .salary-history-panel > header { align-items: stretch; flex-direction: column; }
  .salary-history-filters { flex-wrap: wrap; }
  .salary-history-filters label { flex: 1 1 220px; }
  .payslip-card { grid-template-columns: 48px 1fr auto; }
  .payslip-card-amount { grid-column: 2; }
  .payslip-card > button { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 680px) {
  .salary-history-hero,
  .payslips-hero { min-height: 190px; padding: 1.5rem; }
  .salary-history-orbit,
  .payslips-hero-card { display: none; }
  .salary-history-metrics,
  .payslips-metrics { grid-template-columns: 1fr 1fr; }
  .payslips-metrics article:first-child { grid-column: 1 / -1; }
  .payslip-card { grid-template-columns: 42px 1fr; }
  .payslip-card-amount { grid-column: 2; }
  .payslip-card > button { grid-column: 2; grid-row: auto; width: max-content; }
  .salary-slip-layer { padding: 0; }
  .salary-slip-viewer-actions { padding: 0.7rem; margin: 0; background: #182236; }
  .salary-slip-document { padding: 1.2rem; border-radius: 0; }
  .salary-slip-employee,
  .salary-slip-breakdown { grid-template-columns: 1fr; gap: 0.8rem; }
}

@media print {
  body.salary-slip-printing > *:not(#salary-slip-layer) { display: none !important; }
  body.salary-slip-printing #salary-slip-layer { position: static; overflow: visible; padding: 0; }
  body.salary-slip-printing .salary-slip-backdrop,
  body.salary-slip-printing .salary-slip-viewer-actions { display: none !important; }
  body.salary-slip-printing .salary-slip-viewer { width: 100%; }
  body.salary-slip-printing .salary-slip-document { padding: 12mm; border-radius: 0; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Administrator salary management */
.salary-management-root {
  color: #182033;
}

.salary-page {
  display: grid;
  max-width: 1480px;
  margin: 0 auto;
  gap: 1rem;
}

.salary-hero {
  position: relative;
  display: grid;
  min-height: 255px;
  grid-template-columns: minmax(0, 1.4fr) minmax(315px, 0.58fr);
  align-items: center;
  gap: 2rem;
  overflow: hidden;
  padding: 2.3rem 2.6rem;
  border-radius: 27px;
  background:
    radial-gradient(circle at 86% 8%, rgba(99, 211, 166, 0.22), transparent 30%),
    radial-gradient(circle at 2% 100%, rgba(98, 91, 218, 0.28), transparent 38%),
    linear-gradient(128deg, #101a32, #213b5e 58%, #245f65);
  color: #fff;
  box-shadow: 0 22px 50px rgba(24, 43, 66, 0.21);
}

.salary-hero::after {
  position: absolute;
  right: -90px;
  bottom: -180px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.02), 0 0 0 96px rgba(255, 255, 255, 0.012);
  content: "";
}

.salary-hero-copy,
.salary-progress-card {
  position: relative;
  z-index: 1;
}

.salary-eyebrow {
  color: #5d9a8c;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.salary-hero .salary-eyebrow {
  color: #79d9bd;
}

.salary-hero h2 {
  margin: 0.45rem 0 0;
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 2.85rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.salary-hero-copy > p {
  max-width: 680px;
  margin: 0.75rem 0 0;
  color: rgba(226, 237, 244, 0.7);
  font-size: 0.8rem;
  line-height: 1.7;
}

.salary-hero-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.salary-hero-actions label {
  display: grid;
  gap: 0.25rem;
}

.salary-hero-actions label span {
  color: rgba(226, 237, 244, 0.62);
  font-size: 0.55rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.salary-hero-actions input {
  height: 42px;
  padding: 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.7rem;
  color-scheme: dark;
}

.salary-hero-actions button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.8rem;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #236458;
  font-size: 0.67rem;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(4, 20, 28, 0.2);
  cursor: pointer;
}

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

.salary-progress-card {
  display: flex;
  min-height: 185px;
  flex-direction: column;
  justify-content: center;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.085);
  backdrop-filter: blur(17px);
}

.salary-progress-card > span {
  color: rgba(214, 237, 233, 0.62);
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.salary-progress-card > strong {
  margin-top: 0.35rem;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  letter-spacing: -0.05em;
}

.salary-progress-card > small {
  color: rgba(219, 235, 238, 0.58);
  font-size: 0.59rem;
}

.salary-progress-card > div {
  height: 7px;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
}

.salary-progress-card > div i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5cdbb2, #a6efd8);
}

.salary-progress-card > p {
  margin: 0.45rem 0 0;
  color: rgba(219, 235, 238, 0.6);
  font-size: 0.58rem;
}

.salary-progress-card > p b {
  color: #8be4c7;
}

.salary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.salary-metric {
  display: flex;
  min-height: 100px;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #e4e7ee;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 23px rgba(30, 41, 59, 0.05);
}

.salary-metric > span {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  border-radius: 14px;
  background: #f0edff;
  color: #6954cf;
}

.salary-metric.is-green > span { background: #e8f8f0; color: #249b64; }
.salary-metric.is-amber > span { background: #fff4dc; color: #ca8514; }
.salary-metric.is-blue > span { background: #eaf3ff; color: #3d75d3; }
.salary-metric svg { width: 19px; height: 19px; }
.salary-metric div { display: grid; min-width: 0; }
.salary-metric strong { overflow: hidden; color: #182033; font-size: 1.1rem; letter-spacing: -0.04em; text-overflow: ellipsis; white-space: nowrap; }
.salary-metric small { color: #8490a1; font-size: 0.61rem; }

.salary-panel {
  overflow: hidden;
  border: 1px solid #e4e7ee;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(30, 41, 59, 0.05);
}

.salary-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #e8eaf0;
}

.salary-toolbar h3 {
  margin: 0.15rem 0 0;
  color: #1f293b;
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.salary-toolbar > div:last-child {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.salary-search {
  display: flex;
  width: 220px;
  height: 38px;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.65rem;
  border: 1px solid #dfe3ea;
  border-radius: 9px;
  background: #fbfcfd;
  color: #8992a1;
}

.salary-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #273247;
  font: inherit;
  font-size: 0.66rem;
}

.salary-toolbar select {
  height: 38px;
  padding: 0 0.6rem;
  border: 1px solid #dfe3ea;
  border-radius: 9px;
  background: #fbfcfd;
  color: #596579;
  font-size: 0.64rem;
}

.salary-table-wrap {
  overflow-x: auto;
}

.salary-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.salary-table th {
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid #e7eaf0;
  background: #f8f9fb;
  color: #8c95a4;
  font-size: 0.53rem;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.salary-table td {
  padding: 0.82rem 0.85rem;
  border-bottom: 1px solid #e8eaf0;
  color: #697487;
  font-size: 0.63rem;
}

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

.salary-table tbody tr:hover {
  background: #fbfcfe;
}

.salary-table td > strong {
  display: block;
  color: #354055;
  font-size: 0.67rem;
}

.salary-table td > small {
  display: block;
  margin-top: 0.18rem;
  color: #959eac;
  font-size: 0.54rem;
}

.salary-table .salary-net {
  color: #176f53;
  font-size: 0.72rem;
}

.salary-person {
  display: flex;
  min-width: 175px;
  align-items: center;
  gap: 0.55rem;
}

.salary-person > span {
  display: grid;
}

.salary-person strong {
  color: #2a3549;
  font-size: 0.68rem;
}

.salary-person small {
  color: #929baa;
  font-size: 0.55rem;
}

.salary-avatar {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border-radius: 10px;
  object-fit: cover;
}

.salary-avatar.is-fallback {
  background: linear-gradient(135deg, #d9f2e9, #c9ddfa);
  color: #286a61;
  font-size: 0.56rem;
  font-weight: 850;
}

.salary-status {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.3rem;
  padding: 0.27rem 0.48rem;
  border-radius: 18px;
  background: #f0f2f5;
  color: #6c7687;
  font-size: 0.54rem;
  font-weight: 800;
}

.salary-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.salary-status.is-draft { background: #fff4dc; color: #ad7213; }
.salary-status.is-approved { background: #eaf3ff; color: #3e6dbd; }
.salary-status.is-paid { background: #e8f8f0; color: #178856; }
.salary-not-set { color: #b26e39; font-size: 0.59rem; font-weight: 700; }

.salary-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.salary-row-actions button {
  display: inline-grid;
  min-width: 31px;
  height: 31px;
  place-items: center;
  padding: 0 0.6rem;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #fff;
  color: #657184;
  font-size: 0.58rem;
  font-weight: 750;
  cursor: pointer;
}

.salary-row-actions button.is-primary {
  display: inline-flex;
  background: #eff8f4;
  border-color: #cce9dd;
  color: #27785e;
}

.salary-row-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

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

.salary-drawer-layer {
  position: fixed;
  z-index: 190;
  inset: 0;
}

.salary-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 30, 0.62);
  backdrop-filter: blur(5px);
}

.salary-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(650px, 100%);
  height: 100%;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.7rem;
  background: #fff;
  box-shadow: -30px 0 70px rgba(5, 10, 28, 0.28);
}

.salary-drawer > header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e7eaf0;
}

.salary-drawer h3 {
  margin: 0.18rem 0 0;
  color: #192135;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
}

.salary-drawer header p {
  margin: 0.35rem 0 0;
  color: #7e8899;
  font-size: 0.67rem;
}

.salary-drawer header button {
  width: 36px;
  height: 36px;
  border: 1px solid #e2e6ed;
  border-radius: 10px;
  background: #f8fafc;
  color: #6e7888;
  font-size: 1.3rem;
  cursor: pointer;
}

.salary-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  padding: 1.1rem 0;
}

.salary-form-grid label {
  display: grid;
  gap: 0.38rem;
}

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

.salary-form-grid label > span {
  color: #414b5d;
  font-size: 0.64rem;
  font-weight: 750;
}

.salary-form-grid em {
  color: #959eac;
  font-size: 0.54rem;
  font-style: normal;
  font-weight: 500;
}

.salary-form-grid > label > :is(input, select, textarea) {
  width: 100%;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  background: #fbfcfd;
  color: #263044;
  font: inherit;
  font-size: 0.69rem;
  outline: 0;
}

.salary-form-grid > label > :is(input, select) {
  height: 42px;
  padding: 0 0.7rem;
}

.salary-form-grid textarea {
  padding: 0.7rem;
  resize: vertical;
}

.salary-form-grid :is(input, select, textarea):focus {
  border-color: #4ca78d;
  box-shadow: 0 0 0 3px rgba(47, 145, 116, 0.1);
}

.salary-money-input {
  display: flex;
  height: 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  background: #fbfcfd;
}

.salary-money-input:focus-within {
  border-color: #4ca78d;
  box-shadow: 0 0 0 3px rgba(47, 145, 116, 0.1);
}

.salary-money-input b {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 0 0.58rem;
  border-right: 1px solid #e2e5eb;
  background: #f3f6f7;
  color: #568278;
  font-size: 0.56rem;
}

.salary-money-input input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 0.65rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: #263044;
  font: inherit;
  font-size: 0.7rem;
}

.salary-drawer-person {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  background: #f8fafb;
}

.salary-drawer-person > div {
  display: grid;
  flex: 1;
}

.salary-drawer-person strong {
  color: #344055;
  font-size: 0.68rem;
}

.salary-drawer-person span {
  color: #929baa;
  font-size: 0.56rem;
}

.salary-drawer-person > b {
  padding: 0.35rem 0.48rem;
  border-radius: 8px;
  background: #eaf6f2;
  color: #357662;
  font-size: 0.56rem;
}

.salary-net-preview {
  display: grid;
  justify-items: center;
  padding: 1rem;
  border: 1px solid #cfe8df;
  border-radius: 14px;
  background: linear-gradient(145deg, #f0faf6, #f7fcfa);
}

.salary-net-preview span {
  color: #619184;
  font-size: 0.54rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.salary-net-preview strong {
  margin-top: 0.25rem;
  color: #226e57;
  font-size: 1.45rem;
  letter-spacing: -0.045em;
}

.salary-net-preview small {
  color: #89a59d;
  font-size: 0.54rem;
}

.salary-drawer > footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #e7eaf0;
}

.salary-drawer > footer button {
  display: inline-flex;
  min-height: 41px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  background: #fff;
  color: #606b7d;
  font-size: 0.66rem;
  font-weight: 750;
  cursor: pointer;
}

.salary-drawer > footer button[type="submit"] {
  border: 0;
  background: linear-gradient(135deg, #2f8d72, #236553);
  color: #fff;
}

.salary-drawer > footer button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.salary-drawer > footer svg {
  width: 13px;
  height: 13px;
}

.salary-empty,
.salary-loading {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #4f9885;
  text-align: center;
}

.salary-empty > svg {
  width: 39px;
  height: 39px;
}

.salary-empty h4 {
  margin: 0.7rem 0 0;
  color: #293449;
}

.salary-empty p,
.salary-loading p {
  margin: 0.35rem 0 0;
  color: #8791a1;
  font-size: 0.67rem;
}

.salary-empty button {
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: #2d826a;
  color: #fff;
  cursor: pointer;
}

.salary-loading {
  min-height: 430px;
}

.salary-loading span {
  width: 31px;
  height: 31px;
  border: 3px solid #d9eee8;
  border-top-color: #2f8d72;
  border-radius: 50%;
  animation: company-spin 0.7s linear infinite;
}

html.theme-dark .salary-management-root {
  color: #e8edf8;
}

html.theme-dark .salary-metric,
html.theme-dark .salary-panel {
  border-color: rgba(148, 163, 184, 0.15);
  background: rgba(17, 25, 43, 0.95);
}

html.theme-dark .salary-metric strong,
html.theme-dark .salary-toolbar h3,
html.theme-dark .salary-table td > strong,
html.theme-dark .salary-person strong,
html.theme-dark .salary-empty h4 {
  color: #edf2ff;
}

html.theme-dark .salary-toolbar,
html.theme-dark .salary-table :is(th, td) {
  border-color: rgba(148, 163, 184, 0.14);
}

html.theme-dark .salary-table th {
  background: #11192b;
}

html.theme-dark .salary-table tbody tr:hover {
  background: #172236;
}

html.theme-dark .salary-search,
html.theme-dark .salary-toolbar select {
  border-color: #303b50;
  background: #192235;
  color: #d6ddea;
}

html.theme-dark .salary-search input {
  color: #e5eaf5;
}

html.theme-dark .salary-drawer {
  background: #111827;
}

html.theme-dark .salary-drawer > header,
html.theme-dark .salary-drawer > footer {
  border-color: #293448;
}

html.theme-dark .salary-drawer h3,
html.theme-dark .salary-form-grid label > span,
html.theme-dark .salary-drawer-person strong {
  color: #edf2ff;
}

html.theme-dark .salary-form-grid > label > :is(input, select, textarea),
html.theme-dark .salary-money-input,
html.theme-dark .salary-drawer-person,
html.theme-dark .salary-drawer > footer button {
  border-color: #303b50;
  background: #192235;
  color: #e2e8f0;
}

html.theme-dark .salary-money-input b {
  border-color: #303b50;
  background: #222e43;
  color: #8fc7b8;
}

html.theme-dark .salary-money-input input {
  color: #e2e8f0;
}

html.theme-dark .salary-net-preview {
  border-color: rgba(80, 183, 151, 0.25);
  background: rgba(34, 112, 88, 0.14);
}

html.theme-dark .salary-net-preview strong {
  color: #79d6b9;
}

@media (max-width: 1050px) {
  .salary-hero {
    grid-template-columns: 1fr 320px;
  }

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

@media (max-width: 760px) {
  .salary-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .salary-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .salary-hero-actions button {
    justify-content: center;
  }

  .salary-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .salary-toolbar > div:last-child {
    flex-wrap: wrap;
  }

  .salary-search {
    width: 100%;
  }

  .salary-drawer {
    padding: 1.2rem;
  }

  .salary-form-grid {
    grid-template-columns: 1fr;
  }

  .salary-form-grid .is-full {
    grid-column: auto;
  }
}

/* Grouped employee sidebar navigation ? match admin design */
.staff-workspace .staff-nav-menu {
  margin: 0.08rem 0;
}

.staff-workspace .staff-nav-menu .staff-nav-sub {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  width: auto;
  max-height: none;
  margin: 0.2rem 0 0.35rem 1.05rem;
  padding: 0.25rem 0 0.25rem 0.65rem;
  overflow: visible;
  border: 0;
  border-left: 2px solid rgba(37, 99, 235, 0.22);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: static;
}

.staff-workspace .staff-nav-menu .staff-nav-sub[hidden] {
  display: none !important;
}

.staff-workspace .staff-nav-menu .staff-nav-sub.is-open {
  display: flex !important;
}

.staff-workspace .staff-nav-menu .os-nav-subitem {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 0.48rem 0.7rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #677386;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.staff-workspace .staff-nav-menu .os-nav-subitem::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: #c0c8d5;
  content: "";
  vertical-align: middle;
}

.staff-workspace .staff-nav-menu .os-nav-subitem:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
}

.staff-workspace .staff-nav-menu .os-nav-subitem:hover::before,
.staff-workspace .staff-nav-menu .os-nav-subitem.is-active::before {
  background: #3973e6;
  box-shadow: 0 0 0 4px rgba(57, 115, 230, 0.1);
}

.staff-workspace .staff-nav-menu .os-nav-subitem.is-active {
  background: linear-gradient(90deg, #eef4ff, rgba(238, 244, 255, 0.35));
  color: #2459ba;
  font-weight: 700;
}

.staff-workspace .staff-nav-menu .os-nav-chevron {
  margin-left: auto;
  transition: transform 160ms ease;
}

.staff-workspace .staff-nav-menu.is-open .os-nav-chevron {
  transform: rotate(180deg);
}

html.theme-dark .staff-workspace .staff-nav-menu .staff-nav-sub {
  border-left-color: rgba(96, 165, 250, 0.22);
}

html.theme-dark .staff-workspace .staff-nav-menu .os-nav-subitem {
  color: #aeb8c9;
}

html.theme-dark .staff-workspace .staff-nav-menu .os-nav-subitem:hover,
html.theme-dark .staff-workspace .staff-nav-menu .os-nav-subitem.is-active {
  background: rgba(41, 71, 126, 0.35);
  color: #dce9ff;
}

html.theme-dark .staff-workspace .staff-nav-menu .os-nav-subitem::before {
  background: #56647a;
}

html.theme-dark .staff-workspace .staff-nav-menu .os-nav-subitem:hover::before,
html.theme-dark .staff-workspace .staff-nav-menu .os-nav-subitem.is-active::before {
  background: #76a9ff;
}

/* Secure company files */
.company-files-root,
#permissions-panel {
  color: #182033;
}

.company-files-page {
  display: grid;
  max-width: 1480px;
  margin: 0 auto;
  gap: 1.15rem;
}

.company-files-hero {
  position: relative;
  display: grid;
  min-height: 280px;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  align-items: center;
  overflow: hidden;
  padding: 2.4rem 2.7rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at 86% 5%, rgba(111, 91, 255, 0.38), transparent 32%),
    radial-gradient(circle at 4% 100%, rgba(41, 128, 185, 0.24), transparent 38%),
    linear-gradient(128deg, #11192f, #202d5b 58%, #4837ae);
  color: #fff;
  box-shadow: 0 24px 52px rgba(24, 31, 72, 0.21);
}

.company-files-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 730px;
}

.company-files-hero-copy > span,
.company-files-eyebrow,
.company-upload-drawer header span,
.company-upload-access > div:first-child > span {
  color: #9e91ff;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.17em;
}

.company-files-hero h2 {
  max-width: 680px;
  margin: 0.45rem 0 0;
  color: #fff;
  font-size: clamp(1.9rem, 3.8vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.company-files-hero-copy > p {
  max-width: 650px;
  margin: 0.9rem 0 0;
  color: rgba(231, 235, 255, 0.72);
  font-size: 0.86rem;
  line-height: 1.7;
}

.company-files-security {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.35rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  backdrop-filter: blur(12px);
}

.company-files-security svg {
  width: 15px;
  height: 15px;
  color: #9ce1bc;
}

.company-files-security strong { font-size: 0.67rem; }
.company-files-security span { color: rgba(229, 234, 255, 0.62); font-size: 0.63rem; }

.company-files-orbit {
  position: relative;
  width: 250px;
  height: 250px;
  justify-self: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: company-orbit-float 5s ease-in-out infinite;
}

.company-files-orbit::before,
.company-files-orbit::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
}

.company-files-orbit::before { inset: 28px; }
.company-files-orbit::after { inset: 58px; }

.company-files-orbit > span,
.company-files-orbit > i {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  box-shadow: 0 15px 30px rgba(4, 8, 30, 0.25);
  backdrop-filter: blur(14px);
}

.company-files-orbit .is-main {
  inset: 78px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(124, 103, 255, 0.72), rgba(56, 86, 178, 0.62));
}

.company-files-orbit .is-main svg { width: 42px; height: 42px; }
.company-files-orbit > i { width: 45px; height: 45px; border-radius: 14px; font-style: normal; }
.company-files-orbit > i svg { width: 19px; height: 19px; }
.company-files-orbit .is-one { top: 17px; left: 55px; }
.company-files-orbit .is-two { right: 7px; bottom: 63px; color: #93e0b5; }
.company-files-orbit .is-three { bottom: 10px; left: 48px; color: #ffd578; }

@keyframes company-orbit-float {
  50% { transform: translateY(-8px) rotate(2deg); }
}

.company-files-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.company-file-stat {
  display: flex;
  min-height: 110px;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e5e8ef;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.93);
  color: #1e293b;
  text-align: left;
  box-shadow: 0 9px 25px rgba(30, 41, 59, 0.05);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.company-file-stat:hover,
.company-file-stat.is-active {
  border-color: rgba(109, 93, 252, 0.35);
  box-shadow: 0 14px 30px rgba(53, 45, 125, 0.1);
  transform: translateY(-2px);
}

.company-file-stat > span {
  display: grid;
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
  place-items: center;
  border-radius: 15px;
  background: #eaf3ff;
  color: #3c75dd;
}

.company-file-stat.is-important > span { background: #fff4d9; color: #ce8814; }
.company-file-stat.is-secret > span { background: #f1edff; color: #705be5; }
.company-file-stat svg { width: 21px; height: 21px; }
.company-file-stat div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 0.45rem; }
.company-file-stat strong { color: #182033; font-size: 1.5rem; letter-spacing: -0.05em; }
.company-file-stat b { color: #394456; font-size: 0.78rem; }
.company-file-stat small { grid-column: 1 / -1; color: #8791a1; font-size: 0.63rem; }

.company-file-library {
  padding: 1.3rem;
  border: 1px solid #e5e8ef;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(30, 41, 59, 0.05);
}

.company-file-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.company-file-toolbar h3 {
  margin: 0.15rem 0 0;
  color: #182033;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.company-file-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.company-file-search {
  display: flex;
  width: 220px;
  height: 40px;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.72rem;
  border: 1px solid #dfe3eb;
  border-radius: 10px;
  background: #fafbfc;
  color: #7b8494;
}

.company-file-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #263044;
  font: inherit;
  font-size: 0.7rem;
}

.company-file-filter,
.company-file-upload-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  padding: 0.6rem 0.82rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
}

.company-file-filter { border: 1px solid #dfe3eb; background: #fff; color: #667185; }
.company-file-filter.is-active { border-color: #cfc8ff; background: #f3f1ff; color: #5b49ce; }
.company-file-upload-btn { border: 0; background: linear-gradient(135deg, #705de8, #4a38c0); color: #fff; box-shadow: 0 9px 20px rgba(87, 68, 205, 0.22); }
.company-file-upload-btn svg { width: 15px; height: 15px; }

.company-file-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.company-file-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 270px;
  flex-direction: column;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid #e4e7ed;
  border-radius: 17px;
  background: #fff;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.company-file-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #4b83e1;
  content: "";
}

.company-file-card.is-important::before { background: #e3a128; }
.company-file-card.is-secret::before { background: #755be5; }
.company-file-card:hover { box-shadow: 0 16px 32px rgba(31, 41, 55, 0.1); transform: translateY(-3px); }

.company-file-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.company-file-type {
  position: relative;
  display: grid;
  width: 49px;
  height: 54px;
  place-items: center;
  border-radius: 12px;
  background: #f1f4f9;
  color: #637087;
}

.company-file-type svg { width: 25px; height: 25px; }
.company-file-type b { position: absolute; right: 4px; bottom: 4px; padding: 0.14rem 0.23rem; border-radius: 4px; background: #637087; color: #fff; font-size: 0.43rem; }
.company-file-type.is-pdf { background: #fff0f1; color: #d24b56; }
.company-file-type.is-pdf b { background: #d24b56; }
.company-file-type.is-word { background: #edf4ff; color: #3472cf; }
.company-file-type.is-word b { background: #3472cf; }
.company-file-type.is-sheet { background: #eaf8f0; color: #218c59; }
.company-file-type.is-sheet b { background: #218c59; }
.company-file-type.is-image { background: #f2edff; color: #7455d1; }
.company-file-type.is-image b { background: #7455d1; }

.company-file-category {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  padding: 0.3rem 0.48rem;
  border-radius: 20px;
  background: #edf4ff;
  color: #3973cc;
  font-size: 0.56rem;
  font-weight: 800;
}

.company-file-card.is-important .company-file-category { background: #fff5de; color: #b7770b; }
.company-file-card.is-secret .company-file-category { background: #f1edff; color: #6550ca; }
.company-file-category svg { width: 10px; height: 10px; }

.company-file-delete {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a0a8b5;
  cursor: pointer;
}

.company-file-delete:hover { background: #fff0f1; color: #cc4651; }
.company-file-delete svg { width: 13px; height: 13px; }

.company-file-card-copy { margin-top: 0.85rem; }
.company-file-card-copy h4 { overflow: hidden; margin: 0; color: #1e293b; font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.company-file-card-copy p { display: -webkit-box; min-height: 2.7em; margin: 0.35rem 0 0; overflow: hidden; color: #8490a2; font-size: 0.65rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.company-file-access {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding: 0.55rem 0;
  border-top: 1px solid #edf0f4;
  color: #737e91;
  font-size: 0.6rem;
}

.company-file-access svg { width: 13px; height: 13px; color: #7661dc; }
.company-file-card footer { display: flex; align-items: center; justify-content: space-between; padding-top: 0.65rem; border-top: 1px solid #edf0f4; }
.company-file-card footer > div { display: grid; }
.company-file-card footer strong { color: #4f5b6d; font-size: 0.64rem; }
.company-file-card footer span { color: #929baa; font-size: 0.57rem; }

.company-file-download {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.6rem;
  border-radius: 8px;
  background: #f1efff;
  color: #5a47c8;
  font-size: 0.62rem;
  font-weight: 750;
  text-decoration: none;
}

.company-file-download svg { width: 13px; height: 13px; }
.company-file-download span { color: inherit !important; }

.company-files-empty {
  grid-column: 1 / -1;
  display: flex;
  min-height: 250px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #a29be0;
  text-align: center;
}

.company-files-empty > svg { width: 42px; height: 42px; }
.company-files-empty h4 { margin: 0.7rem 0 0; color: #273248; }
.company-files-empty p { margin: 0.3rem 0 0; color: #8b95a5; font-size: 0.7rem; }

.company-file-upload-layer {
  position: fixed;
  z-index: 190;
  inset: 0;
}

.company-upload-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 34, 0.62);
  backdrop-filter: blur(5px);
}

.company-upload-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(650px, 100%);
  height: 100%;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  padding: 1.7rem;
  background: #fff;
  box-shadow: -30px 0 70px rgba(5, 10, 28, 0.28);
  animation: company-drawer-in 220ms ease-out;
}

@keyframes company-drawer-in {
  from { opacity: 0; transform: translateX(45px); }
}

.company-upload-drawer > header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e7eaf0;
}

.company-upload-drawer h3 { margin: 0.2rem 0 0; color: #192135; font-size: 1.38rem; letter-spacing: -0.04em; }
.company-upload-drawer header p { margin: 0.35rem 0 0; color: #7e8899; font-size: 0.72rem; }
.company-upload-drawer header button { width: 36px; height: 36px; border: 1px solid #e2e6ed; border-radius: 10px; background: #f8fafc; color: #6e7888; font-size: 1.3rem; cursor: pointer; }

.company-upload-drop {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border: 1.5px dashed #c9c3f5;
  border-radius: 16px;
  background: #f8f7ff;
  color: #6656d4;
  text-align: center;
  cursor: pointer;
}

.company-upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.company-upload-drop svg { width: 26px; height: 26px; }
.company-upload-drop strong { margin-top: 0.45rem; color: #5042ba; font-size: 0.78rem; }
.company-upload-drop span { margin-top: 0.2rem; color: #8d93a7; font-size: 0.61rem; }
.company-upload-drop b { max-width: 90%; margin-top: 0.45rem; overflow: hidden; color: #4f596d; font-size: 0.64rem; text-overflow: ellipsis; white-space: nowrap; }

.company-upload-fields {
  display: grid;
  grid-template-columns: 1fr 0.65fr;
  gap: 0.85rem;
}

.company-upload-fields label { display: grid; gap: 0.38rem; }
.company-upload-fields .is-full { grid-column: 1 / -1; }
.company-upload-fields label > span { color: #414b5d; font-size: 0.67rem; font-weight: 750; }
.company-upload-fields em { color: #959eac; font-size: 0.58rem; font-style: normal; font-weight: 500; }
.company-upload-fields :is(input, select, textarea) { width: 100%; border: 1px solid #dfe3ea; border-radius: 10px; background: #fbfcfd; color: #263044; font: inherit; font-size: 0.72rem; outline: 0; }
.company-upload-fields :is(input, select) { height: 42px; padding: 0 0.72rem; }
.company-upload-fields textarea { padding: 0.72rem; resize: vertical; }
.company-upload-fields :is(input, select, textarea):focus { border-color: #7764e7; box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.1); }

.company-upload-access { padding: 1rem; border: 1px solid #e5e7ee; border-radius: 15px; background: #fbfcfe; }
.company-upload-access h4 { margin: 0.15rem 0 0.75rem; color: #293348; font-size: 0.82rem; }
.company-visibility-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.company-visibility-options > label { position: relative; }
.company-visibility-options input { position: absolute; opacity: 0; }
.company-visibility-options label > span { display: grid; min-height: 105px; grid-template-columns: 25px 1fr; align-content: center; column-gap: 0.55rem; padding: 0.75rem; border: 1px solid #e0e4eb; border-radius: 12px; background: #fff; cursor: pointer; }
.company-visibility-options input:checked + span { border-color: #8574ec; background: #f7f5ff; box-shadow: 0 0 0 2px rgba(109, 93, 252, 0.08); }
.company-visibility-options svg { grid-row: 1 / 3; width: 20px; height: 20px; color: #6c59d8; }
.company-visibility-options strong { color: #344055; font-size: 0.68rem; }
.company-visibility-options small { color: #8d96a5; font-size: 0.58rem; line-height: 1.45; }

.company-employee-picker { margin-top: 0.75rem; overflow: hidden; border: 1px solid #e2e5ec; border-radius: 11px; background: #fff; }
.company-employee-picker > label { display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem; border-bottom: 1px solid #e8eaf0; color: #596579; font-size: 0.65rem; font-weight: 700; }
.company-employee-picker > div { display: grid; max-height: 175px; grid-template-columns: 1fr 1fr; gap: 0.2rem; overflow-y: auto; padding: 0.45rem; }
.company-employee-picker > div label { display: grid; grid-template-columns: auto 30px 1fr; align-items: center; gap: 0.45rem; padding: 0.45rem; border-radius: 9px; cursor: pointer; }
.company-employee-picker > div label:hover { background: #f5f6fa; }
.company-employee-avatar { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: #eae7ff; color: #5948bd; font-size: 0.56rem; font-weight: 800; }
.company-employee-picker > div label > span:last-child { display: grid; }
.company-employee-picker strong { color: #3b4658; font-size: 0.63rem; }
.company-employee-picker small { color: #9099a7; font-size: 0.54rem; }
.company-secret-notice { display: flex; align-items: center; gap: 0.45rem; margin: 0.7rem 0 0; color: #6652c9; font-size: 0.61rem; }
.company-secret-notice svg { width: 14px; height: 14px; }

.company-upload-drawer > footer { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid #e7eaf0; }
.company-upload-drawer > footer button { display: inline-flex; min-height: 41px; align-items: center; gap: 0.45rem; padding: 0.65rem 0.9rem; border: 1px solid #dfe3ea; border-radius: 10px; background: #fff; color: #606b7d; font-size: 0.69rem; font-weight: 750; cursor: pointer; }
.company-upload-drawer > footer button[type="submit"] { border: 0; background: linear-gradient(135deg, #6c59df, #4a38bb); color: #fff; }
.company-upload-drawer > footer button:disabled { opacity: 0.55; cursor: wait; }
.company-upload-drawer > footer svg { width: 14px; height: 14px; }

.company-files-loading,
.company-files-error {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #7463df;
  text-align: center;
}

.company-files-loading span { width: 34px; height: 34px; border: 3px solid #dedaf8; border-top-color: #705de5; border-radius: 50%; animation: company-spin 700ms linear infinite; }
.company-files-loading p,
.company-files-error p { margin: 0.7rem 0 0; color: #818b9b; font-size: 0.72rem; }
.company-files-error svg { width: 40px; height: 40px; }
.company-files-error h3 { margin: 0.65rem 0 0; color: #263146; }
.company-files-error button { margin-top: 0.8rem; padding: 0.58rem 0.8rem; border: 0; border-radius: 9px; background: #6957dc; color: #fff; font-weight: 700; cursor: pointer; }
@keyframes company-spin { to { transform: rotate(360deg); } }

/* Employee page permissions */
.permission-console {
  overflow: hidden;
  border: 1px solid #e3e7ee;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(30, 41, 59, 0.07);
}

.permission-hero {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.45rem;
  background: linear-gradient(135deg, #161f3d, #29376e 65%, #5844c5);
  color: #fff;
}

.permission-hero-icon { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 16px; background: rgba(255,255,255,.1); }
.permission-hero-icon svg { width: 25px; height: 25px; }
.permission-hero > div:nth-child(2) > span { color: #b4aaff; font-size: 0.58rem; font-weight: 850; letter-spacing: 0.15em; }
.permission-hero h3 { margin: 0.18rem 0 0; color: #fff; font-size: 1.15rem; letter-spacing: -0.035em; }
.permission-hero p { margin: 0.25rem 0 0; color: rgba(230,235,255,.66); font-size: 0.66rem; }
.permission-score { display: grid; min-width: 115px; padding: 0.65rem 0.8rem; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.08); text-align: center; }
.permission-score strong { font-size: 1.35rem; }
.permission-score span { color: rgba(230,235,255,.65); font-size: 0.55rem; }

.permission-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e8eaf0;
}

.permission-toolbar > div:first-child { display: grid; }
.permission-toolbar strong { color: #273247; font-size: 0.78rem; }
.permission-toolbar span { color: #8b95a5; font-size: 0.61rem; }
.permission-toolbar > div:last-child { display: flex; gap: 0.4rem; }
.permission-toolbar button { padding: 0.5rem 0.65rem; border: 1px solid #dfe3ea; border-radius: 8px; background: #fff; color: #5e687a; font-size: 0.62rem; font-weight: 700; cursor: pointer; }

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 1.1rem;
  background: #f8f9fc;
}

.permission-card {
  position: relative;
  display: grid;
  min-height: 105px;
  grid-template-columns: 39px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid #e2e5ec;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.permission-card.is-enabled { border-color: #bbb1f2; box-shadow: 0 8px 19px rgba(83, 68, 170, 0.08); }
.permission-card.is-sensitive { background: linear-gradient(145deg, #fff, #faf8ff); }
.permission-card-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #edf2ff; color: #4d70c7; }
.permission-card.is-enabled .permission-card-icon { background: #ece8ff; color: #6652d3; }
.permission-card-icon svg { width: 18px; height: 18px; }
.permission-card-copy { display: grid; min-width: 0; gap: 0.22rem; }
.permission-card-copy strong { display: flex; align-items: center; gap: 0.35rem; color: #344055; font-size: 0.68rem; }
.permission-card-copy em { padding: 0.18rem 0.3rem; border-radius: 5px; background: #f0ebff; color: #6953c9; font-size: 0.45rem; font-style: normal; text-transform: uppercase; }
.permission-card-copy small { color: #8993a3; font-size: 0.56rem; line-height: 1.45; }
.permission-card input { position: absolute; opacity: 0; }
.permission-switch { position: relative; width: 36px; height: 21px; border-radius: 12px; background: #dce0e7; transition: background 150ms ease; }
.permission-switch::after { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(31,41,55,.2); content: ""; transition: transform 150ms ease; }
.permission-card input:checked + .permission-switch { background: #6e5adc; }
.permission-card input:checked + .permission-switch::after { transform: translateX(15px); }

.permission-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-top: 1px solid #e8eaf0;
}

.permission-footer p { max-width: 630px; margin: 0; color: #7d8798; font-size: 0.61rem; line-height: 1.5; }
.permission-footer p b { color: #5f50b7; }
.permission-footer button { min-height: 40px; padding: 0.62rem 0.9rem; border: 0; border-radius: 10px; background: linear-gradient(135deg, #6d59dc, #4837b5); color: #fff; font-size: 0.68rem; font-weight: 800; box-shadow: 0 9px 20px rgba(83,65,190,.2); cursor: pointer; }
.permission-footer button:disabled { opacity: .55; cursor: wait; }
.permission-loading,
.permission-error { display: flex; min-height: 360px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.permission-loading span { width: 28px; height: 28px; border: 3px solid #dedaf7; border-top-color: #6c58dc; border-radius: 50%; animation: company-spin .7s linear infinite; }
.permission-loading p,
.permission-error p { margin: .65rem 0 0; color: #8490a0; font-size: .68rem; }
.permission-error h3 { margin: 0; color: #293449; }
.permission-error button { margin-top: .75rem; padding: .55rem .75rem; border: 0; border-radius: 8px; background: #6956d8; color: #fff; cursor: pointer; }

html.theme-dark .company-files-root,
html.theme-dark #permissions-panel { color: #e8edfa; }
html.theme-dark .company-file-stat,
html.theme-dark .company-file-library,
html.theme-dark .company-file-card,
html.theme-dark .permission-console { border-color: rgba(148,163,184,.15); background: rgba(17,25,43,.95); }
html.theme-dark .company-file-stat strong,
html.theme-dark .company-file-stat b,
html.theme-dark .company-file-toolbar h3,
html.theme-dark .company-file-card-copy h4,
html.theme-dark .company-files-empty h4 { color: #edf2ff; }
html.theme-dark .company-file-search,
html.theme-dark .company-file-filter { border-color: #303b50; background: #192235; color: #cbd5e1; }
html.theme-dark .company-file-search input { color: #e5eaf6; }
html.theme-dark .company-file-access,
html.theme-dark .company-file-card footer { border-color: #293448; }
html.theme-dark .company-upload-drawer { background: #111827; }
html.theme-dark .company-upload-drawer > header,
html.theme-dark .company-upload-drawer > footer { border-color: #293448; }
html.theme-dark .company-upload-drawer h3,
html.theme-dark .company-upload-fields label > span,
html.theme-dark .company-upload-access h4 { color: #edf2ff; }
html.theme-dark .company-upload-drop { border-color: #52499a; background: #191b35; }
html.theme-dark .company-upload-fields :is(input, select, textarea),
html.theme-dark .company-upload-access,
html.theme-dark .company-visibility-options label > span,
html.theme-dark .company-employee-picker,
html.theme-dark .company-upload-drawer > footer button { border-color: #303b50; background: #192235; color: #e2e8f0; }
html.theme-dark .company-visibility-options input:checked + span { border-color: #8271e8; background: #252346; }
html.theme-dark .company-visibility-options strong,
html.theme-dark .company-employee-picker strong { color: #e5eaf5; }
html.theme-dark .company-employee-picker > div label:hover { background: #242e43; }
html.theme-dark .permission-toolbar,
html.theme-dark .permission-footer { border-color: #293448; background: #11192b; }
html.theme-dark .permission-toolbar strong { color: #e9eef9; }
html.theme-dark .permission-toolbar button { border-color: #303b50; background: #1b2639; color: #cbd5e1; }
html.theme-dark .permission-grid { background: #0e1626; }
html.theme-dark .permission-card { border-color: #2b374b; background: #182235; }
html.theme-dark .permission-card.is-sensitive { background: linear-gradient(145deg, #182235, #211f3b); }
html.theme-dark .permission-card-copy strong { color: #e8edf7; }

@media (max-width: 1120px) {
  .company-file-grid,
  .permission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-files-hero { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 760px) {
  .company-files-hero { min-height: auto; grid-template-columns: 1fr; padding: 1.5rem; }
  .company-files-orbit { display: none; }
  .company-files-stats { grid-template-columns: 1fr; }
  .company-file-toolbar { align-items: flex-start; flex-direction: column; }
  .company-file-toolbar-actions { width: 100%; flex-wrap: wrap; }
  .company-file-search { width: 100%; }
  .company-file-grid,
  .permission-grid { grid-template-columns: 1fr; }
  .company-upload-drawer { padding: 1.2rem; }
  .company-upload-fields,
  .company-visibility-options { grid-template-columns: 1fr; }
  .company-upload-fields .is-full { grid-column: auto; }
  .company-employee-picker > div { grid-template-columns: 1fr; }
  .permission-hero { grid-template-columns: 48px 1fr; }
  .permission-score { display: none; }
  .permission-toolbar,
  .permission-footer { align-items: stretch; flex-direction: column; }
  .permission-footer button { width: 100%; }
}

/* Offline read-only task mode */
.offline-task-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid #f0d18d;
  border-radius: 13px;
  background: linear-gradient(135deg, #fff9e9, #fff4d4);
  color: #7a5512;
  box-shadow: 0 8px 20px rgba(139, 94, 17, 0.08);
}

.offline-task-banner[hidden] {
  display: none;
}

.offline-task-banner-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 11px;
  background: rgba(211, 143, 28, 0.13);
  color: #b8740c;
}

.offline-task-banner-icon svg {
  width: 19px;
  height: 19px;
}

.offline-task-banner > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.offline-task-banner strong {
  font-size: 0.72rem;
}

.offline-task-banner small {
  color: #9a732d;
  font-size: 0.61rem;
}

.offline-task-banner button {
  min-height: 35px;
  margin-left: auto;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(169, 108, 13, 0.22);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.7);
  color: #875b10;
  font-size: 0.62rem;
  font-weight: 750;
  cursor: pointer;
}

#page-tasks.is-offline-readonly .board-tile-create,
#page-tasks.is-offline-readonly .board-tile-delete,
#page-tasks.is-offline-readonly .task-card-edit,
#page-tasks.is-offline-readonly .task-column-menu-btn,
#page-tasks.is-offline-readonly .task-add-card-btn,
#page-tasks.is-offline-readonly .task-quick-add,
#page-tasks.is-offline-readonly .task-danger-btn,
#page-tasks.is-offline-readonly .task-clockify-btn,
#page-tasks.is-offline-readonly .task-drawer-foot .btn-primary {
  display: none !important;
}

#page-tasks.is-offline-readonly .task-card {
  cursor: pointer;
}

#page-tasks.is-offline-readonly .task-drawer :is(input, select, textarea, [contenteditable="true"]),
#page-tasks.is-offline-readonly .task-drawer button:not([data-action="close-drawer"]) {
  pointer-events: none;
}

#page-tasks.is-offline-readonly .task-drawer :is(input, select, textarea, [contenteditable="true"]) {
  opacity: 0.8;
}

#btn-create-board-task:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

html.theme-dark .offline-task-banner {
  border-color: rgba(245, 185, 66, 0.24);
  background: linear-gradient(135deg, rgba(111, 74, 14, 0.24), rgba(83, 58, 16, 0.19));
  color: #f4ce7a;
}

html.theme-dark .offline-task-banner small {
  color: #c5a465;
}

html.theme-dark .offline-task-banner button {
  border-color: rgba(245, 185, 66, 0.2);
  background: rgba(15, 23, 42, 0.38);
  color: #e7c373;
}

@media (max-width: 620px) {
  .offline-task-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .offline-task-banner > span:nth-child(2) {
    width: calc(100% - 50px);
  }

  .offline-task-banner button {
    width: 100%;
    margin-left: 0;
  }
}

/* Office-presence attendance confirmation */
.attendance-presence-card {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 230px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-align: center;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.attendance-presence-icon,
.attendance-presence-check {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 0.65rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.12);
}

.attendance-presence-check {
  background: rgba(93, 227, 155, 0.16);
  color: #8af0b9;
}

.attendance-presence-icon svg,
.attendance-presence-check svg {
  width: 22px;
  height: 22px;
}

.attendance-presence-card h3 {
  margin: 0.45rem 0 0;
  color: #fff;
  font-size: 1.3rem;
  letter-spacing: -0.035em;
}

.attendance-presence-card > p {
  max-width: 360px;
  margin: 0.4rem 0 0;
  color: rgba(231, 235, 255, 0.68);
  font-size: 0.7rem;
  line-height: 1.55;
}

.attendance-office-now {
  margin-top: 0.8rem;
  color: #fff;
  font-size: 1.65rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}

.attendance-presence-card .attendance-primary-action {
  margin-top: 0.75rem;
}

.attendance-arrival-time {
  display: grid;
  gap: 0.15rem;
  margin: 0.85rem 0 0.55rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
}

.attendance-arrival-time small {
  color: rgba(225, 231, 255, 0.56);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.attendance-arrival-time strong {
  color: #fff;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.attendance-presence-card .attendance-late-note {
  color: #fed7aa;
}

.attendance-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0 0;
}

.attendance-confirm > span {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 0.7rem;
  place-items: center;
  border-radius: 16px;
  background: #eeebff;
  color: #6554d9;
}

.attendance-confirm > span svg {
  width: 24px;
  height: 24px;
}

.attendance-confirm small {
  color: #8a93a2;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.attendance-confirm strong {
  margin-top: 0.3rem;
  color: #222c40;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}

.attendance-confirm p {
  max-width: 360px;
  margin: 0.55rem auto 0;
  color: #778294;
  font-size: 0.7rem;
  line-height: 1.55;
}

html.theme-dark .attendance-confirm > span {
  background: rgba(109, 89, 220, 0.17);
  color: #aa9dff;
}

html.theme-dark .attendance-confirm strong {
  color: #eef2ff;
}

html.theme-dark .attendance-confirm p {
  color: #a0aabd;
}

/* Login attendance gate */
.attendance-login-gate-modal {
  padding: 0.35rem 0.2rem 1rem !important;
  border-radius: 22px !important;
}

.attendance-login-gate {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem 0.2rem;
  text-align: center;
}

.attendance-login-gate-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 0.35rem;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #4737c9, #6554e8);
  color: #fff;
  box-shadow: 0 14px 28px rgba(71, 55, 201, 0.28);
}

.attendance-login-gate-icon svg {
  width: 24px;
  height: 24px;
}

.attendance-login-gate .attendance-eyebrow {
  color: #6554e8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.attendance-login-gate h3 {
  margin: 0.15rem 0 0;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.attendance-login-gate > p {
  max-width: 34ch;
  margin: 0.25rem 0 0.35rem;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.attendance-login-gate-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 650;
}

.attendance-login-gate-date svg {
  width: 14px;
  height: 14px;
}

.attendance-login-gate-time {
  margin-top: 0.55rem;
  color: #0f172a;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.attendance-login-gate-hint {
  color: #94a3b8;
  font-size: 0.7rem;
}

.attendance-login-gate-confirm {
  min-width: 200px !important;
  min-height: 44px !important;
  margin-top: 0.35rem !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
}

html.theme-dark .attendance-login-gate h3,
html.theme-dark .attendance-login-gate-time {
  color: #f8fafc;
}

html.theme-dark .attendance-login-gate > p,
html.theme-dark .attendance-login-gate-hint {
  color: #94a3b8;
}

html.theme-dark .attendance-login-gate-date {
  background: rgba(51, 65, 85, 0.7);
  color: #cbd5e1;
}

html.theme-dark .attendance-login-gate .attendance-eyebrow {
  color: #a5b4fc;
}

/* Staff complaints and inquiry center */
.complaints-root {
  color: #182033;
}

.complaints-page {
  display: grid;
  max-width: 1480px;
  margin: 0 auto;
  gap: 1rem;
}

.complaints-hero,
.inquiry-admin-hero {
  position: relative;
  display: flex;
  min-height: 245px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  padding: 2.3rem 2.6rem;
  border-radius: 27px;
  background:
    radial-gradient(circle at 88% 12%, rgba(129, 108, 255, 0.35), transparent 32%),
    linear-gradient(128deg, #121b38, #26366d 62%, #5e48cc);
  color: #fff;
  box-shadow: 0 22px 48px rgba(27, 35, 82, 0.2);
}

.complaints-hero::after,
.inquiry-admin-hero::after {
  position: absolute;
  right: -75px;
  bottom: -150px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255, 255, 255, 0.025), 0 0 0 90px rgba(255, 255, 255, 0.015);
  content: "";
}

.complaints-hero > div:first-child,
.inquiry-admin-hero > div:first-child {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.complaints-eyebrow {
  color: #9b8cf8;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.complaints-hero .complaints-eyebrow,
.inquiry-admin-hero .complaints-eyebrow {
  color: #bcb3ff;
}

.complaints-hero h2,
.inquiry-admin-hero h2 {
  margin: 0.45rem 0 0;
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.complaints-hero > div:first-child > p,
.inquiry-admin-hero > div:first-child > p {
  max-width: 650px;
  margin: 0.75rem 0 0;
  color: rgba(231, 235, 255, 0.7);
  font-size: 0.82rem;
  line-height: 1.7;
}

.complaints-hero > div:first-child > button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  padding: 0.68rem 0.9rem;
  border: 0;
  border-radius: 11px;
  background: #fff;
  color: #5543c2;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 11px 24px rgba(7, 13, 43, 0.24);
  cursor: pointer;
}

.complaints-hero button svg {
  width: 16px;
  height: 16px;
}

.complaints-shield {
  position: relative;
  z-index: 2;
  display: flex;
  width: 275px;
  min-height: 175px;
  flex: 0 0 275px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.09);
  text-align: center;
  backdrop-filter: blur(16px);
}

.complaints-shield > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: rgba(107, 238, 170, 0.13);
  color: #88ebb7;
}

.complaints-shield svg {
  width: 25px;
  height: 25px;
}

.complaints-shield strong {
  margin-top: 0.65rem;
  font-size: 0.75rem;
}

.complaints-shield p {
  margin: 0.35rem 0 0;
  color: rgba(231, 235, 255, 0.63);
  font-size: 0.61rem;
  line-height: 1.55;
}

.complaint-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.complaint-metric {
  display: flex;
  min-height: 100px;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #e4e7ee;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 23px rgba(30, 41, 59, 0.05);
}

.complaint-metric > span {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  border-radius: 14px;
  background: #eaf3ff;
  color: #3e76d8;
}

.complaint-metric.is-amber > span { background: #fff4dc; color: #cc8615; }
.complaint-metric.is-green > span { background: #e8f8f0; color: #249b64; }
.complaint-metric.is-violet > span { background: #f0edff; color: #6b56d8; }
.complaint-metric.is-red > span { background: #fff0f1; color: #cf4a55; }
.complaint-metric svg { width: 19px; height: 19px; }
.complaint-metric div { display: grid; }
.complaint-metric strong { color: #182033; font-size: 1.35rem; letter-spacing: -0.045em; }
.complaint-metric small { color: #8490a1; font-size: 0.63rem; }

.complaint-panel {
  overflow: hidden;
  border: 1px solid #e4e7ee;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(30, 41, 59, 0.05);
}

.complaint-panel > header {
  padding: 1.2rem 1.3rem;
  border-bottom: 1px solid #e8eaf0;
}

.complaint-panel h3,
.inquiry-toolbar h3 {
  margin: 0.15rem 0 0;
  color: #1f293b;
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.complaint-staff-list {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.complaint-staff-card {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem;
  border: 1px solid #e5e8ee;
  border-radius: 14px;
  background: #fbfcfe;
}

.complaint-category-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  background: #edf3ff;
  color: #4774ce;
}

.complaint-category-icon.is-harassment,
.complaint-category-icon.is-safety { background: #fff0f1; color: #c94a55; }
.complaint-category-icon.is-management { background: #f1edff; color: #6b54cf; }
.complaint-category-icon svg { width: 19px; height: 19px; }

.complaint-card-copy {
  min-width: 0;
}

.complaint-card-copy > div {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.complaint-card-copy h4 {
  margin: 0.38rem 0 0;
  color: #273247;
  font-size: 0.76rem;
}

.complaint-card-copy > p {
  margin: 0.2rem 0 0;
  color: #8a94a4;
  font-size: 0.6rem;
}

.complaint-card-copy aside {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-left: 3px solid #7662df;
  border-radius: 0 9px 9px 0;
  background: #f5f3ff;
}

.complaint-card-copy aside b {
  color: #5f4dbe;
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.complaint-card-copy aside span {
  overflow: hidden;
  color: #667085;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.complaint-private {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #725fc8;
  font-size: 0.54rem;
}

.complaint-private svg {
  width: 10px;
  height: 10px;
}

.complaint-card-end {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.complaint-card-end button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid #e1e5eb;
  border-radius: 9px;
  background: #fff;
  color: #707b8c;
  cursor: pointer;
}

.complaint-card-end button svg {
  width: 13px;
  height: 13px;
}

.complaint-status,
.complaint-priority {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.3rem;
  padding: 0.27rem 0.48rem;
  border-radius: 18px;
  background: #edf3ff;
  color: #3e6dbd;
  font-size: 0.54rem;
  font-weight: 800;
  text-transform: capitalize;
}

.complaint-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.complaint-status.is-in_review { background: #fff4dc; color: #ad7213; }
.complaint-status.is-resolved { background: #e8f8f0; color: #178856; }
.complaint-status.is-dismissed { background: #f0f2f5; color: #707989; }
.complaint-priority { background: #f0f2f5; color: #687284; }
.complaint-priority.is-high { background: #fff1e2; color: #b46b14; }
.complaint-priority.is-urgent { background: #fff0f1; color: #c43f4a; }
.complaint-priority.is-low { background: #eaf7f2; color: #24825c; }

.inquiry-admin-hero {
  min-height: 190px;
}

.inquiry-confidential-badge {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: #dcd7ff;
  font-size: 0.62rem;
}

.inquiry-confidential-badge svg {
  width: 14px;
  height: 14px;
}

.inquiry-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #e8eaf0;
}

.inquiry-filters {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.inquiry-filters label {
  display: flex;
  width: 215px;
  height: 38px;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.65rem;
  border: 1px solid #dfe3ea;
  border-radius: 9px;
  background: #fbfcfd;
  color: #8992a1;
}

.inquiry-filters input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #273247;
  font: inherit;
  font-size: 0.66rem;
}

.inquiry-filters select {
  height: 38px;
  padding: 0 0.6rem;
  border: 1px solid #dfe3ea;
  border-radius: 9px;
  background: #fbfcfd;
  color: #596579;
  font-size: 0.64rem;
}

.inquiry-table-wrap {
  overflow-x: auto;
}

.inquiry-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

.inquiry-table th {
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid #e7eaf0;
  background: #f8f9fb;
  color: #8c95a4;
  font-size: 0.55rem;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.inquiry-table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid #e8eaf0;
  color: #667184;
  font-size: 0.65rem;
}

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

.inquiry-table td > strong {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: #293448;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inquiry-table td > small {
  display: block;
  margin-top: 0.18rem;
  color: #929baa;
  font-size: 0.56rem;
}

.inquiry-person {
  display: flex;
  min-width: 175px;
  align-items: center;
  gap: 0.55rem;
}

.inquiry-person > span {
  display: grid;
}

.inquiry-person strong {
  color: #293448;
  font-size: 0.68rem;
}

.inquiry-person small {
  color: #929baa;
  font-size: 0.56rem;
}

.complaint-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  object-fit: cover;
}

.complaint-avatar.is-fallback {
  background: linear-gradient(135deg, #e2ddff, #c7dcff);
  color: #5141ac;
  font-size: 0.57rem;
  font-weight: 850;
}

.inquiry-review-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.58rem;
  border: 1px solid #ded9fa;
  border-radius: 8px;
  background: #f4f1ff;
  color: #5e4bc4;
  font-size: 0.59rem;
  font-weight: 750;
  cursor: pointer;
}

.inquiry-review-btn svg {
  width: 11px;
  height: 11px;
}

.complaint-form-layer {
  position: fixed;
  z-index: 190;
  inset: 0;
}

.complaint-form-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 34, 0.62);
  backdrop-filter: blur(5px);
}

.complaint-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(650px, 100%);
  height: 100%;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.7rem;
  background: #fff;
  box-shadow: -30px 0 70px rgba(5, 10, 28, 0.28);
}

.complaint-drawer > header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e7eaf0;
}

.complaint-drawer h3 {
  margin: 0.18rem 0 0;
  color: #192135;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.complaint-drawer header p {
  margin: 0.35rem 0 0;
  color: #7e8899;
  font-size: 0.69rem;
}

.complaint-drawer header button {
  width: 36px;
  height: 36px;
  border: 1px solid #e2e6ed;
  border-radius: 10px;
  background: #f8fafc;
  color: #6e7888;
  font-size: 1.3rem;
  cursor: pointer;
}

.complaint-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  padding: 1.2rem 0;
}

.complaint-form-grid label {
  display: grid;
  gap: 0.38rem;
}

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

.complaint-form-grid label > span {
  color: #414b5d;
  font-size: 0.65rem;
  font-weight: 750;
}

.complaint-form-grid em {
  color: #959eac;
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 500;
}

.complaint-form-grid :is(input, select, textarea) {
  width: 100%;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  background: #fbfcfd;
  color: #263044;
  font: inherit;
  font-size: 0.7rem;
  outline: 0;
}

.complaint-form-grid :is(input, select) {
  height: 42px;
  padding: 0 0.7rem;
}

.complaint-form-grid textarea {
  padding: 0.7rem;
  resize: vertical;
}

.complaint-form-grid :is(input, select, textarea):focus {
  border-color: #7764e7;
  box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.1);
}

.complaint-confidential {
  position: relative;
}

.complaint-confidential > input {
  position: absolute;
  opacity: 0;
}

.complaint-confidential > span {
  display: grid;
  min-height: 72px;
  grid-template-columns: 35px 1fr;
  align-content: center;
  column-gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid #e0e3eb;
  border-radius: 12px;
  background: #fafbfe;
  cursor: pointer;
}

.complaint-confidential input:checked + span {
  border-color: #8371e8;
  background: #f6f4ff;
}

.complaint-confidential svg {
  grid-row: 1 / 3;
  width: 22px;
  height: 22px;
  color: #6754cb;
}

.complaint-confidential strong {
  color: #3c4659;
  font-size: 0.67rem;
}

.complaint-confidential small {
  color: #8b95a5;
  font-size: 0.56rem;
}

.complaint-form-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem;
  border-radius: 10px;
  background: #fff8e8;
  color: #8c681d;
  font-size: 0.58rem;
  line-height: 1.55;
}

.complaint-form-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.complaint-drawer > footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #e7eaf0;
}

.complaint-drawer > footer button {
  display: inline-flex;
  min-height: 41px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  background: #fff;
  color: #606b7d;
  font-size: 0.67rem;
  font-weight: 750;
  cursor: pointer;
}

.complaint-drawer > footer button[type="submit"] {
  border: 0;
  background: linear-gradient(135deg, #6c59df, #4a38bb);
  color: #fff;
}

.complaint-drawer > footer button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.complaint-drawer > footer svg {
  order: 2;
  width: 13px;
  height: 13px;
}

.complaint-empty,
.complaints-loading {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #8575dd;
  text-align: center;
}

.complaint-empty > svg {
  width: 38px;
  height: 38px;
}

.complaint-empty h4 {
  margin: 0.7rem 0 0;
  color: #293449;
}

.complaint-empty p,
.complaints-loading p {
  margin: 0.35rem 0 0;
  color: #8791a1;
  font-size: 0.68rem;
}

.complaint-empty button {
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: #6856d5;
  color: #fff;
  cursor: pointer;
}

.complaints-loading {
  min-height: 430px;
}

.complaints-loading span {
  width: 31px;
  height: 31px;
  border: 3px solid #dfdbf8;
  border-top-color: #705de5;
  border-radius: 50%;
  animation: company-spin 0.7s linear infinite;
}

.complaint-modal {
  border-radius: 21px !important;
}

.complaint-letter {
  color: #526075;
  font-size: 0.7rem;
  text-align: left;
}

.complaint-letter-person {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #e8eaf0;
}

.complaint-letter-person > div {
  display: grid;
  flex: 1;
}

.complaint-letter-person strong {
  color: #283348;
}

.complaint-letter-person span {
  color: #929baa;
  font-size: 0.58rem;
}

.complaint-letter-person > b {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #6753c6;
  font-size: 0.56rem;
}

.complaint-letter-person > b svg {
  width: 12px;
  height: 12px;
}

.complaint-letter-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.complaint-letter-meta > span:last-child {
  margin-left: auto;
  color: #8a94a4;
  font-size: 0.58rem;
}

.complaint-letter > h3 {
  margin: 0.8rem 0 0;
  color: #253047;
  font-size: 1rem;
}

.complaint-letter section {
  margin-top: 0.65rem;
  padding: 0.75rem;
  border: 1px solid #e6e9ef;
  border-radius: 11px;
}

.complaint-letter section small {
  color: #8b7eb1;
  font-size: 0.52rem;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.complaint-letter section p {
  margin: 0.35rem 0 0;
  color: #4f5d71;
  line-height: 1.6;
  white-space: pre-wrap;
}

.complaint-letter section.is-response {
  border-color: #dcd6fa;
  background: #f7f5ff;
}

.complaint-letter footer {
  margin-top: 0.75rem;
  color: #929baa;
  font-size: 0.55rem;
  text-align: center;
}

.inquiry-response-form {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e5e8ee;
  text-align: left;
}

.inquiry-response-form label {
  display: grid;
  gap: 0.35rem;
}

.inquiry-response-form label > span {
  color: #414b5d;
  font-size: 0.61rem;
  font-weight: 750;
}

.inquiry-response-form :is(select, textarea) {
  width: 100%;
  border: 1px solid #dfe3ea;
  border-radius: 9px;
  background: #fbfcfd;
  color: #263044;
  font: inherit;
  font-size: 0.67rem;
}

.inquiry-response-form select {
  height: 40px;
  padding: 0 0.6rem;
}

.inquiry-response-form textarea {
  padding: 0.65rem;
  resize: vertical;
}

html.theme-dark .complaints-root {
  color: #e8edf8;
}

html.theme-dark .complaint-metric,
html.theme-dark .complaint-panel,
html.theme-dark .complaint-staff-card {
  border-color: rgba(148, 163, 184, 0.15);
  background: rgba(17, 25, 43, 0.95);
}

html.theme-dark .complaint-metric strong,
html.theme-dark .complaint-panel h3,
html.theme-dark .inquiry-toolbar h3,
html.theme-dark .complaint-card-copy h4,
html.theme-dark .inquiry-table td > strong,
html.theme-dark .inquiry-person strong,
html.theme-dark .complaint-empty h4 {
  color: #edf2ff;
}

html.theme-dark .complaint-card-copy aside {
  background: rgba(109, 89, 220, 0.13);
}

html.theme-dark .inquiry-toolbar,
html.theme-dark .complaint-panel > header,
html.theme-dark .inquiry-table :is(th, td) {
  border-color: rgba(148, 163, 184, 0.14);
}

html.theme-dark .inquiry-table th {
  background: #11192b;
}

html.theme-dark .inquiry-filters :is(label, select) {
  border-color: #303b50;
  background: #192235;
  color: #d6ddea;
}

html.theme-dark .inquiry-filters input {
  color: #e5eaf5;
}

html.theme-dark .complaint-drawer {
  background: #111827;
}

html.theme-dark .complaint-drawer > header,
html.theme-dark .complaint-drawer > footer {
  border-color: #293448;
}

html.theme-dark .complaint-drawer h3,
html.theme-dark .complaint-form-grid label > span,
html.theme-dark .complaint-confidential strong {
  color: #edf2ff;
}

html.theme-dark .complaint-form-grid :is(input, select, textarea),
html.theme-dark .complaint-confidential > span,
html.theme-dark .complaint-drawer > footer button {
  border-color: #303b50;
  background: #192235;
  color: #e2e8f0;
}

html.theme-dark .complaint-confidential input:checked + span {
  border-color: #7d6be2;
  background: #252346;
}

@media (max-width: 1000px) {
  .complaint-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inquiry-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .complaints-hero,
  .inquiry-admin-hero {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 1.5rem;
  }

  .complaints-shield {
    width: 100%;
    min-height: 140px;
    flex-basis: auto;
  }

  .inquiry-confidential-badge {
    margin-top: 0.5rem;
  }

  .complaint-staff-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .complaint-card-end {
    grid-column: 2;
    justify-content: space-between;
  }

  .inquiry-filters {
    flex-wrap: wrap;
  }

  .inquiry-filters label {
    width: 100%;
  }

  .complaint-drawer {
    padding: 1.2rem;
  }

  .complaint-form-grid,
  .inquiry-response-form {
    grid-template-columns: 1fr;
  }

  .complaint-form-grid .is-full {
    grid-column: auto;
  }
}

.task-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}

.task-due.is-overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.task-due.is-today,
.task-due.is-soon {
  background: #fef3c7;
  color: #b45309;
}

.task-due.is-ok {
  background: #dcfce7;
  color: #15803d;
}

.task-check-badge.is-done {
  background: #dcfce7;
  color: #15803d;
}

.task-card-people {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.task-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.task-card.priority-low .task-priority-dot { background: #94a3b8; }
.task-card.priority-medium .task-priority-dot { background: #3b82f6; }
.task-card.priority-high .task-priority-dot { background: #f59e0b; }
.task-card.priority-urgent .task-priority-dot { background: #ef4444; }

.task-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.4rem;
}

.task-labels.is-detailed {
  margin-bottom: 0;
}

.task-label {
  display: inline-block;
  min-width: 40px;
  height: 8px;
  border-radius: 4px;
}

.task-labels.is-detailed .task-label {
  min-width: 0;
  height: auto;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 750;
  color: #fff;
  border-radius: 4px;
}

.task-labels.is-editable {
  gap: 0.4rem;
}

.task-label-input {
  border: 0;
  outline: none;
  min-width: 72px;
  max-width: 160px;
  width: 7.5rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.task-label-input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.task-label-input:focus {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.task-label-hint {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  color: #94a3b8;
}

.task-label-picker {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 260px;
  overflow: auto;
}

.task-label-edit-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.35rem;
  align-items: center;
}

.task-label-edit-toggle {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.45;
  padding: 0;
}

.task-label-edit-toggle.is-on,
.task-label-edit-row.is-active .task-label-edit-toggle {
  opacity: 1;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.task-label-edit-input {
  width: 100%;
  height: 28px;
  border: 0;
  border-radius: 4px;
  padding: 0 0.55rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 750;
  color: #fff;
  outline: none;
}

.task-label-edit-input:disabled {
  opacity: 0.45;
  cursor: default;
}

.task-label-edit-input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.task-label-edit-input:focus {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75);
}

.task-label-green { background: #22c55e; }
.task-label-yellow { background: #eab308; }
.task-label-orange { background: #f97316; }
.task-label-red { background: #ef4444; }
.task-label-purple { background: #a855f7; }
.task-label-blue { background: #3b82f6; }
.task-label-sky { background: #0ea5e9; }
.task-label-lime { background: #84cc16; }
.task-label-pink { background: #ec4899; }
.task-label-black { background: #334155; }

.task-assignee-stack {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.task-assignee-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 750;
  color: #334155;
  border: 2px solid #fff;
}

.task-assignee-stack .task-assignee-avatar.is-stacked {
  margin-left: -7px;
}

.task-assignee-more {
  margin-left: -7px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.58rem;
}

.task-assignee-add {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px dashed #94a3b8;
  background: rgba(255, 255, 255, 0.7);
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.task-assignee-add:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  border-style: solid;
  color: #2563eb;
}

html.theme-dark .task-assignee-add {
  background: rgba(15, 23, 42, 0.55);
  border-color: #64748b;
  color: #94a3b8;
}

html.theme-dark .task-assignee-add:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: #60a5fa;
  color: #93c5fd;
}

.task-add-card-btn {
  margin: 0 0.45rem 0.55rem;
  border: 0;
  background: transparent;
  color: #64748b;
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.task-add-card-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.task-quick-add {
  margin: 0 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.task-quick-add textarea {
  width: 100%;
  border: 2px solid #2563eb;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.84rem;
  resize: vertical;
  min-height: 56px;
  outline: none;
}

.task-quick-add-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Card detail drawer */
.task-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.task-drawer[hidden] {
  display: none !important;
}

.task-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.task-drawer.is-open .task-drawer-backdrop {
  opacity: 1;
}

.task-drawer-panel {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100% - 2rem));
  max-height: calc(100vh - 2.5rem);
  margin: 1.25rem auto;
  background: #f4f5f7;
  border-radius: 14px;
  box-shadow: var(--os-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.task-drawer.is-open .task-drawer-panel {
  transform: none;
  opacity: 1;
}

.task-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.35rem 1.15rem;
}

.task-drawer-list {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #64748b;
}

.task-drawer-list-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.task-drawer-close {
  font-size: 1.4rem !important;
  line-height: 1;
  padding: 0.15rem 0.45rem !important;
}

.task-drawer-body {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1rem;
  padding: 0.35rem 1.15rem 1rem;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.task-drawer-title {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  color: #172b4d;
  padding: 0.2rem 0.25rem;
  border-radius: 8px;
  outline: none;
}

.task-drawer-title:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #93c5fd;
}

.task-drawer-section {
  margin-top: 1rem;
}

.task-drawer-section h5,
.task-side-block h6 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 750;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.task-drawer-desc {
  width: 100%;
  border: 1px solid transparent;
  background: #eaecf0;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 110px;
  color: #334155;
}

.task-drawer-richtext .richtext-toolbar {
  margin-bottom: 0.45rem;
}

.task-drawer-richtext .richtext-editor.task-drawer-desc {
  background: #fff;
  border: 1px solid #e2e8f0;
  min-height: 140px;
}

.task-drawer-richtext .richtext-editor.task-drawer-desc:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.task-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 0.75rem 1.15rem;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.72);
  flex-shrink: 0;
}

.task-drawer-foot .btn {
  min-width: 96px;
  justify-content: center;
}

html.theme-dark .task-drawer-foot {
  background: rgba(15, 23, 42, 0.65);
  border-top-color: rgba(148, 163, 184, 0.2);
}

.task-drawer-desc:focus {
  outline: none;
  background: #fff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.task-check-progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.task-check-progress > span {
  display: block;
  height: 100%;
  background: #22c55e;
}

.task-check-progress > em {
  position: absolute;
  right: 0;
  top: -1.15rem;
  font-size: 0.7rem;
  font-style: normal;
  color: #64748b;
  font-weight: 700;
}

.task-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.task-check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  cursor: pointer;
}

.task-check-item:hover {
  background: rgba(15, 23, 42, 0.05);
}

.task-check-item.is-done .task-check-text {
  text-decoration: line-through;
  color: #94a3b8;
}

.task-check-text {
  flex: 1;
  font-size: 0.86rem;
  color: #334155;
}

.task-check-del {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
}

.task-check-item:hover .task-check-del {
  opacity: 1;
}

.task-check-add {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.task-check-add input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.84rem;
  background: #fff;
}

.task-drawer-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.task-side-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.task-side-select {
  width: 100%;
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 0.55rem;
  font: inherit;
  font-size: 0.82rem;
  background: #fff;
}

.task-label-picker {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 260px;
  overflow: auto;
}

.task-label-pick {
  height: 28px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.task-label-pick.is-active,
.task-label-pick:hover {
  opacity: 1;
  transform: scale(1.04);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.task-member-picker {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 180px;
  overflow: auto;
}

.task-member-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  background: #eaecf0;
  border-radius: 8px;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.task-member-chip img,
.task-member-chip > span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 750;
  flex-shrink: 0;
}

.task-member-chip em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 650;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-member-chip.is-on {
  background: #dbeafe;
  border-color: #93c5fd;
}

.task-danger-btn {
  width: 100%;
  justify-content: center;
  color: #b91c1c !important;
  border-color: #fecaca !important;
  background: #fff !important;
}

.task-danger-btn:hover {
  background: #fef2f2 !important;
}

.task-due-hint {
  font-size: 0.72rem;
  font-weight: 700;
}

.task-due-hint.is-overdue { color: #b91c1c; }
.task-due-hint.is-today,
.task-due-hint.is-soon { color: #b45309; }
.task-due-hint.is-ok { color: #15803d; }

.task-drawer-empty {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.task-drawer-meta {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  color: #94a3b8;
}

@media (max-width: 800px) {
  .task-drawer-body {
    grid-template-columns: 1fr;
  }

  .task-drawer-panel {
    width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
    margin: 0.5rem auto;
  }

  .task-column {
    width: 260px;
    min-width: 260px;
  }
}

/* Modal file / photo picker */
.file-field {
  margin-bottom: 0.9rem;
}

.file-field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--os-muted);
  margin-bottom: 0.4rem;
}

.file-field-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--os-muted) 4%, var(--os-surface, #fff));
}

.file-preview {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--os-border);
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.file-field.is-photo .file-preview {
  width: 52px;
  height: 52px;
  border-radius: 999px;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.file-preview-placeholder {
  font-size: 0.62rem;
  font-weight: 650;
  color: #94a3b8;
  text-align: center;
  padding: 0.2rem;
  line-height: 1.2;
}

.file-preview.is-file {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.file-preview-ext {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1d4ed8;
}

.file-field-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.38rem;
  min-width: 0;
  flex: 1 1 auto;
}

.file-field-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
}

.file-field-actions .btn {
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.2;
}

.file-name {
  max-width: 100%;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--os-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-field-hint {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--os-muted);
}

.os-team-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0.75rem 1rem;
}

.os-member {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.8rem;
  border: none;
  background: transparent;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.os-member:hover {
  background: #f3f4f6;
}

.os-member.is-active {
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.os-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.os-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center top;
  background: #e5e7eb;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e5e7eb;
}

.os-online {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
}

.os-member-meta {
  min-width: 0;
}

.os-member-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--os-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.os-member-sub {
  font-size: 0.72rem;
  color: var(--os-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.os-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.os-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.75rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--os-border);
  position: sticky;
  top: 0;
  z-index: 200;
  max-height: 112px;
  overflow: visible;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 0.28s ease,
    padding 0.28s ease,
    opacity 0.2s ease,
    transform 0.28s ease,
    border-color 0.2s ease;
}

.topbar-collapse-btn,
.topbar-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--os-border);
  color: var(--os-muted);
  background: var(--os-surface-2);
  cursor: pointer;
  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.topbar-collapse-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 11px;
}

.topbar-collapse-btn:hover,
.topbar-expand-btn:hover {
  border-color: rgba(99, 102, 241, 0.3);
  color: #4f46e5;
  background: var(--os-accent-soft);
}

.topbar-expand-btn {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 45;
  gap: 0.38rem;
  min-height: 36px;
  padding: 0 0.72rem;
  border-radius: 11px;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  box-shadow: var(--os-shadow);
  backdrop-filter: blur(12px);
}

.topbar-expand-btn[hidden] {
  display: none;
}

.topbar-expand-btn:hover {
  transform: translateY(-1px);
}

.os-shell.topbar-collapsed .os-topbar {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  overflow: hidden;
}

.staff-workspace .topbar-expand-btn {
  top: 84px;
}

.os-shell.topbar-collapsed .channels-shell {
  height: calc(100vh - 20px);
}

.staff-workspace .os-shell.topbar-collapsed .channels-shell {
  height: calc(100vh - 94px);
}

html.theme-dark .topbar-collapse-btn,
html.theme-dark .topbar-expand-btn {
  border-color: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.9);
}

.os-topbar h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.os-topbar span {
  font-size: 0.8rem;
  color: var(--os-muted);
  font-weight: 550;
}

.topbar-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.header-user-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.35rem 0.65rem 0.35rem 0.4rem;
  border: 1px solid var(--os-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  text-decoration: none;
}

.header-user-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
}

.os-topbar .header-user-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  font-size: 0.72rem;
  font-weight: 800;
}

.header-user-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.15;
}

.header-user-copy strong {
  max-width: 150px;
  overflow: hidden;
  color: var(--os-text);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-copy small {
  margin-top: 0.15rem;
  color: var(--os-muted);
  font-size: 0.67rem;
  font-weight: 650;
}

.os-content {
  flex: 1;
  padding: 1.6rem 1.75rem 2.75rem;
  max-width: none;
  position: relative;
}

.os-footer {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 0 1.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--os-border);
  color: var(--os-muted);
}

.os-footer-brand,
.os-footer-meta,
.os-footer-status {
  display: flex;
  align-items: center;
}

.os-footer-brand {
  gap: 0.65rem;
}

.os-footer-brand img {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 9px;
  object-fit: contain;
}

.os-footer-brand div {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.os-footer-brand strong {
  color: var(--os-text);
  font-size: 0.74rem;
  font-weight: 800;
}

.os-footer-brand span,
.os-footer-meta {
  font-size: 0.62rem;
  font-weight: 600;
}

.os-footer-meta {
  gap: 0.55rem;
  white-space: nowrap;
}

.os-footer-status {
  gap: 0.38rem;
}

.os-footer-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

body.channels-page-active .os-footer {
  display: none;
}

@media (max-width: 640px) {
  .os-footer {
    min-height: 96px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin-inline: 1rem;
  }

  .os-footer-meta {
    white-space: normal;
  }
}

/* Detail: profile left + mandates right */
.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.detail-profile {
  position: sticky;
  top: 5.25rem;
}

.profile-card {
  --profile-blue: #1d4ed8;
  --profile-blue-deep: #1e3a8a;
  --profile-ink: #0f274f;
  background: #fff;
  color: var(--profile-ink);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  padding: 0;
  overflow: hidden;
  backdrop-filter: none;
}

.profile-card.is-inactive {
  opacity: 0.92;
}

.profile-hero {
  position: relative;
  min-height: 118px;
  padding: 12px 14px 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.18), transparent 42%),
    radial-gradient(circle at 72% 70%, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(145deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
}

.profile-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 10px 10px;
  opacity: 0.35;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 35%, #000 70%);
}

.profile-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  color: #15803d;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.profile-status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.profile-status-pill.is-inactive {
  color: #64748b;
}

.profile-status-pill.is-inactive i {
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.22);
}

.profile-hero-menu {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.profile-hero-menu:hover {
  background: rgba(255, 255, 255, 0.24);
}

.profile-hero-avatar {
  position: relative;
  z-index: 2;
  width: 108px;
  height: 108px;
  margin: 18px auto -54px;
}

.profile-avatar {
  width: 108px !important;
  height: 108px !important;
  border-radius: 999px !important;
  object-fit: cover;
  object-position: center top;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  border: 4px solid #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.profile-body {
  padding: 62px 16px 18px;
  text-align: center;
}

.profile-name {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--profile-ink);
  line-height: 1.2;
}

.profile-role-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
  color: #3b82f6;
  font-size: 0.86rem;
  font-weight: 650;
}

.profile-role-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
}

.profile-role {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.profile-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 10px;
  text-align: left;
}

.profile-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.profile-action-btn:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: #f8fbff;
  color: #1d4ed8;
}

.profile-action-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #2563eb;
}

.profile-action-btn.is-danger,
.profile-action-btn.is-danger .profile-action-icon {
  color: #dc2626;
}

.profile-action-btn.is-danger:hover {
  border-color: rgba(220, 38, 38, 0.35);
  background: #fff5f5;
  color: #b91c1c;
}

.profile-login-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 9px 11px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 650;
  text-align: left;
  line-height: 1.35;
}

.profile-login-banner.is-active {
  background: #ecfdf5;
  color: #166534;
}

.profile-login-banner-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.profile-section {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  text-align: left;
}

.profile-section + .profile-section {
  margin-top: 12px;
}

.profile-section-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--profile-ink);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-section-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #eff6ff;
  color: #2563eb;
}

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

.profile-contact-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.profile-contact-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #eff6ff;
  color: #2563eb;
}

.profile-contact-label {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
}

.profile-contact-value {
  min-width: 0;
  text-align: right;
  color: var(--profile-ink);
  font-size: 14px;
  font-weight: 700;
}

.profile-contact-value strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  color: inherit;
}

.profile-empty-value {
  color: #94a3b8;
  font-style: italic;
  font-weight: 500;
  font-size: 0.8rem;
}

.profile-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.profile-task-list li {
  padding: 9px 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--profile-ink);
  font-size: 0.8rem;
  font-weight: 650;
}

.profile-task-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  padding: 12px;
  border: 1.5px dashed rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 550;
}

.profile-task-empty-icon {
  display: inline-grid;
  place-items: center;
  color: #60a5fa;
}

/* Legacy hooks kept for other screens that still reference these classes */
.profile-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 1.1rem;
}

.profile-online {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #22c55e;
  border: 3px solid #fff;
}

.profile-online.is-inactive {
  background: #94a3b8;
}

.profile-status-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.45rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-status-badge.is-active {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.profile-status-badge.is-inactive {
  background: rgba(148, 163, 184, 0.22);
  color: #475569;
}

.employee-card.is-inactive {
  opacity: 0.78;
}

.employee-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.employee-status-pill.is-active {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.employee-status-pill.is-inactive {
  background: rgba(148, 163, 184, 0.22);
  color: #475569;
}

.profile-info h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--os-text);
}

.profile-module-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.55rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--mp-dark-bg);
  color: var(--mp-dark-text);
  border: 1px solid var(--mp-dark-border);
}

.profile-role-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.profile-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.profile-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.15rem 0 0.85rem;
}

.profile-admin-actions .btn {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}

.profile-edit-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.btn-icon-edit {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  color: var(--os-muted);
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-icon-edit:hover {
  background: var(--os-surface-2);
  color: var(--os-accent);
  border-color: #bfdbfe;
}

html.theme-dark .profile-card {
  background: var(--os-surface);
  color: var(--os-text);
  border-color: var(--os-border);
}

html.theme-dark .profile-body,
html.theme-dark .profile-name,
html.theme-dark .profile-contact-value,
html.theme-dark .profile-section-head,
html.theme-dark .profile-task-list li {
  color: var(--os-text);
}

html.theme-dark .profile-action-btn {
  background: transparent;
  border-color: var(--os-border);
  color: var(--os-text);
}

html.theme-dark .profile-login-banner {
  background: rgba(37, 99, 235, 0.16);
}

html.theme-dark .profile-task-empty,
html.theme-dark .profile-task-list li {
  background: rgba(15, 23, 42, 0.35);
  border-color: var(--os-border);
}

.btn-icon-edit-sm {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  opacity: 0;
}

.os-member:hover .btn-icon-edit-sm,
.os-member.is-active .btn-icon-edit-sm {
  opacity: 1;
}

.os-member-role-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.os-member-role-row .os-member-sub {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-history {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
  background: var(--mp-dark);
  border-color: var(--mp-dark);
  color: #fff;
  gap: 0.5rem;
}

.btn-history:hover {
  background: #1e40af;
  border-color: #1e40af;
  color: #fff;
}

.history-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.7rem;
  font-weight: 700;
}

.history-modal {
  max-width: 640px;
  max-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
}

.history-body {
  overflow-y: auto;
  max-height: none;
  flex: 1;
}

.history-section {
  margin-bottom: 1.25rem;
}

.history-section h4 {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--os-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.history-section h4 span {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.68rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.history-empty {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--os-surface-2);
  border: 1px dashed var(--os-border);
  color: var(--os-muted);
  font-size: 0.85rem;
  font-style: italic;
}

.history-card,
.history-sub-card {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  border-top: 3px solid #cbd5e1;
  color: var(--os-text);
}

.history-card.is-infinite { border-top-color: var(--mp-infinite); }
.history-card.is-primary { border-top-color: var(--mp-dark); }
.history-card.is-secondary { border-top-color: var(--mp-light); }

.history-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.history-card-head h6 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.history-when,
.history-parent {
  font-size: 0.72rem;
  color: var(--os-muted);
  font-weight: 500;
}

.history-desc {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.4;
}

.history-subs {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.history-subs li {
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.history-subs li.is-done {
  text-decoration: line-through;
  opacity: 0.7;
}

.history-subs li span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
}

.profile-block {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.profile-block-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  margin-bottom: 0.55rem;
}

.profile-details {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.profile-detail-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem;
  align-items: start;
}

.profile-detail-row dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.02em;
  padding-top: 0.1rem;
}

.profile-detail-row dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.profile-list li {
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.profile-list li > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-list.infinite li {
  background: var(--mp-infinite-bg);
  border-color: var(--mp-infinite-border);
  color: var(--mp-infinite-text);
}

.profile-list.primary li {
  background: var(--mp-dark-bg);
  border-color: var(--mp-dark-border);
  color: var(--mp-dark-text);
}

.profile-list.secondary li {
  background: var(--mp-light-bg);
  border-color: var(--mp-light-border);
  color: var(--mp-light-text);
}

.profile-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--os-muted);
  font-style: italic;
}

.detail-mandates .section-head,
.detail-main .section-head {
  margin: 0 0 0.85rem;
}

.detail-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-tabs,
.detail-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 14px;
  box-shadow: var(--os-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04));
}

.detail-tab,
.detail-page {
  border: 0;
  background: transparent;
  color: var(--os-muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
}

.detail-tab:hover,
.detail-page:hover {
  color: var(--os-text);
  background: var(--os-accent-soft);
}

.detail-tab.is-active,
.detail-page.is-active {
  color: var(--os-accent);
  background: var(--os-accent-soft);
}

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

/* Calendar */
.cal-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 1rem;
  background: var(--os-surface);
  color: var(--os-text);
  border: 1px solid var(--os-border);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--os-shadow);
}

.cal-toolbar {
  grid-column: 1 / -1;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cal-nav h3 {
  margin: 0;
  min-width: 10rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.cal-weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.cal-cell {
  min-height: 88px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface-2);
  padding: 0.4rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font: inherit;
  color: inherit;
}

.cal-cell.is-muted {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}

.cal-cell.is-today {
  border-color: #93c5fd;
  background: var(--os-accent-soft);
}

.cal-cell.is-selected {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.cal-day-num {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--os-text);
}

.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 0;
}

.cal-chip {
  display: block;
  font-size: 0.62rem;
  font-weight: 650;
  color: #1e3a8a;
  background: #dbeafe;
  border-radius: 6px;
  padding: 0.12rem 0.28rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-more {
  font-size: 0.62rem;
  color: #64748b;
}

.cal-side {
  border-left: 1px solid var(--os-border);
  padding-left: 1rem;
  min-width: 0;
}

.cal-side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cal-side-head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
}

.cal-event-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cal-event-card {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.7rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface-2);
  color: var(--os-text);
}

.cal-event-time {
  font-size: 0.72rem;
  font-weight: 750;
  color: #2563eb;
}

.cal-event-body h4 {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
}

.cal-event-body p {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
}

.cal-rem {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #b45309;
  background: #fff7ed;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.cal-day-empty {
  padding: 1.5rem 0.5rem;
}

/* Clockly */
.clock-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.clock-dash-panel {
  background: var(--os-surface);
  color: var(--os-text);
  border: 1px solid var(--os-border);
  border-radius: 18px;
  padding: 0.85rem 1rem 1rem;
  box-shadow: var(--os-shadow);
}

.clock-dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.clock-dash-head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.clock-dash-head p {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: #94a3b8;
}

.clock-dash-body {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clock-dash {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.clock-stat {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  box-shadow: var(--os-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  color: var(--os-text);
}

.clock-stat.is-total {
  background: var(--os-accent-soft);
  border-color: rgba(59, 130, 246, 0.35);
}

.clock-stat.is-peak {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.clock-stat-label {
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.clock-stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--os-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.clock-stat-sub {
  font-size: 0.74rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clock-breakdowns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.clock-break-card {
  background: var(--os-surface);
  color: var(--os-text);
  border: 1px solid var(--os-border);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  box-shadow: var(--os-shadow);
}

.clock-break-card h4 {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  font-weight: 800;
}

.clock-break-empty {
  margin: 0;
  color: #94a3b8;
  font-size: 0.8rem;
}

.clock-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.clock-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.28rem;
  font-size: 0.76rem;
}

.clock-bar-meta span {
  color: #64748b;
  font-weight: 650;
}

.clock-bar-meta strong {
  color: var(--os-text);
  font-variant-numeric: tabular-nums;
}

.clock-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--os-surface-muted);
  overflow: hidden;
}

.clock-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

@media (max-width: 1100px) {
  .clock-dash,
  .clock-breakdowns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .clock-dash,
  .clock-breakdowns {
    grid-template-columns: 1fr;
  }
}

.clock-running,
.clock-idle {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--os-shadow);
  color: var(--os-text);
}

.clock-running {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--os-accent-soft);
  border-color: rgba(59, 130, 246, 0.35);
}

.clock-running-label {
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2563eb;
}

.clock-running h3,
.clock-idle h3 {
  margin: 0.2rem 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.clock-running p,
.clock-idle p {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
}

.clock-running-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.clock-face {
  font-variant-numeric: tabular-nums;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--os-text);
  letter-spacing: 0.02em;
}

.clock-table-wrap {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--os-shadow);
  overflow: auto;
  color: var(--os-text);
}

.clock-table-head h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.clock-table {
  width: 100%;
  border-collapse: collapse;
}

.clock-table th,
.clock-table td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.84rem;
  vertical-align: middle;
}

.clock-table th {
  color: #94a3b8;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clock-task-name {
  font-weight: 700;
  color: #0f172a;
}

.clock-dur {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.clock-badge.is-live {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 750;
  color: #15803d;
  background: #dcfce7;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.clock-empty {
  text-align: center;
  color: #94a3b8;
  padding: 1.5rem !important;
}

/* Task history timeline */
.history-shell {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--os-border);
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--os-shadow);
}

.history-head {
  margin-bottom: 1rem;
}

.history-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.history-head p {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 0.82rem;
}

.history-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
}

.history-timeline::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: #e2e8f0;
}

.history-item {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  gap: 0.75rem;
  position: relative;
}

.history-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  margin-top: 0.45rem;
  background: #94a3b8;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #cbd5e1;
  z-index: 1;
}

.history-item.is-task .history-dot { background: #2563eb; box-shadow: 0 0 0 1px #93c5fd; }
.history-item.is-calendar .history-dot { background: #7c3aed; box-shadow: 0 0 0 1px #c4b5fd; }
.history-item.is-clockify .history-dot { background: #0d9488; box-shadow: 0 0 0 1px #99f6e4; }
.history-item.is-shutdown .history-dot { background: #ea580c; box-shadow: 0 0 0 1px #fdba74; }
.history-item.is-archive .history-dot { background: #64748b; }

.history-card {
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface-2);
  padding: 0.75rem 0.85rem;
  color: var(--os-text);
}

.history-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.history-type {
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.history-card-top time {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
}

.history-card h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 750;
}

.history-card p {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

@media (max-width: 1100px) {
  .cal-shell {
    grid-template-columns: 1fr;
  }

  .cal-side {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid #eef2f7;
    padding-top: 1rem;
  }
}

@media (max-width: 700px) {
  .cal-cell {
    min-height: 64px;
  }

  .cal-chip {
    display: none;
  }

  .clock-running {
    flex-direction: column;
    align-items: flex-start;
  }
}

.mandate-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tasks-view-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1rem;
}

.tasks-view-group {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.tasks-view-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--os-muted);
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  overflow: hidden;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  background: transparent;
  color: var(--os-muted);
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.view-toggle-btn + .view-toggle-btn {
  border-left: 1px solid var(--os-border);
}

.view-toggle-btn:hover {
  background: var(--os-surface-2);
  color: var(--os-text);
}

.view-toggle-btn.is-active {
  background: var(--os-accent-soft);
  color: var(--os-accent);
}

.mandate-section-head {
  margin-bottom: 0.75rem;
}

.mandate-section-head h4 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--os-muted);
}

.mandate-section.is-infinite .mandate-section-head h4 {
  color: var(--mp-infinite);
}

.mandate-section.is-primary .mandate-section-head h4 {
  color: var(--mp-dark);
}

.mandate-section.is-secondary .mandate-section-head h4 {
  color: var(--mp-light);
}

.mandate-grid.is-empty,
.mandate-grid.section-drag-over {
  min-height: 88px;
  border: 1.5px dashed var(--os-border-strong);
  border-radius: 14px;
  background: var(--os-surface-2);
}

.mandate-grid.section-drag-over {
  border-color: var(--mp-light-border);
  background: var(--mp-light-bg);
}

.mandate-section.is-infinite .mandate-grid.section-drag-over {
  border-color: var(--mp-infinite-border);
  background: var(--mp-infinite-bg);
}

.mandate-section.is-primary .mandate-grid.section-drag-over {
  border-color: var(--mp-dark-border);
  background: var(--mp-dark-bg);
}

.mandate-drop-hint {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 88px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 12px;
}

.mandate-drop-hint:hover {
  color: #64748b;
  background: rgba(148, 163, 184, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
}

.pill.infinite {
  background: var(--mp-infinite-bg);
  color: var(--mp-infinite-text);
}

.pill.primary {
  background: var(--mp-dark-bg);
  color: var(--mp-dark-text);
}

.pill.secondary {
  background: var(--mp-light-bg);
  color: var(--mp-light-text);
}

/* Section */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
}

.section-head h4 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--os-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  color: var(--os-text);
  border-radius: 12px;
  padding: 0.52rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.34);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--os-muted);
  padding: 0.4rem 0.55rem;
  font-size: 0.8rem;
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--os-text);
  box-shadow: none;
}

.btn-danger {
  color: #dc2626;
}

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

.btn-archive {
  color: #059669;
  font-weight: 600;
}

.btn-archive:hover {
  background: #ecfdf5;
  color: #047857;
}

.btn-complete {
  color: #0f766e;
  font-weight: 700;
  background: #ecfeff;
  border-color: #99f6e4;
}

.btn-complete:hover {
  background: #cffafe;
  color: #0f766e;
  border-color: #5eead4;
}

.btn-shutdown {
  color: #b45309;
  font-weight: 700;
  background: #fffbeb;
  border-color: #fcd34d;
}

.btn-shutdown:hover {
  background: #fef3c7;
  color: #92400e;
  border-color: #fbbf24;
}

/* Mandate cards ??? boxed grid */
.mandate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.mandate-sections.is-grid .mandate-grid:not(.is-empty) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mandate-card {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 20px;
  box-shadow: var(--os-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  border-top: 3px solid #cbd5e1;
  transition: box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  cursor: grab;
  backdrop-filter: blur(8px);
  color: var(--os-text);
}

.mandate-card:hover {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.mandate-card:active {
  cursor: grabbing;
}

.mandate-card.is-dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.mandate-card.drag-over {
  box-shadow: 0 0 0 2px #93c5fd, 0 8px 24px rgba(37, 99, 235, 0.12);
}

.mandate-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #94a3b8;
  border-radius: 8px;
  cursor: grab;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.mandate-drag-handle:hover {
  background: var(--os-surface-muted);
  color: var(--os-muted);
}

/* Two-tone system: Primary = rose, Secondary = blue */
.mandate-card.is-infinite {
  border-top-color: var(--mp-infinite);
}

.mandate-card.is-primary {
  border-top-color: var(--mp-dark);
}

.mandate-card.is-secondary {
  border-top-color: var(--mp-light);
}

.mandate-card.is-infinite .mandate-dot {
  background: var(--mp-infinite);
}

.mandate-card.is-primary .mandate-dot {
  background: var(--mp-dark);
}

.mandate-card.is-secondary .mandate-dot {
  background: var(--mp-light);
}

.mandate-card.is-infinite .sub-box {
  background: var(--mp-infinite-bg);
  color: var(--os-text);
  border-color: var(--mp-infinite-border);
}

.mandate-card.is-infinite .sub-box .tag-label {
  color: var(--os-text);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.35;
  word-break: break-word;
}

.mandate-card.is-infinite .sop-step {
  align-items: center;
  cursor: default;
}

.mandate-card.is-infinite .sop-step .sub-main {
  cursor: pointer;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.45rem 0.55rem;
}

.btn-icon-delete {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}

.btn-icon-delete:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.btn-sop-delete {
  flex-shrink: 0;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}

.btn-sop-delete:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.mandate-card.is-primary .sub-box {
  background: var(--mp-dark-bg);
  color: var(--mp-dark-text);
  border-color: var(--mp-dark-border);
}

.mandate-card.is-secondary .sub-box {
  background: var(--mp-light-bg);
  color: var(--mp-light-text);
  border-color: var(--mp-light-border);
}

.mandate-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.75rem;
}

.mandate-card:not(.is-collapsed) .mandate-card-head {
  border-bottom: 1px solid var(--os-border);
}

.mandate-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.mandate-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.mandate-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 0.35rem;
  background: #94a3b8;
}

.mandate-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.mandate-actions {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
}

.mandate-body {
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
}

.mandate-card.is-collapsed .mandate-body {
  display: none;
}

.mandate-card.is-collapsed {
  min-height: 0;
}

.tag-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.mandate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.pill.done-pill {
  background: #dcfce7;
  color: #15803d;
}

.task-check,
.sub-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid #94a3b8;
  background: var(--os-surface);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.task-check:hover,
.sub-check:hover {
  border-color: #22c55e;
}

.mandate-card.is-done .task-check,
.sub-box.is-done .sub-check {
  background: #22c55e;
  border-color: #22c55e;
}

.mandate-card.is-done {
  opacity: 0.78;
}

.mandate-card.is-done .mandate-title {
  text-decoration: line-through;
  color: #64748b;
}

.sub-box {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.25;
  border: 1px solid transparent;
  min-height: 48px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.sub-box:hover {
  filter: brightness(0.98);
}

.sub-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.user-tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.user-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
  max-width: 100%;
}

.user-tag:hover {
  filter: brightness(0.96);
}

.mandate-meta .user-tag {
  margin: 0;
}

.sub-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.sub-side-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.btn-mini {
  padding: 0.3rem 0.5rem;
  font-size: 0.72rem;
}

.color-field {
  margin-bottom: 0.9rem;
}

.color-field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--os-muted);
  margin-bottom: 0.45rem;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.color-swatches.is-plate {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 0.5rem;
}

.color-swatch {
  position: relative;
  cursor: pointer;
  margin: 0;
}

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

.color-swatch span {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #cbd5e1;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.color-swatch.is-plate span {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.color-swatch input:checked + span,
.color-swatch.is-selected span {
  box-shadow: 0 0 0 2px #2563eb;
}

.color-swatch.is-plate input:checked + span,
.color-swatch.is-plate.is-selected span {
  box-shadow: 0 0 0 2px #2563eb, inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transform: scale(1.03);
}

.color-swatch:hover span {
  transform: scale(1.06);
}

html.theme-dark .color-field-label {
  color: #94a3b8;
}

html.theme-dark .color-swatch span {
  border-color: #1e293b;
  box-shadow: 0 0 0 1px #475569;
}

html.theme-dark .color-swatch.is-plate span {
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

html.theme-dark .color-swatch input:checked + span,
html.theme-dark .color-swatch.is-selected span {
  box-shadow: 0 0 0 2px #60a5fa;
}

.sub-box .tag-label {
  flex: 1;
  font-weight: 400;
}

.sub-box.is-done .tag-label {
  text-decoration: line-through;
  opacity: 0.75;
}

.sub-desc {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.85;
  line-height: 1.35;
}

.sub-desc.is-empty {
  opacity: 0.55;
  font-style: italic;
}

.sub-box .tag-edit-btns {
  display: none;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.mandate-card.is-editing .sub-box .tag-edit-btns,
.sub-box.is-done .tag-edit-btns,
.sub-box .tag-edit-btns.is-visible {
  display: inline-flex;
}

.tag-btn {
  border: none;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: inherit;
  opacity: 0.85;
  font-size: 0.75rem;
  line-height: 1;
}

.tag-btn.tag-archive,
.tag-btn.tag-complete,
.tag-btn.tag-delete {
  width: auto;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.tag-btn.tag-archive {
  color: #059669;
  background: #ecfdf5;
}

.tag-btn.tag-archive:hover {
  background: #d1fae5;
  color: #047857;
}

.tag-btn.tag-delete {
  color: #dc2626;
  background: #fef2f2;
}

.tag-btn.tag-delete:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.tag-btn.tag-complete {
  color: #0f766e;
  background: #ecfeff;
}

.tag-btn.tag-complete:hover {
  background: #cffafe;
  color: #0f766e;
}

.tag-btn:hover {
  opacity: 1;
  background: #fff;
}

.empty-tags {
  font-size: 0.85rem;
  color: var(--os-muted);
  font-style: italic;
  margin: 0;
}

.edit-toolbar,
.card-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--os-border);
}

/* Toast ? always above modals / chooser overlays */
.toast,
#os-toast {
  position: fixed;
  bottom: 1.35rem;
  right: 1.35rem;
  background: #0b1220;
  color: #fff;
  padding: 0.8rem 1.1rem;
  border-radius: 14px;
  font-size: 0.84rem;
  font-weight: 650;
  box-shadow: var(--os-shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
  z-index: 2147483000 !important;
  letter-spacing: -0.01em;
  max-width: min(28rem, calc(100vw - 2rem));
}

.toast.is-error,
#os-toast.is-error {
  background: #dc2626;
  color: #fff;
}

.toast.is-success,
#os-toast.is-success {
  background: #0b1220;
  color: #fff;
}

.toast.is-warning,
#os-toast.is-warning {
  background: #c2410c;
  color: #fff;
}

.toast.is-visible,
#os-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modal ? must sit above sticky shell chrome (.os-topbar:200, drawers:190, menus:400) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.48);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 440px;
  max-height: min(90vh, 900px);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  border: 1px solid var(--os-border);
  box-shadow: var(--os-shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
}

.modal.modal-wide {
  max-width: 880px;
}

.modal-body.modal-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
  align-content: start;
}

.modal-body.modal-body-grid > label,
.modal-body.modal-body-grid > select,
.modal-body.modal-body-grid > input,
.modal-body.modal-body-grid > textarea,
.modal-body.modal-body-grid > .modal-check,
.modal-body.modal-body-grid > .modal-toggle-card,
.modal-body.modal-body-grid > .richtext-field,
.modal-body.modal-body-grid > .share-field,
.modal-body.modal-body-grid > .file-field,
.modal-body.modal-body-grid > .person-select.modal-field-full,
.modal-body.modal-body-grid > .icon-select.modal-field-full,
.modal-body.modal-body-grid > .sticky-notes-field,
.modal-body.modal-body-grid > .task-list-field,
.modal-body.modal-body-grid > .modal-field-full,
.modal-body.modal-body-grid > .modal-field-notice,
.modal-body.modal-body-grid > .ws-eng-remind-field {
  grid-column: 1 / -1;
}

.modal-body.modal-body-grid > .modal-field-half,
.modal-body.modal-body-grid > .person-select.modal-field-half,
.modal-body.modal-body-grid > .icon-select.modal-field-half {
  grid-column: auto;
}

.modal-field-half {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.modal-custom-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--os-muted);
}

.modal-field-full .ws-lead-tag-picker {
  align-items: flex-start;
}

.modal-field-full .ws-lead-tag-add {
  flex: 0 0 auto;
}

.modal-body.modal-body-grid .modal-field-half label,
.modal-body.modal-body-grid .modal-field-full label {
  margin-top: 0;
}

@media (max-width: 640px) {
  .modal-body.modal-body-grid {
    grid-template-columns: 1fr;
  }
}

.modal-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-head {
  padding: 1.05rem 1.2rem 1.05rem 1.35rem;
  border-bottom: 1px solid var(--os-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  background: rgba(248, 250, 252, 0.7);
}

.modal-head h5 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
  color: var(--os-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-close:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.08);
}

.modal-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-body label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--os-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  outline: none;
  margin-bottom: 0.95rem;
  background: #fff;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Rich text description editor */
.richtext-field {
  margin-bottom: 0.9rem;
}

.richtext-field > label {
  margin-bottom: 0.35rem;
}

.richtext-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem;
  border: 1px solid var(--os-border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: var(--os-surface-2);
}

.richtext-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.richtext-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 0.5rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.richtext-btn svg {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: inherit;
  stroke: currentColor;
}

.richtext-btn svg circle[fill],
.richtext-btn svg [fill]:not([fill='none']) {
  stroke: none;
}

.richtext-btn:hover,
.richtext-btn:focus-visible {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
  outline: none;
}

.richtext-btn-wide {
  gap: 0.35rem;
}

/* Must beat .modal-body select (padding/margin/width) */
.modal-body .richtext-select,
.richtext-select {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  line-height: 1 !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background-color: #fff !important;
  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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 12px;
  color: var(--os-text) !important;
  font-size: 0.78rem !important;
  font-family: inherit;
  padding: 0 1.7rem 0 0.55rem !important;
  margin: 0 !important;
  width: auto !important;
  min-width: 102px !important;
  vertical-align: middle;
  cursor: pointer;
  box-shadow: none !important;
  resize: none !important;
}

.modal-body .richtext-select:hover,
.modal-body .richtext-select:focus,
.richtext-select:hover,
.richtext-select:focus {
  border-color: #bfdbfe !important;
  box-shadow: none !important;
  outline: none;
}

.richtext-color-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.richtext-color-btn {
  position: relative;
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0 !important;
  overflow: hidden;
  vertical-align: middle;
}

.richtext-color-wrap.is-open .richtext-color-btn {
  border-color: #93c5fd;
  background: #eff6ff;
}

.richtext-color-letter {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  color: inherit;
}

.richtext-color-line {
  width: 14px;
  height: 3px;
  border-radius: 999px;
  display: block;
  flex-shrink: 0;
}

.richtext-color-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  width: 196px;
  padding: 0.55rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 0.45rem;
}

.richtext-color-popover[hidden] {
  display: none !important;
}

.richtext-color-popover-head {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--os-muted);
}

.richtext-color-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.richtext-color-chip {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--os-border) 85%, transparent);
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.richtext-color-chip.is-light {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.richtext-color-chip:hover,
.richtext-color-chip:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.28);
  outline: none;
}

.richtext-color-advanced {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.5rem;
  border: 1px dashed color-mix(in srgb, var(--os-border) 90%, transparent);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--os-text);
  cursor: pointer;
  background: color-mix(in srgb, var(--os-surface-2) 70%, #fff);
}

.richtext-color-advanced:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.richtext-color-advanced input[type='color'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
}

html.theme-dark .richtext-color-popover {
  background: var(--os-surface);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

html.theme-dark .richtext-color-wrap.is-open .richtext-color-btn {
  background: color-mix(in srgb, #2563eb 18%, transparent);
}

html.theme-dark .richtext-color-advanced {
  background: color-mix(in srgb, var(--os-surface-2) 80%, transparent);
}

html.theme-dark .richtext-color-advanced:hover {
  background: color-mix(in srgb, #2563eb 16%, transparent);
}

.richtext-editor {
  width: 100%;
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--os-border);
  border-radius: 0 0 12px 12px;
  padding: 0.75rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.5;
  outline: none;
  background: #fff;
  font-family: inherit;
  color: var(--os-text);
}

.richtext-editor:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.richtext-editor:empty::before,
.richtext-editor.is-empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.richtext-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.5rem 0;
  display: inline-block;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.richtext-editor img.is-selected {
  outline-color: #2563eb;
}

.richtext-editor h1,
.richtext-editor h2,
.richtext-editor h3,
.richtext-editor h4 {
  margin: 0.55rem 0 0.35rem;
  line-height: 1.25;
  font-weight: 800;
  color: inherit;
}

.richtext-editor h1 { font-size: 1.55rem; }
.richtext-editor h2 { font-size: 1.3rem; }
.richtext-editor h3 { font-size: 1.12rem; }
.richtext-editor h4 { font-size: 1rem; }

.richtext-editor blockquote {
  margin: 0.5rem 0;
  padding: 0.35rem 0.75rem;
  border-left: 3px solid #93c5fd;
  color: #475569;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
}

.richtext-editor pre {
  margin: 0.5rem 0;
  padding: 0.55rem 0.7rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  font-size: 0.82rem;
  overflow-x: auto;
}

.richtext-editor ul,
.richtext-editor ol {
  margin: 0.35rem 0;
  padding-left: 1.5rem;
  list-style-position: outside;
  color: inherit;
}

.richtext-editor ul {
  list-style-type: disc;
}

.richtext-editor ol {
  list-style-type: decimal;
}

.richtext-editor li {
  margin: 0.15rem 0;
}

.richtext-editor li::marker {
  color: #334155;
}

.richtext-editor hr {
  border: 0;
  border-top: 1px solid #cbd5e1;
  margin: 0.75rem 0;
}

.richtext-select[data-cmd='formatBlock'] {
  min-width: 118px !important;
}

.richtext-select[data-cmd='fontSize'] {
  min-width: 108px !important;
}

@media (max-width: 700px) {
  .richtext-toolbar {
    gap: 0.35rem;
  }

  .richtext-group {
    flex: 1 1 auto;
    justify-content: center;
  }

  .richtext-btn-wide span {
    display: none;
  }
}

.sub-desc img {
  display: none;
}

.sub-desc.has-image::after {
  content: ' ? image';
  opacity: 0.7;
  font-style: italic;
}

/* Share with employees */
.share-field {
  margin-bottom: 0.35rem;
}

.share-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.share-field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--os-muted);
}

.share-count {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.share-toggle-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px !important;
  padding: 0.4rem 0.85rem !important;
  font-weight: 600;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
}

.share-toggle-btn.is-open,
.share-toggle-btn.is-active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}

.share-picker {
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.65rem;
}

.share-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.share-picker-hint {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}

.share-picker-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--os-border);
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.share-picker-close:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.share-people {
  display: grid;
  gap: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
}

.share-person {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  margin: 0 !important;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  color: var(--os-text) !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
}

.share-person:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.share-person.is-selected {
  border-color: #93c5fd;
  background: #eff6ff;
}

.share-person input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
}

.share-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.share-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #334155;
}

.share-person-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.share-person-name {
  font-weight: 650;
  line-height: 1.2;
}

.share-person-role {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  flex-shrink: 0;
  position: relative;
}

.share-person.is-selected .share-check {
  border-color: #2563eb;
  background: #2563eb;
}

.share-person.is-selected .share-check::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.share-empty {
  margin: 0;
  padding: 0.75rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
}

.share-avatars {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
}

.share-chip {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  overflow: hidden;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
  font-size: 0.55rem;
  font-weight: 700;
  color: #334155;
}

.share-chip:first-child {
  margin-left: 0;
}

.share-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-chip-more {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.58rem;
}

.pair-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.pair-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.3rem 0.25rem 0.25rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 0.75rem;
  font-weight: 600;
}

.pair-preview-chip-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pair-preview-chip-remove:hover {
  background: color-mix(in srgb, #ef4444 12%, transparent);
  color: #b91c1c;
}

.pair-preview-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  font-size: 0.58rem;
  font-weight: 700;
}

.pair-preview-fallback {
  color: #1d4ed8;
}

.pair-avatar-list {
  display: inline-flex;
  align-items: center;
  margin-right: 0.15rem;
}

.pair-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  padding: 0;
  margin-left: -7px;
  overflow: hidden;
  background: #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pair-avatar:first-child {
  margin-left: 0;
}

.pair-avatar:hover,
.pair-avatar:focus-visible {
  transform: translateY(-2px) scale(1.12);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
  outline: none;
  z-index: 1;
  position: relative;
}

.pair-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.pair-avatar-fallback {
  font-size: 0.58rem;
  font-weight: 700;
  color: #334155;
  pointer-events: none;
}

.modal-check {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  color: var(--os-text) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
}

.modal-check input {
  width: auto !important;
  margin: 0 !important;
}

.modal-toggle-card {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 0.15rem 0 0.35rem;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--os-border, #e2e8f0);
  border-radius: 14px;
  background: var(--os-surface, #fff);
  color: var(--os-text, #0f172a) !important;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.modal-toggle-card input {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  opacity: 0;
  cursor: pointer;
}

.modal-toggle-card-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #2563eb;
  transition: background 0.16s ease, color 0.16s ease;
}

.modal-toggle-card-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.modal-toggle-card-copy strong {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--os-text, #0f172a);
}

.modal-toggle-card-copy small {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--os-muted, #64748b);
}

.modal-toggle-card-switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  pointer-events: none;
  transition: background 0.16s ease;
}

.modal-toggle-card-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.16s ease;
}

.modal-toggle-card:hover {
  border-color: color-mix(in srgb, #2563eb 38%, var(--os-border, #e2e8f0));
}

.modal-toggle-card:has(input:checked),
.modal-toggle-card.is-on {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 0 0 3px color-mix(in srgb, #2563eb 14%, transparent);
}

.modal-toggle-card:has(input:checked) .modal-toggle-card-icon,
.modal-toggle-card.is-on .modal-toggle-card-icon {
  background: #2563eb;
  color: #fff;
}

.modal-toggle-card:has(input:checked) .modal-toggle-card-switch,
.modal-toggle-card.is-on .modal-toggle-card-switch {
  background: #2563eb;
}

.modal-toggle-card:has(input:checked) .modal-toggle-card-thumb,
.modal-toggle-card.is-on .modal-toggle-card-thumb {
  transform: translateX(18px);
}

html.theme-dark .modal-toggle-card {
  background: color-mix(in srgb, var(--os-surface) 92%, #0f172a);
}

html.theme-dark .modal-toggle-card:has(input:checked),
html.theme-dark .modal-toggle-card.is-on {
  border-color: #60a5fa;
  background: color-mix(in srgb, #1d4ed8 22%, var(--os-surface));
}

/* Person select ? employee picker with photo */
.person-select {
  position: relative;
  margin-bottom: 0;
}

.person-select.modal-field-full,
.person-select.modal-field-half {
  margin-bottom: 0;
}

.person-select > label {
  display: block;
  margin-bottom: 0.35rem;
}

.icon-select {
  position: relative;
  margin-bottom: 0;
}

.icon-select.modal-field-full,
.icon-select.modal-field-half {
  margin-bottom: 0;
}

.icon-select > label {
  display: block;
  margin-bottom: 0.35rem;
}

.icon-select-trigger {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 42px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.icon-select.is-open .icon-select-trigger,
.icon-select-trigger:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--os-accent, #2563eb) 45%, var(--os-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--os-accent, #2563eb) 18%, transparent);
}

.icon-select-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--os-accent, #2563eb);
  flex: 0 0 auto;
}

.icon-select-trigger-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-select-chevron {
  flex: 0 0 auto;
  color: var(--os-text-muted, #64748b);
  transition: transform 0.15s ease;
}

.icon-select.is-open .icon-select-chevron {
  transform: rotate(180deg);
}

.icon-select-menu {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
  overflow: auto;
  z-index: 120;
}

.icon-select-menu.is-ported {
  position: fixed;
  z-index: 10050;
}

.icon-select-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--os-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.icon-select-option:hover,
.icon-select-option.is-selected {
  background: color-mix(in srgb, var(--os-accent, #2563eb) 10%, var(--os-surface-2, #f8fafc));
}

.icon-select-option.is-selected {
  color: var(--os-accent, #2563eb);
  font-weight: 600;
}

.icon-select-option-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: inherit;
  flex: 0 0 auto;
}

.icon-select-option-label {
  min-width: 0;
}

.ws-followup-method {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  vertical-align: middle;
}

.ws-followup-method svg {
  flex: 0 0 auto;
  color: var(--os-accent, #2563eb);
}

.modal-field-notice {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  color: #1e3a8a;
}

.modal-field-notice.is-success {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #ecfdf5 0%, #f6fffb 100%);
  color: #065f46;
}

.modal-field-notice.is-warn {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fffdf5 100%);
  color: #92400e;
}

.modal-field-notice-title {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  opacity: 0.85;
}

.modal-field-notice-body {
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 600;
}

.modal-field-notice-body strong {
  font-weight: 800;
}

.modal-field-notice-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.modal-field-notice-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 99, 235, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
}

.modal-field-notice-metric b {
  font-size: 0.95rem;
  font-weight: 800;
}

html.theme-dark .modal-field-notice {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(30, 58, 138, 0.28);
  color: #bfdbfe;
}

html.theme-dark .modal-field-notice.is-success {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(6, 95, 70, 0.28);
  color: #a7f3d0;
}

html.theme-dark .modal-field-notice-metric {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(148, 163, 184, 0.25);
}

.person-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  background: var(--os-input);
  color: var(--os-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.person-select.is-plain .person-select-trigger {
  min-height: 2.55rem;
  padding: 0.55rem 0.75rem;
  font-weight: 500;
  gap: 0.5rem;
}

.person-select.is-plain .person-select-option {
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
}

.person-select.is-plain .person-select-option-name {
  font-weight: 500;
}

.person-select.is-open .person-select-trigger,
.person-select-trigger:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: none;
}

.person-select-trigger-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-select-chevron {
  flex-shrink: 0;
  color: var(--os-muted);
  transition: transform 0.15s ease;
}

.person-select.is-open .person-select-chevron {
  transform: rotate(180deg);
}

.person-select-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--os-accent) 12%, var(--os-surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--os-border) 80%, transparent);
}

.person-select-avatar-fallback,
.person-select-avatar-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--os-accent);
  border: 0;
}

.person-select-avatar-empty {
  color: var(--os-muted);
  background: var(--os-surface-2);
}

.person-select-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 280px;
  overflow: auto;
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  padding: 0.4rem;
}

/* Ported outside .modal overflow so it can sit above the footer / modal shell */
.person-select-menu.is-ported {
  position: fixed;
  right: auto;
  z-index: 10050;
  margin: 0;
}

.person-select-menu.is-ported.is-drop-up {
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.12), var(--os-shadow-lg);
}

.person-select-search-wrap {
  position: sticky;
  z-index: 2;
  top: -0.35rem;
  margin: -0.35rem -0.35rem 0.3rem;
  padding: 0.45rem;
  background: var(--os-surface);
  border-bottom: 1px solid var(--os-border);
}

.person-select-search {
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  background: var(--os-input);
  color: var(--os-text);
  font: inherit;
  font-size: 0.84rem;
  outline: none;
}

.person-select-search:focus {
  border-color: var(--os-primary);
  box-shadow: 0 0 0 3px var(--os-accent-soft);
}

.person-select-no-results {
  padding: 0.9rem 0.65rem;
  color: var(--os-muted);
  font-size: 0.8rem;
  text-align: center;
}

.person-select-option[hidden],
.person-select-no-results[hidden] {
  display: none;
}

.person-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 0;
  background: transparent;
  color: var(--os-text);
  border-radius: 11px;
  padding: 0.55rem 0.6rem;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.person-select-option:hover {
  background: var(--os-surface-2);
}

.person-select-option.is-selected {
  background: color-mix(in srgb, var(--os-accent) 12%, var(--os-surface));
}

.person-select-option-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.person-select-option-name {
  font-weight: 650;
  line-height: 1.2;
}

.person-select-option-role {
  font-size: 0.72rem;
  color: var(--os-muted);
  margin-top: 0.1rem;
}

html.theme-dark .person-select-trigger {
  background: var(--os-input);
  color: var(--os-text);
  border-color: var(--os-border);
}

html.theme-dark .person-select-menu {
  background: var(--os-surface);
  border-color: var(--os-border);
}

html.theme-dark .person-select-option:hover {
  background: var(--os-surface-muted);
}

html.theme-dark .person-select-option.is-selected {
  background: rgba(37, 99, 235, 0.22);
}

.modal-foot {
  padding: 0.95rem 1.25rem;
  border-top: 1px solid var(--os-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
  background: rgba(248, 250, 252, 0.55);
}

.modal-foot .btn {
  border-radius: 12px;
  min-height: 40px;
  padding: 0.55rem 1.05rem;
}

.modal-body input,
.modal-body select,
.modal-body textarea,
.person-select-trigger {
  border-radius: 14px;
}

/* SweetAlert2 ? match OS popup look; must sit above .modal-backdrop (10000) */
.swal2-container {
  z-index: 11000 !important;
}

.swal2-popup {
  border-radius: 24px !important;
  font-family: var(--os-font) !important;
  border: 1px solid var(--os-border) !important;
  box-shadow: var(--os-shadow-lg) !important;
  padding: 1.5rem 1.35rem 1.25rem !important;
}

.swal2-title {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  color: var(--os-text) !important;
}

.swal2-html-container {
  font-size: 0.92rem !important;
  color: var(--os-muted) !important;
}

.swal2-actions {
  gap: 0.5rem !important;
}

.swal2-styled.swal2-confirm,
.swal2-styled.swal2-cancel {
  border-radius: 12px !important;
  font-weight: 700 !important;
  padding: 0.55rem 1.1rem !important;
  box-shadow: none !important;
}

.swal2-styled.swal2-cancel {
  background: var(--os-surface) !important;
  color: var(--os-text) !important;
  border: 1px solid var(--os-border) !important;
}

html.theme-dark .swal2-popup {
  background: #1e293b !important;
  color: var(--os-text) !important;
}

html.theme-dark .swal2-title {
  color: #f1f5f9 !important;
}

html.theme-dark .swal2-html-container {
  color: #94a3b8 !important;
}

html.theme-dark .swal2-styled.swal2-cancel {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: var(--os-border) !important;
}

/* Empty / loading */
.state-panel {
  background: var(--os-surface);
  border: 1px dashed var(--os-border);
  border-radius: var(--os-radius);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--os-muted);
}

.state-panel h3 {
  margin: 0 0 0.35rem;
  color: var(--os-text);
  font-size: 1rem;
}

/* Mobile */
.mobile-toggle {
  display: none;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .mandate-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .os-shell {
    grid-template-columns: 1fr;
  }

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

  .os-shell.sidebar-collapsed .os-sidebar {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-105%);
  }

  .os-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 86vw);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.08);
    opacity: 1;
  }

  .os-sidebar.is-open {
    transform: translateX(0);
  }

  .os-content {
    padding: 1rem;
  }

  .mandate-sections.is-grid .mandate-grid:not(.is-empty) {
    grid-template-columns: 1fr;
  }

  .view-toggle-btn span {
    display: none;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .header-user-profile {
    padding-right: 0.4rem;
  }

  .header-user-copy {
    display: none;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-profile {
    position: static;
  }

  .profile-hero-avatar,
  .profile-avatar {
    width: 96px !important;
    height: 96px !important;
  }

  .profile-body {
    padding-top: 56px;
  }

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

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 35;
  }

  .sidebar-backdrop.is-open {
    display: block;
  }
}

/* Avatar color fallbacks */
.avatar-c1 { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.avatar-c2 { background: linear-gradient(135deg, #065f46, #10b981); }
.avatar-c3 { background: linear-gradient(135deg, #5b21b6, #8b5cf6); }
.avatar-c4 { background: linear-gradient(135deg, #9a3412, #f97316); }
.avatar-c5 { background: linear-gradient(135deg, #9f1239, #fb7185); }
.avatar-c6 { background: linear-gradient(135deg, #155e75, #22d3ee); }
.avatar-c7 { background: linear-gradient(135deg, #3730a3, #818cf8); }

/* Login */
.login-body {
  min-height: 100%;
  background:
    radial-gradient(ellipse 80% 60% at 10% 10%, rgba(37, 99, 235, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 90%, rgba(30, 58, 138, 0.12), transparent 50%),
    linear-gradient(160deg, #eef2ff 0%, #f4f5f7 45%, #e8eefc 100%);
}

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

.login-panel {
  width: 100%;
  max-width: 420px;
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 24px;
  box-shadow: var(--os-shadow-lg);
  padding: 1.9rem 1.7rem 1.7rem;
  backdrop-filter: blur(16px);
  color: var(--os-text);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  margin-bottom: 1.65rem;
}

.login-logo {
  width: 44px;
  height: 44px;
  font-size: 1rem;
}

.login-logo-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 18px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--os-border);
  padding: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.login-brand-text h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-brand-text p {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--os-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.login-brand h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-brand p {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: var(--os-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.login-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 0 0 1.25rem;
  color: var(--os-muted);
  font-size: 0.9rem;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.login-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--os-muted);
  margin-bottom: 0.35rem;
}

.login-form input,
.login-form select {
  width: 100%;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  outline: none;
  margin-bottom: 0.95rem;
  font-family: inherit;
  background: var(--os-input);
  color: var(--os-text);
}

.login-form select {
  cursor: pointer;
  appearance: auto;
}

.login-form input:focus,
.login-form select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-submit {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}


/* ???????????????????????????????????????????????????????????????????????????
   Workspace layout ? reusable across CRM, Finance, HRM, Inventory, ?
   Pattern: Module header ? Toolbar ? Tabs ? Content
??????????????????????????????????????????????????????????????????????????? */

.ws-root {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0 0 1.5rem;
  min-height: 100%;
}

.ws-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 16px;
  box-shadow: var(--os-shadow);
}

.ws-toolbar[hidden],
.crm-root.is-lead-detail .ws-toolbar {
  display: none !important;
}

.ws-toolbar-left,
.ws-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.ws-toolbar-left {
  flex: 1;
  min-width: 200px;
}

#crm-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

#crm-filters .ws-select {
  max-width: 100%;
}

.ws-toolbar-right {
  margin-left: auto;
}

.ws-search {
  width: min(260px, 100%);
  border: 1px solid var(--os-border);
  border-radius: 11px;
  padding: 0.5rem 0.75rem 0.5rem 2.15rem;
  font: inherit;
  font-size: 0.84rem;
  background-color: var(--os-input);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M15 15l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.7rem 50%;
  outline: none;
  color: var(--os-text);
}

.ws-search:focus {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ws-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.48rem 0.75rem;
  border-radius: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

.ws-btn-primary {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-color: transparent;
  color: #fff;
}

.ws-btn-primary:hover {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border-color: transparent;
  color: #fff;
}

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

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

.ws-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.2rem 0.15rem 0.45rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.ws-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  background: transparent;
  color: var(--os-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.55rem 0.85rem;
  border-radius: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.ws-tab svg {
  opacity: 0.7;
  flex-shrink: 0;
}

.ws-tab:hover {
  background: var(--os-surface-muted);
  color: var(--os-text);
}

.ws-tab.is-active {
  background: var(--os-surface);
  color: var(--os-accent);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 0 0 1px var(--os-border);
}

.ws-tab.is-active svg {
  opacity: 1;
}

.ws-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 240px;
}

.ws-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ws-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.ws-section-head h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--os-text);
}

.ws-section-head span {
  font-size: 0.75rem;
  color: var(--os-muted);
  font-weight: 600;
}

.ws-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.ws-stats-with-revenue {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ws-overview-revenue-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem 1.5rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 1.25rem 1.35rem;
  border: 1px solid color-mix(in srgb, #0f766e 28%, var(--os-border));
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, #0f766e 14%, var(--os-surface)) 0%, var(--os-surface) 62%);
  box-shadow: inset 4px 0 0 #0f766e, 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ws-overview-revenue-copy {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: min(100%, 18rem);
  flex: 1 1 16rem;
}

.ws-overview-revenue-copy .ws-label {
  color: #0f766e;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.ws-overview-revenue-copy strong {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--os-text);
}

.ws-overview-revenue-copy small {
  color: var(--os-muted);
  font-size: 0.86rem;
  line-height: 1.4;
  max-width: 34rem;
}

.ws-overview-revenue-side {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.55rem;
}

.ws-overview-meta-chip {
  min-width: 5.6rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid color-mix(in srgb, #0f766e 18%, var(--os-border));
  border-radius: 12px;
  background: color-mix(in srgb, #fff 70%, var(--os-surface));
  display: grid;
  gap: 0.12rem;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ws-overview-meta-chip .ws-label {
  font-size: 0.68rem;
  color: var(--os-muted);
  letter-spacing: 0.02em;
}

.ws-overview-meta-chip strong {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--os-text);
}

.ws-overview-meta-chip.is-warn {
  border-color: color-mix(in srgb, #d97706 35%, var(--os-border));
  background: color-mix(in srgb, #fffbeb 75%, var(--os-surface));
}

.ws-overview-meta-chip.is-clickable:hover {
  border-color: color-mix(in srgb, #0f766e 50%, var(--os-border));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.ws-overview-revenue-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #0f766e;
  background: color-mix(in srgb, #0f766e 14%, #fff);
  align-self: center;
}

.ws-overview-renewal-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.ws-overview-renewal-chip {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ws-overview-renewal-chip strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.ws-overview-renewal-chip span {
  color: var(--os-muted);
  font-size: 0.82rem;
}

.ws-overview-renewal-chip.is-warn.has-value {
  border-color: color-mix(in srgb, #d97706 40%, var(--os-border));
  background: linear-gradient(180deg, #fffbeb 0%, var(--os-surface) 75%);
}

.ws-overview-renewal-chip.is-warn.has-value strong {
  color: #b45309;
}

.ws-overview-renewal-chip.is-danger.has-value {
  border-color: color-mix(in srgb, #dc2626 40%, var(--os-border));
  background: linear-gradient(180deg, #fff7f7 0%, var(--os-surface) 75%);
}

.ws-overview-renewal-chip.is-danger.has-value strong {
  color: #dc2626;
}

.ws-overview-renewal-chip.is-muted {
  opacity: 0.92;
}

.ws-overview-renewal-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.ws-overview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ws-overview-card-head .ws-card-title {
  margin: 0;
}

.ws-overview-renewal-list {
  display: grid;
  gap: 0.55rem;
}

.ws-overview-scroll-list {
  max-height: 280px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.ws-overview-scroll-list::-webkit-scrollbar {
  width: 6px;
}

.ws-overview-scroll-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--os-muted) 45%, transparent);
  border-radius: 999px;
}

.ws-overview-scroll-list > .ws-meeting:last-child {
  border-bottom: 0;
}

.ws-overview-renewal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--os-surface) 94%, #f8fafc);
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.ws-overview-renewal-item:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--os-primary) 40%, var(--os-border));
  transform: translateY(-1px);
}

.ws-overview-renewal-item.is-expiring {
  border-color: color-mix(in srgb, #d97706 35%, var(--os-border));
}

.ws-overview-renewal-item.is-expired {
  border-color: color-mix(in srgb, #dc2626 35%, var(--os-border));
}

.ws-overview-renewal-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.ws-overview-renewal-copy strong {
  font-size: 0.95rem;
}

.ws-overview-renewal-copy span,
.ws-overview-renewal-copy small {
  color: var(--os-muted);
  font-size: 0.8rem;
}

.ws-overview-renewal-chevron {
  color: var(--os-muted);
  font-size: 1rem;
}

.ws-overview-packages-card {
  border-color: color-mix(in srgb, #0f766e 22%, var(--os-border));
  box-shadow: inset 3px 0 0 #0f766e;
}

.ws-overview-package-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.15rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.ws-overview-package-grid::-webkit-scrollbar {
  height: 6px;
}

.ws-overview-package-grid::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--os-muted) 45%, transparent);
  border-radius: 999px;
}

.ws-overview-package-card {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.2rem;
  width: min(220px, 78vw);
  min-width: 180px;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--os-surface) 92%, #f8fafc);
  scroll-snap-align: start;
}

.ws-overview-package-card strong {
  font-size: 0.92rem;
  color: var(--os-text);
}

.ws-overview-package-card span {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f766e;
}

.ws-overview-package-card small {
  color: var(--os-muted);
  font-size: 0.8rem;
}

.ws-overview-ops-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.65rem;
}

.ws-overview-ops-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
  row-gap: 0.05rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  text-align: left;
  color: inherit;
}

.ws-overview-ops-chip.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.ws-overview-ops-chip.is-clickable:hover {
  border-color: color-mix(in srgb, var(--os-primary) 40%, var(--os-border));
  transform: translateY(-1px);
}

.ws-overview-ops-chip.is-alert {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff7f7 0%, var(--os-surface) 70%);
}

.ws-overview-ops-chip.is-warn {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fff7ed 0%, var(--os-surface) 70%);
}

.ws-overview-ops-chip.is-warn strong {
  color: #c2410c;
}

.ws-overview-ops-chip.is-alert strong {
  color: #dc2626;
}

.ws-overview-ops-icon {
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--os-muted);
  background: color-mix(in srgb, var(--os-border) 55%, #fff);
}

.ws-overview-ops-chip strong {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.ws-overview-ops-chip span {
  grid-column: 2;
  color: var(--os-muted);
  font-size: 0.78rem;
}

.ws-overview-pipeline-section {
  opacity: 0.98;
}

.ws-stat.is-revenue {
  border-color: color-mix(in srgb, #0f766e 30%, var(--os-border));
  background: linear-gradient(180deg, color-mix(in srgb, #0f766e 8%, var(--os-surface)) 0%, var(--os-surface) 70%);
}

.ws-stat.is-revenue .ws-stat-value {
  color: #0f766e;
  font-size: 1.05rem;
}

.ws-stat {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 92px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  color: var(--os-text);
}

.ws-stat.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ws-stat.is-clickable:hover {
  border-color: color-mix(in srgb, var(--os-primary) 45%, var(--os-border));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.ws-stat.is-alert {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff7f7 0%, var(--os-surface) 70%);
}

.ws-stat.is-alert .ws-stat-value {
  color: #dc2626;
}

.ws-overview-card-gap {
  margin-top: 12px;
}

.ws-overview-sentiment {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ws-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ws-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--os-surface-muted);
  color: var(--os-muted);
}

.ws-stat-trend {
  font-size: 0.68rem;
  font-weight: 700;
  color: #059669;
}

.ws-stat-value {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--os-text);
  line-height: 1.15;
}

.ws-stat-label {
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--os-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

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

.ws-card {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  color: var(--os-text);
}

.ws-card-title {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--os-text);
}

.ws-empty {
  background: var(--os-surface);
  border: 1px dashed var(--os-border-strong);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--os-muted);
}

.ws-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.85rem;
  border-radius: 14px;
  background: var(--os-surface-muted);
  display: grid;
  place-items: center;
  color: var(--os-muted);
}

.ws-empty h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 750;
  color: var(--os-text);
}

.ws-empty p {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.ws-table-panel {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  color: var(--os-text);
}

.ws-table-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--os-border);
  background: var(--os-surface-2);
}

.ws-table-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.ws-table-filters .ws-select {
  max-width: 100%;
}

.ws-table-bar .ws-search {
  width: min(220px, 100%);
}

.ws-table-meta {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--os-muted);
}

.ws-table-bar-end {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem 0.75rem;
  margin-left: auto;
}

.ws-table-bar-end .ws-table-meta {
  margin-left: 0;
}

.ws-table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--os-border);
  background: color-mix(in srgb, var(--os-surface-2) 70%, var(--os-surface));
}

.ws-pager-meta {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--os-muted);
}

.ws-pager-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 0.85rem;
  margin-left: auto;
}

.ws-pager-size {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--os-muted);
}

.ws-pager-size-select {
  min-width: 4.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.ws-pager-pages {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ws-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 2.05rem;
  padding: 0;
  border: 1px solid var(--os-border-strong);
  border-radius: 12px;
  background: var(--os-surface, #fff);
  color: var(--os-text);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ws-pager-btn:hover:not(:disabled):not(.is-active) {
  border-color: color-mix(in srgb, var(--os-accent) 35%, var(--os-border));
  background: var(--os-accent-soft);
  color: var(--os-accent);
}

.ws-pager-btn.is-active {
  background: var(--os-accent);
  border-color: var(--os-accent);
  color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--os-accent) 28%, transparent);
}

.ws-pager-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.ws-pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  color: var(--os-muted);
  font-weight: 700;
}

.ws-pager {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ws-pager-status {
  font-size: 0.78rem;
  color: var(--os-muted);
  white-space: nowrap;
  min-width: 5.5rem;
  text-align: center;
}

.ws-engagement-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.65rem;
}

.ws-engagement-list-toolbar .ws-engagement-filter-meta {
  margin: 0;
}

[data-engagement-list] .ws-table-footer {
  margin-top: 0.85rem;
  border: 1px solid var(--os-border);
  border-radius: 14px;
}

.ws-table-wrap {
  overflow: auto;
  max-width: 100%;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}

.ws-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.ws-leads-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.ws-leads-table col.ws-leads-col-lead { width: 32%; }
.ws-leads-table col.ws-leads-col-qualify { width: 30%; }
.ws-leads-table col.ws-leads-col-next { width: 22%; }
.ws-leads-table col.ws-leads-col-close { width: 16%; }

.ws-leads-table th,
.ws-leads-table td {
  padding: 0.55rem 0.65rem;
  vertical-align: middle;
  overflow: hidden;
  text-align: left;
}

.ws-leads-table td {
  line-height: 1.3;
  background: transparent;
}

.ws-lead-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
  min-width: 0;
}

.ws-lead-cell-main {
  min-width: 0;
}

a.ws-lead-open {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.ws-lead-open:hover strong {
  color: var(--os-accent, #2563eb);
}

.ws-lead-cell-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}

.ws-lead-cell-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}

.ws-lead-cell-title strong {
  flex: 0 1 auto;
  min-width: 0;
}

.ws-lead-cell-title .ws-lead-tag-pills,
.ws-lead-cell-title .ws-unknown-lead-tag {
  margin-left: 0;
}

.ws-leads-table .ws-lead-tag-pill,
.ws-customers-table .ws-lead-tag-pill {
  height: 16px;
  padding: 0 0.36rem;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.ws-lead-cell-sub,
.ws-lead-cell-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--os-muted);
}

.ws-lead-cell-sub {
  font-size: 0.74rem;
  margin-top: 1px;
}

.ws-lead-cell-meta {
  font-size: 0.68rem;
  margin-top: 2px;
}

.ws-lead-cell-last {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
}

.ws-lead-cell-last > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-lead-cell-last-people {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.ws-lead-cell-last-avatar {
  display: inline-flex;
  margin-left: -5px;
}

.ws-lead-cell-last-avatar:first-child {
  margin-left: 0;
}

.ws-lead-cell-last .ws-employee-avatar {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  font-size: 0.52rem;
  box-shadow: 0 0 0 1px var(--os-surface, #fff);
}

.ws-lead-qualify-stack {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.ws-lead-qualify-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.35rem;
  align-items: center;
  min-width: 0;
}

.ws-lead-qualify-row > span {
  font-size: 0.58rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--os-muted);
  line-height: 1.1;
}

.ws-leads-table .ws-interest-picker,
.ws-leads-table .ws-intent-picker,
.ws-leads-table .ws-type-picker,
.ws-leads-table .ws-priority-picker,
.ws-leads-table .ws-next-action-picker,
.ws-leads-table .ws-final-picker {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.ws-leads-table .ws-interest-trigger,
.ws-leads-table .ws-intent-trigger,
.ws-leads-table .ws-type-trigger,
.ws-leads-table .ws-priority-trigger,
.ws-leads-table .ws-next-action-trigger,
.ws-leads-table .ws-final-trigger {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 26px;
  padding: 0.22rem 0.45rem;
  font-size: 0.7rem;
  gap: 5px;
  box-sizing: border-box;
}

.ws-leads-table .ws-interest-trigger [data-interest-label],
.ws-leads-table .ws-intent-trigger [data-intent-label],
.ws-leads-table .ws-type-trigger [data-type-label],
.ws-leads-table .ws-priority-trigger [data-priority-label],
.ws-leads-table .ws-next-action-trigger [data-next-action-label],
.ws-leads-table .ws-final-trigger [data-final-label] {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-leads-table .ws-interest-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
}

.ws-leads-table .ws-contact-outcome {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
  padding: 0.18rem 0.45rem;
}

.ws-table th,
.ws-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--os-border);
  vertical-align: top;
}

.ws-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  color: var(--os-muted);
  font-weight: 700;
  background: var(--os-surface);
}

.ws-table tr:last-child td {
  border-bottom: none;
}

.ws-table tr:hover td {
  background: var(--os-surface-2);
}

.ws-muted {
  color: var(--os-muted);
  font-size: 0.78rem;
}

.ws-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.48rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--os-surface-muted);
  color: var(--os-text);
}

.ws-badge.is-hot,
.ws-badge.is-won {
  background: #ecfdf5;
  color: #047857;
}

.ws-badge.is-cold,
.ws-badge.is-lost {
  background: #fef2f2;
  color: #b91c1c;
}

.ws-badge.is-warm,
.ws-badge.is-qualified {
  background: #fff7ed;
  color: #c2410c;
}

.ws-interest-picker {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  vertical-align: middle;
}

.ws-interest-trigger {
  min-width: 132px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  outline: none;
  overflow: visible;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ws-interest-trigger:hover {
  border-color: color-mix(in srgb, currentColor 28%, transparent);
}

.ws-interest-trigger:focus-visible,
.ws-interest-trigger[aria-expanded="true"] {
  border-color: var(--os-accent);
  box-shadow: 0 0 0 3px var(--os-accent-soft);
}

.ws-interest-trigger:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ws-interest-trigger [data-interest-label] {
  line-height: 1.25;
  white-space: nowrap;
}

.ws-interest-chevron {
  margin-left: auto;
  display: inline-flex;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: currentColor;
  opacity: 0.75;
}

.ws-interest-chevron svg,
.ws-next-action-chevron svg,
.ws-picker-chevron-icon svg {
  display: block;
  width: 12px;
  height: 12px;
}

.ws-picker-chevron-icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
}

.ws-interest-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: currentColor;
}

.ws-interest-trigger.is-no_interest {
  background: #fef2f2;
  color: #dc2626;
}

.ws-interest-trigger.is-low {
  background: #fff7ed;
  color: #ea580c;
}

.ws-interest-trigger.is-moderate {
  background: #fffbeb;
  color: #d97706;
}

.ws-interest-trigger.is-high {
  background: #eff6ff;
  color: #2563eb;
}

.ws-interest-trigger.is-very_high {
  background: #ecfdf5;
  color: #059669;
}

.ws-interest-menu {
  position: fixed;
  z-index: 400;
  min-width: 170px;
  padding: 6px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
}

.ws-interest-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--os-text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.ws-interest-option:hover,
.ws-interest-option:focus-visible,
.ws-interest-option.is-selected {
  background: var(--os-surface-2);
  outline: none;
}

.ws-interest-dot.is-no_interest {
  color: #dc2626;
}

.ws-interest-dot.is-low {
  color: #f97316;
}

.ws-interest-dot.is-moderate {
  color: #d97706;
}

.ws-interest-dot.is-high {
  color: #2563eb;
}

.ws-interest-dot.is-very_high {
  color: #16a34a;
}

.ws-next-action-picker {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  vertical-align: middle;
}

.ws-intent-picker {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  vertical-align: middle;
}

.ws-intent-trigger {
  min-width: 150px;
  max-width: 220px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  background: var(--os-surface);
  color: var(--os-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
  overflow: visible;
  box-sizing: border-box;
}

.ws-intent-trigger.has-value {
  border-color: rgba(14, 165, 233, 0.3);
  background: color-mix(in srgb, #0ea5e9 12%, var(--os-surface));
  color: #0369a1;
}

.ws-intent-trigger:hover,
.ws-intent-trigger:focus-visible,
.ws-intent-trigger[aria-expanded="true"] {
  border-color: var(--os-accent);
  box-shadow: 0 0 0 3px var(--os-accent-soft);
  outline: none;
}

.ws-intent-trigger:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ws-intent-trigger [data-intent-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.ws-intent-chevron {
  margin-left: auto;
  display: inline-flex;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: currentColor;
  opacity: 0.75;
}

.ws-intent-chevron svg {
  display: block;
  width: 12px;
  height: 12px;
}

.ws-intent-menu {
  position: fixed;
  z-index: 400;
  min-width: 200px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
}

.ws-intent-option {
  width: 100%;
  display: block;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--os-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ws-intent-option:hover,
.ws-intent-option.is-selected {
  background: var(--os-surface-2);
}

.ws-lead-mini-chip.is-intent.has-value {
  border-color: rgba(14, 165, 233, 0.28);
  background: color-mix(in srgb, #0ea5e9 10%, var(--os-surface));
  color: #0369a1;
}

.ws-type-picker {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  vertical-align: middle;
}

.ws-type-trigger {
  min-width: 130px;
  max-width: 200px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  background: var(--os-surface);
  color: var(--os-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
  overflow: visible;
  box-sizing: border-box;
}

.ws-type-trigger.has-value {
  border-color: rgba(217, 119, 6, 0.3);
  background: color-mix(in srgb, #d97706 12%, var(--os-surface));
  color: #b45309;
}

.ws-type-trigger:hover,
.ws-type-trigger:focus-visible,
.ws-type-trigger[aria-expanded="true"] {
  border-color: var(--os-accent);
  box-shadow: 0 0 0 3px var(--os-accent-soft);
  outline: none;
}

.ws-type-trigger:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ws-type-trigger [data-type-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.ws-type-chevron {
  margin-left: auto;
  display: inline-flex;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: currentColor;
  opacity: 0.75;
}

.ws-type-chevron svg {
  display: block;
  width: 12px;
  height: 12px;
}

.ws-type-menu {
  position: fixed;
  z-index: 400;
  min-width: 180px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
}

.ws-type-option {
  width: 100%;
  display: block;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--os-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ws-type-option:hover,
.ws-type-option.is-selected {
  background: var(--os-surface-2);
}

.ws-lead-mini-chip.is-type.has-value {
  border-color: rgba(217, 119, 6, 0.28);
  background: color-mix(in srgb, #d97706 10%, var(--os-surface));
  color: #b45309;
}

.ws-next-action-trigger {
  min-width: 145px;
  max-width: 210px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  background: var(--os-surface);
  color: var(--os-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
  overflow: visible;
  box-sizing: border-box;
}

.ws-next-action-trigger.has-value {
  border-color: rgba(37, 99, 235, 0.25);
  background: var(--os-accent-soft);
  color: var(--os-accent);
}

.ws-next-action-trigger:hover,
.ws-next-action-trigger:focus-visible,
.ws-next-action-trigger[aria-expanded="true"] {
  border-color: var(--os-accent);
  box-shadow: 0 0 0 3px var(--os-accent-soft);
  outline: none;
}

.ws-next-action-trigger [data-next-action-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.ws-final-picker {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.ws-final-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--os-border);
  border-radius: 999px;
  background: var(--os-surface-2);
  color: var(--os-text-muted, #64748b);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ws-final-trigger:hover,
.ws-final-trigger:focus-visible,
.ws-final-trigger[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--os-accent, #2563eb) 35%, var(--os-border));
}

.ws-final-trigger.is-won {
  background: #ecfdf5;
  border-color: #86efac;
  color: #15803d;
}

.ws-final-trigger.is-lost {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.ws-final-trigger [data-final-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-final-menu {
  position: fixed;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 180px;
  padding: 0.35rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.ws-final-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--os-text);
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
}

.ws-final-option:hover,
.ws-final-option.is-selected {
  background: var(--os-surface-2);
}

.ws-final-option.is-won.is-selected {
  background: #ecfdf5;
  color: #15803d;
}

.ws-final-option.is-lost.is-selected {
  background: #fef2f2;
  color: #b91c1c;
}

.ws-next-action-chevron {
  margin-left: auto;
  display: inline-flex;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: currentColor;
  opacity: 0.75;
}

.ws-next-action-menu {
  position: fixed;
  z-index: 400;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  max-height: min(420px, 70vh);
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
}

.ws-next-action-search-wrap {
  flex: 0 0 auto;
  padding: 0.45rem;
  border-bottom: 1px solid var(--os-border);
  background: var(--os-surface);
}

.ws-next-action-search {
  width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--os-border, #e2e8f0);
  border-radius: 9px;
  background: var(--os-input, #fff);
  color: var(--os-text);
  font: inherit;
  font-size: 0.84rem;
  outline: none;
}

.ws-next-action-search:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.28);
}

.ws-next-action-options {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px;
  min-height: 0;
}

.ws-next-action-empty {
  padding: 0.75rem 0.85rem 0.9rem;
  color: var(--os-muted, #64748b);
  font-size: 0.82rem;
  text-align: center;
}

.ws-next-action-option {
  width: 100%;
  display: block;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--os-text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.ws-next-action-option[hidden] {
  display: none !important;
}

.ws-next-action-option:hover,
.ws-next-action-option:focus-visible,
.ws-next-action-option.is-selected {
  background: var(--os-surface-2);
  outline: none;
}

.ws-loading {
  padding: 2.5rem;
  text-align: center;
  color: var(--os-muted);
  font-weight: 600;
  font-size: 0.88rem;
}

/* Pipeline flow */
.ws-pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding: 0.15rem 0;
}

.ws-pipe-stage {
  flex: 1 1 0;
  min-width: 110px;
  position: relative;
  background: var(--os-surface-2);
  border: 1px solid var(--os-border);
  border-radius: 0;
  padding: 0.75rem 0.7rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--os-text);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ws-pipe-stage:first-child {
  border-radius: 12px 0 0 12px;
}

.ws-pipe-stage:last-child {
  border-radius: 0 12px 12px 0;
}

.ws-pipe-stage + .ws-pipe-stage {
  border-left: none;
}

.ws-pipe-stage:hover,
.ws-pipe-stage.is-active {
  background: var(--os-accent-soft);
  z-index: 1;
}

.ws-pipe-stage .ws-pipe-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--os-muted);
  margin-bottom: 0.35rem;
}

.ws-pipe-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}

.ws-pipe-stage[data-stage="discovery"] .ws-pipe-dot { background: #64748b; }
.ws-pipe-stage[data-stage="demo"] .ws-pipe-dot { background: #0ea5e9; }
.ws-pipe-stage[data-stage="proposal"] .ws-pipe-dot { background: #8b5cf6; }
.ws-pipe-stage[data-stage="negotiation"] .ws-pipe-dot { background: #f59e0b; }
.ws-pipe-stage[data-stage="won"] .ws-pipe-dot { background: #10b981; }
.ws-pipe-stage[data-stage="lost"] .ws-pipe-dot { background: #ef4444; }

.ws-pipe-count {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--os-text);
  line-height: 1.1;
}

.ws-pipe-value {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--os-muted);
  margin-top: 0.2rem;
}

.ws-pipe-conv {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--os-muted);
  margin-top: 0.15rem;
}

/* Lead source bars */
.ws-source-row {
  display: grid;
  grid-template-columns: 88px 1fr 28px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
}

.ws-source-row span {
  font-weight: 650;
  color: var(--os-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-source-row strong {
  text-align: right;
  color: var(--os-muted);
  font-size: 0.75rem;
}

.ws-source-track {
  height: 8px;
  border-radius: 999px;
  background: var(--os-surface-muted);
  overflow: hidden;
}

.ws-source-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #334155, #64748b);
}

/* Timeline */
.ws-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ws-timeline-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.65rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--os-border);
  cursor: pointer;
  border-radius: 8px;
  margin: 0 -0.25rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.ws-timeline-item:last-child {
  border-bottom: none;
}

.ws-timeline-item:hover {
  background: var(--os-surface-2);
}

.ws-timeline-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--os-surface-muted);
  color: var(--os-muted);
  display: grid;
  place-items: center;
  margin-top: 0.1rem;
}

.ws-timeline-item strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--os-text);
}

.ws-timeline-item p {
  margin: 0.15rem 0 0.25rem;
  font-size: 0.8rem;
  color: var(--os-muted);
}

.ws-timeline-meta {
  font-size: 0.72rem;
  color: var(--os-muted);
  font-weight: 600;
}

/* Lead status chips (overview) */
.ws-status-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.55rem;
}

.ws-status-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface-2);
  color: var(--os-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ws-status-chip:hover {
  background: var(--os-surface);
  border-color: color-mix(in srgb, var(--chip-color, #64748b) 45%, var(--os-border));
}

.ws-status-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--chip-color, #94a3b8);
  flex: 0 0 auto;
}

.ws-status-chip-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.2;
}

.ws-status-chip-count {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Meeting cards */
.ws-meeting {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--os-border);
}

button.ws-meeting {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--os-border);
  border-radius: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ws-meeting.is-clickable:hover strong {
  color: var(--os-accent, #2563eb);
}

.ws-meeting:last-child {
  border-bottom: none;
}

.ws-meeting strong {
  font-size: 0.86rem;
}

.ws-meeting-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

/* Kanban (CRM opportunities) */
.ws-kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.ws-kanban-col {
  background: var(--os-surface-2);
  border: 1px solid var(--os-border);
  border-radius: 14px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  color: var(--os-text);
}

.ws-kanban-col header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--os-border);
}

.ws-kanban-col header h4 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 750;
}

.ws-kanban-col header span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--os-muted);
  background: var(--os-surface);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.ws-kanban-list {
  flex: 1;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 180px;
}

.ws-kanban-card {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: var(--os-text);
}

.ws-kanban-card.is-dragging {
  opacity: 0.5;
}

.ws-kanban-card strong {
  display: block;
  font-size: 0.84rem;
}

.ws-kanban-card p {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.76rem;
  color: var(--os-muted);
}

.ws-kanban-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--os-muted);
}

.ws-select {
  border: 1px solid var(--os-border);
  border-radius: 10px;
  padding: 0.42rem 0.6rem;
  font: inherit;
  font-size: 0.8rem;
  background: var(--os-input);
  color: var(--os-text);
}

.ws-row-actions {
  white-space: nowrap;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.ws-icon-action {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  background: var(--os-surface);
  color: var(--os-muted);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}

.ws-icon-action:hover,
.ws-icon-action:focus-visible {
  border-color: var(--os-accent);
  background: var(--os-accent-soft);
  color: var(--os-accent);
  outline: none;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.28rem 0.55rem !important;
  font-size: 0.74rem !important;
}

.ws-search-results {
  display: grid;
  gap: 0.85rem;
}

.ws-search-hits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ws-search-hit {
  border: 1px solid var(--os-border);
  background: var(--os-surface-2);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  color: var(--os-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.ws-search-hit:hover {
  border-color: var(--os-border-strong);
  background: var(--os-surface);
}

.ws-report-value {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

@media (max-width: 1200px) {
  .ws-stats,
  .ws-stats-with-revenue {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ws-overview-renewal-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ws-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .ws-grid-2,
  .ws-grid-3 {
    grid-template-columns: 1fr;
  }
  .ws-kanban {
    grid-template-columns: repeat(6, minmax(200px, 1fr));
  }
  .ws-toolbar-right {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .ws-stats,
  .ws-stats-with-revenue {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ws-overview-renewal-chips {
    grid-template-columns: 1fr;
  }
  .ws-overview-revenue-hero {
    padding: 1rem;
  }
  .ws-overview-revenue-copy strong {
    font-size: 1.45rem;
  }
  .ws-search {
    width: 100%;
  }
}

/* ?? Theme toggle ??????????????????????????????????????????????????????? */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--os-border);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-toggle:hover {
  background: #fff;
  color: #0f172a;
  border-color: var(--os-border-strong);
  box-shadow: var(--os-shadow);
}

.theme-toggle .theme-icon-sun {
  display: none;
}

html.theme-dark .theme-toggle .theme-icon-moon {
  display: none;
}

html.theme-dark .theme-toggle .theme-icon-sun {
  display: block;
}

/* ?? Dark theme ????????????????????????????????????????????????????????? */

html.theme-dark {
  color-scheme: dark;
  --os-bg: #0b1220;
  --os-bg-accent: #111827;
  --os-sidebar: rgba(15, 23, 42, 0.92);
  --os-surface: #1e293b;
  --os-surface-2: #162032;
  --os-surface-soft: var(--os-surface-2);
  --os-surface-muted: #243044;
  --os-input: #0f172a;
  --os-border: rgba(148, 163, 184, 0.16);
  --os-border-strong: rgba(148, 163, 184, 0.28);
  --os-text: #e2e8f0;
  --os-muted: #94a3b8;
  --os-accent: #3b82f6;
  --os-accent-soft: rgba(59, 130, 246, 0.16);
  --os-primary: var(--os-accent);
  --os-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.28);
  --os-shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.45);
  --mp-dark: #60a5fa;
  --mp-dark-text: #93c5fd;
  --mp-dark-bg: rgba(37, 99, 235, 0.18);
  --mp-dark-border: rgba(96, 165, 250, 0.35);
  --mp-light: #60a5fa;
  --mp-light-text: #93c5fd;
  --mp-light-bg: rgba(59, 130, 246, 0.16);
  --mp-light-border: rgba(96, 165, 250, 0.35);
  --mp-infinite: #22d3ee;
  --mp-infinite-text: #67e8f9;
  --mp-infinite-bg: rgba(14, 116, 144, 0.22);
  --mp-infinite-border: rgba(34, 211, 238, 0.35);
}

html.theme-dark body {
  background:
    radial-gradient(1100px 560px at -10% -20%, rgba(37, 99, 235, 0.22), transparent 55%),
    radial-gradient(900px 500px at 110% 0%, rgba(14, 116, 144, 0.14), transparent 50%),
    linear-gradient(180deg, #0f172a 0%, var(--os-bg) 45%, #020617 100%);
  color: var(--os-text);
}

html.theme-dark .os-topbar {
  background: rgba(15, 23, 42, 0.82);
}

html.theme-dark .header-user-profile {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.78);
}

html.theme-dark .header-user-copy strong {
  color: #f8fafc;
}

html.theme-dark .header-user-copy small {
  color: #94a3b8;
}

html.theme-dark .sidebar-close-btn,
html.theme-dark .sidebar-toggle,
html.theme-dark .theme-toggle {
  background: rgba(30, 41, 59, 0.9);
  color: #94a3b8;
  border-color: var(--os-border);
}

html.theme-dark .sidebar-close-btn:hover,
html.theme-dark .sidebar-toggle:hover,
html.theme-dark .theme-toggle:hover {
  background: #1e293b;
  color: #f8fafc;
  border-color: var(--os-border-strong);
}

html.theme-dark .os-logo-img {
  background: #0f172a;
}

html.theme-dark .os-brand h1 {
  color: #f8fafc;
}

html.theme-dark .os-brand p,
html.theme-dark .os-nav-label {
  color: #94a3b8;
}

html.theme-dark .os-nav-item {
  color: #cbd5e1;
}

html.theme-dark .os-nav-item svg {
  opacity: 0.9;
  color: #cbd5e1;
}

html.theme-dark .os-nav-item:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #f8fafc;
  box-shadow: none;
}

html.theme-dark .os-nav-item:hover svg {
  color: #f8fafc;
}

html.theme-dark .os-nav-item.is-active {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff;
}

html.theme-dark .os-nav-item.is-active svg {
  color: #fff;
  opacity: 1;
}

html.theme-dark .os-nav-subitem {
  color: #94a3b8;
}

html.theme-dark .os-nav-subitem:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #f8fafc;
}

html.theme-dark .os-nav-subitem.is-active {
  background: rgba(37, 99, 235, 0.22);
  color: #93c5fd;
}

html.theme-dark .os-sidebar-foot {
  background: rgba(2, 6, 23, 0.35);
}

html.theme-dark .os-nav-logout {
  color: #f87171;
}

html.theme-dark .os-nav-logout:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

html.theme-dark .os-topbar h2 {
  color: #f8fafc;
}

html.theme-dark .os-topbar span,
html.theme-dark #topbar-subtitle {
  color: #94a3b8;
}

html.theme-dark .btn {
  background: rgba(30, 41, 59, 0.95);
  color: var(--os-text);
}

html.theme-dark .btn:hover {
  background: #334155;
}

html.theme-dark .btn-primary {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff;
}

html.theme-dark .btn-ghost {
  color: #94a3b8;
}

html.theme-dark .btn-ghost:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #f8fafc;
}

html.theme-dark .btn-danger:hover {
  background: rgba(220, 38, 38, 0.15);
}

html.theme-dark .task-toolbar {
  background: rgba(30, 41, 59, 0.88);
}

html.theme-dark .task-search {
  background: #0f172a;
  border-color: var(--os-border);
  color: #94a3b8;
}

html.theme-dark .task-search input {
  color: #f1f5f9;
}

html.theme-dark .task-search input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

html.theme-dark .task-filters select,
html.theme-dark .task-side-select,
html.theme-dark .task-check-add input {
  background: #0f172a;
  border-color: var(--os-border);
  color: #e2e8f0;
}

html.theme-dark .task-filter-check {
  color: #cbd5e1;
}

html.theme-dark .task-stat {
  color: #94a3b8;
}

html.theme-dark .task-stat strong {
  color: #f1f5f9;
}

html.theme-dark .task-stat.is-warn {
  color: #fca5a5;
}

html.theme-dark .task-stat.is-warn strong {
  color: #f87171;
}

html.theme-dark .task-column {
  background: #1e293b;
}

html.theme-dark .task-column.is-drop-target {
  background: #243044;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.4);
}

html.theme-dark .task-column-head h3 {
  color: #f1f5f9;
}

html.theme-dark .task-column-count {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

html.theme-dark .task-column-menu-btn,
html.theme-dark .task-add-card-btn {
  color: #94a3b8;
}

html.theme-dark .task-column-menu-btn:hover,
html.theme-dark .task-add-card-btn:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #f8fafc;
}

html.theme-dark .task-column-empty {
  color: #94a3b8;
  border-color: #475569;
  background: rgba(15, 23, 42, 0.45);
}

html.theme-dark .task-quick-add textarea {
  background: #0f172a;
  color: #f1f5f9;
  border-color: #3b82f6;
}

html.theme-dark .task-quick-add textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

html.theme-dark .task-card {
  background: #0f172a;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

html.theme-dark .task-card:hover {
  background: #111827;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45), 0 8px 20px rgba(0, 0, 0, 0.28);
}

html.theme-dark .task-clockify-btn {
  border-color: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  background: rgba(3, 105, 161, 0.22);
}

html.theme-dark .task-clockify-btn:hover {
  color: #fff;
  background: #0284c7;
}

html.theme-dark .task-clockify-btn.is-running {
  color: #86efac;
  background: rgba(22, 163, 74, 0.2);
}

html.theme-dark .task-card-title {
  color: #f1f5f9;
}

html.theme-dark .task-card-progress,
html.theme-dark .task-check-progress {
  background: #334155;
}

html.theme-dark .task-badge {
  background: #1e293b;
  color: #cbd5e1;
}

html.theme-dark .task-due.is-overdue {
  background: rgba(220, 38, 38, 0.22);
  color: #fca5a5;
}

html.theme-dark .task-due.is-today,
html.theme-dark .task-due.is-soon {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}

html.theme-dark .task-due.is-ok,
html.theme-dark .task-check-badge.is-done {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

html.theme-dark .task-drawer-backdrop {
  background: rgba(2, 6, 23, 0.72);
}

html.theme-dark .task-drawer-panel {
  background: #1e293b;
}

html.theme-dark .task-drawer-list {
  color: #94a3b8;
}

html.theme-dark .task-drawer-list strong {
  color: #e2e8f0;
}

html.theme-dark .task-drawer-title {
  color: #f8fafc;
}

html.theme-dark .task-drawer-title:focus {
  background: #0f172a;
}

html.theme-dark .task-drawer-section h5,
html.theme-dark .task-side-block h6 {
  color: #94a3b8;
}

html.theme-dark .task-drawer-desc {
  background: #0f172a;
  color: #e2e8f0;
}

html.theme-dark .task-drawer-desc:focus {
  background: #020617;
  border-color: #3b82f6;
}

html.theme-dark .task-drawer-richtext .richtext-editor.task-drawer-desc {
  background: #0f172a;
  border-color: var(--os-border);
  color: #e2e8f0;
}

html.theme-dark .task-drawer-richtext .richtext-toolbar {
  background: #0f172a;
  border-color: var(--os-border);
}

html.theme-dark .task-drawer-desc::placeholder,
html.theme-dark .task-check-add input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

html.theme-dark .task-check-progress > em {
  color: #94a3b8;
}

html.theme-dark .task-check-item:hover {
  background: rgba(148, 163, 184, 0.1);
}

html.theme-dark .task-check-text {
  color: #e2e8f0;
}

html.theme-dark .task-check-item.is-done .task-check-text {
  color: #94a3b8;
}

html.theme-dark .task-member-chip {
  background: #0f172a;
}

html.theme-dark .task-member-chip em {
  color: #e2e8f0;
}

html.theme-dark .task-member-chip.is-on {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(96, 165, 250, 0.45);
}

html.theme-dark .task-danger-btn {
  background: #0f172a !important;
  border-color: rgba(248, 113, 113, 0.35) !important;
  color: #f87171 !important;
}

html.theme-dark .task-label-hint {
  color: #94a3b8;
}

html.theme-dark .modal-backdrop {
  background: rgba(2, 6, 23, 0.72);
}

html.theme-dark .modal {
  background: #1e293b;
  color: var(--os-text);
  border: 1px solid var(--os-border);
}

html.theme-dark .modal-head,
html.theme-dark .modal-foot {
  background: rgba(15, 23, 42, 0.55);
}

html.theme-dark .modal-close {
  background: var(--os-surface);
  border-color: var(--os-border);
  color: #94a3b8;
}

html.theme-dark .modal-close:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
}

html.theme-dark .modal h5,
html.theme-dark .modal-head h5 {
  color: #f1f5f9;
}

html.theme-dark .modal label,
html.theme-dark .modal .share-field-label,
html.theme-dark .file-field-label,
html.theme-dark .share-count,
html.theme-dark .share-picker-hint,
html.theme-dark .file-name {
  color: #e2e8f0;
}

html.theme-dark .file-field-row {
  background: color-mix(in srgb, #fff 4%, var(--os-surface, #0f172a));
}

html.theme-dark .file-preview {
  background: #0f172a;
}

html.theme-dark .file-preview.is-file {
  background: color-mix(in srgb, #2563eb 16%, #0f172a);
  border-color: color-mix(in srgb, #60a5fa 40%, #1e293b);
}

html.theme-dark .modal input,
html.theme-dark .modal select,
html.theme-dark .modal textarea,
html.theme-dark .richtext-editor {
  background: #0f172a;
  border-color: var(--os-border);
  color: #e2e8f0;
}

html.theme-dark .modal input::placeholder,
html.theme-dark .modal textarea::placeholder,
html.theme-dark .richtext-editor.is-empty::before {
  color: #94a3b8;
  opacity: 1;
}

html.theme-dark .share-person,
html.theme-dark .share-picker {
  background: #0f172a;
  color: #e2e8f0;
}

html.theme-dark .share-person-name {
  color: #e2e8f0;
}

html.theme-dark .share-person-role {
  color: #94a3b8;
}

html.theme-dark .employees-grid .employee-card,
html.theme-dark .employee-card,
html.theme-dark .detail-profile,
html.theme-dark .detail-main,
html.theme-dark .state-panel,
html.theme-dark .page-empty,
html.theme-dark .crm-root .ws-panel,
html.theme-dark .ws-panel,
html.theme-dark .ws-card,
html.theme-dark .ws-toolbar {
  background: rgba(30, 41, 59, 0.92);
  border-color: var(--os-border);
  color: var(--os-text);
}

html.theme-dark .employees-summary strong,
html.theme-dark .employee-card-name {
  color: #f8fafc;
}

html.theme-dark .employees-summary span,
html.theme-dark .employee-card-role {
  color: #94a3b8;
}

html.theme-dark .employee-card:hover {
  background: rgba(51, 65, 85, 0.95);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

html.theme-dark .employee-card-actions {
  border-top-color: rgba(148, 163, 184, 0.16);
}

html.theme-dark .employee-account-btn {
  color: #93c5fd;
}

html.theme-dark .employee-account-btn:hover {
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
}

html.theme-dark .employee-status-dot {
  border-color: #1e293b;
}

html.theme-dark .page-empty h3,
html.theme-dark .state-panel h3,
html.theme-dark .employee-card h3,
html.theme-dark .employee-card .employee-name {
  color: #f1f5f9;
}

html.theme-dark .page-empty p,
html.theme-dark .state-panel p,
html.theme-dark .employee-card p,
html.theme-dark .employee-card .employee-role,
html.theme-dark .employee-meta,
html.theme-dark .detail-profile p {
  color: #94a3b8;
}

html.theme-dark .detail-tab {
  color: #94a3b8;
}

html.theme-dark .detail-tab.is-active {
  color: #fff;
  background: #2563eb;
}

html.theme-dark .ws-toolbar,
html.theme-dark .ws-search,
html.theme-dark .ws-search input,
html.theme-dark .ws-toolbar select,
html.theme-dark .ws-toolbar input {
  color: #e2e8f0;
}

html.theme-dark .ws-search input::placeholder,
html.theme-dark .ws-toolbar input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

html.theme-dark .ws-muted,
html.theme-dark .ws-label,
html.theme-dark .ws-meta,
html.theme-dark .ws-empty,
html.theme-dark .ws-hint {
  color: #94a3b8 !important;
}

html.theme-dark .ws-title,
html.theme-dark .ws-card-title,
html.theme-dark .ws-report-value,
html.theme-dark .ws-stat-value,
html.theme-dark h1,
html.theme-dark h2,
html.theme-dark h3,
html.theme-dark h4,
html.theme-dark h5 {
  color: #f1f5f9;
}

html.theme-dark .toast {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid var(--os-border);
}

html.theme-dark .sidebar-backdrop.is-open {
  background: rgba(2, 6, 23, 0.55);
}

html.theme-dark ::placeholder {
  color: #94a3b8;
  opacity: 1;
}

html.theme-dark option {
  background: #0f172a;
  color: #e2e8f0;
}

/* ?? Boards list ???????????????????????????????????????????????????????? */

.boards-view {
  min-height: calc(100vh - 140px);
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.boards-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 18px;
  box-shadow: var(--os-shadow);
  color: var(--os-text);
}

.boards-empty h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.boards-empty p {
  margin: 0 0 1.15rem;
  color: var(--os-muted);
  font-size: 0.9rem;
}

.board-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 118px;
  padding: 1rem 1rem 0.85rem;
  border: 0;
  border-radius: 14px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--os-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font: inherit;
  overflow: hidden;
}

.board-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--os-shadow-lg);
}

.board-tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.board-tile-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
}

.board-tile-desc {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.9;
}

.board-tile-foot {
  margin-top: auto;
  padding-top: 0.85rem;
  display: flex;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 650;
  opacity: 0.92;
}

.board-tile-delete {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.18);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.board-tile:hover .board-tile-delete,
.board-tile:focus-within .board-tile-delete {
  opacity: 1;
}

.board-tile-delete:hover {
  background: rgba(15, 23, 42, 0.35);
}

.board-tile-create {
  background: var(--os-surface-2);
  border: 1.5px dashed var(--os-border-strong);
  color: var(--os-muted);
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: none;
  font-weight: 700;
}

.board-tile-create:hover {
  background: var(--os-surface);
  border-color: var(--os-muted);
  color: var(--os-text);
  box-shadow: var(--os-shadow);
}

.board-tile-create-plus {
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 500;
}

.board-color-blue { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.board-color-sky { background: linear-gradient(135deg, #0369a1, #0ea5e9); }
.board-color-teal { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.board-color-green { background: linear-gradient(135deg, #15803d, #22c55e); }
.board-color-lime { background: linear-gradient(135deg, #4d7c0f, #84cc16); }
.board-color-yellow { background: linear-gradient(135deg, #a16207, #eab308); }
.board-color-orange { background: linear-gradient(135deg, #c2410c, #f97316); }
.board-color-red { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.board-color-pink { background: linear-gradient(135deg, #be185d, #ec4899); }
.board-color-purple { background: linear-gradient(135deg, #6d28d9, #a855f7); }
.board-color-grey { background: linear-gradient(135deg, #334155, #64748b); }

.board-detail-view {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: calc(100vh - 120px);
  margin: -1.6rem -1.75rem -2.75rem;
  padding: 1.25rem 1.75rem 2.5rem;
  background: linear-gradient(160deg, #1e40af 0%, #2563eb 45%, #3b82f6 100%);
  transition: background 0.25s ease;
}

.board-detail-view[hidden] {
  display: none !important;
}

#page-tasks.is-board-open {
  /* Board color fills through the page content area */
}

.board-detail-view[data-board-color='blue'] {
  background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 42%, #3b82f6 100%);
}
.board-detail-view[data-board-color='sky'] {
  background: linear-gradient(160deg, #0c4a6e 0%, #0284c7 42%, #38bdf8 100%);
}
.board-detail-view[data-board-color='teal'] {
  background: linear-gradient(160deg, #115e59 0%, #0d9488 42%, #2dd4bf 100%);
}
.board-detail-view[data-board-color='green'] {
  background: linear-gradient(160deg, #14532d 0%, #16a34a 42%, #4ade80 100%);
}
.board-detail-view[data-board-color='lime'] {
  background: linear-gradient(160deg, #3f6212 0%, #65a30d 42%, #a3e635 100%);
}
.board-detail-view[data-board-color='yellow'] {
  background: linear-gradient(160deg, #854d0e 0%, #ca8a04 42%, #facc15 100%);
}
.board-detail-view[data-board-color='orange'] {
  background: linear-gradient(160deg, #9a3412 0%, #ea580c 42%, #fb923c 100%);
}
.board-detail-view[data-board-color='red'] {
  background: linear-gradient(160deg, #7f1d1d 0%, #dc2626 42%, #f87171 100%);
}
.board-detail-view[data-board-color='pink'] {
  background: linear-gradient(160deg, #9d174d 0%, #db2777 42%, #f472b6 100%);
}
.board-detail-view[data-board-color='purple'] {
  background: linear-gradient(160deg, #5b21b6 0%, #7c3aed 42%, #c084fc 100%);
}
.board-detail-view[data-board-color='grey'] {
  background: linear-gradient(160deg, #1e293b 0%, #475569 42%, #94a3b8 100%);
}

/* Glass UI over colored board background */
.board-detail-view .task-toolbar {
  background: rgba(15, 23, 42, 0.28);
  border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.board-detail-view .task-search {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
}

.board-detail-view .task-search input,
.board-detail-view .task-filters select,
.board-detail-view .task-filter-check,
.board-detail-view .task-stat {
  color: rgba(255, 255, 255, 0.92);
}

.board-detail-view .task-search input::placeholder {
  color: rgba(255, 255, 255, 0.65);
  opacity: 1;
}

.board-detail-view .task-filters select {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(255, 255, 255, 0.18);
}

.board-detail-view .task-stat strong {
  color: #fff;
}

.board-detail-view .task-view-toggle {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.35);
}

.board-detail-view .task-view-btn {
  color: rgba(255, 255, 255, 0.78);
}

.board-detail-view .task-view-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.board-detail-view .task-view-btn.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.95);
}

.board-detail-view .task-stat.is-warn,
.board-detail-view .task-stat.is-warn strong {
  color: #fecaca;
}

.board-detail-view .task-column {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.board-detail-view .task-column.is-drop-target {
  background: rgba(15, 23, 42, 0.58);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.board-detail-view .task-column-head h3,
.board-detail-view .task-column-menu-btn,
.board-detail-view .task-add-card-btn {
  color: #f8fafc;
}

.board-detail-view .task-column-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.board-detail-view .task-column-empty {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.2);
}

.board-detail-view .task-add-card-btn:hover,
.board-detail-view .task-column-menu-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.board-detail-view .task-card {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
}

.board-detail-view .task-card-title {
  color: #0f172a;
}

.board-detail-view .task-badge {
  background: #f1f5f9;
  color: #475569;
}

html.theme-dark .board-detail-view .task-card {
  background: rgba(15, 23, 42, 0.92);
}

html.theme-dark .board-detail-view .task-card-title {
  color: #f1f5f9;
}

html.theme-dark .board-detail-view .task-badge {
  background: rgba(51, 65, 85, 0.95);
  color: #cbd5e1;
}

html.theme-dark .board-detail-view .task-toolbar {
  background: rgba(2, 6, 23, 0.38);
}

/* Tint topbar + content when a colored board is open */
.os-main.is-board-open .os-topbar {
  background: rgba(15, 23, 42, 0.22);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.os-main.is-board-open .os-topbar h2,
.os-main.is-board-open .os-topbar span {
  color: #fff;
}

.os-main.is-board-open .os-content {
  background: transparent;
}

.os-main.is-board-open[data-board-color='blue'] {
  background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 42%, #3b82f6 100%);
}
.os-main.is-board-open[data-board-color='sky'] {
  background: linear-gradient(160deg, #0c4a6e 0%, #0284c7 42%, #38bdf8 100%);
}
.os-main.is-board-open[data-board-color='teal'] {
  background: linear-gradient(160deg, #115e59 0%, #0d9488 42%, #2dd4bf 100%);
}
.os-main.is-board-open[data-board-color='green'] {
  background: linear-gradient(160deg, #14532d 0%, #16a34a 42%, #4ade80 100%);
}
.os-main.is-board-open[data-board-color='lime'] {
  background: linear-gradient(160deg, #3f6212 0%, #65a30d 42%, #a3e635 100%);
}
.os-main.is-board-open[data-board-color='yellow'] {
  background: linear-gradient(160deg, #854d0e 0%, #ca8a04 42%, #facc15 100%);
}
.os-main.is-board-open[data-board-color='orange'] {
  background: linear-gradient(160deg, #9a3412 0%, #ea580c 42%, #fb923c 100%);
}
.os-main.is-board-open[data-board-color='red'] {
  background: linear-gradient(160deg, #7f1d1d 0%, #dc2626 42%, #f87171 100%);
}
.os-main.is-board-open[data-board-color='pink'] {
  background: linear-gradient(160deg, #9d174d 0%, #db2777 42%, #f472b6 100%);
}
.os-main.is-board-open[data-board-color='purple'] {
  background: linear-gradient(160deg, #5b21b6 0%, #7c3aed 42%, #c084fc 100%);
}
.os-main.is-board-open[data-board-color='grey'] {
  background: linear-gradient(160deg, #1e293b 0%, #475569 42%, #94a3b8 100%);
}

.os-main.is-board-open .theme-toggle,
.os-main.is-board-open .os-notification-btn,
.os-main.is-board-open .sidebar-toggle,
.os-main.is-board-open .btn-ghost {
  background: rgba(15, 23, 42, 0.28);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.os-main.is-board-open .theme-toggle:hover,
.os-main.is-board-open .os-notification-btn:hover,
.os-main.is-board-open .os-notification-btn.is-open,
.os-main.is-board-open .sidebar-toggle:hover,
.os-main.is-board-open .btn-ghost:hover {
  background: rgba(15, 23, 42, 0.42);
  color: #fff;
}

/* Premium employee workspace ? vertical sidebar navigation */
body.staff-workspace {
  background:
    radial-gradient(900px 460px at 8% -8%, rgba(59, 130, 246, 0.16), transparent 58%),
    radial-gradient(760px 420px at 92% 4%, rgba(139, 92, 246, 0.12), transparent 56%),
    linear-gradient(180deg, #f8faff 0%, #edf2fa 100%);
}

.staff-workspace .os-sidebar {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 4px 0 28px rgba(15, 23, 42, 0.05);
}

.staff-workspace .os-brand p {
  color: #2563eb;
  letter-spacing: 0.11em;
}

.staff-workspace .os-nav-item.is-active {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.staff-workspace .os-nav-item.is-active svg {
  opacity: 1;
}

.staff-workspace .os-nav-group.is-open .os-nav-parent:not(.is-active) {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
}

.staff-workspace .os-nav-sub {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  width: auto;
  margin: 0.15rem 0 0.15rem 0.85rem;
  padding: 0.15rem 0 0.35rem 0.55rem;
  border: 0;
  border-left: 2px solid rgba(37, 99, 235, 0.18);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.staff-workspace .os-nav-sub[hidden] {
  display: none !important;
}

.os-notification-menu {
  position: relative;
  z-index: 2;
}

.os-notifications-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 8px 4px 32px;
}

.os-notifications-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.os-notifications-page-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--os-text);
}

.os-notifications-page-head p {
  margin: 4px 0 0;
  color: var(--os-muted);
  font-size: 0.86rem;
}

.os-notifications-page-list {
  display: grid;
  gap: 8px;
}

.os-notifications-page-list .os-notification-item {
  border-radius: 14px;
  background: var(--os-surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.os-notifications-page-list .os-notification-empty {
  min-height: 220px;
  border: 1px dashed var(--os-border);
  border-radius: 14px;
}

.os-notification-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.os-notification-btn:hover,
.os-notification-btn.is-open {
  background: #fff;
  color: #0f172a;
  border-color: var(--os-border-strong);
  box-shadow: var(--os-shadow);
}

.os-notification-btn.is-live-pulse {
  color: #15803d;
  border-color: color-mix(in srgb, #34c759 45%, var(--os-border));
  animation: os-notification-live-pulse 1.1s ease;
}

@keyframes os-notification-live-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.45); }
  35% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(52, 199, 89, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.os-notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.os-notification-btn .os-notification-badge {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

.os-notification-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 220;
  width: min(420px, calc(100vw - 1.5rem));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px);
}

.os-notification-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem 0.8rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.os-notification-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.os-notification-header p {
  margin: 0.18rem 0 0;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.35;
}

.os-notification-mark-read {
  flex-shrink: 0;
  margin-top: 0.1rem;
  padding: 0.28rem 0.55rem;
  border: 0;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.os-notification-mark-read:hover {
  background: #dbeafe;
}

.os-notification-body {
  max-height: min(680px, 72vh);
  overflow: auto;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.os-notification-footer {
  display: flex;
  justify-content: center;
  padding: 0.55rem 0.85rem 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.os-notification-view-all {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
}

.os-notification-view-all:hover {
  background: #dbeafe;
}

.os-notification-empty {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  padding: 2rem 1.25rem;
  color: #64748b;
  text-align: center;
}

.os-notification-empty svg {
  color: #22c55e;
  margin-bottom: 0.25rem;
}

.os-notification-empty p {
  margin: 0;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 750;
}

.os-notification-empty small {
  max-width: 26ch;
  line-height: 1.4;
  font-size: 0.72rem;
}

.os-notification-item {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.5rem 0.55rem 0.35rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background 0.15s ease;
}

.os-notification-item:hover {
  background: #f8fafc;
}

.os-notification-item.is-unread {
  background: rgba(239, 246, 255, 0.72);
}

.os-notification-open {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0.15rem 0.15rem 0.15rem 0.3rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.os-notification-got-it {
  flex-shrink: 0;
  align-self: center;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border: 1px solid #dbe3f0;
  border-radius: 999px;
  background: #fff;
  color: #2563eb;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.os-notification-got-it:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.os-notification-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.os-notification-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.12rem;
}

.os-notification-copy strong {
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.3;
}

.os-notification-copy > span {
  color: #475569;
  font-size: 0.74rem;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.os-notification-copy small {
  color: #94a3b8;
  font-size: 0.68rem;
}

.os-notification-copy small em {
  font-style: normal;
  font-weight: 700;
  color: #64748b;
}

.os-notification-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: #2563eb;
}

.os-notification-item.is-overdue .os-notification-dot {
  background: #ef4444;
}

.os-notification-item.is-today .os-notification-dot {
  background: #f59e0b;
}

html.theme-dark .os-notification-btn {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  color: #94a3b8;
}

html.theme-dark .os-notification-btn:hover,
html.theme-dark .os-notification-btn.is-open {
  background: rgba(30, 41, 59, 0.95);
  color: #e2e8f0;
}

html.theme-dark .os-notification-badge {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  box-shadow: 0 0 0 2px #0f172a;
}

html.theme-dark .os-notification-panel {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.98);
}

html.theme-dark .os-notification-header {
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

html.theme-dark .os-notification-header h3,
html.theme-dark .os-notification-copy strong,
html.theme-dark .os-notification-empty p {
  color: #f8fafc;
}

html.theme-dark .os-notification-header p,
html.theme-dark .os-notification-copy > span,
html.theme-dark .os-notification-empty {
  color: #94a3b8;
}

html.theme-dark .os-notification-mark-read {
  background: rgba(37, 99, 235, 0.22);
  color: #93c5fd;
}

html.theme-dark .os-notification-item:hover,
html.theme-dark .os-notification-item.is-unread {
  background: rgba(30, 41, 59, 0.9);
}

html.theme-dark .os-notification-got-it {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.9);
  color: #93c5fd;
}

html.theme-dark .os-notification-got-it:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(147, 197, 253, 0.35);
  color: #bfdbfe;
}

html.theme-dark .os-notification-copy small em {
  color: #cbd5e1;
}

.staff-workspace .os-topbar {
  border-bottom-color: rgba(148, 163, 184, 0.16);
  background: rgba(248, 250, 255, 0.78);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.035);
}

.staff-workspace .os-topbar h2 {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.staff-workspace .header-user-profile {
  border-color: rgba(99, 102, 241, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.staff-workspace .os-page > .detail-panel,
.staff-workspace .crm-root {
  min-height: 360px;
}

html.theme-dark body.staff-workspace {
  background:
    radial-gradient(900px 460px at 8% -8%, rgba(37, 99, 235, 0.18), transparent 58%),
    radial-gradient(760px 420px at 92% 4%, rgba(124, 58, 237, 0.15), transparent 56%),
    linear-gradient(180deg, #0b1120 0%, #111827 100%);
}

html.theme-dark .staff-workspace .os-sidebar {
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.2);
}

html.theme-dark .staff-workspace .os-brand p {
  color: #60a5fa;
}

html.theme-dark .staff-workspace .os-nav-item.is-active {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
}

html.theme-dark .staff-workspace .os-nav-sub {
  border-left-color: rgba(96, 165, 250, 0.28);
  background: transparent;
}

html.theme-dark .staff-workspace .os-topbar {
  border-bottom-color: rgba(148, 163, 184, 0.12);
  background: rgba(11, 17, 32, 0.8);
}

.staff-workspace .os-main.is-board-open .os-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.22);
  box-shadow: none;
}

.staff-workspace .os-main.is-board-open .header-user-profile {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.24);
}

.staff-workspace .os-main.is-board-open .header-user-copy strong,
.staff-workspace .os-main.is-board-open .header-user-copy small {
  color: #fff;
}

/* Google Calendar-inspired employee calendar */
.gcal-shell {
  overflow: hidden;
  border: 1px solid var(--os-border);
  border-radius: 18px;
  background: var(--os-surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.gcal-toolbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--os-border);
}

.gcal-toolbar h3 {
  margin: 0 0 0 0.45rem;
  color: var(--os-text);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.gcal-toolbar-spacer {
  flex: 1;
}

.gcal-today-btn,
.gcal-nav-btn,
.gcal-view-btn {
  min-height: 36px;
  border: 1px solid var(--os-border);
  border-radius: 8px;
  background: transparent;
  color: var(--os-text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

.gcal-today-btn {
  padding: 0 0.85rem;
}

.gcal-nav-btn {
  width: 36px;
  border-color: transparent;
  font-size: 1.15rem;
}

.gcal-view-btn {
  padding: 0 0.8rem;
}

.gcal-today-btn:hover,
.gcal-nav-btn:hover,
.gcal-view-btn:hover {
  background: var(--os-surface-2);
}

.gcal-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 650px;
}

.gcal-sidebar {
  padding: 1rem;
  border-right: 1px solid var(--os-border);
  background: var(--os-surface);
}

.gcal-create-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1.05rem;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  color: var(--os-text);
  background: var(--os-surface);
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.16);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
}

.gcal-create-btn:hover {
  box-shadow: 0 7px 18px rgba(60, 64, 67, 0.2);
}

.gcal-create-btn span {
  color: #1a73e8;
  font-size: 1.35rem;
  font-weight: 400;
}

.gcal-selected-date {
  display: flex;
  margin-top: 1.3rem;
  padding: 0.8rem;
  border-radius: 12px;
  flex-direction: column;
  background: var(--os-surface-2);
}

.gcal-selected-date small {
  color: var(--os-muted);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.gcal-selected-date strong {
  margin-top: 0.3rem;
  color: var(--os-text);
  font-size: 0.72rem;
  line-height: 1.45;
}

.gcal-my-calendar {
  padding: 1.1rem 0.3rem 0.9rem;
  border-bottom: 1px solid var(--os-border);
}

.gcal-my-calendar h4,
.gcal-agenda-head h4 {
  margin: 0 0 0.65rem;
  color: var(--os-text);
  font-size: 0.72rem;
  font-weight: 750;
}

.gcal-my-calendar label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.55rem 0;
  color: var(--os-muted);
  font-size: 0.67rem;
}

.gcal-my-calendar label > span {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.gcal-my-calendar .is-blue {
  background: #1a73e8;
}

.gcal-my-calendar .is-purple {
  background: #a855f7;
}

.gcal-agenda {
  padding-top: 1rem;
}

.gcal-agenda-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gcal-agenda-head span {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #1a73e8;
  background: #e8f0fe;
  font-size: 0.6rem;
  font-weight: 750;
}

.gcal-calendar {
  min-width: 0;
  overflow: hidden;
}

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

.gcal-weekdays {
  min-height: 38px;
  align-items: end;
  border-bottom: 1px solid var(--os-border);
}

.gcal-weekdays span {
  padding: 0 0 0.45rem;
  color: var(--os-muted);
  font-size: 0.62rem;
  font-weight: 650;
  text-align: center;
  text-transform: uppercase;
}

.gcal-day {
  position: relative;
  min-width: 0;
  min-height: 102px;
  padding: 0.35rem 0.28rem;
  border-right: 1px solid var(--os-border);
  border-bottom: 1px solid var(--os-border);
  background: var(--os-surface);
  cursor: pointer;
  outline: 0;
}

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

.gcal-day:hover,
.gcal-day:focus-visible {
  background: var(--os-surface-2);
}

.gcal-day.is-selected {
  box-shadow: inset 0 0 0 2px rgba(26, 115, 232, 0.48);
}

.gcal-day.is-outside {
  background: color-mix(in srgb, var(--os-surface-2) 55%, transparent);
}

.gcal-day.is-outside .gcal-day-number {
  color: #a8b0bc;
}

.gcal-day-number {
  display: grid;
  width: 26px;
  height: 26px;
  margin: 0 auto 0.2rem;
  place-items: center;
  border-radius: 50%;
  color: var(--os-text);
  font-size: 0.68rem;
  font-weight: 650;
}

.gcal-day.is-today .gcal-day-number {
  color: #fff;
  background: #1a73e8;
}

.gcal-day-events {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.13rem;
}

.gcal-event-chip {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0.17rem 0.25rem;
  border: 0;
  border-radius: 3px;
  color: #fff;
  font: inherit;
  font-size: 0.57rem;
  font-weight: 650;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.gcal-event-chip span {
  margin-right: 0.18rem;
  opacity: 0.82;
  font-size: 0.52rem;
}

.gcal-event-chip.is-color-0,
.gcal-agenda-color.is-color-0 {
  background: #1a73e8;
}

.gcal-event-chip.is-color-1,
.gcal-agenda-color.is-color-1 {
  background: #0f9d58;
}

.gcal-event-chip.is-color-2,
.gcal-agenda-color.is-color-2 {
  background: #a142f4;
}

.gcal-event-chip.is-color-3,
.gcal-agenda-color.is-color-3 {
  background: #f4511e;
}

.gcal-event-chip.is-color-4,
.gcal-agenda-color.is-color-4 {
  background: #d81b60;
}

.gcal-more {
  padding-left: 0.25rem;
  color: var(--os-muted);
  font-size: 0.56rem;
  font-weight: 700;
}

.gcal-agenda-list {
  display: flex;
  max-height: 320px;
  flex-direction: column;
  gap: 0.38rem;
  overflow-y: auto;
}

.gcal-agenda-event {
  display: grid;
  grid-template-columns: 4px 48px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 0.48rem;
  padding: 0.55rem 0.35rem;
  border-radius: 9px;
  cursor: pointer;
}

.gcal-agenda-event:hover {
  background: var(--os-surface-2);
}

.gcal-agenda-color {
  width: 4px;
  height: 36px;
  border-radius: 999px;
}

.gcal-agenda-time,
.gcal-agenda-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.gcal-agenda-time strong,
.gcal-agenda-copy strong {
  overflow: hidden;
  color: var(--os-text);
  font-size: 0.62rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gcal-agenda-time small,
.gcal-agenda-copy small {
  margin-top: 0.14rem;
  overflow: hidden;
  color: var(--os-muted);
  font-size: 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gcal-agenda-bell {
  color: #f59e0b;
  font-size: 0.75rem;
}

.gcal-agenda-empty {
  padding: 1.3rem 0.2rem;
  color: var(--os-muted);
  text-align: center;
}

.gcal-agenda-empty > span {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 auto 0.55rem;
  place-items: center;
  border-radius: 50%;
  color: #0f9d58;
  background: rgba(15, 157, 88, 0.1);
}

.gcal-agenda-empty h3 {
  margin: 0;
  color: var(--os-text);
  font-size: 0.72rem;
}

.gcal-agenda-empty p {
  margin: 0.28rem 0 0;
  font-size: 0.58rem;
  line-height: 1.5;
}

.gcal-event-dialog {
  text-align: left;
}

.gcal-event-dialog p {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.65rem;
  margin: 0.75rem 0;
  font-size: 0.82rem;
}

.gcal-event-dialog strong {
  color: #64748b;
}

.calendar-reminder-dialog strong {
  display: block;
  color: #1a73e8;
  font-size: 1.2rem;
}

.calendar-reminder-dialog > span {
  display: block;
  margin-top: 0.25rem;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 650;
}

.calendar-reminder-dialog p {
  margin: 0.65rem 0 0;
  color: #64748b;
}

.gcal-test-alert {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  color: var(--os-text);
  font-size: 0.66rem;
  font-weight: 650;
  background: var(--os-surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.gcal-test-alert:hover {
  border-color: rgba(26, 115, 232, 0.45);
  color: #1a73e8;
}

.gcal-alert-hint {
  margin: 0.5rem 0 0;
  color: var(--os-muted);
  font-size: 0.6rem;
  line-height: 1.5;
}

html.theme-dark .gcal-agenda-head span {
  color: #93c5fd;
  background: rgba(26, 115, 232, 0.2);
}

html.theme-dark .gcal-create-btn {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.22);
}

@media (max-width: 900px) {
  .gcal-body {
    grid-template-columns: 1fr;
  }

  .gcal-sidebar {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.75rem;
    border-right: 0;
    border-bottom: 1px solid var(--os-border);
  }

  .gcal-selected-date {
    margin-top: 0;
  }

  .gcal-my-calendar {
    display: none;
  }

  .gcal-agenda {
    grid-column: 1 / -1;
  }

  .gcal-agenda-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
}

@media (max-width: 650px) {
  .gcal-toolbar {
    padding-inline: 0.55rem;
  }

  .gcal-toolbar h3 {
    margin-left: 0;
    font-size: 0.9rem;
  }

  .gcal-view-btn {
    display: none;
  }

  .gcal-sidebar {
    grid-template-columns: 1fr;
  }

  .gcal-create-btn {
    width: 100%;
    justify-content: center;
  }

  .gcal-agenda-list {
    grid-template-columns: 1fr;
  }

  .gcal-calendar {
    overflow-x: auto;
  }

  .gcal-weekdays,
  .gcal-grid {
    min-width: 720px;
  }
}

/* Admin command-center dashboard */
.admin-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  perspective: 1200px;
}

.admin-dashboard-hero {
  position: relative;
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  padding: 2.1rem 2.35rem;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(125, 211, 252, 0.28), transparent 27%),
    linear-gradient(125deg, #0f2f78 0%, #2857d8 45%, #6546dd 76%, #8b5cf6 100%);
  box-shadow: 0 24px 55px rgba(37, 76, 190, 0.23);
  isolation: isolate;
}

.admin-dashboard-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 46px 46px;
  content: "";
  mask-image: linear-gradient(90deg, #000, transparent 80%);
}

.admin-hero-copy {
  position: relative;
  z-index: 3;
  max-width: 680px;
}

.admin-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.62rem;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.admin-hero-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86efac;
  box-shadow: 0 0 0 5px rgba(134, 239, 172, 0.13);
}

.admin-hero-copy h2 {
  margin: 1rem 0 0.45rem;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.admin-hero-copy > p {
  max-width: 610px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.65;
}

.admin-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.61rem;
}

.admin-hero-meta b {
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.2);
}

.admin-hero-visual {
  position: relative;
  width: 285px;
  height: 200px;
  flex: 0 0 285px;
  transform-style: preserve-3d;
}

.admin-3d-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 112px;
  height: 112px;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.3),
    20px 28px 46px rgba(15, 23, 42, 0.28);
  transform: translate(-50%, -50%) rotateX(12deg) rotateY(-18deg) rotateZ(4deg);
  backdrop-filter: blur(14px);
  animation: admin-core-float 6s ease-in-out infinite;
}

.admin-3d-core span {
  font-size: 1.6rem;
  font-weight: 800;
}

.admin-3d-core small {
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.52rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.admin-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform-style: preserve-3d;
}

.admin-orbit-one {
  width: 220px;
  height: 112px;
  animation: admin-orbit-spin 11s linear infinite;
}

.admin-orbit-two {
  width: 150px;
  height: 190px;
  animation: admin-orbit-spin-alt 13s linear infinite reverse;
}

.admin-orbit span {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #a5f3fc;
  box-shadow: 0 0 18px #67e8f9;
}

.admin-float-card {
  position: absolute;
  z-index: 2;
  width: 58px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 10px 15px 26px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(10px);
}

.admin-float-card::before,
.admin-float-card::after {
  position: absolute;
  left: 11px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  content: "";
}

.admin-float-card::before {
  top: 13px;
  width: 23px;
}

.admin-float-card::after {
  top: 23px;
  width: 35px;
}

.admin-float-card.card-a {
  top: 8px;
  right: 7px;
  animation: admin-card-float 5.4s ease-in-out infinite;
}

.admin-float-card.card-b {
  bottom: 7px;
  left: 2px;
  animation: admin-card-float 6.4s ease-in-out infinite reverse;
}

@keyframes admin-core-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0) rotateX(12deg) rotateY(-18deg) rotateZ(4deg); }
  50% { transform: translate(-50%, -50%) translateY(-10px) rotateX(-5deg) rotateY(10deg) rotateZ(-3deg); }
}

@keyframes admin-orbit-spin {
  from { transform: translate(-50%, -50%) rotateX(65deg) rotateZ(0); }
  to { transform: translate(-50%, -50%) rotateX(65deg) rotateZ(360deg); }
}

@keyframes admin-orbit-spin-alt {
  from { transform: translate(-50%, -50%) rotateY(65deg) rotateZ(0); }
  to { transform: translate(-50%, -50%) rotateY(65deg) rotateZ(360deg); }
}

@keyframes admin-card-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-6deg); }
  50% { transform: translate3d(-8px, 12px, 18px) rotate(5deg); }
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.admin-kpi {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 45px minmax(0, 1fr);
  gap: 0.75rem;
  overflow: hidden;
  padding: 1.05rem;
  border: 1px solid var(--os-border);
  border-radius: 18px;
  background: var(--os-surface);
  box-shadow: var(--os-shadow);
  transform-style: preserve-3d;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.admin-kpi::after {
  position: absolute;
  right: -28px;
  bottom: -38px;
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: var(--kpi-soft);
  content: "";
}

.admin-kpi:hover {
  z-index: 2;
  border-color: var(--kpi-border);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.11);
  transform: translateY(-5px) rotateX(2deg);
}

.admin-kpi.is-blue { --kpi: #2563eb; --kpi-soft: rgba(37, 99, 235, 0.1); --kpi-border: rgba(37, 99, 235, 0.28); }
.admin-kpi.is-purple { --kpi: #7c3aed; --kpi-soft: rgba(124, 58, 237, 0.1); --kpi-border: rgba(124, 58, 237, 0.28); }
.admin-kpi.is-green { --kpi: #059669; --kpi-soft: rgba(5, 150, 105, 0.1); --kpi-border: rgba(5, 150, 105, 0.28); }
.admin-kpi.is-cyan { --kpi: #0891b2; --kpi-soft: rgba(8, 145, 178, 0.1); --kpi-border: rgba(8, 145, 178, 0.28); }
.admin-kpi.is-orange { --kpi: #ea580c; --kpi-soft: rgba(234, 88, 12, 0.1); --kpi-border: rgba(234, 88, 12, 0.28); }

.admin-kpi-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 14px;
  color: var(--kpi);
  background: var(--kpi-soft);
}

.admin-kpi-icon svg {
  width: 21px;
  height: 21px;
}

.admin-kpi div {
  min-width: 0;
}

.admin-kpi small,
.admin-kpi p {
  color: var(--os-muted);
}

.admin-kpi small {
  display: block;
  font-size: 0.57rem;
  font-weight: 700;
}

.admin-kpi strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--os-text);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.admin-kpi p {
  overflow: hidden;
  margin: 0.13rem 0 0;
  font-size: 0.49rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-kpi > em {
  position: absolute;
  top: 0.78rem;
  right: 0.75rem;
  color: var(--kpi);
  font-size: 0.45rem;
  font-style: normal;
  font-weight: 750;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.admin-dashboard-card {
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--os-border);
  border-radius: 20px;
  background: var(--os-surface);
  box-shadow: var(--os-shadow);
}

.admin-line-panel { grid-column: span 8; }
.admin-pie-panel { grid-column: span 4; }
.admin-bar-panel { grid-column: span 4; }
.admin-workload-panel { grid-column: span 4; }
.admin-pipeline-panel { grid-column: span 4; }

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-card-head span {
  display: block;
  margin-bottom: 0.2rem;
  color: #6366f1;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.admin-card-head h3 {
  margin: 0;
  color: var(--os-text);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-card-head > strong {
  flex: 0 0 auto;
  padding: 0.32rem 0.5rem;
  border-radius: 8px;
  color: var(--os-muted);
  font-size: 0.52rem;
  background: var(--os-surface-2);
}

.admin-line-chart {
  display: block;
  width: 100%;
  max-height: 245px;
  overflow: visible;
}

.admin-chart-gridline {
  stroke: var(--os-border-strong);
  stroke-width: 1;
  stroke-dasharray: 4 7;
}

.admin-chart-area {
  animation: admin-chart-fade 0.9s ease both;
}

.admin-chart-line {
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: admin-draw-line 1.5s 0.15s ease forwards;
}

.admin-chart-point circle {
  fill: var(--os-surface);
  stroke: #6366f1;
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  animation: admin-point-pop 0.45s 1.15s ease both;
}

.admin-chart-point text {
  fill: var(--os-muted);
  font-size: 11px;
  font-weight: 650;
}

@keyframes admin-draw-line { to { stroke-dashoffset: 0; } }
@keyframes admin-chart-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes admin-point-pop { from { transform: scale(0); } to { transform: scale(1); } }

.admin-pie-layout {
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.admin-pie {
  position: relative;
  display: grid;
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#22c55e 0 var(--done), #6366f1 var(--done) var(--progress), #cbd5e1 var(--progress) 360deg);
  box-shadow: 0 18px 38px rgba(79, 70, 229, 0.16);
  animation: admin-pie-enter 0.8s cubic-bezier(.2,.8,.2,1) both;
}

.admin-pie::before {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: var(--os-surface);
  box-shadow: inset 0 0 0 1px var(--os-border);
  content: "";
}

.admin-pie > span {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.admin-pie strong {
  color: var(--os-text);
  font-size: 1.25rem;
}

.admin-pie small {
  color: var(--os-muted);
  font-size: 0.5rem;
}

@keyframes admin-pie-enter {
  from { opacity: 0; transform: rotate(-45deg) scale(.75); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

.admin-pie-legend {
  min-width: 130px;
}

.admin-pie-legend p {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 0.42rem;
  align-items: center;
  margin: 0.55rem 0;
  color: var(--os-muted);
  font-size: 0.55rem;
}

.admin-pie-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.admin-pie-legend i.is-done { background: #22c55e; }
.admin-pie-legend i.is-progress { background: #6366f1; }
.admin-pie-legend i.is-todo { background: #cbd5e1; }
.admin-pie-legend strong { color: var(--os-text); }

.admin-vertical-bars {
  display: flex;
  height: 230px;
  align-items: stretch;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.2rem);
  padding: 0.4rem 0.7rem 0;
}

.admin-vbar {
  display: flex;
  width: 62px;
  flex-direction: column;
  gap: 0.55rem;
  text-align: center;
}

.admin-vbar > div {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
  border-radius: 10px 10px 4px 4px;
  background: var(--os-surface-2);
}

.admin-vbar > div > span {
  position: relative;
  display: block;
  width: 34px;
  border-radius: 9px 9px 3px 3px;
  background: var(--bar);
  box-shadow: 0 10px 22px var(--bar-shadow);
  transform-origin: bottom;
  animation: admin-bar-rise 0.9s ease both;
}

.admin-vbar > div b {
  position: absolute;
  top: -21px;
  left: 50%;
  color: var(--os-text);
  font-size: 0.57rem;
  transform: translateX(-50%);
}

.admin-vbar small {
  color: var(--os-muted);
  font-size: 0.52rem;
  white-space: nowrap;
}

.admin-vbar.is-todo { --bar: linear-gradient(180deg, #60a5fa, #2563eb); --bar-shadow: rgba(37, 99, 235, .24); }
.admin-vbar.is-progress { --bar: linear-gradient(180deg, #a78bfa, #7c3aed); --bar-shadow: rgba(124, 58, 237, .24); }
.admin-vbar.is-done { --bar: linear-gradient(180deg, #34d399, #059669); --bar-shadow: rgba(5, 150, 105, .24); }

@keyframes admin-bar-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.admin-workload-list {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
}

.admin-workload-list > div {
  display: grid;
  grid-template-columns: minmax(115px, 1fr) minmax(80px, 1.2fr) 24px;
  gap: 0.65rem;
  align-items: center;
}

.admin-workload-list > div > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  color: var(--os-text);
  font-size: 0.57rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-workload-list span i {
  color: #818cf8;
  font-size: 0.46rem;
  font-style: normal;
}

.admin-workload-list > div > b {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--os-surface-muted);
}

.admin-workload-list > div > b i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transform-origin: left;
  animation: admin-workload-grow 1s ease both;
}

.admin-workload-list > div > strong {
  color: var(--os-text);
  font-size: 0.58rem;
  text-align: right;
}

@keyframes admin-workload-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.admin-pipeline-list {
  min-height: 230px;
}

.admin-pipeline-list article {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto 36px;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--os-border);
}

.admin-pipeline-list article > i {
  width: 8px;
  height: 34px;
  border-radius: 999px;
  background: var(--stage-color);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--stage-color) 28%, transparent);
}

.admin-pipeline-list article span {
  min-width: 0;
}

.admin-pipeline-list article strong,
.admin-pipeline-list article small {
  display: block;
}

.admin-pipeline-list article strong {
  overflow: hidden;
  color: var(--os-text);
  font-size: 0.57rem;
  text-transform: capitalize;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-pipeline-list article small {
  margin-top: 0.12rem;
  color: var(--os-muted);
  font-size: 0.48rem;
}

.admin-pipeline-list article > b {
  color: var(--os-text);
  font-size: 0.62rem;
}

.admin-pipeline-list article > em {
  padding: 0.2rem 0.3rem;
  border-radius: 6px;
  color: #6366f1;
  font-size: 0.46rem;
  font-style: normal;
  font-weight: 750;
  text-align: center;
  background: rgba(99, 102, 241, 0.1);
}

.admin-activity-panel {
  padding-bottom: 0.4rem;
}

.admin-table-wrap {
  overflow-x: auto;
}

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

.admin-activity-table th {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--os-border-strong);
  color: var(--os-muted);
  font-size: 0.48rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-activity-table td {
  max-width: 300px;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--os-border);
  color: var(--os-muted);
  font-size: 0.54rem;
}

.admin-activity-table tbody tr {
  transition: background 0.15s ease;
}

.admin-activity-table tbody tr:hover {
  background: var(--os-surface-2);
}

.admin-activity-table td > strong {
  color: var(--os-text);
  font-size: 0.56rem;
}

.admin-table-person {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-table-person img,
.admin-table-person i {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 8px;
  object-fit: cover;
}

.admin-table-person i {
  color: #fff;
  font-size: 0.46rem;
  font-style: normal;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.admin-table-person strong {
  color: var(--os-text);
  font-size: 0.55rem;
}

.admin-type-badge {
  display: inline-flex;
  padding: 0.22rem 0.4rem;
  border-radius: 999px;
  color: #4f46e5;
  font-size: 0.47rem;
  font-weight: 750;
  text-transform: capitalize;
  background: rgba(99, 102, 241, 0.1);
}

.admin-type-badge.is-clockify { color: #047857; background: rgba(16, 185, 129, 0.12); }
.admin-type-badge.is-calendar { color: #0369a1; background: rgba(14, 165, 233, 0.12); }
.admin-type-badge.is-task { color: #7c3aed; background: rgba(124, 58, 237, 0.12); }

.admin-activity-table time {
  white-space: nowrap;
}

.admin-table-empty,
.admin-dashboard-empty {
  color: var(--os-muted);
  font-size: 0.57rem;
  text-align: center;
}

.admin-table-empty {
  padding: 2rem !important;
}

.admin-dashboard-loading {
  display: grid;
  min-height: 520px;
  place-content: center;
  place-items: center;
  color: var(--os-muted);
}

.admin-dashboard-loading > div {
  width: 74px;
  height: 74px;
  border: 2px solid rgba(99, 102, 241, 0.15);
  border-top-color: #6366f1;
  border-radius: 24px;
  animation: admin-loading-spin 1s linear infinite;
}

.admin-dashboard-loading > span {
  display: none;
}

.admin-dashboard-loading p {
  margin-top: 1rem;
  font-size: 0.63rem;
}

@keyframes admin-loading-spin { to { transform: rotate(360deg); } }

html.theme-dark .admin-dashboard-hero {
  border-color: rgba(129, 140, 248, 0.22);
  background:
    radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.2), transparent 27%),
    linear-gradient(125deg, #101d42 0%, #1e3a8a 45%, #4c1d95 100%);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
}

html.theme-dark .admin-kpi:hover {
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
}

html.theme-dark .admin-pie {
  background: conic-gradient(#34d399 0 var(--done), #818cf8 var(--done) var(--progress), #475569 var(--progress) 360deg);
}

@media (prefers-reduced-motion: reduce) {
  .admin-3d-core,
  .admin-orbit,
  .admin-float-card,
  .admin-chart-line,
  .admin-chart-point circle,
  .admin-vbar > div > span,
  .admin-workload-list > div > b i {
    animation: none !important;
  }
}

@media (max-width: 1250px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-line-panel { grid-column: span 7; }
  .admin-pie-panel { grid-column: span 5; }
  .admin-bar-panel,
  .admin-workload-panel,
  .admin-pipeline-panel { grid-column: span 4; }
}

@media (max-width: 900px) {
  .admin-dashboard-hero {
    min-height: 215px;
    padding: 1.6rem;
  }

  .admin-hero-visual {
    width: 220px;
    flex-basis: 220px;
    transform: scale(.82);
  }

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

  .admin-line-panel,
  .admin-pie-panel,
  .admin-bar-panel,
  .admin-workload-panel,
  .admin-pipeline-panel {
    grid-column: span 12;
  }
}

@media (max-width: 620px) {
  .admin-dashboard-hero {
    min-height: 245px;
  }

  .admin-hero-visual {
    position: absolute;
    right: -88px;
    opacity: 0.45;
  }

  .admin-hero-copy {
    max-width: 90%;
  }

  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }

  .admin-dashboard-card {
    padding: 1rem;
  }

  .admin-pie-layout {
    flex-direction: column;
  }
}

/* Employee performance report */
.employee-report {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  perspective: 1200px;
}

.employee-report-hero {
  position: relative;
  display: flex;
  min-height: 205px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 1.8rem 2.1rem;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 8%, rgba(251, 191, 36, 0.28), transparent 25%),
    linear-gradient(125deg, #172554 0%, #3730a3 48%, #7c3aed 100%);
  box-shadow: 0 22px 48px rgba(55, 48, 163, 0.22);
}

.employee-report-hero::before {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.11) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(90deg, #000, transparent 82%);
}

.employee-report-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.employee-report-hero-copy > span {
  display: inline-flex;
  padding: 0.34rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #ddd6fe;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
}

.employee-report-hero-copy h2 {
  margin: 0.8rem 0 0.45rem;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.employee-report-hero-copy > p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  line-height: 1.65;
}

.employee-report-hero-copy > div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
}

.employee-report-hero-copy > div b,
.employee-report-hero-copy > div small {
  font-size: 0.52rem;
}

.employee-report-hero-copy > div b {
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
}

.employee-report-hero-copy > div small {
  color: rgba(255, 255, 255, 0.58);
}

.employee-report-trophy {
  position: relative;
  width: 235px;
  height: 175px;
  flex: 0 0 235px;
  transform-style: preserve-3d;
}

.employee-trophy-cup {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 95px;
  height: 105px;
  place-items: center;
  clip-path: polygon(8% 0, 92% 0, 80% 68%, 58% 80%, 58% 91%, 82% 91%, 82% 100%, 18% 100%, 18% 91%, 42% 91%, 42% 80%, 20% 68%);
  color: #fff7cc;
  font-size: 1.55rem;
  background: linear-gradient(135deg, #fff3a3, #fbbf24 42%, #d97706 100%);
  filter: drop-shadow(15px 20px 22px rgba(15, 23, 42, 0.32));
  transform: translateX(-50%) rotateY(-10deg);
  animation: employee-trophy-float 5s ease-in-out infinite;
}

.employee-report-trophy > b {
  position: absolute;
  right: 6px;
  bottom: 15px;
  z-index: 3;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: #fef3c7;
  font-size: 0.55rem;
  line-height: 1.4;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 10px 12px 24px rgba(15, 23, 42, 0.2);
  transform: rotate(8deg);
  backdrop-filter: blur(10px);
}

.trophy-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.trophy-ring.ring-one {
  width: 205px;
  height: 85px;
  animation: employee-trophy-ring 9s linear infinite;
}

.trophy-ring.ring-two {
  width: 125px;
  height: 155px;
  animation: employee-trophy-ring-two 11s linear infinite;
}

@keyframes employee-trophy-float {
  0%, 100% { transform: translateX(-50%) translateY(0) rotateY(-10deg); }
  50% { transform: translateX(-50%) translateY(-10px) rotateY(14deg); }
}

@keyframes employee-trophy-ring {
  from { transform: translate(-50%, -50%) rotateX(65deg) rotateZ(0); }
  to { transform: translate(-50%, -50%) rotateX(65deg) rotateZ(360deg); }
}

@keyframes employee-trophy-ring-two {
  from { transform: translate(-50%, -50%) rotateY(68deg) rotateZ(0); }
  to { transform: translate(-50%, -50%) rotateY(68deg) rotateZ(360deg); }
}

.employee-report-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
}

.employee-report-kpis article {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.7rem;
  overflow: hidden;
  padding: 0.95rem;
  border: 1px solid var(--os-border);
  border-radius: 17px;
  background: var(--os-surface);
  box-shadow: var(--os-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.employee-report-kpis article:hover {
  z-index: 2;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.11);
  transform: translateY(-4px) rotateX(2deg);
}

.employee-report-kpis article > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--report-color);
  font-size: 0.63rem;
  font-weight: 850;
  background: var(--report-soft);
}

.employee-report-kpis .is-indigo { --report-color: #4f46e5; --report-soft: rgba(99, 102, 241, .12); }
.employee-report-kpis .is-gold { --report-color: #d97706; --report-soft: rgba(245, 158, 11, .13); }
.employee-report-kpis .is-green { --report-color: #059669; --report-soft: rgba(16, 185, 129, .12); }
.employee-report-kpis .is-rose { --report-color: #e11d48; --report-soft: rgba(244, 63, 94, .1); }
.employee-report-kpis .is-cyan { --report-color: #0891b2; --report-soft: rgba(6, 182, 212, .11); }

.employee-report-kpis small,
.employee-report-kpis p {
  display: block;
  overflow: hidden;
  color: var(--os-muted);
  font-size: 0.48rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-report-kpis strong {
  display: block;
  overflow: hidden;
  margin: 0.16rem 0 0;
  color: var(--os-text);
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-report-kpis p {
  margin: 0.13rem 0 0;
}

.employee-report-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.employee-report-card {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--os-border);
  border-radius: 20px;
  background: var(--os-surface);
  box-shadow: var(--os-shadow);
}

.employee-ranking-card { grid-column: span 7; }
.employee-podium-card { grid-column: span 5; }
.employee-distribution-card { grid-column: span 5; }
.employee-method-card { grid-column: span 7; }

.employee-report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.employee-report-card-head span,
.employee-report-table-head > div:first-child > span {
  display: block;
  margin-bottom: 0.18rem;
  color: #6366f1;
  font-size: 0.47rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.employee-report-card-head h3,
.employee-report-table-head h3 {
  margin: 0;
  color: var(--os-text);
  font-size: 0.83rem;
  font-weight: 800;
}

.employee-report-card-head > b {
  padding: 0.28rem 0.45rem;
  border-radius: 7px;
  color: var(--os-muted);
  font-size: 0.47rem;
  background: var(--os-surface-2);
}

.employee-report-score-bars {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: center;
  gap: 0.68rem;
}

.employee-score-row {
  display: grid;
  grid-template-columns: 24px 30px minmax(100px, .9fr) minmax(110px, 1.4fr) 28px;
  gap: 0.55rem;
  align-items: center;
}

.employee-score-rank {
  color: #818cf8;
  font-size: 0.47rem;
  font-weight: 750;
}

.employee-score-avatar,
.employee-report-table-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}

.employee-report-avatar-btn {
  display: inline-grid;
  place-items: center;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: inherit;
  line-height: 0;
}

.employee-report-avatar-btn:hover .employee-score-avatar,
.employee-report-avatar-btn:hover .employee-report-table-avatar,
.employee-report-avatar-btn:hover .employee-podium-avatar {
  outline: 2px solid color-mix(in srgb, var(--os-primary) 55%, transparent);
  outline-offset: 2px;
}

.employee-report-avatar-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--os-primary) 65%, transparent);
  outline-offset: 3px;
}

.employee-report-avatar-btn .employee-score-avatar,
.employee-report-avatar-btn .employee-report-table-avatar,
.employee-report-avatar-btn .employee-podium-avatar,
.employee-report-avatar-btn .employee-report-avatar-fallback {
  display: block;
}

.employee-podium .employee-report-avatar-btn {
  border-radius: 50%;
}

.employee-report-avatar-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.45rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.employee-score-name {
  min-width: 0;
}

.employee-score-name strong,
.employee-score-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-score-name strong {
  color: var(--os-text);
  font-size: 0.55rem;
}

.employee-score-name small {
  margin-top: 0.1rem;
  color: var(--os-muted);
  font-size: 0.43rem;
}

.employee-score-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--os-surface-muted);
}

.employee-score-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transform-origin: left;
  animation: employee-score-grow 1s ease both;
}

.employee-score-track i.is-excellent { background: linear-gradient(90deg, #10b981, #34d399); }
.employee-score-track i.is-strong { background: linear-gradient(90deg, #2563eb, #6366f1); }
.employee-score-track i.is-steady { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.employee-score-track i.is-developing { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.employee-score-track i.is-support { background: linear-gradient(90deg, #f43f5e, #fb7185); }

.employee-score-row > b {
  color: var(--os-text);
  font-size: 0.62rem;
  text-align: right;
}

@keyframes employee-score-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.employee-podium {
  display: flex;
  min-height: 260px;
  align-items: flex-end;
  justify-content: center;
  gap: 0.6rem;
  padding-top: 1.5rem;
}

.employee-podium article {
  display: flex;
  width: 31%;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.employee-podium article > div {
  position: relative;
}

.employee-podium-avatar {
  width: 54px;
  height: 54px;
  border: 3px solid var(--podium-color);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 24px var(--podium-shadow);
}

.employee-podium article > div > i {
  position: absolute;
  right: -2px;
  bottom: 1px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid var(--os-surface);
  border-radius: 50%;
  color: #fff;
  font-size: 0.42rem;
  font-style: normal;
  font-weight: 850;
  background: var(--podium-color);
}

.employee-podium .is-place-1 { --podium-color: #f59e0b; --podium-shadow: rgba(245, 158, 11, .28); }
.employee-podium .is-place-2 { --podium-color: #94a3b8; --podium-shadow: rgba(100, 116, 139, .22); }
.employee-podium .is-place-3 { --podium-color: #d97706; --podium-shadow: rgba(180, 83, 9, .22); }

.employee-podium article > strong {
  width: 100%;
  overflow: hidden;
  margin-top: 0.5rem;
  color: var(--os-text);
  font-size: 0.53rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-podium article > small {
  width: 100%;
  overflow: hidden;
  color: var(--os-muted);
  font-size: 0.42rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-podium article > b {
  margin: 0.35rem 0;
  color: var(--podium-color);
  font-size: 0.72rem;
}

.employee-podium article > span {
  display: grid;
  width: 100%;
  height: var(--podium-height);
  place-items: center;
  border-radius: 10px 10px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  font-weight: 850;
  background: linear-gradient(180deg, color-mix(in srgb, var(--podium-color) 75%, white), var(--podium-color));
  box-shadow: inset 0 1px rgba(255, 255, 255, .28);
}

.employee-distribution-layout {
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
}

.employee-distribution-pie {
  position: relative;
  display: grid;
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    #10b981 0 var(--excellent),
    #3b82f6 var(--excellent) var(--strong),
    #8b5cf6 var(--strong) var(--steady),
    #f59e0b var(--steady) var(--developing),
    #f43f5e var(--developing) 360deg
  );
  box-shadow: 0 18px 38px rgba(99, 102, 241, .16);
  animation: employee-pie-enter .8s ease both;
}

.employee-distribution-pie::before {
  position: absolute;
  inset: 21px;
  border-radius: 50%;
  background: var(--os-surface);
  content: "";
}

.employee-distribution-pie > span {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.employee-distribution-pie strong {
  color: var(--os-text);
  font-size: 1.35rem;
}

.employee-distribution-pie small {
  color: var(--os-muted);
  font-size: 0.48rem;
}

@keyframes employee-pie-enter {
  from { opacity: 0; transform: rotate(-45deg) scale(.75); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

.employee-distribution-legend {
  min-width: 135px;
}

.employee-distribution-legend p {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 0.45rem;
  align-items: center;
  margin: 0.5rem 0;
  color: var(--os-muted);
  font-size: 0.5rem;
}

.employee-distribution-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.employee-distribution-legend i.is-excellent { background: #10b981; }
.employee-distribution-legend i.is-strong { background: #3b82f6; }
.employee-distribution-legend i.is-steady { background: #8b5cf6; }
.employee-distribution-legend i.is-developing { background: #f59e0b; }
.employee-distribution-legend i.is-support { background: #f43f5e; }
.employee-distribution-legend strong { color: var(--os-text); }

.employee-method-list {
  display: flex;
  min-height: 185px;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.employee-method-list > div {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(120px, 1.5fr) 42px;
  gap: 0.65rem;
  align-items: center;
}

.employee-method-list span,
.employee-method-list strong {
  font-size: 0.53rem;
}

.employee-method-list span { color: var(--os-text); font-weight: 650; }
.employee-method-list strong { color: var(--os-muted); text-align: right; }

.employee-method-list b {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--os-surface-muted);
}

.employee-method-list b i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.employee-report-note {
  margin: 0.75rem 0 0;
  padding: 0.65rem;
  border-radius: 9px;
  color: var(--os-muted);
  font-size: 0.48rem;
  line-height: 1.55;
  background: var(--os-surface-2);
}

.employee-report-table-card {
  padding-bottom: 0.35rem;
}

.employee-report-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.employee-report-table-head small {
  color: var(--os-muted);
  font-size: 0.47rem;
}

.employee-report-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.employee-report-actions label {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.55rem;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  color: var(--os-muted);
  background: var(--os-input);
}

.employee-report-actions input,
.employee-report-actions select,
.employee-report-actions button {
  border: 1px solid var(--os-border);
  outline: 0;
  color: var(--os-text);
  font: inherit;
  font-size: 0.52rem;
  background: var(--os-input);
}

.employee-report-actions input {
  width: 150px;
  border: 0;
  background: transparent;
}

.employee-report-actions select,
.employee-report-actions button {
  height: 34px;
  padding: 0 0.6rem;
  border-radius: 9px;
}

.employee-report-actions button {
  color: #fff;
  font-weight: 750;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  cursor: pointer;
}

.employee-report-table-wrap {
  overflow-x: auto;
}

.employee-report-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.employee-report-table th {
  padding: 0.6rem 0.65rem;
  border-bottom: 1px solid var(--os-border-strong);
  color: var(--os-muted);
  font-size: 0.44rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.employee-report-table td {
  padding: 0.65rem;
  border-bottom: 1px solid var(--os-border);
  color: var(--os-muted);
  font-size: 0.51rem;
}

.employee-report-table tbody tr:hover {
  background: var(--os-surface-2);
}

.employee-report-person {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.employee-report-person > span:last-child {
  min-width: 0;
}

.employee-report-person strong,
.employee-report-person small,
.employee-report-table td > strong,
.employee-report-table td > small {
  display: block;
}

.employee-report-person strong,
.employee-report-table td > strong {
  color: var(--os-text);
  font-size: 0.53rem;
}

.employee-report-person small,
.employee-report-table td > small {
  margin-top: 0.1rem;
  color: var(--os-muted);
  font-size: 0.43rem;
}

.employee-report-score-ring {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) var(--score), var(--os-surface-muted) 0);
}

.employee-report-score-ring::before {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--os-surface);
  content: "";
}

.employee-report-score-ring strong {
  position: relative;
  color: var(--os-text);
  font-size: 0.48rem;
}

.employee-report-score-ring.is-excellent { --ring-color: #10b981; }
.employee-report-score-ring.is-strong { --ring-color: #3b82f6; }
.employee-report-score-ring.is-steady { --ring-color: #8b5cf6; }
.employee-report-score-ring.is-developing { --ring-color: #f59e0b; }
.employee-report-score-ring.is-support { --ring-color: #f43f5e; }

.employee-performance-level {
  display: inline-flex;
  padding: 0.24rem 0.43rem;
  border-radius: 999px;
  font-size: 0.45rem;
  font-weight: 750;
}

.employee-performance-level.is-excellent { color: #047857; background: rgba(16, 185, 129, .12); }
.employee-performance-level.is-strong { color: #1d4ed8; background: rgba(59, 130, 246, .12); }
.employee-performance-level.is-steady { color: #7c3aed; background: rgba(139, 92, 246, .12); }
.employee-performance-level.is-developing { color: #b45309; background: rgba(245, 158, 11, .13); }
.employee-performance-level.is-support { color: #be123c; background: rgba(244, 63, 94, .11); }

.employee-report-view {
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(99, 102, 241, .22);
  border-radius: 7px;
  color: #4f46e5;
  font: inherit;
  font-size: 0.46rem;
  font-weight: 750;
  background: rgba(99, 102, 241, .08);
  cursor: pointer;
}

.employee-report-empty {
  padding: 2rem !important;
  color: var(--os-muted);
  text-align: center;
}

.employee-report-loading {
  display: grid;
  min-height: 520px;
  place-content: center;
  place-items: center;
  color: var(--os-muted);
}

.employee-report-loading span {
  width: 68px;
  height: 68px;
  border: 2px solid rgba(99, 102, 241, .16);
  border-top-color: #6366f1;
  border-radius: 22px;
  animation: employee-report-spin 1s linear infinite;
}

.employee-report-loading p {
  margin-top: 0.8rem;
  font-size: 0.6rem;
}

@keyframes employee-report-spin { to { transform: rotate(360deg); } }

html.theme-dark .employee-report-hero {
  background:
    radial-gradient(circle at 82% 8%, rgba(251, 191, 36, .18), transparent 25%),
    linear-gradient(125deg, #101b3d 0%, #312e81 48%, #581c87 100%);
}

html.theme-dark .employee-report-kpis article:hover {
  box-shadow: 0 16px 34px rgba(0, 0, 0, .3);
}

html.theme-dark .employee-performance-level.is-excellent { color: #6ee7b7; }
html.theme-dark .employee-performance-level.is-strong { color: #93c5fd; }
html.theme-dark .employee-performance-level.is-steady { color: #c4b5fd; }
html.theme-dark .employee-performance-level.is-developing { color: #fcd34d; }
html.theme-dark .employee-performance-level.is-support { color: #fda4af; }

@media (prefers-reduced-motion: reduce) {
  .employee-trophy-cup,
  .trophy-ring,
  .employee-score-track i,
  .employee-distribution-pie {
    animation: none !important;
  }
}

@media (max-width: 1250px) {
  .employee-report-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .employee-ranking-card,
  .employee-podium-card,
  .employee-distribution-card,
  .employee-method-card {
    grid-column: span 6;
  }
}

@media (max-width: 900px) {
  .employee-report-trophy {
    margin-right: -50px;
    transform: scale(.82);
  }

  .employee-ranking-card,
  .employee-podium-card,
  .employee-distribution-card,
  .employee-method-card {
    grid-column: span 12;
  }

  .employee-report-table-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .employee-report-hero {
    min-height: 240px;
    padding: 1.4rem;
  }

  .employee-report-trophy {
    position: absolute;
    right: -95px;
    opacity: .42;
  }

  .employee-report-hero-copy {
    z-index: 3;
    max-width: 92%;
  }

  .employee-report-kpis {
    grid-template-columns: 1fr;
  }

  .employee-report-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .employee-report-actions label,
  .employee-report-actions input,
  .employee-report-actions select,
  .employee-report-actions button {
    width: 100%;
  }

  .employee-distribution-layout {
    flex-direction: column;
  }
}

@media print {
  .os-sidebar,
  .os-topbar,
  .os-footer,
  .employee-report-actions,
  .employee-report-hero {
    display: none !important;
  }

  .os-shell,
  .os-main,
  .os-content {
    display: block !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .employee-report-card,
  .employee-report-kpis article {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* Five-second message notifications */
.channel-notification-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 220;
  display: flex;
  width: min(360px, calc(100vw - 32px));
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.channel-message-notification {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 0.72rem;
  overflow: hidden;
  padding: 0.82rem 0.85rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  color: var(--os-text);
  text-align: left;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(18px);
  cursor: pointer;
  pointer-events: auto;
  animation: channel-notification-in 0.24s ease both;
}

.channel-message-notification.is-leaving {
  animation: channel-notification-out 0.18s ease both;
}

.channel-notification-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 850;
  background: linear-gradient(145deg, #611f69, #1264a3);
}

.channel-notification-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.channel-notification-copy small {
  margin-bottom: 0.08rem;
  color: #007a5a;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.channel-notification-copy strong,
.channel-notification-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-notification-copy strong {
  color: var(--os-text);
  font-size: 0.7rem;
}

.channel-notification-copy > span {
  margin-top: 0.15rem;
  color: var(--os-muted);
  font-size: 0.6rem;
}

.channel-notification-close {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  color: var(--os-muted);
  font-size: 0.8rem;
}

.channel-notification-close:hover {
  color: var(--os-text);
  background: var(--os-surface-muted);
}

.channel-notification-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #611f69, #1264a3);
  transform-origin: left;
  animation: channel-notification-progress 5s linear forwards;
}

html.theme-dark .channel-message-notification {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

@keyframes channel-notification-in {
  from {
    opacity: 0;
    transform: translate3d(28px, 10px, 0) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes channel-notification-out {
  to {
    opacity: 0;
    transform: translate3d(24px, 0, 0) scale(0.97);
  }
}

@keyframes channel-notification-progress {
  to {
    transform: scaleX(0);
  }
}

@media (max-width: 650px) {
  .channel-notification-stack {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }
}

.share-person.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.share-person.is-disabled:hover {
  border-color: var(--os-border);
  background: var(--os-input);
}

.channel-dm-item.is-unavailable {
  opacity: 0.58;
  cursor: not-allowed;
}

.channel-dm-item.is-unavailable:hover {
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
}

.channel-account-warning {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 50%;
  color: #fbbf24;
  font-size: 0.5rem;
  font-weight: 850;
}

/* Premium authentication experience */
.login-html,
.login-html body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.premium-login-shell {
  display: grid;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  grid-template-columns: minmax(0, 1.08fr) minmax(460px, 0.92fr);
  background: #f7f9fd;
  overflow: hidden;
}

.login-showcase {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(7, 20, 56, 0.12), rgba(10, 24, 68, 0.52)),
    linear-gradient(140deg, #12358f 0%, #245dde 48%, #5b4fe9 100%);
}

.login-showcase::before {
  position: absolute;
  inset: 0;
  content: '';
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.login-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.login-orb-one {
  top: -170px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.3), rgba(125, 211, 252, 0.06) 62%, transparent 70%);
}

.login-orb-two {
  bottom: -220px;
  left: -130px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(129, 140, 248, 0.12);
}

.login-3d-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  perspective: 900px;
  pointer-events: none;
}

.login-3d-cube {
  position: absolute;
  top: 12%;
  right: 8%;
  width: 88px;
  height: 88px;
  transform-style: preserve-3d;
  animation: login-cube-float 14s ease-in-out infinite;
}

.cube-face {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.23);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(147, 197, 253, 0.035));
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(5px);
}

.cube-front {
  transform: translateZ(44px);
}

.cube-back {
  transform: rotateY(180deg) translateZ(44px);
}

.cube-right {
  transform: rotateY(90deg) translateZ(44px);
}

.cube-left {
  transform: rotateY(-90deg) translateZ(44px);
}

.cube-top {
  transform: rotateX(90deg) translateZ(44px);
}

.cube-bottom {
  transform: rotateX(-90deg) translateZ(44px);
}

.login-3d-ring {
  position: absolute;
  right: 10%;
  bottom: 17%;
  width: 150px;
  height: 150px;
  border: 22px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(191, 219, 254, 0.25);
  border-right-color: rgba(165, 180, 252, 0.18);
  border-radius: 50%;
  box-shadow:
    inset 8px 8px 22px rgba(255, 255, 255, 0.07),
    14px 18px 36px rgba(8, 23, 67, 0.16);
  transform: rotateX(65deg) rotateZ(20deg);
  animation: login-ring-float 10s ease-in-out infinite;
}

.login-3d-glass-card {
  position: absolute;
  width: 110px;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.025));
  box-shadow: 18px 22px 40px rgba(8, 23, 67, 0.14);
  backdrop-filter: blur(8px);
}

.login-3d-glass-card::before,
.login-3d-glass-card::after {
  position: absolute;
  left: 16px;
  height: 5px;
  border-radius: 999px;
  content: '';
  background: rgba(255, 255, 255, 0.18);
}

.login-3d-glass-card::before {
  top: 20px;
  width: 48px;
}

.login-3d-glass-card::after {
  top: 34px;
  width: 72px;
}

.login-3d-glass-card.card-one {
  top: auto;
  bottom: 7%;
  left: -54px;
  transform: rotateY(30deg) rotateZ(-12deg);
  animation: login-card-one-float 12s ease-in-out infinite;
}

.login-3d-glass-card.card-two {
  right: -18px;
  bottom: 39%;
  transform: rotateY(-32deg) rotateZ(13deg) scale(0.82);
  animation: login-card-two-float 11s ease-in-out infinite;
}

.login-3d-sphere {
  position: absolute;
  top: 27%;
  right: 30%;
  left: auto;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.55), rgba(147, 197, 253, 0.12) 33%, rgba(49, 46, 129, 0.12) 72%);
  box-shadow:
    inset -10px -12px 20px rgba(30, 58, 138, 0.22),
    14px 18px 28px rgba(8, 23, 67, 0.16);
  animation: login-sphere-float 9s ease-in-out infinite;
}

@keyframes login-cube-float {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotateX(-18deg) rotateY(28deg) rotateZ(5deg);
  }
  50% {
    transform: translate3d(-20px, 28px, 24px) rotateX(24deg) rotateY(148deg) rotateZ(-8deg);
  }
}

@keyframes login-ring-float {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotateX(65deg) rotateZ(20deg);
  }
  50% {
    transform: translate3d(-28px, -18px, 35px) rotateX(55deg) rotateZ(155deg);
  }
}

@keyframes login-card-one-float {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotateY(30deg) rotateZ(-12deg);
  }
  50% {
    transform: translate3d(26px, -22px, 26px) rotateY(12deg) rotateZ(-4deg);
  }
}

@keyframes login-card-two-float {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotateY(-32deg) rotateZ(13deg) scale(0.82);
  }
  50% {
    transform: translate3d(-22px, 18px, 32px) rotateY(-12deg) rotateZ(4deg) scale(0.9);
  }
}

@keyframes login-sphere-float {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(24px, -18px, 30px) scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-3d-cube,
  .login-3d-ring,
  .login-3d-glass-card,
  .login-3d-sphere {
    animation: none !important;
  }
}

.showcase-content {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(100%, 780px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  flex-direction: column;
  padding: clamp(2rem, 4.5vw, 4.5rem);
}

.showcase-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.showcase-logo {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 35px rgba(6, 18, 52, 0.22);
}

.showcase-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.showcase-brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.showcase-brand strong {
  font-size: 1.02rem;
  font-weight: 800;
}

.showcase-brand small {
  margin-top: 0.1rem;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.showcase-copy {
  max-width: 660px;
  margin: auto 0 3.2rem;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.3rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.showcase-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86efac;
  box-shadow: 0 0 0 5px rgba(134, 239, 172, 0.12);
}

.showcase-copy h1 {
  margin: 0;
  font-size: clamp(2.7rem, 5.3vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.showcase-copy p {
  max-width: 570px;
  margin: 1.5rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.95rem, 1.3vw, 1.12rem);
  line-height: 1.75;
}

.showcase-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.68rem;
}

.showcase-security {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.login-auth-side {
  display: grid;
  height: 100%;
  min-height: 0;
  place-items: center;
  padding: clamp(2rem, 5vw, 5rem);
  background:
    radial-gradient(560px 380px at 100% 0%, rgba(99, 102, 241, 0.09), transparent 65%),
    #f8fafc;
}

.premium-login-panel {
  width: min(100%, 470px);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2.4rem;
}

.login-mobile-brand img {
  width: 42px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--os-border);
  border-radius: 13px;
  background: #fff;
}

.login-mobile-brand span {
  display: flex;
  flex-direction: column;
}

.login-mobile-brand strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.login-mobile-brand small {
  color: var(--os-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-eyebrow {
  display: block;
  margin-bottom: 0.8rem;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.premium-login-panel .login-title {
  margin-bottom: 0.7rem;
  color: #0f172a;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.premium-login-panel .login-sub {
  margin-bottom: 2rem;
  color: #64748b;
  font-size: 0.93rem;
  line-height: 1.65;
}

.premium-login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.premium-login-form .login-field > label {
  margin: 0 0 0.5rem;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 750;
}

.login-control {
  position: relative;
}

.login-control > svg {
  position: absolute;
  top: 50%;
  left: 1rem;
  z-index: 2;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.premium-login-form .login-control input,
.premium-login-form .login-control select {
  height: 52px;
  margin: 0;
  padding: 0 3rem 0 3rem;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  font-size: 0.9rem;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.025);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.premium-login-form .login-control input:hover,
.premium-login-form .login-control select:hover {
  border-color: #c5d0e0;
  background: #fff;
}

.premium-login-form .login-control input:focus,
.premium-login-form .login-control select:focus {
  border-color: #60a5fa;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11), 0 8px 20px rgba(15, 23, 42, 0.04);
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transform: translateY(-50%);
}

.login-password-toggle:hover,
.login-password-toggle.is-visible {
  background: #eff6ff;
  color: #2563eb;
}

.login-password-toggle svg {
  width: 18px;
  height: 18px;
}

.premium-submit {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 0.45rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d4ed8, #4f46e5 65%, #6366f1);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
  font-weight: 750;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.premium-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

.login-help {
  margin: 1.5rem 0 0;
  color: #94a3b8;
  font-size: 0.75rem;
  text-align: center;
}

.login-success-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 1.5rem;
  place-items: center;
  border-radius: 18px;
  background: #dcfce7;
  color: #15803d;
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.14);
}

html.theme-dark .login-auth-side {
  background:
    radial-gradient(560px 380px at 100% 0%, rgba(79, 70, 229, 0.14), transparent 65%),
    #0b1120;
}

html.theme-dark .premium-login-panel .login-title {
  color: #f8fafc;
}

html.theme-dark .premium-login-panel .login-sub,
html.theme-dark .login-help {
  color: #94a3b8;
}

html.theme-dark .premium-login-form .login-field > label {
  color: #cbd5e1;
}

html.theme-dark .premium-login-form .login-control input,
html.theme-dark .premium-login-form .login-control select {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
}

html.theme-dark .premium-login-form .login-control input:hover,
html.theme-dark .premium-login-form .login-control select:hover,
html.theme-dark .premium-login-form .login-control input:focus,
html.theme-dark .premium-login-form .login-control select:focus {
  border-color: #475569;
  background: #111827;
}

html.theme-dark .login-password-toggle:hover,
html.theme-dark .login-password-toggle.is-visible {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

@media (max-width: 980px) {
  .premium-login-shell {
    grid-template-columns: 1fr;
  }

  .login-showcase {
    display: none;
  }

  .login-auth-side {
    padding: 2rem;
  }

  .login-mobile-brand {
    display: flex;
  }
}

@media (max-width: 520px) {
  .login-auth-side {
    align-items: start;
    padding: 1.5rem 1.15rem;
  }

  .premium-login-panel {
    padding-top: 1rem;
  }

  .premium-login-panel .login-title {
    font-size: 1.75rem;
  }

  .premium-login-panel .login-sub {
    margin-bottom: 1.5rem;
  }
}

/* Employee personal dashboard */
.employee-dashboard-root {
  min-height: 400px;
}

.employee-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.employee-dashboard-hero {
  position: relative;
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  overflow: hidden;
  padding: 1.6rem 1.8rem;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(300px 180px at 88% 20%, rgba(255, 255, 255, 0.2), transparent 68%),
    linear-gradient(130deg, #1d4ed8 0%, #4f46e5 58%, #7c3aed 100%);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.18);
}

.employee-dashboard-hero::after {
  position: absolute;
  right: -40px;
  bottom: -85px;
  width: 260px;
  height: 260px;
  border: 38px solid rgba(255, 255, 255, 0.065);
  border-radius: 50%;
  content: '';
}

.employee-hero-profile {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.employee-hero-profile > img,
.employee-hero-profile > span {
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
}

.employee-hero-profile small,
.employee-hero-date small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.employee-hero-profile h2 {
  margin: 0.25rem 0 0.2rem;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.employee-hero-profile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.employee-hero-date {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.employee-hero-date strong {
  margin-top: 0.28rem;
  font-size: 0.8rem;
  font-weight: 750;
}

.employee-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.employee-kpi {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 1px solid var(--os-border);
  border-radius: 19px;
  background: var(--os-surface);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.employee-kpi > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 800;
}

.employee-kpi.is-blue > span {
  color: #2563eb;
  background: #dbeafe;
}

.employee-kpi.is-purple > span {
  color: #7c3aed;
  background: #ede9fe;
}

.employee-kpi.is-cyan > span {
  color: #0284c7;
  background: #e0f2fe;
}

.employee-kpi.is-green > span {
  color: #059669;
  background: #d1fae5;
}

.employee-kpi div {
  min-width: 0;
}

.employee-kpi small,
.employee-card-heading small {
  display: block;
  color: var(--os-muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.employee-kpi strong {
  display: block;
  margin-top: 0.16rem;
  color: var(--os-text);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.employee-kpi p {
  margin: 0.1rem 0 0;
  overflow: hidden;
  color: var(--os-muted);
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 1rem;
}

.employee-dashboard-card {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--os-border);
  border-radius: 21px;
  background: var(--os-surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.045);
}

.employee-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.employee-card-heading h3 {
  margin: 0.18rem 0 0;
  color: var(--os-text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.employee-card-heading > span,
.employee-card-heading > strong {
  color: var(--os-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.employee-private-badge {
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  color: #4f46e5 !important;
  background: #eef2ff;
}

.employee-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.employee-info-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
  background: var(--os-surface-soft);
}

.employee-info-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 10px;
  color: #4f46e5;
  background: #eef2ff;
  font-size: 0.72rem;
  font-weight: 800;
}

.employee-info-row > span:last-child {
  min-width: 0;
}

.employee-info-row small,
.employee-address small {
  display: block;
  color: var(--os-muted);
  font-size: 0.61rem;
  font-weight: 650;
}

.employee-info-row strong {
  display: block;
  margin-top: 0.14rem;
  overflow: hidden;
  color: var(--os-text);
  font-size: 0.75rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-address {
  margin-top: 0.7rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: var(--os-surface-soft);
}

.employee-address p {
  margin: 0.2rem 0 0;
  color: var(--os-text);
  font-size: 0.75rem;
  line-height: 1.5;
}

.employee-pie-layout {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: space-around;
  gap: 1.2rem;
}

.employee-pie {
  position: relative;
  display: grid;
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#22c55e 0 var(--done), #8b5cf6 var(--done) var(--progress), #dbe4f0 var(--progress) 360deg);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.employee-pie::before {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  content: '';
  background: var(--os-surface);
  box-shadow: inset 0 0 0 1px var(--os-border);
}

.employee-pie > span {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.employee-pie strong {
  color: var(--os-text);
  font-size: 1.45rem;
  font-weight: 800;
}

.employee-pie small {
  color: var(--os-muted);
  font-size: 0.65rem;
}

.employee-chart-legend {
  min-width: 130px;
}

.employee-chart-legend p {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem 0;
  color: var(--os-muted);
  font-size: 0.7rem;
}

.employee-chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.employee-chart-legend i.is-done {
  background: #22c55e;
}

.employee-chart-legend i.is-progress {
  background: #8b5cf6;
}

.employee-chart-legend i.is-todo {
  background: #dbe4f0;
}

.employee-chart-legend strong {
  color: var(--os-text);
  font-size: 0.72rem;
}

.employee-bars {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.employee-bar-row {
  display: grid;
  grid-template-columns: 105px 1fr 28px;
  align-items: center;
  gap: 0.7rem;
}

.employee-bar-row > span {
  color: var(--os-muted);
  font-size: 0.68rem;
}

.employee-bar-row > div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--os-surface-soft);
}

.employee-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.18);
}

.employee-bar-row strong {
  color: var(--os-text);
  font-size: 0.72rem;
  text-align: right;
}

.employee-line-svg {
  display: block;
  width: 100%;
  min-height: 190px;
  overflow: visible;
}

.employee-chart-axis {
  stroke: var(--os-border);
  stroke-width: 1;
}

.employee-chart-point {
  fill: var(--os-surface);
  stroke: #6366f1;
  stroke-width: 3;
}

.employee-chart-label {
  fill: var(--os-muted);
  font-size: 10px;
  font-weight: 650;
}

.employee-infinity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.employee-infinity-list article {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: var(--os-surface-soft);
}

.employee-infinity-list article > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: #4f46e5;
  background: #eef2ff;
  font-size: 0.65rem;
  font-weight: 800;
}

.employee-infinity-list article > div {
  min-width: 0;
}

.employee-infinity-list strong,
.employee-infinity-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-infinity-list strong {
  color: var(--os-text);
  font-size: 0.75rem;
  font-weight: 750;
}

.employee-infinity-list small {
  margin-top: 0.18rem;
  color: var(--os-muted);
  font-size: 0.64rem;
}

.employee-infinity-list article > i {
  padding: 0.27rem 0.45rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 750;
  text-transform: capitalize;
}

.employee-infinity-list i.is-completed {
  color: #15803d;
  background: #dcfce7;
}

.employee-infinity-list i.is-progress {
  color: #6d28d9;
  background: #ede9fe;
}

.employee-infinity-list i.is-todo {
  color: #475569;
  background: #e2e8f0;
}

.employee-dashboard-empty,
.employee-table-empty {
  padding: 1.5rem !important;
  color: var(--os-muted) !important;
  font-size: 0.75rem;
  text-align: center !important;
}

.employee-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--os-border);
  border-radius: 15px;
}

.employee-activity-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.employee-activity-table th {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--os-border);
  color: var(--os-muted);
  background: var(--os-surface-soft);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.employee-activity-table td {
  max-width: 340px;
  padding: 0.78rem 0.85rem;
  border-bottom: 1px solid var(--os-border);
  color: var(--os-muted);
  font-size: 0.7rem;
}

.employee-activity-table tr:last-child td {
  border-bottom: 0;
}

.employee-activity-table td strong {
  color: var(--os-text);
  font-size: 0.72rem;
}

.employee-type-badge {
  display: inline-block;
  padding: 0.28rem 0.48rem;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 0.6rem;
  font-weight: 750;
  text-transform: capitalize;
}

.employee-dashboard-loading {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.employee-dashboard-loading span {
  height: 180px;
  border-radius: 22px;
  background: linear-gradient(90deg, var(--os-surface-soft), var(--os-surface), var(--os-surface-soft));
  background-size: 200% 100%;
  animation: employee-dashboard-shimmer 1.4s linear infinite;
}

@keyframes employee-dashboard-shimmer {
  to {
    background-position: -200% 0;
  }
}

html.theme-dark .employee-kpi.is-blue > span,
html.theme-dark .employee-info-icon,
html.theme-dark .employee-infinity-list article > span {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.2);
}

html.theme-dark .employee-kpi.is-purple > span {
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.2);
}

html.theme-dark .employee-kpi.is-cyan > span {
  color: #7dd3fc;
  background: rgba(2, 132, 199, 0.2);
}

html.theme-dark .employee-kpi.is-green > span {
  color: #6ee7b7;
  background: rgba(5, 150, 105, 0.2);
}

html.theme-dark .employee-private-badge {
  color: #c4b5fd !important;
  background: rgba(124, 58, 237, 0.2);
}

html.theme-dark .employee-infinity-list i.is-completed {
  color: #86efac;
  background: rgba(22, 163, 74, 0.2);
}

html.theme-dark .employee-infinity-list i.is-progress {
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.2);
}

html.theme-dark .employee-infinity-list i.is-todo {
  color: #cbd5e1;
  background: rgba(71, 85, 105, 0.45);
}

html.theme-dark .employee-type-badge {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.2);
}

@media (max-width: 1150px) {
  .employee-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .employee-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .employee-dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.25rem;
  }

  .employee-hero-date {
    align-items: flex-start;
  }

  .employee-kpi-grid,
  .employee-info-grid,
  .employee-infinity-list,
  .employee-dashboard-loading {
    grid-template-columns: 1fr;
  }

  .employee-pie-layout {
    flex-direction: column;
  }

  .employee-bar-row {
    grid-template-columns: 90px 1fr 24px;
  }
}

/* Clockly time tracker */
.clockify-original-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.clockify-view-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--os-border);
  border-radius: 15px;
  background: var(--os-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.clockify-view-tabs button {
  padding: 0.62rem 0.85rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--os-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.clockify-view-tabs button:hover {
  color: var(--os-text);
  background: var(--os-surface-2);
}

.clockify-view-tabs button.is-active {
  color: #fff;
  background: #03a9dc;
  box-shadow: 0 7px 16px rgba(3, 169, 220, 0.22);
}

.clockify-week-total {
  margin-left: auto;
  padding-right: 0.75rem;
  color: var(--os-muted);
  font-size: 0.7rem;
}

.clockify-week-total strong {
  margin-left: 0.35rem;
  color: var(--os-text);
  font-size: 0.8rem;
}

.clockify-original-shell.is-report-only .clockify-view-tabs > strong {
  padding: 0.62rem 0.85rem;
  font-size: 0.8rem;
}

.clockify-original-shell.is-report-only .clockify-entry {
  grid-template-columns: minmax(240px, 1fr) 40px 115px 90px;
}

.clockify-view {
  display: none;
}

.clockify-view.is-active {
  display: block;
}

.clockify-tracker {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(125px, 0.32fr) minmax(110px, 0.25fr) 98px 82px 40px;
  min-height: 62px;
  align-items: center;
  overflow: visible;
  border: 1px solid var(--os-border);
  border-radius: 6px;
  background: var(--os-surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.clockify-description-wrap,
.clockify-project-control,
.clockify-tag-control {
  height: 100%;
  border-right: 1px solid var(--os-border);
}

.clockify-description-wrap input,
.clockify-project-control input,
.clockify-tag-control input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--os-text);
  font: inherit;
  font-size: 0.78rem;
}

.clockify-description-wrap input {
  padding: 0 1rem;
  font-size: 0.85rem;
}

.clockify-description-wrap input::placeholder,
.clockify-project-control input::placeholder,
.clockify-tag-control input::placeholder {
  color: #94a3b8;
}

.clockify-project-control,
.clockify-tag-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0 0.65rem;
}

.clockify-project-picker-btn {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(3, 169, 220, 0.1);
  color: #03a9dc;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.clockify-project-picker-btn:hover {
  color: #fff;
  background: #03a9dc;
}

.clockify-tag-control > span {
  color: var(--os-muted);
}

.clockify-project-control input {
  color: #0284c7;
  font-weight: 700;
}

.clockify-task-picker {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 120;
  width: min(350px, 82vw);
  overflow: hidden;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.clockify-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--os-border);
  background: var(--os-surface-2);
}

.clockify-picker-head strong {
  color: var(--os-text);
  font-size: 0.72rem;
}

.clockify-picker-head span {
  color: var(--os-muted);
  font-size: 0.61rem;
}

.clockify-picker-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.35rem;
}

.clockify-picker-list button {
  display: grid;
  width: 100%;
  grid-template-columns: 10px 1fr;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.clockify-picker-list button:hover {
  background: var(--os-surface-2);
}

.clockify-picker-color {
  width: 9px;
  height: 34px;
  border-radius: 999px;
}

.clockify-picker-list button > span:last-child {
  min-width: 0;
}

.clockify-picker-list strong,
.clockify-picker-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clockify-picker-list strong {
  color: var(--os-text);
  font-size: 0.7rem;
  font-weight: 750;
}

.clockify-picker-list small {
  margin-top: 0.2rem;
  color: var(--os-muted);
  font-size: 0.6rem;
  text-transform: capitalize;
}

.clockify-picker-state {
  padding: 1.2rem;
  color: var(--os-muted);
  font-size: 0.68rem;
  text-align: center;
}

.clockify-billable-btn,
.clockify-manual-btn {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--os-border);
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.clockify-billable-btn:hover,
.clockify-billable-btn.is-active {
  color: #03a9dc;
  background: rgba(3, 169, 220, 0.08);
}

.clockify-ready-time,
.clockify-live-time {
  color: var(--os-text);
  font-family: "Segoe UI", ui-monospace, monospace;
  font-size: 0.92rem;
  font-weight: 750;
  text-align: center;
  letter-spacing: 0.02em;
}

.clockify-start-btn,
.clockify-stop-btn {
  height: 42px;
  margin: 0 0.35rem;
  border: 0;
  border-radius: 2px;
  color: #fff;
  background: #03a9dc;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(3, 169, 220, 0.2);
}

.clockify-start-btn:hover {
  background: #028fc0;
}

.clockify-manual-btn {
  border-right: 0;
  color: #03a9dc;
  font-size: 1.1rem;
}

.clockify-tracker.is-running {
  grid-template-columns: 36px minmax(250px, 1fr) minmax(80px, auto) 120px 86px;
  padding-left: 0.75rem;
}

.clockify-running-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(3, 169, 220, 0.1);
}

.clockify-running-mark span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #03a9dc;
  box-shadow: 0 0 0 5px rgba(3, 169, 220, 0.12);
  animation: clockify-live-pulse 1.6s ease-in-out infinite;
}

@keyframes clockify-live-pulse {
  50% {
    box-shadow: 0 0 0 9px rgba(3, 169, 220, 0);
  }
}

.clockify-running-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0 0.5rem;
}

.clockify-running-copy strong {
  overflow: hidden;
  color: var(--os-text);
  font-size: 0.82rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clockify-running-copy small {
  margin-top: 0.16rem;
  overflow: hidden;
  color: var(--os-muted);
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clockify-tracker-tags {
  display: flex;
  gap: 0.25rem;
  overflow: hidden;
}

.clockify-tracker-tags span,
.clockify-entry-tag {
  display: inline-block;
  padding: 0.2rem 0.38rem;
  border-radius: 999px;
  color: #6d28d9;
  background: #f3e8ff;
  font-size: 0.57rem;
  font-weight: 700;
  white-space: nowrap;
}

.clockify-stop-btn {
  background: #ef4444;
  box-shadow: 0 7px 16px rgba(239, 68, 68, 0.2);
}

.clockify-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--os-border);
  border-radius: 5px 5px 0 0;
  background: var(--os-surface-2);
}

.clockify-week-head > div {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.clockify-week-head strong {
  color: var(--os-text);
  font-size: 0.72rem;
}

.clockify-week-head span {
  color: var(--os-muted);
  font-size: 0.63rem;
}

.clockify-entry-groups {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.clockify-day-group {
  border: 1px solid var(--os-border);
  border-radius: 5px;
  overflow: hidden;
  background: var(--os-surface);
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.035);
}

.clockify-day-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.62rem 0.9rem;
  border-bottom: 1px solid var(--os-border);
  background: var(--os-surface-2);
}

.clockify-day-group > header strong,
.clockify-day-group > header span {
  color: var(--os-muted);
  font-size: 0.66rem;
}

.clockify-day-group > header b {
  margin-left: 0.35rem;
  color: var(--os-text);
}

.clockify-entry {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 115px 90px 42px 34px;
  min-height: 62px;
  align-items: center;
  border-bottom: 1px solid var(--os-border);
}

.clockify-entry:last-child {
  border-bottom: 0;
}

.clockify-entry.is-live {
  box-shadow: inset 3px 0 #03a9dc;
}

.clockify-entry-main {
  min-width: 0;
  padding: 0.7rem 0.9rem;
}

.clockify-entry-main > strong {
  display: block;
  overflow: hidden;
  color: var(--os-text);
  font-size: 0.75rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clockify-entry-main > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.28rem;
  overflow: hidden;
}

.clockify-project-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #ec4899;
}

.clockify-entry-project {
  overflow: hidden;
  color: #ec4899;
  font-size: 0.62rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clockify-entry-muted {
  color: #94a3b8;
  font-size: 0.61rem;
}

.clockify-billable-state {
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.clockify-billable-state.is-active {
  color: #03a9dc;
}

.clockify-entry-range {
  color: var(--os-muted);
  font-size: 0.66rem;
  text-align: center;
}

.clockify-entry-duration {
  color: var(--os-text);
  font-family: "Segoe UI", ui-monospace, monospace;
  font-size: 0.78rem;
  text-align: center;
}

.clockify-row-play,
.clockify-row-menu {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  cursor: pointer;
}

.clockify-row-play:hover {
  color: #03a9dc;
  background: rgba(3, 169, 220, 0.09);
}

.clockify-row-play.is-stop:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.09);
}

.clockify-row-menu:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.clockify-empty-state {
  padding: 3rem 1rem;
  border: 1px solid var(--os-border);
  border-top: 0;
  color: var(--os-muted);
  background: var(--os-surface);
  text-align: center;
}

.clockify-empty-state > span {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 0.8rem;
  place-items: center;
  border-radius: 50%;
  color: #03a9dc;
  background: rgba(3, 169, 220, 0.1);
  font-size: 1.2rem;
}

.clockify-empty-state h3 {
  margin: 0;
  color: var(--os-text);
  font-size: 0.9rem;
}

.clockify-empty-state p {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
}

.clockify-view[data-clock-view-panel="dashboard"] .clock-dash-panel {
  margin-top: 0;
}

html.theme-dark .clockify-view-tabs,
html.theme-dark .clockify-tracker,
html.theme-dark .clockify-day-group,
html.theme-dark .clockify-empty-state {
  background: #172235;
}

html.theme-dark .clockify-week-head,
html.theme-dark .clockify-day-group > header {
  background: #111b2d;
}

html.theme-dark .clockify-tracker-tags span,
html.theme-dark .clockify-entry-tag {
  color: #d8b4fe;
  background: rgba(126, 34, 206, 0.22);
}

@media (max-width: 1050px) {
  .clockify-tracker {
    grid-template-columns: minmax(210px, 1fr) minmax(110px, 0.3fr) 90px 78px 38px;
  }

  .clockify-tag-control {
    display: none;
  }
}

@media (max-width: 760px) {
  .clockify-week-total {
    display: none;
  }

  .clockify-tracker,
  .clockify-tracker.is-running {
    display: flex;
    min-height: 0;
    flex-wrap: wrap;
    padding: 0.65rem;
    border-radius: 12px;
  }

  .clockify-description-wrap {
    width: 100%;
    height: 48px;
    border: 1px solid var(--os-border);
    border-radius: 10px;
  }

  .clockify-project-control {
    width: calc(100% - 168px);
    height: 42px;
    border: 0;
  }

  .clockify-billable-btn,
  .clockify-manual-btn {
    width: 38px;
    height: 38px;
    border: 0;
  }

  .clockify-ready-time {
    margin-left: auto;
  }

  .clockify-start-btn,
  .clockify-stop-btn {
    width: 76px;
    height: 38px;
  }

  .clockify-tracker.is-running .clockify-running-copy {
    flex: 1;
  }

  .clockify-tracker.is-running .clockify-tracker-tags {
    display: none;
  }

  .clockify-entry {
    grid-template-columns: minmax(170px, 1fr) 90px 34px;
  }

  .clockify-original-shell.is-report-only .clockify-entry {
    grid-template-columns: minmax(170px, 1fr) 90px;
  }

  .clockify-billable-state,
  .clockify-entry-range,
  .clockify-row-menu {
    display: none;
  }
}

html.theme-dark .boards-empty {
  background: rgba(30, 41, 59, 0.88);
}

html.theme-dark .boards-empty h3 {
  color: #f1f5f9;
}

html.theme-dark .boards-empty p {
  color: #94a3b8;
}

html.theme-dark .board-tile-create {
  background: rgba(30, 41, 59, 0.75);
  border-color: #64748b;
  color: #cbd5e1;
}

html.theme-dark .board-tile-create:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #f8fafc;
  border-color: #94a3b8;
}

/* ???????????????????????????????????????????????????????????????????????????
   Dark mode ? complete surface / control balance (all modules)
??????????????????????????????????????????????????????????????????????????? */

html.theme-dark .sidebar-close-btn,
html.theme-dark .sidebar-toggle,
html.theme-dark .theme-toggle,
html.theme-dark .mobile-toggle,
html.theme-dark .btn-icon-edit,
html.theme-dark .btn-icon-delete,
html.theme-dark .os-logo-img,
html.theme-dark .login-logo-img {
  background: var(--os-surface);
  color: var(--os-muted);
  border-color: var(--os-border);
}

html.theme-dark .sidebar-close-btn:hover,
html.theme-dark .sidebar-toggle:hover,
html.theme-dark .theme-toggle:hover,
html.theme-dark .btn-icon-edit:hover {
  background: var(--os-surface-muted);
  color: var(--os-text);
}

html.theme-dark .os-nav-item {
  color: #cbd5e1;
}

html.theme-dark .employee-card-avatar {
  border-color: transparent;
  background: linear-gradient(145deg, #1e293b, #334155);
  color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.22);
}

html.theme-dark .profile-online {
  border-color: #1e293b;
}

html.theme-dark .profile-list li,
html.theme-dark .profile-detail-row,
html.theme-dark .profile-block,
html.theme-dark .history-empty,
html.theme-dark .history-card,
html.theme-dark .history-sub-card,
html.theme-dark .history-shell,
html.theme-dark .history-item .history-card {
  background: var(--os-surface);
  border-color: var(--os-border);
  color: var(--os-text);
}

html.theme-dark .history-empty {
  background: var(--os-surface-2);
}

html.theme-dark .history-card-head h6,
html.theme-dark .profile-detail-row dd,
html.theme-dark .profile-list li > span:first-child,
html.theme-dark .clock-face,
html.theme-dark .clock-table td,
html.theme-dark .clock-running h3,
html.theme-dark .clock-idle h3,
html.theme-dark .clock-break-card h4,
html.theme-dark .clock-table-head h4,
html.theme-dark .cal-nav h3,
html.theme-dark .cal-side-head h4,
html.theme-dark .cal-event-body h4,
html.theme-dark .mandate-title,
html.theme-dark .board-tile-create {
  color: var(--os-text);
}

html.theme-dark .history-meta,
html.theme-dark .history-when,
html.theme-dark .history-parent,
html.theme-dark .history-desc,
html.theme-dark .history-type,
html.theme-dark .history-card p,
html.theme-dark .history-card-top time,
html.theme-dark .profile-detail-row dt,
html.theme-dark .profile-empty,
html.theme-dark .clock-stat-label,
html.theme-dark .clock-stat-sub,
html.theme-dark .clock-dash-head p,
html.theme-dark .clock-break-empty,
html.theme-dark .clock-bar-meta span,
html.theme-dark .clock-running p,
html.theme-dark .clock-idle p,
html.theme-dark .cal-weekdays span,
html.theme-dark .cal-more,
html.theme-dark .cal-event-body p,
html.theme-dark .cal-day-empty {
  color: var(--os-muted);
}

html.theme-dark .history-subs li {
  background: var(--os-surface-2);
  color: var(--os-text);
}

html.theme-dark .detail-tabs,
html.theme-dark .detail-pages,
html.theme-dark .view-toggle,
html.theme-dark .clock-table-wrap,
html.theme-dark .clock-idle,
html.theme-dark .boards-empty {
  background: var(--os-surface);
  border-color: var(--os-border);
  color: var(--os-text);
}

html.theme-dark .detail-tab,
html.theme-dark .detail-page {
  color: var(--os-muted);
}

html.theme-dark .detail-tab:hover,
html.theme-dark .detail-page:hover {
  color: var(--os-text);
  background: var(--os-accent-soft);
}

html.theme-dark .detail-tab.is-active,
html.theme-dark .detail-page.is-active {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.22);
}

html.theme-dark .cal-chip {
  background: rgba(37, 99, 235, 0.22);
  color: #93c5fd;
}

html.theme-dark .cal-rem {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

html.theme-dark .cal-side {
  border-color: var(--os-border);
}

html.theme-dark .clock-table th,
html.theme-dark .clock-table td {
  border-bottom-color: var(--os-border);
}

html.theme-dark .mandate-card:not(.is-collapsed) .mandate-card-head {
  border-bottom-color: var(--os-border);
}

html.theme-dark .mandate-drag-handle:hover {
  background: var(--os-surface-muted);
}

html.theme-dark .task-toolbar {
  background: rgba(30, 41, 59, 0.92);
}

html.theme-dark .task-search {
  background: var(--os-input);
  border-color: var(--os-border);
}

html.theme-dark .ws-stat,
html.theme-dark .ws-card,
html.theme-dark .ws-toolbar,
html.theme-dark .ws-empty,
html.theme-dark .ws-table-panel,
html.theme-dark .ws-kanban-card,
html.theme-dark .ws-btn:not(.ws-btn-primary):not(.ws-btn-ghost) {
  background: var(--os-surface);
  border-color: var(--os-border);
  color: var(--os-text);
}

html.theme-dark .ws-btn:not(.ws-btn-primary):not(.ws-btn-ghost):hover {
  background: var(--os-surface-muted);
  color: var(--os-text);
}

html.theme-dark .ws-btn-primary,
html.theme-dark .ws-btn-primary:hover {
  color: #fff;
}

html.theme-dark .ws-btn-ghost:hover {
  background: var(--os-surface-muted);
  color: var(--os-text);
}

html.theme-dark .ws-search,
html.theme-dark .ws-select {
  background-color: var(--os-input);
  color: var(--os-text);
  border-color: var(--os-border);
}

html.theme-dark .ws-stat-icon,
html.theme-dark .ws-empty-icon,
html.theme-dark .ws-timeline-icon,
html.theme-dark .ws-source-track,
html.theme-dark .ws-badge:not(.is-hot):not(.is-won):not(.is-cold):not(.is-lost):not(.is-warm):not(.is-qualified) {
  background: var(--os-surface-muted);
  color: var(--os-muted);
}

html.theme-dark .ws-badge.is-hot,
html.theme-dark .ws-badge.is-won {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

html.theme-dark .ws-badge.is-cold,
html.theme-dark .ws-badge.is-lost {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

html.theme-dark .ws-badge.is-warm,
html.theme-dark .ws-badge.is-qualified {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

html.theme-dark .ws-interest-trigger.is-no_interest {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

html.theme-dark .ws-interest-trigger.is-low {
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
}

html.theme-dark .ws-interest-trigger.is-moderate {
  background: rgba(217, 119, 6, 0.2);
  color: #fcd34d;
}

html.theme-dark .ws-interest-trigger.is-high {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

html.theme-dark .ws-interest-trigger.is-very_high {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

html.theme-dark .ws-priority-trigger.is-low {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

html.theme-dark .ws-priority-trigger.is-medium {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

html.theme-dark .ws-priority-trigger.is-high {
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
}

html.theme-dark .ws-priority-trigger.is-urgent {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

html.theme-dark .ws-interest-menu,
html.theme-dark .ws-next-action-menu {
  background: var(--os-surface);
  border-color: var(--os-border);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.4);
}

html.theme-dark .ws-table-bar,
html.theme-dark .ws-pipe-stage,
html.theme-dark .ws-kanban-col,
html.theme-dark .ws-search-hit,
html.theme-dark .ws-timeline-item:hover,
html.theme-dark .ws-table tr:hover td {
  background: var(--os-surface-2);
}

html.theme-dark .ws-pipe-stage:hover,
html.theme-dark .ws-pipe-stage.is-active {
  background: var(--os-accent-soft);
}

html.theme-dark .ws-table th {
  background: var(--os-surface);
  color: var(--os-muted);
}

html.theme-dark .ws-tab.is-active {
  background: var(--os-surface);
  color: #93c5fd;
}

html.theme-dark .ws-kanban-col header span {
  background: var(--os-surface);
  color: var(--os-muted);
}

html.theme-dark .ws-kanban-meta,
html.theme-dark .ws-pipe-conv,
html.theme-dark .ws-timeline-item p {
  color: var(--os-muted);
}

html.theme-dark .modal-body input,
html.theme-dark .modal-body select,
html.theme-dark .modal-body textarea,
html.theme-dark .richtext-editor,
html.theme-dark .richtext-select,
html.theme-dark .login-form input,
html.theme-dark .login-form select {
  background: var(--os-input);
  color: var(--os-text);
  border-color: var(--os-border);
}

html.theme-dark .richtext-toolbar {
  background: var(--os-surface-2);
  border-color: var(--os-border);
}

html.theme-dark .richtext-btn {
  background: var(--os-surface);
  color: #e2e8f0;
  border-color: var(--os-border);
}

html.theme-dark .richtext-btn:hover,
html.theme-dark .richtext-btn:focus-visible {
  background: var(--os-surface-muted);
}

html.theme-dark .richtext-editor li::marker {
  color: #e2e8f0;
}

html.theme-dark .share-picker,
html.theme-dark .share-person {
  background: var(--os-input);
  color: var(--os-text);
}

html.theme-dark .login-body {
  background:
    radial-gradient(ellipse 80% 60% at 10% 10%, rgba(37, 99, 235, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 90%, rgba(30, 58, 138, 0.2), transparent 50%),
    linear-gradient(160deg, #0b1220 0%, #111827 45%, #0f172a 100%);
}

html.theme-dark .login-error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

/* Lead contact workspace */
.ws-lead-detail-header,
.ws-lead-detail-tabs,
.ws-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ws-lead-detail-summary {
  padding: 18px 0;
}

.ws-lead-detail-tabs {
  padding-bottom: 12px;
  overflow-x: auto;
}

.ws-contact-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}

.ws-contact-summary > div,
.ws-lead-note {
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  padding: 12px;
}

.ws-contact-summary .ws-label {
  display: block;
  margin-bottom: 5px;
}

.ws-lead-facts {
  row-gap: 14px;
}

.ws-lead-facts-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ws-lead-head-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--os-accent) 8%, #fff), color-mix(in srgb, var(--os-surface-2) 70%, #fff));
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.ws-lead-head-card.is-editing {
  background: color-mix(in srgb, var(--os-surface-2) 55%, #fff);
}

.ws-lead-head-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ws-lead-head-card-top .ws-label {
  margin: 0;
  color: color-mix(in srgb, var(--os-accent) 70%, #64748b);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

.ws-lead-head-card .ws-lead-head-person {
  gap: 0.75rem;
}

.ws-lead-head-card .ws-lead-head-person .ws-employee-avatar {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-width: 2px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.ws-lead-head-card .ws-lead-head-person .ws-employee-avatar.is-fallback {
  font-size: 0.85rem;
}

.ws-lead-head-card .ws-lead-head-person > span {
  color: var(--os-text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ws-lead-head-card .ws-person-select-field > .ws-label:empty {
  display: none;
}

.ws-lead-head-card .person-select-trigger {
  min-height: 48px;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  background: #fff;
}

.ws-lead-head-card .person-select-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.ws-lead-head-card .person-select-trigger-label {
  font-size: 0.98rem;
  font-weight: 750;
}

.ws-card-edit-form > .ws-lead-head-card {
  margin-bottom: 12px;
}

.ws-lead-note {
  margin-top: 12px;
}

.ws-lead-note p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.ws-lead-requirements {
  margin: 6px 0 0;
  white-space: normal;
}

.ws-lead-requirements ul,
.ws-lead-requirements ol,
.ws-followup-notes ul,
.ws-followup-notes ol {
  margin: 0.35em 0 0.35em 1.25em;
  padding: 0;
}

.ws-lead-requirements li,
.ws-followup-notes li {
  margin: 0.15em 0;
}

.ws-lead-requirements img,
.ws-followup-notes img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.5em 0;
  border-radius: 8px;
}

.ws-lead-requirements-editor {
  margin-top: 0.35rem;
}

.ws-lead-requirements-editor .richtext-editor {
  min-height: 180px;
}

.ws-lead-whatsapp-message {
  margin: 6px 0 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ws-lead-whatsapp-message p {
  margin: 0 0 0.35em;
}

.ws-lead-whatsapp-message p:last-child {
  margin-bottom: 0;
}

.ws-break-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ws-contact-outcome {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.ws-contact-outcome.is-answered {
  color: #047857;
  background: #d1fae5;
}

.ws-contact-outcome.is-not_answered {
  color: #b91c1c;
  background: #fee2e2;
}

html.theme-dark .ws-contact-outcome.is-answered {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.18);
}

html.theme-dark .ws-contact-outcome.is-not_answered {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.18);
}

@media (max-width: 900px) {
  .ws-contact-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .ws-contact-summary {
    grid-template-columns: 1fr;
  }

  .ws-lead-detail-header .btn {
    min-height: 38px;
  }
}

html.theme-dark .login-title,
html.theme-dark .login-brand-text h1,
html.theme-dark .login-brand h1 {
  color: #f1f5f9;
}

html.theme-dark .boards-empty {
  background: rgba(30, 41, 59, 0.88);
}

/* ?? Lead detail workspace structural styles ??????????????????????????????? */

.ws-lead-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1200px;
}

.ws-lead-detail-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: color-mix(in srgb, var(--os-bg) 92%, transparent);
  backdrop-filter: blur(8px);
  padding: 10px 0;
  border-bottom: 1px solid var(--os-border);
  margin-bottom: 4px;
}

.ws-lead-detail-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ws-lead-hero {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 14px 0 18px;
  padding: 18px;
  border: 1px solid var(--os-border);
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--os-accent) 8%, transparent), transparent 55%),
    var(--os-surface);
}

/* LinkedIn / Facebook style lead profile */
.ws-lead-profile {
  position: relative;
  margin: 12px 0 18px;
  border: 1px solid var(--os-border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--os-surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.ws-lead-decision-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 22px 0 8px;
  padding: 22px 16px 8px;
  border-top: 1px solid var(--os-border);
}

.ws-lead-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 220px;
  min-height: 52px;
  padding: 0.9rem 1.75rem;
  border: 0;
  border-radius: 14px;
  background: #1d4ed8;
  color: #fff;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ws-lead-close-btn:hover {
  background: #1e40af;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(29, 78, 216, 0.34);
}

.ws-lead-close-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, #93c5fd 75%, transparent);
  outline-offset: 3px;
}

.ws-lead-close-btn:active {
  transform: translateY(0);
}

.ws-lead-close-hint {
  margin: 0;
  max-width: 28rem;
  color: var(--os-muted);
  font-size: 0.84rem;
  line-height: 1.4;
  text-align: center;
}

.ws-lead-decision-status {
  width: 100%;
  max-width: 640px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.9rem 1.05rem;
  border-radius: 14px;
  border: 1px solid transparent;
}

.ws-lead-decision-status.is-won {
  background: #ecfdf5;
  border-color: #86efac;
}

.ws-lead-decision-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.ws-lead-decision-actions .ws-btn.is-danger {
  color: #b91c1c;
}

.ws-lead-decision-actions .ws-btn.is-danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.ws-lead-decision-status.is-lost {
  background: #fef2f2;
  border-color: #fca5a5;
}

.ws-lead-decision-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ws-lead-decision-copy strong {
  font-size: 0.95rem;
  font-weight: 800;
}

.ws-lead-decision-status.is-won .ws-lead-decision-copy strong {
  color: #15803d;
}

.ws-lead-decision-status.is-lost .ws-lead-decision-copy strong {
  color: #b91c1c;
}

.ws-lead-decision-copy span {
  color: var(--os-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.ws-swal-lead-close-hint {
  margin: 0 0 0.85rem;
  color: #64748b;
  font-size: 0.92rem;
}

.ws-lead-contact-card {
  margin: 0 0 16px;
  padding: 16px 18px 18px;
  border: 1px solid var(--os-border);
  border-radius: 16px;
  background: var(--os-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.ws-lead-contact-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ws-lead-contact-card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--os-text);
}

.ws-lead-contact-card-head span {
  display: block;
  margin-top: 2px;
  color: var(--os-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.ws-lead-contact-card.is-editing {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.ws-lead-contact-card .ws-card-edit-form {
  margin-top: 2px;
}

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

.ws-lead-contact-cell {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--os-surface-2) 65%, var(--os-surface));
}

.ws-lead-contact-cell.is-empty {
  opacity: 0.78;
}

.ws-lead-contact-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-accent) 12%, #fff);
  color: var(--os-accent);
}

.ws-lead-contact-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ws-lead-contact-copy .ws-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.ws-lead-contact-value {
  min-width: 0;
  color: var(--os-text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ws-lead-contact-value a {
  color: inherit;
  text-decoration: none;
}

.ws-lead-contact-value a:hover {
  color: var(--os-accent);
  text-decoration: underline;
}

.ws-lead-contact-value small {
  display: block;
  margin-top: 2px;
  color: var(--os-muted);
  font-size: 0.78rem;
  font-weight: 550;
}

@media (max-width: 960px) {
  .ws-lead-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .ws-lead-contact-grid {
    grid-template-columns: 1fr;
  }
}

.ws-swal-lead-close-choices {
  display: grid;
  gap: 0.7rem;
}

.ws-swal-outcome {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ws-swal-outcome strong {
  font-size: 1rem;
  font-weight: 800;
}

.ws-swal-outcome span {
  color: #64748b;
  font-size: 0.84rem;
}

.ws-swal-outcome.is-won:hover {
  border-color: #86efac;
  background: #ecfdf5;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.ws-swal-outcome.is-won strong {
  color: #15803d;
}

.ws-swal-outcome.is-lost:hover {
  border-color: #fca5a5;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.ws-swal-outcome.is-lost strong {
  color: #b91c1c;
}

.ws-swal-outcome.is-won.is-selected {
  border-color: #16a34a;
  background: #ecfdf5;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.ws-swal-outcome.is-lost.is-selected {
  border-color: #dc2626;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.ws-swal-outcome.is-closed:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

.ws-swal-outcome.is-closed strong {
  color: #475569;
}

.ws-swal-outcome.is-closed.is-selected {
  border-color: #64748b;
  background: #f1f5f9;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.18);
}

.ws-swal-hire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (max-width: 520px) {
  .ws-swal-hire-grid {
    grid-template-columns: 1fr;
  }
}

html.theme-dark .ws-swal-outcome.is-closed:hover,
html.theme-dark .ws-swal-outcome.is-closed.is-selected {
  border-color: #94a3b8;
  background: rgba(100, 116, 139, 0.22);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
}

html.theme-dark .ws-swal-outcome.is-closed strong {
  color: #cbd5e1;
}

.ws-swal-lead-close-hint {
  margin: 0 0 1rem;
  color: #64748b;
  font-size: 0.92rem;
}

.ws-swal-lead-close-detail {
  margin-top: 1rem;
  text-align: left;
}

.ws-swal-lead-close-label {
  display: block;
  margin-bottom: 0.45rem;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
}

.ws-swal-lead-close-select {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  box-sizing: border-box;
}

.ws-swal-lead-close-select:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}

.ws-swal-lead-close-reason {
  width: 100%;
  min-height: 84px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.ws-swal-lead-close-reason:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}

.ws-lead-cover {
  position: relative;
  height: 148px;
  background:
    linear-gradient(135deg, #1e3a8a 0%, #2563eb 42%, #38bdf8 100%);
  background-size: cover;
  background-position: center;
}

.ws-lead-cover.has-image {
  background-color: #0f172a;
}

.ws-lead-cover-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  z-index: 3;
}

.ws-lead-media-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
}

.ws-lead-media-btn:hover {
  background: rgba(15, 23, 42, 0.78);
}

.ws-lead-media-btn.is-ghost {
  background: rgba(255, 255, 255, 0.16);
}

.ws-lead-media-btn.is-danger {
  border-color: rgba(254, 202, 202, 0.55);
  background: rgba(185, 28, 28, 0.78);
}

.ws-lead-media-btn.is-danger:hover {
  background: rgba(153, 27, 27, 0.9);
}

.ws-lead-profile-body {
  position: relative;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  grid-template-areas:
    "avatar main"
    "metrics metrics";
  gap: 12px 18px;
  padding: 0 18px 16px;
  align-items: start;
}

.ws-lead-avatar-stage {
  position: relative;
  grid-area: avatar;
  margin-top: -56px;
  width: 120px;
  z-index: 2;
}

.ws-lead-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--os-surface);
  background: color-mix(in srgb, var(--os-accent) 16%, #fff);
  color: var(--os-accent);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ws-lead-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ws-lead-avatar-cam {
  position: absolute;
  right: 4px;
  bottom: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--os-surface);
  background: #0f172a;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  z-index: 3;
}

.ws-lead-avatar-cam:hover {
  background: #1d4ed8;
}

.ws-lead-avatar-remove {
  appearance: none;
  margin-top: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--os-muted);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
  text-align: center;
}

.ws-lead-avatar-remove:hover {
  color: #dc2626;
}

.ws-lead-profile-edit-shell {
  display: contents;
}

.ws-lead-profile-edit-shell.ws-profile-inline-edit {
  display: contents;
}

.ws-lead-profile-main {
  grid-area: main;
  padding-top: 14px;
  min-width: 0;
  align-self: center;
}

.ws-lead-profile-edit-shell .ws-lead-profile-metrics {
  grid-area: metrics;
}

.ws-profile-plan-field textarea {
  width: 100%;
  min-height: 72px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  resize: vertical;
}

.ws-profile-plan-field textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--os-accent) 45%, var(--os-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--os-accent) 16%, transparent);
}

.ws-profile-inline-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-profile-inline-edit .ws-lead-profile-topline {
  margin-bottom: 0;
}

.ws-profile-name-field,
.ws-profile-status-field,
.ws-profile-next-action-field,
.ws-profile-plan-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.ws-profile-name-field input {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 750;
}

.ws-profile-status-field select,
.ws-profile-next-action-field select {
  min-width: 180px;
  min-height: 38px;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--os-border);
  border-radius: 999px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
}

.ws-profile-status-field.is-static {
  justify-content: flex-end;
}

.ws-profile-status-field.is-static .ws-lead-status-pill {
  align-self: flex-start;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}

.ws-profile-next-action-field select {
  min-width: 210px;
  max-width: 260px;
}

.ws-profile-plan-field textarea {
  width: 100%;
  min-height: 64px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  resize: vertical;
}

.ws-profile-inline-edit .ws-lead-profile-topline-actions {
  align-items: flex-end;
  flex-wrap: wrap;
}

.ws-profile-inline-edit .ws-card-edit-actions {
  margin: 0;
}

.ws-lead-profile-metrics {
  grid-area: metrics;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding-top: 2px;
}

.ws-lead-profile-metrics.is-editing .ws-lead-attr,
.ws-lead-profile-metrics.is-editing .ws-lead-next-action-bar {
  cursor: pointer;
}

.ws-lead-profile-metrics:not(.is-editing) .ws-lead-attr,
.ws-lead-profile-metrics:not(.is-editing) .ws-lead-next-action-bar {
  cursor: default;
}

.ws-lead-profile-metrics .ws-profile-plan-field {
  margin-top: 2px;
}

.ws-lead-profile-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 10px;
}

.ws-lead-profile-heading {
  min-width: 0;
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-lead-profile-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.ws-lead-profile-title-row .ws-lead-profile-title {
  flex: 0 1 auto;
  min-width: 0;
}

.ws-lead-profile-title-row.is-edit {
  align-items: flex-end;
}

.ws-lead-profile-title-row.is-edit .ws-profile-name-field {
  flex: 1 1 220px;
}

.ws-lead-profile-topline-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 100%;
  margin-top: 2px;
}

.ws-lead-profile-status-stack {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.ws-lead-profile-status-sep {
  color: var(--os-border);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  user-select: none;
}

.ws-lead-profile-status-stack .ws-lead-mini-chip {
  max-width: 100%;
}

.ws-lead-profile-topline-actions .ws-lead-status-pill {
  max-width: 100%;
}

.ws-profile-type-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.ws-profile-type-field select {
  min-width: 160px;
  min-height: 38px;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--os-border);
  border-radius: 999px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
}

.ws-lead-last-contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  max-width: 100%;
  color: var(--os-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.ws-lead-last-contact-when,
.ws-lead-last-contact-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ws-lead-last-contact-when > svg {
  flex: 0 0 auto;
  opacity: 0.8;
}

.ws-lead-last-contact-label {
  flex: 0 0 auto;
  font-weight: 650;
}

.ws-lead-last-contact-row > i,
.ws-lead-last-contact-when > i,
.ws-lead-last-contact-person > i {
  flex: 0 0 auto;
  font-style: normal;
  opacity: 0.45;
}

.ws-lead-last-contact-row b {
  color: var(--os-text);
  font-weight: 700;
}

.ws-lead-last-contact-row.is-empty b {
  color: var(--os-muted);
  font-weight: 600;
}

.ws-lead-last-contact-person .ws-employee-avatar {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.ws-lead-last-contact-people {
  display: inline-flex;
  align-items: center;
}

.ws-lead-last-contact-person-avatar {
  display: inline-flex;
  margin-left: -6px;
}

.ws-lead-last-contact-person-avatar:first-child {
  margin-left: 0;
}

.ws-lead-last-contact-person-avatar .ws-employee-avatar {
  box-shadow: 0 0 0 2px var(--os-surface);
}

.ws-lead-last-contact-person em {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #94a3b8;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 550;
  white-space: nowrap;
}

.ws-lead-last-contact-person em svg {
  width: 12px;
  height: 12px;
  color: var(--os-accent, #2563eb);
}

.ws-lead-last-contact-by {
  color: var(--os-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.ws-lead-last-contact-person strong {
  color: var(--os-text);
  font-weight: 750;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .ws-lead-last-contact-row {
    gap: 6px;
  }
}

.ws-followup-completed-at {
  position: absolute;
  right: 34px;
  bottom: 10px;
  z-index: 2;
  max-width: calc(100% - 48px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #047857;
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.2;
  pointer-events: none;
}

.ws-followup-card:has(.ws-followup-completed-at) {
  padding-bottom: 26px;
}

@media (max-width: 720px) {
  .ws-lead-profile-topline-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.ws-lead-profile-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--os-text);
}

.ws-lead-profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  color: var(--os-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .ws-lead-cover {
    height: 120px;
  }

  .ws-lead-profile-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "avatar"
      "main"
      "metrics";
    padding-top: 0;
  }

  .ws-lead-avatar-stage {
    margin-top: -48px;
    width: 104px;
    justify-self: start;
  }

  .ws-lead-avatar {
    width: 104px;
    height: 104px;
    font-size: 1.85rem;
  }

  .ws-lead-profile-title {
    font-size: 1.35rem;
  }

  .ws-lead-cover-actions .ws-lead-media-btn span {
    display: none;
  }
}

.ws-lead-hero-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: color-mix(in srgb, var(--os-accent) 16%, #fff);
  color: var(--os-accent);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ws-lead-hero-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.ws-lead-hero-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--os-text);
}

.ws-lead-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  color: var(--os-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ws-lead-hero-sep {
  margin: 0 0.45rem;
  opacity: 0.55;
}

.ws-lead-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ws-lead-attr-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ws-lead-attr-row.is-customer-attrs {
  grid-template-columns: minmax(0, 220px);
}

.ws-lead-attr-picker,
.ws-lead-next-action-picker {
  position: relative;
  min-width: 0;
}

.ws-lead-attr {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--os-surface-2) 70%, var(--os-surface));
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

button.ws-lead-attr:hover {
  border-color: color-mix(in srgb, var(--os-accent) 35%, var(--os-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--os-accent) 12%, transparent);
}

button.ws-lead-attr:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--os-accent) 45%, var(--os-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--os-accent) 18%, transparent);
}

.ws-lead-attr > span {
  color: var(--os-muted);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.ws-lead-attr > strong {
  color: var(--os-text);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
  padding-right: 1.1rem;
}

.ws-lead-attr-chevron {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  margin: 0;
  color: var(--os-muted);
  opacity: 0.75;
  font-style: normal;
}

.ws-lead-attr-picker .ws-lead-attr {
  position: relative;
}

.ws-lead-attr-chevron .ws-picker-chevron-icon,
.ws-lead-attr-chevron .ws-picker-chevron-icon svg {
  width: 11px;
  height: 11px;
  display: block;
}

.ws-lead-attr.is-interest-no_interest {
  border-color: #fecaca;
  background: #fef2f2;
}
.ws-lead-attr.is-interest-no_interest > strong { color: #b91c1c; }

.ws-lead-attr.is-interest-low {
  border-color: #fed7aa;
  background: #fff7ed;
}
.ws-lead-attr.is-interest-low > strong { color: #c2410c; }

.ws-lead-attr.is-interest-moderate {
  border-color: #fde68a;
  background: #fffbeb;
}
.ws-lead-attr.is-interest-moderate > strong { color: #b45309; }

.ws-lead-attr.is-interest-high {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.ws-lead-attr.is-interest-high > strong { color: #1d4ed8; }

.ws-lead-attr.is-interest-very_high {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.ws-lead-attr.is-interest-very_high > strong { color: #047857; }

.ws-lead-attr.is-intent.has-value {
  border-color: rgba(14, 165, 233, 0.3);
  background: color-mix(in srgb, #0ea5e9 10%, var(--os-surface));
}
.ws-lead-attr.is-intent.has-value > strong { color: #0369a1; }

.ws-lead-attr.is-type.has-value {
  border-color: rgba(99, 102, 241, 0.28);
  background: color-mix(in srgb, #6366f1 9%, var(--os-surface));
}
.ws-lead-attr.is-type.has-value > strong { color: #4338ca; }

.ws-lead-attr.is-priority-low {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.ws-lead-attr.is-priority-low > strong { color: #15803d; }

.ws-lead-attr.is-priority-medium {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.ws-lead-attr.is-priority-medium > strong { color: #2563eb; }

.ws-lead-attr.is-priority-high {
  border-color: #fed7aa;
  background: #fff7ed;
}
.ws-lead-attr.is-priority-high > strong { color: #ea580c; }

.ws-lead-attr.is-priority-urgent {
  border-color: #fecaca;
  background: #fef2f2;
}
.ws-lead-attr.is-priority-urgent > strong { color: #dc2626; }

.ws-lead-next-action-bar {
  appearance: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef2ff 0%, #f8fafc 55%);
  box-shadow: inset 3px 0 0 #4f46e5;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

button.ws-lead-next-action-bar:hover {
  border-color: #a5b4fc;
  box-shadow:
    inset 3px 0 0 #4f46e5,
    0 0 0 3px rgba(79, 70, 229, 0.12);
}

button.ws-lead-next-action-bar:focus-visible {
  outline: none;
  border-color: #818cf8;
  box-shadow:
    inset 3px 0 0 #4f46e5,
    0 0 0 3px rgba(79, 70, 229, 0.18);
}

.ws-lead-next-action-bar.is-empty {
  border-color: var(--os-border);
  background: color-mix(in srgb, var(--os-surface-2) 75%, var(--os-surface));
  box-shadow: inset 3px 0 0 #94a3b8;
}

.ws-lead-next-action-picker {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.ws-lead-next-action-bar .ws-lead-attr-chevron {
  position: static;
  margin-left: auto;
  color: #6366f1;
  opacity: 0.9;
}

.ws-lead-next-action-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  background: color-mix(in srgb, #4f46e5 14%, #fff);
  color: #4f46e5;
}

.ws-lead-next-action-bar.is-empty .ws-lead-next-action-icon {
  background: color-mix(in srgb, #94a3b8 16%, #fff);
  color: #64748b;
}

.ws-lead-next-action-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.ws-lead-next-action-copy .ws-label {
  margin: 0;
  color: #6366f1;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}

.ws-lead-next-action-bar.is-empty .ws-lead-next-action-copy .ws-label {
  color: var(--os-muted);
}

.ws-lead-next-action-copy strong {
  color: #312e81;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
}

.ws-lead-next-action-bar.is-empty .ws-lead-next-action-copy strong {
  color: var(--os-muted);
  font-weight: 700;
}

.ws-lead-next-action-plan {
  margin: 8px 0 0;
  padding: 0 4px 0 14px;
  color: var(--os-text);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ws-priority-picker {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  vertical-align: middle;
}

.ws-priority-trigger {
  min-width: 130px;
  max-width: 200px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
  overflow: visible;
  box-sizing: border-box;
}

.ws-priority-trigger.is-low {
  background: #ecfdf5;
  color: #15803d;
}

.ws-priority-trigger.is-medium {
  background: #eff6ff;
  color: #2563eb;
}

.ws-priority-trigger.is-high {
  background: #fff7ed;
  color: #ea580c;
}

.ws-priority-trigger.is-urgent {
  background: #fef2f2;
  color: #dc2626;
}

.ws-priority-trigger:hover,
.ws-priority-trigger:focus-visible,
.ws-priority-trigger[aria-expanded="true"] {
  border-color: var(--os-accent);
  box-shadow: 0 0 0 3px var(--os-accent-soft);
  outline: none;
}

.ws-priority-trigger:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ws-priority-trigger [data-priority-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.ws-priority-chevron {
  margin-left: auto;
  display: inline-flex;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: currentColor;
  opacity: 0.75;
}

.ws-priority-chevron svg {
  display: block;
  width: 12px;
  height: 12px;
}

.ws-priority-menu {
  position: fixed;
  z-index: 400;
  min-width: 170px;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
}

.ws-priority-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--os-text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.ws-priority-option:hover,
.ws-priority-option.is-selected {
  background: var(--os-surface-2);
}

@media (max-width: 860px) {
  .ws-lead-attr-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ws-lead-attr-row.is-customer-attrs {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ws-lead-status-pill,
.ws-lead-mini-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.2;
  border: 1px solid transparent;
}

.ws-unknown-lead-tag {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 22px;
  padding: 0 0.48rem;
  border-radius: 5px;
  border: 0;
  background: #dc2626;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.ws-unknown-lead-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.4rem;
  height: 28px;
  margin: 0;
  padding: 0 0.55rem 0 0.32rem;
  border-radius: 999px;
  border: 1px solid var(--os-border, #e2e8f0);
  background: var(--os-surface, #fff);
  color: var(--os-muted, #64748b);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.ws-unknown-lead-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.ws-unknown-lead-chip-switch {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #cbd5e1;
  pointer-events: none;
  transition: background 0.16s ease;
}

.ws-unknown-lead-chip-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.22);
  transition: transform 0.16s ease;
}

.ws-unknown-lead-chip-text {
  pointer-events: none;
}

.ws-unknown-lead-chip.is-on {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.ws-unknown-lead-chip.is-on .ws-unknown-lead-chip-switch {
  background: #fecaca;
}

.ws-unknown-lead-chip.is-on .ws-unknown-lead-chip-thumb {
  transform: translateX(12px);
  background: #fff;
}

.ws-lead-tag-pills {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.ws-lead-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 22px;
  padding: 0 0.48rem;
  border-radius: 999px;
  background: var(--tag, #dc2626);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.ws-lead-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
}

.ws-lead-tag-remove:hover {
  background: rgba(15, 23, 42, 0.28);
}

.ws-lead-tag-picker {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  z-index: 3;
}

.ws-lead-tag-selected {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.ws-lead-tag-empty {
  color: var(--os-muted, #94a3b8);
  font-size: 0.72rem;
  font-weight: 700;
}

.ws-lead-tag-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--os-border, #e2e8f0);
  background: var(--os-surface, #fff);
  color: var(--os-text, #0f172a);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.ws-lead-tag-add:hover,
.ws-lead-tag-add[aria-expanded="true"] {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.ws-lead-tag-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(280px, 78vw);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--os-border, #e2e8f0);
  background: var(--os-surface, #fff);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.ws-lead-tag-menu.is-ported {
  position: fixed;
}

.ws-lead-tag-menu-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}

.ws-lead-tag-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.ws-lead-tag-option:hover,
.ws-lead-tag-option.is-on {
  background: #f1f5f9;
}

.ws-lead-tag-option-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tag, #64748b);
  flex: 0 0 auto;
}

.ws-lead-tag-check {
  margin-left: auto;
  color: #2563eb;
  font-weight: 800;
}

.ws-lead-tag-create {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  margin-top: 6px;
  padding: 8px 6px 4px;
  border-top: 1px solid var(--os-border, #e2e8f0);
  background: var(--os-surface, #fff);
}

.ws-lead-tag-create-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--os-muted, #64748b);
}

.ws-lead-tag-create-row {
  display: flex;
  gap: 6px;
}

.ws-lead-tag-create input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 0.55rem;
  border: 1px solid var(--os-border, #e2e8f0);
  border-radius: 8px;
  font-size: 0.78rem;
}

.ws-lead-status-pill {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.ws-lead-status-pill.is-won,
.ws-lead-status-pill.is-qualified,
.ws-lead-status-pill.is-delivered,
.ws-lead-status-pill.is-converted {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.ws-lead-status-pill.is-feature_development {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.ws-lead-status-pill.is-bug_fixing {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.ws-lead-status-pill.is-enhancement {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
}

.ws-lead-status-pill.is-upgrade {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.ws-lead-status-pill.is-renewal {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.ws-lead-status-pill.is-support_maintenance {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.ws-lead-status-pill.is-lost,
.ws-lead-status-pill.is-closed_lost,
.ws-lead-status-pill.is-closed_not_interested {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.ws-lead-mini-chip.is-neutral {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

.ws-lead-mini-chip.is-interest-no_interest { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.ws-lead-mini-chip.is-interest-low { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.ws-lead-mini-chip.is-interest-moderate { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.ws-lead-mini-chip.is-interest-high { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.ws-lead-mini-chip.is-interest-very_high { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }

.ws-lead-mini-chip.is-priority-low { background: #ecfdf5; border-color: #a7f3d0; color: #15803d; }
.ws-lead-mini-chip.is-priority-medium { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.ws-lead-mini-chip.is-priority-high { background: #fff7ed; border-color: #fed7aa; color: #ea580c; }
.ws-lead-mini-chip.is-priority-urgent { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

.ws-lead-mini-chip.is-next-action {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

.ws-lead-mini-chip.is-next-action.has-value {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.ws-lead-hero-plan {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--os-border) 85%, transparent);
  background: color-mix(in srgb, var(--os-surface-2) 80%, transparent);
}

.ws-lead-hero-plan .ws-label {
  display: block;
  margin-bottom: 4px;
}

.ws-lead-hero-plan p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--os-text);
  white-space: pre-wrap;
}

.ws-lead-detail-summary {
  padding: 16px 0 8px;
}

.ws-h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
  color: var(--os-text);
}

.ws-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--os-muted);
}

.ws-divider {
  height: 1px;
  background: var(--os-border);
  margin: 16px 0;
}

.ws-lead-detail-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}
.ws-lead-detail-tabs::-webkit-scrollbar { display: none; }

.ws-lead-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--os-muted);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.ws-lead-tab:hover {
  background: var(--os-surface-2);
  color: var(--os-text);
}

.ws-lead-tab.is-active {
  background: var(--os-accent);
  color: #fff;
}

.ws-lead-detail-content {
  padding: 4px 0 24px;
}

.ws-lead-overview {
  display: grid;
  gap: 18px;
}

.ws-lead-overview .ws-overview-section {
  padding: 18px;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
}

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

.ws-progress-metric {
  min-width: 0;
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--os-surface-2);
  border: 1px solid color-mix(in srgb, var(--os-border) 80%, transparent);
}

.ws-progress-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.3;
  color: var(--os-text);
}

.ws-progress-metric.is-answered {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.ws-progress-metric.is-answered strong {
  color: #047857;
}

@media (max-width: 980px) {
  .ws-progress-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ws-lead-hero {
    grid-template-columns: 1fr;
  }

  .ws-lead-hero-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  .ws-progress-metric-grid {
    grid-template-columns: 1fr;
  }
}

/* History list (activities, timeline, notes) */
.ws-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
}

.ws-history-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--os-border);
  transition: background 0.12s;
}
.ws-history-item:last-child { border-bottom: none; }
.ws-history-item:hover { background: var(--os-surface-2); }

.ws-history-when {
  font-size: 11.5px;
  color: var(--os-muted);
  padding-right: 12px;
  padding-top: 2px;
  flex-shrink: 0;
  line-height: 1.5;
  white-space: pre-line;
  word-break: break-word;
}

.ws-history-main {
  min-width: 0;
}

.ws-history-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--os-text);
}

.ws-history-title .ws-muted {
  font-weight: 400;
  margin-left: 4px;
}

/* Grid layout utilities */
.ws-grid {
  display: grid;
  gap: 12px;
}
.ws-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.ws-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.ws-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.ws-overview-section + .ws-overview-section {
  border-top: 1px solid var(--os-border);
  margin-top: 22px;
  padding-top: 22px;
}

.ws-overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.ws-overview-heading h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.ws-overview-heading span {
  color: var(--os-muted);
  font-size: 12px;
}

.ws-overview-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.ws-card-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface-2);
  color: var(--os-text-muted, #64748b);
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ws-card-edit-btn:hover {
  color: var(--os-accent, #2563eb);
  border-color: color-mix(in srgb, var(--os-accent, #2563eb) 40%, var(--os-border));
  background: color-mix(in srgb, var(--os-accent, #2563eb) 8%, var(--os-surface));
}

.ws-card-edit-btn.is-danger {
  color: #b91c1c;
}

.ws-card-edit-btn.is-danger:hover {
  color: #991b1b;
  border-color: color-mix(in srgb, #ef4444 45%, var(--os-border));
  background: color-mix(in srgb, #ef4444 10%, var(--os-surface));
}

.ws-card-edit-form {
  display: grid;
  gap: 14px;
}

.ws-card-edit-form .ws-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.ws-card-edit-form .ws-field-full {
  grid-column: 1 / -1;
}

.ws-card-edit-form input,
.ws-card-edit-form select,
.ws-card-edit-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
}

.ws-card-edit-form textarea {
  min-height: 72px;
  resize: vertical;
}

.ws-card-edit-form input:disabled {
  opacity: 0.7;
  background: var(--os-surface-2);
}

.ws-card-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.ws-overview-section.is-editing {
  border-color: color-mix(in srgb, var(--os-accent, #2563eb) 35%, var(--os-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--os-accent, #2563eb) 10%, transparent);
}

.ws-profile-edit-form {
  padding-top: 4px;
}

.ws-contact-person-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ws-contact-person-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--os-border);
  border-radius: 11px;
  background: var(--os-surface);
}

.ws-contact-person-head,
.ws-resource-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ws-contact-person-head > div:first-child {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
  min-width: 0;
}

.ws-contact-person-head strong {
  font-size: 14px;
}

.ws-contact-person-head > div:first-child > span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 750;
}

.ws-contact-person-head small {
  width: 100%;
  color: var(--os-muted);
}

.ws-card-menu {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.ws-card-menu button {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--os-border);
  border-radius: 7px;
  background: transparent;
  color: var(--os-muted);
  cursor: pointer;
}

.ws-card-menu button:hover {
  border-color: var(--os-primary);
  color: var(--os-primary);
}

.ws-contact-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.ws-contact-method {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--os-surface-2);
  color: var(--os-text);
  text-decoration: none;
  outline: none;
  box-shadow: none;
}

.ws-contact-method:hover,
.ws-contact-method:focus,
.ws-contact-method:focus-within {
  outline: none;
  box-shadow: none;
  border-color: transparent;
  background: var(--os-surface-2);
}

.ws-contact-method.is-link:hover {
  border-color: color-mix(in srgb, var(--os-primary) 35%, var(--os-border));
  outline: none;
}

.ws-contact-method > span {
  color: var(--os-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ws-contact-methods strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-phone-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  width: auto;
}

.ws-phone-actions-num {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-lead-contact-value .ws-phone-actions {
  gap: 6px;
  height: auto;
  max-width: 100%;
}

.ws-lead-contact-value .ws-phone-actions-num {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: normal;
}

.ws-lead-contact-value .ws-phone-actions-btns {
  gap: 2px;
}

.ws-lead-contact-value .ws-phone-action {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
}

.ws-lead-contact-value .ws-phone-action svg {
  width: 14px;
  height: 14px;
}

.ws-lead-contact-value .ws-phone-action.is-whatsapp {
  color: #1faa55;
  background: transparent;
}

.ws-lead-contact-value .ws-phone-action.is-tel {
  color: #64748b;
  background: transparent;
}

.ws-lead-contact-value .ws-phone-action:hover {
  transform: none;
}

.ws-lead-contact-value .ws-phone-action.is-whatsapp:hover {
  background: color-mix(in srgb, #25d366 14%, transparent);
  color: #0f8a45;
}

.ws-lead-contact-value .ws-phone-action.is-tel:hover {
  background: color-mix(in srgb, var(--os-primary) 10%, transparent);
  color: var(--os-primary);
}

.ws-phone-actions-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.ws-phone-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-surface) 88%, var(--os-text));
  color: var(--os-muted);
  font-size: 0;
  line-height: 0;
  text-decoration: none;
  outline: none;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.ws-phone-action:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--os-primary) 55%, transparent);
  outline-offset: 1px;
}

.ws-phone-action svg {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  overflow: visible;
}

.ws-phone-action.is-whatsapp {
  color: #1faa55;
  background: color-mix(in srgb, #25d366 14%, var(--os-surface));
}

.ws-phone-action.is-tel {
  color: #334155;
  background: color-mix(in srgb, var(--os-primary) 8%, var(--os-surface));
}

.ws-phone-action:hover {
  transform: translateY(-1px);
}

.ws-phone-action.is-whatsapp:hover {
  background: color-mix(in srgb, #25d366 24%, var(--os-surface));
  color: #0f8a45;
}

.ws-phone-action.is-tel:hover {
  background: color-mix(in srgb, var(--os-primary) 16%, var(--os-surface));
  color: var(--os-primary);
}

.ws-preferred-method {
  margin-top: 9px;
  color: var(--os-primary);
  font-size: 11px;
  font-weight: 650;
}

.ws-contact-person-card > p {
  margin: 9px 0 0;
  color: var(--os-muted);
  font-size: 12px;
  white-space: pre-wrap;
}

.ws-resource-links {
  margin-top: 18px;
}

.ws-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.ws-resource-link {
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--os-border);
  border-radius: 9px;
}

.ws-resource-link > a {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: var(--os-text);
  text-decoration: none;
}

.ws-resource-link > a span {
  color: var(--os-primary);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.ws-resource-link > a strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-inline-empty {
  margin-top: 8px;
  padding: 14px;
  border: 1px dashed var(--os-border);
  border-radius: 9px;
  color: var(--os-muted);
  font-size: 12px;
}

.ws-overview-section > .ws-lead-facts > div {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 9px;
  background: var(--os-surface-2);
}

.ws-decision-spotlight {
  margin-bottom: 4px;
}

.ws-decision-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ws-decision-chip {
  min-width: 0;
  padding: 14px 14px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--os-surface-2);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.ws-decision-chip .ws-label {
  margin-bottom: 6px;
  opacity: 0.85;
}

.ws-decision-chip strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.3;
  word-break: break-word;
}

.ws-decision-chip.is-interest-no_interest {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.ws-decision-chip.is-interest-low {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.ws-decision-chip.is-interest-moderate {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.ws-decision-chip.is-interest-high {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.ws-decision-chip.is-interest-very_high {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.ws-decision-chip.is-priority-low {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #15803d;
}

.ws-decision-chip.is-priority-medium {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.ws-decision-chip.is-priority-high {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #ea580c;
}

.ws-decision-chip.is-priority-urgent {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.ws-decision-chip.is-next-action {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.ws-decision-chip.is-next-action.has-value {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.ws-decision-chip.is-decision-none {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.ws-decision-chip.is-decision-processing {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.ws-decision-chip.is-decision-won {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.ws-decision-chip.is-decision-lost,
.ws-decision-chip.is-decision-not_interested {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

html.theme-dark .ws-decision-chip.is-interest-no_interest,
html.theme-dark .ws-decision-chip.is-priority-urgent,
html.theme-dark .ws-decision-chip.is-decision-lost,
html.theme-dark .ws-decision-chip.is-decision-not_interested {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

html.theme-dark .ws-decision-chip.is-interest-low,
html.theme-dark .ws-decision-chip.is-priority-high {
  background: rgba(234, 88, 12, 0.16);
  border-color: rgba(251, 146, 60, 0.35);
  color: #fdba74;
}

html.theme-dark .ws-decision-chip.is-interest-moderate,
html.theme-dark .ws-decision-chip.is-decision-processing {
  background: rgba(217, 119, 6, 0.16);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fcd34d;
}

html.theme-dark .ws-decision-chip.is-interest-high,
html.theme-dark .ws-decision-chip.is-priority-medium {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.35);
  color: #93c5fd;
}

html.theme-dark .ws-decision-chip.is-interest-very_high,
html.theme-dark .ws-decision-chip.is-priority-low,
html.theme-dark .ws-decision-chip.is-decision-won {
  background: rgba(5, 150, 105, 0.16);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

html.theme-dark .ws-decision-chip.is-next-action.has-value {
  background: rgba(67, 56, 202, 0.2);
  border-color: rgba(129, 140, 248, 0.35);
  color: #a5b4fc;
}

@media (max-width: 980px) {
  .ws-decision-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .ws-decision-highlight-grid {
    grid-template-columns: 1fr;
  }
}

.ws-overview-section .ws-lead-note.is-important {
  border-left: 3px solid var(--os-primary);
  background: color-mix(in srgb, var(--os-primary) 5%, var(--os-surface));
}

.ws-overview-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ws-overview-notes .ws-lead-note {
  margin-top: 0;
}

.ws-lead-todo {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--os-surface-2) 55%, var(--os-surface));
}

.ws-overview-todo-section .ws-lead-todo {
  background: var(--os-surface);
}

.ws-lead-reminders {
  margin: 0;
  padding: 14px 16px 16px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.ws-lead-alerts-panel,
.ws-table-panel.ws-lead-alerts-panel {
  overflow: visible;
}

.ws-lead-reminder-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-lead-reminder-scheduled {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--os-border);
}

.ws-lead-reminder-scheduled-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ws-lead-reminder-scheduled-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--os-accent) 12%, var(--os-surface));
  color: var(--os-accent);
  font-size: 0.72rem;
  font-weight: 750;
}

.ws-lead-reminder-scheduled-empty {
  margin: 0;
  font-size: 0.84rem;
}

.ws-lead-reminder-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 14px;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--os-surface-2) 40%, var(--os-surface));
}

.ws-lead-reminder-item.is-overdue {
  border-color: color-mix(in srgb, #ef4444 35%, var(--os-border));
  background: #fef2f2;
}

.ws-lead-reminder-item.is-scheduled {
  border-color: color-mix(in srgb, #f59e0b 28%, var(--os-border));
  background: linear-gradient(180deg, #fffbeb 0%, #fff 72%);
}

.ws-lead-reminder-item-main {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.ws-lead-reminder-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ws-lead-reminder-item-title {
  color: var(--os-text);
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.35;
}

.ws-lead-reminder-status {
  flex: 0 0 auto;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #475569;
}

.ws-lead-reminder-status.is-scheduled {
  background: #ffedd5;
  color: #c2410c;
}

.ws-lead-reminder-status.is-overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.ws-lead-reminder-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ws-lead-reminder-when-chip,
.ws-lead-reminder-channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  color: var(--os-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.ws-lead-reminder-channel-chip.is-bell {
  color: #1d4ed8;
  border-color: color-mix(in srgb, #2563eb 28%, var(--os-border));
  background: color-mix(in srgb, #2563eb 8%, var(--os-surface));
}

.ws-lead-reminder-channel-chip.is-sms {
  color: #0f766e;
  border-color: color-mix(in srgb, #14b8a6 28%, var(--os-border));
  background: color-mix(in srgb, #14b8a6 8%, var(--os-surface));
}

.ws-lead-reminder-item-preview {
  margin: 0;
  color: var(--os-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.ws-lead-reminder-item-people {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.ws-lead-reminder-item-avatars {
  display: flex;
  align-items: center;
}

.ws-lead-reminder-item-avatar {
  display: inline-flex;
  margin-left: -6px;
}

.ws-lead-reminder-item-avatar:first-child {
  margin-left: 0;
}

.ws-lead-reminder-item-avatar .ws-employee-avatar,
.ws-lead-reminder-item-avatar .ws-employee-avatar img {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid var(--os-surface);
  object-fit: cover;
}

.ws-lead-reminder-item-more {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: -6px;
  border-radius: 999px;
  border: 2px solid var(--os-surface);
  background: #e2e8f0;
  color: #475569;
  font-size: 0.65rem;
  font-weight: 750;
}

.ws-lead-reminder-item-people-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--os-muted);
  font-size: 0.74rem;
}

.ws-lead-reminder-item-people-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-lead-reminder-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ws-lead-reminder-copy strong {
  color: var(--os-text);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.3;
}

.ws-lead-reminder-copy small {
  color: var(--os-muted);
  font-size: 0.75rem;
}

.ws-lead-reminder-copy small em {
  font-style: normal;
  font-weight: 700;
}

.ws-lead-reminder-item.is-overdue .ws-lead-reminder-copy small em {
  color: #b91c1c;
}

.ws-lead-reminder-item.is-scheduled .ws-lead-reminder-copy small em {
  color: #b45309;
}

.ws-lead-reminder-actions {
  flex-shrink: 0;
  padding-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.ws-lead-reminder-actions .ws-btn.is-danger {
  color: #b91c1c;
}

.ws-lead-reminder-actions .ws-btn.is-danger:hover {
  background: color-mix(in srgb, #ef4444 12%, transparent);
  color: #991b1b;
}

.ws-lead-reminder-add {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.ws-lead-reminder-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.ws-lead-reminder-when {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ws-lead-reminder-when .ws-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--os-muted, #64748b);
}

.ws-lead-reminder-when input[type="date"],
.ws-lead-reminder-when input[type="time"] {
  width: auto;
  min-width: 9.5rem;
  max-width: 11rem;
}

.ws-lead-reminder-footer {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--os-border);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ws-lead-reminder-footer .ws-lead-reminder-hint {
  margin: 0;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ws-lead-reminder-footer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.ws-lead-reminder-footer-actions .ws-lead-reminder-send-by {
  flex: 1 1 220px;
  max-width: 280px;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ws-lead-reminder-footer-actions .ws-lead-reminder-send-by .ws-label {
  margin: 0;
}

.ws-lead-reminder-footer-actions .ws-lead-reminder-schedule-btn {
  flex: 0 0 auto;
  align-self: flex-end;
}

.ws-lead-reminder-schedule-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 2.6rem;
  min-width: 8.5rem;
  padding: 0.55rem 1.15rem !important;
  border-radius: 12px;
  font-size: 0.9rem !important;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.ws-lead-reminder-schedule-btn svg {
  flex: 0 0 auto;
}

.ws-lead-reminder-add input[type="text"],
.ws-lead-reminder-add input[type="date"],
.ws-lead-reminder-add input[type="time"],
.ws-lead-reminder-add input[type="datetime-local"],
.ws-lead-reminder-add textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.88rem;
}

.ws-lead-reminder-add textarea {
  min-height: 4.5rem;
  resize: vertical;
  line-height: 1.45;
}

.ws-lead-reminder-add input:focus,
.ws-lead-reminder-add textarea:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.ws-lead-reminder-notify {
  display: grid;
  gap: 10px;
}

.person-select.is-locked .person-select-trigger,
.ws-lead-reminder-picker.is-locked .ws-lead-reminder-picker-trigger {
  opacity: 0.85;
  cursor: default;
  pointer-events: none;
}

.person-select.is-locked .person-select-chevron,
.ws-lead-reminder-picker.is-locked .ws-lead-reminder-picker-chevron,
.ws-lead-reminder-picker.is-locked .ws-lead-reminder-chip-remove {
  display: none !important;
}

.ws-lead-reminder-send-by.is-hidden,
.ws-lead-reminder-send-by[hidden] {
  display: none !important;
}

.ws-lead-reminder-send-by-hint {
  margin: 0;
  font-size: 12px;
}

.ws-lead-reminder-send-by .ws-person-select-field,
.ws-lead-reminder-send-by .person-select {
  width: 100%;
}

.ws-lead-reminder-notify-block {
  display: grid;
  gap: 6px;
}

.ws-lead-reminder-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ws-lead-reminder-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--os-border);
  border-radius: 999px;
  background: var(--os-surface);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--os-text);
}

.ws-lead-reminder-chip input {
  margin: 0;
}

.ws-lead-reminder-chip:has(input:checked) {
  border-color: color-mix(in srgb, var(--os-accent) 45%, var(--os-border));
  background: color-mix(in srgb, var(--os-accent) 10%, var(--os-surface));
  color: var(--os-accent);
}

.ws-lead-reminder-channels {
  display: grid;
  gap: 6px;
}

.ws-lead-reminder-channel-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ws-lead-reminder-channel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ws-lead-reminder-channel input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ws-lead-reminder-channel-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-accent) 10%, var(--os-surface));
  color: var(--os-accent);
}

.ws-lead-reminder-channel-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ws-lead-reminder-channel-copy strong {
  font-size: 0.86rem;
  font-weight: 750;
  color: var(--os-text);
}

.ws-lead-reminder-channel-copy small {
  font-size: 0.72rem;
  color: var(--os-muted);
  line-height: 1.3;
}

.ws-lead-reminder-channel.is-selected,
.ws-lead-reminder-channel:has(input:checked) {
  border-color: color-mix(in srgb, var(--os-accent) 55%, var(--os-border));
  background: color-mix(in srgb, var(--os-accent) 8%, var(--os-surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--os-accent) 18%, transparent);
}

.ws-lead-reminder-channel.is-selected .ws-lead-reminder-channel-icon,
.ws-lead-reminder-channel:has(input:checked) .ws-lead-reminder-channel-icon {
  background: var(--os-accent);
  color: #fff;
}

@media (max-width: 720px) {
  .ws-lead-reminder-channel-list {
    grid-template-columns: 1fr;
  }
}

.ws-lead-reminder-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ws-sms-blast-message-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ws-lead-reminder-message-head .ws-sms-templates {
  margin: 0;
}

.ws-lead-reminder-picker {
  position: relative;
  display: grid;
  gap: 8px;
}

.ws-lead-reminder-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.ws-lead-reminder-picker-trigger:hover,
.ws-lead-reminder-picker.is-open .ws-lead-reminder-picker-trigger {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.28);
}

.ws-lead-reminder-picker-trigger-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ws-lead-reminder-picker-trigger-avatar .ws-employee-avatar,
.ws-lead-reminder-picker-trigger-avatar .ws-employee-avatar img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
}

.ws-lead-reminder-picker-chevron {
  flex: 0 0 auto;
  color: var(--os-muted);
  transition: transform 0.15s ease;
}

.ws-lead-reminder-picker.is-open .ws-lead-reminder-picker-chevron {
  transform: rotate(180deg);
}

.ws-lead-reminder-picker-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.ws-lead-reminder-picker-menu.is-ported {
  position: fixed;
  top: auto;
  left: auto;
  right: auto;
  z-index: 10050;
  overflow: auto;
  overscroll-behavior: contain;
}

.ws-lead-reminder-picker-search-wrap {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--os-surface);
  padding-bottom: 2px;
}

.ws-lead-reminder-picker-search {
  width: 100%;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  background: var(--os-bg, #f8fafc);
  color: var(--os-text);
  font: inherit;
  font-size: 0.84rem;
}

.ws-lead-reminder-picker-options {
  display: grid;
  gap: 4px;
}

.ws-lead-reminder-picker-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--os-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ws-lead-reminder-picker-option:hover,
.ws-lead-reminder-picker-option:focus-visible {
  background: color-mix(in srgb, var(--os-accent) 10%, var(--os-surface));
  outline: none;
}

.ws-lead-reminder-picker-option.is-no-phone {
  opacity: 0.72;
}

.ws-lead-reminder-picker-option .ws-lead-reminder-person-avatar .ws-employee-avatar,
.ws-lead-reminder-picker-option .ws-lead-reminder-person-avatar .ws-employee-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
}

.ws-lead-reminder-picker-empty-msg {
  margin: 0;
  padding: 8px 6px;
  font-size: 0.8rem;
  color: var(--os-muted);
}

.ws-lead-reminder-picker select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.86rem;
}

.ws-lead-reminder-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

.ws-lead-reminder-picker-empty {
  margin: 0;
  font-size: 0.8rem;
}

.ws-lead-reminder-chip-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: min(220px, 100%);
  padding: 8px 10px;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--os-accent) 6%, var(--os-surface));
}

.ws-lead-reminder-chip-card.is-no-phone {
  background: #fffbeb;
  border-color: color-mix(in srgb, #f59e0b 28%, var(--os-border));
}

.ws-lead-reminder-chip-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--os-muted);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.ws-lead-reminder-chip-remove:hover {
  background: color-mix(in srgb, #ef4444 12%, transparent);
  color: #b91c1c;
}

.ws-lead-reminder-notify-block.is-disabled {
  opacity: 0.48;
  filter: grayscale(0.35);
  pointer-events: none;
}

.ws-lead-reminder-notify-block.is-disabled .ws-label::after {
  content: ' ? enable SMS to use';
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--os-muted);
}

.ws-lead-reminder-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding: 2px;
}

.ws-lead-reminder-person {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ws-lead-reminder-person:hover {
  border-color: color-mix(in srgb, var(--os-accent) 35%, var(--os-border));
  background: color-mix(in srgb, var(--os-accent) 5%, var(--os-surface));
}

.ws-lead-reminder-person input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ws-lead-reminder-person-avatar .ws-employee-avatar,
.ws-lead-reminder-person-avatar .ws-employee-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 750;
  background: color-mix(in srgb, var(--os-accent) 12%, var(--os-surface));
  color: var(--os-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--os-border) 70%, transparent);
}

.ws-lead-reminder-person-avatar .ws-employee-avatar.is-empty {
  color: var(--os-muted);
}

.ws-lead-reminder-person-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ws-lead-reminder-person-meta strong {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--os-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-lead-reminder-person-meta small {
  font-size: 0.72rem;
  color: var(--os-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-lead-reminder-person.is-no-phone .ws-lead-reminder-person-meta small {
  color: #b45309;
}

.ws-lead-reminder-person-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1.5px solid var(--os-border);
  color: transparent;
  background: var(--os-surface);
  flex-shrink: 0;
}

.ws-lead-reminder-person.is-selected,
.ws-lead-reminder-person:has(input:checked) {
  border-color: color-mix(in srgb, var(--os-accent) 55%, var(--os-border));
  background: color-mix(in srgb, var(--os-accent) 10%, var(--os-surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--os-accent) 20%, transparent);
}

.ws-lead-reminder-person.is-selected .ws-lead-reminder-person-check,
.ws-lead-reminder-person:has(input:checked) .ws-lead-reminder-person-check {
  border-color: var(--os-accent);
  background: var(--os-accent);
  color: #fff;
}

.ws-lead-reminder-targets,
.ws-lead-reminder-hint {
  display: block;
  margin-top: 2px;
}

.ws-lead-reminder-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

@media (max-width: 720px) {
  .ws-lead-reminder-add-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ws-lead-reminder-when input[type="date"],
  .ws-lead-reminder-when input[type="time"] {
    max-width: none;
    width: 100%;
  }

  .ws-lead-reminder-footer {
    gap: 10px;
  }

  .ws-lead-reminder-footer-actions {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

  .ws-lead-reminder-footer-actions .ws-lead-reminder-send-by {
    max-width: none;
    width: 100%;
  }

  .ws-lead-reminder-schedule-btn {
    width: 100%;
  }

  .ws-sms-blast-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ws-sms-blast-actions .ws-sms-blast-send-by {
    max-width: none;
    width: 100%;
  }

  .ws-sms-blast-actions .ws-btn {
    width: 100%;
  }

  .ws-lead-reminder-item {
    flex-direction: column;
    align-items: stretch;
  }

  .ws-lead-reminder-actions {
    width: 100%;
  }

  .ws-lead-reminder-actions .ws-btn {
    width: 100%;
  }
}

html.theme-dark .ws-lead-reminder-item.is-overdue {
  background: rgba(127, 29, 29, 0.28);
  border-color: rgba(248, 113, 113, 0.28);
}

html.theme-dark .ws-lead-reminder-item.is-scheduled {
  background: rgba(120, 53, 15, 0.28);
  border-color: rgba(251, 191, 36, 0.28);
}

.ws-sms-blast {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: none;
}

.ws-sms-blast-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface, #fff);
  width: 100%;
  box-sizing: border-box;
}

.ws-sms-blast-form textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid #93c5fd;
  border-radius: 12px;
  background: var(--os-surface, #fff);
  color: var(--os-text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ws-sms-blast-form textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.ws-sms-blast-recipients {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.ws-sms-blast-recipients > .ws-lead-reminder-notify-block {
  grid-column: span 6;
  min-width: 0;
}

.ws-sms-blast-send-by {
  flex: 1 1 220px;
  max-width: 280px;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ws-sms-blast-send-by.is-hidden,
.ws-sms-blast-send-by[hidden] {
  display: none !important;
}

.ws-sms-blast-send-by .ws-label {
  margin: 0;
}

.ws-sms-blast-send-by .ws-person-select-field,
.ws-sms-blast-send-by .person-select {
  width: 100%;
}

.ws-sms-blast-form .ws-lead-reminder-add-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.ws-sms-blast-form .ws-lead-reminder-add-row .ws-lead-reminder-when {
  grid-column: span 3;
}

.ws-sms-blast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: flex-end;
}

.ws-sms-blast-outbox {
  display: grid;
  gap: 10px;
  width: 100%;
}

.ws-sms-blast-history {
  display: grid;
  gap: 10px;
  width: 100%;
}

.ws-sms-blast-history .ws-sms-history {
  margin-top: 8px;
  padding-top: 18px;
}

.ws-sms-blast-outbox-list {
  display: grid;
  gap: 8px;
}

.ws-sms-blast-outbox-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface, #fff);
}

.ws-sms-blast-outbox-item.is-sent {
  border-color: color-mix(in srgb, #22c55e 40%, var(--os-border));
  background: #f0fdf4;
}

.ws-sms-blast-outbox-item.is-failed {
  border-color: color-mix(in srgb, #ef4444 40%, var(--os-border));
  background: #fef2f2;
}

.ws-sms-blast-outbox-item.is-scheduled {
  border-color: color-mix(in srgb, #f59e0b 35%, var(--os-border));
  background: #fffbeb;
}

.ws-sms-blast-outbox-aside {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.ws-reminder-dispatch-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.ws-reminder-dispatch-pill.is-sent {
  color: #15803d;
  background: #dcfce7;
  border-color: #86efac;
}

.ws-reminder-dispatch-pill.is-failed {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fca5a5;
}

.ws-reminder-dispatch-pill.is-scheduled {
  color: #b45309;
  background: #fef3c7;
  border-color: #fcd34d;
}

.ws-reminder-dispatch-pill.is-skipped {
  color: #64748b;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.ws-sms-blast-outbox-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ws-sms-blast-outbox-copy strong {
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-sms-blast-outbox-copy small,
.ws-sms-blast-empty,
.ws-sms-blast-picker-empty {
  color: var(--os-muted, #64748b);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .ws-sms-blast-recipients > .ws-lead-reminder-notify-block,
  .ws-sms-blast-form .ws-lead-reminder-add-row .ws-lead-reminder-when {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  .ws-sms-blast-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ws-sms-blast-actions .ws-sms-blast-send-by {
    max-width: none;
    width: 100%;
  }

  .ws-sms-blast-actions .ws-btn {
    width: 100%;
  }

  .ws-sms-blast-outbox-item {
    flex-direction: column;
    align-items: stretch;
  }
}

.ws-lead-todo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ws-overview-todo-section .ws-lead-todo-head {
  display: none;
}

.ws-lead-todo-head .ws-label {
  margin: 0;
}

.ws-todo-progress-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.ws-todo-progress {
  position: relative;
  display: flex;
  align-items: center;
  height: 26px;
  min-width: 0;
  margin: 0;
  border-radius: 9px;
  background: color-mix(in srgb, var(--os-border) 78%, transparent);
  overflow: hidden;
}

.ws-todo-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb 55%, #1d4ed8);
  transition: width 0.25s ease;
}

.ws-todo-progress > em {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--os-muted);
  line-height: 1;
  pointer-events: none;
}

.ws-todo-progress:not(.is-empty) > em {
  color: #fff;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
}

.ws-todo-progress.is-empty > span {
  width: 0 !important;
}

.ws-todo-progress-count {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--os-muted);
  white-space: nowrap;
}

.ws-todo-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--os-surface);
}

.ws-todo-empty {
  padding: 12px 12px;
  color: var(--os-muted);
  font-size: 0.84rem;
}

.ws-todo-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 8px 9px 12px;
  border-radius: 0;
  border-bottom: 1px solid var(--os-border);
}

.ws-todo-item:last-child {
  border-bottom: none;
}

.ws-todo-item:hover {
  background: color-mix(in srgb, var(--os-text) 3.5%, transparent);
}

.ws-todo-check {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.ws-todo-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--os-primary);
  flex: 0 0 auto;
}

.ws-todo-text {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--os-text);
}

.ws-todo-item.is-done .ws-todo-text {
  text-decoration: line-through;
  color: var(--os-muted);
}

.ws-todo-del {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ws-todo-item:hover .ws-todo-del,
.ws-todo-del:focus-visible {
  opacity: 1;
}

.ws-todo-del:hover {
  background: #fef2f2;
  color: #dc2626;
}

.ws-todo-del:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

.ws-todo-del:active {
  background: #fee2e2;
  color: #b91c1c;
}

.ws-todo-add {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--os-border) 85%, transparent);
}

.ws-todo-add input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--os-border);
  border-radius: 8px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.86rem;
}

.ws-todo-add input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--os-primary) 55%, var(--os-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--os-primary) 16%, transparent);
}

.task-list-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.task-list-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--os-muted);
}

.task-list-field .ws-todo-add {
  margin-top: 0.55rem;
  padding-top: 0;
  border-top: 0;
  align-items: stretch;
}

.task-list-field .ws-todo-add .btn,
.ws-todo-add .btn {
  height: 36px;
  min-height: 36px;
  padding: 0 0.9rem !important;
  font-size: 0.8rem !important;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: none;
  transform: none;
  flex-shrink: 0;
  align-self: stretch;
}

.task-list-field .ws-todo-add .btn:hover,
.ws-todo-add .btn:hover {
  transform: none;
  box-shadow: none;
}

/* Table panel */
.ws-table-panel {
  background: var(--os-surface);
  border-radius: 12px;
  border: 1px solid var(--os-border);
  padding: 18px;
}

.ws-cross-search {
  margin-top: 18px;
  border-radius: 12px;
  border: 1px dashed var(--os-border);
  background: var(--os-soft, #f8fafc);
  padding: 16px 18px 14px;
  box-shadow: none;
}

.ws-cross-search.is-customer {
  border-color: #86efac;
  background:
    linear-gradient(180deg, rgba(22, 163, 74, 0.07), rgba(22, 163, 74, 0.02)),
    var(--os-soft, #f8fafc);
  border-left: 4px solid #16a34a;
}

.ws-cross-search.is-lead {
  border-color: #fdba74;
  background:
    linear-gradient(180deg, rgba(194, 65, 12, 0.08), rgba(194, 65, 12, 0.02)),
    var(--os-soft, #f8fafc);
  border-left: 4px solid #c2410c;
}

.ws-cross-search-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ws-cross-search-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--os-muted, #64748b);
  margin-bottom: 4px;
}

.ws-cross-search-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--os-text, #0f172a);
  line-height: 1.35;
}

.ws-cross-search-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

.ws-cross-search-pill.is-customer {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.ws-cross-search-pill.is-lead {
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #fdba74;
}

.ws-cross-search-count {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 650;
  color: var(--os-muted, #64748b);
  white-space: nowrap;
}

.ws-cross-search-table {
  background: var(--os-surface, #fff);
  border: 1px solid var(--os-border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
}

.ws-cross-search-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--os-muted, #64748b);
}

.ws-cross-search-open {
  display: grid;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}

.ws-cross-search-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ws-cross-search-open:hover strong {
  color: var(--os-primary, #2563eb);
}

.ws-cross-search-open small {
  color: var(--os-muted, #64748b);
  font-size: 12px;
  font-weight: 400;
}

.ws-cross-search-empty {
  padding: 18px 8px 8px;
  text-align: center;
}

.ws-cross-search-empty strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: var(--os-text, #0f172a);
}

.ws-cross-search-empty p {
  margin: 6px auto 0;
  max-width: 420px;
  font-size: 13px;
  color: var(--os-muted, #64748b);
  line-height: 1.45;
}

.ws-cross-search-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--os-border, #e2e8f0);
  font-size: 12px;
  color: var(--os-muted, #64748b);
  line-height: 1.45;
}

.ws-cross-search.is-customer .ws-cross-search-foot {
  border-top-color: #bbf7d0;
}

.ws-cross-search.is-lead .ws-cross-search-foot {
  border-top-color: #fed7aa;
}

.ws-cross-search-goto {
  appearance: none;
  border: 1px solid var(--os-border, #e2e8f0);
  background: var(--os-surface, #fff);
  color: var(--os-text, #0f172a);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
}

.ws-cross-search.is-customer .ws-cross-search-goto {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.ws-cross-search.is-lead .ws-cross-search-goto {
  border-color: #fdba74;
  color: #9a3412;
  background: #fff7ed;
}

.ws-cross-search-goto:hover {
  filter: brightness(0.98);
}

html.theme-dark .ws-cross-search {
  background: rgba(15, 23, 42, 0.45);
}

html.theme-dark .ws-cross-search.is-customer {
  border-color: rgba(34, 197, 94, 0.45);
  background:
    linear-gradient(180deg, rgba(22, 163, 74, 0.14), rgba(22, 163, 74, 0.04)),
    rgba(15, 23, 42, 0.45);
}

html.theme-dark .ws-cross-search.is-lead {
  border-color: rgba(251, 146, 60, 0.45);
  background:
    linear-gradient(180deg, rgba(194, 65, 12, 0.16), rgba(194, 65, 12, 0.04)),
    rgba(15, 23, 42, 0.45);
}

html.theme-dark .ws-cross-search-table {
  background: var(--os-surface);
}

html.theme-dark .ws-cross-search-goto {
  background: var(--os-surface);
}

.ws-table-wrap {
  overflow-x: auto;
}

.ws-followup-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.ws-engagement-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: end;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--os-border, #e2e8f0);
  border-radius: 14px;
  background: var(--os-soft, #f8fafc);
}

.ws-engagement-filter-field {
  display: grid;
  gap: 6px;
  min-width: 140px;
}

.ws-engagement-filter-field.is-grow {
  flex: 1 1 220px;
  min-width: 180px;
}

.ws-engagement-filter-field.is-hidden {
  display: none;
}

.ws-engagement-filter-field input,
.ws-engagement-filter-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--os-border, #e2e8f0);
  border-radius: 10px;
  background: var(--os-surface, #fff);
  color: var(--os-text, #0f172a);
  font: inherit;
  font-size: 0.9rem;
}

.ws-engagement-filter-field input[readonly] {
  cursor: text;
}

.ws-swal-autofill-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ws-engagement-filter-field input:focus,
.ws-engagement-filter-field select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.ws-engagement-filter-actions {
  display: flex;
  align-items: end;
  padding-bottom: 2px;
}

.ws-engagement-filter-meta {
  margin-top: 12px;
  font-size: 0.82rem;
}

.ws-followup-entry {
  --followup-marker-x: 154px;
  position: relative;
  display: grid;
  grid-template-columns: 128px 32px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 14px;
}

.ws-followup-entry:not(:last-child)::before {
  content: "";
  position: absolute;
  left: var(--followup-marker-x);
  /* Run from this marker's center through to the next marker's center */
  top: 28px;
  bottom: -28px;
  width: 2px;
  background: #1c7cff; /* Scheduled ? blue */
  z-index: 0;
}

.ws-followup-entry.is-scheduled:not(:last-child)::before {
  background: #1c7cff;
}

.ws-followup-entry.is-completed:not(:last-child)::before {
  background: #22c55e; /* Completed ? green */
}

.ws-followup-entry.is-overdue:not(:last-child)::before {
  background: #eab308; /* Overdue ? amber/yellow */
}

.ws-followup-entry.is-canceled:not(:last-child)::before {
  background: #ef4444; /* Canceled ? red */
}

.ws-followup-marker {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  background: #1c7cff; /* Scheduled ? blue */
  color: #fff;
  box-shadow: 0 0 0 3px var(--os-surface, #fff);
}

.ws-followup-marker svg {
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
}

.ws-followup-marker svg.ws-icon-whatsapp,
.ws-followup-method svg.ws-icon-whatsapp,
.ws-activity-marker svg.ws-icon-whatsapp {
  fill: currentColor;
  stroke: none;
}

.ws-followup-entry.is-scheduled .ws-followup-marker {
  background: #1c7cff;
}

.ws-followup-entry.is-completed .ws-followup-marker {
  background: #22c55e;
}

.ws-followup-entry.is-overdue .ws-followup-marker {
  background: #eab308;
}

.ws-followup-entry.is-canceled .ws-followup-marker {
  background: #ef4444;
}

.ws-followup-entry:last-child .ws-followup-date {
  color: #94a3b8;
}

.ws-document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

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

.ws-activity-timeline {
  display: grid;
  margin-top: 18px;
}

.audit-log-shell {
  padding: 0.25rem 0 1.5rem;
}

.audit-log-panel {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 18px;
  padding: 1.1rem 1.2rem 1.25rem;
  box-shadow: var(--os-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04));
}

.audit-log-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1rem 0 0.35rem;
}

.audit-log-toolbar-left,
.audit-log-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.audit-log-toolbar .ws-search {
  min-width: 220px;
}

.audit-log-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--os-muted);
}

.audit-log-timeline.ws-activity-timeline {
  margin-top: 1rem;
}

.audit-log-entry.ws-activity-entry {
  --audit-marker-x: 147px;
  grid-template-columns: 128px 20px minmax(0, 1fr);
}

.audit-log-entry.ws-activity-entry:not(:last-child)::before {
  left: var(--audit-marker-x);
  top: 16px;
}

.audit-log-when {
  margin-top: 12px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--os-muted);
  line-height: 1.35;
}

.audit-log-entry .ws-activity-card {
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: #fff;
  padding: 0.85rem 1rem;
}

.audit-log-entry.is-latest .ws-activity-card {
  border-color: #94a3b8;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.audit-log-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.audit-log-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.audit-log-pill.is-module {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.audit-log-pill.is-entity {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.audit-log-pill.is-action.is-create,
.audit-log-pill.is-action.is-activate {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.audit-log-pill.is-action.is-update,
.audit-log-pill.is-action.is-move {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
}

.audit-log-pill.is-action.is-delete,
.audit-log-pill.is-action.is-deactivate {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.audit-log-entry.is-delete .ws-activity-marker,
.audit-log-entry.is-deactivate .ws-activity-marker {
  background: #ef4444;
}

.audit-log-entry.is-move .ws-activity-marker,
.audit-log-entry.is-update .ws-activity-marker {
  background: #3b82f6;
}

.audit-log-entry.is-create .ws-activity-marker,
.audit-log-entry.is-activate .ws-activity-marker {
  background: #22c55e;
}

html.theme-dark .audit-log-panel,
html.theme-dark .audit-log-entry .ws-activity-card {
  background: var(--os-surface);
  border-color: var(--os-border);
}

@media (max-width: 820px) {
  .audit-log-entry.ws-activity-entry {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .audit-log-when {
    grid-column: 2;
    text-align: left;
    margin: 0 0 0.2rem;
  }

  .audit-log-entry.ws-activity-entry:not(:last-child)::before {
    left: 7px;
  }

  .audit-log-entry .ws-activity-marker {
    grid-row: 2;
  }
}

.ws-activity-entry {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 14px;
}

.ws-activity-timeline.is-global .ws-activity-entry,
.ws-activity-timeline.is-compact .ws-activity-entry {
  grid-template-columns: 132px 36px minmax(0, 1fr);
  gap: 10px 14px;
  padding-bottom: 18px;
}

.ws-activity-entry:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 15px;
  bottom: -1px;
  width: 2px;
  background: var(--os-border);
}

.ws-activity-timeline.is-global .ws-activity-entry:not(:last-child)::before,
.ws-activity-timeline.is-compact .ws-activity-entry:not(:last-child)::before {
  left: calc(132px + 17px);
  top: 28px;
}

.ws-activity-when {
  margin-top: 12px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--os-muted);
  line-height: 1.35;
}

.ws-activity-marker {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin-top: 14px;
  border: 4px solid var(--os-surface);
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 1px var(--os-border);
  color: #fff;
  display: grid;
  place-items: center;
}

.ws-activity-timeline.is-global .ws-activity-marker,
.ws-activity-timeline.is-compact .ws-activity-marker {
  width: 34px;
  height: 34px;
  margin-top: 8px;
  border-width: 3px;
}

.ws-activity-marker svg {
  display: block;
}

.ws-activity-entry.is-call .ws-activity-marker { background: #2563eb; }
.ws-activity-entry.is-sms .ws-activity-marker { background: #0891b2; }
.ws-activity-entry.is-whatsapp .ws-activity-marker { background: #16a34a; }
.ws-activity-entry.is-email .ws-activity-marker { background: #0284c7; }
.ws-activity-entry.is-meeting .ws-activity-marker,
.ws-activity-entry.is-online_meeting .ws-activity-marker { background: #7c3aed; }
.ws-activity-entry.is-physical_meeting .ws-activity-marker,
.ws-activity-entry.is-visit .ws-activity-marker { background: #ea580c; }
.ws-activity-entry.is-instagram .ws-activity-marker { background: #db2777; }
.ws-activity-entry.is-messenger .ws-activity-marker { background: #2563eb; }
.ws-activity-entry.is-linkedin .ws-activity-marker { background: #0369a1; }
.ws-activity-entry.is-status_change .ws-activity-marker { background: #0f172a; }
.ws-activity-entry.is-system .ws-activity-marker { background: #64748b; }
.ws-activity-entry.is-note .ws-activity-marker,
.ws-activity-entry.is-other .ws-activity-marker { background: #475569; }
.ws-activity-entry.is-voice_note .ws-activity-marker { background: #9333ea; }

.ws-activity-entry.is-clickable {
  cursor: pointer;
}

.ws-activity-entry.is-clickable:hover .ws-activity-card {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.ws-activity-card {
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--os-border);
  border-radius: 11px;
  background: var(--os-surface);
}

.ws-activity-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ws-activity-card-head > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ws-activity-next-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: min(52%, 280px);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-activity-next-tag b {
  font-weight: 800;
  flex-shrink: 0;
}

.ws-activity-card-foot {
  margin-top: 8px;
}

.ws-activity-card h4 {
  margin: 6px 0 0;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.3;
}

.ws-activity-card p {
  margin: 6px 0 0;
  color: var(--os-muted);
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ws-activities-panel .ws-activity-timeline {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .ws-activity-timeline.is-global .ws-activity-entry,
  .ws-activity-timeline.is-compact .ws-activity-entry {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .ws-activity-timeline.is-global .ws-activity-when,
  .ws-activity-timeline.is-compact .ws-activity-when {
    grid-column: 2;
    margin-top: 0;
    text-align: left;
    order: -1;
  }

  .ws-activity-timeline.is-global .ws-activity-entry:not(:last-child)::before,
  .ws-activity-timeline.is-compact .ws-activity-entry:not(:last-child)::before {
    left: 13px;
    top: 34px;
  }

  .ws-activity-timeline.is-global .ws-activity-marker,
  .ws-activity-timeline.is-compact .ws-activity-marker {
    grid-row: 1 / span 2;
    margin-top: 2px;
  }
}

.ws-activity-card-head time,
.ws-activity-card small {
  color: var(--os-muted);
  font-size: 11px;
}

.ws-activity-type {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ws-activity-card h4 {
  margin: 7px 0 3px;
  font-size: 14px;
}

.ws-activity-card p {
  margin: 0 0 8px;
  color: var(--os-text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ws-document-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
}

.ws-document-preview {
  position: relative;
  height: 168px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--os-surface-2);
}

.ws-document-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ws-document-preview-icon {
  font-size: 42px;
  filter: grayscale(0.15);
}

.ws-document-preview-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 280%;
  border: 0;
  background: #fff;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: top left;
}

.ws-document-preview.is-text .ws-document-preview-frame {
  width: 180%;
  height: 240%;
  transform: scale(0.56);
}

.ws-document-type {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  pointer-events: none;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.ws-document-preview-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.ws-document-info {
  display: grid;
  gap: 4px;
  padding: 12px 13px 8px;
  min-width: 0;
}

.ws-document-info strong,
.ws-document-info span,
.ws-document-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-document-info span {
  color: var(--os-muted);
  font-size: 12px;
}

.ws-document-info small {
  color: var(--os-muted);
  font-size: 11px;
}

.ws-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 10px 11px;
}

.ws-document-actions .ws-btn {
  padding: 6px 8px;
  font-size: 11px;
}

.ws-document-actions .is-danger {
  color: #dc2626;
}

.ws-document-empty {
  min-height: 230px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  margin-top: 16px;
  border: 1px dashed var(--os-border);
  border-radius: 12px;
  color: var(--os-muted);
  text-align: center;
}

.ws-document-empty > span {
  font-size: 42px;
}

.ws-document-empty p {
  margin: 0;
  font-size: 12px;
}

.ws-sms-panel .ws-sms-compose {
  margin-top: 4px;
  padding: 16px;
  border: 1px solid #93c5fd;
  border-radius: 16px;
  background: color-mix(in srgb, var(--os-surface-2) 45%, var(--os-surface));
  display: grid;
  gap: 16px;
}

.ws-sms-panel {
  overflow: visible;
}

.ws-sms-panel > .ws-section-head {
  padding: 1rem 1.15rem 0.35rem;
}

.ws-sms-panel-body {
  display: grid;
  gap: 1rem;
  padding: 0 1.15rem 1.25rem;
  box-sizing: border-box;
  width: 100%;
}

.ws-sms-lead-section {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  border: 1px solid #93c5fd;
  border-radius: 16px;
  background: var(--os-surface, #fff);
  box-sizing: border-box;
  width: 100%;
}

.ws-sms-lead-section .ws-sms-blast-outbox-list,
.ws-sms-lead-section .ws-sms-history {
  margin: 0;
}

.ws-sms-editor {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--os-border);
}

.ws-sms-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ws-sms-editor-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.ws-sms-editor textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid #93c5fd;
  border-radius: 14px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ws-sms-editor textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.ws-sms-char-count {
  color: var(--os-muted);
  font-size: 0.75rem;
}

.ws-sms-char-count.is-over {
  color: #dc2626;
  font-weight: 600;
}

.ws-sms-templates {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ws-sms-tool-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ws-sms-tool-btn svg {
  flex: 0 0 auto;
  opacity: 0.85;
}

.ws-sms-tool-btn:hover {
  border-color: color-mix(in srgb, var(--os-accent) 40%, var(--os-border));
  background: color-mix(in srgb, var(--os-accent) 6%, var(--os-surface));
  color: var(--os-accent);
}

.ws-sms-tool-btn.is-accent {
  border-color: color-mix(in srgb, #0f766e 35%, var(--os-border));
  background: color-mix(in srgb, #0f766e 8%, var(--os-surface));
  color: #0f766e;
}

.ws-sms-tool-btn.is-accent:hover {
  border-color: #0f766e;
  background: color-mix(in srgb, #0f766e 14%, var(--os-surface));
  color: #0f766e;
}

.ws-sms-chooser-modal {
  width: min(820px, calc(100vw - 2rem));
  max-width: 820px;
  height: min(82vh, 720px);
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#os-sms-template-chooser {
  z-index: 10000;
  pointer-events: auto;
}

#os-sms-template-chooser .modal-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#os-sms-template-chooser .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#os-sms-template-chooser .modal-head,
#os-sms-template-chooser .modal-foot {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}

.ws-sms-chooser {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.ws-sms-chooser-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  padding-bottom: 2px;
}

.ws-sms-chooser-hint {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--os-text-muted, #64748b);
}

.ws-sms-chooser-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.8fr);
  gap: 10px;
  flex: 0 0 auto;
  align-items: end;
}

@media (max-width: 640px) {
  .ws-sms-chooser-filters {
    grid-template-columns: 1fr;
  }
}

.ws-sms-chooser-search {
  display: grid;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
}

.ws-sms-chooser-cat-filter {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ws-sms-chooser-cat-filter select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.9rem;
}

.ws-sms-chooser-cat-filter select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.ws-sms-chooser-search input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.9rem;
}

.ws-sms-chooser-search input[type="search"]:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.ws-sms-chooser-list {
  display: grid;
  gap: 14px;
  padding: 2px 2px 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ws-sms-chooser-lang-block {
  display: grid;
  gap: 8px;
}

.ws-sms-chooser-lang-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.ws-sms-chooser-lang-head strong {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--os-text);
}

.ws-sms-chooser-lang-head span {
  font-size: 0.72rem;
  color: var(--os-text-muted, #64748b);
}

.ws-sms-chooser-cat {
  display: grid;
  gap: 8px;
}

.ws-sms-chooser-cat + .ws-sms-chooser-cat {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--os-border, #e2e8f0);
}

.ws-sms-chooser-cat-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--os-text-muted, #64748b);
  cursor: pointer;
}

.ws-sms-chooser-cat-head span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--os-muted, #64748b);
  background: var(--os-soft, #f1f5f9);
  border-radius: 999px;
  padding: 1px 7px;
}

.ws-sms-chooser-cat-head:hover,
.ws-sms-chooser-cat-head.is-active {
  color: #1d4ed8;
}

.ws-sms-chooser-cat-head.is-active span {
  color: #1d4ed8;
  background: #eff6ff;
}

.ws-sms-chooser-lang-items {
  display: grid;
  gap: 8px;
}

.ws-sms-chooser-item {
  position: relative;
  display: grid;
  gap: 6px;
  text-align: left;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ws-sms-chooser-item:hover {
  border-color: color-mix(in srgb, var(--os-accent) 40%, var(--os-border));
}

.ws-sms-chooser-item.is-selected {
  border-color: color-mix(in srgb, var(--os-accent) 55%, var(--os-border));
  background: color-mix(in srgb, var(--os-accent) 8%, var(--os-surface));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--os-accent) 12%, transparent);
}

.ws-sms-chooser-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ws-sms-chooser-item-head strong {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  min-width: 0;
  padding-right: 4px;
}

.ws-sms-chooser-edit {
  appearance: none;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: -2px -2px 0 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--os-accent) 28%, var(--os-border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--os-accent) 8%, var(--os-surface));
  color: var(--os-accent);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ws-sms-chooser-edit:hover {
  border-color: var(--os-accent);
  background: color-mix(in srgb, var(--os-accent) 14%, var(--os-surface));
  color: var(--os-accent);
}

.ws-sms-chooser-item span {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--os-text-muted, #64748b);
}

.ws-sms-chooser-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--os-muted);
  font-size: 0.88rem;
  border: 1px dashed var(--os-border);
  border-radius: 12px;
}

.ws-sms-chooser-foot {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.ws-sms-chooser-foot-actions {
  display: inline-flex;
  gap: 0.55rem;
  margin-left: auto;
}

.ws-sms-chooser-new {
  border-color: color-mix(in srgb, #0f766e 40%, var(--os-border));
  background: color-mix(in srgb, #0f766e 10%, var(--os-surface));
  color: #0f766e;
  font-weight: 700;
}

.ws-sms-chooser-new:hover {
  border-color: #0f766e;
  background: color-mix(in srgb, #0f766e 16%, var(--os-surface));
  color: #0f766e;
}

.ws-sms-placeholder-rules {
  display: grid;
  gap: 8px;
}

.ws-sms-placeholder-rules p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--os-text);
}

.ws-sms-placeholder-rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.ws-sms-placeholder-rules li {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--os-text-muted, #64748b);
}

.ws-sms-placeholder-rules code {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--os-accent) 10%, var(--os-surface));
  color: var(--os-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.ws-sms-placeholder-tip {
  margin-top: 2px !important;
  padding-top: 8px;
  border-top: 1px dashed var(--os-border);
  color: var(--os-text-muted, #64748b) !important;
}

.ws-sms-lang-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  border-radius: 999px;
  background: var(--os-surface);
  border: 1px solid var(--os-border);
}

.ws-sms-lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--os-text-muted, #64748b);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.ws-sms-lang-btn.is-active {
  background: var(--os-accent);
  color: #fff;
}

.ws-sms-lang-btn[data-order]::after {
  content: attr(data-order);
  display: inline-grid;
  place-items: center;
  min-width: 1rem;
  height: 1rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--os-accent) 16%, transparent);
  color: var(--os-accent);
}

.ws-sms-lang-btn.is-active[data-order]::after {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.ws-sms-lang-btn[data-picked="1"] {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--os-accent) 45%, transparent);
}

.ws-sms-recipients-block {
  display: grid;
  gap: 10px;
}

.ws-sms-recipients-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ws-sms-recipients-head .ws-muted {
  margin: 2px 0 0;
  font-size: 0.78rem;
}

.ws-sms-recipients-tools {
  display: inline-flex;
  gap: 6px;
}

.ws-sms-recipient-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.ws-sms-recipient-row {
  position: relative;
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: start;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ws-sms-recipient-row:hover {
  border-color: color-mix(in srgb, var(--os-accent) 35%, var(--os-border));
}

.ws-sms-recipient-row.is-selected {
  border-color: color-mix(in srgb, var(--os-accent) 45%, var(--os-border));
  background: color-mix(in srgb, var(--os-accent) 8%, var(--os-surface));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--os-accent) 10%, transparent);
}

.ws-sms-recipient-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ws-sms-recipient-check {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 4px;
  border: 1.5px solid var(--os-border);
  background: var(--os-surface);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.ws-sms-recipient-row.is-selected .ws-sms-recipient-check {
  border-color: var(--os-accent);
  background: var(--os-accent);
}

.ws-sms-recipient-row.is-selected .ws-sms-recipient-check::after {
  content: '';
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) translateY(-0.5px);
}

.ws-sms-recipient-meta {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.ws-sms-recipient-meta strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--os-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-sms-recipient-meta em {
  font-style: normal;
  color: var(--os-muted);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .ws-sms-recipient-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ws-sms-recipient-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ws-sms-recipients-empty {
  padding: 16px;
  border: 1px dashed var(--os-border);
  border-radius: 12px;
  color: var(--os-muted);
  text-align: center;
  font-size: 0.85rem;
}

.ws-sms-compose-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ws-crm-reminders {
  width: 100%;
  max-width: none;
  display: grid;
  gap: 1.15rem;
}

.ws-crm-remind-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.25rem;
}

.ws-crm-remind-hero-copy {
  min-width: min(100%, 28rem);
  flex: 1 1 18rem;
}

.ws-crm-remind-hero-copy h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--os-text);
}

.ws-crm-remind-hero-copy p {
  margin: 0;
  max-width: 42rem;
  line-height: 1.45;
}

.ws-crm-remind-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ws-crm-remind-stat {
  min-width: 7.5rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--os-border, #e2e8f0);
  border-radius: 14px;
  background: var(--os-surface, #fff);
  display: grid;
  gap: 0.15rem;
}

.ws-crm-remind-stat.is-upcoming {
  border-color: color-mix(in srgb, #3b82f6 35%, var(--os-border, #e2e8f0));
  background: color-mix(in srgb, #eff6ff 80%, var(--os-surface, #fff));
}

.ws-crm-remind-stat.is-due {
  border-color: color-mix(in srgb, #f59e0b 35%, var(--os-border, #e2e8f0));
  background: color-mix(in srgb, #fffbeb 80%, var(--os-surface, #fff));
}

.ws-crm-remind-stat-value {
  font-size: 1.35rem;
  font-weight: 780;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--os-text);
}

.ws-crm-remind-stat-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--os-muted, #64748b);
}

.ws-crm-remind-form {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 1.2rem 1.25rem 1.25rem;
  border: 1px solid var(--os-border, #dbe1ea);
  border-radius: 18px;
  background: var(--os-surface, #fff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ws-crm-remind-form-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--os-border, #e2e8f0);
}

.ws-crm-remind-form-head strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 720;
  color: var(--os-text);
}

.ws-crm-remind-form-head .ws-muted {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
}

.ws-crm-remind-form-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  color: #1d4ed8;
  background: #dbeafe;
  flex: 0 0 auto;
}

.ws-crm-remind-editor {
  display: grid;
  gap: 0.4rem;
}

.ws-crm-remind-field {
  display: grid;
  gap: 0.35rem;
}

.ws-crm-remind-editor textarea,
.ws-crm-remind-form textarea[name="message"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 7rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid #94a3b8 !important;
  border-radius: 14px;
  background: var(--os-surface, #fff) !important;
  color: var(--os-text, #0f172a);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.ws-crm-remind-editor textarea:focus,
.ws-crm-remind-form textarea[name="message"]:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.ws-crm-remind-editor textarea::placeholder,
.ws-crm-remind-form textarea[name="message"]::placeholder {
  color: #94a3b8;
}

.ws-crm-remind-when-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 0.85rem;
  padding-top: 0.15rem;
}

.ws-crm-remind-when-row .ws-lead-reminder-when {
  flex: 1 1 160px;
  max-width: 240px;
  display: grid;
  gap: 0.35rem;
}

.ws-crm-remind-when-row .ws-lead-reminder-when input,
.ws-crm-remind-form input[type="date"],
.ws-crm-remind-form input[type="time"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 2.6rem;
  margin: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid #94a3b8 !important;
  border-radius: 12px;
  background: var(--os-surface, #fff) !important;
  color: var(--os-text, #0f172a);
  font: inherit;
  font-size: 0.9rem;
  -webkit-appearance: none;
  appearance: none;
}

.ws-crm-remind-when-row .ws-lead-reminder-when input:focus,
.ws-crm-remind-form input[type="date"]:focus,
.ws-crm-remind-form input[type="time"]:focus {
  outline: none;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.ws-crm-remind-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
}

.ws-crm-remind-lists {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

.ws-crm-remind-list-card {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 0.85rem;
  width: 100%;
  padding: 1rem 1.05rem;
  border: 1px solid #93c5fd;
  border-radius: 16px;
  background: var(--os-surface, #fff);
  min-height: 0;
  box-sizing: border-box;
}

.ws-crm-remind-list-card.is-upcoming {
  border-color: #93c5fd;
}

.ws-crm-remind-list-card.is-due {
  border-color: #93c5fd;
}

.ws-crm-remind-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ws-crm-remind-list-title .ws-label {
  display: block;
  margin-bottom: 0.15rem;
}

.ws-crm-remind-list-head p {
  margin: 0;
  font-size: 0.78rem;
}

.ws-crm-remind-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
}

.ws-crm-remind-count.is-upcoming {
  background: #dbeafe;
  color: #1d4ed8;
}

.ws-crm-remind-count.is-due {
  background: #ffedd5;
  color: #c2410c;
}

.ws-crm-remind-list {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  align-content: start;
}

.ws-crm-remind-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 0.85rem;
  border: 1px solid var(--os-border, #e2e8f0);
  border-radius: 12px;
  background: color-mix(in srgb, var(--os-surface-2, #f8fafc) 70%, var(--os-surface, #fff));
}

.ws-crm-remind-item.is-scheduled {
  border-color: color-mix(in srgb, #3b82f6 28%, var(--os-border, #e2e8f0));
  background: #f8fbff;
}

.ws-crm-remind-item.is-due {
  border-color: color-mix(in srgb, #f59e0b 30%, var(--os-border, #e2e8f0));
  background: #fffaf3;
}

.ws-crm-remind-item.is-sent {
  border-color: color-mix(in srgb, #22c55e 30%, var(--os-border, #e2e8f0));
  background: #f3fdf6;
}

.ws-crm-remind-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  color: #2563eb;
  background: #eff6ff;
}

.ws-crm-remind-item.is-due .ws-crm-remind-item-icon {
  color: #c2410c;
  background: #ffedd5;
}

.ws-crm-remind-item.is-sent .ws-crm-remind-item-icon {
  color: #15803d;
  background: #dcfce7;
}

.ws-crm-remind-item-copy {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.ws-crm-remind-item-copy strong {
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--os-text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ws-crm-remind-item-copy small {
  color: var(--os-muted, #64748b);
  font-size: 0.75rem;
}

.ws-crm-remind-item-aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.ws-crm-remind-empty {
  padding: 0.95rem 0.85rem;
  border: 1px dashed #bfdbfe;
  border-radius: 12px;
  color: var(--os-muted, #64748b);
  font-size: 0.85rem;
  text-align: center;
  background: #f8fbff;
}

.ws-reminder-dispatch-pill.is-due {
  background: #fff7ed;
  color: #c2410c;
}

.ws-reminder-dispatch-pill.is-scheduled {
  background: #eff6ff;
  color: #1d4ed8;
}

@media (max-width: 900px) {
  .ws-crm-remind-actions {
    margin-left: 0;
    width: 100%;
  }

  .ws-crm-remind-actions .ws-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .ws-crm-remind-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ws-crm-remind-item-aside {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .ws-crm-remind-when-row .ws-lead-reminder-when {
    max-width: none;
  }
}

.ws-sms-schedule-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 12px;
  margin: 0.15rem 0 0.35rem;
}

.ws-sms-schedule-row .ws-lead-reminder-when {
  flex: 1 1 140px;
  min-width: 140px;
  max-width: 220px;
}

.ws-sms-schedule-row .ws-lead-reminder-when input[type="date"],
.ws-sms-schedule-row .ws-lead-reminder-when input[type="time"] {
  width: 100%;
  box-sizing: border-box;
}

.ws-sms-schedule-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.ws-sms-panel .ws-sms-blast-recipients {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ws-sms-panel .ws-lead-reminder-notify-block {
  display: grid;
  gap: 0.45rem;
}

.ws-sms-compose-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ws-sms-reminder-format {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface, #fff);
  cursor: pointer;
}

.ws-sms-reminder-format input {
  margin-top: 3px;
}

.ws-sms-reminder-format span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ws-sms-reminder-format strong {
  font-size: 0.9rem;
}

.ws-sms-reminder-format small {
  color: var(--os-muted, #64748b);
  font-size: 0.78rem;
  line-height: 1.35;
}

.ws-sms-tpl-page {
  display: grid;
  gap: 16px;
}

.ws-sms-tpl-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.ws-sms-tpl-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.ws-sms-cat-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.ws-sms-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--os-border, #e2e8f0);
  border-radius: 12px;
  background: var(--os-surface, #fff);
}

.ws-sms-cat-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ws-sms-cat-copy strong {
  font-size: 0.95rem;
}

.ws-sms-cat-copy small {
  color: var(--os-muted, #64748b);
  font-size: 0.78rem;
}

.ws-sms-cat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
}

.ws-sms-tpl-group {
  display: grid;
  gap: 10px;
}

.ws-sms-tpl-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ws-sms-tpl-group-title {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
}

.ws-sms-tpl-group-title:hover h4 {
  color: #1d4ed8;
}

.ws-sms-tpl-group-head h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--os-text, #0f172a);
}

.ws-sms-tpl-group-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--os-muted, #64748b);
  background: var(--os-soft, #f1f5f9);
  border-radius: 999px;
  padding: 2px 8px;
}

.ws-sms-tpl-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.ws-sms-tpl-card {
  grid-column: span 4;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface, #fff);
  min-width: 0;
}

.ws-sms-tpl-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ws-sms-tpl-card-head strong {
  font-size: 0.95rem;
  line-height: 1.35;
}

.ws-sms-tpl-cat {
  justify-self: start;
  font-size: 0.72rem;
  font-weight: 650;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 2px 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  font: inherit;
}

.ws-sms-tpl-cat:hover {
  background: #dbeafe;
}

.ws-sms-tpl-cat.is-none {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.ws-sms-tpl-cat.is-none:hover {
  background: #e2e8f0;
}

.ws-sms-tpl-lang {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}

.ws-sms-tpl-lang.is-ta {
  background: #dbeafe;
  color: #1d4ed8;
}

.ws-sms-tpl-preview {
  margin: 0;
  color: var(--os-muted, #64748b);
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 3.2em;
}

.ws-sms-tpl-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .ws-sms-tpl-card {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .ws-sms-tpl-card {
    grid-column: span 12;
  }
}

.ws-sms-selected-count {
  color: var(--os-muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: auto;
  align-self: center;
}

.ws-sms-sender-field {
  flex: 1 1 240px;
  max-width: 320px;
  min-width: min(240px, 100%);
}

.ws-sms-sender-field .person-select {
  width: 100%;
}

.ws-sms-sender-field .ws-label {
  margin: 0 0 0.35rem;
  display: block;
}

.ws-sms-sender-field .person-select-trigger {
  min-height: 44px;
  height: 44px;
  width: 100%;
  box-sizing: border-box;
}

.ws-sms-compose-actions [data-sms-send] {
  flex: 0 0 auto;
  align-self: flex-end;
  min-height: 44px;
  height: 44px;
  padding: 0 1.15rem;
  border-radius: 12px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ws-sms-history {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--os-border);
}

.ws-sms-history h4 {
  margin: 0 0 16px;
  font-size: 0.95rem;
  font-weight: 700;
}

.ws-sms-tree {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ws-sms-tree-group {
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  overflow: hidden;
}

.ws-sms-tree-summary {
  list-style: none;
  display: grid;
  grid-template-columns: 14px 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  background: color-mix(in srgb, var(--os-surface-muted, #f1f5f9) 55%, transparent);
}

.ws-sms-tree-summary::-webkit-details-marker {
  display: none;
}

.ws-sms-tree-branch {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--os-border-strong, #94a3b8);
  border-bottom: 2px solid var(--os-border-strong, #94a3b8);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  justify-self: center;
}

.ws-sms-tree-group[open] > .ws-sms-tree-summary .ws-sms-tree-branch {
  transform: rotate(45deg);
}

.ws-sms-tree-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #0f766e;
  background: color-mix(in srgb, #0f766e 14%, transparent);
}

.ws-sms-tree-icon svg {
  display: block;
}

.ws-sms-tree-summary-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ws-sms-tree-summary-main strong {
  font-size: 0.95rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.ws-sms-tree-contact {
  font-size: 0.78rem;
  color: var(--os-text-muted, #64748b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-sms-tree-count {
  min-width: 1.6rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--os-text-muted, #64748b);
  background: var(--os-surface-muted, #f1f5f9);
}

.ws-sms-tree-children {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 14px 16px 34px;
}

.ws-sms-tree-event {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
}

/* Per-message timeline segment: green success / red fail */
.ws-sms-tree-event::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 20px;
  bottom: -14px;
  width: 2px;
  z-index: 0;
  background: #94a3b8;
}

.ws-sms-tree-event:not(:first-child)::before {
  top: 0;
}

.ws-sms-tree-event:last-child::before {
  bottom: auto;
  height: 20px;
}

.ws-sms-tree-event:last-child:not(:first-child)::before {
  top: 0;
  height: 20px;
}

.ws-sms-tree-event:only-child::before {
  display: none;
}

.ws-sms-tree-event.is-sent::before {
  background: #16a34a;
}

.ws-sms-tree-event.is-failed::before {
  background: #dc2626;
}

.ws-sms-tree-event.is-failed:only-child::before {
  display: block;
  top: 0;
  height: 22px;
  background: #dc2626;
}

.ws-sms-tree-group.is-failed .ws-sms-tree-icon {
  color: #b91c1c;
  background: color-mix(in srgb, #dc2626 14%, transparent);
}

.ws-sms-tree-group.is-partial .ws-sms-tree-icon {
  color: #b45309;
  background: color-mix(in srgb, #f59e0b 16%, transparent);
}

.ws-sms-tree-children.is-failed {
  border-left-color: #dc2626;
}

.ws-sms-tree-event.is-pending::before {
  background: #d97706;
}

.ws-sms-tree-rail {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 3px var(--os-surface);
}

.ws-sms-tree-event.is-sent .ws-sms-tree-rail {
  background: #16a34a;
}

.ws-sms-tree-event.is-failed .ws-sms-tree-rail {
  background: #dc2626;
}

.ws-sms-tree-event.is-pending .ws-sms-tree-rail {
  background: #d97706;
}

.ws-sms-tree-card {
  padding: 11px 13px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  min-width: 0;
}

.ws-sms-tree-event.is-failed .ws-sms-tree-card {
  border-color: #fecaca;
  background: #fef2f2;
}

.ws-sms-tree-event.is-sent .ws-sms-tree-card {
  border-color: #bbf7d0;
}

.ws-sms-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.ws-sms-sender {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--os-text);
  line-height: 1.3;
}

.ws-sms-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--os-muted);
  flex: 0 0 auto;
}

.ws-sms-tree-event.is-sent .ws-sms-status { color: #15803d; }
.ws-sms-tree-event.is-failed .ws-sms-status { color: #b91c1c; }
.ws-sms-tree-event.is-pending .ws-sms-status { color: #b45309; }

.ws-sms-tree-card .ws-sms-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--os-text);
}

.ws-sms-tree-card small {
  display: block;
  margin-top: 10px;
  color: var(--os-muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.ws-followup-card-wrap {
  position: relative;
  width: 100%;
  min-height: 0;
  border-radius: 12px;
}

.ws-followup-card {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 16px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  color: var(--os-text);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  height: 148px;
  min-height: 148px;
  max-height: 148px;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.ws-followup-card.is-notify-focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28);
  animation: ws-followup-notify-pulse 1.2s ease;
}

@keyframes ws-followup-notify-pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28); }
}

.ws-followup-card:has(.ws-followup-insights) {
  height: 176px;
  min-height: 176px;
  max-height: 176px;
  align-items: start;
}

.ws-followup-card:has(.ws-followup-co-engagement) {
  height: 172px;
  min-height: 172px;
  max-height: 172px;
  align-items: start;
}

.ws-followup-card:has(.ws-followup-insights):has(.ws-followup-co-engagement) {
  height: 200px;
  min-height: 200px;
  max-height: 200px;
}

.ws-followup-card:has(.ws-followup-insights) .ws-followup-badges,
.ws-followup-card:has(.ws-followup-insights) .ws-followup-open {
  align-self: center;
}

.ws-followup-card-wrap:has(.ws-followup-insights) {
  min-height: 0;
}

.ws-followup-card:has(.ws-followup-next-tag) {
  padding-top: 42px;
  height: 168px;
  min-height: 168px;
  max-height: 168px;
}

.ws-followup-card:has(.ws-followup-next-tag):has(.ws-followup-insights) {
  height: 196px;
  min-height: 196px;
  max-height: 196px;
}

/* Completed cards get a bit more room for notes + chips */
.ws-followup-entry.is-completed .ws-followup-card {
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  padding: 18px 18px;
}

.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-insights) {
  height: 212px;
  min-height: 212px;
  max-height: 212px;
}

.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-co-engagement) {
  height: 208px;
  min-height: 208px;
  max-height: 208px;
}

.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-insights):has(.ws-followup-co-engagement) {
  height: 236px;
  min-height: 236px;
  max-height: 236px;
}

.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-next-tag) {
  height: 200px;
  min-height: 200px;
  max-height: 200px;
}

.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-next-tag):has(.ws-followup-insights) {
  height: 228px;
  min-height: 228px;
  max-height: 228px;
}

.ws-followup-entry.is-completed .ws-followup-notes-summary {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.ws-followup-next-tag {
  position: absolute;
  top: 10px;
  right: 36px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: min(62%, 320px);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

html.theme-dark .ws-followup-next-tag {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(30, 64, 175, 0.35);
  color: #bfdbfe;
}

.ws-followup-card:hover {
  border-color: var(--os-primary);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.ws-followup-date {
  padding-top: 14px;
  font-size: 12px;
  font-weight: 650;
  color: var(--os-muted);
  text-align: right;
}

.ws-followup-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  align-content: start;
}

.ws-followup-card:not(:has(.ws-followup-insights)) .ws-followup-main {
  align-content: center;
}

.ws-followup-main > strong,
.ws-followup-main > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-followup-main > small { color: var(--os-muted); }

.ws-followup-notes-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.35em * 2);
  max-height: calc(1.35em * 2);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--os-text);
  word-break: break-word;
  white-space: normal;
}

.ws-followup-notes-summary strong,
.ws-followup-notes-summary b {
  font-weight: 700 !important;
  white-space: inherit;
  overflow: visible;
  text-overflow: unset;
}

.ws-followup-notes-summary span[style*="color"] {
  font-size: inherit !important;
  line-height: inherit;
  font-weight: inherit;
}

.ws-followup-notes-summary.is-empty {
  color: var(--os-muted);
  font-style: italic;
}

/* Cards with tasks grow to fit the checklist (base cards stay fixed-height). */
.ws-followup-card:has(.ws-followup-todo),
.ws-followup-card:has(.ws-followup-todo):has(.ws-followup-insights),
.ws-followup-card:has(.ws-followup-todo):has(.ws-followup-co-engagement),
.ws-followup-card:has(.ws-followup-todo):has(.ws-followup-insights):has(.ws-followup-co-engagement),
.ws-followup-card:has(.ws-followup-todo):has(.ws-followup-next-tag),
.ws-followup-card:has(.ws-followup-todo):has(.ws-followup-next-tag):has(.ws-followup-insights),
.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-todo),
.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-todo):has(.ws-followup-insights),
.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-todo):has(.ws-followup-co-engagement),
.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-todo):has(.ws-followup-insights):has(.ws-followup-co-engagement),
.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-todo):has(.ws-followup-next-tag),
.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-todo):has(.ws-followup-next-tag):has(.ws-followup-insights) {
  height: auto;
  max-height: none;
  min-height: 148px;
  align-items: start;
  overflow: visible;
}

.ws-followup-card:has(.ws-followup-todo) .ws-followup-main {
  align-content: start;
}

.ws-followup-card:has(.ws-followup-todo) .ws-followup-badges,
.ws-followup-card:has(.ws-followup-todo) .ws-followup-open {
  align-self: start;
  margin-top: 2px;
}

.ws-followup-card:has(.ws-followup-document),
.ws-followup-card:has(.ws-followup-document):has(.ws-followup-insights),
.ws-followup-card:has(.ws-followup-document):has(.ws-followup-co-engagement),
.ws-followup-card:has(.ws-followup-document):has(.ws-followup-insights):has(.ws-followup-co-engagement),
.ws-followup-card:has(.ws-followup-document):has(.ws-followup-next-tag),
.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-document),
.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-document):has(.ws-followup-insights),
.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-document):has(.ws-followup-co-engagement),
.ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-document):has(.ws-followup-insights):has(.ws-followup-co-engagement) {
  height: auto;
  max-height: none;
  min-height: 220px;
  align-items: start;
  overflow: visible;
}

.ws-followup-card:has(.ws-followup-document) .ws-followup-main {
  align-content: start;
}

.ws-followup-document {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface-2);
}

.ws-followup-document-thumb {
  position: relative;
  height: 76px;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2f7;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: inherit;
}

.ws-followup-document-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ws-followup-document-thumb iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 280%;
  border: 0;
  background: #fff;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: top left;
}

.ws-followup-document-icon {
  font-size: 28px;
}

.ws-followup-document-copy {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
}

.ws-followup-document-copy strong,
.ws-followup-document-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-followup-document-copy span {
  color: var(--os-muted);
  font-size: 12px;
}

.ws-followup-document-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.ws-followup-document-actions a {
  color: var(--os-primary, #2563eb);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.ws-followup-document-actions a:hover {
  text-decoration: underline;
}

.ws-followup-todo {
  margin-top: 0.65rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--os-border) 92%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-surface-2) 70%, var(--os-surface));
  box-sizing: border-box;
}

.ws-followup-todo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ws-followup-todo-label {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--os-muted);
}

.ws-followup-todo .ws-todo-progress-block {
  margin: 0;
  grid-template-columns: minmax(0, 1fr);
}

.ws-followup-todo .ws-todo-progress {
  height: 22px;
  border-radius: 8px;
}

.ws-followup-todo .ws-todo-progress > em {
  font-size: 0.72rem;
}

.ws-followup-todo .ws-todo-progress-count {
  font-size: 0.72rem;
}

.ws-followup-todo .ws-todo-list {
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 4px;
}

.ws-followup-todo .ws-todo-item {
  padding: 7px 8px 7px 10px;
  border: 1px solid color-mix(in srgb, var(--os-border) 88%, transparent);
  border-radius: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--os-border) 88%, transparent);
  background: var(--os-surface);
}

.ws-followup-todo .ws-todo-item:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--os-border) 88%, transparent);
}

.ws-followup-todo .ws-todo-text {
  font-size: 0.82rem;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.ws-followup-notes {
  font-size: 13px;
  line-height: 1.45;
  color: var(--os-text);
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}

.ws-followup-notes p {
  margin: 0 0 0.35em;
}

.ws-followup-notes p:last-child {
  margin-bottom: 0;
}

.ws-followup-notes b,
.ws-followup-notes strong {
  font-weight: 700;
}

.ws-followup-notes u {
  text-decoration: underline;
}

.ws-followup-notes i,
.ws-followup-notes em {
  font-style: italic;
}

.ws-followup-insights {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 1px 0 0;
  min-height: 22px;
  max-height: none;
  overflow: visible;
}

.ws-followup-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
}

.ws-followup-chip.is-sentiment.is-interested {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.ws-followup-chip.is-sentiment.is-neutral {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.ws-followup-chip.is-sentiment.is-not_interested {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.ws-followup-chip.is-sentiment.is-busy {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fed7aa;
}

.ws-followup-chip.is-sentiment.is-unclear {
  color: #1e40af;
  background: #dbeafe;
  border-color: #bfdbfe;
}

.ws-followup-chip.is-blocker {
  color: #7c2d12;
  background: #fff7ed;
  border-color: #fed7aa;
}

.ws-followup-chip.is-blocker::before {
  content: "Blocker ? ";
  font-weight: 600;
  opacity: 0.75;
}

.ws-followup-next {
  color: var(--os-primary);
  font-size: 12px;
  white-space: normal !important;
}
.ws-followup-next b {
  font-weight: 700;
}
.ws-followup-open {
  font-size: 25px;
  color: var(--os-muted);
  align-self: center;
}

.ws-followup-assignee,
.ws-followup-detail-person {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ws-followup-assignee {
  overflow: hidden !important;
  white-space: nowrap !important;
  margin-top: 1px;
}

.ws-followup-assignee > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-followup-co-engagement {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  min-width: 0;
}

.ws-followup-co-engagement-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--os-muted, #64748b);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.ws-followup-supporter-stack {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.ws-followup-supporter-avatar {
  display: inline-flex;
  margin-left: -7px;
}

.ws-followup-supporter-avatar:first-child {
  margin-left: 0;
}

.ws-followup-supporter-stack .ws-followup-supporter-avatar .ws-employee-avatar,
.ws-followup-supporter-stack .ws-followup-supporters-more {
  box-shadow: 0 0 0 2px var(--os-surface);
}

.ws-followup-supporter-stack .ws-followup-supporters-more {
  margin-left: -7px;
}

.ws-followup-supporter-stack .ws-employee-avatar {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}

.ws-followup-supporters-more {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: -6px;
  border-radius: 999px;
  border: 1px solid var(--os-border);
  background: var(--os-surface-2);
  color: var(--os-muted);
  font-size: 0.58rem;
  font-weight: 750;
  box-shadow: 0 0 0 2px var(--os-surface);
}

.ws-employee-avatar {
  width: 25px;
  height: 25px;
  display: inline-grid;
  flex: 0 0 25px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--os-border);
  border-radius: 999px;
  background: var(--os-surface-2);
}

.ws-employee-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ws-employee-avatar.is-fallback {
  color: var(--os-primary);
  font-size: 9px;
  font-weight: 800;
}

.ws-employee-avatar.is-empty {
  color: var(--os-muted);
}

.ws-lead-head-person {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  font-weight: 650;
}

.ws-lead-head-person .ws-employee-avatar {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.ws-person-select-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.ws-person-select-field > .ws-label {
  display: block;
}

.ws-card-edit-form .ws-person-select-field .person-select-trigger {
  min-height: 42px;
}

.ws-followup-detail-person > span:last-child {
  color: var(--os-text);
  font-size: inherit;
  text-transform: none;
}

.ws-followup-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-self: center;
}

.ws-followup-board-stickies {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
  border-radius: 12px;
}

.ws-board-sticky {
  position: absolute;
  width: var(--sticky-w, 48px);
  height: var(--sticky-h, 48px);
  min-width: 48px;
  min-height: 48px;
  max-width: 200px;
  max-height: 200px;
  padding: 10px 9px;
  border: 0;
  border-radius: 0;
  font-size: clamp(8px, calc(var(--sticky-w, 48px) * 0.145), 14px);
  font-weight: 750;
  line-height: 1.3;
  text-align: left;
  overflow: hidden;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  color: #fff;
  box-shadow: 1px 2px 6px rgba(15, 23, 42, 0.14);
  transform: rotate(var(--sticky-rot, -2deg));
  transition: box-shadow 0.15s ease, filter 0.15s ease;
  /* Small zig-zag on all four sides */
  clip-path: polygon(
    /* top edge ? */
    0% 4%, 6% 0%, 12% 4%, 18% 0%, 24% 4%, 30% 0%, 36% 4%, 42% 0%,
    48% 4%, 54% 0%, 60% 4%, 66% 0%, 72% 4%, 78% 0%, 84% 4%, 90% 0%, 96% 4%, 100% 0%,
    /* right edge ? */
    96% 6%, 100% 12%, 96% 18%, 100% 24%, 96% 30%, 100% 36%, 96% 42%,
    100% 48%, 96% 54%, 100% 60%, 96% 66%, 100% 72%, 96% 78%, 100% 84%, 96% 90%, 100% 96%,
    /* bottom edge ? */
    96% 100%, 90% 96%, 84% 100%, 78% 96%, 72% 100%, 66% 96%, 60% 100%, 54% 96%,
    48% 100%, 42% 96%, 36% 100%, 30% 96%, 24% 100%, 18% 96%, 12% 100%, 6% 96%, 0% 100%,
    /* left edge ? */
    4% 96%, 0% 90%, 4% 84%, 0% 78%, 4% 72%, 0% 66%, 4% 60%, 0% 54%,
    4% 48%, 0% 42%, 4% 36%, 0% 30%, 4% 24%, 0% 18%, 4% 12%, 0% 6%
  );
}

.ws-board-sticky-text {
  display: block;
  max-height: calc(var(--sticky-h, 48px) - 20px);
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  color: #fff !important;
  line-height: 1.3;
}

.ws-board-sticky-resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.85) 46%, rgba(255, 255, 255, 0.85) 54%, transparent 55%),
    linear-gradient(135deg, transparent 62%, rgba(255, 255, 255, 0.7) 63%, rgba(255, 255, 255, 0.7) 71%, transparent 72%);
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2;
}

.ws-board-sticky:hover .ws-board-sticky-resize,
.ws-board-sticky.is-resizing .ws-board-sticky-resize {
  opacity: 1;
}

.ws-board-sticky.is-cyan .ws-board-sticky-resize,
.ws-board-sticky.is-lemon .ws-board-sticky-resize,
.ws-board-sticky.is-sunshine .ws-board-sticky-resize {
  background:
    linear-gradient(135deg, transparent 45%, rgba(15, 23, 42, 0.7) 46%, rgba(15, 23, 42, 0.7) 54%, transparent 55%),
    linear-gradient(135deg, transparent 62%, rgba(15, 23, 42, 0.55) 63%, rgba(15, 23, 42, 0.55) 71%, transparent 72%);
}

.ws-board-sticky:hover {
  filter: brightness(0.98);
  box-shadow: 3px 8px 16px rgba(15, 23, 42, 0.22);
  z-index: 6;
}

.ws-board-sticky.is-dragging {
  cursor: grabbing;
  z-index: 8;
  filter: brightness(1.02);
  box-shadow: 4px 12px 20px rgba(15, 23, 42, 0.28);
  transform: rotate(0deg) scale(1.04);
}

.ws-board-sticky.is-resizing {
  cursor: nwse-resize;
  z-index: 8;
  transform: rotate(0deg);
  box-shadow: 4px 12px 20px rgba(15, 23, 42, 0.28);
}

/* Sticky colors ? saturated for white text, plus bright palette accents */
.ws-board-sticky.is-yellow { background: #ca8a04; color: #fff; }
.ws-board-sticky.is-pink { background: #db2777; color: #fff; }
.ws-board-sticky.is-green { background: #16a34a; color: #fff; }
.ws-board-sticky.is-blue { background: #2563eb; color: #fff; }
.ws-board-sticky.is-orange { background: #ea580c; color: #fff; }
.ws-board-sticky.is-purple { background: #9333ea; color: #fff; }
.ws-board-sticky.is-rose { background: #ff7eb9; color: #fff; }
.ws-board-sticky.is-hotpink { background: #ff65a3; color: #fff; }
.ws-board-sticky.is-cyan { background: #7afcff; color: #0f172a; }
.ws-board-sticky.is-lemon { background: #feff9c; color: #0f172a; }
.ws-board-sticky.is-sunshine { background: #fff740; color: #0f172a; }
.ws-board-sticky.is-cyan .ws-board-sticky-text,
.ws-board-sticky.is-lemon .ws-board-sticky-text,
.ws-board-sticky.is-sunshine .ws-board-sticky-text { color: #0f172a !important; }

.ws-followup-reminder-badge {
  position: absolute;
  top: 8px;
  right: 42px;
  z-index: 6;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--os-border));
  background: #fffbeb;
  color: #b45309;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.ws-followup-reminder-badge.is-scheduled {
  border-color: color-mix(in srgb, #f59e0b 45%, var(--os-border));
  background: #fffbeb;
  color: #b45309;
}

.ws-followup-reminder-badge.is-sent {
  border-color: color-mix(in srgb, #22c55e 45%, var(--os-border));
  background: #f0fdf4;
  color: #15803d;
}

.ws-followup-reminder-badge.is-failed {
  border-color: color-mix(in srgb, #ef4444 45%, var(--os-border));
  background: #fef2f2;
  color: #b91c1c;
}

.ws-followup-reminder-badge.is-skipped {
  border-color: color-mix(in srgb, #94a3b8 45%, var(--os-border));
  background: #f8fafc;
  color: #64748b;
}

.ws-followup-card:has(.ws-followup-next-tag) .ws-followup-reminder-badge {
  top: 36px;
}

.ws-engagement-remind-preview {
  margin: 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--os-text);
}

.ws-eng-remind-field {
  margin: 0;
}

.ws-eng-remind {
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--os-surface-2) 55%, #fff);
  padding: 0.85rem 0.95rem 1rem;
  display: grid;
  gap: 0.85rem;
}

.ws-eng-remind-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.ws-eng-remind-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--os-text);
}

.ws-eng-remind-head .ws-muted {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
}

.ws-eng-remind-history {
  display: grid;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-surface, #fff) 92%, #f8fafc);
}

.ws-eng-remind-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ws-eng-remind-history-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 700;
}

.ws-eng-remind-history-list {
  display: grid;
  gap: 0.3rem;
  max-height: 160px;
  overflow: auto;
}

.ws-eng-remind-history-item {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 0.2rem 0.5rem;
  border-radius: 7px;
  border: 1px solid var(--os-border);
  background: var(--os-surface, #fff);
  cursor: default;
}

.ws-eng-remind-history-item.is-editable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.ws-eng-remind-history-item.is-editable:hover {
  border-color: color-mix(in srgb, #3b82f6 50%, var(--os-border));
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.ws-eng-remind-history-item.is-editable:focus-visible {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.ws-eng-remind-history-item.is-editing {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
  background: #eff6ff;
}

.ws-eng-remind-schedule-btn.is-saving-edit {
  color: #fff !important;
  border-color: #1d4ed8 !important;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
}

.ws-eng-remind-schedule-btn.is-saving-edit:hover {
  color: #fff !important;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%) !important;
  border-color: #1e40af !important;
}

.ws-eng-remind-history-item.is-sent {
  border-color: color-mix(in srgb, #22c55e 45%, var(--os-border));
  background: #f0fdf4;
}

.ws-eng-remind-history-item.is-failed {
  border-color: color-mix(in srgb, #ef4444 45%, var(--os-border));
  background: #fef2f2;
}

.ws-eng-remind-history-item.is-scheduled {
  border-color: color-mix(in srgb, #f59e0b 45%, var(--os-border));
  background: #fffbeb;
}

.ws-eng-remind-history-item.is-skipped {
  border-color: color-mix(in srgb, #94a3b8 40%, var(--os-border));
  background: #f8fafc;
}

.ws-eng-remind-history-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.ws-eng-remind-history-main {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 auto;
}

.ws-eng-remind-history-item-head strong {
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--os-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-eng-remind-medium-tag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 11rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #64748b 28%, var(--os-border));
  background: color-mix(in srgb, #64748b 8%, var(--os-surface, #fff));
  color: #334155;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.ws-eng-remind-history-people {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.ws-eng-remind-history-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: #e2e8f0;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-left: -5px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--os-border) 70%, transparent);
  cursor: default;
}

.ws-eng-remind-history-avatar:first-child {
  margin-left: 0;
}

.ws-eng-remind-history-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ws-eng-remind-history-avatar.is-fallback {
  background: #f1f5f9;
}

.ws-eng-remind-history-avatar.is-client {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.62rem;
  font-weight: 700;
}

.ws-eng-remind-history-initial {
  line-height: 1;
}

.ws-eng-remind-history-more {
  margin-left: 0.2rem;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--os-muted);
}

.ws-eng-remind-history-item .ws-reminder-dispatch-pill {
  flex: 0 0 auto;
  padding: 0.08rem 0.45rem;
  font-size: 0.66rem;
  line-height: 1.2;
}

.ws-eng-remind-history-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
}

.ws-eng-remind-history-cancel {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--os-border));
  border-radius: 6px;
  background: #fff;
  color: #b45309;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ws-eng-remind-history-cancel:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.ws-eng-remind-history-cancel:disabled {
  opacity: 0.5;
  cursor: wait;
}

.ws-eng-remind-history .ws-eng-remind-empty {
  margin: 0;
  font-size: 0.74rem;
}

.ws-eng-remind-enable {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--os-text);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.ws-eng-remind-enable-text {
  order: 1;
  margin-bottom: 0 !important;
}

.ws-eng-remind-enable input,
.ws-eng-remind-system input {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
}

/* Classic iOS-style switch (matches green pill + white thumb) */
.ws-eng-remind-switch {
  order: 2;
  position: relative;
  width: 51px;
  height: 31px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e9e9eb;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: background 0.22s ease;
}

.ws-eng-remind-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.15),
    0 1px 1px rgba(0, 0, 0, 0.06),
    0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.22s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.ws-eng-remind-enable input:checked + .ws-eng-remind-switch,
.ws-eng-remind-system input:checked + .ws-eng-remind-switch {
  background: #34c759;
  box-shadow: none;
}

.ws-eng-remind-enable input:checked + .ws-eng-remind-switch::after,
.ws-eng-remind-system input:checked + .ws-eng-remind-switch::after {
  transform: translateX(20px);
}

.ws-eng-remind-enable input:focus-visible + .ws-eng-remind-switch,
.ws-eng-remind-system input:focus-visible + .ws-eng-remind-switch {
  outline: 2px solid color-mix(in srgb, #34c759 55%, #93c5fd);
  outline-offset: 2px;
}

.ws-eng-remind-enable:active .ws-eng-remind-switch::after,
.ws-eng-remind-system:active .ws-eng-remind-switch::after {
  width: 30px;
}

.ws-eng-remind-enable:active input:checked + .ws-eng-remind-switch::after,
.ws-eng-remind-system:active input:checked + .ws-eng-remind-switch::after {
  transform: translateX(17px);
}

.ws-eng-remind-body {
  display: grid;
  gap: 0.85rem;
}

.ws-eng-remind-body[hidden] {
  display: none !important;
}

.ws-eng-remind-when {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.ws-eng-remind-when input[type="datetime-local"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  background: #fff;
  color: var(--os-text);
}

.ws-eng-remind-group {
  display: grid;
  gap: 0.45rem;
}

.ws-eng-remind-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.ws-eng-remind-add {
  position: relative;
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 260px;
}

.ws-eng-remind-search {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  padding: 0.3rem 0.65rem;
  font: inherit;
  font-size: 0.8rem;
  background: #fff;
}

.ws-eng-remind-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 180px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.ws-eng-remind-suggest[hidden] {
  display: none !important;
}

.ws-eng-remind-suggest-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--os-text);
}

.ws-eng-remind-suggest-item:hover,
.ws-eng-remind-suggest-item:focus-visible {
  background: color-mix(in srgb, var(--os-accent, var(--os-primary)) 10%, transparent);
  outline: none;
}

.ws-eng-remind-suggest-item strong {
  font-size: 0.8rem;
  font-weight: 700;
}

.ws-eng-remind-suggest-item small,
.ws-eng-remind-suggest-empty {
  font-size: 0.72rem;
  color: var(--os-muted);
}

.ws-eng-remind-suggest-empty {
  margin: 0;
  padding: 8px 10px;
}

.ws-eng-remind-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow: auto;
  padding: 0.1rem;
}

.ws-eng-remind-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 8px 8px 8px 10px;
  border: 1px solid color-mix(in srgb, var(--os-accent, var(--os-primary)) 35%, var(--os-border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-accent, var(--os-primary)) 8%, var(--os-surface, #fff));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--os-accent, var(--os-primary)) 8%, transparent);
}

.ws-eng-remind-person-avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
}

.ws-eng-remind-person-avatar .person-select-avatar,
.ws-eng-remind-person-avatar .ws-employee-avatar,
.ws-eng-remind-person-avatar img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 750;
  background: color-mix(in srgb, var(--os-accent, var(--os-primary)) 12%, var(--os-surface, #fff));
  color: var(--os-accent, var(--os-primary));
}

.ws-eng-remind-chip-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--os-muted);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.ws-eng-remind-chip-remove:hover {
  background: color-mix(in srgb, #ef4444 12%, transparent);
  color: #b91c1c;
}

.ws-eng-remind-person {
  position: relative;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 8px 44px 8px 10px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface, #fff);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ws-eng-remind-person:hover {
  border-color: color-mix(in srgb, var(--os-accent, var(--os-primary)) 35%, var(--os-border));
}

.ws-eng-remind-person.is-selected,
.ws-eng-remind-person:has(input:checked) {
  border-color: color-mix(in srgb, var(--os-accent, var(--os-primary)) 45%, var(--os-border));
  background: color-mix(in srgb, var(--os-accent, var(--os-primary)) 8%, var(--os-surface, #fff));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--os-accent, var(--os-primary)) 10%, transparent);
}

.ws-eng-remind-person input[data-remind-assigned] {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
}

/* Compact iOS switch pinned to top-right of Assigned card */
.ws-eng-remind-person .ws-eng-remind-switch {
  position: absolute;
  top: 8px;
  right: 8px;
  order: initial;
  flex: 0 0 auto;
  width: 36px;
  height: 22px;
  margin: 0;
}

.ws-eng-remind-person .ws-eng-remind-switch::after {
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
}

.ws-eng-remind-person input[data-remind-assigned]:checked + .ws-eng-remind-person-avatar ~ .ws-eng-remind-switch,
.ws-eng-remind-person:has(input[data-remind-assigned]:checked) .ws-eng-remind-switch {
  background: #34c759;
  box-shadow: none;
}

.ws-eng-remind-person input[data-remind-assigned]:checked + .ws-eng-remind-person-avatar ~ .ws-eng-remind-switch::after,
.ws-eng-remind-person:has(input[data-remind-assigned]:checked) .ws-eng-remind-switch::after {
  transform: translateX(14px);
}

.ws-eng-remind-person:active .ws-eng-remind-switch::after {
  width: 20px;
}

.ws-eng-remind-person:active:has(input[data-remind-assigned]:checked) .ws-eng-remind-switch::after {
  transform: translateX(12px);
}

.ws-eng-remind-person:has(input[data-remind-assigned]:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.ws-eng-remind-person:has(input[data-remind-assigned]:disabled) .ws-eng-remind-switch {
  background: #e9e9eb;
}

.ws-eng-remind-person-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.ws-eng-remind-person-copy strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--os-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-eng-remind-person-copy small {
  font-size: 0.72rem;
  font-style: normal;
  color: var(--os-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .ws-eng-remind-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ws-eng-remind-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ws-eng-remind-empty {
  margin: 0;
  padding: 0.55rem 0.2rem;
  font-size: 0.8rem;
  grid-column: 1 / -1;
}

.ws-eng-remind-channels {
  margin: 0.15rem 0 0.35rem;
}

.ws-eng-remind-channel-hint {
  margin: 0.2rem 0 0.55rem;
  font-size: 0.82rem;
}

.ws-eng-remind-channels .ws-lead-reminder-channel.is-selected,
.ws-eng-remind-channels .ws-lead-reminder-channel:has(input:checked) {
  border-color: color-mix(in srgb, #34c759 55%, var(--os-border));
  background: color-mix(in srgb, #34c759 10%, var(--os-surface, #fff));
  box-shadow: 0 0 0 2px color-mix(in srgb, #34c759 14%, transparent);
}

.ws-eng-remind-channels .ws-lead-reminder-channel.is-selected .ws-lead-reminder-channel-icon,
.ws-eng-remind-channels .ws-lead-reminder-channel:has(input:checked) .ws-lead-reminder-channel-icon {
  color: #15803d;
  background: color-mix(in srgb, #34c759 18%, #fff);
}

.ws-eng-remind-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.9rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--os-border);
}

.ws-eng-remind-schedule-btn {
  order: 2;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 8.25rem;
  min-height: 2.35rem;
  padding: 0.45rem 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1e3a8a !important;
  border: 1px solid #93c5fd !important;
  border-radius: 10px;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 1px 2px rgba(30, 64, 175, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.ws-eng-remind-schedule-btn:hover {
  color: #1e40af !important;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%) !important;
  border-color: #60a5fa !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 2px 6px rgba(37, 99, 235, 0.16);
}

.ws-eng-remind-schedule-btn:active {
  transform: translateY(1px);
}

.ws-eng-remind-schedule-btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.ws-eng-remind-schedule-icon {
  flex: 0 0 auto;
  display: block;
}

.ws-eng-remind-actions .ws-muted {
  order: 1;
  margin: 0;
  flex: 1 1 12rem;
  font-size: 0.74rem;
  line-height: 1.35;
}

.ws-eng-remind-template {
  display: grid;
  gap: 0.35rem;
}

.ws-eng-remind-template .ws-engagement-remind-preview {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--os-border) 90%, transparent);
  background: #fff;
}

html.theme-dark .ws-eng-remind-switch {
  background: #3f4654;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

html.theme-dark .ws-eng-remind-enable input:checked + .ws-eng-remind-switch,
html.theme-dark .ws-eng-remind-system input:checked + .ws-eng-remind-switch {
  background: #30d158;
}

html.theme-dark .ws-eng-remind-person,
html.theme-dark .ws-eng-remind-chip,
html.theme-dark .ws-eng-remind-when input,
html.theme-dark .ws-eng-remind-search,
html.theme-dark .ws-eng-remind-suggest,
html.theme-dark .ws-eng-remind-template .ws-engagement-remind-preview {
  background: var(--os-surface);
}

.ws-board-sticky-add {
  position: absolute;
  top: 8px;
  right: 8px;
  left: auto;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1.5px dashed #94a3b8;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.98);
  color: #64748b;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  z-index: 7;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.ws-board-sticky-add:hover {
  border-color: #1c7cff;
  color: #1c7cff;
  background: #eff6ff;
}

.ws-sticky-context-menu {
  position: fixed;
  z-index: 13000;
  min-width: 160px;
  padding: 6px;
  border: 1px solid var(--os-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 2px;
}

.ws-sticky-context-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--os-text, #0f172a);
  cursor: pointer;
}

.ws-sticky-context-menu button:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.ws-sticky-context-menu button.is-danger {
  color: #dc2626;
}

.ws-sticky-context-menu button.is-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.sticky-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1.75rem;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  animation: sticky-editor-backdrop-in 0.22s ease-out;
}

.sticky-editor-shell {
  position: relative;
  width: min(100%, 520px);
  display: grid;
  gap: 1.25rem;
  justify-items: center;
  animation: sticky-editor-zoom-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}

@keyframes sticky-editor-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sticky-editor-zoom-in {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-editor-backdrop,
  .sticky-editor-shell {
    animation: none;
  }
}

.sticky-editor-close {
  position: absolute;
  top: -8px;
  right: -4px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  z-index: 2;
}

.sticky-editor-note {
  width: min(92vw, 420px);
  min-height: min(70vh, 420px);
  padding: 34px 30px;
  box-shadow: 4px 10px 24px rgba(15, 23, 42, 0.2);
  transform: rotate(-2deg);
  cursor: text;
  /* Same small zig-zag on all sides as board stickies */
  clip-path: polygon(
    0% 4%, 6% 0%, 12% 4%, 18% 0%, 24% 4%, 30% 0%, 36% 4%, 42% 0%,
    48% 4%, 54% 0%, 60% 4%, 66% 0%, 72% 4%, 78% 0%, 84% 4%, 90% 0%, 96% 4%, 100% 0%,
    96% 6%, 100% 12%, 96% 18%, 100% 24%, 96% 30%, 100% 36%, 96% 42%,
    100% 48%, 96% 54%, 100% 60%, 96% 66%, 100% 72%, 96% 78%, 100% 84%, 96% 90%, 100% 96%,
    96% 100%, 90% 96%, 84% 100%, 78% 96%, 72% 100%, 66% 96%, 60% 100%, 54% 96%,
    48% 100%, 42% 96%, 36% 100%, 30% 96%, 24% 100%, 18% 96%, 12% 100%, 6% 96%, 0% 100%,
    4% 96%, 0% 90%, 4% 84%, 0% 78%, 4% 72%, 0% 66%, 4% 60%, 0% 54%,
    4% 48%, 0% 42%, 4% 36%, 0% 30%, 4% 24%, 0% 18%, 4% 12%, 0% 6%
  );
}

.sticky-editor-note.is-yellow { background: #ca8a04; color: #fff; }
.sticky-editor-note.is-pink { background: #db2777; color: #fff; }
.sticky-editor-note.is-green { background: #16a34a; color: #fff; }
.sticky-editor-note.is-blue { background: #2563eb; color: #fff; }
.sticky-editor-note.is-orange { background: #ea580c; color: #fff; }
.sticky-editor-note.is-purple { background: #9333ea; color: #fff; }
.sticky-editor-note.is-rose { background: #ff7eb9; color: #fff; }
.sticky-editor-note.is-hotpink { background: #ff65a3; color: #fff; }
.sticky-editor-note.is-cyan { background: #7afcff; color: #0f172a; }
.sticky-editor-note.is-lemon { background: #feff9c; color: #0f172a; }
.sticky-editor-note.is-sunshine { background: #fff740; color: #0f172a; }

.sticky-editor-input {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: #fff !important;
  caret-color: #fff;
  font: inherit;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.45;
  padding: 0;
  cursor: text;
  pointer-events: auto;
}

.sticky-editor-input::placeholder {
  color: rgba(255, 255, 255, 0.72);
  opacity: 1;
}

.sticky-editor-note.is-cyan .sticky-editor-input,
.sticky-editor-note.is-lemon .sticky-editor-input,
.sticky-editor-note.is-sunshine .sticky-editor-input {
  color: #0f172a !important;
  caret-color: #0f172a;
}

.sticky-editor-note.is-cyan .sticky-editor-input::placeholder,
.sticky-editor-note.is-lemon .sticky-editor-input::placeholder,
.sticky-editor-note.is-sunshine .sticky-editor-input::placeholder {
  color: rgba(15, 23, 42, 0.5);
}

.sticky-editor-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.sticky-editor-swatch {
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.sticky-editor-swatch.is-yellow { background: #ca8a04; }
.sticky-editor-swatch.is-pink { background: #db2777; }
.sticky-editor-swatch.is-green { background: #16a34a; }
.sticky-editor-swatch.is-blue { background: #2563eb; }
.sticky-editor-swatch.is-orange { background: #ea580c; }
.sticky-editor-swatch.is-purple { background: #9333ea; }
.sticky-editor-swatch.is-rose { background: #ff7eb9; }
.sticky-editor-swatch.is-hotpink { background: #ff65a3; }
.sticky-editor-swatch.is-cyan { background: #7afcff; }
.sticky-editor-swatch.is-lemon { background: #feff9c; }
.sticky-editor-swatch.is-sunshine { background: #fff740; }
.sticky-editor-swatch.is-selected {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.18);
}

.sticky-editor-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.sticky-editor-actions .btn {
  min-height: 42px;
  padding: 0 1.1rem;
  font-size: 0.92rem;
}

.sticky-editor-actions-right {
  display: flex;
  gap: 0.55rem;
  margin-left: auto;
}

.sticky-editor-delete {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  font-weight: 700;
}

.sticky-editor-delete:hover {
  border-color: #f87171;
  background: #fee2e2;
  color: #b91c1c;
}

.ws-followup-stickies {
  display: none;
}

.ws-sticky-note,
.sticky-note-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 180px;
  padding: 5px 8px;
  border-radius: 2px 7px 7px 2px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  box-shadow: 1px 2px 0 rgba(15, 23, 42, 0.08);
  transform: rotate(-1.2deg);
}

.ws-sticky-note {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.ws-sticky-note.is-yellow,
.sticky-note-chip.is-yellow { background: #ca8a04; color: #fff; }
.ws-sticky-note.is-pink,
.sticky-note-chip.is-pink { background: #db2777; color: #fff; }
.ws-sticky-note.is-green,
.sticky-note-chip.is-green { background: #16a34a; color: #fff; }
.ws-sticky-note.is-blue,
.sticky-note-chip.is-blue { background: #2563eb; color: #fff; }
.ws-sticky-note.is-orange,
.sticky-note-chip.is-orange { background: #ea580c; color: #fff; }
.ws-sticky-note.is-purple,
.sticky-note-chip.is-purple { background: #9333ea; color: #fff; }
.ws-sticky-note.is-rose,
.sticky-note-chip.is-rose { background: #ff7eb9; color: #fff; }
.ws-sticky-note.is-hotpink,
.sticky-note-chip.is-hotpink { background: #ff65a3; color: #fff; }
.ws-sticky-note.is-cyan,
.sticky-note-chip.is-cyan { background: #7afcff; color: #0f172a; }
.ws-sticky-note.is-lemon,
.sticky-note-chip.is-lemon { background: #feff9c; color: #0f172a; }
.ws-sticky-note.is-sunshine,
.sticky-note-chip.is-sunshine { background: #fff740; color: #0f172a; }

.sticky-notes-field {
  display: grid;
  gap: 10px;
}

.sticky-notes-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--os-text);
}

.sticky-notes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px 14px;
  min-height: 48px;
  padding: 12px;
  border: 1px dashed var(--os-border);
  border-radius: 12px;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--os-border) 70%, transparent) 1px, transparent 0) 0 0 / 14px 14px,
    var(--os-surface-muted, #f8fafc);
  align-items: start;
}

.sticky-notes-empty {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--os-muted);
  padding: 6px 2px;
}

.sticky-note-card {
  position: relative;
  width: 100%;
  max-width: 140px;
  min-height: 72px;
  max-height: 88px;
  padding: 12px 28px 12px 12px;
  box-shadow: 2px 6px 14px rgba(15, 23, 42, 0.14);
  transform: rotate(var(--sticky-card-rot, -1.5deg));
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  clip-path: polygon(
    0% 4%, 6% 0%, 12% 4%, 18% 0%, 24% 4%, 30% 0%, 36% 4%, 42% 0%,
    48% 4%, 54% 0%, 60% 4%, 66% 0%, 72% 4%, 78% 0%, 84% 4%, 90% 0%, 96% 4%, 100% 0%,
    96% 6%, 100% 12%, 96% 18%, 100% 24%, 96% 30%, 100% 36%, 96% 42%,
    100% 48%, 96% 54%, 100% 60%, 96% 66%, 100% 72%, 96% 78%, 100% 84%, 96% 90%, 100% 96%,
    96% 100%, 90% 96%, 84% 100%, 78% 96%, 72% 100%, 66% 96%, 60% 100%, 54% 96%,
    48% 100%, 42% 96%, 36% 100%, 30% 96%, 24% 100%, 18% 96%, 12% 100%, 6% 96%, 0% 100%,
    4% 96%, 0% 90%, 4% 84%, 0% 78%, 4% 72%, 0% 66%, 4% 60%, 0% 54%,
    4% 48%, 0% 42%, 4% 36%, 0% 30%, 4% 24%, 0% 18%, 4% 12%, 0% 6%
  );
}

.sticky-note-card:hover {
  transform: rotate(var(--sticky-card-rot, -1.5deg)) scale(1.03);
  box-shadow: 3px 8px 18px rgba(15, 23, 42, 0.2);
}

.sticky-note-card.is-editing {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2), 3px 8px 18px rgba(15, 23, 42, 0.18);
}

.sticky-note-card:nth-child(3n) { --sticky-card-rot: 1.8deg; }
.sticky-note-card:nth-child(3n + 1) { --sticky-card-rot: -2deg; }
.sticky-note-card:nth-child(3n + 2) { --sticky-card-rot: 0.8deg; }

.sticky-note-card.is-yellow { background: #ca8a04; color: #fff; }
.sticky-note-card.is-pink { background: #db2777; color: #fff; }
.sticky-note-card.is-green { background: #16a34a; color: #fff; }
.sticky-note-card.is-blue { background: #2563eb; color: #fff; }
.sticky-note-card.is-orange { background: #ea580c; color: #fff; }
.sticky-note-card.is-purple { background: #9333ea; color: #fff; }
.sticky-note-card.is-rose { background: #ff7eb9; color: #fff; }
.sticky-note-card.is-hotpink { background: #ff65a3; color: #fff; }
.sticky-note-card.is-cyan { background: #7afcff; color: #0f172a; }
.sticky-note-card.is-lemon { background: #feff9c; color: #0f172a; }
.sticky-note-card.is-sunshine { background: #fff740; color: #0f172a; }

.sticky-note-card-text,
.sticky-note-card .sticky-note-chip-text {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  max-width: none;
}

.sticky-note-card-remove,
.sticky-note-card .sticky-note-chip-remove {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
  color: inherit;
  opacity: 0.85;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.sticky-note-card-remove:hover,
.sticky-note-card .sticky-note-chip-remove:hover {
  opacity: 1;
  background: rgba(15, 23, 42, 0.28);
}

.sticky-notes-composer {
  display: grid;
  gap: 8px;
}

.sticky-notes-input {
  width: 100%;
  min-height: 88px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-input, #fff);
  color: var(--os-text);
  resize: vertical;
  font: inherit;
  line-height: 1.45;
}

.sticky-notes-input:focus {
  outline: 2px solid color-mix(in srgb, #2563eb 35%, transparent);
  outline-offset: 1px;
  border-color: #93c5fd;
}

.sticky-notes-composer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sticky-notes-swatches {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.sticky-notes-add-btn {
  min-height: 34px;
}

.sticky-notes-composer-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--os-muted);
}

.sticky-note-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.sticky-note-swatch input { display: none; }
.sticky-note-swatch.is-yellow { background: #ca8a04; }
.sticky-note-swatch.is-pink { background: #db2777; }
.sticky-note-swatch.is-green { background: #16a34a; }
.sticky-note-swatch.is-blue { background: #2563eb; }
.sticky-note-swatch.is-orange { background: #ea580c; }
.sticky-note-swatch.is-purple { background: #9333ea; }
.sticky-note-swatch.is-rose { background: #ff7eb9; }
.sticky-note-swatch.is-hotpink { background: #ff65a3; }
.sticky-note-swatch.is-cyan { background: #7afcff; }
.sticky-note-swatch.is-lemon { background: #feff9c; }
.sticky-note-swatch.is-sunshine { background: #fff740; }
.sticky-note-swatch.is-selected {
  border-color: #0f172a;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
}

html.theme-dark .sticky-notes-list {
  background:
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.28) 1px, transparent 0) 0 0 / 14px 14px,
    #1f242b;
}

html.theme-dark .sticky-notes-input {
  background: #161a1f;
}

.ws-followup-priority {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #eff6ff;
  color: #2563eb;
}

.ws-followup-priority.is-low { background: #ecfdf5; color: #15803d; }
.ws-followup-priority.is-medium { background: #eff6ff; color: #2563eb; }
.ws-followup-priority.is-high { background: #fff7ed; color: #ea580c; }
.ws-followup-priority.is-urgent { background: #fef2f2; color: #dc2626; }

.ws-followup-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #eff6ff;
  color: #2563eb;
  cursor: pointer;
  line-height: 1.2;
}

.ws-followup-state:hover {
  filter: brightness(0.97);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.ws-followup-state.is-overdue {
  background: #fefce8;
  color: #a16207;
}

.ws-followup-state.is-overdue:hover {
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.4);
}

.ws-followup-state.is-canceled {
  background: #fef2f2;
  color: #dc2626;
}

.ws-followup-state.is-canceled:hover {
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35);
}

.ws-followup-state.is-completed { background: #ecfdf5; color: #059669; }

.ws-followup-status-wrap {
  position: relative;
  display: inline-flex;
  z-index: 3;
}

.ws-followup-status-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  padding: 6px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 2px;
  z-index: 20;
}

.ws-followup-status-menu[hidden] {
  display: none;
}

.ws-followup-status-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--os-text);
  cursor: pointer;
}

.ws-followup-status-menu button:hover,
.ws-followup-status-menu button.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.ws-followup-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
}

.ws-followup-detail > div,
.ws-followup-detail section {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 10px;
  background: var(--os-surface-2);
}

.ws-followup-detail span {
  color: var(--os-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.ws-followup-detail section {
  grid-column: 1 / -1;
}

.ws-followup-detail p {
  margin: 2px 0 0;
  white-space: pre-wrap;
}

/* Lead list improvements */
.ws-lead-detail-summary .ws-muted {
  font-size: 13px;
  color: var(--os-muted);
  margin-top: 3px;
}

/* Dark-mode variants */
html.theme-dark .ws-lead-detail-header {
  background: color-mix(in srgb, var(--os-bg) 92%, transparent);
  border-color: var(--os-border);
}

html.theme-dark .ws-lead-hero {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--os-accent) 14%, transparent), transparent 55%),
    var(--os-surface);
}

html.theme-dark .ws-lead-hero-avatar {
  background: color-mix(in srgb, var(--os-accent) 22%, transparent);
}

html.theme-dark .ws-progress-metric {
  background: var(--os-surface-2);
}

html.theme-dark .ws-progress-metric.is-answered {
  background: color-mix(in srgb, #047857 22%, transparent);
  border-color: color-mix(in srgb, #34d399 35%, transparent);
}

html.theme-dark .ws-progress-metric.is-answered strong {
  color: #6ee7b7;
}

html.theme-dark .ws-history-list {
  background: var(--os-surface);
  border-color: var(--os-border);
}

html.theme-dark .ws-history-item {
  border-color: var(--os-border);
}

html.theme-dark .ws-history-item:hover {
  background: var(--os-surface-2);
}

html.theme-dark .ws-table-panel {
  background: var(--os-surface);
  border-color: var(--os-border);
}

html.theme-dark .ws-divider {
  background: var(--os-border);
}

/* Responsive adjustments */
@media (max-width: 1000px) {
  .ws-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 700px) {
  .ws-section-head {
    align-items: flex-start;
  }

  .ws-activity-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .ws-activity-card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .ws-document-grid {
    grid-template-columns: 1fr;
  }

  .ws-followup-entry {
    --followup-marker-x: 15px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 7px 10px;
  }

  .ws-followup-entry:not(:last-child)::before {
    top: 20px;
    bottom: -20px;
  }

  .ws-followup-marker {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 2px;
  }

  .ws-followup-date {
    grid-column: 2;
    grid-row: 1;
    padding-top: 0;
    text-align: left;
  }

  .ws-followup-card {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    height: 124px;
    min-height: 124px;
    max-height: 124px;
  }

  .ws-followup-entry.is-completed .ws-followup-card {
    height: 152px;
    min-height: 152px;
    max-height: 152px;
  }

  .ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-insights),
  .ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-co-engagement) {
    height: 176px;
    min-height: 176px;
    max-height: 176px;
  }

  .ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-insights):has(.ws-followup-co-engagement) {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
  }

  .ws-followup-card:has(.ws-followup-document),
  .ws-followup-entry.is-completed .ws-followup-card:has(.ws-followup-document) {
    height: auto;
    min-height: 200px;
    max-height: none;
  }

  .ws-followup-main {
    grid-column: 1;
  }

  .ws-followup-status-wrap,
  .ws-followup-open {
    grid-column: 2;
  }

  .ws-followup-status-wrap { grid-row: 1; justify-self: end; }
  .ws-followup-open { grid-row: 2; }
  .ws-followup-detail { grid-template-columns: 1fr; }

  .sticky-notes-composer {
    grid-template-columns: 1fr;
  }

  .sticky-notes-composer-bar {
    align-items: stretch;
  }

  .sticky-notes-add-btn {
    width: 100%;
  }

  .sticky-notes-swatches {
    grid-column: auto;
  }

  .ws-history-item {
    grid-template-columns: 1fr;
  }

  .ws-history-when {
    padding-right: 0;
    margin-bottom: 4px;
  }

  .ws-grid-2,
  .ws-grid-3,
  .ws-grid-4,
  .ws-overview-notes,
  .ws-contact-person-grid,
  .ws-link-list {
    grid-template-columns: 1fr;
  }

  .ws-overview-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .ws-overview-heading-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .ws-h2 {
    font-size: 18px;
  }
}

/* Team channels */
.channels-page,
.channels-root {
  height: 100%;
  min-height: 0;
}

.channels-page {
  margin: -1.5rem;
}

.channels-shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  height: calc(100vh - 82px);
  min-height: 580px;
  overflow: hidden;
  border-top: 1px solid var(--os-border);
  background: var(--os-surface);
}

.channels-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  color: #ede9fe;
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 58, 237, 0.34), transparent 40%),
    linear-gradient(180deg, #2b1647 0%, #241238 100%);
  overflow-y: auto;
}

.channels-rail-head {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.channels-rail-head small {
  display: block;
  margin-bottom: 0.2rem;
  color: #c4b5fd;
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.channels-rail-head h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
}

.channel-icon-btn {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  color: var(--os-text);
  background: var(--os-surface-2);
  cursor: pointer;
}

.channels-rail .channel-icon-btn {
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.channel-icon-btn:hover {
  filter: brightness(1.12);
}

.channels-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1rem 0.5rem;
  color: #c4b5fd;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.channels-section-title button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #ddd6fe;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.channel-dm-title {
  margin-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.channel-direct-nav {
  max-height: 240px;
}

.channel-dm-empty {
  margin: 0;
  padding: 0.55rem 0.75rem;
  color: #a78bfa;
  font-size: 0.59rem;
  line-height: 1.5;
}

.channel-dm-avatar,
.channel-header-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  object-fit: cover;
  font-size: 0.52rem;
}

.channel-dm-avatar {
  width: 27px;
  height: 27px;
}

.channel-header-avatar {
  width: 34px;
  height: 34px;
}

.channel-presence-dot {
  width: 8px;
  height: 8px;
  border: 2px solid #2b1647;
  border-radius: 50%;
  background: #22c55e;
}

.channel-unread-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 0.3rem;
  border-radius: 999px;
  color: #4c1d95;
  font-size: 0.52rem;
  font-weight: 850;
  background: #fff;
}

.channel-nav {
  min-height: 0;
  padding: 0 0.55rem 1rem;
  overflow-y: auto;
}

.channel-nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.58rem;
  margin: 0.15rem 0;
  padding: 0.68rem 0.7rem;
  border: 0;
  border-radius: 9px;
  color: #ddd6fe;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.channel-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.channel-nav-item.is-active {
  color: #fff;
  background: #6d28d9;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.channel-hash {
  color: #a78bfa;
  font-size: 1.1rem;
  font-weight: 500;
}

.channel-nav-item.is-active .channel-hash {
  color: #ddd6fe;
}

.channel-nav-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.channel-nav-copy strong,
.channel-nav-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-nav-copy strong {
  font-size: 0.74rem;
  font-weight: 700;
}

.channel-nav-copy small {
  margin-top: 0.12rem;
  color: #a78bfa;
  font-size: 0.56rem;
}

.channel-nav-item.is-active small {
  color: #ddd6fe;
}

.channel-message-count {
  min-width: 22px;
  padding: 0.16rem 0.35rem;
  border-radius: 999px;
  color: #4c1d95;
  font-size: 0.53rem;
  font-weight: 800;
  text-align: center;
  background: #ede9fe;
}

.channel-list-empty {
  padding: 2rem 1rem;
  color: #c4b5fd;
  text-align: center;
}

.channel-list-empty > span {
  display: block;
  color: #8b5cf6;
  font-size: 2rem;
}

.channel-list-empty strong {
  display: block;
  margin-top: 0.5rem;
  color: #fff;
  font-size: 0.78rem;
}

.channel-list-empty p {
  font-size: 0.63rem;
  line-height: 1.5;
}

.channel-conversation {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--os-surface);
}

.channel-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.35rem;
  border-bottom: 1px solid var(--os-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.035);
}

.channel-header-copy {
  min-width: 0;
}

.channel-header h2 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--os-text);
  font-size: 1rem;
}

.channel-header h2 span {
  color: #7c3aed;
}

.channel-header p {
  margin: 0.28rem 0 0;
  overflow: hidden;
  color: var(--os-muted);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-header-actions,
.channel-members-btn,
.channel-member-stack {
  display: flex;
  align-items: center;
}

.channel-header-actions {
  gap: 0.6rem;
}

.channel-search {
  display: flex;
  width: min(220px, 24vw);
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  color: var(--os-muted);
  background: var(--os-surface-2);
}

.channel-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--os-text);
  font: inherit;
  font-size: 0.61rem;
  background: transparent;
}

.channel-private-badge {
  padding: 0.38rem 0.55rem;
  border: 1px solid var(--os-border);
  border-radius: 8px;
  color: var(--os-muted);
  font-size: 0.58rem;
  font-weight: 700;
  background: var(--os-surface-2);
}

.channel-members-btn {
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  color: var(--os-muted);
  font-size: 0.62rem;
  background: var(--os-surface-2);
  cursor: pointer;
}

.channel-members-btn strong {
  color: var(--os-text);
}

.channel-member-stack > * {
  margin-left: -5px;
}

.channel-member-stack > *:first-child {
  margin-left: 0;
}

.channel-member-avatar,
.channel-dialog-avatar,
.channel-message-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  object-fit: cover;
}

.channel-member-avatar {
  width: 24px;
  height: 24px;
  border: 2px solid var(--os-surface-2);
  font-size: 0.48rem;
}

.channel-message-list {
  min-height: 0;
  flex: 1;
  padding: 1rem 1.5rem;
  overflow-y: auto;
}

.channel-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 0.7rem;
  margin: 0 -0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
}

.channel-message:hover {
  background: var(--os-surface-2);
}

.channel-message-avatar {
  width: 38px;
  height: 38px;
  color: #5b21b6;
  font-size: 0.65rem;
  font-weight: 800;
  background: #ede9fe;
}

.channel-message-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.channel-message-meta strong {
  color: var(--os-text);
  font-size: 0.72rem;
}

.channel-message-meta time {
  color: var(--os-muted);
  font-size: 0.54rem;
}

.channel-message-content p {
  margin: 0.2rem 0 0;
  color: var(--os-text);
  font-size: 0.7rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.channel-message-reactions {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.34rem;
}

.channel-reaction,
.channel-add-reaction {
  display: inline-flex;
  height: 25px;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.42rem;
  border: 1px solid var(--os-border);
  border-radius: 999px;
  color: var(--os-muted);
  font-size: 0.62rem;
  background: var(--os-surface-2);
  cursor: pointer;
}

.channel-reaction strong {
  font-size: 0.52rem;
}

.channel-reaction.is-mine {
  border-color: rgba(109, 40, 217, 0.35);
  color: #6d28d9;
  background: #f3e8ff;
}

.channel-add-reaction {
  padding-inline: 0.48rem;
  opacity: 0;
}

.channel-message:hover .channel-add-reaction,
.channel-message:focus-within .channel-add-reaction {
  opacity: 1;
}

.channel-reaction-picker {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(5, 30px);
  gap: 0.18rem;
  padding: 0.3rem;
  border: 1px solid var(--os-border);
  border-radius: 9px;
  background: var(--os-surface);
  box-shadow: var(--os-shadow-lg);
}

.channel-reaction-picker[hidden] {
  display: none;
}

.channel-reaction-picker button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.channel-reaction-picker button:hover {
  background: var(--os-surface-2);
}

.channel-mention {
  display: inline-block;
  padding: 0.03rem 0.22rem;
  border-radius: 4px;
  color: #5b21b6;
  font-weight: 750;
  background: #ede9fe;
}

.channel-welcome {
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--os-muted);
  text-align: center;
}

.channel-welcome-hash,
.channel-no-selection-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 20px;
  color: #6d28d9;
  font-size: 2rem;
  font-weight: 800;
  background: #ede9fe;
}

.channel-welcome h2,
.channel-no-selection h2 {
  margin: 1rem 0 0.35rem;
  color: var(--os-text);
  font-size: 1.15rem;
}

.channel-welcome p,
.channel-no-selection p {
  max-width: 440px;
  margin: 0;
  color: var(--os-muted);
  font-size: 0.68rem;
  line-height: 1.6;
}

.channel-composer {
  position: relative;
  margin: 0 1.35rem 1.15rem;
  overflow: visible;
  border: 1px solid var(--os-border-strong);
  border-radius: 12px;
  background: var(--os-input);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.channel-mention-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.55rem);
  left: 0;
  z-index: 12;
  max-height: 310px;
  padding: 0.4rem;
  overflow-y: auto;
  border: 1px solid var(--os-border-strong);
  border-radius: 12px;
  background: var(--os-surface);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
}

.channel-mention-head {
  padding: 0.45rem 0.55rem;
  color: var(--os-muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.channel-mention-option {
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.48rem 0.55rem;
  border: 0;
  border-radius: 8px;
  color: var(--os-text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.channel-mention-option:hover,
.channel-mention-option.is-active {
  color: #fff;
  background: #6d28d9;
}

.channel-mention-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  object-fit: cover;
  font-size: 0.58rem;
}

.channel-mention-option > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.channel-mention-option strong,
.channel-mention-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-mention-option strong {
  font-size: 0.68rem;
}

.channel-mention-option small {
  margin-top: 0.1rem;
  color: var(--os-muted);
  font-size: 0.55rem;
}

.channel-mention-option.is-active small,
.channel-mention-option:hover small {
  color: #ddd6fe;
}

.channel-mention-option em {
  color: var(--os-muted);
  font-size: 0.57rem;
  font-style: normal;
}

.channel-mention-option.is-active em,
.channel-mention-option:hover em {
  color: #ddd6fe;
}

.channel-composer-tools {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.55rem;
  border-bottom: 1px solid var(--os-border);
  background: var(--os-surface-2);
}

.channel-composer-tools button {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 5px;
  color: var(--os-muted);
  font: inherit;
  font-size: 0.65rem;
  font-weight: 800;
  background: transparent;
}

.channel-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  padding: 0.65rem;
}

.channel-composer textarea {
  min-height: 42px;
  max-height: 140px;
  flex: 1;
  resize: vertical;
  border: 0;
  outline: 0;
  color: var(--os-text);
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.5;
  background: transparent;
}

.channel-send-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #6d28d9;
  cursor: pointer;
}

.channel-send-btn:disabled {
  opacity: 0.55;
}

.channel-composer > small {
  display: block;
  padding: 0 0.65rem 0.55rem;
  color: var(--os-muted);
  font-size: 0.53rem;
}

.channel-no-selection,
.channels-loading {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.channel-no-selection .btn {
  margin-top: 1.1rem;
}

.channels-loading span {
  width: 32px;
  height: 32px;
  border: 3px solid var(--os-border);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: channel-spin 0.7s linear infinite;
}

.channels-loading p {
  color: var(--os-muted);
  font-size: 0.7rem;
}

@keyframes channel-spin {
  to {
    transform: rotate(360deg);
  }
}

.channel-avatar-fallback {
  color: #5b21b6;
  font-weight: 800;
  background: #ede9fe;
}

.channel-member-dialog {
  display: grid;
  gap: 0.55rem;
  text-align: left;
}

.channel-member-dialog > div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.channel-dialog-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.6rem;
}

.channel-member-dialog span {
  display: flex;
  flex-direction: column;
}

.channel-member-dialog strong {
  color: #0f172a;
  font-size: 0.72rem;
}

.channel-member-dialog small {
  color: #64748b;
  font-size: 0.58rem;
}

@media (max-width: 760px) {
  .channels-shell {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .channels-rail-head {
    padding-inline: 0.65rem;
  }

  .channels-rail-head h3 {
    font-size: 0.72rem;
  }

  .channels-rail-head small,
  .channels-section-title span:last-child,
  .channel-nav-copy small,
  .channel-message-count {
    display: none;
  }

  .channels-section-title {
    padding-inline: 0.7rem;
  }

  .channel-nav-item {
    padding-inline: 0.55rem;
  }

  .channel-header {
    padding-inline: 0.8rem;
  }

  .channel-header p,
  .channel-members-btn,
  .channel-search,
  .channel-private-badge {
    display: none;
  }

  .channel-message-list {
    padding-inline: 0.8rem;
  }

  .channel-composer {
    margin-inline: 0.75rem;
  }
}

/* Channels premium workspace refresh */
.channels-page {
  position: relative;
  margin: -1.5rem;
  padding: 0.9rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 0%, rgba(124, 58, 237, 0.09), transparent 32%),
    radial-gradient(circle at 15% 100%, rgba(37, 99, 235, 0.08), transparent 35%),
    var(--os-bg);
}

.channels-page::before {
  position: absolute;
  top: -160px;
  right: -120px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.channels-shell {
  position: relative;
  grid-template-columns: 292px minmax(0, 1fr);
  height: calc(100vh - 108px);
  min-height: 600px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.12),
    0 3px 12px rgba(15, 23, 42, 0.05);
  isolation: isolate;
  backdrop-filter: blur(20px);
}

.channels-rail {
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(139, 92, 246, 0.14), transparent 32%),
    radial-gradient(circle at 30% 92%, rgba(79, 70, 229, 0.3), transparent 34%),
    linear-gradient(180deg, #211438 0%, #171329 52%, #131121 100%);
}

.channels-rail::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  background-image: linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 100% 44px;
  content: "";
  pointer-events: none;
}

.channels-rail-head {
  min-height: 90px;
  justify-content: flex-start;
  padding: 1rem 1rem 0.8rem;
  border-bottom: 0;
}

.channel-workspace-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 850;
  background: linear-gradient(145deg, #8b5cf6, #4f46e5);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.32);
}

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

.channels-rail-head .channel-workspace-copy small {
  margin-bottom: 0.26rem;
  color: #a5b4fc;
  font-size: 0.51rem;
  letter-spacing: 0.13em;
}

.channels-rail-head .channel-workspace-copy h3 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-workspace-copy h3 span {
  color: #a78bfa;
  font-size: 0.62rem;
}

.channels-rail-head .channel-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  transition: transform 0.16s ease, background 0.16s ease;
}

.channels-rail-head .channel-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
}

.channel-rail-search {
  display: flex;
  width: calc(100% - 1.6rem);
  height: 38px;
  align-items: center;
  gap: 0.52rem;
  margin: 0 0.8rem 0.75rem;
  padding: 0 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  color: #c4b5fd;
  font: inherit;
  font-size: 0.58rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.channel-rail-search:hover {
  border-color: rgba(196, 181, 253, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.channel-rail-search span {
  min-width: 0;
  flex: 1;
}

.channel-rail-search kbd {
  padding: 0.14rem 0.28rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #a78bfa;
  font: inherit;
  font-size: 0.47rem;
  background: rgba(0, 0, 0, 0.16);
}

.channels-section-title {
  padding: 0.8rem 1rem 0.38rem;
  color: #8f85b4;
  font-size: 0.54rem;
  letter-spacing: 0.12em;
}

.channel-nav {
  padding-inline: 0.68rem;
}

.channel-nav-item {
  position: relative;
  min-height: 47px;
  margin: 0.16rem 0;
  padding: 0.58rem 0.68rem;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #bbb3d7;
  transition:
    transform 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.channel-nav-item:hover {
  transform: translateX(2px);
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.065);
}

.channel-nav-item.is-active {
  border-color: rgba(196, 181, 253, 0.19);
  background:
    linear-gradient(90deg, rgba(124, 58, 237, 0.94), rgba(79, 70, 229, 0.82));
  box-shadow:
    0 10px 24px rgba(76, 29, 149, 0.28),
    inset 0 1px rgba(255, 255, 255, 0.1);
}

.channel-nav-item.is-active::before {
  position: absolute;
  top: 50%;
  left: -0.69rem;
  width: 3px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: #c4b5fd;
  content: "";
  transform: translateY(-50%);
}

.channel-hash {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  color: #a78bfa;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.055);
}

.channel-nav-copy strong {
  font-size: 0.66rem;
  letter-spacing: -0.01em;
}

.channel-nav-copy small {
  color: #777092;
  font-size: 0.49rem;
}

.channel-dm-title {
  margin-top: 0.7rem;
  padding-top: 0.9rem;
  border-top-color: rgba(255, 255, 255, 0.07);
}

.channel-dm-avatar {
  width: 29px;
  height: 29px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
}

.channel-group-avatar {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.channel-group-avatar-person {
  position: absolute;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #211438;
  border-radius: 7px;
  object-fit: cover;
  font-size: 0.42rem;
}

.channel-group-avatar-person:first-child {
  top: 0;
  left: 0;
}

.channel-group-avatar-person:last-child {
  right: 0;
  bottom: 0;
}

.channel-private-lock {
  color: #8f85b4;
  font-size: 0.58rem;
}

.channel-conversation {
  position: relative;
  background:
    radial-gradient(circle at 88% 8%, rgba(124, 58, 237, 0.055), transparent 26%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.78), #fff 28%);
}

.channel-header {
  min-height: 90px;
  padding: 0.8rem 1.45rem;
  border-bottom-color: rgba(148, 163, 184, 0.15);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.025);
  backdrop-filter: blur(16px);
}

.channel-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.channel-header h2 {
  font-size: 0.91rem;
  letter-spacing: -0.025em;
}

.channel-header h2 > span:first-child:not(.channel-header-avatar) {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  color: #6d28d9;
  background: linear-gradient(145deg, #f3e8ff, #e0e7ff);
}

.channel-title-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.42rem;
  border: 1px solid #dcfce7;
  border-radius: 999px;
  color: #15803d;
  font-size: 0.47rem;
  font-weight: 750;
  background: #f0fdf4;
}

.channel-title-status::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
  content: "";
}

.channel-header p {
  margin-left: 2.55rem;
  color: #8490a3;
  font-size: 0.56rem;
}

.channel-search {
  height: 37px;
  border-color: rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  background: rgba(248, 250, 252, 0.85);
  transition: width 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.channel-search:focus-within {
  width: min(280px, 30vw);
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.channel-members-btn,
.channel-private-badge,
.channel-header .channel-icon-btn {
  min-height: 37px;
  border-color: rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  background: rgba(248, 250, 252, 0.85);
}

.channel-message-list {
  padding: 1.4rem max(1.2rem, 4vw) 1rem;
  scrollbar-color: rgba(124, 58, 237, 0.24) transparent;
}

.channel-message {
  width: min(100%, 980px);
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.8rem;
  margin: 0 auto 0.12rem;
  padding: 0.68rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.channel-message:hover {
  border-color: rgba(148, 163, 184, 0.13);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.035);
}

.channel-message-avatar {
  width: 42px;
  height: 42px;
  border: 2px solid #fff;
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(79, 70, 229, 0.13);
}

.channel-message-meta strong {
  font-size: 0.68rem;
  letter-spacing: -0.01em;
}

.channel-message-meta time {
  font-size: 0.48rem;
}

.channel-message-content p {
  margin-top: 0.26rem;
  color: #344054;
  font-size: 0.66rem;
  line-height: 1.65;
}

.channel-welcome {
  width: min(100%, 600px);
  min-height: auto;
  margin: max(9vh, 3rem) auto;
  padding: 3rem 2rem;
  border: 1px solid rgba(124, 58, 237, 0.09);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.62);
  box-shadow: 0 22px 60px rgba(79, 70, 229, 0.07);
  backdrop-filter: blur(12px);
}

.channel-welcome-hash,
.channel-no-selection-icon {
  width: 78px;
  height: 78px;
  border: 1px solid rgba(124, 58, 237, 0.13);
  border-radius: 24px;
  color: #6d28d9;
  background: linear-gradient(145deg, #faf5ff, #e0e7ff);
  box-shadow: 0 16px 35px rgba(109, 40, 217, 0.14);
}

.channel-welcome h2,
.channel-no-selection h2 {
  margin-top: 1.25rem;
  font-size: 1.1rem;
  letter-spacing: -0.035em;
}

.channel-welcome p,
.channel-no-selection p {
  font-size: 0.6rem;
}

.channel-composer {
  width: min(calc(100% - 2.6rem), 980px);
  margin: 0 auto 1.25rem;
  border-color: rgba(124, 58, 237, 0.19);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 16px 42px rgba(15, 23, 42, 0.1),
    0 0 0 3px rgba(124, 58, 237, 0.025);
  backdrop-filter: blur(18px);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.channel-composer:focus-within {
  border-color: rgba(109, 40, 217, 0.42);
  box-shadow:
    0 20px 48px rgba(15, 23, 42, 0.13),
    0 0 0 4px rgba(124, 58, 237, 0.065);
  transform: translateY(-1px);
}

.channel-composer-tools {
  min-height: 38px;
  padding-inline: 0.65rem;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(180deg, #fbfcfe, #f8fafc);
}

.channel-composer-tools span {
  flex: 1;
}

.channel-composer-tools button {
  transition: color 0.15s ease, background 0.15s ease;
}

.channel-composer-tools button:hover {
  color: #6d28d9;
  background: #ede9fe;
}

.channel-composer-row {
  padding: 0.8rem 0.8rem 0.55rem;
}

.channel-composer textarea {
  min-height: 48px;
  font-size: 0.68rem;
}

.channel-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #7c3aed, #4f46e5);
  box-shadow: 0 9px 20px rgba(79, 70, 229, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.channel-send-btn:hover {
  transform: translateY(-2px) rotate(-2deg);
  box-shadow: 0 13px 25px rgba(79, 70, 229, 0.36);
}

.channel-composer > small {
  padding: 0 0.8rem 0.7rem;
  color: #98a2b3;
  font-size: 0.46rem;
}

html.theme-dark .channels-page {
  background:
    radial-gradient(circle at 90% 0%, rgba(124, 58, 237, 0.14), transparent 32%),
    #0b1020;
}

html.theme-dark .channels-shell {
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

html.theme-dark .channel-conversation {
  background:
    radial-gradient(circle at 88% 8%, rgba(124, 58, 237, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(20, 29, 49, 0.96), #0f172a 30%);
}

html.theme-dark .channel-header {
  border-bottom-color: rgba(148, 163, 184, 0.1);
  background: rgba(15, 23, 42, 0.74);
}

html.theme-dark .channel-message:hover,
html.theme-dark .channel-welcome {
  border-color: rgba(148, 163, 184, 0.1);
  background: rgba(30, 41, 59, 0.66);
}

html.theme-dark .channel-message-avatar {
  border-color: #1e293b;
}

html.theme-dark .channel-message-content p {
  color: #d7deea;
}

html.theme-dark .channel-search,
html.theme-dark .channel-members-btn,
html.theme-dark .channel-private-badge,
html.theme-dark .channel-header .channel-icon-btn,
html.theme-dark .channel-composer {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(30, 41, 59, 0.82);
}

html.theme-dark .channel-composer-tools {
  background: rgba(15, 23, 42, 0.5);
}

html.theme-dark .channel-title-status {
  border-color: rgba(34, 197, 94, 0.18);
  color: #86efac;
  background: rgba(22, 101, 52, 0.18);
}

@media (max-width: 900px) {
  .channels-page {
    padding: 0;
  }

  .channels-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    height: calc(100vh - 82px);
    border-radius: 0;
  }

  .channel-search {
    display: none;
  }
}

@media (max-width: 650px) {
  .channels-shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .channel-workspace-copy,
  .channels-rail-head .channel-icon-btn,
  .channel-rail-search span,
  .channel-rail-search kbd,
  .channels-section-title span,
  .channel-nav-copy,
  .channel-message-count,
  .channel-unread-count,
  .channel-presence-dot {
    display: none;
  }

  .channels-rail-head,
  .channel-nav-item {
    justify-content: center;
  }

  .channel-rail-search {
    width: 38px;
    justify-content: center;
    margin-inline: auto;
    padding: 0;
  }

  .channel-nav-item.is-active::before {
    left: -0.69rem;
  }

  .channel-header {
    padding-inline: 0.8rem;
  }

  .channel-title-status,
  .channel-header p,
  .channel-members-btn,
  .channel-private-badge {
    display: none;
  }

  .channel-message-list {
    padding-inline: 0.55rem;
  }

  .channel-composer {
    width: calc(100% - 1rem);
    margin-bottom: 0.55rem;
  }
}

/* Conversation-first Slack layout */
.channels-page {
  margin: -1.5rem;
  padding: 0;
  background: var(--os-surface);
}

.channels-page::before {
  display: none;
}

.channels-shell {
  --ch-rail-bg: #ffffff;
  --ch-rail-text: #1d1c1d;
  --ch-rail-muted: rgba(29, 28, 29, 0.6);
  --ch-rail-hover: rgba(15, 23, 42, 0.06);
  --ch-rail-divider: rgba(15, 23, 42, 0.1);
  --ch-rail-edge: 1px solid rgba(15, 23, 42, 0.1);
  --ch-rail-search-bg: #f3f4f6;
  --ch-rail-badge-bg: #e01e5a;
  --ch-rail-badge-text: #ffffff;
  --ch-rail-btn-bg: #611f69;
  --ch-rail-btn-text: #ffffff;
  --ch-rail-ring: #ffffff;
  grid-template-columns: 252px minmax(0, 1fr);
  height: calc(100vh - 80px);
  min-height: 600px;
  border: 0;
  border-radius: 0;
  background: var(--os-surface);
  box-shadow: none;
  backdrop-filter: none;
}

html.theme-dark .channels-shell {
  --ch-rail-bg: #3f0e40;
  --ch-rail-text: #ffffff;
  --ch-rail-muted: rgba(255, 255, 255, 0.66);
  --ch-rail-hover: rgba(255, 255, 255, 0.1);
  --ch-rail-divider: rgba(255, 255, 255, 0.14);
  --ch-rail-edge: 1px solid rgba(255, 255, 255, 0.14);
  --ch-rail-search-bg: rgba(255, 255, 255, 0.1);
  --ch-rail-badge-bg: #ffffff;
  --ch-rail-badge-text: #3f0e40;
  --ch-rail-btn-bg: #ffffff;
  --ch-rail-btn-text: #3f0e40;
  --ch-rail-ring: #3f0e40;
}

.channels-rail {
  border-right: var(--ch-rail-edge);
  color: var(--ch-rail-text);
  background: var(--ch-rail-bg);
}

.channels-rail::after {
  display: none;
}

.channels-rail-head {
  min-height: 64px;
  padding: 0.72rem 0.9rem;
  border-bottom: var(--ch-rail-edge);
}

.channel-workspace-mark {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-size: 0.76rem;
  background: #611f69;
  box-shadow: none;
}

.channels-rail-head .channel-workspace-copy small {
  display: none;
}

.channels-rail-head .channel-workspace-copy h3 {
  color: var(--ch-rail-text);
  font-size: 0.84rem;
  font-weight: 800;
}

.channel-workspace-copy h3 span {
  color: var(--ch-rail-muted);
}

.channels-rail-head .channel-icon-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: var(--ch-rail-btn-text);
  background: var(--ch-rail-btn-bg);
}

.channel-rail-search {
  width: calc(100% - 1rem);
  height: 34px;
  margin: 0.55rem 0.5rem 0.7rem;
  border-color: var(--ch-rail-divider);
  border-radius: 6px;
  color: var(--ch-rail-muted);
  font-size: 0.63rem;
  background: var(--ch-rail-search-bg);
}

.channel-rail-search:hover {
  border-color: var(--ch-rail-muted);
  background: var(--ch-rail-hover);
}

.channel-rail-search kbd {
  border-color: var(--ch-rail-divider);
  color: var(--ch-rail-muted);
  background: transparent;
}

.channels-section-title {
  padding: 0.62rem 0.85rem 0.28rem;
  color: var(--ch-rail-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.channels-section-title button {
  width: 22px;
  height: 22px;
  color: var(--ch-rail-muted);
  background: transparent;
}

.channels-section-title button:hover {
  color: var(--ch-rail-text);
  background: var(--ch-rail-hover);
}

.channel-nav {
  padding: 0 0.42rem;
}

.channel-nav-item {
  min-height: 34px;
  gap: 0.42rem;
  margin: 0;
  padding: 0.35rem 0.48rem;
  border: 0;
  border-radius: 5px;
  color: var(--ch-rail-muted);
  transition: none;
}

.channel-nav-item:hover {
  transform: none;
  color: var(--ch-rail-text);
  background: var(--ch-rail-hover);
}

.channel-nav-item.is-active {
  border: 0;
  color: #fff;
  background: #1164a3;
  box-shadow: none;
}

.channel-nav-item.is-active::before {
  display: none;
}

.channel-hash {
  width: 20px;
  height: 20px;
  border-radius: 0;
  color: inherit;
  font-size: 0.84rem;
  background: transparent;
}

.channel-nav-copy strong {
  color: inherit;
  font-size: 0.68rem;
  font-weight: 550;
}

.channel-nav-copy small {
  display: none;
}

.channel-message-count,
.channel-unread-count {
  border: 0;
  color: var(--ch-rail-badge-text);
  background: var(--ch-rail-badge-bg);
}

.channel-nav-item.is-active .channel-message-count,
.channel-nav-item.is-active .channel-unread-count {
  color: #1164a3;
  background: #fff;
}

.channel-dm-title {
  margin-top: 0.55rem;
  padding-top: 0.65rem;
  border-top-color: var(--ch-rail-divider);
}

.channel-dm-empty {
  color: var(--ch-rail-muted);
}

.channel-direct-nav {
  max-height: 300px;
}

.channel-dm-avatar {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 4px;
}

.channel-group-avatar {
  width: 24px;
  height: 24px;
}

.channel-group-avatar-person {
  width: 18px;
  height: 18px;
  border-color: var(--ch-rail-ring);
  border-radius: 4px;
}

.channel-presence-dot {
  border-color: var(--ch-rail-ring);
}

.channels-rail .channel-icon-btn {
  border-color: var(--ch-rail-divider);
  color: var(--ch-rail-btn-text);
  background: var(--ch-rail-btn-bg);
}

.channel-private-lock,
.channel-list-empty,
.channel-nav-copy small {
  color: var(--ch-rail-muted);
}

.channel-dm-item.is-unavailable:hover {
  color: var(--ch-rail-muted);
}

.channel-conversation {
  position: relative;
  background: var(--os-surface);
}

.channel-header {
  min-height: 64px;
  padding: 0.55rem 1.15rem;
  border-bottom: 1px solid var(--os-border-strong);
  background: var(--os-surface);
  box-shadow: none;
  backdrop-filter: none;
}

.channel-header h2 {
  gap: 0.4rem;
  color: var(--os-text);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.channel-header h2 > span:first-child:not(.channel-header-avatar) {
  display: inline;
  width: auto;
  height: auto;
  color: var(--os-text);
  background: transparent;
}

.channel-title-status {
  padding: 0.12rem 0.34rem;
  border: 0;
  color: #007a5a;
  font-size: 0.5rem;
  background: #e8f5f1;
}

.channel-header p {
  margin: 0.12rem 0 0;
  color: var(--os-muted);
  font-size: 0.57rem;
}

.channel-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 5px;
}

.channel-search {
  width: min(240px, 26vw);
  height: 34px;
  border-radius: 6px;
  background: var(--os-surface-2);
}

.channel-search:focus-within {
  width: min(280px, 30vw);
  border-color: #1264a3;
  box-shadow: 0 0 0 1px #1264a3;
}

.channel-members-btn,
.channel-private-badge,
.channel-header .channel-icon-btn {
  min-height: 34px;
  border-radius: 6px;
  background: var(--os-surface);
}

.channel-message-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 1rem 0 0.5rem;
}

.channel-message {
  position: relative;
  width: 100%;
  max-width: none;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.7rem;
  margin: 0;
  padding: 0.5rem 1.25rem;
  border: 0;
  border-radius: 0;
}

.channel-message:hover {
  border: 0;
  background: var(--os-surface-2);
  box-shadow: none;
}

.channel-date-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin: 0.35rem 0 0.55rem;
  color: var(--os-text);
  font-size: 0.58rem;
  font-weight: 800;
}

.channel-date-divider::before {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--os-border-strong);
  content: "";
}

.channel-date-divider span {
  position: relative;
  z-index: 1;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--os-border-strong);
  border-radius: 999px;
  background: var(--os-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.channel-message-actions {
  position: absolute;
  top: -15px;
  right: 1.1rem;
  z-index: 7;
  display: flex;
  align-items: center;
  padding: 0.16rem;
  border: 1px solid var(--os-border-strong);
  border-radius: 9px;
  background: var(--os-surface);
  box-shadow: var(--os-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.channel-message:hover .channel-message-actions,
.channel-message:focus-within .channel-message-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.channel-message-actions button {
  display: grid;
  width: 31px;
  height: 29px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--os-muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.channel-message-actions button:hover {
  color: var(--os-text);
  background: var(--os-surface-2);
}

.channel-message-actions button.is-saved {
  color: #d97706;
  background: rgba(245, 158, 11, 0.12);
}

.channel-message-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.channel-thread-summary {
  display: flex;
  width: min(360px, 100%);
  min-height: 32px;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.38rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--os-muted);
  font: inherit;
  font-size: 0.58rem;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.channel-thread-summary:hover {
  border-color: var(--os-border-strong);
  background: var(--os-surface);
}

.channel-thread-summary strong {
  color: #1264a3;
  font-size: 0.61rem;
}

.channel-thread-summary span {
  flex: 1;
}

.channel-thread-summary b {
  color: var(--os-muted);
  font-size: 1rem;
}

.channel-thread-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  display: flex;
  width: 430px;
  min-width: 360px;
  flex-direction: column;
  border-left: 1px solid var(--os-border-strong);
  background: var(--os-surface);
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.08);
}

.channel-conversation.has-thread {
  padding-right: 430px;
}

.channel-thread-head {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--os-border-strong);
}

.channel-thread-head div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 0.45rem;
}

.channel-thread-head strong {
  color: var(--os-text);
  font-size: 0.88rem;
}

.channel-thread-head span {
  overflow: hidden;
  color: var(--os-muted);
  font-size: 0.56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-thread-head button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 0;
  border-radius: 7px;
  color: var(--os-muted);
  font-size: 1.25rem;
  line-height: 1;
  background: transparent;
  cursor: pointer;
}

.channel-thread-head button:hover {
  color: var(--os-text);
  background: var(--os-surface-2);
}

.channel-thread-head .channel-thread-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.1rem;
}

.channel-thread-head button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.channel-thread-scroll {
  min-height: 0;
  flex: 1;
  padding: 0.55rem 0;
  overflow-y: auto;
}

.channel-thread-parent,
.channel-thread-reply {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.65rem 1rem;
}

.channel-thread-parent {
  padding-top: 0.85rem;
}

.channel-thread-parent p,
.channel-thread-reply p {
  margin: 0.15rem 0 0;
  color: var(--os-text);
  font-size: 0.67rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.channel-thread-reply:hover {
  background: var(--os-surface-2);
}

.channel-thread-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.55rem 1rem 0.25rem;
  color: var(--os-muted);
  font-size: 0.55rem;
  font-weight: 700;
}

.channel-thread-divider::after {
  height: 1px;
  flex: 1;
  background: var(--os-border-strong);
  content: "";
}

.channel-thread-empty {
  padding: 1rem;
  color: var(--os-muted);
  font-size: 0.62rem;
  text-align: center;
}

.channel-thread-composer {
  margin: 0.7rem;
  overflow: hidden;
  border: 1px solid var(--os-border-strong);
  border-radius: 9px;
  background: var(--os-input);
}

.channel-thread-composer:focus-within {
  border-color: #1264a3;
  box-shadow: 0 0 0 1px #1264a3;
}

.channel-thread-composer textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  resize: none;
  padding: 0.4rem 0.7rem 0.25rem;
  border: 0;
  outline: 0;
  color: var(--os-text);
  font: inherit;
  font-size: 0.67rem;
  background: transparent;
}

.channel-thread-composer > div {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.4rem 0.4rem 0.65rem;
}

.channel-thread-composer .channel-thread-format {
  min-height: 38px;
  justify-content: flex-start;
  gap: 0.08rem;
  padding: 0.25rem 0.45rem;
  overflow-x: auto;
}

.channel-thread-format > span {
  width: 1px;
  height: 18px;
  flex: 0 0 1px;
  margin-inline: 0.18rem;
  background: var(--os-border-strong);
}

.channel-thread-composer span {
  color: var(--os-muted);
  font-size: 0.49rem;
}

.channel-thread-composer button {
  display: grid;
  width: 31px;
  height: 29px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #007a5a;
  cursor: pointer;
}

.channel-thread-composer .channel-thread-format button,
.channel-thread-composer .channel-thread-quick-actions button {
  display: grid;
  width: 29px;
  height: 28px;
  flex: 0 0 29px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--os-muted);
  font: inherit;
  font-size: 0.62rem;
  background: transparent;
}

.channel-thread-composer .channel-thread-format button:hover,
.channel-thread-composer .channel-thread-quick-actions button:hover {
  color: var(--os-text);
  background: var(--os-surface-2);
}

.channel-thread-also-send {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0.65rem 0;
  color: var(--os-muted);
  font-size: 0.55rem;
  cursor: pointer;
}

.channel-thread-also-send input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #1264a3;
}

.channel-thread-composer .channel-thread-composer-bottom {
  min-height: 40px;
  padding: 0.2rem 0.4rem 0.35rem;
}

.channel-thread-quick-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.08rem;
}

.channel-thread-composer .channel-thread-send {
  display: grid;
  width: 32px;
  height: 30px;
  flex: 0 0 32px;
  place-items: center;
  color: #fff;
  background: #007a5a;
}

.channel-thread-parent .channel-message-image,
.channel-thread-reply .channel-message-image {
  max-width: 100%;
}

.channel-thread-parent .channel-message-image img,
.channel-thread-reply .channel-message-image img {
  max-height: 280px;
}

body.channel-thread-open .topbar-expand-btn {
  right: 442px;
}

.channel-thread-composer button:disabled {
  color: var(--os-muted);
  background: var(--os-surface-2);
  cursor: default;
}

@media (max-width: 760px) {
  .channel-conversation.has-thread {
    padding-right: 0;
  }

  .channel-thread-panel {
    width: 100%;
    min-width: 0;
  }

  body.channel-thread-open .topbar-expand-btn {
    display: none;
  }
}

@media (hover: none) {
  .channel-message-actions {
    position: static;
    grid-column: 2;
    justify-self: start;
    margin-top: 0.35rem;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

.channel-message-avatar {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
}

.channel-message-meta strong {
  color: var(--os-text);
  font-size: 0.72rem;
  font-weight: 800;
}

.channel-message-meta time {
  color: var(--os-muted);
  font-size: 0.52rem;
}

.channel-message-content p {
  margin-top: 0.15rem;
  color: var(--os-text);
  font-size: 0.7rem;
  line-height: 1.5;
}

.channel-message-image {
  display: block;
  width: fit-content;
  max-width: min(420px, 100%);
  margin-top: 0.45rem;
  overflow: hidden;
  border: 1px solid var(--os-border-strong);
  border-radius: 10px;
  background: var(--os-surface-2);
}

.channel-message-image img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.channel-action-add.is-uploading {
  color: transparent !important;
  pointer-events: none;
}

.channel-action-add.is-uploading::after {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  content: "";
  animation: channel-upload-spin 0.7s linear infinite;
}

@keyframes channel-upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.channel-welcome {
  width: auto;
  min-height: 100%;
  align-items: flex-start;
  justify-content: flex-end;
  margin: 0;
  padding: 2.2rem 1.35rem;
  border: 0;
  border-radius: 0;
  text-align: left;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.channel-welcome-hash,
.channel-no-selection-icon {
  width: 70px;
  height: 70px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 2.1rem;
  background: #3f0e40;
  box-shadow: none;
}

.channel-welcome h2,
.channel-no-selection h2 {
  margin: 1rem 0 0.3rem;
  color: var(--os-text);
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.channel-welcome p,
.channel-no-selection p {
  max-width: 560px;
  color: var(--os-muted);
  font-size: 0.68rem;
}

.channel-composer {
  width: calc(100% - 2.5rem);
  max-width: none;
  margin: 0 1.25rem 1rem;
  border: 1px solid var(--os-border-strong);
  border-radius: 8px;
  background: var(--os-input);
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
}

.channel-composer:focus-within {
  border-color: #616061;
  box-shadow: 0 0 0 1px #616061;
  transform: none;
}

.channel-composer-tools {
  min-height: 34px;
  padding: 0.25rem 0.55rem;
  border-radius: 7px 7px 0 0;
  background: var(--os-surface-2);
}

.channel-composer-tools button:hover {
  color: var(--os-text);
  background: var(--os-surface-muted);
}

.channel-composer-row {
  padding: 0.58rem 0.65rem 0.38rem;
}

.channel-composer textarea {
  min-height: 42px;
  font-size: 0.7rem;
}

.channel-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  background: #007a5a;
  box-shadow: none;
}

.channel-send-btn:hover {
  transform: none;
  background: #148567;
  box-shadow: none;
}

.channel-composer > small {
  padding: 0 0.65rem 0.5rem;
  font-size: 0.48rem;
}

.channel-add-reaction {
  border-radius: 5px;
}

html.theme-dark .channel-conversation,
html.theme-dark .channel-header {
  background: #1a1d21;
}

html.theme-dark .channel-message:hover {
  background: #222529;
}

html.theme-dark .channel-composer,
html.theme-dark .channel-search,
html.theme-dark .channel-members-btn,
html.theme-dark .channel-private-badge,
html.theme-dark .channel-header .channel-icon-btn {
  background: #222529;
}

html.theme-dark .channel-welcome-hash {
  background: #611f69;
}

.os-shell.topbar-collapsed .channels-shell {
  height: 100vh;
}

.staff-workspace .os-shell.topbar-collapsed .channels-shell {
  height: calc(100vh - 76px);
}

@media (max-width: 900px) {
  .channels-shell {
    grid-template-columns: 210px minmax(0, 1fr);
    height: calc(100vh - 76px);
  }
}

@media (max-width: 650px) {
  .channels-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .channel-workspace-mark {
    width: 34px;
    height: 34px;
  }

  .channel-message {
    padding-inline: 0.65rem;
  }

  .channel-composer {
    width: calc(100% - 1rem);
    margin-inline: 0.5rem;
  }
}

/* Keep Channels fitted to the viewport; only message lists scroll internally. */
body.channels-page-active {
  height: 100vh;
  overflow: hidden;
}

body.channels-page-active .os-shell,
body.channels-page-active .os-main {
  min-height: 0;
  height: 100vh;
  overflow: hidden;
}

body.channels-page-active .os-main {
  flex: 1;
}

body.channels-page-active .os-content {
  min-height: 0;
  flex: 1;
  padding: 0 !important;
  overflow: hidden;
}

body.channels-page-active .channels-page,
body.channels-page-active .channels-root {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body.channels-page-active .channels-shell {
  height: calc(100vh - 78px);
  min-height: 0;
}

body.channels-page-active .os-shell.topbar-collapsed .channels-shell {
  height: 100vh;
}

body.staff-workspace.channels-page-active .channels-shell {
  height: calc(100vh - 76px - 78px);
}

body.staff-workspace.channels-page-active .os-shell.topbar-collapsed .channels-shell {
  height: calc(100vh - 76px);
}

body.channels-page-active .channel-message-list {
  overscroll-behavior: contain;
}

@media (max-width: 760px) {
  body.staff-workspace.channels-page-active .channels-shell {
    height: calc(100vh - 66px - 70px);
  }

  body.staff-workspace.channels-page-active .os-shell.topbar-collapsed .channels-shell {
    height: calc(100vh - 66px);
  }
}

/* Slack-style rich message composer */
.channel-composer {
  overflow: visible;
  border-color: #565856;
  border-radius: 9px;
  background: var(--os-input);
}

.channel-composer-tools {
  min-height: 38px;
  gap: 0.08rem;
  padding: 0.28rem 0.48rem;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
}

.channel-composer-tools button,
.channel-composer-actions button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--os-muted);
  font: inherit;
  font-size: 0.7rem;
  background: transparent;
  cursor: pointer;
}

.channel-composer-tools button:hover,
.channel-composer-actions button:hover,
.channel-send-menu:hover {
  color: var(--os-text);
  background: var(--os-surface-muted);
}

.channel-composer-tools .channel-tool-divider,
.channel-composer-actions .channel-tool-divider {
  width: 1px;
  height: 21px;
  flex: 0 0 1px;
  margin: 0 0.3rem;
  background: var(--os-border-strong);
}

.channel-composer-row {
  min-height: 56px;
  padding: 0.35rem 0.72rem;
}

.channel-composer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 0.55rem;
}

.channel-composer-attachment {
  position: relative;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid var(--os-border-strong);
  border-radius: 10px;
  background: var(--os-surface-muted);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.channel-composer-attachment img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-composer-attachment-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--os-muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.channel-composer-attachment-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.channel-composer-attachment-remove:hover {
  background: #dc2626;
}

.channel-composer-attachment.is-uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
}

.channel-composer-attachment-status {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  z-index: 1;
  padding: 0.18rem 0.28rem;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.channel-composer-attachment.is-error {
  border-color: rgba(220, 38, 38, 0.55);
}

.channel-composer textarea {
  min-height: 48px;
  max-height: 180px;
  resize: none;
  font-size: 0.74rem;
  line-height: 1.55;
}

.channel-composer-bottom {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem 0.45rem;
}

.channel-composer-actions,
.channel-send-group {
  display: flex;
  align-items: center;
}

.channel-composer-actions {
  min-width: 0;
  gap: 0.06rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.channel-composer-actions::-webkit-scrollbar {
  display: none;
}

.channel-action-add {
  position: relative;
  border-radius: 50% !important;
  color: var(--os-text) !important;
  font-size: 1.05rem !important;
  background: var(--os-surface-muted) !important;
}

.channel-aa {
  padding-bottom: 1px;
  border-bottom: 1px solid currentColor;
  font-size: 0.68rem;
}

.channel-send-group {
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 6px;
}

.channel-send-btn {
  width: 38px;
  height: 34px;
  border-radius: 6px 0 0 6px;
}

.channel-send-menu {
  display: grid;
  width: 25px;
  height: 34px;
  place-items: center;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0 6px 6px 0;
  color: #fff;
  font-size: 0.62rem;
  background: #007a5a;
  cursor: pointer;
}

.channel-send-btn:disabled {
  color: var(--os-muted);
  background: var(--os-surface-muted);
  box-shadow: none;
  opacity: 1;
}

.channel-send-btn:disabled + .channel-send-menu {
  border-left-color: var(--os-border-strong);
  color: var(--os-muted);
  background: var(--os-surface-muted);
}

.channel-message-content code {
  padding: 0.08rem 0.26rem;
  border: 1px solid var(--os-border);
  border-radius: 4px;
  color: #c026d3;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
  background: var(--os-surface-muted);
}

html.theme-dark .channel-composer {
  border-color: #565856;
  background: #222529;
}

html.theme-dark .channel-composer-tools button,
html.theme-dark .channel-composer-actions button {
  color: #9ca3af;
}

@media (max-width: 650px) {
  .channel-composer-tools button:nth-of-type(n + 7) {
    display: none;
  }

  .channel-composer-actions .channel-tool-divider,
  .channel-composer-actions button:nth-of-type(n + 6) {
    display: none;
  }
}

/* Lead activity log tree */
.ws-activity-log-tree {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-activity-log-group {
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  overflow: hidden;
}

.ws-activity-log-summary {
  list-style: none;
  display: grid;
  grid-template-columns: 14px 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}

.ws-activity-log-summary::-webkit-details-marker {
  display: none;
}

.ws-activity-log-branch {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--os-border-strong, #94a3b8);
  border-bottom: 2px solid var(--os-border-strong, #94a3b8);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  justify-self: center;
}

.ws-activity-log-group[open] > .ws-activity-log-summary .ws-activity-log-branch {
  transform: rotate(45deg);
}

.ws-activity-log-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #2563eb;
  background: color-mix(in srgb, #2563eb 12%, transparent);
}

.ws-activity-log-icon svg {
  display: block;
}

.ws-activity-log-group.is-follow_up .ws-activity-log-icon {
  color: #0f766e;
  background: color-mix(in srgb, #0f766e 12%, transparent);
}

.ws-activity-log-group.is-sms .ws-activity-log-icon,
.ws-activity-log-group.is-sms_reminder .ws-activity-log-icon {
  color: #0369a1;
  background: color-mix(in srgb, #0369a1 12%, transparent);
}

.ws-activity-log-group.is-document .ws-activity-log-icon {
  color: #b45309;
  background: color-mix(in srgb, #b45309 12%, transparent);
}

.ws-activity-log-group.is-contact .ws-activity-log-icon,
.ws-activity-log-group.is-link .ws-activity-log-icon {
  color: #7c3aed;
  background: color-mix(in srgb, #7c3aed 12%, transparent);
}

.ws-activity-log-summary-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ws-activity-log-summary-main strong {
  font-size: 0.95rem;
  line-height: 1.25;
}

.ws-activity-log-count {
  min-width: 1.6rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--os-text-muted, #64748b);
  background: var(--os-surface-muted, #f1f5f9);
}

.ws-activity-log-children {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px 14px 34px;
}

.ws-activity-log-children::before {
  content: "";
  position: absolute;
  left: 46px;
  top: 4px;
  bottom: 18px;
  width: 2px;
  background: var(--os-border);
}

.ws-activity-log-event {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
}

.ws-activity-log-rail {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  margin-top: 6px;
  border-radius: 999px;
  background: #64748b;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px var(--os-surface);
}

.ws-activity-log-rail svg {
  display: block;
}

.ws-activity-log-event.is-create .ws-activity-log-rail {
  background: #16a34a;
}

.ws-activity-log-event.is-update .ws-activity-log-rail {
  background: #2563eb;
}

.ws-activity-log-event.is-delete .ws-activity-log-rail {
  background: #dc2626;
}

.ws-activity-log-event.is-entity-reminder.is-create .ws-activity-log-rail,
.ws-activity-log-event.is-entity-reminder.is-update .ws-activity-log-rail {
  background: #0f766e;
}

.ws-activity-log-event.is-entity-document .ws-activity-log-rail {
  background: #b45309;
}

.ws-activity-log-event.is-entity-lead_contact .ws-activity-log-rail,
.ws-activity-log-event.is-entity-lead_link .ws-activity-log-rail {
  background: #7c3aed;
}

.ws-activity-log-event.is-entity-activity.is-create .ws-activity-log-rail {
  background: #0284c7;
}

.ws-activity-log-event-card {
  padding: 10px 12px;
  border: 1px solid var(--os-border);
  border-radius: 8px;
  background: var(--os-surface-muted, #f8fafc);
}

.ws-activity-log-event-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.ws-activity-log-event-head strong {
  font-size: 0.9rem;
  line-height: 1.3;
}

.ws-activity-log-event-head time {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--os-text-muted, #64748b);
}

.ws-activity-log-details {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  color: var(--os-text-muted, #475569);
  font-size: 0.82rem;
  line-height: 1.45;
}

.ws-activity-log-event-card > .ws-muted {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.75rem;
}

html.theme-dark .ws-activity-log-event-card {
  background: #1f242b;
}

html.theme-dark .ws-activity-log-count {
  background: #2a3038;
}

@media (max-width: 720px) {
  .ws-activity-log-event-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .ws-activity-log-children {
    padding-left: 28px;
  }

  .ws-activity-log-children::before {
    left: 40px;
  }

  .ws-activity-log-children::before {
    left: 18px;
  }
}

/* -- Mpowerr Mail (Gmail-style inbox) --------------------------------------- */
.email-root {
  --mail-ink: #202124;
  --mail-muted: #5f6368;
  --mail-line: #e0e3e7;
  --mail-panel: #ffffff;
  --mail-soft: #f6f8fc;
  --mail-hover: #f2f5f9;
  --mail-selected: #d3e3fd;
  --mail-unread: #e8f0fe;
  --mail-compose: #c5221f;
  --mail-compose-hover: #a50e0e;
  --mail-star: #f4b400;
  --mail-accent: #1a73e8;
  height: 100%;
  min-height: 0;
}

.mail-loading,
.mail-error {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  min-height: 420px;
  color: var(--mail-muted);
  font-family: Manrope, "Segoe UI", Roboto, sans-serif;
}

.mail-loading span {
  width: 28px;
  height: 28px;
  border: 3px solid #dadce0;
  border-top-color: var(--mail-accent);
  border-radius: 50%;
  animation: mail-spin 0.7s linear infinite;
}

@keyframes mail-spin {
  to { transform: rotate(360deg); }
}

.mail-shell {
  display: grid;
  grid-template-columns: 220px minmax(280px, 380px) minmax(0, 1fr);
  height: calc(100vh - 168px);
  min-height: 520px;
  border: 1px solid var(--mail-line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--mail-panel);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08), 0 8px 24px rgba(60, 64, 67, 0.08);
  position: relative;
  font-family: Manrope, Roboto, "Segoe UI", sans-serif;
  color: var(--mail-ink);
}

body.email-page-active .os-content {
 padding-bottom: 0.5rem;
}

body.email-page-active .email-root {
 height: 100%;
}

.mail-nav {
 display: flex;
 flex-direction: column;
 gap: 0.35rem;
 padding: 0.85rem 0.7rem 1rem;
 background: var(--mail-soft);
 border-right: 1px solid var(--mail-line);
}

.mail-compose-trigger {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 0.65rem;
 margin: 0.15rem 0.35rem 0.85rem;
 padding: 0.85rem 1.1rem;
 border: 0;
 border-radius: 16px;
 background: #c2e7ff;
 color: #001d35;
 font-size: 0.92rem;
 font-weight: 650;
 box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
 cursor: pointer;
 transition: box-shadow 0.15s ease, background 0.15s ease;
}

.mail-compose-trigger svg {
 width: 18px;
 height: 18px;
}

.mail-compose-trigger:hover {
 background: #a8daff;
 box-shadow: 0 4px 12px rgba(60, 64, 67, 0.18);
}

.mail-folders {
 display: grid;
 gap: 0.15rem;
}

.mail-folder {
 display: grid;
 grid-template-columns: 20px 1fr auto;
 align-items: center;
 gap: 0.7rem;
 width: 100%;
 padding: 0.55rem 0.85rem 0.55rem 0.75rem;
 border: 0;
 border-radius: 0 20px 20px 0;
 background: transparent;
 color: var(--mail-ink);
 font-size: 0.88rem;
 font-weight: 550;
 text-align: left;
 cursor: pointer;
}

.mail-folder svg {
 width: 18px;
 height: 18px;
 color: var(--mail-muted);
}

.mail-folder:hover {
 background: rgba(32, 33, 36, 0.06);
}

.mail-folder.is-active {
 background: #d3e3fd;
 color: #041e49;
 font-weight: 700;
}

.mail-folder.is-active svg {
 color: #041e49;
}

.mail-folder-count {
 font-size: 0.75rem;
 font-weight: 700;
 color: #041e49;
}

.mail-identity {
 margin-top: auto;
 padding: 0.85rem 0.75rem 0.25rem;
 border-top: 1px solid var(--mail-line);
 display: grid;
 gap: 0.15rem;
}

.mail-identity-label {
 font-size: 0.68rem;
 text-transform: uppercase;
 letter-spacing: 0.08em;
 color: var(--mail-muted);
 font-weight: 700;
}

.mail-identity strong {
 font-size: 0.86rem;
}

.mail-identity small {
 color: var(--mail-muted);
 font-size: 0.75rem;
 word-break: break-all;
}

.mail-list-pane {
 display: flex;
 flex-direction: column;
 min-width: 0;
 border-right: 1px solid var(--mail-line);
 background: var(--mail-panel);
}

.mail-list-toolbar {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 padding: 0.75rem 0.85rem;
 border-bottom: 1px solid var(--mail-line);
}

.mail-search {
 flex: 1;
 display: flex;
 align-items: center;
 gap: 0.55rem;
 padding: 0.55rem 0.85rem;
 border-radius: 8px;
 background: var(--mail-soft);
 border: 1px solid transparent;
}

.mail-search:focus-within {
 background: #fff;
 border-color: var(--mail-accent);
 box-shadow: 0 0 0 1px var(--mail-accent);
}

.mail-search svg {
 width: 16px;
 height: 16px;
 color: var(--mail-muted);
 flex-shrink: 0;
}

.mail-search input {
 flex: 1;
 border: 0;
 outline: 0;
 background: transparent;
 font: inherit;
 font-size: 0.9rem;
 color: var(--mail-ink);
}

.mail-refresh {
 width: 36px;
 height: 36px;
 border: 0;
 border-radius: 50%;
 background: transparent;
 color: var(--mail-muted);
 display: grid;
 place-items: center;
 cursor: pointer;
}

.mail-refresh:hover {
 background: var(--mail-hover);
 color: var(--mail-ink);
}

.mail-refresh svg {
 width: 18px;
 height: 18px;
}

.mail-list {
 flex: 1;
 overflow: auto;
 min-height: 0;
}

.mail-row {
 display: grid;
 grid-template-columns: 36px minmax(0, 1fr);
 gap: 0.15rem;
 padding: 0.7rem 0.85rem 0.7rem 0.35rem;
 border-bottom: 1px solid #f0f2f5;
 cursor: pointer;
 background: #fff;
}

.mail-row:hover {
 box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px rgba(60, 64, 67, 0.12);
 z-index: 1;
 position: relative;
}

.mail-row.is-unread {
 background: #fff;
}

.mail-row.is-unread .mail-row-from,
.mail-row.is-unread .mail-row-subject {
 font-weight: 750;
 color: #202124;
}

.mail-row:not(.is-unread) .mail-row-from,
.mail-row:not(.is-unread) .mail-row-subject {
 font-weight: 500;
 color: #5f6368;
}

.mail-row.is-active {
 background: var(--mail-selected);
}

.mail-star-btn {
 width: 32px;
 height: 32px;
 border: 0;
 border-radius: 50%;
 background: transparent;
 color: #dadce0;
 display: grid;
 place-items: center;
 cursor: pointer;
 margin-top: 0.1rem;
}

.mail-star-btn:hover,
.mail-row.is-starred .mail-star-btn {
 color: var(--mail-star);
}

.mail-star-btn svg {
 width: 18px;
 height: 18px;
}

.mail-row-main {
 min-width: 0;
}

.mail-row-top {
 display: flex;
 align-items: baseline;
 justify-content: space-between;
 gap: 0.5rem;
}

.mail-row-from {
 font-size: 0.9rem;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.mail-row-when {
 flex-shrink: 0;
 font-size: 0.72rem;
 color: var(--mail-muted);
 font-weight: 650;
}

.mail-row.is-unread .mail-row-when {
 color: #202124;
}

.mail-row-subject {
 font-size: 0.86rem;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 margin-top: 0.1rem;
}

.mail-row-snippet {
 font-size: 0.8rem;
 color: #80868b;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 margin-top: 0.12rem;
}

.mail-empty-list,
.mail-reading-empty {
 display: grid;
 place-items: center;
 min-height: 100%;
 padding: 2rem;
 text-align: center;
 color: var(--mail-muted);
}

.mail-empty-glyph svg,
.mail-reading-empty-card svg {
 width: 48px;
 height: 48px;
 margin: 0 auto 0.75rem;
 opacity: 0.45;
}

.mail-empty-list h3,
.mail-reading-empty-card h3 {
 margin: 0 0 0.35rem;
 color: var(--mail-ink);
 font-size: 1.05rem;
}

.mail-empty-list p,
.mail-reading-empty-card p {
 margin: 0;
 font-size: 0.88rem;
}

.mail-reading-pane {
 min-width: 0;
 background: #fff;
 overflow: auto;
}

.mail-reading {
 display: flex;
 flex-direction: column;
 min-height: 100%;
}

.mail-reading-toolbar {
 display: flex;
 flex-wrap: wrap;
 gap: 0.35rem;
 padding: 0.65rem 1rem;
 border-bottom: 1px solid var(--mail-line);
}

.mail-tool-btn {
 display: inline-flex;
 align-items: center;
 gap: 0.4rem;
 padding: 0.45rem 0.7rem;
 border: 0;
 border-radius: 999px;
 background: transparent;
 color: var(--mail-muted);
 font-size: 0.8rem;
 font-weight: 600;
 cursor: pointer;
}

.mail-tool-btn svg {
 width: 16px;
 height: 16px;
}

.mail-tool-btn:hover {
 background: var(--mail-hover);
 color: var(--mail-ink);
}

.mail-tool-primary {
 background: var(--mail-unread);
 color: var(--mail-accent);
}

.mail-reading-header {
 padding: 1.25rem 1.5rem 0.75rem;
}

.mail-reading-header h2 {
 margin: 0 0 1rem;
 font-size: 1.35rem;
 font-weight: 450;
 letter-spacing: -0.01em;
 line-height: 1.3;
}

.mail-reading-meta {
 display: grid;
 grid-template-columns: 40px minmax(0, 1fr) auto;
 gap: 0.75rem;
 align-items: start;
}

.mail-avatar {
 width: 40px;
 height: 40px;
 border-radius: 50%;
 display: grid;
 place-items: center;
 background: linear-gradient(145deg, #1a73e8, #174ea6);
 color: #fff;
 font-size: 0.78rem;
 font-weight: 700;
}

.mail-reading-from {
 display: flex;
 flex-wrap: wrap;
 gap: 0.35rem;
 align-items: baseline;
}

.mail-reading-from strong {
 font-size: 0.92rem;
}

.mail-reading-from span,
.mail-reading-to,
.mail-reading-meta time {
 font-size: 0.78rem;
 color: var(--mail-muted);
}

.mail-reading-body {
 padding: 1rem 1.5rem 1.5rem;
 font-size: 0.95rem;
 line-height: 1.65;
 color: #3c4043;
 white-space: normal;
}

.mail-reading-actions {
 display: flex;
 gap: 0.55rem;
 padding: 0 1.5rem 1.5rem;
}

.mail-reply-btn {
 padding: 0.55rem 1.15rem;
 border-radius: 999px;
 border: 1px solid #dadce0;
 background: #fff;
 color: #3c4043;
 font-weight: 650;
 font-size: 0.86rem;
 cursor: pointer;
}

.mail-reply-btn:hover {
 background: #f8f9fa;
}

.mail-reply-btn:not(.is-ghost) {
 border-color: transparent;
 background: #f1f3f4;
}

.mail-compose {
 position: absolute;
 right: 1rem;
 bottom: 0;
 width: min(560px, calc(100% - 1.5rem));
 max-height: min(560px, 85%);
 display: flex;
 flex-direction: column;
 border-radius: 12px 12px 0 0;
 background: #fff;
 box-shadow: 0 8px 28px rgba(32, 33, 36, 0.28), 0 0 1px rgba(32, 33, 36, 0.3);
 z-index: 20;
 overflow: hidden;
 animation: mail-compose-in 0.18s ease;
}

@keyframes mail-compose-in {
 from { transform: translateY(12px); opacity: 0; }
 to { transform: translateY(0); opacity: 1; }
}

.mail-compose-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 0.7rem 0.9rem;
 background: #404040;
 color: #fff;
}

.mail-compose-head strong {
 font-size: 0.88rem;
 font-weight: 650;
}

.mail-compose-icon {
 width: 28px;
 height: 28px;
 border: 0;
 border-radius: 4px;
 background: transparent;
 color: #fff;
 font-size: 1.25rem;
 line-height: 1;
 cursor: pointer;
}

.mail-compose-icon:hover {
 background: rgba(255, 255, 255, 0.12);
}

.mail-compose-form {
 display: flex;
 flex-direction: column;
 min-height: 0;
 flex: 1;
}

.mail-compose-field {
 display: grid;
 grid-template-columns: 48px minmax(0, 1fr) auto;
 align-items: center;
 gap: 0.35rem;
 padding: 0.35rem 0.9rem;
 border-bottom: 1px solid #f1f3f4;
}

.mail-compose-field.is-hidden {
 display: none;
}

.mail-compose-field label {
 font-size: 0.82rem;
 color: #80868b;
}

.mail-compose-field input,
.mail-compose-form textarea {
 width: 100%;
 border: 0;
 outline: 0;
 font: inherit;
 font-size: 0.9rem;
 color: var(--mail-ink);
 background: transparent;
 resize: none;
}

.mail-compose-form textarea {
 flex: 1;
 min-height: 220px;
 padding: 0.85rem 0.9rem;
}

.mail-cc-toggle {
 border: 0;
 background: transparent;
 color: #80868b;
 font-size: 0.78rem;
 font-weight: 650;
 cursor: pointer;
 padding: 0.25rem 0.35rem;
}

.mail-cc-toggle:hover {
 color: var(--mail-ink);
}

.mail-compose-foot {
 display: flex;
 align-items: center;
 gap: 0.55rem;
 padding: 0.75rem 0.9rem 0.95rem;
 border-top: 1px solid #f1f3f4;
}

.mail-send-btn {
 padding: 0.65rem 1.4rem;
 border: 0;
 border-radius: 24px;
 background: var(--mail-accent);
 color: #fff;
 font-weight: 700;
 font-size: 0.88rem;
 cursor: pointer;
}

.mail-send-btn:hover {
 background: #1765cc;
 box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
}

.mail-draft-btn {
 border: 0;
 background: transparent;
 color: var(--mail-muted);
 font-weight: 650;
 font-size: 0.82rem;
 cursor: pointer;
 padding: 0.45rem 0.55rem;
}

.mail-draft-btn:hover {
 color: var(--mail-ink);
}

.mail-discard-btn {
 margin-left: auto;
 width: 36px;
 height: 36px;
 border: 0;
 border-radius: 50%;
 background: transparent;
 color: var(--mail-muted);
 display: grid;
 place-items: center;
 cursor: pointer;
}

.mail-discard-btn:hover {
 background: var(--mail-hover);
 color: var(--mail-compose);
}

.mail-discard-btn svg {
 width: 18px;
 height: 18px;
}

.visually-hidden {
 position: absolute;
 width: 1px;
 height: 1px;
 padding: 0;
 margin: -1px;
 overflow: hidden;
 clip: rect(0, 0, 0, 0);
 border: 0;
}

html.theme-dark .email-root {
 --mail-ink: #e8eaed;
 --mail-muted: #9aa0a6;
 --mail-line: #3c4043;
 --mail-panel: #202124;
 --mail-soft: #292a2d;
 --mail-hover: #303134;
 --mail-selected: #174ea6;
 --mail-unread: #1a3358;
}

html.theme-dark .mail-shell,
html.theme-dark .mail-list-pane,
html.theme-dark .mail-reading-pane,
html.theme-dark .mail-row,
html.theme-dark .mail-compose,
html.theme-dark .mail-reply-btn {
 background: var(--mail-panel);
 color: var(--mail-ink);
}

html.theme-dark .mail-compose-trigger {
 background: #8ab4f8;
 color: #202124;
}

html.theme-dark .mail-folder.is-active {
 background: #174ea6;
 color: #e8f0fe;
}

html.theme-dark .mail-folder.is-active svg,
html.theme-dark .mail-folder-count {
 color: #e8f0fe;
}

html.theme-dark .mail-search {
 background: #303134;
}

html.theme-dark .mail-row-snippet,
html.theme-dark .mail-reading-body {
 color: #bdc1c6;
}

html.theme-dark .mail-compose-head {
 background: #303134;
}

html.theme-dark .mail-compose-field {
 border-bottom-color: #3c4043;
}

@media (max-width: 1100px) {
 .mail-shell {
 grid-template-columns: 72px minmax(240px, 320px) minmax(0, 1fr);
 }

 .mail-compose-trigger {
 padding: 0.85rem;
 border-radius: 16px;
 font-size: 0;
 gap: 0;
 }

 .mail-folder-label,
 .mail-folder-count,
 .mail-identity {
 display: none;
 }

 .mail-folder {
 grid-template-columns: 20px;
 justify-content: center;
 border-radius: 50%;
 width: 44px;
 height: 44px;
 padding: 0;
 margin: 0 auto;
 }
}

@media (max-width: 820px) {
 .mail-shell {
 grid-template-columns: 1fr;
 height: auto;
 min-height: 70vh;
 }

 .mail-nav {
 flex-direction: row;
 flex-wrap: wrap;
 align-items: center;
 border-right: 0;
 border-bottom: 1px solid var(--mail-line);
 }

 .mail-compose-trigger {
 font-size: 0.88rem;
 margin: 0;
 }

 .mail-folders {
 display: flex;
 flex-wrap: wrap;
 gap: 0.25rem;
 width: 100%;
 }

 .mail-folder {
 width: auto;
 height: auto;
 border-radius: 999px;
 padding: 0.45rem 0.75rem;
 grid-template-columns: 18px auto auto;
 }

 .mail-folder-label,
 .mail-folder-count {
 display: inline;
 }

 .mail-identity {
 display: none;
 }

 .mail-list-pane {
 border-right: 0;
 border-bottom: 1px solid var(--mail-line);
 max-height: 42vh;
 }

 .mail-reading-pane {
 min-height: 40vh;
 }

 .mail-compose {
 left: 0.5rem;
 right: 0.5rem;
 width: auto;
 }
}

.os-shell.topbar-collapsed .mail-shell {
 height: calc(100vh - 96px);
}

body.staff-workspace.email-page-active .mail-shell {
 height: calc(100vh - 148px);
}

/* CRM Data / catalog settings */
.ws-crm-settings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ws-sms-settings-panel {
  display: grid;
  gap: 14px;
  padding: 1rem 1.1rem;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
}

.ws-sms-settings-head h3 {
  margin: 0;
  font-size: 1rem;
}

.ws-sms-settings-head .ws-muted {
  margin: 4px 0 0;
  font-size: 0.84rem;
}

.ws-sms-settings-form {
  display: grid;
  gap: 14px;
}

.ws-sms-settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 800px) {
  .ws-sms-settings-fields {
    grid-template-columns: 1fr;
  }
}

.ws-sms-settings-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ws-sms-settings-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-bg, var(--os-surface));
  color: var(--os-text);
  font: inherit;
}

.ws-sms-settings-field textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 84px;
  padding: 10px 12px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-bg, var(--os-surface));
  color: var(--os-text);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.ws-sms-settings-field input:focus,
.ws-sms-settings-field textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--os-accent) 45%, var(--os-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--os-accent) 14%, transparent);
}

.ws-sms-settings-field-full {
  grid-column: 1 / -1;
}

.ws-sms-settings-field .ws-muted {
  font-size: 0.78rem;
  line-height: 1.35;
}

.ws-sms-settings-field code {
  font-size: 0.76rem;
  padding: 0.05rem 0.3rem;
  border-radius: 5px;
  background: color-mix(in srgb, var(--os-surface-muted, #f1f5f9) 80%, transparent);
}

.ws-sms-settings-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 800px) {
  .ws-sms-settings-preview {
    grid-template-columns: 1fr;
  }
}

.ws-sms-settings-preview > div {
  padding: 10px 12px;
  border: 1px dashed var(--os-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-surface-muted, #f1f5f9) 50%, transparent);
}

.ws-sms-settings-preview .ws-label {
  display: block;
  margin-bottom: 6px;
}

.ws-sms-settings-preview p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--os-text);
  word-break: break-word;
}

.ws-sms-settings-actions {
  display: flex;
  justify-content: flex-end;
}

.ws-sms-blast-form .ws-lead-reminder-picker-trigger,
.ws-sms-panel .ws-lead-reminder-picker-trigger,
.ws-sms-compose .ws-lead-reminder-picker-trigger {
  border: 1px solid #93c5fd;
}

.ws-sms-insert-lines {
  display: grid;
  gap: 0.4rem;
  margin: 0.55rem 0 0.25rem;
}

.ws-sms-insert-lines-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ws-sms-insert-lines .ws-btn {
  border: 1px solid #93c5fd;
  background: #f8fbff;
  color: #1d4ed8;
}

.ws-sms-insert-lines .ws-btn:hover {
  border-color: #60a5fa;
  background: #eff6ff;
}

.ws-sms-insert-lines .ws-btn.is-active {
  border-color: #60a5fa;
  background: #dbeafe;
  color: #1d4ed8;
}

.ws-sms-insert-lines .ws-sms-expiry-reminder-btn.ws-btn-primary,
.ws-sms-insert-lines .ws-btn.ws-btn-primary[data-sms-expiry-reminder] {
  margin-left: auto;
  border-color: var(--os-primary, #2563eb);
  background: var(--os-primary, #2563eb);
  color: #fff;
}

.ws-sms-insert-lines .ws-sms-expiry-reminder-btn.ws-btn-primary:hover,
.ws-sms-insert-lines .ws-btn.ws-btn-primary[data-sms-expiry-reminder]:hover {
  border-color: color-mix(in srgb, var(--os-primary, #2563eb) 88%, #0f172a);
  background: color-mix(in srgb, var(--os-primary, #2563eb) 88%, #0f172a);
  color: #fff;
}

.ws-expiry-cal-modal {
  max-width: 920px;
}

.ws-expiry-cal-modal .ws-expiry-cal-head-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.ws-expiry-cal-modal .ws-expiry-cal-head-copy h5 {
  margin: 0;
}

.ws-expiry-cal-modal .ws-expiry-cal-head-copy p {
  margin: 0;
  color: var(--os-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  font-weight: 500;
}

.ws-expiry-cal-modal .modal-body {
  display: grid;
  gap: 0.9rem;
  padding-top: 0.85rem;
}

.ws-expiry-cal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.ws-expiry-cal-chip {
  display: grid;
  gap: 0.1rem;
  min-width: 140px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface-2, #f8fafc);
}

.ws-expiry-cal-chip strong {
  font-size: 0.9rem;
  color: var(--os-text);
}

.ws-expiry-cal-meta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.ws-expiry-cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 0.9rem 1rem;
  min-height: 0;
}

.ws-expiry-cal {
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: #fff;
  padding: 0.8rem;
}

.ws-expiry-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.ws-expiry-cal-nav strong {
  font-size: 0.92rem;
}

.ws-expiry-cal-dow,
.ws-expiry-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.ws-expiry-cal-dow span,
.ws-expiry-cal-pad {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--os-muted);
  padding: 0.25rem 0;
}

.ws-expiry-cal-day {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: var(--os-text);
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.ws-expiry-cal-day:hover:not(:disabled) {
  border-color: #93c5fd;
  background: #eff6ff;
}

.ws-expiry-cal-day.is-today:not(.is-selected) {
  border-color: #0f172a;
  box-shadow: inset 0 0 0 1px #0f172a;
}

.ws-expiry-cal-day.is-expiry:not(.is-selected) {
  border-color: #f59e0b;
  background: #fffbeb;
}

.ws-expiry-cal-day.is-selected {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1d4ed8;
}

.ws-expiry-cal-day.is-past,
.ws-expiry-cal-day:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  background: #f8fafc;
}

.ws-expiry-cal-day-badge {
  position: absolute;
  top: 3px;
  right: 4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}

.ws-expiry-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin-top: 0.7rem;
  color: var(--os-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.ws-expiry-cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ws-expiry-cal-legend i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #fff;
  display: inline-block;
}

.ws-expiry-cal-legend i.is-today {
  border-color: #0f172a;
  box-shadow: inset 0 0 0 1px #0f172a;
}

.ws-expiry-cal-legend i.is-expiry {
  border-color: #f59e0b;
  background: #fffbeb;
}

.ws-expiry-cal-legend i.is-selected {
  border-color: #2563eb;
  background: #dbeafe;
}

.ws-expiry-cal-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  min-height: 0;
  max-height: 420px;
}

.ws-expiry-cal-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ws-expiry-cal-side-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 800;
}

.ws-expiry-cal-slots-wrap {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.ws-expiry-cal-slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.ws-expiry-cal-slots li {
  display: grid;
  gap: 0.12rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: #fff;
}

.ws-expiry-cal-slot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ws-expiry-cal-slots strong {
  font-size: 0.68rem;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ws-expiry-cal-slot-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}

.ws-expiry-cal-slot-time-field {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.ws-expiry-cal-slot-time-field input[type='time'] {
  width: auto;
  min-width: 7.5rem;
  height: 30px;
  margin: 0;
  padding: 0.15rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 650;
  font-family: inherit;
  line-height: 1;
}

.ws-expiry-cal-slot-time-field input[type='time']:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ws-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ws-expiry-cal-slot-date {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--os-text);
}

.ws-expiry-cal-slots small {
  color: var(--os-muted);
  font-size: 0.72rem;
}

.ws-expiry-cal-empty {
  padding: 0.9rem 0.85rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--os-muted);
}

.ws-expiry-cal-empty strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--os-text);
  font-size: 0.84rem;
}

.ws-expiry-cal-empty p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
}

.ws-expiry-cal-preview-wrap {
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.ws-expiry-cal-preview-wrap summary {
  cursor: pointer;
  padding: 0.55rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
  list-style: none;
}

.ws-expiry-cal-preview-wrap summary::-webkit-details-marker {
  display: none;
}

.ws-expiry-cal-preview {
  margin: 0;
  max-height: 140px;
  overflow: auto;
  padding: 0 0.7rem 0.7rem;
  border-top: 1px solid var(--os-border);
  background: #f8fafc;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #334155;
}

.ws-expiry-cal-modal .modal-foot .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 820px) {
  .ws-expiry-cal-layout {
    grid-template-columns: 1fr;
  }

  .ws-expiry-cal-side {
    max-height: none;
  }

  .ws-expiry-cal-slots-wrap {
    max-height: 240px;
  }

  .ws-expiry-cal-meta-actions {
    margin-left: 0;
    width: 100%;
  }
}

.ws-sms-footer-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.ws-sms-footer-note strong {
  font-weight: 600;
  color: var(--os-text);
}

.ws-sms-footer-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.45rem 0 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--os-border) 90%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-surface-2) 72%, var(--os-surface));
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--os-muted);
  cursor: pointer;
}

.ws-sms-footer-option input {
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--os-primary);
}

.ws-sms-footer-option span {
  min-width: 0;
}

.ws-sms-footer-option strong {
  font-weight: 650;
  color: var(--os-text);
}

.ws-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1100px) {
  .ws-catalog-grid {
    grid-template-columns: 1fr;
  }
}

.ws-catalog-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
  min-height: 280px;
}

.ws-catalog-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ws-catalog-panel-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ws-catalog-panel[data-catalog-category="next_action"] {
  border-color: color-mix(in srgb, #2563eb 28%, var(--os-border));
  box-shadow: inset 3px 0 0 #2563eb;
}

.ws-catalog-panel[data-catalog-category="industry"] {
  border-color: color-mix(in srgb, #0d9488 24%, var(--os-border));
  box-shadow: inset 3px 0 0 #0d9488;
}

.ws-crm-packages-page {
  display: grid;
  gap: 1rem;
}

.ws-crm-packages-page .ws-packages-panel {
  margin: 0;
  max-width: 720px;
}

.ws-packages-panel {
  margin: 0 0 1.25rem;
  border-color: color-mix(in srgb, #0f766e 28%, var(--os-border));
  box-shadow: inset 3px 0 0 #0f766e;
}

.ws-packages-add {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

@media (max-width: 720px) {
  .ws-packages-add {
    grid-template-columns: 1fr;
  }
}

.ws-catalog-add button {
  white-space: nowrap;
}

.ws-catalog-panel-head p {
  margin: 0.2rem 0 0;
  color: var(--os-muted);
  font-size: 0.82rem;
}

.ws-catalog-count {
  flex: 0 0 auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--os-surface-2);
  color: var(--os-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.ws-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.ws-catalog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-surface-2) 55%, var(--os-surface));
}

.ws-catalog-item.is-inactive {
  opacity: 0.62;
}

.ws-catalog-item-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.ws-catalog-swatch {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 999px;
  background: var(--swatch, #94a3b8);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--swatch, #94a3b8) 25%, transparent);
}

.ws-catalog-item-copy {
  min-width: 0;
}

.ws-catalog-item-copy strong {
  display: block;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-catalog-item-copy small {
  display: block;
  color: var(--os-muted);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-catalog-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

.ws-catalog-item-actions .is-danger {
  color: #b91c1c;
}

.ws-catalog-add {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--os-border) 85%, transparent);
}

.ws-catalog-add input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 0.7rem;
  border: 1px solid var(--os-border);
  border-radius: 8px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.86rem;
}

.ws-catalog-add input[type="color"] {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--os-border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

/* Customers tab ? won leads */
.ws-customers-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 0.85rem;
}

.ws-customers-overview-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  text-align: left;
  color: inherit;
}

.ws-customers-overview-card .ws-label {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--os-muted);
  font-weight: 650;
}

.ws-customers-overview-card strong {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--os-text);
}

.ws-customers-overview-card small {
  color: var(--os-muted);
  font-size: 0.8rem;
}

.ws-customers-overview-card.is-warn {
  border-color: color-mix(in srgb, #d97706 38%, var(--os-border));
  background: linear-gradient(180deg, #fffbeb 0%, var(--os-surface) 72%);
}

.ws-customers-overview-card.is-warn strong {
  color: #b45309;
}

.ws-customers-overview-card.is-revenue {
  border-color: color-mix(in srgb, #0f766e 28%, var(--os-border));
  background: linear-gradient(180deg, color-mix(in srgb, #0f766e 8%, var(--os-surface)) 0%, var(--os-surface) 72%);
  box-shadow: inset 3px 0 0 #0f766e, 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ws-customers-overview-card.is-revenue strong {
  color: #0f766e;
}

.ws-customers-overview-card.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ws-customers-overview-card.is-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

@media (max-width: 900px) {
  .ws-customers-overview {
    grid-template-columns: 1fr;
  }
}

.ws-leads-overview {
  display: grid;
  grid-template-columns: minmax(268px, 3fr) minmax(0, 4.5fr) minmax(0, 4.5fr);
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  align-items: stretch;
}

.ws-leads-overview-total {
  justify-content: flex-start;
  padding: 0.8rem 0.85rem;
  min-width: 0;
}

.ws-leads-total-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ws-leads-total-main strong {
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--os-text);
}

.ws-leads-total-chart {
  margin-top: auto;
  padding-top: 0.55rem;
}

.ws-leads-overview-total .ws-leads-priority-legend {
  gap: 0.1rem;
}

.ws-leads-overview-total .ws-leads-priority-legend-item {
  padding: 0.16rem 0.28rem;
}

.ws-leads-overview-total .ws-leads-priority-legend-item span {
  font-size: 0.74rem;
}

.ws-leads-overview-pipeline,
.ws-leads-overview-priority {
  min-width: 0;
}

.ws-leads-overview-pipeline > small,
.ws-leads-overview-priority > small {
  display: block;
  margin-top: 0.15rem;
}

.ws-leads-priority-chart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.15rem 0 0.2rem;
  min-width: 0;
}

.ws-leads-priority-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: 0.22rem 0.48rem;
  border-radius: 7px;
  background: #0f172a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
}

.ws-leads-priority-tip[hidden] {
  display: none;
}

.ws-leads-priority-pie {
  width: 108px;
  height: 108px;
  flex: 0 0 108px;
}

.ws-leads-priority-slice {
  cursor: pointer;
  transform-origin: 54px 54px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ws-leads-priority-slice:hover {
  opacity: 0.88;
}

.ws-leads-priority-slice.is-active {
  filter: brightness(1.05);
  stroke: #fff;
  stroke-width: 2;
}

.ws-leads-priority-hole {
  cursor: pointer;
}

.ws-leads-priority-hole-label {
  font-size: 11px;
  font-weight: 800;
  fill: var(--os-muted);
  pointer-events: none;
  font-family: inherit;
}

.ws-leads-priority-hole.is-active .ws-leads-priority-hole-label {
  fill: var(--os-accent, #2563eb);
}

.ws-leads-priority-legend {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
  flex: 1 1 auto;
}

.ws-leads-priority-legend-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.22rem 0.35rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ws-leads-priority-legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.ws-leads-priority-legend-item span {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--os-text);
  white-space: nowrap;
}

.ws-leads-priority-legend-item b {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--os-muted);
}

.ws-leads-priority-legend-item:hover:not(:disabled),
.ws-leads-priority-legend-item.is-active {
  background: color-mix(in srgb, var(--os-accent, #2563eb) 8%, var(--os-surface));
}

.ws-leads-priority-legend-item:disabled {
  opacity: 0.45;
  cursor: default;
}

.ws-leads-priority-legend-item.is-all i {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--os-muted);
}

.ws-leads-priority-reset {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--os-accent, #2563eb);
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ws-leads-priority-reset:hover {
  text-decoration: underline;
}

.ws-leads-overview .ws-customers-overview-card.is-active {
  border-color: color-mix(in srgb, #2563eb 32%, var(--os-border));
  box-shadow: inset 3px 0 0 #2563eb, 0 1px 2px rgba(15, 23, 42, 0.03);
}

@media (max-width: 1100px) {
  .ws-leads-overview {
    grid-template-columns: 1fr 1fr;
  }

  .ws-leads-overview-total {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 0.7rem 0.9rem;
  }

  .ws-leads-overview-pipeline,
  .ws-leads-overview-priority {
    grid-column: auto;
  }

  .ws-leads-total-chart {
    margin-top: 0;
    padding-top: 0;
    flex: 1 1 auto;
  }
}

@media (max-width: 900px) {
  .ws-leads-overview {
    grid-template-columns: 1fr;
  }

  .ws-leads-overview-total,
  .ws-leads-overview-pipeline,
  .ws-leads-overview-priority {
    grid-column: auto;
  }
}

.ws-directory-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  align-items: stretch;
  --dir-lead: #c2410c;
  --dir-customer: #16a34a;
}

.ws-directory-overview .ws-leads-priority-hole.is-active .ws-leads-priority-hole-label {
  fill: #334155;
}

.ws-directory-overview .ws-leads-priority-legend-item.is-all.is-active,
.ws-directory-overview .ws-leads-priority-legend-item.is-all:hover:not(:disabled) {
  background: #f8fafc;
}

.ws-directory-overview path.ws-leads-priority-slice[data-directory-kind="lead"],
.ws-directory-overview path.ws-leads-priority-slice[data-directory-outcome="open"] {
  fill: var(--dir-lead);
}

.ws-directory-overview path.ws-leads-priority-slice[data-directory-kind="customer"],
.ws-directory-overview path.ws-leads-priority-slice[data-directory-outcome="converted"] {
  fill: var(--dir-customer);
}

.ws-directory-overview .ws-leads-priority-legend-item[data-directory-kind="lead"] i,
.ws-directory-overview .ws-leads-priority-legend-item[data-directory-outcome="open"] i {
  background: var(--dir-lead) !important;
}

.ws-directory-overview .ws-leads-priority-legend-item[data-directory-kind="customer"] i,
.ws-directory-overview .ws-leads-priority-legend-item[data-directory-outcome="converted"] i {
  background: var(--dir-customer) !important;
}

.ws-directory-overview .ws-leads-priority-legend-item[data-directory-kind="lead"].is-active,
.ws-directory-overview .ws-leads-priority-legend-item[data-directory-outcome="open"].is-active {
  background: color-mix(in srgb, var(--dir-lead) 10%, var(--os-surface));
}

.ws-directory-overview .ws-leads-priority-legend-item[data-directory-kind="customer"].is-active,
.ws-directory-overview .ws-leads-priority-legend-item[data-directory-outcome="converted"].is-active {
  background: color-mix(in srgb, var(--dir-customer) 10%, var(--os-surface));
}

.ws-directory-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ws-directory-card .ws-leads-priority-chart {
  margin-top: 0.45rem;
}

.ws-directory-trend-chart {
  position: relative;
  margin-top: 0.45rem;
  min-width: 0;
}

.ws-directory-bars {
  width: 100%;
  height: auto;
  max-height: 118px;
  display: block;
}

.ws-directory-bar-label,
.ws-directory-bar-value {
  fill: var(--os-muted);
  font-size: 9px;
  font-weight: 650;
}

.ws-directory-bar-value {
  fill: var(--os-text);
  font-size: 10px;
  font-weight: 750;
}

.ws-directory-empty-chart {
  color: var(--os-muted);
  font-size: 0.8rem;
  padding: 0.8rem 0;
}

.ws-directory-kind-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.ws-directory-table-bar {
  align-items: flex-start;
}

.ws-directory-table-bar .ws-table-filters {
  flex: 1 1 240px;
}

.ws-directory-kind-chip {
  height: 30px;
  padding: 0 0.72rem;
  border: 1px solid var(--os-border);
  border-radius: 999px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.ws-directory-kind-chip.is-active {
  border-color: color-mix(in srgb, #64748b 42%, var(--os-border));
  background: #f8fafc;
  color: #334155;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #64748b 12%, transparent);
}

.ws-directory-kind-chip.is-lead.is-active {
  border-color: color-mix(in srgb, #c2410c 42%, var(--os-border));
  background: #fff7ed;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #c2410c 18%, transparent);
}

.ws-directory-kind-chip.is-customer.is-active {
  border-color: color-mix(in srgb, #16a34a 42%, var(--os-border));
  background: #dcfce7;
  color: #16a34a;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #16a34a 18%, transparent);
}

.ws-kind-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.ws-kind-pill.is-lead {
  background: #fff7ed;
  color: #c2410c;
}

.ws-kind-pill.is-customer {
  background: #dcfce7;
  color: #16a34a;
}

.ws-directory-table col.ws-directory-col-kind { width: 9%; }
.ws-directory-table col.ws-directory-col-name { width: 32%; }
.ws-directory-table col.ws-directory-col-phone { width: 14%; }
.ws-directory-table col.ws-directory-col-status { width: 15%; }
.ws-directory-table col.ws-directory-col-next { width: 14%; }
.ws-directory-table col.ws-directory-col-last { width: 16%; }

.ws-directory-table th,
.ws-directory-table td {
  text-align: left !important;
  vertical-align: middle;
}

.ws-directory-phone {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.ws-directory-phone:hover {
  text-decoration: underline;
}

.ws-directory-table .ws-phone-actions.is-compact {
  gap: 6px;
}

.ws-directory-table .ws-phone-actions.is-compact .ws-phone-actions-num {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.3;
  color: var(--os-text);
}

.ws-directory-table .ws-phone-actions.is-compact .ws-phone-actions-btns {
  gap: 1px;
}

.ws-directory-table .ws-phone-actions.is-compact .ws-phone-action {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: transparent;
  transform: none;
}

.ws-directory-table .ws-phone-actions.is-compact .ws-phone-action svg {
  width: 14px;
  height: 14px;
}

.ws-directory-table .ws-phone-actions.is-compact .ws-phone-action.is-whatsapp {
  color: #1faa55;
  background: transparent;
}

.ws-directory-table .ws-phone-actions.is-compact .ws-phone-action.is-tel {
  color: #64748b;
  background: transparent;
}

.ws-directory-table .ws-phone-actions.is-compact .ws-phone-action:hover {
  transform: none;
}

.ws-directory-table .ws-phone-actions.is-compact .ws-phone-action.is-whatsapp:hover {
  background: color-mix(in srgb, #25d366 12%, transparent);
  color: #0f8a45;
}

.ws-directory-table .ws-phone-actions.is-compact .ws-phone-action.is-tel:hover {
  background: color-mix(in srgb, var(--os-primary) 10%, transparent);
  color: var(--os-primary);
}

.ws-directory-page.is-searching .ws-directory-overview {
  display: none;
}

@media (max-width: 1100px) {
  .ws-directory-overview {
    grid-template-columns: 1fr 1fr;
  }

  .ws-directory-trend {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .ws-directory-overview {
    grid-template-columns: 1fr;
  }

  .ws-directory-trend {
    grid-column: auto;
  }
}

.ws-customers-table th,
.ws-customers-table td {
  text-align: left !important;
  vertical-align: middle;
}

.ws-customers-table col.ws-customers-col-customer { width: 34%; }
.ws-customers-table col.ws-customers-col-status { width: 16%; }
.ws-customers-table col.ws-customers-col-next { width: 16%; }
.ws-customers-table col.ws-customers-col-expiry { width: 16%; }
.ws-customers-table col.ws-customers-col-owner { width: 18%; }

.ws-customers-table .ws-lead-status-pill {
  max-width: 100%;
}

.ws-customers-table .ws-customer-next-action {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.18rem 0.55rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--os-muted);
  font-size: 0.76rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-customers-table .ws-customer-next-action.has-value {
  color: #1d4ed8;
}

.ws-customers-table .ws-customer-expiry {
  display: grid;
  gap: 0.1rem;
  color: var(--os-muted);
  font-size: 0.72rem;
}

.ws-customers-table .ws-customer-expiry strong {
  color: var(--os-text);
  font-size: 0.8rem;
  font-weight: 700;
}

.ws-customers-table .ws-customer-expiry.is-expiring strong {
  color: #b45309;
}

.ws-customers-table .ws-customer-expiry.is-expired strong {
  color: #b91c1c;
}

.ws-customers-table .ws-lead-cell-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}

.ws-customers-table .ws-lead-cell-sub,
.ws-customers-table .ws-lead-cell-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--os-muted);
}

.ws-customers-table .ws-lead-cell-sub {
  font-size: 0.74rem;
}

.ws-customers-table .ws-lead-cell-meta {
  font-size: 0.7rem;
  margin-top: 0.05rem;
}

.ws-customers-table .ws-lead-cell-last {
  overflow: visible;
  text-overflow: unset;
}

.ws-customers-table tr.is-highlight td {
  background: color-mix(in srgb, #22c55e 10%, var(--os-surface));
}

.ws-customers-table .ws-lead-cell {
  justify-items: start;
  justify-content: start;
  width: 100%;
}

.ws-customers-table .ws-followup-assignee {
  margin-left: 0;
  margin-right: 0;
  justify-content: flex-start;
  text-align: left;
}

.ws-customers-table button.ws-customer-open,
.ws-customers-table .ws-customer-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  flex: 1;
  text-decoration: none;
}

.ws-customers-table .ws-customer-open strong,
.ws-customers-table .ws-customer-open .ws-lead-cell-sub,
.ws-customers-table .ws-customer-open .ws-lead-cell-meta {
  width: 100%;
  text-align: left;
}

.ws-customers-table .ws-customer-open:hover strong {
  color: var(--os-primary, #2563eb);
}

.ws-customer-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.ws-customer-open:hover strong {
  color: var(--os-primary, #2563eb);
}

.ws-customer-contact,
.ws-customer-reason {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-customer-reason {
  max-width: 260px;
  color: var(--os-text);
  font-size: 0.84rem;
}

/* Admin account settings */
.admin-settings-root,
.admin-settings {
  width: 100%;
  max-width: 520px;
}

.admin-settings-card {
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--os-border);
  border-radius: 16px;
  background: var(--os-surface, #fff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-settings-head h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--os-text);
}

.admin-settings-head p {
  margin: 0;
  color: var(--os-muted, #64748b);
  font-size: 0.9rem;
  line-height: 1.45;
}

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

.admin-settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.admin-settings-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--os-muted, #64748b);
}

.admin-settings-form input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-input, var(--os-surface, #fff));
  color: var(--os-text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-settings-form input::placeholder {
  color: color-mix(in srgb, var(--os-muted, #64748b) 80%, transparent);
}

.admin-settings-form input:focus {
  border-color: color-mix(in srgb, var(--os-accent, #2563eb) 55%, var(--os-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--os-accent, #2563eb) 18%, transparent);
}

.admin-settings-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  color: var(--os-muted, #64748b);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-settings-divider::before,
.admin-settings-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--os-border);
}

.admin-settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  padding-top: 4px;
}

.admin-settings-actions .btn {
  min-width: 132px;
}

.header-user-profile.is-clickable {
  cursor: pointer;
  border-radius: 12px;
  padding: 4px 8px 4px 4px;
  transition: background 0.15s ease;
}

.header-user-profile.is-clickable:hover,
.header-user-profile.is-clickable:focus-visible {
  background: color-mix(in srgb, var(--os-accent, #2563eb) 10%, transparent);
  outline: none;
}

/* ?? Digital Marketing ?? */
.os-nav-item .os-nav-pending-badge,
.os-nav-pending-badge {
  margin-left: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  font-style: normal;
  line-height: 1.35rem;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.os-nav-item.is-active .os-nav-pending-badge {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.digital-marketing-root,
.dm-page {
  display: grid;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.dm-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-width: 0;
}

.dm-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  flex: 0 1 auto;
  gap: 0.25rem;
  padding: 0.22rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  min-width: 0;
  overflow-x: auto;
}

.dm-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--os-muted);
  font: inherit;
  font-weight: 650;
  font-size: 0.86rem;
  padding: 0.5rem 0.85rem;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  line-height: 1.2;
}

.dm-tab em {
  font-style: normal;
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
  min-width: 1.2rem;
  padding: 0 0.35rem;
  font-size: 0.7rem;
  line-height: 1.2rem;
  text-align: center;
}

.dm-tab.is-active {
  background: color-mix(in srgb, var(--os-primary) 12%, var(--os-surface));
  color: var(--os-primary);
}

.dm-top-actions {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 0.5rem;
  align-items: center;
  margin-left: auto;
}

.dm-top-actions .dm-search,
.dm-top-actions select {
  width: auto;
  min-width: 0;
  height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.88rem;
}

.dm-top-actions .dm-search {
  width: 200px;
}

.dm-top-actions select {
  width: 150px;
}

.dm-top-actions .ws-btn {
  height: 38px;
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.95rem;
}

.dm-field input,
.dm-field select,
.dm-field textarea {
  width: 100%;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  padding: 0.55rem 0.75rem;
  font: inherit;
  box-sizing: border-box;
}

.dm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.dm-stats > div {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.15rem;
}

.dm-stats strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.dm-stats span {
  color: var(--os-muted);
  font-size: 0.8rem;
}

.dm-stats .is-warn strong { color: #b45309; }
.dm-stats .is-ok strong { color: #0f766e; }
.dm-stats .is-danger strong { color: #dc2626; }

.dm-list {
  display: grid;
  gap: 0.85rem;
}

.dm-post-list {
  gap: 1rem;
}

.dm-post-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: stretch;
  padding: 1.05rem;
  border: 1px solid var(--os-border);
  border-radius: 18px;
  background: var(--os-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.dm-card-thumb {
  appearance: none;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 148px;
  margin: 0;
  padding: 0;
  border: 1px solid #d8dee8;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  color: #94a3b8;
  cursor: default;
}

.dm-card-thumb.has-image {
  cursor: zoom-in;
  border-color: #c9d4e4;
}

.dm-card-thumb.has-image:hover {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.dm-card-thumb img {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: cover;
}

.dm-post-card-body {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  align-content: start;
}

.dm-post-card-top {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
}

.dm-post-card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.dm-post-card-title-row h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.dm-post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  color: var(--os-muted);
  font-size: 0.84rem;
}

.dm-post-card-content {
  display: grid;
  gap: 0.35rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e7ecf3;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.dm-post-card-excerpt {
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.dm-see-more {
  appearance: none;
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0;
  width: fit-content;
  cursor: pointer;
}

.dm-see-more:hover {
  text-decoration: underline;
}

.dm-filter-hint {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
  color: var(--os-muted);
}

.dm-filter-hint strong {
  color: var(--os-text);
}

.dm-post-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  align-items: center;
  justify-content: space-between;
  color: var(--os-muted);
}

.dm-post-card-foot-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  align-items: center;
  min-width: 0;
}

.dm-post-card-foot .dm-boost-chips {
  margin-left: auto;
}

.dm-asset-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.dm-asset-link:hover {
  text-decoration: underline;
}

.dm-field > small.ws-muted {
  display: block;
  margin-top: 0.2rem;
}

.dm-boost-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dm-boost-chips em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.dm-boost-chips em.is-sponsored {
  background: #eff6ff;
  color: #1d4ed8;
}

.dm-boost-chips em.is-boost {
  background: #ecfdf5;
  color: #0f766e;
}

.dm-boost-panel {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--os-surface) 92%, #eff6ff);
}

.dm-boost-panel h4 {
  margin: 0;
}

.dm-boost-panel .ws-muted {
  margin: 0;
  font-size: 0.84rem;
}

.dm-boost-summary {
  margin: 0;
  font-weight: 650;
  color: var(--os-text);
}

.dm-boost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: end;
}

.dm-amount-input {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #d0d7e2;
  border-radius: 10px;
  background: #fff;
  padding: 0 0.7rem;
}

.dm-amount-input span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
}

.dm-amount-input input {
  border: 0;
  outline: none;
  width: 100%;
  padding: 0.55rem 0;
  font: inherit;
  background: transparent;
}

@media (max-width: 900px) {
  .dm-boost-grid {
    grid-template-columns: 1fr;
  }
}

.dm-list-pager {
  margin-top: 0.35rem;
}

.dm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.dm-lightbox-backdrop {
  appearance: none;
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.dm-lightbox-panel {
  position: relative;
  z-index: 1;
  max-width: min(960px, 100%);
  max-height: min(88vh, 100%);
  padding: 0.65rem;
  border-radius: 16px;
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.dm-lightbox-panel img {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 1.3rem);
  border-radius: 10px;
  object-fit: contain;
  background: #000;
}

.dm-lightbox-close {
  appearance: none;
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.dm-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
}

.dm-card-main {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.dm-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.dm-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  color: var(--os-muted);
  font-size: 0.82rem;
}

.dm-status {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}

.dm-status.is-warn { background: #fff7ed; color: #c2410c; }
.dm-status.is-ok { background: #ecfdf5; color: #0f766e; }
.dm-status.is-info { background: #eff6ff; color: #2563eb; }
.dm-status.is-danger { background: #fef2f2; color: #dc2626; }
.dm-status.is-muted { background: #f8fafc; color: #64748b; }

.dm-empty,
.dm-loading {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--os-muted);
  border: 1px dashed var(--os-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--os-surface) 88%, #f8fafc);
}

.dm-editor,
.dm-review,
.dm-settings-panel {
  padding: 1.1rem 1.2rem 1.2rem;
  display: grid;
  gap: 1rem;
}

.dm-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 100%;
  height: 100%;
  box-sizing: border-box;
}

.dm-settings-panel > header {
  flex: 0 0 auto;
}

.dm-settings-panel > header p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.dm-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.dm-editor-head h3,
.dm-settings-panel h3 {
  margin: 0 0 0.2rem;
}

.dm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.dm-field {
  display: grid;
  gap: 0.35rem;
}

.dm-field-full { grid-column: 1 / -1; }

.dm-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--os-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--os-surface) 92%, #f8fafc);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.86rem;
}

.dm-chip input { accent-color: var(--os-primary); }

.dm-same-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dm-composer {
  margin-top: 1.15rem;
  padding: 1rem;
  border: 1px solid var(--os-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--os-surface) 94%, #f1f5f9);
  display: grid;
  gap: 0.9rem;
}

.dm-composer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.dm-composer-head h4 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
}

.dm-composer-head .ws-muted {
  margin: 0;
  font-size: 0.82rem;
}

.dm-segment {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--os-border);
  background: #fff;
  gap: 0.15rem;
}

.dm-segment button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.dm-segment button.is-active {
  background: #2563eb;
  color: #fff;
}

.dm-platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dm-platform-pill {
  appearance: none;
  border: 1.5px solid #d0d7e2;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dm-platform-pill:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.dm-platform-pill.is-on,
.dm-platform-pill[aria-pressed="true"] {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
}

.dm-platform-hint {
  margin: -0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--os-muted);
}

.dm-composer-block {
  display: grid;
  gap: 0.45rem;
}

.dm-composer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--os-border);
}

.dm-composer-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  padding: 0.45rem 0.7rem;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  white-space: nowrap;
}

.dm-composer-tab.is-active {
  color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 -2px 0 #2563eb;
}

.dm-composer-body {
  display: grid;
  gap: 0.4rem;
}

.dm-composer-body textarea {
  width: 100%;
  min-height: 9.5rem;
  resize: vertical;
  box-sizing: border-box;
  border: 1.5px solid #d0d7e2;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  padding: 0.75rem 0.9rem;
  font: inherit;
  line-height: 1.45;
}

.dm-composer-body textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.dm-composer-empty {
  padding: 1rem;
  border-radius: 12px;
  border: 1px dashed var(--os-border);
  color: var(--os-muted);
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .dm-composer-head {
    flex-direction: column;
  }

  .dm-segment {
    width: 100%;
  }

  .dm-segment button {
    flex: 1;
    text-align: center;
  }
}

.dm-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.dm-upload-row .ws-muted {
  flex: 1 1 160px;
}

.dm-upload-block {
  display: grid;
  gap: 0.75rem;
}

.dm-media-preview {
  appearance: none;
  display: grid;
  place-items: center;
  gap: 0.35rem;
  width: min(100%, 360px);
  min-height: 200px;
  margin: 0;
  padding: 0;
  border: 1px dashed color-mix(in srgb, var(--os-primary) 35%, var(--os-border));
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--os-surface) 88%, #eef2ff), var(--os-surface));
  color: var(--os-muted);
  cursor: pointer;
  text-align: center;
}

.dm-media-preview:hover {
  border-color: color-mix(in srgb, var(--os-primary) 55%, var(--os-border));
  background: color-mix(in srgb, var(--os-primary) 6%, var(--os-surface));
}

.dm-media-preview.has-image {
  border-style: solid;
  padding: 0;
  background: #0f172a08;
}

.dm-media-preview img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #0f172a08;
}

.dm-media-preview.has-image {
  position: relative;
}

.dm-media-uploading {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.45rem;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 650;
}

.dm-media-placeholder-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--os-primary) 10%, var(--os-surface));
  color: var(--os-primary);
}

.dm-media-preview strong {
  color: var(--os-text);
  font-size: 0.92rem;
}

.dm-media-preview small {
  font-size: 0.78rem;
}

.dm-editor-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.dm-editor-foot-left,
.dm-editor-foot-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dm-editor-foot-right {
  margin-left: auto;
}

.dm-review-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.dm-review-meta .ws-label,
.dm-notes .ws-label {
  display: block;
  margin-bottom: 0.2rem;
}

.dm-notes {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--os-surface) 90%, #f8fafc);
  border: 1px solid var(--os-border);
}

.dm-review-feedback {
  margin: 0 0 0.85rem;
  background: #fff7ed;
  border-color: #fdba74;
}

.dm-review-feedback p {
  margin: 0;
  white-space: pre-wrap;
  color: #9a3412;
}

.dm-card-feedback {
  margin-top: 0.35rem;
  padding: 0.55rem 0.7rem;
}

.dm-card-feedback p {
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dm-composer.is-readonly {
  background: color-mix(in srgb, var(--os-surface) 96%, #f8fafc);
}

.dm-empty-inline {
  color: var(--os-muted);
  font-size: 0.88rem;
}

.dm-published-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--os-border);
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, #eff6ff 70%, white), color-mix(in srgb, #f8fafc 80%, white));
  margin-bottom: 0.85rem;
}

.dm-published-hero h3 {
  margin: 0 0 0.2rem;
}

.dm-published-hero .ws-muted {
  margin: 0;
}

.dm-published-hero-stat {
  text-align: right;
}

.dm-published-hero-stat strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
  color: #1d4ed8;
}

.dm-published-hero-stat span {
  color: var(--os-muted);
  font-size: 0.82rem;
}

.dm-published-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  color: var(--os-muted);
  font-size: 0.84rem;
}

.dm-published-card-tags {
  display: grid;
  gap: 0.55rem;
}

.dm-brand-tags,
.dm-social-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.dm-brand-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.dm-brand-tag.is-mint { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.dm-brand-tag.is-sky { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.dm-brand-tag.is-amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.dm-brand-tag.is-rose { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.dm-brand-tag.is-violet { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.dm-brand-tag.is-slate { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }

.dm-social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem 0.28rem 0.4rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid var(--os-border);
  color: #334155;
}

.dm-social-chips.is-compact .dm-social-chip {
  padding: 0.28rem;
  width: 1.85rem;
  height: 1.85rem;
  justify-content: center;
}

.dm-social-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #fff;
  color: inherit;
}

.dm-social-chip.is-facebook { background: #eff6ff; color: #1877f2; border-color: #bfdbfe; }
.dm-social-chip.is-instagram { background: #fdf2f8; color: #db2777; border-color: #fbcfe8; }
.dm-social-chip.is-tiktok { background: #f8fafc; color: #0f172a; border-color: #cbd5e1; }
.dm-social-chip.is-youtube { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.dm-social-chip.is-linkedin { background: #eff6ff; color: #0a66c2; border-color: #bfdbfe; }
.dm-social-chip.is-whatsapp { background: #ecfdf5; color: #16a34a; border-color: #bbf7d0; }
.dm-social-chip.is-x { background: #f8fafc; color: #111827; border-color: #d1d5db; }

.dm-published-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--os-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--os-surface) 94%, #f8fafc);
}

.dm-published-row {
  display: grid;
  gap: 0.45rem;
}

.dm-published-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.dm-published-summary .ws-label {
  display: block;
  margin-bottom: 0.15rem;
}

.dm-published-media {
  margin: 0 0 0.85rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--os-border);
  background: #0f172a08;
  max-width: 28rem;
}

.dm-published-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 22rem;
  object-fit: contain;
}

.dm-pub-copy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.dm-pub-copy {
  border: 1px solid var(--os-border);
  border-radius: 14px;
  padding: 0.85rem;
  background: #fff;
  display: grid;
  gap: 0.55rem;
}

.dm-pub-copy header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dm-pub-copy-platform {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dm-pub-copy p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #334155;
  line-height: 1.5;
}

.dm-pub-copy.is-facebook { border-color: #bfdbfe; }
.dm-pub-copy.is-instagram { border-color: #fbcfe8; }
.dm-pub-copy.is-tiktok { border-color: #cbd5e1; }
.dm-pub-copy.is-youtube { border-color: #fecaca; }
.dm-pub-copy.is-linkedin { border-color: #bfdbfe; }
.dm-pub-copy.is-whatsapp { border-color: #bbf7d0; }
.dm-pub-copy.is-x { border-color: #d1d5db; }

@media (max-width: 720px) {
  .dm-published-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dm-published-hero-stat {
    text-align: left;
  }

  .dm-published-summary {
    grid-template-columns: 1fr;
  }
}

.dm-review .dm-composer {
  margin-top: 0.35rem;
}

.dm-review .dm-composer + .dm-boost-panel,
.dm-review .dm-composer + .dm-field {
  margin-top: 0.25rem;
}

.dm-platform-review h4 { margin: 0; }

.dm-platform-block {
  border: 1px solid var(--os-border);
  border-radius: 12px;
  padding: 0.85rem;
  display: grid;
  gap: 0.65rem;
  background: color-mix(in srgb, var(--os-surface) 94%, #f8fafc);
}

.dm-platform-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dm-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

.dm-settings-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-height: 0;
}

.dm-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-surface) 94%, #f8fafc);
  flex: 0 0 auto;
}

.dm-settings-item > div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.dm-settings-item strong {
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dm-settings-item .ws-btn {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
}

.dm-settings-item.is-inactive { opacity: 0.55; }
.dm-settings-item small {
  display: block;
  color: var(--os-muted);
  font-size: 0.75rem;
  line-height: 1.2;
}

.dm-settings-add {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 0.15rem;
}

.dm-settings-add input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  box-sizing: border-box;
}

.dm-settings-add .ws-btn {
  flex: 0 0 auto;
  align-self: center;
  height: 36px;
  min-width: 64px;
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.ws-btn.is-danger { color: #dc2626; }

@media (max-width: 1100px) {
  .dm-settings {
    grid-template-columns: 1fr;
  }

  .dm-top {
    flex-wrap: wrap;
  }

  .dm-top-actions {
    width: 100%;
    margin-left: 0;
  }

  .dm-top-actions .dm-search {
    flex: 1 1 160px;
    width: auto;
    min-width: 140px;
  }

  .dm-top-actions select {
    flex: 0 1 140px;
  }
}

@media (max-width: 1100px) {
  .dm-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .dm-stats,
  .dm-grid,
  .dm-platform-cols,
  .dm-review-meta,
  .dm-overview-kpis,
  .dm-overview-grid,
  .dm-overview-grid-3 {
    grid-template-columns: 1fr;
  }
  .dm-overview-card-wide {
    grid-column: auto;
  }
  .dm-post-card {
    grid-template-columns: 1fr;
  }
  .dm-card-thumb,
  .dm-card-thumb img {
    min-height: 180px;
    height: 180px;
  }
  .dm-card { flex-direction: column; align-items: stretch; }

  .dm-top-actions {
    flex-wrap: wrap;
  }

  .dm-top-actions .ws-btn {
    width: 100%;
  }
}

/* Campaign overview */
.dm-overview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dm-overview-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.dm-overview-head .ws-muted {
  margin: 0;
}

.dm-overview-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.dm-overview-kpi {
  padding: 1rem 1.05rem;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.dm-overview-kpi .ws-label {
  display: block;
  margin-bottom: 0.35rem;
}

.dm-overview-kpi strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.dm-overview-kpi small {
  display: block;
  margin-top: 0.35rem;
  color: var(--os-muted);
  font-size: 0.78rem;
}

.dm-overview-kpi.is-warn strong { color: #b45309; }
.dm-overview-kpi.is-ok strong { color: #15803d; }
.dm-overview-kpi.is-spend strong { color: #1d4ed8; }

.dm-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dm-overview-grid-3 {
  grid-template-columns: 1.6fr 1fr;
}

.dm-overview-card {
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: #fff;
}

.dm-overview-card header {
  margin-bottom: 0.75rem;
}

.dm-overview-card h4 {
  margin: 0 0 0.15rem;
  font-size: 0.98rem;
}

.dm-overview-card .ws-muted {
  margin: 0;
  font-size: 0.8rem;
}

.dm-overview-card-wide {
  grid-column: span 1;
}

.dm-overview-empty-chart {
  padding: 1.4rem 0.5rem;
  color: var(--os-muted);
  text-align: center;
  font-size: 0.86rem;
}

.dm-overview-bars,
.dm-overview-line {
  width: 100%;
  height: auto;
  display: block;
}

.dm-overview-bar-label,
.dm-overview-bar-value,
.dm-overview-axis {
  fill: #64748b;
  font-size: 11px;
}

.dm-overview-bar-fill {
  fill: #94a3b8;
}

.dm-overview-bar-fill.is-sky { fill: #3b82f6; }
.dm-overview-bar-fill.is-mint { fill: #14b8a6; }
.dm-overview-bar-fill.is-amber { fill: #f59e0b; }

.dm-overview-gridline {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.dm-overview-polyline {
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dm-overview-dot {
  fill: #2563eb;
}

.dm-overview-split-track {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.dm-overview-split-track .is-sponsored { background: #2563eb; }
.dm-overview-split-track .is-organic { background: #94a3b8; }

.dm-overview-split-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: #475569;
}

.dm-overview-split-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.35rem;
  border-radius: 50%;
  vertical-align: middle;
}

.dm-overview-split-legend i.is-sponsored { background: #2563eb; }
.dm-overview-split-legend i.is-organic { background: #94a3b8; }

.dm-overview-segment-track {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.dm-overview-segment-track .is-tone-0 { background: #3b82f6; }
.dm-overview-segment-track .is-tone-1 { background: #14b8a6; }
.dm-overview-segment-track .is-tone-2 { background: #f59e0b; }
.dm-overview-segment-track .is-tone-3 { background: #ef4444; }
.dm-overview-segment-track .is-tone-4 { background: #8b5cf6; }
.dm-overview-segment-track .is-tone-5 { background: #64748b; }

.dm-overview-segment-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.dm-overview-segment-list li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #475569;
}

.dm-overview-segment-list i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.dm-overview-segment-list i.is-tone-0 { background: #3b82f6; }
.dm-overview-segment-list i.is-tone-1 { background: #14b8a6; }
.dm-overview-segment-list i.is-tone-2 { background: #f59e0b; }
.dm-overview-segment-list i.is-tone-3 { background: #ef4444; }
.dm-overview-segment-list i.is-tone-4 { background: #8b5cf6; }
.dm-overview-segment-list i.is-tone-5 { background: #64748b; }

.dm-overview-segment-list strong {
  flex: 1;
  font-weight: 650;
  color: #0f172a;
}

.dm-overview-segment-list em {
  font-style: normal;
  color: var(--os-muted);
}

.dm-overview-mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.dm-overview-mini-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--os-surface) 92%, #f8fafc);
}

.dm-overview-mini-list strong {
  display: block;
  font-size: 0.88rem;
}

.dm-overview-mini-list small {
  display: block;
  margin-top: 0.15rem;
  color: var(--os-muted);
  font-size: 0.76rem;
}

@media (max-width: 1100px) {
  .dm-overview-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dm-overview-kpis {
    grid-template-columns: 1fr 1fr;
  }
}

.recruitment-root,
.rec-page {
  display: grid;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.rec-loading,
.rec-empty {
  display: grid;
  gap: 0.35rem;
  place-items: center;
  min-height: 28vh;
  text-align: center;
  color: var(--os-muted);
}

.rec-empty h3 {
  margin: 0;
  color: var(--os-text);
}

.rec-empty p {
  margin: 0;
  max-width: 34rem;
}

.rec-start {
  display: grid;
  gap: 1rem;
}

.rec-start-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem 1.6rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--os-border);
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, #2563eb 8%, var(--os-surface)) 0%, var(--os-surface) 55%);
}

.rec-start-art {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--os-surface) 70%, white);
  box-shadow: inset 0 0 0 1px var(--os-border);
}

.rec-start-copy {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
}

.rec-start-copy span {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}

.rec-start-copy h3 {
  margin: 0;
  font-size: 1.2rem;
}

.rec-start-copy p {
  margin: 0 0 0.45rem;
  color: var(--os-muted);
  max-width: 40rem;
}

html.theme-dark .rec-start-hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16) 0%, var(--os-surface) 58%);
}

html.theme-dark .rec-start-copy span { color: #93c5fd; }

.rec-intake {
  display: grid;
  gap: 0.9rem;
}

.rec-intake-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.2rem 1.5rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--os-border);
  border-radius: 18px;
  background:
    linear-gradient(120deg, color-mix(in srgb, #7c3aed 9%, var(--os-surface)) 0%, var(--os-surface) 52%);
}

.rec-intake-banner.is-hires {
  background:
    linear-gradient(120deg, color-mix(in srgb, #15803d 10%, var(--os-surface)) 0%, var(--os-surface) 55%);
}

.rec-intake-art {
  position: relative;
  width: 118px;
  height: 72px;
  flex: 0 0 auto;
}

.rec-intake-art .rec-avatar {
  position: absolute;
  top: 14px;
  width: 46px;
  height: 46px;
  font-size: 0.78rem;
  box-shadow: 0 0 0 3px var(--os-surface);
}

.rec-intake-art .rec-avatar:nth-child(1) { left: 0; z-index: 1; }
.rec-intake-art .rec-avatar:nth-child(2) { left: 34px; z-index: 2; }
.rec-intake-art .rec-avatar:nth-child(3) {
  left: 68px;
  z-index: 3;
  font-size: 1.1rem;
}

.rec-intake-art.is-hires { width: 86px; }
.rec-intake-art.is-hires .rec-avatar:nth-child(2) { left: 36px; }

.rec-intake-copy {
  display: grid;
  justify-items: start;
  gap: 0.3rem;
}

.rec-intake-copy span {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c3aed;
}

.rec-intake-banner.is-hires .rec-intake-copy span { color: #15803d; }

.rec-intake-copy h3 {
  margin: 0;
  font-size: 1.2rem;
}

.rec-intake-copy p {
  margin: 0 0 0.35rem;
  color: var(--os-muted);
  max-width: 40rem;
}

.rec-intake-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

html.theme-dark .rec-intake-banner {
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.16) 0%, var(--os-surface) 58%);
}

html.theme-dark .rec-intake-banner.is-hires {
  background: linear-gradient(120deg, rgba(21, 128, 61, 0.16) 0%, var(--os-surface) 58%);
}

html.theme-dark .rec-intake-copy span { color: #d8b4fe; }
html.theme-dark .rec-intake-banner.is-hires .rec-intake-copy span { color: #86efac; }

.rec-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.rec-top-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.rec-search,
.rec-top-filters select,
.rec-table select {
  height: 38px;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.88rem;
}

.rec-search {
  min-width: 180px;
  flex: 1 1 180px;
  max-width: 260px;
}

.rec-dashboard {
  gap: 1.1rem;
}

.rec-dash-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 520px;
  padding: 0 0.9rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  color: var(--os-muted);
}

.rec-dash-search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--os-text);
  font: inherit;
}

.rec-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
}

.rec-kpi {
  display: grid;
  gap: 0.18rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--os-border);
  border-radius: 16px;
  background: var(--os-surface);
}

.rec-kpi-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 0.35rem;
  border-radius: 10px;
}

.rec-kpi.is-blue .rec-kpi-icon { background: #dbeafe; color: #2563eb; }
.rec-kpi.is-violet .rec-kpi-icon { background: #ede9fe; color: #7c3aed; }
.rec-kpi.is-teal .rec-kpi-icon { background: #ccfbf1; color: #0f766e; }
.rec-kpi.is-orange .rec-kpi-icon { background: #ffedd5; color: #c2410c; }
.rec-kpi.is-pink .rec-kpi-icon { background: #fce7f3; color: #db2777; }
.rec-kpi.is-green .rec-kpi-icon { background: #dcfce7; color: #15803d; }

.rec-kpi strong {
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.rec-kpi span {
  color: var(--os-muted);
  font-size: 0.8rem;
}

.rec-trend {
  font-size: 0.72rem;
  font-weight: 750;
}

.rec-trend.is-up { color: #15803d; }
.rec-trend.is-down { color: #b91c1c; }
.rec-trend.is-flat { color: var(--os-muted); }

.rec-dash-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr 1.05fr;
  gap: 0.75rem;
}

.rec-dash-row-bottom {
  grid-template-columns: 1fr 1.1fr 1fr;
}

.rec-card {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  display: grid;
  align-content: start;
  gap: 0.75rem;
  min-width: 0;
}

.rec-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.rec-card header span {
  color: var(--os-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rec-card h3 {
  margin: 0.15rem 0 0;
  font-size: 1.02rem;
}

.rec-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.rec-card-foot {
  margin: 0;
  padding-top: 0.55rem;
  border-top: 1px solid var(--os-border);
  color: var(--os-muted);
  font-size: 0.78rem;
}

.rec-donut-wrap {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.rec-donut {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.rec-donut-hole {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--os-surface);
  display: grid;
  place-items: center;
  text-align: center;
}

.rec-donut-hole strong {
  font-size: 1.35rem;
  line-height: 1;
}

.rec-donut-hole span,
.rec-muted {
  color: var(--os-muted);
  font-size: 0.75rem;
}

.rec-legend,
.rec-people-list,
.rec-task-list,
.rec-mini-list,
.rec-feed,
.rec-catalog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.rec-legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.45rem;
}

.rec-legend li:has(> .rec-legend-hit) {
  display: block;
}

.rec-legend-hit {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.12rem 0.2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rec-legend-hit:hover {
  background: #f1f5f9;
}

html.theme-dark .rec-legend-hit:hover {
  background: rgba(148, 163, 184, 0.16);
}

.rec-legend {
  flex: 1;
  max-height: 168px;
  overflow: auto;
}

.rec-legend i,
.rec-donut-wrap i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.rec-legend i.is-job,
.rec-donut-wrap i.is-job { background: #2563eb; }
.rec-legend i.is-intern,
.rec-donut-wrap i.is-intern { background: #f59e0b; }

.rec-legend em {
  font-style: normal;
  color: var(--os-muted);
  font-size: 0.78rem;
}

.rec-funnel {
  display: grid;
  gap: 0.55rem;
}

.rec-funnel-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
}

.rec-funnel-track {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--os-border) 70%, transparent);
  overflow: hidden;
}

.rec-funnel-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #93c5fd;
}

.rec-funnel-row.is-applied .rec-funnel-track i { background: #93c5fd; }
.rec-funnel-row.is-screening .rec-funnel-track i { background: #60a5fa; }
.rec-funnel-row.is-interview .rec-funnel-track i { background: #3b82f6; }
.rec-funnel-row.is-offer .rec-funnel-track i { background: #2563eb; }
.rec-funnel-row.is-hired .rec-funnel-track i { background: #1d4ed8; }

.rec-people-list button,
.rec-task-list button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.15rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.rec-people-list li + li,
.rec-task-list li + li {
  border-top: 1px solid var(--os-border);
}

.rec-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
}

.rec-avatar.is-blue { background: #dbeafe; color: #1d4ed8; }
.rec-avatar.is-violet { background: #ede9fe; color: #6d28d9; }
.rec-avatar.is-teal { background: #ccfbf1; color: #0f766e; }
.rec-avatar.is-orange { background: #ffedd5; color: #c2410c; }
.rec-avatar.is-pink { background: #fce7f3; color: #be185d; }
.rec-avatar.is-green { background: #dcfce7; color: #15803d; }

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

.rec-person-copy strong,
.rec-table strong,
.rec-feed strong {
  display: block;
}

.rec-person-copy small,
.rec-table small,
.rec-feed small {
  display: block;
  margin-top: 0.12rem;
  color: var(--os-muted);
  font-size: 0.75rem;
}

.rec-time,
.rec-when {
  flex: 0 0 64px;
  color: var(--os-muted);
  font-size: 0.72rem;
  font-weight: 750;
  font-style: normal;
}

.rec-match {
  flex: 0 0 auto;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 800;
}

.rec-task-check {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 1.5px solid var(--os-border);
  border-radius: 4px;
}

.rec-task-list b {
  min-width: 1.4rem;
  text-align: right;
  color: var(--os-muted);
}

.rec-stats {
  display: none;
}

.rec-table-wrap {
  overflow: auto;
  border: 1px solid var(--os-border);
  border-radius: 14px;
  background: var(--os-surface);
}

.rec-table {
  width: 100%;
  border-collapse: collapse;
}

.rec-table th,
.rec-table td {
  padding: 0.8rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--os-border);
  vertical-align: middle;
}

.rec-table th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--os-muted);
}

.rec-table tbody tr[data-rec-action],
.rec-table tbody td[data-rec-action] {
  cursor: pointer;
}

.rec-table tbody tr:hover {
  background: color-mix(in srgb, var(--os-surface) 86%, #64748b);
}

.rec-table th.rec-col-actions,
.rec-table td.rec-col-actions {
  text-align: left;
  width: 1%;
  white-space: nowrap;
}

.rec-table .rec-view-btn {
  height: 32px;
  padding: 0 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.rec-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  font-style: normal;
  background: color-mix(in srgb, var(--os-border) 70%, transparent);
}

.rec-pill.is-job,
.rec-pill.is-type-job { background: #dbeafe; color: #1d4ed8; }
.rec-pill.is-intern,
.rec-pill.is-type-internship { background: #fef3c7; color: #b45309; }
.rec-pill.is-type-fellowship { background: #ede9fe; color: #6d28d9; }
.rec-pill.is-type-traineeship { background: #ccfbf1; color: #0f766e; }
.rec-pill.is-type-apprenticeship { background: #ffedd5; color: #c2410c; }
.rec-pill.is-type-graduate_program { background: #fce7f3; color: #be185d; }
.rec-pill.is-type-contract { background: #e0f2fe; color: #0369a1; }
.rec-pill.is-type-freelance { background: #dcfce7; color: #15803d; }
.rec-pill.is-type-volunteer { background: #f3e8ff; color: #7c3aed; }
.rec-pill.is-type-industrial_training,
.rec-pill.is-type-other { background: #e2e8f0; color: #334155; }
.rec-pill.is-open { background: #dcfce7; color: #15803d; }
.rec-pill.is-closed,
.rec-pill.is-rejected,
.rec-pill.is-withdrawn { background: #fee2e2; color: #b91c1c; }
.rec-pill.is-filled,
.rec-pill.is-hired { background: #dbeafe; color: #1d4ed8; }
.rec-pill.is-unassigned { background: #f3e8ff; color: #7c3aed; }
.rec-pill.is-stage { background: #dbeafe; color: #1d4ed8; }

.rec-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.85rem 1rem;
}

.rec-detail-head h2 {
  margin: 0.35rem 0 0;
}

.rec-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}

.rec-candidate-profile.ws-lead-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 1200px;
}

.rec-candidate-profile .ws-lead-cover {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 42%, #2dd4bf 100%);
}

.rec-candidate-profile .ws-lead-attr-menu {
  position: fixed;
  z-index: 400;
  min-width: 180px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
}

.rec-candidate-profile .rec-feed {
  margin-top: 1rem;
}

.rec-back {
  justify-self: start;
  height: 34px;
  padding: 0 0.7rem;
  color: var(--os-muted);
}

.rec-profile-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.25rem;
}

.rec-profile-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  flex: 1;
}

.rec-profile-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.rec-profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  box-shadow: 0 0 0 4px var(--os-surface), 0 10px 24px rgba(15, 23, 42, 0.12);
}

.rec-profile-avatar.is-blue { background: linear-gradient(160deg, #60a5fa, #2563eb); }
.rec-profile-avatar.is-violet { background: linear-gradient(160deg, #c084fc, #7c3aed); }
.rec-profile-avatar.is-teal { background: linear-gradient(160deg, #2dd4bf, #0f766e); }
.rec-profile-avatar.is-orange { background: linear-gradient(160deg, #fdba74, #ea580c); }
.rec-profile-avatar.is-pink { background: linear-gradient(160deg, #f9a8d4, #db2777); }
.rec-profile-avatar.is-green { background: linear-gradient(160deg, #86efac, #16a34a); }

.rec-profile-dot {
  position: absolute;
  right: 4px;
  bottom: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px var(--os-surface);
}

.rec-profile-dot.is-rejected,
.rec-profile-dot.is-withdrawn,
.rec-profile-dot.is-closed { background: #ef4444; }
.rec-profile-dot.is-hired { background: #2563eb; }

.rec-profile-hero-copy {
  min-width: 0;
  display: grid;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.rec-profile-hero-copy h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.rec-profile-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rec-profile-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0.1rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--os-muted);
  font-size: 0.86rem;
}

.rec-profile-contacts li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.rec-profile-contacts a {
  color: inherit;
  text-decoration: none;
}

.rec-profile-contacts a:hover {
  color: var(--os-text);
  text-decoration: underline;
}

.rec-profile-contacts svg {
  flex: 0 0 auto;
  opacity: 0.8;
}

.rec-profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-left: auto;
}

.rec-profile-hero-actions .ws-btn {
  height: 36px;
  padding: 0 0.85rem;
}

.rec-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  border-bottom: 1px solid var(--os-border);
}

.rec-profile-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--os-muted);
  font: inherit;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.85rem 0.75rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.rec-profile-tab.is-active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.rec-profile-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 0.85rem;
  align-items: start;
}

.rec-profile-side {
  display: grid;
  gap: 0.85rem;
}

.rec-fact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.15rem;
  margin: 0;
}

.rec-fact {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
}

.rec-fact-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.rec-fact-icon.is-blue { background: #dbeafe; color: #2563eb; }
.rec-fact-icon.is-orange { background: #ffedd5; color: #c2410c; }
.rec-fact-icon.is-violet { background: #ede9fe; color: #7c3aed; }
.rec-fact-icon.is-green { background: #dcfce7; color: #15803d; }
.rec-fact-icon.is-teal { background: #ccfbf1; color: #0f766e; }

.rec-fact dt {
  margin: 0 0 0.18rem;
  color: var(--os-muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rec-fact dd {
  margin: 0;
  font-weight: 650;
  min-width: 0;
}

.rec-person-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.rec-chip-avatar,
.rec-person-chip .rec-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  font-size: 0.58rem;
}

.rec-person-chip strong {
  display: block;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-mini-btn {
  height: 32px;
  padding: 0 0.75rem;
  font-size: 0.8rem;
}

.rec-blank {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 1.4rem 1rem 1.2rem;
  text-align: center;
  color: var(--os-muted);
}

.rec-blank-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 0.2rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--os-border) 55%, transparent);
  color: var(--os-muted);
}

.rec-blank strong {
  color: var(--os-text);
  font-size: 0.95rem;
}

.rec-blank p {
  margin: 0;
  max-width: 18rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.rec-close-note {
  padding-top: 0.7rem;
  border-top: 1px solid var(--os-border);
  color: var(--os-muted);
}

.rec-summary-timeline {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0 0.2rem;
  display: grid;
  gap: 0;
}

.rec-summary-timeline li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 0.75rem;
  position: relative;
  padding: 0 0 1rem;
}

.rec-summary-timeline li:last-child { padding-bottom: 0; }

.rec-summary-timeline li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--os-border);
}

.rec-summary-timeline i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: block;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--os-surface);
}

.rec-summary-timeline li.is-blue i { background: #2563eb; }
.rec-summary-timeline li.is-violet i { background: #7c3aed; }
.rec-summary-timeline li.is-green i { background: #16a34a; }

.rec-summary-timeline strong {
  display: block;
  font-size: 0.9rem;
}

.rec-summary-timeline span {
  display: block;
  margin-top: 0.12rem;
  color: var(--os-muted);
  font-size: 0.8rem;
}

.rec-tab-panel header h3 {
  margin: 0;
}

.rec-candidate-profile .rec-card header {
  align-items: center;
}

.rec-candidate-profile .rec-card header h3 {
  margin: 0;
}

html.theme-dark .rec-profile-tab.is-active { color: #93c5fd; border-bottom-color: #60a5fa; }
html.theme-dark .rec-fact-icon.is-blue { background: rgba(37, 99, 235, 0.22); color: #93c5fd; }
html.theme-dark .rec-fact-icon.is-orange { background: rgba(194, 65, 12, 0.22); color: #fdba74; }
html.theme-dark .rec-fact-icon.is-violet { background: rgba(124, 58, 237, 0.22); color: #d8b4fe; }
html.theme-dark .rec-fact-icon.is-green { background: rgba(21, 128, 61, 0.22); color: #86efac; }
html.theme-dark .rec-fact-icon.is-teal { background: rgba(15, 118, 110, 0.22); color: #5eead4; }
html.theme-dark .rec-profile-avatar {
  box-shadow: 0 0 0 4px var(--os-surface), 0 10px 24px rgba(0, 0, 0, 0.35);
}

.rec-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.22rem;
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
}

.rec-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--os-muted);
  font: inherit;
  font-weight: 650;
  padding: 0.5rem 0.85rem;
  border-radius: 9px;
  cursor: pointer;
}

.rec-tab.is-active {
  background: color-mix(in srgb, #2563eb 16%, var(--os-surface));
  color: var(--os-text);
}

.rec-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.rec-dl {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.rec-dl div {
  display: grid;
  gap: 0.15rem;
}

.rec-dl dt {
  color: var(--os-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rec-dl dd {
  margin: 0;
}

.rec-prose {
  margin: 0;
  line-height: 1.55;
}

.rec-feed li,
.rec-catalog-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--os-border);
}

.rec-feed-actions {
  display: flex;
  gap: 0.3rem;
}

.rec-catalog-list li.is-off span {
  color: var(--os-muted);
  text-decoration: line-through;
}

.rec-settings .rec-catalog-list {
  max-height: 280px;
  overflow: auto;
}

.rec-settings-add {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--os-border);
}

.rec-settings-add input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--os-border);
  border-radius: 10px;
  background: var(--os-surface);
  color: var(--os-text);
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.88rem;
}

.rec-settings-add .ws-btn {
  flex: 0 0 auto;
  height: 38px;
}

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

.person-select-option.rec-type-mismatch {
  display: none !important;
}

html.theme-dark .rec-pill.is-job,
html.theme-dark .rec-pill.is-type-job { background: rgba(37, 99, 235, 0.22); color: #93c5fd; }
html.theme-dark .rec-pill.is-intern,
html.theme-dark .rec-pill.is-type-internship { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
html.theme-dark .rec-pill.is-type-fellowship { background: rgba(139, 92, 246, 0.22); color: #ddd6fe; }
html.theme-dark .rec-pill.is-type-traineeship { background: rgba(20, 184, 166, 0.22); color: #5eead4; }
html.theme-dark .rec-pill.is-type-apprenticeship { background: rgba(249, 115, 22, 0.22); color: #fdba74; }
html.theme-dark .rec-pill.is-type-graduate_program { background: rgba(236, 72, 153, 0.22); color: #f9a8d4; }
html.theme-dark .rec-pill.is-type-contract { background: rgba(14, 165, 233, 0.22); color: #7dd3fc; }
html.theme-dark .rec-pill.is-type-freelance { background: rgba(34, 197, 94, 0.22); color: #86efac; }
html.theme-dark .rec-pill.is-type-volunteer { background: rgba(168, 85, 247, 0.22); color: #e9d5ff; }
html.theme-dark .rec-pill.is-type-industrial_training,
html.theme-dark .rec-pill.is-type-other { background: rgba(100, 116, 139, 0.28); color: #cbd5e1; }
html.theme-dark .rec-pill.is-open { background: rgba(22, 163, 74, 0.2); color: #86efac; }
html.theme-dark .rec-pill.is-closed,
html.theme-dark .rec-pill.is-rejected,
html.theme-dark .rec-pill.is-withdrawn { background: rgba(185, 28, 28, 0.22); color: #fca5a5; }
html.theme-dark .rec-pill.is-unassigned { background: rgba(124, 58, 237, 0.22); color: #d8b4fe; }
html.theme-dark .rec-pill.is-stage { background: rgba(37, 99, 235, 0.22); color: #93c5fd; }
html.theme-dark .rec-kpi.is-blue .rec-kpi-icon { background: rgba(37, 99, 235, 0.22); color: #93c5fd; }
html.theme-dark .rec-kpi.is-violet .rec-kpi-icon { background: rgba(124, 58, 237, 0.22); color: #c4b5fd; }
html.theme-dark .rec-kpi.is-teal .rec-kpi-icon { background: rgba(15, 118, 110, 0.22); color: #5eead4; }
html.theme-dark .rec-kpi.is-orange .rec-kpi-icon { background: rgba(194, 65, 12, 0.22); color: #fdba74; }
html.theme-dark .rec-kpi.is-pink .rec-kpi-icon { background: rgba(219, 39, 119, 0.22); color: #f9a8d4; }
html.theme-dark .rec-kpi.is-green .rec-kpi-icon { background: rgba(21, 128, 61, 0.22); color: #86efac; }
html.theme-dark .rec-match { background: rgba(21, 128, 61, 0.22); color: #86efac; }
html.theme-dark .rec-donut-hole { background: var(--os-surface); }

@media (max-width: 1200px) {
  .rec-kpis,
  .rec-dash-row,
  .rec-dash-row-bottom {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .rec-detail-grid,
  .rec-settings {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .rec-profile-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .rec-kpis,
  .rec-dash-row,
  .rec-dash-row-bottom,
  .rec-detail-grid,
  .rec-profile-overview,
  .rec-fact-grid,
  .rec-settings,
  .rec-start-hero,
  .rec-intake-banner {
    grid-template-columns: 1fr;
  }

  .rec-profile-hero-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

.rec-candidate-profile .ws-table-panel {
  margin-top: 0.1rem;
}

.rec-candidate-profile .ws-sms-template-select {
  min-width: 200px;
  max-width: 280px;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--os-border);
  border-radius: 8px;
  background: var(--os-surface);
  color: var(--os-text);
  font: inherit;
}

.rec-candidate-profile .ws-sms-sender-field .person-select {
  min-width: 240px;
}

.rec-candidate-profile .ws-sms-sender-field .person-select-menu {
  z-index: 20;
}
