:root {
  --font-sans: "Plus Jakarta Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-display: "IvyPresto", "Plus Jakarta Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --blue: #2c67e9;
  --blue-dark: #1f4fc3;
  --blue-soft: #eef4ff;
  --blue-soft-2: #dbe8ff;
  --black: #171a20;
  --text: #162033;
  --muted: #6b7280;
  --line: #e2e8f0;
  --line-strong: #d4deed;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --surface-soft-2: #f3f7fd;
  --bg: #f6f8fc;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f59e0b;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.05);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --sidebar: 280px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 214, 0.06), transparent 28%),
    linear-gradient(180deg, #f9fbff 0%, #f5f7fb 100%);
  color: var(--text);
  font-family: var(--font-sans);
}

body {
  font-size: 16px;
}

h1,
h2,
h3,
h4,
.sidebar-nav,
.btn,
.login-badge,
.page-head h1 {
  font-family: var(--font-display);
}

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

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

#app {
  min-height: 100vh;
}

.screen {
  min-height: 100vh;
  animation: screenIn 0.28s ease;
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(320px, 0.98fr) minmax(420px, 1fr);
  min-height: 100vh;
}

.app-layout {
  animation: none;
}

.login-brand {
  min-height: 100vh;
  padding: 34px 46px 28px;
  background: linear-gradient(180deg, #0e57dc 0%, #1e63e8 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.55;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.78));
  pointer-events: none;
}

.login-brand-top {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.login-brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 36px rgba(7, 36, 95, 0.22);
  backdrop-filter: blur(10px);
}

.login-brand-logo {
  width: 220px;
  height: auto;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.login-brand-main {
  position: relative;
  z-index: 1;
  margin-top: 76px;
  max-width: 540px;
}

.login-brand-main h1 {
  margin: 0 0 26px;
  max-width: 520px;
  font-size: clamp(48px, 5.2vw, 66px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.login-brand-main p,
.login-brand-footer,
.login-brand-list {
  color: rgba(255, 255, 255, 0.76);
}

.login-brand-main p {
  max-width: 520px;
  margin: 0;
  font-size: 17px;
  line-height: 1.72;
}

.login-brand-list {
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
  font-size: 16px;
}

.login-brand-list li {
  position: relative;
  padding-left: 18px;
  line-height: 1.5;
}

.login-brand-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

.login-brand-footer {
  margin-top: auto;
  font-size: 14px;
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.68);
}

.login-panel {
  min-height: 100vh;
  padding: 40px 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(circle at 20% 18%, rgba(31, 95, 214, 0.09), transparent 24%),
    radial-gradient(circle at 92% 100%, rgba(31, 95, 214, 0.1), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.login-box {
  width: min(520px, 100%);
}

.login-box h2 {
  margin: 0 0 10px;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.login-box > p {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 17px;
}

.login-box-wide {
  width: min(520px, 100%);
}

.subtle-label {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 15px;
}

.role-list,
.form-stack,
.stat-row,
.cards-grid,
.pipeline-columns,
.activity-stack,
.calendar-layout,
.reports-grid,
.client-calendar-layout,
.filters-row {
  display: grid;
  gap: 16px;
}

.role-card,
.panel,
.metric-card,
.contact-card,
.deal-card,
.activity-card,
.calendar-panel,
.event-card,
.team-card,
.help-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.role-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.role-card:hover {
  border-color: #cddcff;
  box-shadow: 0 18px 34px rgba(18, 28, 53, 0.1);
  transform: translateY(-2px);
}

.panel,
.metric-card,
.contact-card,
.deal-card,
.activity-card,
.calendar-panel,
.event-card,
.team-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.panel:hover,
.metric-card:hover,
.contact-card:hover,
.deal-card:hover,
.activity-card:hover,
.calendar-panel:hover,
.event-card:hover,
.team-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.role-icon,
.metric-icon,
.avatar-circle,
.timeline-icon,
.team-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
}

.team-avatar {
  width: 40px;
  height: 40px;
}

.role-icon {
  width: 50px;
  height: 50px;
}

.role-list-large {
  gap: 18px;
}

.role-card-large {
  min-height: 104px;
  padding: 22px 24px;
  border-radius: 20px;
  border-color: #d9e2f1;
  box-shadow: 0 18px 38px rgba(20, 34, 66, 0.08);
}

.role-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.role-card-copy strong {
  font-size: 17px;
}

.role-card-copy span {
  font-size: 14px;
  line-height: 1.45;
}

.role-card-arrow {
  width: 22px;
  height: 22px;
  color: #a3acbb;
  flex: 0 0 auto;
}

.role-card-arrow svg {
  width: 100%;
  height: 100%;
}

.role-icon.admin,
.metric-icon.blue,
.avatar-circle.blue,
.team-avatar {
  background: var(--blue);
  color: #fff;
}

.role-icon.client,
.avatar-circle.black {
  background: var(--black);
  color: #fff;
}

.avatar-circle.has-photo,
.manage-users-row__avatar.has-photo {
  overflow: hidden;
  padding: 0;
  background: #e8eefb;
}

.avatar-circle img,
.manage-users-row__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.role-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 18px;
}

.role-card span {
  color: var(--muted);
  font-size: 15px;
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.login-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 18px;
  margin-bottom: 26px;
  border-radius: 18px;
  border: 1px solid #d5dbe7;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 18px 38px rgba(18, 28, 53, 0.08);
}

.login-badge.is-admin {
  border-color: #a9c7ff;
  box-shadow: 0 18px 38px rgba(31, 95, 214, 0.12);
}

.login-badge.is-client {
  border-color: #cfd4e2;
  box-shadow: 0 18px 38px rgba(18, 28, 53, 0.08);
}

.login-badge-copy {
  display: grid;
  gap: 4px;
}

.login-badge-copy strong {
  font-size: 18px;
}

.login-badge-copy span {
  color: var(--muted);
  font-size: 15px;
}

.field {
  display: grid;
  gap: 10px;
}

.field label {
  font-size: 15px;
  font-weight: 600;
}

.field-hint {
  margin-top: -2px;
  color: var(--muted);
  font-size: 13px;
}

.field input {
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid #d9e0ea;
  border-radius: 17px;
  outline: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 20px rgba(21, 35, 63, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle:hover {
  background: rgba(23, 88, 200, 0.08);
  color: var(--blue);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: 0;
  resize: vertical;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.two-col > div {
  display: grid;
  gap: 8px;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 88, 200, 0.11);
  transform: translateY(-1px);
}

.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(23, 88, 200, 0.12);
}

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3d4656;
  font-size: 15px;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.client-selector {
  display: grid;
  gap: 10px;
  max-height: 220px;
  padding: 4px;
  overflow-y: auto;
}

.client-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #d7dce5;
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.client-option:hover {
  border-color: #b8ccf5;
  background: #f8fbff;
  transform: translateY(-1px);
}

.client-option:has(input:checked),
.client-option.is-selected {
  border-color: #8bb0f0;
  background: #eef4ff;
  box-shadow: 0 0 0 2px rgba(23, 88, 200, 0.08);
}

.client-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue);
  flex: 0 0 auto;
}

.client-option-copy {
  display: grid;
  gap: 4px;
}

.client-option-copy strong {
  font-size: 15px;
}

.client-option-copy small {
  color: var(--muted);
  font-size: 13px;
}

.client-selector-empty {
  padding: 14px 16px;
  border: 1px dashed #d7dce5;
  border-radius: 14px;
  color: var(--muted);
  background: #fbfcfe;
}

.is-hidden {
  display: none !important;
}

.metric-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.metric-card-link .metric-card {
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.metric-card-link:hover .metric-card {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 33, 64, 0.1);
}

.dashboard-agenda-panel .panel-head,
.dashboard-attention-panel .panel-head,
.finance-summary-panel .panel-head {
  align-items: flex-start;
}

.dashboard-agenda-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dashboard-agenda-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e4e9f2;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dashboard-agenda-row:hover {
  border-color: #b8ccf5;
  background: #f8fbff;
}

.dashboard-agenda-row.is-overdue {
  border-color: #fecaca;
  background: #fffafa;
}

.dashboard-agenda-time {
  flex: 0 0 64px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.dashboard-agenda-copy {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-agenda-copy strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-agenda-copy small {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-agenda-divider {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #e4e9f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-attention-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dashboard-attention-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e9f2;
  border-radius: 12px;
  background: #fff;
}

.dashboard-attention-row.is-danger {
  border-color: #fecaca;
  background: #fffafa;
}

.dashboard-attention-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef4ff;
  color: #1d4ed8;
  flex: 0 0 auto;
}

.dashboard-attention-row.is-danger .dashboard-attention-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.dashboard-attention-icon svg {
  width: 16px;
  height: 16px;
}

.dashboard-attention-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-attention-copy strong {
  font-size: 14px;
}

.dashboard-attention-copy small {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-empty-state {
  margin-top: 12px;
  padding: 18px 16px;
  border: 1px dashed #d7dce5;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  background: #fbfcfe;
}

.report-client-summary {
  margin-top: 14px;
}

.report-client-rows {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.report-client-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 12px;
  border: 1px solid #e4e9f2;
  border-radius: 12px;
  background: #fff;
}

.report-client-row strong {
  flex: 1;
  min-width: 140px;
  font-size: 14px;
}

.report-client-row > span {
  color: var(--muted);
  font-size: 13px;
}

.report-client-row .status-pill {
  font-size: 12px;
}

.dashboard-split.dashboard-split-secondary {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
}

.finance-choice-btn {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  height: auto;
  text-align: left;
  white-space: normal;
}

.finance-choice-btn small {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
}

.finance-choice-btn.finance-choice-danger {
  border-color: #fecaca;
}

.finance-choice-btn.finance-choice-danger strong {
  color: #b91c1c;
}

.finance-choice-btn.finance-choice-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.client-multiselect {
  position: relative;
}

.client-ms-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 56px;
  padding: 8px 12px;
  border: 1px solid #d9e0ea;
  border-radius: 17px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 20px rgba(21, 35, 63, 0.04);
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.client-ms-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 88, 200, 0.11);
}

.client-ms-chips {
  display: contents;
}

.client-ms-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #c4d7f8;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.client-ms-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: #d6e4fb;
  color: #1d4ed8;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.client-ms-chip button:hover {
  background: #b8ccf5;
}

.field input.client-ms-search {
  flex: 1;
  min-width: 120px;
  min-height: 36px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.field input.client-ms-search:focus {
  border: 0;
  box-shadow: none;
  transform: none;
}

.client-ms-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  max-height: 240px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #d9e0ea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 33, 64, 0.14);
}

.client-ms-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.client-ms-option:hover {
  background: #f4f7fc;
}

.client-ms-option-copy {
  display: grid;
  gap: 2px;
}

.client-ms-option-copy strong {
  font-size: 14px;
}

.client-ms-option-copy small {
  color: var(--muted);
  font-size: 12px;
}

.client-ms-option-check {
  display: none;
  color: #1d4ed8;
}

.client-ms-option-check svg {
  width: 16px;
  height: 16px;
}

.client-ms-option.is-selected {
  background: #eef4ff;
}

.client-ms-option.is-selected .client-ms-option-check {
  display: inline-flex;
}

.client-ms-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.link-blue {
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
}

.login-feedback {
  min-height: 20px;
  margin-top: -2px;
  font-size: 14px;
}

.login-feedback.is-error {
  color: #c62828;
}

.login-feedback.is-success {
  color: #177245;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.login-submit-btn {
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  border-radius: 18px;
  font-size: 17px;
  box-shadow: 0 18px 34px rgba(18, 28, 53, 0.18);
  letter-spacing: -0.02em;
}

.login-submit-btn.is-client {
  background: linear-gradient(180deg, #31333c 0%, #23252d 100%);
  box-shadow: 0 18px 34px rgba(18, 28, 53, 0.22);
}

.login-terms {
  margin: 34px 0 0;
  color: #7b8496;
  font-size: 14px;
  line-height: 1.6;
}

.login-security-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  margin-top: 24px;
  border-radius: 16px;
  border: 1px solid #d8e4fb;
  background: #f3f8ff;
  color: #4c648f;
  font-size: 14px;
}

.login-security-pill svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(180deg, #2b6eea 0%, var(--blue) 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(31, 95, 214, 0.2);
}

.btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-outline:hover {
  border-color: #c4d3ee;
  background: #f8fbff;
}

.btn-small {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
}

.help-fab {
  position: fixed;
  right: 12px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #27272a;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  z-index: 20;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(4px);
}

.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  animation: modalIn 0.2s ease;
}

.modal-card-small {
  width: min(420px, 100%);
}

.modal-card-wide {
  width: min(720px, 100%);
}

.form-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef4ff;
  color: #25416d;
  font-size: 13px;
  line-height: 1.45;
}

.form-hint svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #2f6bea;
}

.temporary-password-panel {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: #f4f7fb;
  border: 1px solid #dce4f0;
}

.temporary-password-panel span,
.temporary-password-panel small {
  color: #647086;
  font-size: 13px;
}

.temporary-password-panel strong {
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px dashed #b7c5dc;
  color: #07142b;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 20px;
  letter-spacing: 0;
  word-break: break-all;
}

.manage-users-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.manage-users-tabs {
  display: inline-flex;
  background: #f1f4fa;
  padding: 4px;
  border-radius: 12px;
  gap: 2px;
}

.manage-users-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #5b6576;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.manage-users-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  height: 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #5b6576;
  font-size: 11px;
  font-weight: 700;
}

.manage-users-tab.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.manage-users-tab.is-active span {
  background: #102760;
  color: #fff;
}

.manage-users-add {
  display: inline-flex;
  gap: 8px;
}

.manage-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}

.manage-users-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #e2e8f0;
  font-size: 14px;
}

.manage-users-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef1f6;
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.manage-users-row:hover {
  border-color: #d6e0f0;
  background: #fff;
}

.manage-users-row__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f6dea 0%, #102760 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.manage-users-row__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.manage-users-row__info strong {
  font-size: 14px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manage-users-row__info span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manage-users-self {
  font-size: 11px;
  font-weight: 600;
  color: #2f6dea;
}

.manage-users-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.manage-users-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.manage-users-badge.is-admin {
  background: rgba(47, 109, 234, 0.14);
  color: #102760;
}

.manage-users-badge.is-client {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}

.manage-users-badge.is-super {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

.manage-users-plan {
  font-size: 11px;
  color: var(--muted);
}

.manage-users-row__actions {
  display: inline-flex;
  gap: 4px;
}

.manage-users-danger {
  color: #b91c1c;
}

.manage-users-danger:hover {
  background: rgba(185, 28, 28, 0.1);
  color: #991b1b;
}

@media (max-width: 560px) {
  .manage-users-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .manage-users-tabs {
    overflow-x: auto;
  }
  .manage-users-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }
  .manage-users-row__meta {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
  }
  .manage-users-row__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-head h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
}

.modal-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f3f5f8;
  color: #5b6576;
  font-size: 24px;
  line-height: 1;
}

.modal-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

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

.slot-btn:hover {
  border-color: #b9d1ff;
  background: #f5f9ff;
}

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
}

