@font-face { font-family: Urbanist; src: url('/urbanist-regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Urbanist; src: url('/urbanist-medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Urbanist; src: url('/urbanist-semibold.ttf') format('truetype'); font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'Quick Trick'; src: url('/quick-trick.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }

:root {
  --fnec-cream: #fff7e6;
  --fnec-wine: #390600;
  --fnec-olive: #687500;
  --fnec-yellow: #f0c536;
  --fnec-orange: #ff8b00;
  --fnec-glass: color-mix(in srgb, var(--white) 52%, transparent);
  --fnec-glass-floating: color-mix(in srgb, var(--white) 82%, transparent);
  --fnec-glass-edge: color-mix(in srgb, var(--fnec-cream) 66%, transparent);
  --fnec-glass-highlight: color-mix(in srgb, var(--fnec-cream) 80%, transparent);
  --fnec-glass-glaze: linear-gradient(145deg, color-mix(in srgb, var(--fnec-cream) 32%, transparent), transparent 48%, color-mix(in srgb, var(--fnec-cream) 10%, transparent));
  --fnec-glass-shadow: inset 0 1px 1px var(--fnec-glass-highlight), inset 0 -1px 1px #39060014, 0 2px 5px #3906000a, 0 16px 40px #3906001f;
  --fnec-glass-blur: 32px;
  --fnec-glass-saturation: 1.3;
  --rail: #fff9ed;
  --rail-active: #ececcf;
  --ink: #390600;
  --muted: #70544a;
  --subtle: #7c6552;
  --paper: #fff7e6;
  --white: #fffcf5;
  --line: #e6d9bf;
  --accent: #687500;
  --accent-deep: #505b00;
  --accent-soft: #eff0d7;
  --on-accent: #ffffff;
  --monkeys-orange: #ff8b00;
  --monkeys-metric: #687500;
  --monkeys-ink: #645000;
  --surface-hover: #f1ead8;
  --panel-background: #fffcf5;
  --panel-border: #e6d9bf;
  --panel-shadow: 0 3px 18px #39060006;
  --focus: #687500;
  --warning-bg: #f2e4bb;
  --warning-text: #584715;
  --danger: #a02100;
  font-family: Urbanist, Arial, sans-serif;
  font-size: 16px;
}
body, [data-theme='dark'] body { background: var(--paper); }
.access-intro, [data-theme='dark'] .access-intro {
  position: relative;
  overflow: hidden;
  color: var(--fnec-wine);
  background: var(--fnec-cream);
  border-right: 1px solid var(--line);
  padding: clamp(28px, 4vw, 64px);
}
.access-intro::after { content: ''; position: absolute; bottom: 0; right: -35px; width: 240px; height: 230px; background: url('/fnec-rio.svg') center/contain no-repeat; opacity: .11; pointer-events: none; }
.brand { color: var(--ink); }
.brand-name { font-family: 'Quick Trick', Urbanist, sans-serif; font-size: 24px; font-weight: 400; letter-spacing: 0; }
.brand-name span { font-family: Urbanist, sans-serif; color: var(--muted); font-size: .65em; font-weight: 600; letter-spacing: .02em; }
.brand-mark, [data-theme='dark'] .brand-mark { color: var(--fnec-cream); background: var(--fnec-olive); border-radius: 50% 50% 6px 50%; font-family: 'Quick Trick', sans-serif; padding: 0 1px 3px 0; letter-spacing: 0; }
.event-logo { display: block; width: min(100%, 240px); height: auto; margin: 0 0 30px; }
.intro-content { position: relative; z-index: 1; max-width: 530px; }
.intro-content > .pilot-chip { display: none; }
.intro-title { font-family: 'Quick Trick', sans-serif; font-weight: 400; font-size: clamp(2.7rem, 4.35vw, 4.65rem); line-height: 1.08; letter-spacing: 0; max-width: 15ch; margin: 0 0 25px; }
.intro-description, [data-theme='dark'] .intro-description { color: var(--muted); max-width: 42ch; font-size: 1.04rem; line-height: 1.6; }
.intro-flow, [data-theme='dark'] .intro-flow { color: var(--fnec-wine); background: none; border: 0; border-radius: 0; box-shadow: none; margin-top: 22px; padding: 0; }
.intro-flow > div + div, [data-theme='dark'] .intro-flow > div + div { border-color: #dfd1b9; }
.intro-flow > div > span, [data-theme='dark'] .intro-flow > div > span { border-color: var(--fnec-olive); }
.intro-flow > div:nth-child(2) > span, [data-theme='dark'] .intro-flow > div:nth-child(2) > span { background: var(--fnec-yellow); border-color: var(--fnec-yellow); }
.intro-flow > div:nth-child(3) > span, [data-theme='dark'] .intro-flow > div:nth-child(3) > span { background: var(--fnec-olive); border-color: var(--fnec-olive); }
.intro-signature { position: relative; z-index: 1; display: flex; gap: 13px; align-items: center; color: var(--fnec-wine); font-size: .85rem; }
.intro-signature strong { font-size: 1rem; }
.tapiri-portrait { display: block; flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; background-image: url('/tapiri-personagem.png'); background-size: 546px 307px; background-position: -455px -27px; }
.access-main { background: var(--white); }
.access-card h1 { font-size: 2.15rem; font-weight: 600; letter-spacing: -.025em; }
.access-card > p { max-width: 38ch; }
.theme-toggle { box-shadow: none; background: transparent; }
input, select, textarea { color: var(--ink); background: var(--white); border-color: var(--line); accent-color: var(--accent); }
.button { text-decoration: none; border-radius: 9px; font-weight: 600; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.button.secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.button.secondary:hover { background: var(--surface-hover); }
.topbar, [data-theme='dark'] .topbar { border-color: var(--line); }
.topbar-brand { color: var(--ink); }
.topbar-brand .brand-name { font-size: 1.4rem; }
.topbar-brand .pilot-chip { display: none; }
.topbar-company-copy small { color: var(--muted); }
.company-avatar { background-color: var(--accent-soft); color: var(--accent); border-color: var(--line); }
.page-header h1 { font-weight: 600; font-size: clamp(1.8rem, 3vw, 2.35rem); letter-spacing: -.03em; }
.page-header p { color: var(--muted); }
.entity-panel, .conversation-layout, .funnel { border-color: var(--panel-border); }
.entity-panel { border-radius: 16px; }
.entity-head h2, .entity-panel > h2 { font-size: 1.1rem; font-weight: 600; }
.entity-panel > p { margin-top: 6px; color: var(--muted); max-width: 75ch; }
.company-profile { margin-block: 18px; }
.support-settings { margin-bottom: 18px; padding: 17px; }
.support-settings form { display: grid; gap: 10px; margin-top: 17px; max-width: 550px; }
.support-settings .button { justify-self: start; }
.source-tag, .stage-tag { border-color: var(--line); color: var(--muted); background: var(--accent-soft); }
.message-bubble, [data-theme='dark'] .message-bubble { border-color: var(--line); }
.report-icon { border: 1.5px solid currentColor; border-radius: 3px; background: linear-gradient(currentColor,currentColor) 4px 10px/2px 5px no-repeat, linear-gradient(currentColor,currentColor) 8px 7px/2px 8px no-repeat, linear-gradient(currentColor,currentColor) 12px 4px/2px 11px no-repeat; }
#dashboard-content, :root[data-theme='dark'] #dashboard-content {
  --dashboard-surface: var(--panel-background);
  --dashboard-border: var(--panel-border);
  --dashboard-shadow: var(--panel-shadow);
  --dashboard-hover: var(--surface-hover);
  --dashboard-ring-track: var(--line);
  --dashboard-ring-novo: #f0c536;
  --dashboard-ring-qualificado: #ff8b00;
  --dashboard-ring-com_vendedor: #99734f;
  --dashboard-ring-ganho: #687500;
  --dashboard-ring-perdido: #c4b69b;
}
.dashboard-panel, .dashboard-indicator { border-radius: 16px; }
.dashboard-indicator > strong { letter-spacing: -.035em; }
.dashboard-readiness { margin-bottom: 20px; padding: 23px; border-left: 4px solid var(--fnec-olive); border-radius: 0 16px 16px 0; }
.dashboard-readiness h2 { margin-bottom: 7px; }
.dashboard-readiness > p { color: var(--muted); font-size: .9rem; }
.dashboard-readiness-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 0; margin: 20px 0 0; }
.dashboard-readiness-row { display: flex; flex-direction: column; align-items: start; gap: 8px; min-width: 0; }
.dashboard-readiness-row > div { display: grid; gap: 6px; }
.dashboard-readiness-row strong { font-weight: 600; }
.readiness-state { color: var(--muted); font-size: .85rem; }
.readiness-state[data-ready='true'] { color: var(--accent); }
.report-filters { margin-bottom: 20px; }
#report-form { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin-top: 20px; }
#report-form label { flex: 1 1 160px; max-width: 240px; }
#report-form .button { min-height: 44px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.report-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-block: 18px; }
.report-metric { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.report-metric strong { display: block; font-size: 2rem; color: var(--accent); font-weight: 600; }
.report-metric span { font-size: .87rem; color: var(--muted); }
.report-table-wrap { overflow-x: auto; margin-top: 16px; }
.report-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
.report-table th, .report-table td { border-bottom: 1px solid var(--line); padding: 12px 9px; vertical-align: top; }
.report-table th { color: var(--muted); font-weight: 600; }
.report-table td { white-space: pre-wrap; overflow-wrap: anywhere; }
.report-table .report-message-text { min-width: 220px; max-width: 650px; }
.report-note, .report-meta { color: var(--muted); font-size: .87rem; margin-block: 10px; }
:root[data-theme='dark'] {
  --paper: #26120b; --white: #341c12; --rail: #341c12; --rail-active: #4a3e20;
  --ink: #fff7e6; --muted: #d4c6ae; --subtle: #c7b798; --line: #5a4430;
  --accent: #cbd583; --accent-deep: #e5edba; --accent-soft: #454b24; --on-accent: #273000;
  --monkeys-metric: #cbd583; --monkeys-ink: #f0c536; --surface-hover: #493322;
  --panel-background: #341c12; --panel-border: #5a4430; --panel-shadow: none;
  --focus: #f0c536; --warning-bg: #53401f; --warning-text: #f5d886; --danger: #ffb39b;
  --fnec-glass: color-mix(in srgb, var(--white) 56%, transparent);
  --fnec-glass-floating: color-mix(in srgb, var(--white) 90%, transparent);
  --fnec-glass-edge: color-mix(in srgb, var(--fnec-cream) 29%, transparent);
  --fnec-glass-highlight: color-mix(in srgb, var(--fnec-cream) 34%, transparent);
  --fnec-glass-glaze: linear-gradient(145deg, #fff7e61a, transparent 48%, #fff7e606);
  --fnec-glass-shadow: inset 0 1px 1px var(--fnec-glass-highlight), inset 0 -1px 1px #39060033, 0 2px 5px #3906001a, 0 18px 44px #3906003b;
}
[data-theme='dark'] :is(.brand-name span, .topbar-brand) { color: var(--muted); }
[data-theme='dark'] .access-intro { border-color: #dfd1b9; }
[data-theme='dark'] .access-intro .brand { color: var(--fnec-wine); }
[data-theme='dark'] .access-intro .brand-name span { color: #70544a; }
[data-theme='dark'] .access-intro .theme-toggle { color: #390600; border-color: #dfd1b9; }
[data-theme='dark'] .access-intro .intro-description { color: #70544a; }
@media (max-width: 800px) {
  .access { grid-template-columns: 1fr; }
  .access-intro { min-height: auto; gap: 28px; padding: 26px; border-right: 0; border-bottom: 1px solid var(--line); }
  .intro-title { font-size: clamp(2.2rem, 7vw, 3.7rem); }
  .intro-title br { display: none; }
  .intro-title { max-width: 16ch; }
  .event-logo { width: 170px; margin-bottom: 22px; }
  .intro-flow { display: none; }
  .intro-signature { margin-top: 0; }
  .access-main { padding: 32px 24px 48px; }
  .rail nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail { border-color: var(--line); }
  .rail .brand-name { font-size: 21px; }
  .dashboard-readiness-list { grid-template-columns: 1fr; gap: 15px; }
  .dashboard-readiness-row { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The final identity layer owns the material; earlier neutral defaults remain fallbacks. */
@media screen {
  #workspace {
    background:
      radial-gradient(ellipse at 7% 0%, #f0c5361a, transparent 48%),
      radial-gradient(ellipse at 100% 35%, #68750010, transparent 48%),
      radial-gradient(ellipse at 30% 100%, #ff8b000d, transparent 55%),
      var(--paper);
  }
  [data-theme='dark'] #workspace {
    background:
      radial-gradient(ellipse at 7% 0%, #68750021, transparent 48%),
      radial-gradient(ellipse at 100% 35%, #ff8b0012, transparent 48%),
      var(--paper);
  }
  #workspace :is(.topbar, .entity-panel, .conversation-layout, .funnel, .dashboard-panel, .dashboard-indicator),
  :root .dialog {
    background-color: var(--white);
    background-image: none;
    background-clip: padding-box;
    border-color: var(--line);
    box-shadow: var(--fnec-glass-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #workspace .topbar, :root .dialog { --fnec-material-tint: var(--fnec-glass-floating); }
  #workspace .report-metric {
    background-color: color-mix(in srgb, var(--white) 62%, transparent);
    background-image: var(--fnec-glass-glaze);
    border-color: var(--line);
    box-shadow: inset 0 1px 0 var(--fnec-glass-highlight);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #workspace .dashboard-indicator:hover { border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    #workspace :is(.topbar, .entity-panel, .conversation-layout, .funnel, .dashboard-panel, .dashboard-indicator),
    :root .dialog {
      background-color: var(--fnec-material-tint, var(--fnec-glass));
      background-image: var(--fnec-glass-glaze);
      border-color: var(--fnec-glass-edge);
      backdrop-filter: blur(var(--fnec-glass-blur)) saturate(var(--fnec-glass-saturation));
      -webkit-backdrop-filter: blur(var(--fnec-glass-blur)) saturate(var(--fnec-glass-saturation));
    }
    #workspace .rail[data-dock-ready] > .dock-glass {
      background-color: var(--fnec-glass-floating);
      background-image: var(--fnec-glass-glaze);
      border-color: var(--fnec-glass-edge);
      box-shadow: var(--fnec-glass-shadow);
      backdrop-filter: blur(var(--fnec-glass-blur)) saturate(var(--fnec-glass-saturation));
      -webkit-backdrop-filter: blur(var(--fnec-glass-blur)) saturate(var(--fnec-glass-saturation));
    }
    @media (max-width: 800px) {
      #workspace .rail[data-dock-ready] nav {
        background-color: var(--fnec-glass-floating);
        background-image: var(--fnec-glass-glaze);
        border-color: var(--fnec-glass-edge);
        box-shadow: var(--fnec-glass-shadow);
        backdrop-filter: blur(var(--fnec-glass-blur)) saturate(var(--fnec-glass-saturation));
        -webkit-backdrop-filter: blur(var(--fnec-glass-blur)) saturate(var(--fnec-glass-saturation));
      }
    }
  }
}
@media screen and (prefers-reduced-transparency: reduce), screen and (prefers-contrast: more) {
  #workspace :is(.topbar, .entity-panel, .conversation-layout, .funnel, .dashboard-panel, .dashboard-indicator, .report-metric),
  :root .dialog, #workspace .rail[data-dock-ready] > .dock-glass, #workspace .rail[data-dock-ready] nav {
    background-color: var(--white);
    background-image: none;
    border-color: var(--line);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #workspace .rail[data-dock-ready] nav button[data-view] .dock-tile { background-image: none; }
}
@media screen and (forced-colors: active) {
  #workspace { background: Canvas; }
  #workspace :is(.topbar, .entity-panel, .conversation-layout, .funnel, .dashboard-panel, .dashboard-indicator, .report-metric),
  :root .dialog, #workspace .rail[data-dock-ready] > .dock-glass, #workspace .rail[data-dock-ready] nav {
    background: Canvas;
    border-color: CanvasText;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #workspace .rail[data-dock-ready] nav button[data-view] .dock-tile,
  #workspace .rail[data-dock-ready] nav button[data-view][aria-current='page'] .dock-tile {
    color: ButtonText;
    background: ButtonFace;
    border-color: ButtonText;
    box-shadow: none;
  }
  #workspace .rail[data-dock-ready] nav button[data-view] .nav-icon { color: ButtonText; }
  #workspace .rail[data-dock-ready] nav button[aria-current='page']::before { background: Highlight; }
  #workspace .rail[data-dock-ready] nav button:focus-visible { outline-color: Highlight; }
}

@media print {
  :root { color-scheme: light; --ink: #390600; --paper: #fff; --white: #fff; --muted: #594338; --line: #bbb; --accent: #505b00; }
  body { background: #fff !important; }
  .rail, .topbar, .skip-link, .report-filters, .announcement, #license-validity, #workspace-error { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .page:not(#view-reports) { display: none !important; }
  #view-reports { display: block !important; }
  .entity-panel, .report-metric { box-shadow: none; break-inside: avoid; }
  .report-table-wrap { overflow: visible; }
  .report-table { font-size: 9pt; }
  .report-table th, .report-table td { padding: 6px; }
  .report-table thead { display: table-header-group; }
}

.report-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; padding: 0; margin: 20px 0; }
.report-metric dt { color: var(--muted); font-size: .86rem; }
.report-metric dd { margin: 8px 0 0; color: var(--accent); font-size: 2.15rem; line-height: 1; font-weight: 600; }
.report-delivery-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 28px; margin: 0 0 18px; font-size: .9rem; }
.report-delivery-summary > div { display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); padding-block: 9px; }
.report-delivery-summary dt { color: var(--muted); }
.report-delivery-summary dd { margin: 0; font-weight: 600; }
:is(.report-daily,.report-conversations,.report-messages) { margin-top: 18px; }
.report-message-table td:nth-child(5) { min-width: 220px; max-width: 580px; }
.report-actions [aria-disabled='true'] { opacity: .45; pointer-events: none; cursor: default; }
.person-avatar { position: relative; overflow: hidden; }
.person-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.person-avatar.has-profile-photo img { opacity: 1; }
.message-audio-status { display: block; margin-bottom: 5px; color: var(--muted); font-size: .76rem; font-weight: 600; }
@media (max-width: 650px) {
  .report-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-delivery-summary { grid-template-columns: 1fr; }
}

.report-ratings { margin-top: 18px; }
.rating-distribution { display: grid; gap: 12px; margin-block: 20px; }
.rating-distribution-row { display: grid; grid-template-columns: 58px minmax(60px,1fr) 110px; gap: 12px; align-items: center; font-size: .9rem; }
.rating-distribution-value { text-align: right; font-variant-numeric: tabular-nums; }
.rating-distribution-bar { width: 100%; height: 12px; border: 0; border-radius: 999px; overflow: hidden; background: var(--line); accent-color: var(--accent); }
.rating-distribution-bar::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
.rating-distribution-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.rating-distribution-bar[data-score='1'] { accent-color: #650d19; }
.rating-distribution-bar[data-score='2'] { accent-color: #ce601a; }
.rating-distribution-bar[data-score='3'] { accent-color: #c79a17; }
.rating-distribution-bar[data-score='4'] { accent-color: #667736; }
.rating-distribution-bar[data-score='5'] { accent-color: #3f5c35; }
.rating-distribution-bar[data-score='1']::-webkit-progress-value { background: #650d19; }
.rating-distribution-bar[data-score='2']::-webkit-progress-value { background: #ce601a; }
.rating-distribution-bar[data-score='3']::-webkit-progress-value { background: #c79a17; }
.rating-distribution-bar[data-score='4']::-webkit-progress-value { background: #667736; }
.rating-distribution-bar[data-score='5']::-webkit-progress-value { background: #3f5c35; }
@media (max-width: 480px) { .rating-distribution-row { grid-template-columns: 48px minmax(40px,1fr) 88px; gap: 8px; } .report-ratings .report-metric dd { font-size: 1.7rem; } }
