/* Executive theme — loaded only when THEME=executive.
   Ivory paper, gold hairlines, and a soothing leaf-green highlight in place
   of the base CRM blues. CSI / stealth keep their own palettes. */

@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/GreatVibes-Regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/GreatVibes-Regular-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+1E00-1EFF;
}

html.theme-executive {
  color-scheme: light;
  --canvas: #f3f0e8;
  --surface: #fffdf8;
  --surface-raised: #ffffff;
  --ink: #1c221c;
  --muted: #5a6156;
  --faint: #8a8d82;
  --line: #e6e1d4;
  --line-strong: #cfc7b4;
  --leaf-deep: #355647;
  --leaf-mid: #456b55;
  --leaf-lit: #527862;
  --leaf-ink: #2c4638;
  --accent: #456b55;
  --accent-dark: #2c4638;
  --accent-soft: #eef4ef;
  --success: #1c7a55;
  --success-soft: #e7f4ee;
  --warning: #97621a;
  --warning-soft: #fdf1dc;
  --danger: #9d3a34;
  --danger-soft: #f8eae8;
  /* Shadows read as soft ivy, blended from the leaf palette (never blue). */
  --shadow: 0 18px 44px color-mix(in oklab, var(--leaf-deep) 26%, transparent);
  --small-shadow: 0 8px 20px color-mix(in oklab, var(--leaf-mid) 22%, transparent);
  --radius: 14px;
  --focus: 0 0 0 3px color-mix(in oklab, var(--leaf-mid) 32%, transparent);
  --gold: #b8973f;
  --navy: #1c221c;
  --ivy: #27663d;
  --ivy-pastel: #dcefe1;
  --ivy-pastel-soft: #eef6f0;
  --crown-green: 8px;
  --crown-blend: 6px;
  --crown-height: calc(var(--crown-green) + var(--crown-blend));

  --stage-new: #7a8076;
  --stage-contacted: #456b55;
  --stage-proposed: #9a7b34;
  --stage-won: #1c7a55;
  --stage-noresponse: #7a6bb0;
  --stage-dnc: #9d3a34;
  --stage-collecting: #7a8076;
  --stage-review: #456b55;
  --stage-prep: #9a7b34;
  --stage-client: #7a6bb0;
  --stage-filed: #1c7a55;
  --stage-extended: #97621a;
  --stage-closed: #8a8d82;
  --stage-complete: #8a8d82;
}

html.theme-executive,
html.theme-executive body {
  max-width: 100vw;
  overflow-x: hidden;
}

html.theme-executive body {
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

/* Shared Vargas & Muñoz · Secure Portal wordmark (staff topbars + login). */
html.theme-executive .portal-wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  min-width: 0;
  flex-shrink: 0;
}
html.theme-executive .portal-wordmark-name {
  margin: 0;
  padding: 0;
  color: var(--ivy);
  font-family: "Great Vibes", "Snell Roundhand", "Segoe Script", "Apple Chancery", cursive;
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.15;
  letter-spacing: .02em;
  white-space: nowrap;
}
html.theme-executive .portal-wordmark-line {
  margin: 0;
  padding: 0;
  color: var(--ivy);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
}
html.theme-executive .auth-wordmark {
  margin-bottom: 10px;
}
html.theme-executive .auth-wordmark .portal-wordmark-name {
  font-size: 22px;
}
html.theme-executive .auth-wordmark .portal-wordmark-line {
  font-size: 13px;
}