.sidebar {
  background: linear-gradient(165deg, #071126 0%, #0c1735 58%, #102760 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  backdrop-filter: none;
  padding: 16px;
}

.sidebar-brand {
  min-height: 48px;
  padding: 4px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.sidebar-brand img {
  width: min(154px, 86%);
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.sidebar-brand-fallback {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.sidebar-nav {
  padding: 16px 0;
  display: grid;
  gap: 4px;
  overflow-y: auto;
}

.sidebar-section-label {
  display: block;
  padding: 14px 12px 8px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.sidebar-section-label:first-child {
  padding-top: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  color: #e8e8ea;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
  background: transparent;
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.16);
}

.nav-item:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
}

.nav-item.active:hover,
.nav-item.active:focus-visible,
.nav-item.active:active {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 0 0;
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
  background: transparent;
}

.profile-action-btn {
  width: 100%;
  justify-self: center;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  width: 100%;
  justify-content: flex-start;
  padding: 8px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
}

.avatar-circle {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.sidebar-user-avatar {
  background: #ffffff;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-user-avatar img {
  width: 25px;
  height: 25px;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.sidebar-user-avatar.has-photo img {
  width: 100%;
  height: 100%;
}

.user-card strong {
  display: block;
  font-size: 14px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.user-card span {
  color: #a1a1aa;
  font-size: 12px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

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

.logout-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d4d4d8;
  font-weight: 500;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
}

.logout-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.profile-action-btn svg,
.logout-link svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.profile-action-btn.btn-outline {
  background: #ffffff;
  color: #071126;
  border-color: #ffffff;
  min-height: 40px;
  border-radius: 10px;
  box-shadow: none;
}

.profile-action-btn.btn-outline:hover {
  background: #f4f4f5;
  border-color: #ffffff;
}

.support-panel {
  margin: 14px 10px 0;
  padding: 16px 14px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #eff6ff;
}

.support-panel strong {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

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

.content {
  padding: 28px 28px 42px;
  min-height: 100vh;
}

.page-head {
  margin-bottom: 24px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 22px;
  padding: 28px 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(165deg, #071126 0%, #0c1735 58%, #102760 100%);
  color: #ffffff;
  box-shadow: 0 22px 54px rgba(7, 17, 38, 0.16);
  overflow: hidden;
}

.client-welcome-hero {
  grid-template-columns: 1fr;
  align-items: start;
}

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

.dashboard-hero-copy > span {
  color: #8fb0ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dashboard-hero h1 {
  margin: 0;
  max-width: 860px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

.dashboard-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  line-height: 1.6;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.metric-card {
  padding: 16px 18px;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.metric-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.metric-card .metric-icon,
.metric-card .metric-icon.blue,
.metric-card .metric-icon.purple,
.metric-card .metric-icon.green,
.metric-card .metric-icon.orange {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #1e293b;
}

.metric-card .metric-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(107, 114, 128, 0.10);
  color: var(--muted);
}

.trend svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.trend.up {
  color: #15803d;
  background: rgba(34, 197, 94, 0.14);
}

.trend.down {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.14);
}

.trend.neutral {
  color: #64748b;
  background: rgba(148, 163, 184, 0.16);
}

.metric-value {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.metric-label {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.metric-card .trend {
  padding: 4px 9px;
  font-size: 11px;
}

.metric-card .trend svg {
  width: 10px;
  height: 10px;
}

.split-grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.dashboard-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.dashboard-split .panel {
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.panel-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-more-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.panel-more-btn:hover {
  background: var(--surface-soft-2);
  color: var(--text);
}
.panel-more-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.profit-headline {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.profit-headline strong {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.profit-headline span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.finance-summary-panel {
  gap: 0;
}

.finance-summary-list {
  display: grid;
  gap: 12px;
  flex: 1;
}

.finance-summary-card {
  position: relative;
  padding: 14px 18px 14px 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.finance-summary-card::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 2px;
  background: var(--blue);
}

.finance-summary-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.finance-summary-card--income::before { background: var(--blue); }
.finance-summary-card--expense::before { background: var(--red); }
.finance-summary-card--saldo::before { background: var(--green); }
.finance-summary-card--saldo.is-negative::before { background: var(--red); }
.finance-summary-card--margem::before { background: var(--purple); }

.finance-summary-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: #334155;
  flex-shrink: 0;
}

.finance-summary-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.finance-summary-label {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.finance-summary-value {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: right;
}

.finance-summary-card--income .finance-summary-value { color: var(--blue); }
.finance-summary-card--expense .finance-summary-value { color: var(--red); }
.finance-summary-card--saldo .finance-summary-value { color: #15803d; }
.finance-summary-card--saldo.is-negative .finance-summary-value { color: var(--red); }
.finance-summary-card--margem .finance-summary-value { color: var(--purple); }

.finance-summary-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.profit-panel .chart-box {
  flex: 1;
  min-height: 280px;
}

.profit-chart {
  display: block;
}

.profit-chart .profit-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: profitDraw 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

@keyframes profitDraw {
  to { stroke-dashoffset: 0; }
}

.profit-chart .profit-area {
  opacity: 0;
  animation: profitFade 0.7s ease-out 1.25s forwards;
}

@keyframes profitFade {
  to { opacity: 1; }
}

.profit-chart .profit-dot {
  opacity: 0;
  animation: profitDotIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) var(--profit-dot-delay, 0s) forwards;
  cursor: pointer;
  outline: none;
}

@keyframes profitDotIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.profit-chart .profit-dot-marker {
  transform-box: fill-box;
  transform-origin: center;
  transition: r 0.18s ease, filter 0.18s ease;
}

.profit-chart .profit-dot:hover .profit-dot-marker,
.profit-chart .profit-dot:focus-visible .profit-dot-marker {
  r: 8.5;
  filter: drop-shadow(0 4px 10px rgba(44, 103, 233, 0.55));
}

.profit-chart .profit-dot-pulse {
  opacity: 0.55;
  animation: profitPulse 1.9s ease-out 1.6s infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes profitPulse {
  0% { r: 6.5; opacity: 0.55; }
  85% { r: 22; opacity: 0; }
  100% { r: 22; opacity: 0; }
}

.profit-chart .profit-tooltip {
  opacity: 0;
  pointer-events: none;
  transform-box: fill-box;
  transition: opacity 0.16s ease;
  filter: drop-shadow(0 8px 18px rgba(31, 79, 195, 0.32));
}

.profit-chart .profit-tooltip-bg {
  fill: #1f4fc3;
  stroke: none;
}

.profit-chart .profit-tooltip-month {
  fill: #c7dbff;
  stroke: none;
}

.profit-chart .profit-tooltip-value {
  fill: #ffffff;
  stroke: none;
}

.profit-chart .profit-dot:hover .profit-tooltip,
.profit-chart .profit-dot:focus-visible .profit-tooltip {
  opacity: 1;
}

.profit-chart .profit-dot-hit {
  cursor: pointer;
  stroke: none;
}

.profit-chart .profit-dot-pulse,
.profit-chart .profit-area {
  stroke: none;
}

@media (prefers-reduced-motion: reduce) {
  .profit-chart .profit-line {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    animation: none;
  }
  .profit-chart .profit-area,
  .profit-chart .profit-dot {
    opacity: 1;
    animation: none;
  }
  .profit-chart .profit-dot-pulse {
    animation: none;
    opacity: 0;
  }
}

.panel {
  padding: 24px;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.chart-box {
  height: 320px;
}

.mini-chart {
  height: 320px;
}

.chart-box svg,
.mini-chart svg {
  width: 100%;
  height: 100%;
}

.legend {
  display: grid;
  gap: 10px;
  width: 100%;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #596579;
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 20px;
}

.dashboard-bottom-grid {
  grid-template-columns: minmax(0, 1fr);
}

.bar-chart {
  height: 260px;
  display: flex;
  align-items: end;
  gap: 24px;
  padding: 24px 8px 8px;
}

.bar-col {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.bar-visual {
  width: 100%;
  max-width: 100px;
  background: var(--blue);
  border-radius: 10px 10px 0 0;
}

.bar-label {
  color: var(--muted);
  text-align: center;
}

.recent-list {
  display: grid;
  gap: 16px;
}

.recent-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
}

.recent-item strong {
  display: block;
  margin-bottom: 4px;
}

.recent-item span,
.recent-item small {
  color: var(--muted);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  margin-bottom: 18px;
}

.client-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(178px, auto) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid #dde5f0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.finance-summary-grid,
.finance-sections {
  display: grid;
  gap: 24px;
}

.finance-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.finance-sections {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.finance-section {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.finance-profit-section {
  grid-column: 1 / -1;
}

.finance-tone-income {
  border-color: rgba(22, 163, 74, 0.24);
  background: linear-gradient(180deg, #eefcf3 0%, #ffffff 100%);
}

.finance-tone-profit {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%);
}

.finance-tone-expense {
  border-color: rgba(239, 68, 68, 0.24);
  background: linear-gradient(180deg, #fff1ef 0%, #ffffff 100%);
}

.finance-tone-income .finance-section-head h3,
.finance-tone-income .finance-section-actions strong,
.finance-tone-profit .finance-section-head h3,
.finance-tone-profit .finance-section-actions strong {
  color: #166534;
}

.finance-tone-expense .finance-section-head h3,
.finance-tone-expense .finance-section-actions strong {
  color: #b42318;
}

.finance-section-head,
.finance-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 0;
}

.finance-section-head h3,
.finance-overview-head h3 {
  margin: 0 0 6px;
}

.finance-section-head p,
.finance-overview-head p,
.finance-item-copy p,
.finance-empty {
  margin: 0;
  color: var(--muted);
}

.finance-section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.finance-head-actions,
.finance-period-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.finance-profit-total {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.finance-profit-total span {
  color: var(--muted);
  font-size: 13px;
}

.finance-items {
  display: grid;
  gap: 16px;
}

.finance-item-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.finance-item-income {
  border-color: rgba(22, 163, 74, 0.22);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(255, 255, 255, 0.96));
}

.finance-item-expense {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.14), rgba(255, 255, 255, 0.96));
}

.finance-item-income .finance-item-side span {
  color: #15803d;
}

.finance-item-expense .finance-item-side span {
  color: #dc2626;
}

.finance-item-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eaf8ef;
  color: #15803d;
  font-size: 13px;
  font-weight: 900;
}

.finance-item-expense .finance-item-avatar {
  background: #fee2e2;
  color: #dc2626;
}

.finance-item-copy strong {
  display: block;
  margin-bottom: 3px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.finance-item-copy small {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.finance-item-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.finance-item-side span {
  font-size: 15px;
  font-weight: 900;
}

.finance-item-actions {
  display: flex;
  gap: 8px;
}

.finance-empty {
  padding: 24px 18px;
  border: 1px dashed #d9e0ec;
  border-radius: 16px;
  text-align: center;
}

.finance-add-row {
  min-height: 34px;
  margin-top: 0;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.finance-add-row svg {
  width: 14px;
  height: 14px;
}

.finance-tone-income .finance-add-row {
  border-color: rgba(22, 163, 74, 0.28);
  color: #15803d;
}

.finance-tone-expense .finance-add-row {
  border-color: rgba(239, 68, 68, 0.28);
  color: #dc2626;
}

.finance-overview {
  padding: 24px;
  margin-bottom: 24px;
}

.finance-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.finance-overview-card {
  padding: 18px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.finance-overview-card span,
.finance-overview-card small {
  display: block;
  color: var(--muted);
}

.finance-overview-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 22px;
}

.search-box,
.filter-box {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.client-toolbar .search-box,
.client-toolbar .filter-box {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.client-toolbar .search-box {
  padding-left: 10px;
}

.client-toolbar .filter-select {
  border-color: #d9e1ee;
  background: #ffffff;
}

.client-results-count {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.search-box input,
.filter-box select {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  outline: 0;
}

.filter-select {
  min-width: 168px;
}

.filter-select select {
  appearance: none;
  min-width: 0;
  padding-right: 8px;
}

.filter-select svg {
  pointer-events: none;
}

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

.contact-card {
  padding: 22px;
  border-color: #dce4ef;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.contact-head,
.contact-line,
.deal-meta,
.activity-meta,
.calendar-event-meta,
.team-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-line svg,
.deal-meta svg,
.activity-meta svg,
.calendar-event-meta svg,
.search-box svg,
.filter-box svg,
.logout-link svg,
.support-panel strong svg,
.login-badge svg,
.login-back svg,
.nav-item svg,
.btn svg,
.metric-top svg,
.role-card svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.contact-head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.contact-head-actions,
.event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-head-actions {
  opacity: 1;
}

.icon-action,
.event-actions button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f3f5f8;
  color: #5d6778;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.icon-action svg,
.event-actions button svg {
  width: 18px;
  height: 18px;
}

.icon-action:hover,
.event-actions button:hover {
  background: #e8eefb;
  color: var(--blue);
  transform: translateY(-1px);
}

.avatar-circle.large {
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-done {
  background: #dcfce7;
  color: #16a34a;
}

.status-scheduled {
  background: #dbeafe;
  color: #2563eb;
}

.status-pending {
  background: #ffedd5;
  color: #ea580c;
}

.status-hot {
  background: #fee2e2;
  color: #dc2626;
}

.status-warm {
  background: #ffedd5;
  color: #ea580c;
}

.status-cold {
  background: #dbeafe;
  color: #2563eb;
}

.contact-card h3 {
  margin: 0 0 2px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.contact-role {
  margin: 0 0 14px;
  color: var(--muted);
}

.contact-info {
  display: grid;
  gap: 9px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf1f6;
}

.contact-line {
  color: #344052;
  font-size: 14px;
}

.contact-line svg {
  color: #7b8494;
}

.contact-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  color: var(--muted);
}

.contact-footer strong {
  color: var(--text);
}

.client-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.client-pill.is-profile {
  background: #f1f5f9;
  color: #334155;
}

.client-pill.is-content {
  background: #f4efff;
  color: #6d3be8;
}

.client-pill.is-traffic {
  background: #eaf3ff;
  color: #1f5fc7;
}

.client-pill.is-both {
  background: #eef2ff;
  color: #4338ca;
}

.stat-row {
  grid-template-columns: 190px 140px;
  width: fit-content;
  margin-bottom: 20px;
}

.stat-box {
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-soft);
}

.stat-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.stat-box strong {
  font-size: 18px;
}

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

.pipeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.pipeline-board {
  overflow-x: auto;
  padding-bottom: 8px;
}

.pipeline-columns {
  grid-template-columns: repeat(5, 290px);
  align-items: start;
}

.pipeline-column {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.pipeline-column-header {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.pipeline-column-header.gray {
  background: #f7f7f8;
}

.pipeline-column-header.blue {
  background: #eef4ff;
}

.pipeline-column-header.purple {
  background: #f6f0ff;
}

.pipeline-column-header.orange {
  background: #fff6ea;
}

.pipeline-column-header.green {
  background: #effcf3;
}

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

.badge-count {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #6b7280;
  font-weight: 700;
  font-size: 13px;
}

.pipeline-column-header strong {
  display: block;
  font-size: 18px;
}

.pipeline-column-header span {
  color: var(--muted);
}

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

.pipeline-empty {
  padding: 22px 16px;
  border: 1px dashed #d9e0ec;
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  background: #fcfdff;
}

.deal-card {
  padding: 16px;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.deal-card.is-selected {
  border-color: #b9d1ff;
  background: #f5f9ff;
  box-shadow: 0 16px 30px rgba(23, 88, 200, 0.08);
}

.deal-card h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.deal-meta {
  margin-bottom: 8px;
  color: var(--muted);
}

.pipeline-detail {
  position: sticky;
  top: 24px;
  padding: 20px;
}

.pipeline-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pipeline-detail-head h3 {
  margin: 6px 0 4px;
  font-size: 24px;
}

.pipeline-detail-head p,
.pipeline-detail-empty p,
.detail-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.detail-kicker,
.detail-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}

.pipeline-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.detail-block {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.detail-block span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.detail-block strong {
  display: block;
  font-size: 15px;
}

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

.stage-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.stage-pill {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d8e0ef;
  background: #fff;
  color: #435064;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.stage-pill.active,
.stage-pill:hover {
  border-color: #b9d1ff;
  background: #eff5ff;
  color: var(--blue);
}

.pipeline-quick-actions {
  display: flex;
  gap: 10px;
}

.pipeline-detail-empty {
  min-height: 280px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 10px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #4f5b6b;
  font-weight: 600;
}

.tab.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.section-label {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}

.activity-card {
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.timeline-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef4ff 0%, #dce9ff 100%);
  color: var(--blue);
}

.timeline-icon.green {
  background: #dcfce7;
  color: #16a34a;
}

.timeline-icon.purple {
  background: #f3e8ff;
  color: #9333ea;
}

.activity-content {
  flex: 1;
}

.activity-content h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.activity-content p {
  margin: 0 0 10px;
  color: var(--muted);
}

.activity-meta {
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: #596579;
}

.activity-actions {
  display: flex;
  gap: 10px;
}

.calendar-layout,
.client-calendar-layout {
  grid-template-columns: 2.3fr 1.1fr;
  align-items: start;
}

.calendar-panel {
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.calendar-toolbar,
.calendar-selectors,
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-nav {
  flex: 1;
}

.calendar-filter {
  min-width: 160px;
}

.calendar-head h2,
.side-date h2 {
  margin: 0;
  font-size: 18px;
}

.month-title {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.calendar-grid-wrap {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px 18px;
  margin-bottom: 30px;
}

.weekday,
.day-cell {
  text-align: center;
}

.weekday {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.day-cell {
  height: 84px;
  padding-top: 10px;
  position: relative;
  border-radius: 18px;
  border: 0;
  background: transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.day-cell.is-muted {
  cursor: default;
  opacity: 0.28;
}

.day-cell:hover {
  transform: translateY(-1px);
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(31, 95, 214, 0.08);
}

.day-cell.highlight {
  background: #edf3ff;
  border: 2px solid var(--blue);
}

.day-cell.active {
  background: var(--blue);
  color: #fff;
  box-shadow: inset 0 0 0 2px #9bbdff;
}

.day-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
}

.day-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.day-count {
  position: absolute;
  top: 8px;
  right: 10px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 88, 200, 0.12);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.day-cell.active .day-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef1f5;
  color: var(--muted);
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.side-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.round-plus {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.round-plus:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(23, 88, 200, 0.18);
}

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

.event-card {
  padding: 20px;
}

.day-summary {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.event-card h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.event-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}

.task-tone-blue {
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%);
}

.task-tone-green {
  border-color: rgba(34, 197, 94, 0.2);
  background: linear-gradient(180deg, #f5fff8 0%, #ffffff 100%);
}

.task-tone-rose {
  border-color: rgba(225, 29, 72, 0.22);
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
}

.task-tone-yellow {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.task-tone-purple {
  border-color: rgba(168, 85, 247, 0.22);
  background: linear-gradient(180deg, #fbf7ff 0%, #ffffff 100%);
}

.task-tone-red {
  border-color: rgba(239, 68, 68, 0.2);
  background: linear-gradient(180deg, #fff7f6 0%, #ffffff 100%);
}

.event-type-badge.task-tone-blue {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.event-type-badge.task-tone-green {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.event-type-badge.task-tone-rose {
  background: rgba(225, 29, 72, 0.12);
  color: #be123c;
}

.event-type-badge.task-tone-yellow {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.event-type-badge.task-tone-purple {
  background: rgba(168, 85, 247, 0.14);
  color: #7e22ce;
}

.event-type-badge.task-tone-red {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.calendar-event-meta {
  margin-bottom: 8px;
  color: var(--muted);
}

.reports-grid {
  grid-template-columns: 1fr 1fr;
}

.metrics-row.reports {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.funnel {
  display: grid;
  gap: 14px;
}

.funnel-row {
  display: grid;
  gap: 6px;
}

.funnel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #3f4b5b;
  font-weight: 600;
}

.funnel-track,
.team-progress {
  width: 100%;
  height: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f3f7;
}

.funnel-bar,
.team-progress-bar {
  height: 100%;
  background: var(--blue);
}

.team-stack {
  display: grid;
  gap: 16px;
}

.team-card {
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.team-head {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.team-head-left {
  display: flex;
  gap: 12px;
}

.team-meta strong {
  display: block;
  margin-bottom: 2px;
}

.team-meta span,
.team-side {
  color: var(--muted);
}

.team-side {
  text-align: right;
}

.team-side strong {
  display: block;
  color: var(--text);
}

.client-page-head {
  margin-bottom: 18px;
}

.empty-notice {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: #98a2b3;
  text-align: center;
}

.page-id {
  display: none;
}

.toast {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 30;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(23, 26, 32, 0.96);
  color: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.settings-layout {
  display: grid;
  gap: 18px;
}

.settings-profile-card,
.settings-card {
  border: 1px solid #dce4ef;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.settings-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.settings-avatar {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(165deg, #071126 0%, #102760 100%);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  overflow: hidden;
}

.settings-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-photo-btn {
  cursor: pointer;
}

.settings-photo-btn input {
  display: none;
}

.modal-card-photo {
  max-width: 760px;
  background: #181c23;
  color: #ffffff;
}

.modal-card-photo .modal-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-card-photo .modal-head h3,
.modal-card-photo .modal-head p {
  color: #ffffff;
}

.profile-photo-editor {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 10px 0 4px;
}

.profile-photo-preview {
  width: min(320px, 72vw);
  height: min(320px, 72vw);
  display: grid;
  place-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: #0f172a;
  color: #ffffff;
  cursor: grab;
  font-size: 48px;
  font-weight: 800;
  touch-action: none;
  user-select: none;
}

.profile-photo-preview.is-dragging {
  cursor: grabbing;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.profile-photo-controls {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-photo-upload {
  cursor: pointer;
}

.profile-photo-upload input {
  display: none;
}

.profile-photo-hint {
  max-width: 420px;
  margin: -8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

.settings-profile-card span,
.settings-card header p,
.settings-profile-card p,
.settings-choice span {
  color: #667085;
}

.settings-profile-card h2 {
  margin: 2px 0;
  font-size: 26px;
}

.settings-profile-card p {
  margin: 0;
}

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

.settings-card {
  padding: 20px;
}

.settings-card-wide {
  grid-column: 1 / -1;
}

.settings-card header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.settings-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #eef4ff;
  color: var(--blue);
}

.settings-icon svg {
  width: 19px;
  height: 19px;
}

.settings-card h3,
.settings-card p {
  margin: 0;
}

.settings-card h3 {
  font-size: 17px;
}

.settings-card header p {
  margin-top: 4px;
  font-size: 13px;
}

.settings-fields {
  display: grid;
  gap: 12px;
}

.settings-fields label {
  display: grid;
  gap: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.settings-fields input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

.settings-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.settings-choice {
  min-height: 72px;
  padding: 12px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  text-align: left;
  background: #ffffff;
}

.settings-choice strong,
.settings-choice span {
  display: block;
}

.settings-choice.is-active {
  border-color: rgba(47, 109, 234, 0.35);
  background: #eef4ff;
}

.settings-toggle {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #eef1f5;
  color: #344052;
  font-weight: 700;
}

.settings-toggle input {
  width: 42px;
  height: 24px;
  accent-color: var(--blue);
}

.brand-preview {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #eef1f5;
  border-radius: 12px;
  background: #f8fafc;
}

.brand-preview img {
  width: 124px;
  height: auto;
}

.brand-preview strong,
.brand-preview span {
  display: block;
}

.brand-preview span {
  color: #667085;
  font-size: 13px;
}

.color-swatches {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.color-swatches span {
  width: 28px;
  height: 28px;
  border: 1px solid #dce4ef;
  border-radius: 999px;
}

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

.settings-action-list button {
  min-height: 54px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
}

.settings-action-list button span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-action-list svg {
  width: 17px;
  height: 17px;
}

body.is-compact .content {
  padding-top: 18px;
  padding-bottom: 24px;
}

body.is-compact .panel,
body.is-compact .metric-card,
body.is-compact .contact-card,
body.is-compact .settings-card {
  padding: 16px;
}

body.is-compact .page-head {
  margin-bottom: 14px;
}

body.is-compact .dashboard-hero {
  padding: 20px 24px;
}

body.is-compact .calendar-month-cell {
  min-height: 104px;
}

body.is-sidebar-minimal {
  --sidebar: 96px;
}

body.is-sidebar-minimal .sidebar {
  align-items: center;
}

body.is-sidebar-minimal .sidebar-brand {
  justify-content: center;
  padding-inline: 0;
}

body.is-sidebar-minimal .sidebar-brand img {
  width: 52px;
}

body.is-sidebar-minimal .sidebar-section-label,
body.is-sidebar-minimal .nav-item span,
body.is-sidebar-minimal .profile-action-btn,
body.is-sidebar-minimal .support-card,
body.is-sidebar-minimal .user-card > div,
body.is-sidebar-minimal .logout-link {
  display: none;
}

body.is-sidebar-minimal .sidebar-nav,
body.is-sidebar-minimal .sidebar-bottom {
  width: 100%;
}

body.is-sidebar-minimal .nav-item {
  justify-content: center;
  padding: 0;
}

body.is-sidebar-minimal .nav-item svg {
  width: 20px;
  height: 20px;
}

body.is-sidebar-minimal .user-card {
  justify-content: center;
}

body.theme-dark {
  --text: #f8fafc;
  --muted: #a8b3c7;
  --line: rgba(148, 163, 184, 0.18);
  background: #071126;
  color: #f8fafc;
}

body.theme-dark .screen,
body.theme-dark .content,
body.theme-dark .calendar-shell {
  background: #071126;
}

body.theme-dark .page-head h1,
body.theme-dark .metric-card h3,
body.theme-dark .panel h3,
body.theme-dark .settings-card h3,
body.theme-dark .contact-card h3 {
  color: #f8fafc;
}

body.theme-dark .page-head p,
body.theme-dark .panel-sub,
body.theme-dark .settings-card header p,
body.theme-dark .settings-profile-card p,
body.theme-dark .contact-role,
body.theme-dark .contact-line,
body.theme-dark .settings-profile-card span {
  color: #a8b3c7;
}

body.theme-dark .panel,
body.theme-dark .metric-card,
body.theme-dark .contact-card,
body.theme-dark .settings-profile-card,
body.theme-dark .settings-card,
body.theme-dark .calendar-board,
body.theme-dark .calendar-topbar {
  border-color: rgba(148, 163, 184, 0.18);
  background: #0d1933;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

body.theme-dark .calendar-topbar {
  background: rgba(13, 25, 51, 0.94);
}

body.theme-dark .calendar-weekday,
body.theme-dark .calendar-month-cell,
body.theme-dark .settings-fields input,
body.theme-dark .settings-choice,
body.theme-dark .settings-action-list button,
body.theme-dark .brand-preview,
body.theme-dark .calendar-date-jump,
body.theme-dark .filter-box,
body.theme-dark .search-box {
  border-color: rgba(148, 163, 184, 0.18);
  background: #101f3d;
  color: #f8fafc;
}

body.theme-dark .calendar-month-cell.is-muted {
  background: #0a1428;
}

body.theme-dark .calendar-month-cell:hover,
body.theme-dark .calendar-month-cell.is-selected {
  background: #132852;
}

body.theme-dark .settings-choice.is-active,
body.theme-dark .settings-icon,
body.theme-dark .client-pill.is-traffic,
body.theme-dark .client-pill.is-profile {
  background: rgba(47, 109, 234, 0.18);
  color: #dbe7ff;
}

body.theme-dark .calendar-view-toggle {
  background: #101f3d;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  color: #f8fafc;
}

.reports-stack {
  display: grid;
  gap: 24px;
}

.reports-head-actions,
.report-filters,
.report-section-head {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.report-section-head {
  justify-content: space-between;
  margin-bottom: 20px;
}

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

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

.report-summary-grid {
  margin: 12px 0 8px;
}

.report-summary-card {
  padding: 18px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #f8fafc;
}

.report-summary-card h3 {
  margin-bottom: 14px;
}

.report-summary-list {
  display: grid;
  gap: 12px;
}

.report-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.report-summary-item span,
.report-summary-item small {
  color: #475569;
}

.report-summary-item-stack {
  align-items: flex-start;
}

.report-summary-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.report-table-wrap {
  margin-top: 20px;
}

.campaign-chart-card {
  margin-top: 18px;
}

.campaign-chart {
  display: grid;
  gap: 14px;
}

.campaign-chart-row {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.campaign-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.campaign-chart-head strong,
.campaign-chart-head small,
.campaign-chart-head span {
  display: block;
}

.campaign-chart-head small {
  color: #64748b;
  margin-top: 4px;
}

.campaign-chart-head span {
  color: #1e3a8a;
  font-weight: 700;
  white-space: nowrap;
}

.campaign-chart-metrics {
  display: grid;
  gap: 12px;
}

.campaign-bar-wrap {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.campaign-bar-wrap span {
  color: #475569;
  font-size: 14px;
}

.campaign-bar-wrap strong {
  font-size: 14px;
  color: #0f172a;
  white-space: nowrap;
}

.campaign-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #eaf0fb;
  overflow: hidden;
}

.campaign-bar {
  height: 100%;
  border-radius: 999px;
}

.campaign-bar-clicks {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.campaign-bar-conversions {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.campaign-bar-budget {
  background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
}

.report-table-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.report-list {
  display: grid;
  gap: 12px;
}

.report-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

.report-row strong,
.report-row span,
.report-row small {
  display: block;
}

.report-row span,
.report-row small {
  color: #64748b;
  font-size: 13px;
}

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

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weekday-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
}

.weekday-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.weekday-chip.is-selected,
.weekday-chip:has(input:checked) {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
}

@media (max-width: 980px) {
  .report-grid-2 {
    grid-template-columns: 1fr;
  }

  .report-row {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) and (pointer: coarse) {
  .nav-item:hover {
    transform: none;
  }

  .nav-item.active:hover {
    background: #ffffff;
    color: var(--blue);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg.fill {
  fill: currentColor;
  stroke: none;
}

.calendar-page-title {
  margin-bottom: 12px;
}

.calendar-shell {
  margin: 0 -28px -42px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  min-height: calc(100vh - 130px);
}

.calendar-topbar {
  min-height: 72px;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.calendar-topbar .calendar-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.calendar-icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #111827;
  border-radius: 10px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.calendar-icon-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

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

.calendar-topbar .month-title {
  min-width: 210px;
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
}

.calendar-today {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  color: #1f2937;
  font-weight: 700;
}

.calendar-today:hover {
  background: #f1f5f9;
}

.calendar-view-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 3px;
  border-radius: 12px;
  background: #eef2f7;
}

.calendar-view-toggle button {
  min-width: 70px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  background: transparent;
  color: #1f2937;
  font-weight: 800;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.calendar-view-toggle button.active {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 109, 234, 0.22);
}

.calendar-board {
  margin: 12px 28px 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  animation: calendarViewIn 0.22s ease both;
}

.calendar-board.is-day-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
}

.calendar-month-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 0;
}

.calendar-month-layout.is-agenda-open {
  grid-template-columns: minmax(0, 1fr) 292px;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  overflow-x: auto;
}

.calendar-month-layout .calendar-month-grid {
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  overflow: visible;
}

.calendar-weekday {
  min-height: 58px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

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

.calendar-month-cell {
  position: relative;
  min-height: 126px;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

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

.calendar-month-cell:hover {
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(44, 103, 233, 0.14);
}

.calendar-month-cell.is-muted {
  background: #fbfcfe;
}

.calendar-day-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #0f172a;
  font-weight: 700;
}

.calendar-month-cell.is-today .calendar-day-number {
  background: var(--blue);
  color: #ffffff;
}

.calendar-month-cell.is-selected {
  background: #f7fbff;
}

.calendar-month-cell.is-selected .calendar-day-number {
  box-shadow: inset 0 0 0 2px var(--blue);
  color: var(--blue);
}

.calendar-month-cell.is-today.is-selected .calendar-day-number {
  color: #ffffff;
}

.calendar-cell-events {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.calendar-inline-event {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  min-height: 28px;
  padding: 5px 8px 5px 10px;
  border: 0;
  border-left: 3px solid var(--blue);
  border-radius: 0;
  background: transparent;
  color: #1f2937;
  cursor: pointer;
  overflow: hidden;
}

.calendar-inline-event span,
.calendar-inline-event small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.2;
}

.calendar-inline-event strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.25;
}

.calendar-inline-event small {
  grid-column: 1 / -1;
}

.calendar-inline-event.is-compact {
  min-height: 24px;
  padding-block: 4px;
}

.calendar-inline-event.task-tone-green {
  border-left-color: #22c55e;
}

.calendar-inline-event.task-tone-rose {
  border-left-color: #e11d48;
}

.calendar-inline-event.task-tone-yellow {
  border-left-color: #f59e0b;
}

.calendar-inline-event.task-tone-purple {
  border-left-color: #a855f7;
}

.calendar-more {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  outline: 0;
}

.calendar-overflow-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  width: 230px;
  padding: 14px;
  display: grid;
  gap: 9px;
  border: 1px solid rgba(212, 222, 237, 0.95);
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.calendar-overflow-popover::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(212, 222, 237, 0.95);
  border-bottom: 1px solid rgba(212, 222, 237, 0.95);
  background: #ffffff;
  transform: rotate(45deg);
}

.calendar-more:hover .calendar-overflow-popover,
.calendar-more:focus .calendar-overflow-popover,
.calendar-more:focus-within .calendar-overflow-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.calendar-overflow-popover > strong {
  font-size: 12px;
  font-weight: 900;
}

.calendar-overflow-event {
  display: grid;
  grid-template-columns: 3px 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #1f2937;
}

.calendar-overflow-event i {
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: var(--blue);
}

.calendar-overflow-event small,
.calendar-overflow-event b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-overflow-event small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.calendar-overflow-event b {
  font-size: 12px;
  font-weight: 800;
}

.calendar-overflow-event.task-tone-green i {
  background: #22c55e;
}

.calendar-overflow-event.task-tone-rose i {
  background: #e11d48;
}

.calendar-overflow-event.task-tone-yellow i {
  background: #f59e0b;
}

.calendar-overflow-event.task-tone-purple i {
  background: #a855f7;
}

.calendar-overflow-popover em {
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.calendar-dense-event {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  color: #1f2937;
  cursor: pointer;
  font-size: 12px;
}

.calendar-dense-event > span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--blue);
}

.calendar-dense-event strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.calendar-dense-event small {
  color: #64748b;
  font-size: 11px;
}

.calendar-dense-event.task-tone-green > span {
  background: #22c55e;
}

.calendar-dense-event.task-tone-rose > span {
  background: #e11d48;
}

.calendar-dense-event.task-tone-yellow > span {
  background: #f59e0b;
}

.calendar-dense-event.task-tone-purple > span {
  background: #a855f7;
}

.calendar-agenda-panel {
  margin: -1px -1px -1px 0;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-left: 1px solid var(--line);
  border-radius: 0 12px 12px 0;
  background: #ffffff;
}

.calendar-agenda-head {
  display: grid;
  gap: 12px;
}

.calendar-agenda-head .row-between {
  align-items: center;
  min-width: 0;
}

.calendar-agenda-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.calendar-agenda-head .icon-action {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #64748b;
  background: #f8fafc;
}

.calendar-agenda-date {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.calendar-agenda-date > strong {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #dbeafe;
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.calendar-agenda-date span,
.calendar-agenda-date small {
  display: block;
}

.calendar-agenda-date span {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.calendar-agenda-date small {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.calendar-agenda-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-agenda-actions span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.calendar-agenda-actions button,
.calendar-agenda-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

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

.calendar-agenda-event {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 10px 10px 12px;
  border: 1px solid #edf2f7;
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  background: #ffffff;
}

.calendar-agenda-event > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.calendar-agenda-event strong,
.calendar-agenda-event small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-agenda-event strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.calendar-agenda-event small {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.calendar-agenda-event.task-tone-green {
  border-left-color: #22c55e;
}

.calendar-agenda-event.task-tone-rose {
  border-left-color: #e11d48;
}

.calendar-agenda-event.task-tone-yellow {
  border-left-color: #f59e0b;
}

.calendar-agenda-event.task-tone-purple {
  border-left-color: #a855f7;
}

.calendar-agenda-event.is-done strong {
  color: #166534;
  text-decoration: line-through;
}

.calendar-agenda-check {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #ffffff;
  color: #94a3b8;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.calendar-agenda-check:hover,
.calendar-agenda-check.is-done {
  border-color: #22c55e;
  background: #dcfce7;
  color: #16a34a;
}

.calendar-agenda-check svg {
  width: 15px;
  height: 15px;
}

.calendar-agenda-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px dashed #dbe3ef;
  border-radius: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.calendar-agenda-empty svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
}

.calendar-agenda-full {
  margin-top: auto;
  width: 100%;
}

.calendar-time-grid {
  display: grid;
  overflow: auto;
  max-height: calc(100vh - 270px);
}

.calendar-time-grid.is-week {
  grid-template-columns: 96px repeat(7, minmax(132px, 1fr));
}

.calendar-time-grid.is-day {
  grid-template-columns: 100px minmax(420px, 1fr);
}

.calendar-time-corner,
.calendar-time-day {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 96px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.calendar-time-day {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: #64748b;
}

.calendar-time-day strong {
  color: #0f172a;
  font-size: 22px;
}

.calendar-time-day.is-selected strong {
  color: var(--blue);
}

.calendar-hour-label {
  min-height: 78px;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #64748b;
  font-size: 13px;
}

.calendar-hour-cell {
  min-height: 78px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.calendar-hour-cell:hover {
  background: #fbfdff;
}

.calendar-day-panel {
  padding: 36px 30px;
  border-left: 1px solid var(--line);
  background: #ffffff;
}

.calendar-day-panel h2 {
  margin: 0 0 24px;
  font-size: 22px;
}

.calendar-week-list {
  display: none;
}

.calendar-selected-day-summary {
  display: grid;
  gap: 16px;
  padding: 28px 30px 32px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.calendar-selected-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.calendar-selected-day-head span {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-selected-day-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.15;
}

.calendar-selected-day-head small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.calendar-selected-day-head strong {
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 18px;
}

.calendar-selected-day-summary .event-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.calendar-selected-day-summary .empty-notice {
  min-height: 160px;
  border: 1px dashed #dbe3ef;
  border-radius: 12px;
  background: #fbfdff;
}

@keyframes calendarViewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calendar-footer {
  padding: 16px 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.calendar-footer .calendar-legend {
  padding-top: 0;
  border-top: 0;
}

.event-actions {
  display: inline-flex;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.event-actions button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #64748b;
  background: rgba(255, 255, 255, 0.72);
}

.event-actions button:hover {
  color: var(--blue);
  background: #eef4ff;
}

.calendar-inline-event .event-actions {
  position: absolute;
  top: 5px;
  right: 5px;
}

.calendar-inline-event .event-actions button {
  width: 20px;
  height: 20px;
}

.calendar-inline-event:hover .event-actions,
.calendar-inline-event:focus-within .event-actions,
.calendar-agenda-event:hover .event-actions,
.calendar-agenda-event:focus-within .event-actions,
.event-card:hover .event-actions,
.event-card:focus-within .event-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Botão concluído nos cards de detalhe */
.btn-complete-event {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-complete-event:hover {
  background: #dcfce7;
  color: #16a34a;
  border-color: #86efac;
}
.btn-complete-event.is-done {
  background: #dcfce7;
  color: #16a34a;
  border-color: #86efac;
}
.btn-complete-event.is-done svg {
  color: #16a34a;
}
.btn-complete-event svg {
  width: 14px;
  height: 14px;
}

/* Estado concluído no card de detalhe */
.event-card.is-done {
  border-color: #86efac;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.08);
}
.event-card.is-done h4 {
  text-decoration: line-through;
  color: #166534;
}
.event-card.is-done .calendar-event-meta,
.event-card.is-done .calendar-event-meta svg {
  color: #15803d;
}

/* Estado concluido no inline (semana/dia) */
.calendar-inline-event.is-done {
  border-color: #86efac;
  border-left-color: #22c55e;
  background: #ecfdf5;
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.08);
}
.calendar-inline-event.is-done span,
.calendar-inline-event.is-done small {
  color: #15803d;
}
.calendar-inline-event.is-done strong {
  color: #166534;
  text-decoration: line-through;
}
.inline-done-badge {
  display: inline-flex;
  align-items: center;
  color: #16a34a;
}
.inline-done-badge svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 1200px) {
  .metrics-row,
  .finance-summary-grid,
  .finance-overview-grid,
  .contacts-grid,
  .reports-grid,
  .split-grid,
  .bottom-grid,
  .dashboard-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-layout {
    grid-template-columns: 1fr;
  }

  .pipeline-detail {
    position: static;
  }

  .calendar-board.is-day-view {
    grid-template-columns: 1fr;
  }

  .calendar-day-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 980px) {
  .login-screen,
  .app-layout,
  .calendar-layout,
  .client-calendar-layout,
  .split-grid,
  .bottom-grid,
  .dashboard-split,
  .dashboard-split.dashboard-split-secondary,
  .reports-grid,
  .finance-sections,
  .pipeline-stats {
    grid-template-columns: 1fr;
  }

  .app-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: contents;
    border-right: 0;
    position: static;
    height: auto;
    overflow: visible;
    padding: 0;
  }

  .sidebar-brand {
    order: 1;
    width: 100%;
    min-height: 78px;
    padding: 10px 16px;
    background: linear-gradient(165deg, #071126 0%, #0c1735 58%, #102760 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar-brand img {
    width: min(164px, 72%);
    height: auto;
  }

  .sidebar-nav {
    order: 2;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 14px 12px;
    background: linear-gradient(165deg, #071126 0%, #0c1735 58%, #102760 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar-section-label {
    grid-column: 1 / -1;
    padding: 8px 2px 2px;
  }

  .nav-item {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
  }

  .sidebar-bottom {
    order: 4;
    width: 100%;
    margin-top: 0;
    padding: 12px 16px 14px;
    gap: 10px;
    background: linear-gradient(165deg, #071126 0%, #0c1735 58%, #102760 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .content {
    order: 3;
    width: 100%;
    min-height: 0;
  }

  .user-card {
    padding: 4px;
  }

  .profile-action-btn {
    min-height: 42px;
  }

  .support-panel {
    margin-bottom: 14px;
  }

  .finance-item-card,
  .finance-section-head,
  .finance-overview-head {
    flex-direction: column;
    align-items: stretch;
  }

  .finance-item-side {
    justify-items: start;
    text-align: left;
  }

  .finance-item-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .finance-item-side {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .login-brand {
    min-height: auto;
  }

  .login-brand-main {
    margin-top: 42px;
    max-width: none;
  }

  .calendar-shell {
    margin-right: -14px;
    margin-left: -14px;
  }

  .calendar-topbar,
  .calendar-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-topbar .calendar-nav,
  .calendar-toolbar {
    justify-content: space-between;
  }

  .calendar-topbar .month-title {
    min-width: 0;
    flex: 1;
  }

  .calendar-board {
    margin-right: 14px;
    margin-left: 14px;
  }
}

@media (max-width: 760px) {
  .metrics-row,
  .finance-summary-grid,
  .finance-overview-grid,
  .contacts-grid,
  .dashboard-split.dashboard-split-secondary,
  .search-row,
  .stat-row,
  .pipeline-detail-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .dashboard-agenda-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-agenda-time {
    flex-basis: auto;
    min-width: 54px;
  }

  .dashboard-agenda-copy {
    flex: 1 1 170px;
  }

  .dashboard-agenda-row .status-pill {
    margin-left: 54px;
  }

  .dashboard-attention-row {
    align-items: flex-start;
  }

  .content {
    padding: 16px 14px 28px;
  }

  .dashboard-hero {
    padding: 22px;
    border-radius: 16px;
  }

  .dashboard-hero h1 {
    font-size: 34px;
    line-height: 1.05;
  }

  .client-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .client-results-count {
    padding: 0 10px;
  }

  .sidebar-brand {
    min-height: 64px;
    padding: 8px 12px;
  }

  .sidebar-brand img {
    width: min(142px, 70%);
    height: auto;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px;
  }

  .nav-item {
    min-height: 44px;
    padding: 0 12px;
    gap: 8px;
    border-radius: 12px;
    font-size: 14px;
  }

  .nav-item svg {
    width: 16px;
    height: 16px;
  }

  .sidebar-bottom {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 12px 12px;
    gap: 8px;
  }

  .user-card {
    gap: 10px;
    padding: 2px 4px;
  }

  .avatar-circle {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .sidebar-user-avatar img {
    width: 22px;
    height: 22px;
  }

  .user-card strong {
    font-size: 13px;
  }

  .user-card span {
    font-size: 11px;
  }

  .profile-action-btn.btn-outline {
    min-height: 40px;
  }

  .logout-link {
    padding: 4px;
    font-size: 14px;
  }

  .login-panel,
  .login-brand {
    padding: 28px 22px;
  }

  .login-brand-main h1 {
    font-size: clamp(38px, 9vw, 48px);
  }

  .login-box,
  .login-box-wide {
    width: 100%;
  }

  .page-head-row,
  .row-between {
    flex-direction: column;
    align-items: stretch;
  }

  .role-card-large {
    min-height: 96px;
    padding: 20px;
  }

  .login-badge {
    padding: 16px;
  }

  .calendar-shell {
    min-height: auto;
    margin: 0 -14px -28px;
    overflow: visible;
  }

  .calendar-topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    min-height: 0;
    padding: 14px;
    gap: 12px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  }

  .calendar-topbar .calendar-nav {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  .calendar-topbar .month-title {
    min-width: 0;
    text-align: center;
    font-size: 17px;
    line-height: 1.25;
  }

  .calendar-today {
    grid-column: 1 / -1;
    min-height: 34px;
    width: 100%;
    background: #f3f4f6;
  }

  .calendar-view-toggle {
    width: 100%;
    gap: 6px;
  }

  .calendar-view-toggle button {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
    min-height: 40px;
  }

  .calendar-month-grid {
    width: 100%;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: visible;
  }

  .calendar-board {
    margin: 10px 8px 0;
    border-radius: 10px;
    overflow: hidden;
  }

  .calendar-weekday {
    min-height: 34px;
    font-size: 11px;
  }

  .calendar-month-cell {
    min-width: 0;
    min-height: 74px;
    padding: 7px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
  }

  .calendar-day-number {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .calendar-cell-events {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 0;
    overflow: hidden;
  }

  .calendar-inline-event {
    width: 7px;
    height: 7px;
    min-height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--blue);
  }

  .calendar-inline-event.task-tone-green {
    background: #22c55e;
  }
  .calendar-inline-event.task-tone-rose {
    background: #e11d48;
  }

  .calendar-inline-event.task-tone-yellow {
    background: #f59e0b;
  }

  .calendar-inline-event.task-tone-purple {
    background: #a855f7;
  }

  .calendar-inline-event span,
  .calendar-inline-event strong,
  .calendar-inline-event small,
  .calendar-inline-event .event-actions {
    display: none;
  }

  .calendar-more {
    font-size: 10px;
    line-height: 1;
  }

  .calendar-time-grid.is-week {
    display: none;
  }

  .calendar-time-grid.is-day {
    grid-template-columns: 72px minmax(260px, 1fr);
  }

  .calendar-hour-label,
  .calendar-hour-cell {
    min-height: 68px;
  }

  .calendar-day-panel {
    padding: 24px 18px;
  }

  .calendar-selected-day-summary {
    gap: 12px;
    padding: 16px 14px 18px;
  }

  .calendar-selected-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .calendar-selected-day-head span {
    display: block;
    margin-bottom: 3px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .calendar-selected-day-head h3 {
    margin: 0;
    font-size: 17px;
  }

  .calendar-selected-day-head small {
    font-size: 12px;
  }

  .calendar-selected-day-head strong {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--blue);
  }

  .calendar-selected-day-summary .empty-notice {
    min-height: 76px;
    border: 1px dashed #dbe3ef;
    border-radius: 10px;
    background: #fbfdff;
  }

  .calendar-selected-day-summary .event-card,
  .calendar-week-list .event-card {
    padding: 14px;
    border-radius: 10px;
  }

  .calendar-selected-day-summary .event-stack {
    grid-template-columns: 1fr;
  }

  .calendar-week-list {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: #f8fafc;
  }

  .calendar-week-list-day {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
  }

  .calendar-week-group-label {
    padding: 10px 12px 0;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .calendar-week-list-day.is-selected {
    border-color: #b9d1ff;
    box-shadow: 0 0 0 2px rgba(44, 103, 233, 0.08);
  }

  .calendar-week-list-head {
    width: 100%;
    min-height: 58px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    text-align: left;
  }

  .calendar-week-list-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .calendar-week-list-head strong {
    font-size: 20px;
  }

  .calendar-week-list-head small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .calendar-week-list-day.is-selected .calendar-week-list-head strong {
    color: var(--blue);
  }

  .calendar-week-list-events {
    display: grid;
    gap: 10px;
    padding: 0 10px 10px;
  }

  .calendar-week-empty {
    padding: 0 12px 14px;
    color: var(--muted);
    font-size: 13px;
  }

  .calendar-footer {
    padding: 14px 14px 18px;
    gap: 14px;
  }

  .calendar-footer .calendar-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    font-size: 13px;
  }

  .calendar-footer .btn {
    width: 100%;
  }

  .filter-box.calendar-filter {
    width: 100%;
    min-width: 0;
  }
}

.calendar-shell {
  background:
    linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
}

.calendar-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.92);
}

.calendar-topbar .calendar-nav {
  display: grid;
  grid-template-columns: 32px max-content 32px;
  align-items: center;
  gap: 6px;
}

.calendar-topbar .calendar-nav .month-title {
  min-width: 0;
  text-align: left;
}

.calendar-topbar .calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(168px, max-content) minmax(190px, max-content) minmax(190px, max-content) max-content max-content;
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.calendar-new-event-top {
  min-height: 40px;
  padding-inline: 16px;
  white-space: nowrap;
}

.calendar-icon-btn,
.calendar-today,
.calendar-view-toggle button,
.calendar-date-jump,
.calendar-month-cell,
.calendar-time-day,
.calendar-hour-cell {
  outline-offset: 3px;
}

.calendar-icon-btn:focus-visible,
.calendar-today:focus-visible,
.calendar-view-toggle button:focus-visible,
.calendar-date-jump:focus-within,
.calendar-month-cell:focus-visible,
.calendar-time-day:focus-visible,
.calendar-hour-cell:focus-visible {
  outline: 3px solid rgba(44, 103, 233, 0.24);
}

.calendar-date-jump {
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #475569;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.calendar-filter select {
  font-size: 13px;
}

.calendar-filter select[data-calendar-filter="admin-responsible"] {
  font-size: 11.5px;
}

.calendar-date-jump svg {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.calendar-date-jump input {
  width: 136px;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  outline: 0;
}

.calendar-insights {
  padding: 16px 28px 4px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.calendar-insight {
  min-height: 86px;
  padding: 14px 16px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(212, 222, 237, 0.84);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.calendar-insight span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-insight strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-insight small {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-board {
  border-color: rgba(212, 222, 237, 0.9);
  border-radius: 14px;
}

.calendar-month-grid {
  min-width: 0;
}

.calendar-weekday {
  color: #475569;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.calendar-month-cell {
  isolation: isolate;
}

.calendar-month-cell.is-muted {
  color: #94a3b8;
  background: #f8fafc;
}

.calendar-month-cell.is-muted .calendar-day-number {
  color: #94a3b8;
}

.calendar-month-cell.is-selected {
  box-shadow: inset 0 0 0 2px rgba(44, 103, 233, 0.36);
}

.calendar-month-cell.is-selected::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(44, 103, 233, 0.08), rgba(44, 103, 233, 0.02));
}

.calendar-cell-events {
  min-width: 0;
}

.calendar-inline-event {
  background: #f8fbff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.035);
}

.calendar-inline-event:hover {
  border-color: rgba(44, 103, 233, 0.22);
  background: #ffffff;
}

.calendar-inline-event.task-tone-green {
  background: #f3fcf7;
}

.calendar-inline-event.task-tone-rose {
  background: #fff1f2;
}

.calendar-inline-event.task-tone-yellow {
  background: #fffaf0;
}

.calendar-inline-event.task-tone-purple {
  background: #fbf7ff;
}

.calendar-inline-event.is-done {
  border-color: #86efac;
  border-left-color: #22c55e;
  background: #ecfdf5;
}

.calendar-time-grid {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.calendar-all-day-row {
  display: grid;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.calendar-all-day-row.is-week {
  grid-template-columns: 96px repeat(7, minmax(132px, 1fr));
  overflow: auto;
}

.calendar-all-day-row.is-day {
  grid-template-columns: 100px minmax(420px, 1fr);
}

.calendar-all-day-label,
.calendar-all-day-cell {
  min-height: 58px;
  padding: 10px;
  border-right: 1px solid var(--line);
}

.calendar-all-day-label {
  display: grid;
  place-items: center;
  background: #fbfdff;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-all-day-cell {
  display: grid;
  gap: 6px;
  align-content: start;
}

.calendar-all-day-empty {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.calendar-inline-event.is-all-day {
  border-left-color: #0ea5e9;
}

.calendar-time-day {
  background: rgba(255, 255, 255, 0.96);
}

.calendar-hour-label {
  background: #fbfdff;
}

.calendar-hour-cell {
  position: relative;
  background-image: linear-gradient(180deg, transparent calc(50% - 1px), #f3f6fb calc(50% - 1px), #f3f6fb 50%, transparent 50%);
}

.calendar-hour-cell .calendar-inline-event + .calendar-inline-event {
  margin-top: 6px;
}

.calendar-day-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calendar-day-panel-head {
  display: grid;
  gap: 4px;
}

.calendar-day-panel-head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-day-panel-head h2 {
  margin: 0;
}

.calendar-day-panel-head small {
  color: #64748b;
  font-weight: 700;
}

.calendar-empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  color: #64748b;
}

.calendar-empty-state svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
}

@media (max-width: 1180px) {
  .calendar-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-month-layout {
    grid-template-columns: 1fr;
  }

  .calendar-month-layout .calendar-month-grid {
    grid-template-columns: repeat(7, minmax(104px, 1fr));
  }

  .calendar-agenda-panel {
    margin: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 0 12px 12px;
  }

  .calendar-topbar {
    grid-template-columns: 1fr;
  }

  .calendar-topbar .calendar-toolbar {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    justify-content: stretch;
  }

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

@media (max-width: 980px) {
  .calendar-topbar .calendar-nav {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 10px;
    align-items: center;
  }

  .calendar-topbar .calendar-nav .month-title {
    text-align: center;
  }

  .calendar-topbar .calendar-nav .calendar-today {
    grid-column: 1 / -1;
    justify-self: stretch;
    background: #f3f4f6;
  }

  .calendar-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .calendar-month-grid {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
  }

  .calendar-month-layout .calendar-month-grid {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
    overflow-x: auto;
  }

  .calendar-month-cell {
    min-height: 112px;
  }
}

@media (max-width: 760px) {
  .calendar-all-day-row.is-week {
    display: none;
  }

  .calendar-all-day-row.is-day {
    grid-template-columns: 72px minmax(260px, 1fr);
  }

  .calendar-insights {
    padding: 12px 8px 2px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .calendar-insight {
    min-height: 72px;
    padding: 12px;
    border-radius: 10px;
  }

  .calendar-insight strong {
    font-size: 18px;
  }

  .calendar-insight small {
    font-size: 11px;
  }

  .calendar-date-jump {
    width: 100%;
    justify-content: center;
  }

  .calendar-new-event-top {
    width: 100%;
  }

  .calendar-month-layout {
    gap: 0;
  }

  .calendar-month-layout .calendar-month-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: visible;
  }

  .calendar-overflow-popover {
    left: auto;
    right: -16px;
    width: 210px;
  }

  .calendar-overflow-popover::after {
    left: auto;
    right: 22px;
  }

  .calendar-agenda-panel {
    padding: 14px;
  }

  .settings-profile-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .settings-action-list,
  .settings-choice-grid {
    grid-template-columns: 1fr;
  }

  .brand-preview {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-date-jump input {
    width: min(100%, 150px);
  }

  .calendar-month-cell.is-muted {
    background: #f8fafc;
  }
}

/* ── Client card clickable ─────────────────────────────── */
.contact-card.is-clickable {
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}
.contact-card.is-clickable:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.contact-card.is-clickable .icon-action {
  position: relative;
  z-index: 2;
}

/* ── Client detail page ────────────────────────────────── */
.client-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 18px;
}
.client-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.client-detail-back:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.client-detail-back svg {
  width: 16px;
  height: 16px;
}
.client-detail-breadcrumb-sep {
  color: #cbd5e1;
}
.client-detail-breadcrumb-current {
  color: #0f172a;
  font-weight: 600;
}

.client-detail-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.client-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 22px;
}

.client-detail-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.client-detail-identity h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.client-detail-identity p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.client-detail-sidebar-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.client-detail-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid #eef2f7;
}
.client-detail-sidebar-actions .btn {
  justify-content: flex-start;
}

.avatar-circle.xlarge {
  width: 88px;
  height: 88px;
  font-size: 28px;
}

.client-detail-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.client-detail-tabs {
  display: inline-flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  align-self: flex-start;
}

.client-tab-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.client-tab-btn.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.client-detail-panel {
  padding: 26px;
}

.client-detail-notfound {
  text-align: center;
  padding: 48px 24px;
}
.client-detail-notfound h2 {
  margin: 0 0 8px;
}
.client-detail-notfound p {
  margin: 0 0 18px;
  color: #64748b;
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-danger-outline:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}
.btn-danger-outline svg {
  width: 16px;
  height: 16px;
}

/* ── Clients view toggle ───────────────────────────────── */
.clients-view-toggle {
  display: inline-flex;
  background: #f1f4fa;
  border-radius: 12px;
  padding: 4px;
  gap: 2px;
}
.clients-view-btn {
  width: 36px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: #5b6576;
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.clients-view-btn svg {
  width: 18px;
  height: 18px;
}
.clients-view-btn.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* ── Clients list view ─────────────────────────────────── */
.clients-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.clients-list-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.clients-list-row:hover,
.clients-list-row:focus-visible {
  border-color: #c7d4ea;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  outline: none;
  transform: translateY(-1px);
}
.clients-list-row__avatar {
  width: 44px;
  height: 44px;
  font-size: 15px;
}
.clients-list-row__identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.clients-list-row__identity strong {
  font-size: 14px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clients-list-row__identity span {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clients-list-row__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  text-align: right;
}
.clients-list-row__contact span {
  font-size: 13px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.clients-list-row__contact span:last-child {
  color: #94a3b8;
  font-size: 12px;
}
.clients-list-row__pill {
  justify-self: stretch;
  min-width: 160px;
}
.clients-list-row__actions {
  display: inline-flex;
  gap: 4px;
}

@media (max-width: 1100px) {
  .clients-list-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .clients-list-row__contact { display: none; }
  .clients-list-row__pill { display: none; }
  .clients-list-row__pill:first-of-type { display: inline-flex; }
}
@media (max-width: 640px) {
  .clients-list-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .clients-list-row__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 4px;
  }
  .clients-list-row__pill:first-of-type { display: none; }
}

@media (max-width: 960px) {
  .client-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Card refinement ───────────────────────────────────── */
.contact-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.contact-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.contact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  margin-top: auto;
}

/* ── Dados tab ─────────────────────────────────────────── */
.client-detail-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.client-detail-profile h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
.client-detail-profile p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

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

.client-detail-field {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.client-detail-field span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}
.client-detail-field span svg {
  width: 13px;
  height: 13px;
}
.client-detail-field strong {
  font-size: 14px;
  color: #171a20;
}

/* ── Documentos tab ────────────────────────────────────── */
.client-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.doc-upload-form {
  background: #f8fafc;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.doc-upload-form h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #171a20;
}

.doc-upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.doc-upload-row .input {
  flex: 1;
  min-width: 200px;
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}

.doc-file-label {
  cursor: pointer;
  white-space: nowrap;
}

.doc-selected-name {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
  min-height: 16px;
}

.doc-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

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

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
}

.doc-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.doc-item-info svg {
  width: 20px;
  height: 20px;
  color: #2563eb;
  flex-shrink: 0;
}
.doc-item-info strong {
  display: block;
  font-size: 14px;
  color: #171a20;
}
.doc-item-info small {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.doc-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.doc-empty {
  color: #94a3b8;
  font-size: 14px;
  margin: 0;
}

@media (max-width: 600px) {
  .client-detail-fields {
    grid-template-columns: 1fr;
  }
  .doc-upload-row {
    flex-direction: column;
    align-items: stretch;
  }
  .client-detail-panel {
    max-height: 92vh;
  }
}


/* Editorial login redesign */
.login-screen-editorial {
  animation: none;
  grid-template-columns: minmax(420px, 1.06fr) minmax(420px, 1fr);
  background: #f7f5ef;
  color: #071126;
}

.login-brand-editorial {
  min-height: 100vh;
  padding: 48px 56px;
  background: linear-gradient(165deg, #071126 0%, #0c1735 58%, #102760 100%) !important;
  color: #ffffff;
  isolation: isolate;
}

.login-brand-editorial::before {
  display: none;
}

.login-brand-editorial .login-brand-top {
  z-index: 1;
}

.login-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.login-brand-mark img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.login-brand-mark .login-brand-wordmark {
  width: 132px;
  height: auto;
}

.login-brand-editorial .login-brand-main {
  width: min(390px, 100%);
  margin-top: clamp(80px, 15vh, 138px);
  z-index: 1;
}

.brand-kicker,
.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #2f64ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-kicker {
  color: #8fb0ff;
}

.brand-kicker i {
  width: 22px;
  height: 1px;
  background: currentColor;
}

.login-kicker i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.login-brand-editorial .login-brand-main h1 {
  margin: 20px 0 24px;
  max-width: 360px;
  color: #ffffff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(42px, 4.8vw, 58px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.login-brand-editorial .login-brand-main h1 em,
.login-box-editorial h2 em {
  color: #4e7dff;
  font-style: italic;
  font-weight: 400;
}

.login-brand-editorial .login-brand-main p {
  max-width: 360px;
  color: rgba(255, 255, 255, 0.88);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.45;
}

.login-brand-editorial .login-brand-list {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  gap: 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 1.45;
}

.login-brand-editorial .login-brand-list li {
  padding-left: 24px;
}

.login-brand-editorial .login-brand-list li::before {
  content: "\2713";
  top: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #8fb0ff;
  font-size: 12px;
}

.login-brand-editorial .login-brand-footer {
  color: rgba(143, 176, 255, 0.72);
  font-size: 12px;
  z-index: 1;
}

.login-brand-year {
  position: absolute;
  right: 52px;
  bottom: 38px;
  color: rgba(255, 255, 255, 0.06);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 74px;
  font-style: italic;
  line-height: 1;
  z-index: 0;
}

.login-screen-editorial .login-panel {
  min-height: 100vh;
  padding: 48px 64px;
  background:
    radial-gradient(circle at 92% 2%, rgba(16, 23, 42, 0.08), transparent 26%),
    linear-gradient(180deg, #f9f8f4 0%, #f3f1eb 100%);
  align-items: center;
  justify-content: center;
}

.login-box-editorial {
  width: min(318px, 100%);
  color: #071126;
}

.login-box-editorial h2 {
  margin: 20px 0 14px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(33px, 3.4vw, 42px);
  line-height: 1;
  letter-spacing: -0.065em;
  color: #070d1d;
}

.login-box-editorial > p {
  margin: 0 0 30px;
  color: #7a746d;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  font-style: italic;
}

.login-form-editorial {
  gap: 17px;
}

.login-form-editorial .field {
  gap: 7px;
}

.login-form-editorial .field label {
  color: #33405c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 39px;
  border: 1px solid #d2c7ad;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: #97a0ad;
}

.login-input-shell > svg {
  width: 15px;
  height: 15px;
  margin-left: 14px;
  flex: 0 0 auto;
}

.login-input-shell input,
.login-input-shell.password-field input {
  width: 100%;
  min-height: 37px;
  padding: 0 42px 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #071126;
  font-size: 13px;
}

.login-input-shell input:focus {
  outline: none;
}

.login-input-shell:focus-within {
  border-color: #2f64ff;
  box-shadow: 0 0 0 3px rgba(47, 100, 255, 0.12);
}

.login-input-shell .password-toggle {
  right: 10px;
  color: #9aa1ad;
}

.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #344052;
  font-size: 12px;
}

.login-options-row .checkbox-row {
  gap: 9px;
  font-size: 12px;
}

.login-options-row input[type="checkbox"] {
  width: 12px;
  height: 12px;
  accent-color: #2454e8;
}

.login-options-row .link-blue,
.login-profile-switch a {
  color: #174eea;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.login-submit-editorial {
  min-height: 39px;
  margin-top: 2px;
  border-radius: 10px;
  background: #080e1e;
  box-shadow: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.login-submit-editorial svg {
  width: 14px;
  height: 14px;
}

.login-profile-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid #ddd4c1;
  color: #9b948c;
  font-size: 12px;
}

.login-screen-editorial .help-fab,
.login-screen-editorial .login-terms,
.login-screen-editorial .login-badge,
.login-screen-editorial .login-back {
  display: none;
}

@media (max-width: 980px) {
  .login-screen-editorial {
    grid-template-columns: 1fr;
  }

  .login-brand-editorial,
  .login-screen-editorial .login-panel {
    min-height: auto;
    padding: 36px 26px;
  }

  .login-brand-editorial .login-brand-main {
    margin-top: 58px;
    width: min(480px, 100%);
  }

  .login-brand-editorial .login-brand-main h1,
  .login-brand-editorial .login-brand-main p {
    max-width: none;
  }

  .login-brand-year {
    right: 24px;
    bottom: 24px;
    font-size: 58px;
  }

  .login-box-editorial {
    width: min(420px, 100%);
  }
}

@media (max-width: 600px) {
  .login-brand-editorial .login-brand-main h1 {
    font-size: 42px;
  }

  .login-options-row,
  .login-profile-switch {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}


.login-box-wide h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(42px, 4.5vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 700;
  color: #071126;
}

.login-box-wide > p {
  color: #7a746d;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.45;
}

/* Dark mode final pass */
body.theme-dark {
  --text: #eef4ff;
  --muted: #aab7cf;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(180, 194, 218, 0.32);
  --surface: #0d1933;
  --surface-soft: #101f3d;
  --surface-soft-2: #13284f;
  --bg: #071126;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.24);
  background: #071126;
  color: var(--text);
}

body.theme-dark,
body.theme-dark .screen,
body.theme-dark .content,
body.theme-dark .calendar-shell {
  background: #071126;
}

body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark strong,
body.theme-dark label,
body.theme-dark .month-title,
body.theme-dark .calendar-day-number,
body.theme-dark .finance-overview-card strong,
body.theme-dark .finance-item-copy strong,
body.theme-dark .settings-profile-card strong,
body.theme-dark .contact-name,
body.theme-dark .client-detail-title {
  color: #f8fbff;
}

body.theme-dark p,
body.theme-dark small,
body.theme-dark span,
body.theme-dark .page-head p,
body.theme-dark .panel p,
body.theme-dark .finance-section-head p,
body.theme-dark .finance-overview-head p,
body.theme-dark .finance-item-copy p,
body.theme-dark .finance-item-copy small,
body.theme-dark .contact-role,
body.theme-dark .contact-line,
body.theme-dark .settings-card header p,
body.theme-dark .settings-profile-card p,
body.theme-dark .calendar-inline-event small,
body.theme-dark .calendar-inline-event span,
body.theme-dark .calendar-agenda-date small,
body.theme-dark .calendar-agenda-event small,
body.theme-dark .calendar-agenda-event > span {
  color: #aab7cf;
}

body.theme-dark .panel,
body.theme-dark .metric-card,
body.theme-dark .contact-card,
body.theme-dark .settings-card,
body.theme-dark .settings-profile-card,
body.theme-dark .modal-card,
body.theme-dark .calendar-board,
body.theme-dark .calendar-topbar,
body.theme-dark .calendar-agenda-panel,
body.theme-dark .finance-section,
body.theme-dark .finance-overview,
body.theme-dark .finance-overview-card,
body.theme-dark .finance-item-card,
body.theme-dark .client-detail-card,
body.theme-dark .document-card,
body.theme-dark .report-card,
body.theme-dark .pipeline-card {
  border-color: var(--line);
  background: #0d1933;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

body.theme-dark .modal-backdrop {
  background: rgba(2, 6, 23, 0.72);
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .filter-box,
body.theme-dark .search-box,
body.theme-dark .calendar-date-jump,
body.theme-dark .settings-fields input,
body.theme-dark .settings-choice,
body.theme-dark .settings-action-list button,
body.theme-dark .brand-preview {
  border-color: var(--line);
  background: #101f3d;
  color: #f8fbff;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #7584a0;
}

body.theme-dark .icon-action,
body.theme-dark .modal-close,
body.theme-dark .calendar-icon-btn,
body.theme-dark .finance-item-actions .icon-action,
body.theme-dark .event-actions button,
body.theme-dark .calendar-agenda-head .icon-action {
  background: #16294e;
  color: #d9e5f8;
}

body.theme-dark .icon-action:hover,
body.theme-dark .modal-close:hover,
body.theme-dark .calendar-icon-btn:hover {
  background: #1d3768;
  color: #ffffff;
}

body.theme-dark .calendar-weekday,
body.theme-dark .calendar-month-cell,
body.theme-dark .calendar-time-day,
body.theme-dark .calendar-hour-cell,
body.theme-dark .calendar-all-day-row,
body.theme-dark .calendar-all-day-cell,
body.theme-dark .calendar-time-corner {
  border-color: var(--line);
  background: #0d1933;
  color: var(--text);
}

body.theme-dark .calendar-weekday,
body.theme-dark .calendar-hour-label,
body.theme-dark .calendar-all-day-label {
  background: #101f3d;
  color: #c9d5ea;
}

body.theme-dark .calendar-month-cell.is-muted {
  background: #09152a;
  color: #64748b;
}

body.theme-dark .calendar-month-cell:hover,
body.theme-dark .calendar-month-cell.is-selected {
  background: #13284f;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.36);
}

body.theme-dark .calendar-inline-event,
body.theme-dark .calendar-agenda-event,
body.theme-dark .calendar-overflow-popover {
  border-color: var(--line);
  background: #101f3d;
  color: var(--text);
}

body.theme-dark .calendar-inline-event:hover {
  background: #152a53;
}

body.theme-dark .calendar-overflow-popover::after {
  border-color: var(--line);
  background: #101f3d;
}

body.theme-dark .calendar-more,
body.theme-dark .calendar-overflow-popover em,
body.theme-dark .calendar-date-jump svg {
  color: #8bb4ff;
}

body.theme-dark .calendar-agenda-date > strong,
body.theme-dark .calendar-agenda-actions span,
body.theme-dark .calendar-agenda-empty,
body.theme-dark .calendar-agenda-check {
  border-color: var(--line);
  background: #142850;
  color: #dbe7ff;
}

body.theme-dark .calendar-agenda-check:hover,
body.theme-dark .calendar-agenda-check.is-done {
  border-color: rgba(34, 197, 94, 0.52);
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

body.theme-dark .finance-overview-card {
  background: #101f3d;
}

body.theme-dark .finance-tone-income {
  border-color: rgba(34, 197, 94, 0.26);
  background: linear-gradient(180deg, rgba(22, 101, 52, 0.24) 0%, #0d1933 100%);
}

body.theme-dark .finance-tone-expense {
  border-color: rgba(248, 113, 113, 0.26);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.24) 0%, #0d1933 100%);
}

body.theme-dark .finance-tone-profit {
  border-color: rgba(96, 165, 250, 0.28);
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.22) 0%, #0d1933 100%);
}

body.theme-dark .finance-item-income {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(22, 101, 52, 0.14);
}

body.theme-dark .finance-item-expense {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.14);
}

body.theme-dark .finance-item-income .finance-item-side span,
body.theme-dark .finance-tone-income .finance-section-head h3,
body.theme-dark .finance-tone-income .finance-section-actions strong {
  color: #86efac;
}

body.theme-dark .finance-item-expense .finance-item-side span,
body.theme-dark .finance-tone-expense .finance-section-head h3,
body.theme-dark .finance-tone-expense .finance-section-actions strong {
  color: #fca5a5;
}

body.theme-dark .finance-item-avatar {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

body.theme-dark .finance-item-expense .finance-item-avatar {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
}

body.theme-dark .finance-empty,
body.theme-dark .finance-add-row {
  border-color: var(--line);
  background: rgba(16, 31, 61, 0.72);
  color: #c9d5ea;
}

body.theme-dark .finance-tone-income .finance-add-row {
  border-color: rgba(34, 197, 94, 0.34);
  color: #86efac;
}

body.theme-dark .finance-tone-expense .finance-add-row {
  border-color: rgba(248, 113, 113, 0.34);
  color: #fca5a5;
}

body.theme-dark .client-pill,
body.theme-dark .event-type-badge,
body.theme-dark .status-pill,
body.theme-dark .badge {
  background: #142850;
  color: #dbe7ff;
}

body.theme-dark .btn.btn-outline,
body.theme-dark .btn-outline {
  border-color: var(--line);
  background: #101f3d;
  color: #f8fbff;
}

body.theme-dark .login-box-wide h2 {
  color: #f8fbff;
}

body.theme-dark .login-box-wide > p {
  color: #aab7cf;
}

body.theme-dark .client-toolbar {
  border-color: rgba(139, 180, 255, 0.26);
  background: rgba(15, 29, 58, 0.98);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

body.theme-dark .client-toolbar .search-box,
body.theme-dark .client-toolbar .filter-select {
  border-color: rgba(139, 180, 255, 0.28);
  background: #142647;
  color: #dbe7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-dark .client-toolbar .search-box:focus-within,
body.theme-dark .client-toolbar .filter-select:focus-within {
  border-color: rgba(139, 180, 255, 0.52);
  box-shadow: 0 0 0 3px rgba(47, 109, 234, 0.16);
}

body.theme-dark .search-box svg,
body.theme-dark .filter-box svg {
  color: #a9c2f3;
}

body.theme-dark .client-toolbar input::placeholder {
  color: #8fa2c2;
}

body.theme-dark .client-results-count {
  color: #c8d6ea;
}

body.theme-dark .clients-view-toggle {
  border: 1px solid rgba(139, 180, 255, 0.24);
  background: #142647;
}

body.theme-dark .clients-view-btn {
  color: #aab7cf;
}

body.theme-dark .clients-view-btn.is-active {
  background: #20365f;
  color: #ffffff;
  box-shadow: none;
}

body.theme-dark .clients-list-row {
  border-color: rgba(139, 180, 255, 0.22);
  background: #132344;
  color: #eef4ff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

body.theme-dark .clients-list-row:hover,
body.theme-dark .clients-list-row:focus-visible {
  border-color: rgba(139, 180, 255, 0.48);
  background: #172b52;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

body.theme-dark .clients-list-row__identity strong,
body.theme-dark .clients-list-row__contact span {
  color: #f8fbff;
}

body.theme-dark .clients-list-row__identity span,
body.theme-dark .clients-list-row__contact span:last-child {
  color: #c0cce0;
}

body.theme-dark .contact-info {
  border-color: rgba(139, 180, 255, 0.16);
}

body.theme-dark .contact-line svg {
  color: #9db8ea;
}

body.theme-dark .client-pill {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark .client-pill.is-profile {
  background: rgba(148, 163, 184, 0.15);
  color: #dbe7ff;
}

body.theme-dark .client-pill.is-content {
  background: rgba(139, 92, 246, 0.22);
  color: #ddd6fe;
}

body.theme-dark .client-pill.is-traffic {
  background: rgba(56, 189, 248, 0.18);
  color: #bae6fd;
}

body.theme-dark .client-pill.is-both {
  background: rgba(99, 102, 241, 0.24);
  color: #c7d2fe;
}

body.theme-dark .dashboard-hero {
  border-color: rgba(139, 180, 255, 0.22);
  background:
    radial-gradient(circle at 88% 12%, rgba(47, 109, 234, 0.32), transparent 34%),
    linear-gradient(165deg, #0a1429 0%, #102044 58%, #17346f 100%);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

body.theme-dark .dashboard-hero-copy > span {
  color: #a9c2f3;
}

body.theme-dark .metric-card {
  border-color: rgba(139, 180, 255, 0.2);
  background: #132344;
}

body.theme-dark .metric-card .metric-icon,
body.theme-dark .metric-card .metric-icon.blue,
body.theme-dark .metric-card .metric-icon.purple,
body.theme-dark .metric-card .metric-icon.green,
body.theme-dark .metric-card .metric-icon.orange,
body.theme-dark .finance-summary-icon {
  background: #eaf2ff;
  color: #16213a;
}

body.theme-dark .metric-label {
  color: #c0cce0;
}

body.theme-dark .metric-value,
body.theme-dark .profit-headline strong,
body.theme-dark .finance-summary-label {
  color: #ffffff;
}

body.theme-dark .trend.up {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}

body.theme-dark .trend.neutral {
  background: rgba(148, 163, 184, 0.16);
  color: #b8c7df;
}

body.theme-dark .trend.down {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

body.theme-dark .profit-panel,
body.theme-dark .dashboard-agenda-panel,
body.theme-dark .dashboard-attention-panel,
body.theme-dark .finance-summary-panel,
body.theme-dark .report-section {
  border-color: rgba(139, 180, 255, 0.22);
  background: #101f3d;
}

body.theme-dark .profit-chart .profit-grid {
  stroke: rgba(207, 222, 245, 0.34);
}

body.theme-dark .profit-chart .profit-zero {
  stroke: rgba(226, 232, 240, 0.64);
}

body.theme-dark .profit-chart .profit-axis {
  fill: #9fb0cc;
}

body.theme-dark .profit-chart .profit-dot-marker {
  fill: #eaf2ff;
}

body.theme-dark .finance-summary-card {
  border-color: rgba(139, 180, 255, 0.18);
  background: #132344;
}

body.theme-dark .finance-summary-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

body.theme-dark .finance-summary-card--income .finance-summary-value {
  color: #4f83ff;
}

body.theme-dark .finance-summary-card--expense .finance-summary-value,
body.theme-dark .finance-summary-card--saldo.is-negative .finance-summary-value {
  color: #ff4f5f;
}

body.theme-dark .finance-summary-card--saldo .finance-summary-value {
  color: #4ade80;
}

body.theme-dark .finance-summary-card--margem .finance-summary-value {
  color: #9b6dff;
}

body.theme-dark .section-kicker {
  color: #9db8ea;
}

body.theme-dark .report-filters .filter-box {
  border-color: rgba(139, 180, 255, 0.28);
  background: #142647;
  color: #dbe7ff;
}

body.theme-dark .report-summary-card,
body.theme-dark .report-table-wrap {
  border-color: rgba(139, 180, 255, 0.2);
  background: #132344;
  color: #eef4ff;
}

body.theme-dark .dashboard-agenda-row,
body.theme-dark .dashboard-attention-row,
body.theme-dark .report-client-row {
  border-color: rgba(139, 180, 255, 0.18);
  background: #132344;
  color: #eef4ff;
}

body.theme-dark .dashboard-agenda-row:hover {
  border-color: rgba(145, 183, 255, 0.44);
  background: #172a50;
}

body.theme-dark .dashboard-agenda-row.is-overdue,
body.theme-dark .dashboard-attention-row.is-danger {
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(127, 29, 29, 0.18);
}

body.theme-dark .dashboard-agenda-time,
body.theme-dark .dashboard-agenda-copy small,
body.theme-dark .dashboard-attention-copy small,
body.theme-dark .report-client-row > span {
  color: #c0cce0;
}

body.theme-dark .dashboard-attention-icon {
  background: rgba(145, 183, 255, 0.18);
  color: #91b7ff;
}

body.theme-dark .dashboard-attention-row.is-danger .dashboard-attention-icon {
  background: rgba(248, 113, 113, 0.16);
  color: #f87171;
}

body.theme-dark .dashboard-empty-state {
  border-color: rgba(139, 180, 255, 0.22);
  background: rgba(19, 35, 68, 0.72);
  color: #c0cce0;
}

body.theme-dark .report-table-wrap {
  padding: 18px 20px;
  border: 1px solid rgba(139, 180, 255, 0.2);
  border-radius: 20px;
}

body.theme-dark .report-summary-item,
body.theme-dark .campaign-chart-row,
body.theme-dark .report-row {
  border-color: rgba(139, 180, 255, 0.18);
  background: #101f3d;
}

body.theme-dark .report-summary-item span,
body.theme-dark .report-summary-item small,
body.theme-dark .report-row span,
body.theme-dark .report-row small,
body.theme-dark .campaign-chart-head small,
body.theme-dark .campaign-bar-wrap span,
body.theme-dark .report-table-head span {
  color: #c0cce0;
}

body.theme-dark .campaign-chart-head span {
  color: #8fb0ff;
}

body.theme-dark .campaign-bar-wrap strong,
body.theme-dark .report-row strong {
  color: #ffffff;
}

body.theme-dark .campaign-bar-track {
  background: rgba(226, 232, 240, 0.12);
}

body.theme-dark .empty-notice {
  min-height: 144px;
  border: 1px dashed rgba(139, 180, 255, 0.18);
  border-radius: 14px;
  background: rgba(10, 20, 40, 0.56);
  color: #b8c7df;
}

/* Operational topbar redesign */
:root {
  --ops-bg: #f6f3ed;
  --ops-surface: #ffffff;
  --ops-surface-soft: #fbfaf7;
  --ops-border: #e4ded3;
  --ops-border-strong: #d8d0c3;
  --ops-text: #080a0c;
  --ops-muted: #5e675f;
  --ops-green: #4fa77a;
  --ops-green-soft: #d7f0e4;
  --ops-orange: #df8a54;
  --ops-blue: #2c67e9;
  --ops-blue-soft: #eef4ff;
  --ops-blue-strong: #1f4fc3;
  --ops-shadow: 0 16px 34px rgba(50, 43, 31, 0.07);
  --radius-xl: 14px;
  --radius-lg: 10px;
  --radius-md: 8px;
}

html,
body {
  background: var(--ops-bg);
  color: var(--ops-text);
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

h1,
h2,
h3,
h4,
.sidebar-nav,
.btn,
.login-badge,
.page-head h1 {
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
}

.app-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  background: var(--ops-bg);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: auto;
  min-height: 92px;
  padding: 10px 18px 9px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 14px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.92);
  border-right: 0;
  border-bottom: 1px solid var(--ops-border);
  backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-actions,
.topbar-breadcrumb,
.topbar-search,
.topbar-date,
.topbar-role-chip {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 16px;
  min-width: 0;
}

.topbar-brand.sidebar-brand {
  min-height: 0;
  width: auto;
  padding: 0 12px 0 0;
  border: 0;
  justify-content: flex-start;
}

.topbar-brand.sidebar-brand img {
  width: 86px;
  max-height: 28px;
  object-fit: contain;
}

.topbar-breadcrumb {
  gap: 9px;
  min-width: 0;
  color: var(--ops-muted);
  font-size: 14px;
  white-space: nowrap;
}

.topbar-breadcrumb span::after {
  content: "/";
  margin-left: 9px;
  color: #9a9286;
}

.topbar-breadcrumb strong {
  color: var(--ops-text);
  font-weight: 800;
}

.topbar-search {
  width: 320px;
  min-height: 38px;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--ops-border);
  border-radius: 9px;
  background: var(--ops-surface-soft);
  color: var(--ops-muted);
}

.topbar-search svg {
  width: 17px;
  height: 17px;
}

.topbar-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ops-text);
  font-size: 14px;
}

.topbar-search input::placeholder {
  color: #777164;
}

.topbar-nav.sidebar-nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0 0;
  border-top: 1px solid var(--ops-border);
  overflow-x: auto;
  min-width: 0;
}

.sidebar-section-label {
  display: none;
}

.nav-item {
  min-height: 34px;
  gap: 7px;
  padding: 0 10px;
  border-radius: 8px;
  color: #4d554e;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  border-color: transparent;
}

.nav-item svg {
  width: 15px;
  height: 15px;
}

.nav-item:hover {
  background: #f2eee7;
  border-color: var(--ops-border);
}

.nav-item.active,
.nav-item.active:hover,
.nav-item.active:focus-visible,
.nav-item.active:active {
  background: #0d0e0d;
  color: #ffffff;
  border-color: #0d0e0d;
  box-shadow: none;
}

.topbar-actions.sidebar-bottom {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  background: transparent;
  justify-self: end;
}

.topbar-date {
  min-height: 36px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--ops-border);
  border-radius: 9px;
  color: var(--ops-muted);
  background: var(--ops-surface-soft);
  font-size: 13px;
  white-space: nowrap;
}

.topbar-date svg {
  width: 16px;
  height: 16px;
}

.topbar-role-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #0d0e0d;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.topbar-role-chip.is-client {
  background: #fff;
  color: #4d554e;
  border: 1px solid var(--ops-border);
}

.user-card {
  width: auto;
  min-height: 38px;
  gap: 8px;
  padding: 0 4px 0 8px;
  border: 0;
  background: transparent;
}

.user-card strong {
  max-width: 96px;
  color: var(--ops-text);
  font-size: 14px;
  font-weight: 850;
}

.user-card span {
  max-width: 96px;
  margin-top: 0;
  color: var(--ops-muted);
  font-size: 12px;
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border: 0;
  border-radius: 999px;
  background: #e28b5d;
  box-shadow: none;
}

.sidebar-user-avatar img {
  width: 22px;
  height: 22px;
}

.logout-link {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
  color: #454a44;
}

.logout-link span {
  display: none;
}

.logout-link:hover {
  background: #f2eee7;
  color: #0d0e0d;
}

.content {
  width: 100%;
  min-height: calc(100vh - 92px);
  padding: 30px 24px 48px;
}

.page-head-row,
.page-head {
  margin-bottom: 20px;
}

.page-head h1 {
  margin-bottom: 8px;
  color: var(--ops-text);
  font-size: 30px;
  font-weight: 850;
  line-height: 1.05;
}

.page-head p {
  color: var(--ops-muted);
  font-size: 15px;
}

.dashboard-hero {
  padding: 0;
  margin-bottom: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ops-text);
  box-shadow: none;
}

.dashboard-hero-copy {
  gap: 8px;
}

.dashboard-hero-copy > span {
  color: var(--ops-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-hero h1 {
  max-width: none;
  font-family: var(--font-sans);
  color: var(--ops-text);
  font-size: 32px;
  font-weight: 850;
  line-height: 1.08;
}

.metrics-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
  padding: 14px 20px;
  border: 1px solid var(--ops-border);
  border-radius: 10px;
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
}

.metric-card {
  min-height: 78px;
  padding: 4px 20px;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
  border: 0;
  border-right: 1px solid var(--ops-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metric-card:last-child {
  border-right: 0;
}

.metric-card:hover,
.panel:hover,
.contact-card:hover,
.deal-card:hover,
.activity-card:hover,
.calendar-panel:hover,
.event-card:hover,
.team-card:hover {
  transform: none;
  box-shadow: var(--ops-shadow);
}

.metric-card .metric-icon {
  display: none;
}

.metric-body {
  display: flex;
  flex-direction: column-reverse;
  gap: 5px;
}

.metric-label {
  margin: 0;
  color: #4e594f;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.metric-label::before,
.section-kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--ops-green);
  vertical-align: 1px;
}

.metric-value {
  color: var(--ops-text);
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.trend {
  align-self: start;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  color: #087249;
  background: var(--ops-green-soft);
  font-weight: 850;
}

.trend.down {
  color: #a43e25;
  background: #ffe0d3;
}

.trend.neutral {
  color: #575f57;
  background: #ece8df;
}

.panel,
.contact-card,
.deal-card,
.activity-card,
.calendar-panel,
.event-card,
.team-card,
.settings-profile-card,
.settings-card,
.report-summary-card,
.report-table-wrap,
.finance-overview-card,
.finance-item-card,
.pipeline-column,
.stat-box {
  border: 1px solid var(--ops-border);
  border-radius: 10px;
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
}

.panel,
.calendar-panel,
.settings-card,
.settings-profile-card {
  padding: 20px;
}

.panel h3,
.settings-card h3,
.report-summary-card h3 {
  color: var(--ops-text);
  font-size: 18px;
  font-weight: 850;
}

.panel-sub,
.finance-section-head p,
.finance-overview-head p,
.report-section-head p,
.contact-role,
.deal-meta,
.activity-meta,
.calendar-event-meta {
  color: var(--ops-muted);
}

.dashboard-split {
  grid-template-columns: minmax(0, 2fr) minmax(360px, 1fr);
  gap: 18px;
}

.profit-headline strong,
.finance-summary-value,
.finance-overview-card strong,
.stat-box strong {
  color: var(--ops-text);
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -0.05em;
}

.finance-summary-card {
  grid-template-columns: auto minmax(0, 1fr);
  border-color: var(--ops-border);
  border-radius: 8px;
  background: var(--ops-surface-soft);
  box-shadow: none;
}

.finance-summary-value {
  grid-column: 1 / -1;
  text-align: left;
}

.finance-summary-card::before {
  background: var(--ops-green);
}

.finance-summary-icon,
.timeline-icon,
.settings-icon,
.finance-item-avatar {
  border-radius: 8px;
  background: #ede8df;
  color: #31352f;
}

.btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
  box-shadow: none;
}

.btn:hover {
  transform: none;
}

.btn-primary {
  background: #0d0e0d;
  color: #ffffff;
  box-shadow: none;
}

.btn-outline,
.profile-action-btn.btn-outline {
  border-color: var(--ops-border);
  background: var(--ops-surface);
  color: #31352f;
}

.search-box,
.filter-box,
.client-toolbar,
.finance-add-row,
.tab,
.stage-pill,
.calendar-icon-btn,
.calendar-date-jump,
.settings-choice,
.settings-action-list button,
.brand-preview,
.field input,
.field select,
.field textarea {
  border-color: var(--ops-border);
  border-radius: 9px;
  background: var(--ops-surface-soft);
  box-shadow: none;
}

.client-toolbar {
  padding: 8px;
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
}

.client-toolbar .search-box,
.client-toolbar .filter-box {
  background: var(--ops-surface-soft);
}

.clients-view-toggle {
  border-color: var(--ops-border);
  border-radius: 8px;
  background: #f1ede5;
}

.clients-view-btn {
  border-radius: 7px;
}

.clients-view-btn.is-active,
.tab.active,
.settings-choice.is-active,
.stage-pill.active,
.stage-pill:hover {
  background: #0d0e0d;
  border-color: #0d0e0d;
  color: #ffffff;
}

.contact-card,
.deal-card,
.activity-card,
.team-card {
  background: var(--ops-surface);
}

.client-pill,
.status-pill,
.event-type-badge,
.badge,
.badge-count {
  border-radius: 7px;
  font-weight: 850;
}

.client-pill.is-profile,
.status-pending,
.badge-count {
  background: #eee9df;
  color: #3f473f;
}

.client-pill.is-content,
.status-scheduled {
  background: #e4ecdf;
  color: #3a6d51;
}

.client-pill.is-traffic,
.status-done {
  background: var(--ops-green-soft);
  color: #087249;
}

.client-pill.is-both {
  background: #efe4d9;
  color: #925a34;
}

.finance-tone-income,
.finance-tone-profit,
.finance-tone-expense,
.task-tone-blue,
.task-tone-green,
.task-tone-rose,
.task-tone-yellow,
.task-tone-purple,
.task-tone-red,
.pipeline-column-header.gray,
.pipeline-column-header.blue,
.pipeline-column-header.purple,
.pipeline-column-header.orange,
.pipeline-column-header.green {
  background: var(--ops-surface);
  border-color: var(--ops-border);
}

.finance-tone-income .finance-section-head h3,
.finance-tone-income .finance-section-actions strong,
.finance-tone-profit .finance-section-head h3,
.finance-tone-profit .finance-section-actions strong,
.finance-tone-expense .finance-section-head h3,
.finance-tone-expense .finance-section-actions strong,
.finance-item-income .finance-item-side span,
.finance-item-expense .finance-item-side span {
  color: var(--ops-text);
}

.finance-item-income,
.finance-item-expense {
  background: var(--ops-surface-soft);
  border-color: var(--ops-border);
}

.pipeline-column {
  overflow: hidden;
}

.pipeline-column-header {
  background: #f2eee7;
}

.pipeline-empty,
.finance-empty,
.empty-notice {
  border-color: var(--ops-border);
  border-radius: 9px;
  background: var(--ops-surface-soft);
  color: #8a8174;
}

.calendar-board,
.calendar-topbar,
.calendar-agenda-panel,
.calendar-month-cell,
.calendar-weekday,
.calendar-time-day,
.calendar-hour-cell,
.calendar-all-day-row,
.calendar-all-day-cell,
.calendar-time-corner,
.calendar-inline-event,
.calendar-agenda-event,
.report-summary-item,
.campaign-chart-row,
.report-row,
.detail-block,
.client-detail-card,
.document-card {
  border-color: var(--ops-border);
  border-radius: 9px;
  background: var(--ops-surface);
  box-shadow: none;
}

.calendar-month-cell:hover,
.calendar-month-cell.is-selected,
.day-cell:hover,
.day-cell.highlight {
  background: #f2eee7;
  border-color: var(--ops-border-strong);
}

.day-cell.active,
.calendar-agenda-check.is-done {
  background: #0d0e0d;
  color: #ffffff;
}

.icon-action,
.event-actions button,
.panel-more-btn {
  border-radius: 8px;
  background: #f1ede5;
  color: #414840;
}

.icon-action:hover,
.event-actions button:hover,
.panel-more-btn:hover {
  background: #e5ded2;
  color: #111311;
  transform: none;
}

.report-section,
.finance-overview {
  background: var(--ops-surface);
}

.finance-overview {
  padding: 28px 30px 32px;
}

.finance-overview-head {
  margin-bottom: 22px;
}

.finance-overview-grid {
  gap: 22px;
}

.finance-overview-card {
  min-height: 132px;
  padding: 24px 26px;
}

.finance-overview-card strong {
  margin: 14px 0 0;
}

.section-kicker {
  color: #4e594f;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.modal-card {
  border-color: var(--ops-border);
  border-radius: 12px;
  background: var(--ops-surface);
}

body.theme-dark .app-layout,
body.theme-dark .app-topbar,
body.theme-dark .content {
  background: #111712;
}

body.theme-dark .app-topbar {
  border-color: #263127;
  background: rgba(18, 24, 19, 0.92);
}

body.theme-dark .topbar-breadcrumb strong,
body.theme-dark .user-card strong,
body.theme-dark .page-head h1 {
  color: #f7f4ee;
}

body.theme-dark .topbar-search,
body.theme-dark .topbar-date,
body.theme-dark .topbar-role-chip.is-client,
body.theme-dark .nav-item:hover {
  border-color: #303a31;
  background: #19221b;
  color: #c9d3c8;
}

.topbar-actions .profile-action-btn {
  width: auto;
  min-width: 152px;
  min-height: 34px;
  padding: 0 14px;
  gap: 8px;
  flex: 0 0 auto;
  font-size: 13px;
}

.topbar-actions .profile-action-btn svg {
  width: 16px;
  height: 16px;
}

.topbar-date {
  display: none;
}

.finance-overview-head p {
  display: none;
}

body.theme-dark {
  --ops-bg: #101411;
  --ops-surface: #161c18;
  --ops-surface-soft: #1d241f;
  --ops-border: #2b352d;
  --ops-border-strong: #3a463c;
  --ops-text: #f4f2ec;
  --ops-muted: #aeb8ad;
  --ops-green: #61b989;
  --ops-green-soft: rgba(97, 185, 137, 0.18);
  --ops-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
  --text: var(--ops-text);
  --muted: var(--ops-muted);
  --line: var(--ops-border);
  --surface: var(--ops-surface);
  --surface-soft: var(--ops-surface-soft);
  --bg: var(--ops-bg);
  background: var(--ops-bg);
  color: var(--ops-text);
}

body.theme-dark,
body.theme-dark .screen,
body.theme-dark .app-layout,
body.theme-dark .content,
body.theme-dark .calendar-shell {
  background: var(--ops-bg);
  color: var(--ops-text);
}

body.theme-dark .app-topbar {
  border-color: var(--ops-border);
  background: rgba(20, 25, 21, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

body.theme-dark .topbar-brand.sidebar-brand img {
  filter: invert(1) brightness(1.8);
}

body.theme-dark .topbar-breadcrumb,
body.theme-dark .topbar-breadcrumb span,
body.theme-dark .user-card span,
body.theme-dark .page-head p,
body.theme-dark .panel-sub,
body.theme-dark .finance-section-head p,
body.theme-dark .finance-item-copy p,
body.theme-dark .finance-item-copy small {
  color: var(--ops-muted);
}

body.theme-dark .topbar-breadcrumb strong,
body.theme-dark .user-card strong,
body.theme-dark .page-head h1,
body.theme-dark .panel h3,
body.theme-dark .finance-summary-value,
body.theme-dark .finance-overview-card strong,
body.theme-dark .metric-value,
body.theme-dark .profit-headline strong {
  color: var(--ops-text);
}

body.theme-dark .topbar-search,
body.theme-dark .search-box,
body.theme-dark .filter-box,
body.theme-dark .client-toolbar,
body.theme-dark .finance-add-row,
body.theme-dark .tab,
body.theme-dark .stage-pill,
body.theme-dark .calendar-icon-btn,
body.theme-dark .calendar-date-jump,
body.theme-dark .settings-choice,
body.theme-dark .settings-action-list button,
body.theme-dark .brand-preview,
body.theme-dark .field input,
body.theme-dark .field select,
body.theme-dark .field textarea,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  border-color: var(--ops-border);
  background: var(--ops-surface-soft);
  color: var(--ops-text);
}

body.theme-dark .topbar-search input::placeholder,
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #7f8b80;
}

body.theme-dark .topbar-nav.sidebar-nav {
  border-color: var(--ops-border);
}

body.theme-dark .nav-item {
  color: #bac4b8;
}

body.theme-dark .nav-item:hover,
body.theme-dark .logout-link:hover,
body.theme-dark .icon-action:hover,
body.theme-dark .event-actions button:hover,
body.theme-dark .panel-more-btn:hover {
  border-color: var(--ops-border-strong);
  background: #252d27;
  color: #ffffff;
}

body.theme-dark .nav-item.active,
body.theme-dark .nav-item.active:hover,
body.theme-dark .clients-view-btn.is-active,
body.theme-dark .tab.active,
body.theme-dark .settings-choice.is-active,
body.theme-dark .stage-pill.active,
body.theme-dark .stage-pill:hover,
body.theme-dark .btn-primary {
  border-color: #f4f2ec;
  background: #f4f2ec;
  color: #111411;
}

body.theme-dark .panel,
body.theme-dark .metric-card,
body.theme-dark .contact-card,
body.theme-dark .deal-card,
body.theme-dark .activity-card,
body.theme-dark .calendar-panel,
body.theme-dark .event-card,
body.theme-dark .team-card,
body.theme-dark .settings-profile-card,
body.theme-dark .settings-card,
body.theme-dark .report-summary-card,
body.theme-dark .report-table-wrap,
body.theme-dark .finance-overview,
body.theme-dark .finance-overview-card,
body.theme-dark .finance-item-card,
body.theme-dark .finance-summary-card,
body.theme-dark .pipeline-column,
body.theme-dark .stat-box,
body.theme-dark .modal-card,
body.theme-dark .calendar-board,
body.theme-dark .calendar-topbar,
body.theme-dark .calendar-agenda-panel,
body.theme-dark .client-detail-card,
body.theme-dark .document-card {
  border-color: var(--ops-border);
  background: var(--ops-surface);
  color: var(--ops-text);
  box-shadow: var(--ops-shadow);
}

body.theme-dark .metrics-row {
  border-color: var(--ops-border);
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
}

body.theme-dark .metric-card {
  border-right-color: var(--ops-border);
  box-shadow: none;
}

body.theme-dark .metric-label,
body.theme-dark .section-kicker {
  color: #c6cec3;
}

body.theme-dark .trend.up,
body.theme-dark .client-pill.is-traffic,
body.theme-dark .status-done {
  background: rgba(97, 185, 137, 0.18);
  color: #8ee0b1;
}

body.theme-dark .trend.neutral,
body.theme-dark .client-pill.is-profile,
body.theme-dark .badge-count {
  background: rgba(174, 184, 173, 0.14);
  color: #d4d9d2;
}

body.theme-dark .trend.down {
  background: rgba(242, 113, 113, 0.16);
  color: #ff9c9c;
}

body.theme-dark .finance-tone-income,
body.theme-dark .finance-tone-profit,
body.theme-dark .finance-tone-expense,
body.theme-dark .finance-item-income,
body.theme-dark .finance-item-expense,
body.theme-dark .report-section,
body.theme-dark .pipeline-column-header {
  border-color: var(--ops-border);
  background: var(--ops-surface);
}

body.theme-dark .finance-item-income .finance-item-side span,
body.theme-dark .finance-tone-income .finance-section-head h3,
body.theme-dark .finance-tone-income .finance-section-actions strong {
  color: #8ee0b1;
}

body.theme-dark .finance-item-expense .finance-item-side span,
body.theme-dark .finance-tone-expense .finance-section-head h3,
body.theme-dark .finance-tone-expense .finance-section-actions strong,
body.theme-dark .finance-summary-card--expense .finance-summary-value,
body.theme-dark .finance-summary-card--saldo.is-negative .finance-summary-value {
  color: #ff9c9c;
}

body.theme-dark .finance-tone-profit .finance-section-head h3,
body.theme-dark .finance-tone-profit .finance-section-actions strong,
body.theme-dark .finance-summary-card--saldo .finance-summary-value {
  color: #8ee0b1;
}

body.theme-dark .finance-summary-card--income .finance-summary-value,
body.theme-dark .finance-summary-card--margem .finance-summary-value {
  color: #91b7ff;
}

body.theme-dark .finance-summary-icon,
body.theme-dark .timeline-icon,
body.theme-dark .settings-icon,
body.theme-dark .finance-item-avatar,
body.theme-dark .icon-action,
body.theme-dark .event-actions button,
body.theme-dark .panel-more-btn {
  background: #252d27;
  color: #e8ece5;
}

body.theme-dark .finance-item-expense .finance-item-avatar {
  background: rgba(242, 113, 113, 0.16);
  color: #ff9c9c;
}

body.theme-dark .pipeline-empty,
body.theme-dark .finance-empty,
body.theme-dark .empty-notice,
body.theme-dark .calendar-month-cell.is-muted {
  border-color: var(--ops-border);
  background: #141915;
  color: #8d998e;
}

body.theme-dark .calendar-month-cell,
body.theme-dark .calendar-weekday,
body.theme-dark .calendar-time-day,
body.theme-dark .calendar-hour-cell,
body.theme-dark .calendar-all-day-row,
body.theme-dark .calendar-all-day-cell,
body.theme-dark .calendar-time-corner,
body.theme-dark .calendar-inline-event,
body.theme-dark .calendar-agenda-event,
body.theme-dark .report-summary-item,
body.theme-dark .campaign-chart-row,
body.theme-dark .report-row,
body.theme-dark .detail-block {
  border-color: var(--ops-border);
  background: var(--ops-surface);
  color: var(--ops-text);
}

body.theme-dark .dashboard-hero {
  border: 0;
  background: transparent;
  color: var(--ops-text);
  box-shadow: none;
}

body.theme-dark .dashboard-hero h1 {
  color: var(--ops-text);
}

body.theme-dark .dashboard-hero-copy > span {
  color: #91b7ff;
}

@media (max-width: 1180px) {
  .app-topbar {
    grid-template-columns: auto minmax(220px, 1fr) auto;
    height: auto;
    min-height: 92px;
    padding: 10px 14px;
  }

  .topbar-nav.sidebar-nav {
    grid-column: 1 / -1;
    width: 100%;
  }

  .topbar-search {
    max-width: none;
  }

  .topbar-date {
    display: none;
  }
}

@media (max-width: 760px) {
  .app-topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .topbar-left {
    justify-content: flex-start;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .topbar-brand.sidebar-brand {
    order: 0;
    width: auto;
    min-height: 0;
    padding: 0 10px 0 0;
    background: transparent;
    border: 0;
  }

  .topbar-brand.sidebar-brand img {
    width: 78px;
  }

  .topbar-nav.sidebar-nav {
    grid-template-columns: none;
    padding: 8px 0 0;
    background: transparent;
    border-bottom: 0;
    border-top: 1px solid var(--ops-border);
  }

  .topbar-breadcrumb {
    font-size: 13px;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .user-card {
    margin-left: auto;
  }

  .content {
    padding: 20px 14px 34px;
  }

  .metrics-row {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .metric-card {
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--ops-border);
  }

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

  .dashboard-split {
    grid-template-columns: 1fr;
  }
}


/* Agenda redesign */
.agenda-page-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.agenda-page-head .page-head {
  margin-bottom: 0;
}

.agenda-new-event-btn,
.agenda-block-btn {
  min-height: 38px;
  padding-inline: 16px;
  white-space: nowrap;
}

.agenda-shell {
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  height: calc(100vh - 220px);
  min-height: 380px;
  overflow: hidden;
}

.calendar-admin-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  background: var(--ops-surface);
}

.calendar-admin-tabs a,
.calendar-admin-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ops-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.calendar-admin-tabs a.is-active,
.calendar-admin-tabs button.is-active {
  background: var(--ops-blue);
  color: #fff;
}

.calendar-admin-tabs svg {
  width: 16px;
  height: 16px;
}

/* ─── Calendar Lists (redesign) ─────────────────────────────── */

.calendar-lists-shell {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* ── Sidebar ── */
.calendar-list-create {
  display: grid;
  gap: 0;
  border: 1px solid var(--ops-border);
  border-radius: 12px;
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
  overflow: hidden;
}

.calendar-list-create-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background: var(--ops-surface-soft);
  border-bottom: 1px solid var(--ops-border);
}

.calendar-list-create-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ops-text);
  color: var(--ops-surface);
  flex-shrink: 0;
}

.calendar-list-create-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-list-create-header h3 {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ops-text);
}

.calendar-list-create-header p {
  margin: 0;
  font-size: 11px;
  color: var(--ops-muted);
  line-height: 1.4;
}

.calendar-list-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

.btn-full {
  width: 100%;
  justify-content: center;
}

.calendar-list-stats {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--ops-border);
  background: var(--ops-surface-soft);
}

.calendar-list-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.calendar-list-stat strong {
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  color: var(--ops-text);
}

.calendar-list-stat span {
  font-size: 10px;
  font-weight: 700;
  color: var(--ops-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.calendar-list-stat.is-green strong {
  color: var(--ops-green);
}

.calendar-list-stat-divider {
  width: 1px;
  height: 30px;
  background: var(--ops-border);
  flex-shrink: 0;
}

/* ── Board ── */
.calendar-list-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}

/* Empty state */
.calendar-list-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 44px 32px;
  border: 2px dashed var(--ops-border);
  border-radius: 14px;
  text-align: center;
  color: var(--ops-muted);
}

.calendar-list-empty-icon {
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  color: var(--ops-muted);
}

.calendar-list-empty-icon svg {
  width: 100%;
  height: 100%;
}

.calendar-list-empty-state h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ops-text);
}

.calendar-list-empty-state p {
  margin: 0;
  font-size: 13px;
  color: var(--ops-muted);
  max-width: 380px;
  line-height: 1.65;
}

/* ── Card ── */
.calendar-list-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--ops-border);
  border-top: 3px solid var(--list-accent, var(--ops-text));
  border-radius: 12px;
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s;
}

.calendar-list-card:hover {
  box-shadow: 0 22px 52px rgba(50, 43, 31, 0.13);
  transform: translateY(-1px);
}

.calendar-list-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
}

.calendar-list-card-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: var(--ops-text);
  line-height: 1.3;
}

.calendar-list-card-title p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ops-muted);
  line-height: 1.45;
}

.danger-action {
  color: var(--ops-muted);
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}

.calendar-list-card:hover .danger-action {
  opacity: 1;
}

.danger-action:hover {
  color: #ef4444 !important;
}

/* Progress */
.calendar-list-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 10px;
}

.calendar-list-progress-bar {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: var(--ops-border);
  overflow: hidden;
}

.calendar-list-progress-fill {
  height: 100%;
  min-width: 2px;
  border-radius: 99px;
  background: var(--list-accent, var(--ops-green));
  transition: width 0.4s ease;
}

.calendar-list-progress-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--ops-muted);
  min-width: 30px;
  text-align: right;
}

/* Meta badges */
.calendar-list-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}

.calendar-list-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--list-accent-bg, var(--ops-surface-soft));
  color: var(--list-accent, var(--ops-muted));
  font-size: 11px;
  font-weight: 800;
}

.calendar-list-meta-badge svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.calendar-list-owner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--ops-text);
  color: var(--ops-surface);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.calendar-list-owner-stack {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.calendar-list-owner-stack .calendar-list-owner-badge + .calendar-list-owner-badge {
  margin-left: -8px;
  box-shadow: 0 0 0 2px var(--ops-surface);
}

.calendar-list-owner-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ops-muted);
  font-size: 11px;
  font-weight: 800;
}

/* Items */
.calendar-list-items {
  display: grid;
  gap: 6px;
  padding: 0 16px 12px;
}

.calendar-list-item-wrap {
  display: grid;
  gap: 6px;
}

.calendar-list-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px 26px;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 7px;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  background: var(--ops-surface-soft);
  transition: background 0.15s, border-color 0.15s;
}

.calendar-list-item:hover {
  border-color: var(--ops-border-strong);
}

.calendar-list-item.is-done {
  background: #f2fbf5;
  border-color: #c6ecd4;
}

.calendar-list-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid var(--ops-border-strong);
  border-radius: 7px;
  background: var(--ops-surface);
  color: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.calendar-list-check:hover {
  border-color: var(--list-accent, var(--ops-green));
}

.calendar-list-item.is-done .calendar-list-check {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.calendar-list-check svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-list-item span {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ops-text);
  overflow-wrap: anywhere;
  transition: color 0.15s;
}

.calendar-list-item.is-done span {
  color: #16a34a;
  text-decoration: line-through;
  text-decoration-color: #86efac;
  text-decoration-thickness: 2px;
}

.calendar-list-remove {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.calendar-list-item:hover .calendar-list-remove {
  color: var(--ops-muted);
}

.calendar-list-detail-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--ops-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.calendar-list-detail-btn:hover,
.calendar-list-detail-btn.is-active {
  background: var(--list-accent-bg, #eef4ff);
  color: var(--list-accent, var(--ops-blue));
}

.calendar-list-detail-btn.has-detail {
  color: var(--list-accent, var(--ops-blue));
}

.calendar-list-detail-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-list-remove:hover {
  background: #fee2e2;
  color: #ef4444 !important;
}

.calendar-list-remove svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-list-item-empty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 2px;
  color: var(--ops-muted);
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
}

.calendar-list-item-empty svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
  opacity: 0.55;
}

/* Add-item form */
.calendar-list-item-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 6px;
  padding: 0 16px 16px;
}

.calendar-list-item-form input {
  min-height: 36px;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--ops-surface-soft);
  color: var(--ops-text);
  font: inherit;
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.calendar-list-item-form input:focus {
  outline: none;
  border-color: var(--list-accent, var(--ops-green));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--list-accent, var(--ops-green)) 18%, transparent);
}

.calendar-list-item-form button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--ops-border);
  background: var(--ops-surface);
  color: var(--ops-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.calendar-list-item-form button:hover {
  background: var(--ops-text);
  border-color: var(--ops-text);
  color: var(--ops-surface);
}

.calendar-list-item-form button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.task-detail-backdrop {
  background: rgba(8, 10, 12, 0.52);
  backdrop-filter: blur(4px);
}

.task-detail-window {
  width: min(760px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(44, 103, 233, 0.16);
  border-radius: 12px;
  background: #ffffff;
  color: #171a20;
  box-shadow: 0 24px 80px rgba(23, 26, 32, 0.2);
}

.task-detail-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 88px;
  padding: 0 28px;
  background:
    linear-gradient(135deg, rgba(44, 103, 233, 0.97) 0%, rgba(31, 79, 195, 0.96) 58%, #171a20 100%),
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.24), transparent 26%);
}

.task-detail-cover img {
  width: min(210px, 42%);
  max-height: 44px;
  object-fit: contain;
  opacity: 0.16;
  filter: saturate(0) brightness(2.2);
  pointer-events: none;
  user-select: none;
}

.task-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px 10px;
}

.task-detail-kicker {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 0 8px;
  border-radius: 5px;
  background: #eef4ff;
  color: #1f4fc3;
  font-size: 12px;
  font-weight: 800;
}

.task-detail-head h3 {
  margin: 0;
  color: #171a20;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
}

.task-detail-close {
  margin-top: -8px;
  color: #64748b;
  background: transparent;
}

.task-detail-close:hover {
  background: #eef4ff;
  color: #2c67e9;
}

.task-detail-body {
  display: grid;
  gap: 18px;
  padding: 10px 28px 22px;
}

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

.task-detail-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #171a20;
}

.task-detail-section-title svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.task-detail-section-title strong {
  font-size: 15px;
  font-weight: 900;
}

.task-detail-section-title span {
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-detail-section textarea {
  width: 100%;
  min-height: 170px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
  color: #171a20;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
}

.task-detail-section textarea:focus {
  outline: none;
  border-color: #2c67e9;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(44, 103, 233, 0.14);
}

.task-detail-actions {
  padding: 0 28px 28px;
}

/* ─── Owner chip tag input ───────────────────────────────────── */

.owner-field {
  display: grid;
  gap: 0;
  border: 1px solid var(--ops-border);
  border-radius: 9px;
  background: var(--ops-surface);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.owner-field:focus-within {
  border-color: var(--ops-border-strong);
  box-shadow: 0 0 0 3px rgba(8, 10, 12, 0.06);
}

.owner-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  min-height: 40px;
}

/* Chip */
.owner-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--ops-border);
  background: var(--ops-surface-soft);
  color: var(--ops-text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.owner-chip:hover {
  border-color: var(--ops-border-strong);
  background: var(--ops-border);
}

.owner-chip.is-active {
  background: var(--ops-text);
  border-color: var(--ops-text);
  color: var(--ops-surface);
  box-shadow: 0 2px 6px rgba(8, 10, 12, 0.22);
}

.owner-chip.is-active .owner-chip-dot {
  background: rgba(255, 255, 255, 0.7);
}

.owner-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ops-green);
  flex-shrink: 0;
}

/* X button next to chip */
.owner-chip-x {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  color: var(--ops-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  margin-left: -2px;
}

.owner-chip-x:hover {
  background: #fee2e2;
  color: #ef4444;
}

.owner-chip-x svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* Text input inside chips row */
.owner-text-input {
  flex: 1;
  min-width: 80px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--ops-text);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.owner-text-input::placeholder {
  color: var(--ops-muted);
}

/* ── Mini panel (mini tela) ── */
.owner-chip-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--ops-border);
  background: var(--ops-surface-soft);
  animation: ownerPanelIn 0.18s ease;
}

@keyframes ownerPanelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.owner-chip-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.owner-chip-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ops-text);
  color: var(--ops-surface);
  font-size: 14px;
  font-weight: 900;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.owner-chip-panel-info {
  flex: 1;
  min-width: 0;
}

.owner-chip-panel-info strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ops-text);
  line-height: 1.2;
}

.owner-chip-panel-info span {
  font-size: 11px;
  color: var(--ops-muted);
  font-weight: 600;
}

.owner-chip-panel-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--ops-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}

.owner-chip-panel-close:hover {
  background: var(--ops-border);
  color: var(--ops-text);
}

.owner-chip-panel-close svg,
.owner-chip-x svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.owner-note-field {
  gap: 6px !important;
}

.owner-note-field span {
  font-size: 11px;
  font-weight: 700;
  color: var(--ops-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.owner-note-field textarea {
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--ops-surface);
  color: var(--ops-text);
  font: inherit;
  font-size: 12px;
  resize: none;
  transition: border-color 0.15s;
}

.owner-note-field textarea:focus {
  outline: none;
  border-color: var(--ops-border-strong);
}

.owner-chip-panel-actions {
  display: flex;
  gap: 7px;
}

.btn-small {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  gap: 5px !important;
}

.btn-small svg {
  width: 12px !important;
  height: 12px !important;
}

/* ─────────────────────────────────────────────────────────────── */

.agenda-side {
  display: block;
}

.agenda-mini-card,
.agenda-rules-card,
.agenda-day-card {
  border: 1px solid var(--ops-border);
  border-radius: 10px;
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
}

.agenda-mini-card {
  padding: 20px 22px 22px;
  align-self: start;
  position: relative;
  overflow: hidden;
}

.agenda-mini-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ops-blue) 0%, #7aa8ff 100%);
  border-radius: 10px 10px 0 0;
}

.agenda-mini-card header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.agenda-mini-card .calendar-icon-btn {
  width: 36px;
  height: 36px;
}

.agenda-mini-card header strong {
  color: var(--ops-text);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.01em;
}

.agenda-mini-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.agenda-mini-weekdays span {
  color: var(--ops-muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.agenda-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px 4px;
}

.agenda-mini-blank {
  width: 100%;
  aspect-ratio: 1;
}

.agenda-mini-day {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  color: var(--ops-muted);
  font-size: 13px;
  font-weight: 800;
  transition: background 0.12s, color 0.12s;
}

.agenda-mini-day:hover {
  background: var(--ops-blue-soft);
  color: var(--ops-blue);
}

.agenda-mini-day.is-selected {
  background: var(--ops-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(44, 103, 233, 0.30);
}

.agenda-mini-day.is-today:not(.is-selected) {
  color: var(--ops-blue);
  font-weight: 900;
  box-shadow: inset 0 0 0 2px var(--ops-blue);
}

.agenda-mini-day.has-events::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--ops-blue);
  transform: translateX(-50%);
  opacity: 0.7;
}

.agenda-mini-day.is-selected.has-events::after {
  background: rgba(255, 255, 255, 0.7);
}

.agenda-date-input {
  width: 100%;
  min-height: 44px;
  margin-top: 24px;
  padding: 0 14px;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  background: var(--ops-surface-soft);
  color: var(--ops-text);
  font-size: 14px;
  font-weight: 750;
}

.agenda-rules-card {
  align-self: start;
  padding: 18px;
}

.agenda-rules-card h3,
.agenda-day-head h2 {
  margin: 0;
  color: var(--ops-text);
}

.agenda-rules-card p {
  margin: 10px 0 0;
  color: var(--ops-muted);
  font-size: 14px;
  line-height: 1.45;
}

.agenda-rule-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.agenda-rule-list span {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ops-muted);
  font-size: 12.5px;
  font-weight: 700;
}

.agenda-rule-list svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--ops-green);
}

.agenda-day-card {
  min-height: 0;
  height: 100%;
  padding: 22px 20px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.agenda-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--ops-border);
  flex: 0 0 auto;
}

.agenda-day-head h2 {
  font-size: 18px;
  font-weight: 900;
}

.agenda-day-head p {
  margin: 5px 0 0;
  color: var(--ops-muted);
  font-size: 13px;
}

.agenda-day-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.agenda-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ops-blue-soft);
  color: var(--ops-blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.agenda-day-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--ops-blue);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.agenda-day-new-btn:hover {
  background: var(--ops-blue-strong);
  box-shadow: 0 4px 12px rgba(44, 103, 233, 0.25);
}

.agenda-day-new-btn svg {
  width: 13px;
  height: 13px;
}

.agenda-day-head > strong {
  color: var(--ops-muted);
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.agenda-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--ops-border-strong) transparent;
}

.agenda-list::-webkit-scrollbar {
  width: 8px;
}

.agenda-list::-webkit-scrollbar-track {
  background: transparent;
}

.agenda-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--ops-border-strong);
}

.agenda-row {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 96px minmax(120px, auto) auto;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 14px 12px 14px 16px;
  border-top: 1px solid var(--ops-border);
  border-left: 3px solid transparent;
  transition: background 0.12s, border-left-color 0.12s;
}

.agenda-row.is-clickable,
.calendar-inline-event[role="button"],
.calendar-dense-event[role="button"],
.calendar-agenda-event[role="button"],
.event-card[role="button"] {
  cursor: pointer;
}

.agenda-row.is-clickable:hover {
  background: rgba(44, 103, 233, 0.035);
}

.agenda-row.is-status-pending { border-left-color: #f59e0b; }
.agenda-row.is-status-done,
.agenda-row.is-done { border-left-color: #22c55e; }
.agenda-row.is-status-cancelled { border-left-color: #ef4444; }
.agenda-row.is-status-scheduled,
.agenda-row.is-status-free { border-left-color: var(--ops-blue); }

.agenda-row.is-clickable:focus-visible,
.calendar-inline-event:focus-visible,
.calendar-dense-event:focus-visible,
.calendar-agenda-event:focus-visible,
.event-card:focus-visible {
  outline: 3px solid rgba(79, 131, 255, 0.28);
  outline-offset: 3px;
}

.agenda-row.is-done .agenda-row-main strong,
.agenda-row.is-done .agenda-row-main span {
  color: #166534;
  text-decoration: line-through;
  text-decoration-color: #22c55e;
  text-decoration-thickness: 2px;
}

.agenda-row.is-done time,
.agenda-row.is-done .agenda-source {
  color: #15803d;
  opacity: 0.75;
}

.agenda-row time {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--ops-surface-soft);
  border: 1px solid var(--ops-border);
  color: var(--ops-text);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
}

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

.agenda-row-main strong {
  color: var(--ops-text);
  font-size: 16px;
  font-weight: 900;
}

.agenda-row-main span {
  color: var(--ops-muted);
  font-size: 14px;
}

.agenda-row-main small {
  width: max-content;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--ops-green-soft);
  color: #28724b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.agenda-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.agenda-status.is-scheduled,
.agenda-status.is-done {
  background: #dff4e8;
  color: #087249;
}

.agenda-status.is-free {
  background: #dff0ff;
  color: #236caa;
}

.agenda-status.is-pending {
  background: #ffefc7;
  color: #94620b;
}

.agenda-status.is-cancelled {
  background: #ffe0d8;
  color: #a43e25;
}

.agenda-source {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ops-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.agenda-row .event-actions {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.agenda-row:hover .event-actions,
.agenda-row:focus-within .event-actions {
  opacity: 1;
  pointer-events: auto;
}

.agenda-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 10px;
  padding: 40px 24px;
  color: var(--ops-muted);
  text-align: center;
}

.agenda-empty-state svg {
  width: 36px;
  height: 36px;
  opacity: 0.35;
}

.agenda-empty-state p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ops-muted);
}

.event-detail-modal .modal-head {
  align-items: flex-start;
}

.event-detail-modal .modal-head h3 {
  margin-top: 8px;
}

.event-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.event-detail-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  background: var(--ops-surface-soft);
}

.event-detail-row > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: rgba(79, 131, 255, 0.1);
  color: var(--ops-blue);
}

.event-detail-row svg {
  width: 17px;
  height: 17px;
}

.event-detail-row small,
.event-detail-description small {
  display: block;
  color: var(--ops-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.event-detail-row strong {
  display: block;
  margin-top: 2px;
  color: var(--ops-text);
  font-size: 14px;
  font-weight: 900;
}

.event-detail-description {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  background: var(--ops-surface-soft);
}

.event-detail-description p {
  margin: 6px 0 0;
  color: var(--ops-text);
  line-height: 1.55;
}

body.theme-dark .agenda-mini-card,
body.theme-dark .agenda-rules-card,
body.theme-dark .agenda-day-card {
  border-color: var(--ops-border);
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
}

body.theme-dark .agenda-mini-day.is-selected {
  color: #07100a;
}

body.theme-dark .agenda-row-main small {
  color: #8ee0b1;
}

body.theme-dark .agenda-status.is-scheduled,
body.theme-dark .agenda-status.is-done {
  background: rgba(97, 185, 137, 0.18);
  color: #8ee0b1;
}

body.theme-dark .agenda-status.is-free {
  background: rgba(145, 183, 255, 0.16);
  color: #a9c7ff;
}

body.theme-dark .agenda-status.is-pending {
  background: rgba(245, 158, 11, 0.16);
  color: #f8c76a;
}

body.theme-dark .agenda-status.is-cancelled {
  background: rgba(242, 113, 113, 0.16);
  color: #ff9c9c;
}

/* Dark mode polish */
body.theme-dark {
  --ops-bg: #0b1020;
  --ops-surface: #111827;
  --ops-surface-soft: #16213a;
  --ops-border: rgba(104, 139, 205, 0.24);
  --ops-border-strong: rgba(119, 154, 224, 0.46);
  --ops-text: #f4f6f8;
  --ops-muted: #aebbd4;
  --ops-blue: #5d90ff;
  --ops-blue-strong: #2f6dea;
  --ops-blue-soft: rgba(79, 131, 255, 0.18);
  --ops-green: #5cc98d;
  --ops-green-soft: rgba(92, 201, 141, 0.16);
  --ops-shadow: 0 18px 42px rgba(2, 6, 23, 0.38);
  --text: var(--ops-text);
  --muted: var(--ops-muted);
  --line: var(--ops-border);
  --surface: var(--ops-surface);
  --surface-soft: var(--ops-surface-soft);
  --bg: var(--ops-bg);
}

body.theme-dark,
body.theme-dark .screen,
body.theme-dark .app-layout,
body.theme-dark .content,
body.theme-dark .calendar-shell {
  background: var(--ops-bg);
  color: var(--ops-text);
}

body.theme-dark .app-topbar {
  border-color: var(--ops-border);
  background: rgba(10, 16, 31, 0.94);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.32);
}

body.theme-dark .topbar-search,
body.theme-dark .search-box,
body.theme-dark .filter-box,
body.theme-dark .client-toolbar,
body.theme-dark .finance-add-row,
body.theme-dark .tab,
body.theme-dark .stage-pill,
body.theme-dark .calendar-icon-btn,
body.theme-dark .calendar-date-jump,
body.theme-dark .settings-choice,
body.theme-dark .settings-action-list button,
body.theme-dark .brand-preview,
body.theme-dark .field input,
body.theme-dark .field select,
body.theme-dark .field textarea,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  border-color: var(--ops-border);
  background: var(--ops-surface-soft);
  color: var(--ops-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.theme-dark .panel,
body.theme-dark .metric-card,
body.theme-dark .contact-card,
body.theme-dark .deal-card,
body.theme-dark .activity-card,
body.theme-dark .calendar-panel,
body.theme-dark .event-card,
body.theme-dark .team-card,
body.theme-dark .settings-profile-card,
body.theme-dark .settings-card,
body.theme-dark .report-summary-card,
body.theme-dark .report-table-wrap,
body.theme-dark .finance-overview,
body.theme-dark .finance-overview-card,
body.theme-dark .finance-item-card,
body.theme-dark .finance-summary-card,
body.theme-dark .pipeline-column,
body.theme-dark .stat-box,
body.theme-dark .modal-card,
body.theme-dark .calendar-board,
body.theme-dark .calendar-topbar,
body.theme-dark .calendar-agenda-panel,
body.theme-dark .client-detail-card,
body.theme-dark .document-card,
body.theme-dark .agenda-mini-card,
body.theme-dark .agenda-day-card,
body.theme-dark .calendar-list-create,
body.theme-dark .calendar-list-card,
body.theme-dark .calendar-list-empty-state,
body.theme-dark .calendar-admin-tabs {
  border-color: var(--ops-border);
  background: linear-gradient(180deg, rgba(79, 131, 255, 0.08) 0%, var(--ops-surface) 42%);
  color: var(--ops-text);
  box-shadow: var(--ops-shadow);
}

body.theme-dark .page-head h1,
body.theme-dark .topbar-breadcrumb strong,
body.theme-dark .panel h3,
body.theme-dark .settings-card h3,
body.theme-dark .agenda-day-head h2,
body.theme-dark .agenda-mini-card header strong,
body.theme-dark .agenda-row time,
body.theme-dark .agenda-row-main strong,
body.theme-dark .metric-value,
body.theme-dark .profit-headline strong,
body.theme-dark .finance-summary-value,
body.theme-dark .finance-overview-card strong {
  color: var(--ops-text);
}

body.theme-dark .page-head p,
body.theme-dark .topbar-breadcrumb,
body.theme-dark .topbar-breadcrumb span,
body.theme-dark .panel-sub,
body.theme-dark .agenda-day-head > strong,
body.theme-dark .agenda-mini-weekdays span,
body.theme-dark .agenda-row-main span,
body.theme-dark .agenda-source,
body.theme-dark .settings-card header p,
body.theme-dark .settings-profile-card p,
body.theme-dark .contact-role,
body.theme-dark .contact-line {
  color: var(--ops-muted);
}

body.theme-dark .nav-item {
  color: #cbd7f0;
}

body.theme-dark .nav-item:hover,
body.theme-dark .logout-link:hover,
body.theme-dark .icon-action:hover,
body.theme-dark .event-actions button:hover,
body.theme-dark .panel-more-btn:hover {
  border-color: var(--ops-border-strong);
  background: rgba(79, 131, 255, 0.14);
  color: #ffffff;
}

body.theme-dark .nav-item.active,
body.theme-dark .nav-item.active:hover,
body.theme-dark .clients-view-btn.is-active,
body.theme-dark .tab.active,
body.theme-dark .settings-choice.is-active,
body.theme-dark .stage-pill.active,
body.theme-dark .stage-pill:hover,
body.theme-dark .btn-primary {
  border-color: var(--ops-blue);
  background: linear-gradient(180deg, #5d90ff 0%, var(--ops-blue-strong) 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(47, 109, 234, 0.24);
}

body.theme-dark .btn.btn-outline,
body.theme-dark .btn-outline {
  border-color: var(--ops-border-strong);
  background: #1b2028;
  color: var(--ops-text);
}

body.theme-dark .agenda-mini-day {
  color: #c3cad3;
}

body.theme-dark .agenda-mini-day:hover {
  background: rgba(44, 103, 233, 0.16);
  color: #a9c7ff;
}

body.theme-dark .agenda-mini-day.is-selected {
  background: var(--ops-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(44, 103, 233, 0.40);
}

body.theme-dark .agenda-mini-day.is-today:not(.is-selected) {
  color: #7aa8ff;
  box-shadow: inset 0 0 0 2px #4f83ff;
}

body.theme-dark .agenda-mini-day.has-events::after {
  background: #7aa8ff;
}

body.theme-dark .agenda-mini-card::before {
  background: linear-gradient(90deg, var(--ops-blue) 0%, #4f83ff 100%);
}

body.theme-dark .agenda-day-count {
  background: rgba(44, 103, 233, 0.18);
  color: #a9c7ff;
}

body.theme-dark .agenda-day-new-btn {
  background: var(--ops-blue);
  color: #fff;
}

body.theme-dark .agenda-day-new-btn:hover {
  background: #4f83ff;
}

body.theme-dark .agenda-row time {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--ops-border);
  color: var(--ops-text);
}

body.theme-dark .agenda-empty-state {
  color: var(--ops-muted);
}

body.theme-dark .agenda-row {
  border-top-color: var(--ops-border);
}

body.theme-dark .agenda-row:hover {
  background: rgba(44, 103, 233, 0.05);
}

body.theme-dark .agenda-row-main small {
  background: var(--ops-blue-soft);
  color: #b8ccff;
}



body.theme-dark .empty-notice,
body.theme-dark .pipeline-empty,
body.theme-dark .finance-empty {
  border-color: rgba(93, 144, 255, 0.34);
  background: rgba(79, 131, 255, 0.1);
  color: #c6d7ff;
}

body.theme-dark .report-summary-card,
body.theme-dark .report-table-wrap,
body.theme-dark .report-summary-item,
body.theme-dark .campaign-chart-row,
body.theme-dark .report-row {
  border-color: rgba(93, 144, 255, 0.24);
}

body.theme-dark .campaign-chart-head span,
body.theme-dark .report-row strong,
body.theme-dark .report-summary-card h3 {
  color: #dce7ff;
}

body.theme-dark .section-kicker,
body.theme-dark .calendar-more,
body.theme-dark .calendar-overflow-popover em,
body.theme-dark .calendar-date-jump svg,
body.theme-dark .search-box svg,
body.theme-dark .filter-box svg {
  color: #8fb0ff;
}

body.theme-dark .finance-overview-card,
body.theme-dark .finance-summary-card,
body.theme-dark .report-summary-card,
body.theme-dark .report-table-wrap {
  background: linear-gradient(180deg, rgba(79, 131, 255, 0.1) 0%, rgba(17, 24, 39, 0.96) 52%);
}

body.theme-dark .finance-add-row,
body.theme-dark .icon-action,
body.theme-dark .event-actions button,
body.theme-dark .panel-more-btn,
body.theme-dark .profile-action-btn,
body.theme-dark .topbar-role-chip {
  border-color: rgba(93, 144, 255, 0.28);
  background: rgba(79, 131, 255, 0.12);
  color: #dce7ff;
}

body.theme-dark .metric-card .metric-icon,
body.theme-dark .metric-card .metric-icon.blue,
body.theme-dark .metric-card .metric-icon.purple,
body.theme-dark .metric-card .metric-icon.green,
body.theme-dark .metric-card .metric-icon.orange,
body.theme-dark .finance-summary-icon,
body.theme-dark .timeline-icon,
body.theme-dark .settings-icon {
  border: 1px solid rgba(93, 144, 255, 0.28);
  background: rgba(79, 131, 255, 0.16);
  color: #b8ccff;
}

body.theme-dark .metric-card .metric-icon svg,
body.theme-dark .finance-summary-icon svg,
body.theme-dark .timeline-icon svg,
body.theme-dark .settings-icon svg {
  stroke: currentColor;
}

@media (max-width: 1080px) {
  .agenda-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .agenda-side {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
    gap: 16px;
  }

  .agenda-day-card {
    max-height: 720px;
  }

  .calendar-lists-shell,
  .calendar-list-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .agenda-page-head {
    align-items: stretch;
  }

  .agenda-block-btn {
    width: 100%;
  }

  .agenda-side {
    grid-template-columns: 1fr;
  }

  .agenda-day-card {
    padding: 18px 14px 10px;
  }

  .agenda-day-head {
    display: grid;
  }

  .agenda-row {
    grid-template-columns: 76px minmax(0, 1fr) 34px;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 8px;
    min-height: 0;
    padding: 12px 10px 12px 14px;
  }

  .agenda-row time {
    grid-row: 1;
    grid-column: 1;
    align-self: start;
  }

  .agenda-row-main {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .agenda-status {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    opacity: 1;
    pointer-events: auto;
    width: auto;
    min-height: 22px;
    font-size: 11px;
  }

  .agenda-source {
    display: none;
  }

  .agenda-row .event-actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    opacity: 1;
    pointer-events: auto;
  }

  .agenda-day-head-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
}

/* Profile dropdown */
.profile-menu-wrap {
  position: relative;
}

.profile-avatar-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 999px;
}

.profile-avatar-btn:focus-visible {
  outline: 2px solid var(--blue-500, #2c67e9);
  outline-offset: 2px;
}

.profile-dropdown {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--ops-border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 200;
  overflow: hidden;
}

.profile-dropdown.is-open {
  display: flex;
}

.profile-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ops-border);
}

.profile-dropdown-info strong {
  font-size: 14px;
  font-weight: 750;
  color: var(--ops-text);
}

.profile-dropdown-info span {
  font-size: 12px;
  color: var(--ops-muted);
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ops-text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s;
}

.profile-dropdown-item:hover {
  background: var(--ops-surface-soft);
}

.profile-dropdown-item svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

.profile-dropdown-logout {
  color: #c0392b;
  border-top: 1px solid var(--ops-border);
}

.profile-dropdown-logout:hover {
  background: #fff5f5;
}

body.theme-dark .profile-dropdown {
  background: var(--ops-surface);
  border-color: var(--ops-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.theme-dark .profile-dropdown-item {
  color: var(--ops-text);
}

body.theme-dark .profile-dropdown-item:hover {
  background: var(--ops-surface-soft);
}

/* New entity dropdown */
@keyframes new-menu-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.new-menu-wrap {
  position: relative;
}

.new-menu-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  background: #0d0e0d;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.new-menu-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  transform: scale(1.06);
}

.new-menu-btn:active {
  transform: scale(0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.new-menu-plus-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.new-menu-plus-icon svg {
  width: 16px;
  height: 16px;
  stroke: #ffffff;
  stroke-width: 2.5;
  fill: none;
}

.new-menu-wrap.is-open .new-menu-plus-icon {
  transform: rotate(45deg);
}

.new-menu-dropdown {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--ops-border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.13), 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 200;
  overflow: hidden;
  transform-origin: top right;
}

.new-menu-dropdown.is-open {
  display: flex;
  animation: new-menu-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.new-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s;
}

.new-menu-item + .new-menu-item {
  border-top: 1px solid var(--ops-border);
}

.new-menu-item:hover {
  background: var(--ops-surface-soft);
}

.new-menu-item-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #f2eee7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.new-menu-item-icon svg {
  width: 15px;
  height: 15px;
  stroke: #4d554e;
  fill: none;
  stroke-width: 1.8;
}

.new-menu-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.new-menu-item-text strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ops-text);
}

.new-menu-item-text small {
  font-size: 11.5px;
  color: var(--ops-muted);
}

body.theme-dark .new-menu-btn {
  background: linear-gradient(180deg, #5d90ff 0%, var(--ops-blue-strong) 100%);
  box-shadow: 0 10px 22px rgba(47, 109, 234, 0.28);
}

body.theme-dark .new-menu-plus-icon svg {
  stroke: #ffffff;
}

body.theme-dark .new-menu-dropdown {
  background: var(--ops-surface);
  border-color: var(--ops-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

body.theme-dark .new-menu-item:hover {
  background: var(--ops-surface-soft);
}

body.theme-dark .new-menu-item-icon {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .new-menu-item-icon svg {
  stroke: var(--ops-muted);
}

body.theme-dark .new-menu-item-text strong {
  color: var(--ops-text);
}

body.theme-dark .new-menu-item-text small {
  color: var(--ops-muted);
}
