/* Acabamento visual. Não modifica a navegação, os dados ou os fluxos do CRM. */
@font-face {
  font-family: 'CRM Inter';
  src: url('fonts/InterVariable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

.crm-refined,
.login-body {
  --premium-ink: #162c44;
  --premium-muted: #62758b;
  --premium-line: #dfe7f1;
  --premium-blue: #176dba;
  --premium-shadow: 0 4px 7px -5px #193d681a, 0 12px 30px -18px #1a42642b;
  font-family: 'CRM Inter', Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.crm-refined,
.crm-refined[data-section="home"] {
  --ink: var(--premium-ink);
  --muted: var(--premium-muted);
  --line: var(--premium-line);
  --bg: #f3f6fb;
  background: radial-gradient(ellipse at 92% 0%, #dce9fb66 0, transparent 42%),
    linear-gradient(155deg, #f0f5fb 0%, #f8faff 60%, #f3f7fc 100%);
  color: var(--premium-ink);
}

/* As mesmas marcas e os mesmos itens, com mais contraste e profundidade. */
.crm-refined .sidebar {
  background: radial-gradient(ellipse at 100% 38%, #13446580 0, transparent 66%),
    linear-gradient(180deg, #0b304c 0%, #082842 55%, #071f36 100%);
  border-right: 1px solid #8fc9f024;
  box-shadow: 10px 0 36px -24px #061d41a8;
}
.crm-refined .brand {
  background: linear-gradient(180deg, #0b304c, #0b304c00);
  border-bottom-color: #d6ebff19;
}
.crm-refined .brand img { filter: drop-shadow(0 3px 8px #00000015); }
.crm-refined .nav-list { scrollbar-color: #78b9de55 transparent; scrollbar-width: thin; }
.crm-refined .nav-item {
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #c9dceb;
  font-size: 13.25px;
  font-weight: 500;
  letter-spacing: -.015em;
  transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.crm-refined .nav-icon {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #bfe5ff14;
  border-radius: 8px;
  background: #a8d6ff09;
  color: #a8c9df;
}
.crm-refined .nav-icon .crm-icon { width: 18px; height: 18px; stroke-width: 1.65; }
.crm-refined .nav-item.active {
  border-color: #d6efff;
  background: linear-gradient(110deg, #ffffff, #e3f3ff);
  box-shadow: inset 3px 0 #58bcef, 0 5px 18px #03142626;
  color: #125582;
  font-weight: 650;
}
.crm-refined .nav-item.active .nav-icon {
  border-color: #bcdcf2;
  background: linear-gradient(145deg, #e7f4ff, #d7ebfb);
  color: #176ba5;
}
.crm-refined .nav-divider { background: #b8d7ed1c; }
.crm-refined .sidebar-footer {
  border-top: 1px solid #b8d7ed1c;
  background: #03182a26;
  box-shadow: 0 -8px 28px -20px #00000045;
}
.crm-refined .sidebar-profile-link { border-radius: 10px; }
.crm-refined .avatar { box-shadow: 0 0 0 2px #a9daff29; }
.crm-refined .user-copy strong { color: #f2f8ff; font-weight: 650; }
.crm-refined .user-copy small,
.crm-refined .sidebar-actions a { color: #a9c5d8; }
.crm-refined .pwa-install-link {
  border: 1px solid #a9d4f333;
  border-radius: 9px;
  background: linear-gradient(120deg, #b3d8ff16, #b3d8ff08);
  color: #dfedfa;
  box-shadow: inset 0 1px 0 #ffffff09;
}
.crm-refined .mobile-header {
  background: linear-gradient(100deg, #0b304c, #0a2c48 65%, #0e3c59);
  border-bottom: 1px solid #83cffa47;
  box-shadow: 0 4px 18px -12px #082a4a80;
}
.crm-refined .menu-button {
  border-color: #afdaff3d;
  border-radius: 11px;
  background: #b9ddff09;
  box-shadow: inset 0 1px 0 #ffffff0a;
}
.crm-refined .mobile-header > a { color: #d7e8f6; font-weight: 500; }
.crm-refined .sidebar-overlay.show { background: #06182c80; backdrop-filter: blur(3px); }

/* Tipografia e superfícies comuns a todas as áreas. */
.crm-refined :is(.page-heading, .dashboard-heading) { border-bottom-color: #dbe4f0; }
.crm-refined :is(.page-heading, .dashboard-heading) h1 {
  color: #142d48;
  font-weight: 680;
  letter-spacing: -.045em;
}
.crm-refined :is(.page-heading, .dashboard-heading) p { color: #63778d; }
.crm-refined .eyebrow { color: #6285a3; font-weight: 700; letter-spacing: .14em; }
.crm-refined :is(.surface, .form-card, .profile-card, .integration-card, .empty-state) {
  border-color: var(--premium-line);
  background: linear-gradient(145deg, #ffffff, #fdfeff);
  box-shadow: var(--premium-shadow);
}
.crm-refined .section-heading { border-bottom-color: #e6edf6; }
.crm-refined .section-heading h2 { color: #193753; font-weight: 650; letter-spacing: -.025em; }
.crm-refined :is(.section-heading p, .section-heading > small) { color: #5e758e; }
.crm-refined :is(.heading-icon, .empty-icon, .integration-icon) {
  border: 1px solid #dcebf7;
  background: linear-gradient(145deg, #edf6ff, #e6f0fa);
  color: #2a75ae;
}
.crm-refined .button { letter-spacing: -.01em; }
.crm-refined .button:not(.secondary):not(.danger):not(.success) {
  border: 1px solid #1764a5;
  background: linear-gradient(125deg, #197cc8 0%, #156bb5 58%, #135d9d 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 #ffffff25, 0 4px 10px -5px #0c579b75;
}
.crm-refined .button.secondary {
  border-color: #ccdae9;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #28648e;
  box-shadow: 0 2px 5px -4px #153d6838;
}
.crm-refined :is(.text-button, .table-link, .return-link, .clear-filter) { text-underline-offset: 3px; }
.crm-refined :is(a, button, summary):focus-visible,
.login-body :is(a, button):focus-visible { outline-color: #269ddc; outline-width: 2px; outline-offset: 4px; }
.crm-refined :is(.client-filters, .marketing-filters, .filter-card, .daily-owner-filter, .dispatch-filter-panel) {
  border-color: var(--premium-line);
  background: linear-gradient(145deg, #ffffff, #f9fbff);
  box-shadow: 0 4px 14px -10px #19466a35;
}
.crm-refined label { color: #3e5872; }
.crm-refined :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  border-color: #d3dfed;
  background-color: #fcfdff;
  color: #233d58;
  box-shadow: inset 0 1px 2px #19385403;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.crm-refined :is(input, select, textarea):focus {
  border-color: #56a6dd;
  background-color: #fff;
  box-shadow: 0 0 0 3px #268bdc14;
}
.crm-refined :is(input, textarea)::placeholder { color: #8799ac; }
.crm-refined :is(input, select, textarea):disabled,
.crm-refined input[readonly] { background-color: #f0f4f9; color: #73869b; }
.crm-refined .workspace-tabs {
  border-color: #dce5f0;
  background: #eaf0f8;
  box-shadow: inset 0 1px 2px #16345505;
}
.crm-refined .workspace-tabs a.active {
  border-color: #dce7f4;
  background: linear-gradient(180deg, #fff, #f8fbff);
  color: #196bac;
  box-shadow: 0 2px 7px -3px #19466a38;
}

/* Resumos, tabelas e acompanhamento mantêm as cores dos seus estados. */
.crm-refined :is(.metric-card, .client-stats article, .client-stats > a, .daily-summary article, .dispatch-summary article, .deal-overview article, .action-stats > a) {
  border-color: var(--premium-line);
  background: linear-gradient(145deg, #fff, #fbfdff);
  box-shadow: var(--premium-shadow);
}
.crm-refined :is(.metric-card strong, .client-stats strong, .daily-summary strong, .dispatch-summary strong, .action-stats strong) {
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
}
.crm-refined .metric-icon { box-shadow: inset 0 1px 0 #ffffffbb, 0 2px 5px -3px #16345520; }
.crm-refined .client-stats-actionable > a.active { border-color: #9cc9e9; box-shadow: inset 0 2px #409fd9, var(--premium-shadow); }
.crm-refined :is(.table-surface, .client-table, .leads-workspace) thead { background: #f2f6fc; color: #536c86; }
.crm-refined :is(.table-surface, .client-table, .leads-workspace) th { border-color: #e0e9f4; font-weight: 650; }
.crm-refined td { border-top-color: #e8eef6; }
.crm-refined td > strong { color: #274663; }
.crm-refined td > small { color: #60768d; }
.crm-refined :is(.table-surface, .client-table) tbody tr:hover { background-color: #f1f7fd; }
.crm-refined .trend-column > i.current,
.crm-refined .mini-progress i { background: linear-gradient(90deg, #1e70b9, #389dd9); }
.crm-refined :is(.timeline, .timeline-card) { border-color: #e2eaf4; }
.crm-refined .attendance-board .pipeline-column {
  border-color: #dbe5f1;
  background: linear-gradient(180deg, #edf3fa, #f3f7fc);
  box-shadow: inset 0 1px 0 #ffffffad;
}
.crm-refined .attendance-board .pipeline-column > header { border-bottom-color: #dce6f1; }
.crm-refined .attendance-card,
.crm-refined .deal-card { border-color: #dce6f1; box-shadow: 0 3px 9px -6px #1b466b42; }
.crm-refined .attendance-board .pipeline-column.drop-target { border-color: #419ed7; box-shadow: inset 0 0 0 1px #419ed7; }
.crm-refined .calendar-toolbar { border-bottom-color: #e2eaf5; }
.crm-refined .calendar-day { border-color: #e6edf6; }
.crm-refined :is(.modal-card, .return-panel, .contact-panel) { border: 1px solid #dae6f2; box-shadow: 0 25px 80px #0b264640; }
.crm-refined :is(.modal-backdrop, .return-backdrop) { background: #061b367a; backdrop-filter: blur(5px); }
.crm-refined :is(.q-editor, .q-history, .q-archive, .mt-editor, .mt-preview) { border-color: var(--premium-line); box-shadow: var(--premium-shadow); }
.crm-refined .q-source { background: linear-gradient(145deg, #f7faff, #f0f6fc); }
/* A arte do orçamento mantém o seu próprio modelo e a tipografia anterior. */
.crm-refined .q-preview { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* Início: a mesma composição, com luz, textura e hierarquia mais definidas. */
.crm-refined .home-app { --home-ink: #172f48; --home-muted: #5f748b; --home-line: #dfe8f3; }
.crm-refined .home-location > span { color: #294f71; font-weight: 650; }
.crm-refined .home-location .crm-icon { color: #4f87b4; }
.crm-refined .home-topline time { color: #5f758e; }
.crm-refined .home-welcome {
  border-color: #2a587c;
  background: radial-gradient(ellipse at 100% 105%, #0788ba40 0%, transparent 60%),
    linear-gradient(118deg, #092c4b 0%, #0a3658 54%, #0b4a6b 100%);
  box-shadow: inset 0 1px 0 #d8efff19, 0 12px 35px -18px #0d416890;
}
.crm-refined .home-welcome::before {
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background-image: linear-gradient(#91d3ff08 1px, transparent 1px), linear-gradient(90deg, #91d3ff08 1px, transparent 1px);
  background-size: 42px 42px;
  box-shadow: none;
  mask-image: linear-gradient(110deg, transparent 20%, #000 100%);
}
.crm-refined .home-welcome::after {
  inset: auto -8% -175px auto;
  width: 580px;
  height: 360px;
  border: 1px solid #8fd5ff1c;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0, #50c8fa12, transparent 65%);
  box-shadow: 0 0 0 46px #86caff04, 0 0 0 92px #86caff03;
  transform: rotate(-20deg);
}
.crm-refined .home-kicker { color: #9bc9e7; font-weight: 650; letter-spacing: .19em; }
.crm-refined .home-welcome h1 { color: #fff; font-weight: 680; letter-spacing: -.045em; }
.crm-refined .home-welcome p { color: #c2d8ea; }
.crm-refined .home-primary {
  border-color: #e4f2ff;
  background: linear-gradient(150deg, #fff, #edf6ff);
  color: #12436a;
  box-shadow: inset 0 1px 0 #fff, 0 6px 16px -8px #001b3fb3;
}
.crm-refined .home-secondary { color: #cfe7fa; }
.crm-refined .home-focus {
  border-color: #b6ddfa33;
  background: linear-gradient(130deg, #c0e2ff0f, #8bc4ff08);
  box-shadow: inset 0 1px 0 #d9efff0c, 0 5px 18px -10px #00172d4d;
}
.crm-refined .home-focus-icon { border: 1px solid #aedaff21; background: #8bc4ff14; color: #b7e5ff; }
.crm-refined .home-focus-label { color: #a5cce4; }
.crm-refined .home-focus strong { color: #f0f8ff; font-weight: 600; }
.crm-refined .home-focus small { color: #c0d7e8; }
.crm-refined .home-metric,
.crm-refined .home-shortcut,
.crm-refined .home-agenda {
  border-color: var(--home-line);
  background: linear-gradient(140deg, #fff, #fbfdff);
  box-shadow: var(--premium-shadow);
}
.crm-refined .home-metric { position: relative; overflow: hidden; }
.crm-refined .home-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 17px;
  right: 17px;
  height: 2px;
  background: linear-gradient(90deg, #398dcc66, #6dbbe31a 65%, transparent);
  pointer-events: none;
}
.crm-refined .home-metric.has-overdue::before { background: linear-gradient(90deg, #c9955073, #e1bf7f26 65%, transparent); }
.crm-refined .home-metric-icon { border: 1px solid #d9e9f9; background: linear-gradient(145deg, #eff7ff, #e3eefb); color: #2d77af; }
.crm-refined .home-metric.has-overdue .home-metric-icon { border-color: #f1e1c9; background: #fff6e9; color: #a36b25; }
.crm-refined .home-metric strong { font-weight: 680; letter-spacing: -.045em; }
.crm-refined .home-metric.has-overdue strong { color: #a5722c; }
.crm-refined .home-shortcut { border-radius: 13px; }
.crm-refined .home-shortcut-icon { width: 34px; height: 34px; border: 1px solid #dfebf7; border-radius: 10px; background: linear-gradient(145deg, #f1f8ff, #e9f2fc); color: #3177ac; }
.crm-refined .home-shortcut-icon .crm-icon { width: 20px; height: 20px; }
.crm-refined .home-shortcut strong { color: #254560; font-weight: 650; letter-spacing: -.02em; }
.crm-refined .home-shortcut small { color: #5e748c; }
.crm-refined .home-shortcut > span:last-child { color: #76a0bd; }
.crm-refined .home-agenda h2 { color: #1d3c58; font-weight: 650; letter-spacing: -.035em; }
.crm-refined .home-section-kicker { color: #58728e; }
.crm-refined .home-event { border-top-color: #e8eff7; }
.crm-refined .home-event time { color: #26618f; }
.crm-refined .home-event > div { border-left-color: #deebf8; }
.crm-refined .home-event > div > strong { color: #2c4b68; }
.crm-refined .home-event-seller,
.crm-refined .home-event time span { color: #60768d; }
.crm-refined .home-event-status { border-radius: 7px; border-color: #d8e7f5; background: #edf5fd; color: #3f7099; }
.crm-refined .home-event-status.is-late { border-color: #f0dfc7; background: #fff7ec; color: #99692f; }
.crm-refined .home-campaign { border-color: #354169; background: radial-gradient(ellipse at 100% 0, #45328535, transparent 60%), linear-gradient(135deg, #142c48, #101b32); box-shadow: var(--premium-shadow); }
.crm-refined .home-campaign-button { background: linear-gradient(145deg, #fff, #eef5ff); color: #203f62; border-color: #dbeafa; }

/* Login: mesmas marcas, campos e acesso único, com o acabamento do sistema. */
.login-body {
  background: radial-gradient(ellipse at 14% 5%, #14619538, transparent 48%),
    radial-gradient(ellipse at 91% 95%, #167ab432, transparent 48%),
    linear-gradient(135deg, #081d34, #0b304c 55%, #0a2842);
}
.login-body .login-shell { border-color: #a5c9e344; border-radius: 20px; box-shadow: 0 35px 80px -25px #000d2480, inset 0 1px 0 #ffffff25; }
.login-body .login-branding { background: radial-gradient(ellipse at 80% 0, #24628930, transparent 70%), #0b304c; border-bottom-color: #b5d9ff2e; }
.login-body .login-panel { background: linear-gradient(145deg, #fff, #f8fbff); }
.login-body .login-form-heading h1 { color: #1b3855; font-weight: 650; letter-spacing: -.035em; }
.login-body .login-card input { border-color: #d0dfed; background: #fff; box-shadow: inset 0 1px 3px #17436804; }
.login-body .login-card input:focus { border-color: #55a3db; box-shadow: 0 0 0 3px #2b8cd41a; }
.login-body .login-card .login-submit { border-color: #1765a5; background: linear-gradient(125deg, #207fc8, #1566ac); box-shadow: inset 0 1px 0 #ffffff2b, 0 6px 16px -8px #11518599; }
.login-body .login-help { color: #71849a; }

@media (hover: hover) and (pointer: fine) {
  .crm-refined .nav-item:hover:not(.active) { border-color: #b4dcff1c; background: #afd6ff0e; color: #fff; }
  .crm-refined .nav-item:hover .nav-icon { border-color: #c2e6ff35; color: #e3f3ff; }
  .crm-refined .nav-item.active:hover .nav-icon { color: #176ba5; }
  .crm-refined .button:not(.secondary):not(.danger):not(.success):hover { border-color: #14568e; background: linear-gradient(125deg, #1873bb, #115a98); box-shadow: inset 0 1px 0 #ffffff25, 0 5px 13px -6px #0c579b80; }
  .crm-refined .button.secondary:hover { background: #edf6ff; border-color: #b9d6eb; }
  .crm-refined :is(.home-metric, .home-shortcut):hover { border-color: #b4d1ea; background: #fff; box-shadow: 0 8px 22px -13px #1b588659; }
  .crm-refined .home-event:hover { background: #f3f8fe; }
  .crm-refined :is(.attendance-card, .deal-card):hover { border-color: #b7d3e9; box-shadow: 0 6px 17px -10px #21578659; }
}

@media (max-width: 900px) {
  .crm-refined .sidebar { box-shadow: none; }
  .crm-refined .sidebar.open { box-shadow: 16px 0 45px -25px #041931b3; }
  .crm-refined .nav-item { font-size: 14px; }
}
@media (max-width: 640px) {
  .crm-refined .home-shortcut-icon { width: 29px; height: 30px; border-radius: 9px; }
  .crm-refined .home-shortcut-icon .crm-icon { width: 18px; height: 18px; }
  .crm-refined .home-shortcut { gap: 8px; }
  .crm-refined .home-shortcut small { font-size: 9px; }
  .crm-refined .home-metric::before { left: 11px; right: 11px; }
  .crm-refined .home-metric > div > span { min-height: 28px; }
  .crm-refined .home-welcome::after { right: -210px; bottom: -140px; width: 480px; height: 340px; }
  .crm-refined .home-topline { letter-spacing: -.02em; }
}
@media (prefers-reduced-motion: reduce) {
  .crm-refined *, .login-body * { transition-duration: 0s !important; animation-duration: 0s !important; }
}
@media print {
  .crm-refined { background: #fff; }
  .crm-refined :is(.surface, .home-welcome, .home-metric, .home-shortcut, .home-agenda) { box-shadow: none; }
}