html.theme-executive .hero-sig span {
  color: var(--leaf-mid);
}
html.theme-executive .hero-sig span::after {
  background: color-mix(in oklab, var(--leaf-mid) 22%, transparent);
}
html.theme-executive .import-body .import-topbar .primary-button,
html.theme-executive .import-body .import-topbar .primary-button:hover {
  background: linear-gradient(180deg, #3a5546 0%, #2c4638 48%, #22372c 100%);
  border: 1px solid color-mix(in oklab, var(--gold) 16%, #1e3027);
  color: #ffffff;
  box-shadow:
    0 10px 22px color-mix(in oklab, #1a2e24 46%, transparent),
    0 2px 6px color-mix(in oklab, #1a2e24 28%, transparent),
    inset 0 1px 0 color-mix(in oklab, #ffffff 12%, transparent);
}

html.theme-executive .quick-call,
html.theme-executive .quick-call:hover {
  color: #fff;
  background: linear-gradient(180deg, #3a5546 0%, #2c4638 48%, #22372c 100%);
  box-shadow:
    0 8px 16px color-mix(in oklab, #1a2e24 36%, transparent),
    inset 0 1px 0 color-mix(in oklab, #ffffff 12%, transparent);
}
html.theme-executive .quick-call svg {
  color: #fff;
  stroke: currentColor;
}
html.theme-executive .initcall-link,
html.theme-executive .initcall-link:hover {
  color: #fff;
  background: linear-gradient(180deg, #3a5546 0%, #2c4638 48%, #22372c 100%);
}
html.theme-executive .initcall-link svg {
  color: #fff;
  stroke: currentColor;
}
html.theme-executive .quick-text,
html.theme-executive .quick-text:hover {
  background: color-mix(in oklab, var(--leaf-mid) 28%, #ffffff);
  color: var(--leaf-ink);
  border-color: color-mix(in oklab, var(--leaf-mid) 34%, var(--line));
}
html.theme-executive .quick-email,
html.theme-executive .quick-email:hover {
  background: #e6e7e2;
  color: #55584f;
  border-color: #cfd1ca;
}

/* Soft atmosphere — leaf at the crown, a whisper of gold. */
html.theme-executive body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 32% at 12% 6%, color-mix(in oklab, var(--leaf-mid) 10%, transparent), transparent 70%),
    radial-gradient(34% 30% at 88% 4%, color-mix(in oklab, var(--gold) 10%, transparent), transparent 68%),
    radial-gradient(46% 40% at 78% 96%, color-mix(in oklab, var(--leaf-deep) 7%, transparent), transparent 74%);
}

html.theme-executive .executive-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.13  0 0 0 0 0.21  0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html.theme-executive body > *:not(.executive-atmosphere):not(.icon-sprite):not(.portal-crown):not(.crm-topbar) {
  position: relative;
  z-index: 1;
}

/* Display type: a quiet serif for headings and the brand eyebrow. */
html.theme-executive h1,
html.theme-executive .brand strong,
html.theme-executive .auth-brand h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  letter-spacing: .1px;
}

html.theme-executive .eyebrow {
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  color: color-mix(in oklab, var(--gold) 72%, var(--leaf-ink));
}

/* Topbar: bright white. Flush to the viewport top except on the portal
   home, where it sits under the green / white-wash / white crown. */
html.theme-executive body.crm-body:not(.portal-body) > .crm-topbar,
html.theme-executive body.crm-body:not(.portal-body) > header.crm-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0;
  border-top: 0;
  border-bottom: 1px solid #ececec;
  box-shadow: none;
  background: #ffffff;
  backdrop-filter: none;
}

html.theme-executive body.portal-body > .portal-crown {
  position: sticky;
  top: 0;
  z-index: 50;
}
html.theme-executive body.portal-body > .portal-crown .portal-crown-green {
  background: linear-gradient(180deg, var(--leaf-lit), var(--leaf-deep));
}
html.theme-executive body.portal-body > .portal-crown .portal-crown-blend {
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--leaf-deep) 28%, #ffffff) 0%,
    color-mix(in oklab, var(--leaf-mid) 8%, #ffffff) 55%,
    #ffffff 100%
  );
}

html.theme-executive body.portal-body > .crm-topbar,
html.theme-executive body.portal-body > header.crm-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0;
  border-top: 0;
  border-bottom: 0.5px solid #b7bdb4;
  box-shadow:
    0 0.5px 0 #f2f3f0,
    inset 0 -0.5px 0 color-mix(in oklab, #6f776c 28%, transparent);
  background: #ffffff;
  backdrop-filter: none;
}

html.theme-executive .portal-body .topbar-actions > .soft-button.is-current,
html.theme-executive .portal-body .topbar-actions > .soft-button.is-current:hover {
  color: var(--leaf-ink);
  background: var(--ivy-pastel);
  border-color: color-mix(in oklab, var(--leaf-mid) 34%, var(--line));
}

/* Buttons: deep shadowy ivy, gold hairline — nearly as dark as leaf-ink. */
html.theme-executive .primary-button,
html.theme-executive .primary-button:hover {
  background: linear-gradient(180deg, #3a5546 0%, #2c4638 48%, #22372c 100%);
  border: 1px solid color-mix(in oklab, var(--gold) 16%, #1e3027);
  color: #ffffff;
  box-shadow:
    0 10px 22px color-mix(in oklab, #1a2e24 46%, transparent),
    0 2px 6px color-mix(in oklab, #1a2e24 28%, transparent),
    inset 0 1px 0 color-mix(in oklab, #ffffff 12%, transparent);
}

html.theme-executive .soft-button {
  border-color: color-mix(in oklab, var(--leaf-mid) 26%, var(--line));
  background: color-mix(in oklab, var(--leaf-mid) 7%, var(--surface));
  color: var(--leaf-ink);
}
html.theme-executive .text-button { border-color: var(--line-strong); }
html.theme-executive .soft-button:hover {
  border-color: color-mix(in oklab, var(--leaf-mid) 26%, var(--line));
  background: color-mix(in oklab, var(--leaf-mid) 7%, var(--surface));
  color: var(--leaf-ink);
}

/* Cards + panels: crisp ivory with a hair of gold on emphasis. */
html.theme-executive .auth-card,
html.theme-executive .kpi-card,
html.theme-executive .add-lead-card,
html.theme-executive .vault-panel {
  border: 1px solid var(--line);
  box-shadow: var(--small-shadow);
}

html.theme-executive .auth-card {
  border-top: 3px solid var(--gold);
}

html.theme-executive .identity-avatar {
  background: linear-gradient(180deg, var(--gold), #7c6127);
  color: #fff;
}

html.theme-executive a { color: var(--accent-dark); }

/* Replace leftover hardcoded blues from app.css / crm.css / admin.css. */
html.theme-executive .crm-body {
  background:
    radial-gradient(ellipse 90% 22rem at 50% 0%, color-mix(in oklab, var(--leaf-mid) 9%, transparent), transparent 72%),
    var(--canvas);
}
html.theme-executive body {
  background: var(--canvas);
}
html.theme-executive .hero h1 span::after {
  background: color-mix(in oklab, var(--leaf-mid) 22%, transparent);
}
html.theme-executive .upload-mark {
  border-color: color-mix(in oklab, var(--leaf-mid) 28%, var(--line));
  background: var(--accent-soft);
  box-shadow: 0 8px 20px color-mix(in oklab, var(--leaf-mid) 16%, transparent);
}
html.theme-executive .processing-orbit {
  border-color: color-mix(in oklab, var(--leaf-mid) 30%, var(--line));
}
html.theme-executive .summary-card.is-active {
  border-color: color-mix(in oklab, var(--leaf-mid) 48%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--leaf-mid) 16%, transparent);
}
html.theme-executive tbody tr:hover td {
  background: transparent;
}
html.theme-executive .crm-body tbody tr[data-fresh="1"] td,
html.theme-executive .crm-body tbody tr[data-fresh="1"]:hover td {
  background: var(--accent-soft);
}
html.theme-executive .admin-tab.is-active,
html.theme-executive .view-tab.is-active {
  background: color-mix(in oklab, var(--leaf-mid) 12%, var(--surface));
}
html.theme-executive #allocTable tbody tr.is-selected td {
  background: var(--accent-soft);
}
html.theme-executive .bulk-bar .text-button {
  color: #d7e4d8;
}
html.theme-executive .tl-email .timeline-dot {
  background: var(--accent-soft);
}
html.theme-executive .quality-shell--misc {
  color: var(--leaf-ink);
  background: linear-gradient(180deg, #eef4ef, #d7e4d8);
}
html.theme-executive .action-tag {
  background: color-mix(in oklab, var(--leaf-mid) 8%, var(--surface));
}

/* No hover shifts or motion in the executive theme — calm and static. */
html.theme-executive .soft-button,
html.theme-executive .primary-button,
html.theme-executive .text-button,
html.theme-executive .kpi-card,
html.theme-executive .admin-panel,
html.theme-executive .portal-upload,
html.theme-executive .portal-event,
html.theme-executive .portal-upcoming a,
html.theme-executive .view-tab,
html.theme-executive .icon-button,
html.theme-executive .identity-chip,
html.theme-executive tbody tr td {
  transition: none !important;
  transform: none !important;
  animation: none !important;
}
html.theme-executive .portal-upload:hover,
html.theme-executive .portal-upcoming a:hover,
html.theme-executive .portal-event:hover,
html.theme-executive .icon-button:hover {
  background: inherit;
  border-color: inherit;
  color: inherit;
}

/* Pastel ivy panels with a soft ivy edge and blended shadow. */
html.theme-executive .portal-body .admin-panel,
html.theme-executive .portal-body .portal-calendar-panel {
  border-color: color-mix(in oklab, var(--leaf-mid) 18%, var(--line));
  box-shadow: var(--small-shadow);
}
html.theme-executive .portal-day.is-today {
  border-color: color-mix(in oklab, var(--leaf-mid) 50%, var(--line));
  background: var(--ivy-pastel);
}
html.theme-executive .portal-event {
  background: var(--ivy-pastel);
  color: var(--leaf-ink);
}

@media (prefers-reduced-motion: reduce) {
  html.theme-executive body::before { animation: none; }
}
