/* Identidade compartilhada entre as aplicações do portal CQData. */
:root {
  --cq-shell-bg: #0b0d11;
  --cq-shell-panel: #111318;
  --cq-shell-panel-2: #151922;
  --cq-shell-line: #242a35;
  --cq-shell-text: #eef2f6;
  --cq-shell-muted: #8b95a5;
  --cq-shell-accent: #00e5a0;
  --cq-shell-radius: 12px;
}

.cq-shell-sidebar {
  background: rgba(11, 13, 17, .98);
  border-color: var(--cq-shell-line);
}

.cq-shell-topbar {
  border-color: var(--cq-shell-line);
}

.cq-shell-profile-trigger {
  border: 1px solid var(--cq-shell-line);
  border-radius: 13px;
  background: var(--cq-shell-panel);
}

.admin-owner-panel {
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(0, 229, 160, .22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 96% 2%, rgba(0, 229, 160, .12), transparent 34%),
    linear-gradient(145deg, var(--panel), var(--panel-3));
}

.admin-owner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.admin-owner-head h2 { margin: 6px 0; font-size: clamp(24px, 3vw, 34px); }
.admin-owner-head p { max-width: 720px; color: var(--muted); }

.admin-owner-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.admin-owner-metric {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}

.admin-owner-metric span,
.admin-owner-metric strong,
.admin-owner-metric small { display: block; }
.admin-owner-metric span { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.admin-owner-metric strong { margin: 7px 0 4px; font-size: 28px; }
.admin-owner-metric small { color: var(--muted); }
.admin-owner-metric.attention strong { color: var(--green); }
.owner-overview-card { margin-top: 18px; }
.owner-overview-solution { border-bottom: 1px solid var(--line); }
.owner-overview-solution:last-child { border-bottom: 0; }
.owner-overview-solution summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 4px; cursor: pointer; list-style: none; }
.owner-overview-solution summary::-webkit-details-marker { display: none; }
.owner-overview-solution summary strong, .owner-overview-solution summary span { display: block; }
.owner-overview-solution summary span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.owner-overview-solution summary i { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; color: var(--green); font-style: normal; font-size: 18px; transition: transform .18s ease; }
.owner-overview-solution[open] summary i { transform: rotate(45deg); }
.owner-overview-clients { display: grid; gap: 7px; padding: 0 4px 14px; }
.owner-overview-client { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border-radius: 10px; background: var(--panel-3); }
.owner-overview-client strong, .owner-overview-client span { display: block; }
.owner-overview-client span, .owner-overview-client small { color: var(--muted); font-size: 10px; }
.admin-owner-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.admin-owner-section-head h2 { margin: 5px 0; font-size: clamp(26px, 4vw, 38px); }
.admin-owner-section-head p { margin: 0; color: var(--muted); }

.admin-owner-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.owner-solution-card { display: grid; gap: 15px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-3); }
.owner-solution-card-head, .owner-solution-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.owner-solution-card h3 { margin: 5px 0 7px; font-size: 20px; }
.owner-solution-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.owner-solution-card .solution-audience strong { color: var(--text); }
.owner-solution-features { display: flex; flex-wrap: wrap; gap: 7px; }
.owner-solution-features span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; }
.owner-solution-card-foot { padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.admin-owner-product {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-3);
}
.admin-owner-product.is-selected {
  border-color: rgba(0, 229, 160, .42);
  background: rgba(0, 229, 160, .055);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 160, .05);
}
.admin-owner-product-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.admin-owner-product-actions .mini-btn { white-space: nowrap; }
.admin-owner-product-actions .mini-btn.is-primary { border-color: rgba(0, 229, 160, .3); color: var(--green); }

.admin-owner-product-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 20px;
}

.admin-owner-product-copy span,
.admin-owner-product-copy strong,
.admin-owner-product-copy small { display: block; }
.admin-owner-product-copy span { color: var(--muted); font-size: 11px; }
.admin-owner-product-copy strong { margin: 2px 0; font-size: 14px; }
.admin-owner-product-copy small { color: var(--muted); font-size: 11px; }
.admin-owner-selected {
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.admin-owner-selected-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.admin-owner-selected-head h3 { margin: 5px 0; font-size: 22px; }
.admin-owner-selected-head p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; }
.admin-owner-project-list { display: grid; gap: 8px; margin-top: 15px; }
.owner-project-row {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1fr) minmax(140px, auto) minmax(250px, auto);
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-3);
}
.owner-project-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; }
.owner-project-copy { min-width: 0; }
.owner-project-copy strong, .owner-project-copy span, .owner-project-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-project-copy strong { font-size: 14px; }
.owner-project-copy span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.owner-project-copy small { margin-top: 5px; color: var(--muted-2); font-size: 11px; }
.owner-project-meta { display: grid; justify-items: start; gap: 5px; }
.owner-project-meta small { color: var(--muted); font-size: 10px; }
.owner-project-actions { display: grid; gap: 8px; }
.owner-project-action-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.owner-project-action-row .btn { min-height: 38px; padding-inline: 11px; white-space: nowrap; }
.owner-project-action-row > :last-child:nth-child(3) { grid-column: 1 / -1; }
.owner-resource-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
  width: 100%;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 184, 77, .28);
  border-radius: 10px;
  background: rgba(255, 184, 77, .07);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.owner-resource-toggle > span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.owner-resource-toggle > strong { grid-row: 1 / span 2; grid-column: 2; color: #ffc66d; font-size: 11px; }
.owner-resource-toggle > small { color: var(--muted-2); font-size: 10px; }
.owner-resource-toggle.is-granted { border-color: rgba(0, 229, 160, .25); background: rgba(0, 229, 160, .055); }
.owner-resource-toggle.is-granted > strong { color: var(--green); }
.owner-resource-toggle:hover { border-color: var(--muted); }
.owner-project-empty { display: grid; justify-items: start; gap: 8px; padding: 22px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); }
.owner-project-empty strong { color: var(--text); }
.owner-product-preview-modal { width: min(820px, calc(100vw - 30px)); }
.owner-preview-hero { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 16px; align-items: start; padding: 8px 0 20px; }
.owner-preview-icon { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid rgba(0,229,160,.25); border-radius: 17px; background: var(--green-soft); color: var(--green); font-size: 26px; }
.owner-preview-hero h3 { margin: 5px 0 7px; font-size: clamp(24px, 3vw, 34px); }
.owner-preview-hero p { margin: 0; color: var(--muted); line-height: 1.55; }
.owner-preview-proof { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 4px 0 18px; }
.owner-preview-proof > div { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-3); }
.owner-preview-proof strong, .owner-preview-proof span { display: block; }
.owner-preview-proof strong { font-size: 19px; }
.owner-preview-proof span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.owner-preview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.owner-preview-grid section { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.owner-preview-grid p, .owner-preview-grid li { color: var(--muted); font-size: 13px; line-height: 1.55; }
.owner-preview-grid ul { margin: 9px 0 0; padding-left: 18px; }
.solution-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.solution-audience { display: block; margin-top: 10px; color: var(--muted-2); font-size: 11px; line-height: 1.45; }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }

/* Seletor de contexto compartilhado entre Central de Atendimento e Gestão de O.S. */
.project-switcher-modal {
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.context-switcher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line, var(--cq-shell-line));
}
.context-switcher-head h3 { margin: 3px 0 0; font-size: 18px; }
.context-switcher-caption { color: var(--muted, var(--cq-shell-muted)); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.context-switcher-close {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line, var(--cq-shell-line));
  border-radius: 10px;
  background: transparent;
  color: var(--muted, var(--cq-shell-muted));
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}
.context-switcher-close:hover { border-color: var(--green, var(--cq-shell-green)); color: var(--text, var(--cq-shell-text)); }
.context-switcher-body { padding: 18px 20px 20px; }
.context-switcher-description { margin: 0; color: var(--muted, var(--cq-shell-muted)); font-size: 13px; line-height: 1.55; }
.project-switcher-modal > .context-switcher-description { padding: 18px 20px 0; }
.project-switcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.project-choice-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line, var(--cq-shell-line));
  border-radius: 17px;
  background: rgba(255, 255, 255, .025);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}
.project-choice-card.is-current {
  border-color: rgba(0, 229, 160, .38);
  background: rgba(0, 229, 160, .055);
}
.project-choice-card.is-disabled { opacity: .7; }
.project-choice-icon {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line, var(--cq-shell-line));
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--green, var(--cq-shell-accent));
  background: var(--panel, var(--cq-shell-panel));
  font-size: 21px;
  font-weight: 800;
}
.project-choice-copy { min-width: 0; }
.project-choice-copy span,
.project-choice-copy p { color: var(--muted, var(--cq-shell-muted)); }
.project-choice-copy span { font-size: 12px; }
.project-choice-copy h4 {
  margin: 4px 0;
  color: var(--text, var(--cq-shell-text));
  font-size: 17px;
  line-height: 1.3;
}
.project-choice-copy p { margin: 0; font-size: 13px; }
.project-choice-card .btn {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 42px;
  justify-content: center;
}
.orders-shell .project-choice-card .btn-secondary {
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
}
.orders-shell .project-choice-card .btn-secondary:hover {
  border-color: var(--blue);
  background: rgba(0, 229, 160, .08);
}
.orders-shell .project-choice-card .btn:disabled {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text3);
  cursor: not-allowed;
}
.project-choice-card .project-current-action:disabled {
  border-color: #15966f;
  background: #15966f;
  color: #fff;
  opacity: 1;
  cursor: default;
}

/* Página inicial compartilhada pelos produtos CQData. */
.portal-home-page.active {
  display: grid;
  min-height: calc(100vh - 170px);
  align-items: stretch;
}
.portal-home-page .portal-home-hero {
  display: grid;
  grid-template-rows: auto auto auto auto auto auto;
  gap: clamp(18px, 3vh, 30px);
  width: 100%;
  min-height: auto;
  margin: 0;
  padding: clamp(26px, 4.4vw, 52px);
  border: 1px solid var(--line, var(--border, var(--cq-shell-line)));
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 10%, rgba(0, 184, 134, .13), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 55%),
    var(--panel, var(--bg2, var(--cq-shell-panel)));
  overflow: hidden;
}
.portal-home-date {
  color: var(--muted, var(--text2, var(--cq-shell-muted)));
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.portal-home-copy { align-self: start; max-width: 760px; }
.portal-home-copy h2 {
  margin: 0;
  color: var(--text, var(--cq-shell-text));
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.02;
  letter-spacing: -.05em;
}
.portal-home-copy p {
  margin: 13px 0 0;
  color: var(--muted, var(--text2, var(--cq-shell-muted)));
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.5;
}
.portal-home-copy p strong { color: var(--text, var(--cq-shell-text)); }
.portal-home-actions-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
  max-width: 1120px;
}
.portal-home-actions-heading strong {
  color: var(--text, var(--cq-shell-text));
  font-size: 13px;
  letter-spacing: .02em;
}
.portal-home-actions-heading span {
  color: var(--muted, var(--text2, var(--cq-shell-muted)));
  font-size: 12px;
}
.portal-home-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-self: start;
  width: min(1120px, 100%);
}
.portal-home-actions button {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 5px 15px;
  align-content: center;
  align-items: center;
  min-height: 104px;
  padding: 17px 42px 17px 16px;
  border: 1px solid var(--line, var(--border, var(--cq-shell-line)));
  border-radius: 16px;
  background: var(--panel-2, var(--bg3, var(--cq-shell-panel-2)));
  color: var(--text, var(--cq-shell-text));
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.portal-home-actions button::after {
  content: "→";
  position: absolute;
  right: 15px;
  top: 50%;
  color: var(--muted, var(--text2, var(--cq-shell-muted)));
  font-size: 20px;
  transform: translateY(-50%);
  transition: transform .18s ease;
}
.portal-home-actions button:hover,
.portal-home-actions button:focus-visible {
  border-color: rgba(0, 184, 134, .56);
  background: rgba(0, 184, 134, .09);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(23, 32, 42, .08);
}
.portal-home-actions button:hover::after,
.portal-home-actions button:focus-visible::after { transform: translate(3px, -50%); }
.portal-home-actions button > span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(0, 184, 134, .11);
  color: var(--green-2, var(--blue, var(--cq-shell-accent)));
  font-size: 21px;
  font-weight: 800;
}
.portal-home-actions strong { font-size: clamp(14px, 1.3vw, 17px); line-height: 1.3; }
.portal-home-actions small {
  color: var(--muted, var(--text2, var(--cq-shell-muted)));
  font-size: 12px;
  line-height: 1.45;
}
.portal-home-actions button.is-primary {
  border-color: #118563;
  background: #147b5f;
  color: #fff;
}
.portal-home-actions button.is-primary > span { background: rgba(255, 255, 255, .16); color: #fff; }
.portal-home-actions button.is-primary small,
.portal-home-actions button.is-primary::after { color: rgba(255, 255, 255, .78); }
.portal-home-actions button.is-primary:hover,
.portal-home-actions button.is-primary:focus-visible { border-color: #0d7054; background: #106f55; }

@media (max-width: 1180px) {
  .portal-home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .portal-home-page.active { min-height: auto; }
  .portal-home-page .portal-home-hero {
    grid-template-rows: auto auto auto auto;
    gap: 20px;
    min-height: auto;
    padding: 24px 18px;
    border-radius: 17px;
  }
  .portal-home-actions-heading { display: block; }
  .portal-home-actions-heading span { display: block; margin-top: 3px; }
  .portal-home-actions { grid-template-columns: 1fr; gap: 10px; }
  .portal-home-actions button { min-height: 82px; padding: 14px 44px 14px 14px; }
}
@media (max-width: 680px) {
  .project-switcher-modal {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
  }
  .project-switcher-grid { grid-template-columns: 1fr; }
  .context-switcher-head { padding: 14px; }
  .context-switcher-body { padding: 14px; }
  .project-switcher-modal > .context-switcher-description { padding: 14px 14px 0; }
}
body.admin-mode:not(.owner-mode) .owner-only { display: none !important; }
.owner-console-only { display: none !important; }
body.admin-mode.owner-console-mode .nav-btn.owner-console-only { display: flex !important; }
body.admin-mode:not(.owner-console-mode) .nav-btn.owner-console-only { display: none !important; }
body.admin-mode.owner-console-mode .operation-only { display: none !important; }
body.admin-mode.owner-operation-mode .nav-btn.operation-only,
body.admin-mode:not(.owner-mode) .nav-btn.operation-only { display: flex !important; }
body.admin-mode.owner-operation-mode .topbar-admin-project { display: none !important; }
body.owner-operation-mode #admin-owner-panel { display: none !important; }
body.owner-console-mode .topbar-actions { display: none !important; }
body.owner-console-mode .topbar-heading { max-width: 900px; }
body.owner-console-mode #page-admin { max-width: 1440px; }
body.owner-console-mode .admin-owner-panel { margin-bottom: 0; }
.admin-operation-overview { display: block; }
.owner-access-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 18px; border: 1px solid rgba(0,229,160,.2); border-radius: 14px; background: rgba(0,229,160,.045); }
.owner-access-workspace-head h2 { margin: 5px 0; font-size: 24px; }
.owner-access-workspace-head p { margin: 0; color: var(--muted); }
.owner-access-project-field { display: grid; gap: 6px; min-width: min(420px, 44vw); color: var(--muted); font-size: 11px; font-weight: 700; }
.owner-access-project-field select { width: 100%; min-height: 42px; padding: 0 38px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-3, #0f1218); color: var(--text); color-scheme: dark; font: inherit; }
html[data-theme="light"] .owner-access-project-field select { background: #f7f9fb; color-scheme: light; }
.owner-access-overview { width: 100%; min-width: 0; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 0 0 16px; }
.owner-access-overview > * { min-width: 0; }
#admin-section-access { min-width: 0; overflow: visible; }
.owner-access-overview .admin-owner-metric:last-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.owner-access-project-launch { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-bottom: 16px; }
.owner-access-project-launch > div { min-width: 0; }
.owner-access-project-launch strong, .owner-access-project-launch small { display: block; }
.owner-access-project-launch strong { margin: 5px 0; font-size: 16px; }
.owner-access-project-launch small { max-width: 760px; color: var(--muted); line-height: 1.5; }
.owner-access-projects-modal { width: min(760px, calc(100vw - 28px)); }
.owner-access-projects-modal .owner-access-project-grid { max-height: min(520px, 58vh); margin-top: 16px; overflow: auto; }
.owner-access-project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.owner-access-project-option { display: grid; gap: 3px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-3); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.owner-access-project-option:hover, .owner-access-project-option.is-selected { border-color: rgba(0, 229, 160, .42); background: rgba(0, 229, 160, .055); }
.owner-access-project-option span { color: var(--green); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.owner-access-project-option strong { font-size: 14px; }
.owner-access-project-option small { color: var(--muted); font-size: 11px; }
.access-user-mode-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 14px 0; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-3); }
.access-user-mode-tabs button { min-height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.access-user-mode-tabs button.active { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.owner-access-empty { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 16px; padding: 22px; }
.owner-access-empty > div { min-width: 0; flex: 1; }
.owner-access-empty strong, .owner-access-empty small { display: block; }
.owner-access-empty small { margin-top: 4px; color: var(--muted); line-height: 1.5; }
.owner-access-empty-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid rgba(0, 229, 160, .25); border-radius: 11px; background: var(--green-soft); color: var(--green); font-size: 20px; }
html[data-theme="light"] .cq-shell-profile-trigger { border-color: var(--line); background: var(--panel); color: var(--text); }
html[data-theme="light"] .cq-shell-profile-trigger:hover { background: var(--panel-2); }
.access-management-modal { width: min(720px, calc(100vw - 28px)); }
.access-management-identity { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 4px 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-3); }
.access-management-identity > span:first-child { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(0,229,160,.28); border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; }
.access-management-identity strong, .access-management-identity small { display: block; }
.access-management-identity small { margin-top: 3px; color: var(--muted); }
.access-management-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.access-management-form .full { grid-column: 1 / -1; }
.access-management-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.access-management-history { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.access-history-list { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; }
.access-history-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line-soft); }
.access-history-item:last-child { border-bottom: 0; }
.access-history-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.access-history-item strong, .access-history-item small { display: block; }
.access-history-item small, .access-history-item time { color: var(--muted); font-size: 11px; }
.access-history-item p { margin: 5px 0 0; color: var(--text); font-size: 12px; }

@media (max-width: 680px) {
  .login-proof { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .proof-card { min-width: 0; }
  .proof-card > span { display: none !important; }
  .proof-card > b { margin-top: 7px !important; font-size: 10px; }
  .login-access-context { padding: 10px 11px; }
  .login-how-we-work { font-size: 10px; }
}

@media (max-width: 370px) {
  .login-proof { grid-template-columns: 1fr !important; }
  .proof-card > span { display: block !important; }
}

html[data-theme="light"] .cq-shell-sidebar,
body.light-theme .cq-shell-sidebar { background: rgba(255, 255, 255, .98); }
html[data-theme="light"] .admin-owner-panel {
  background: radial-gradient(circle at 96% 2%, rgba(0, 181, 126, .09), transparent 34%), #fff;
}

@media (max-width: 900px) {
  .admin-owner-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-owner-products { grid-template-columns: 1fr; }
  .owner-project-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .owner-project-meta { grid-column: 2; }
  .owner-project-actions { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 620px) {
  .owner-access-project-launch { grid-template-columns: 1fr; }
  .owner-access-project-launch .btn { width: 100%; }
  .owner-access-empty { grid-template-columns: 42px minmax(0, 1fr); align-items: flex-start; }
  .owner-access-empty .btn { width: 100%; }
  .owner-access-empty > .btn { grid-column: 1 / -1; }
  .access-management-form { grid-template-columns: 1fr; }
  .access-history-item { grid-template-columns: 10px minmax(0, 1fr); }
  .access-history-item time { grid-column: 2; }
}

@media (max-width: 640px) {
  .admin-owner-head { display: grid; }
  .admin-owner-head .btn { width: 100%; }
  .admin-owner-metrics { grid-template-columns: 1fr 1fr; }
  .admin-owner-product { grid-template-columns: 38px minmax(0, 1fr); }
  .admin-owner-product-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .admin-owner-product .mini-btn { width: 100%; }
  .admin-owner-selected-head { display: grid; align-items: start; }
  .admin-owner-selected-head .btn { width: 100%; }
  .owner-project-row { grid-template-columns: 38px minmax(0,1fr); }
  .owner-project-meta { grid-column: 2; }
  .owner-project-actions { grid-column: 1 / -1; grid-row: auto; width: 100%; }
  .owner-project-action-row { grid-template-columns: 1fr; }
  .owner-preview-proof, .owner-preview-grid { grid-template-columns: 1fr; }
  .solution-card-actions { grid-template-columns: 1fr; }
  .owner-access-workspace-head { display: grid; }
  .owner-access-workspace-head .btn { width: 100%; }
  .owner-access-project-field { min-width: 0; width: 100%; }
  .admin-owner-section-head { display: grid; align-items: start; }
  .admin-owner-section-head .btn { width: 100%; }
  .owner-access-overview { grid-template-columns: 1fr; }
  .owner-access-project-grid { grid-template-columns: 1fr; }
  .owner-access-project-launch, .owner-solution-card-foot, .owner-overview-client { align-items: stretch; flex-direction: column; }
  .owner-access-project-launch .btn, .owner-solution-card-foot .btn { width: 100%; }
}

/* Shell da Gestão de Ordens de Serviço no mesmo padrão da Central. */
.orders-shell {
  --sw: 250px;
  --cq-line: var(--cq-shell-line);
  --cq-panel: var(--cq-shell-panel);
  --cq-panel-2: var(--cq-shell-panel-2);
}

.orders-shell .cq-shell-sidebar {
  width: var(--sw);
  min-height: 100vh;
  padding: 16px 12px;
  border-right: 1px solid var(--cq-shell-line);
  border-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.orders-shell .cq-shell-sidebar-header {
  min-height: 62px;
  padding: 4px 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.orders-shell .sidebar-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid rgba(0, 229, 160, .25);
  border-radius: 10px;
  background: rgba(0, 229, 160, .08);
  color: var(--cq-shell-text);
  font-size: 16px;
  letter-spacing: -.08em;
}

.orders-shell .sidebar-brand-mark span,
.orders-shell .brand-name span { color: var(--cq-shell-accent); }
.orders-shell .sidebar-identity { display: grid; min-width: 0; gap: 2px; }
.orders-shell .brand-name { color: var(--cq-shell-text); font-size: 16px; font-weight: 800; letter-spacing: -.04em; }
.orders-shell .sidebar-product { overflow: hidden; color: var(--cq-shell-muted); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.orders-shell .sidebar-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  flex: 0 0 30px;
  border: 1px solid var(--cq-shell-line);
  border-radius: 7px;
  background: var(--cq-shell-panel-2);
  color: var(--cq-shell-muted);
}
.orders-shell .sidebar-menu-title {
  padding: 7px 10px 5px;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.orders-shell .sidebar-nav { flex: 1; padding: 6px 0 12px; display: flex; flex-direction: column; gap: 3px; }
.orders-shell .sidebar-nav .nav-separator { padding: 14px 10px 4px; color: #5f6979; font-size: 9px; letter-spacing: .08em; }
.orders-shell .sidebar-nav .nav-btn {
  position: relative;
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  color: #8f99aa;
  font-size: 13px;
  font-weight: 650;
}
.orders-shell .sidebar-nav .nav-btn:hover { border-color: var(--cq-shell-line); background: rgba(255,255,255,.025); color: var(--cq-shell-text); }
.orders-shell .sidebar-nav .nav-btn.active { border-color: transparent; background: rgba(255,255,255,.045); color: var(--cq-shell-text); }
.orders-shell .sidebar-nav .nav-btn.active::before {
  content: "";
  position: absolute;
  left: -12px;
  width: 3px;
  height: 24px;
  border-radius: 0 3px 3px 0;
  background: var(--cq-shell-accent);
}
.orders-shell .sidebar-nav .nav-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 16px;
}
.orders-shell .sidebar-nav .nav-btn.active .nav-icon { color: var(--cq-shell-accent); }
.orders-shell .sidebar-nav .nav-text { display: inline; min-width: 0; }
.orders-shell .sidebar-footer { padding: 12px 0 2px; border-top: 1px solid var(--cq-shell-line); }
.orders-shell .sidebar-contact {
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cq-shell-muted);
}
.orders-shell .sidebar-contact:hover { border-color: var(--cq-shell-line); background: var(--cq-shell-panel-2); color: var(--cq-shell-text); }
.orders-shell .sidebar-contact-icon { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; color: var(--cq-shell-accent); }
.orders-shell .sidebar-contact-copy { display: grid; gap: 2px; }
.orders-shell .sidebar-contact-copy strong { color: inherit; font-size: 12px; }
.orders-shell .sidebar-contact-copy small { color: var(--cq-shell-muted); font-size: 10px; }

.orders-shell .main { margin-left: var(--sw); max-width: calc(100vw - var(--sw)); padding: 0 28px 34px; }
.orders-shell .cq-shell-topbar {
  position: relative;
  min-height: 148px;
  margin: 0 0 22px;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--cq-shell-line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.orders-shell .cq-shell-heading { min-width: 0; margin-right: auto; }
.orders-shell .cq-shell-heading h1 { margin: 0 0 5px; color: var(--cq-shell-text); font-size: clamp(25px, 3vw, 36px); font-weight: 700; letter-spacing: -.04em; }
.orders-shell .cq-shell-heading > p { color: var(--cq-shell-muted); font-size: 13px; }
.orders-shell .desktop-user-welcome {
  width: fit-content;
  min-width: 220px;
  margin: 0 0 17px;
  padding: 8px 11px 8px 8px;
  border: 1px solid var(--cq-shell-line);
  border-radius: 11px;
  background: var(--cq-shell-panel);
  display: inline-grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--cq-shell-text);
  text-align: left;
}
.orders-shell .desktop-user-avatar,
.orders-shell .mobile-user-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 229, 160, .28);
  border-radius: 50%;
  background: rgba(0, 229, 160, .11);
  color: #4df0bd;
  font-weight: 800;
}
.orders-shell .profile-copy { min-width: 0; }
.orders-shell .profile-copy strong,
.orders-shell .profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders-shell .profile-copy strong { color: var(--cq-shell-text); font-size: 14px; }
.orders-shell .profile-copy small { margin-top: 2px; color: var(--cq-shell-muted); font-size: 11px; }
.orders-shell .desktop-user-chevron { color: var(--cq-shell-muted); font-size: 18px; }
.orders-shell .cq-shell-project-context { margin-top: 18px; padding: 10px 13px; border: 1px solid var(--cq-shell-line); border-radius: 9px; background: var(--cq-shell-panel); }
.orders-shell .cq-shell-project-context span { color: #667085; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.orders-shell .cq-shell-project-context strong { margin-top: 3px; color: var(--cq-shell-text); font-size: 13px; }
.orders-shell .mobile-user-card { display: none; }
.orders-shell .topbar-utilities,
.orders-shell .mobile-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.orders-shell .topbar-utilities { margin-left: auto; }
.orders-shell .topbar-notification-button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--cq-shell-line);
  border-radius: 10px;
  background: var(--cq-shell-panel);
  color: var(--cq-shell-muted);
  font-size: 20px;
  cursor: pointer;
}
.orders-shell .topbar-notification-button:hover { color: var(--cq-shell-text); background: var(--cq-shell-panel-2); }
.orders-shell .topbar-notification-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.orders-shell .topbar-notification-button i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--cq-shell-panel);
  border-radius: 50%;
  background: #f04438;
}
.orders-shell .topbar-notification-button.is-active { color: var(--cq-shell-accent); }
.orders-shell .topbar-notification-button.is-active i { background: var(--cq-shell-accent); }
.orders-shell .topbar-notification-button:disabled { opacity: .48; cursor: not-allowed; }
.orders-shell .topbar-theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--cq-shell-line);
  border-radius: 10px;
  background: var(--cq-shell-panel);
  color: var(--cq-shell-text);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.orders-shell .topbar-theme-switch > i {
  position: relative;
  display: block;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: #344054;
  transition: background .18s ease;
}
.orders-shell .topbar-theme-switch > i > b {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}
.orders-shell .topbar-theme-switch[aria-checked="true"] > i { background: var(--cq-shell-accent); }
.orders-shell .topbar-theme-switch[aria-checked="true"] > i > b { transform: translateX(15px); }
.orders-shell .topbar-theme-switch.is-compact { width: 42px; padding: 0; justify-content: center; }
.orders-shell .topbar-theme-switch.is-compact > i { display: none; }

.orders-shell .profile-menu {
  position: absolute;
  z-index: 900;
  top: 82px;
  left: 0;
  right: auto;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 100px);
  padding: 10px;
  border: 1px solid var(--cq-shell-line);
  border-radius: 14px;
  overflow-y: auto;
  background: #11151d;
  box-shadow: 0 24px 70px rgba(0,0,0,.48);
}
.orders-shell .profile-menu-head { margin: 0 0 6px; padding: 9px 9px 12px; border-bottom: 1px solid var(--cq-shell-line); display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: center; gap: 10px; }
.orders-shell .profile-menu-head > span:last-child { min-width: 0; }
.orders-shell .profile-menu-head strong,
.orders-shell .profile-menu-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders-shell .profile-menu-head strong { color: var(--cq-shell-text); font-size: 13px; }
.orders-shell .profile-menu-head small { margin-top: 2px; color: var(--cq-shell-muted); font-size: 10px; }
.orders-shell .profile-menu-label { display: block; padding: 7px 10px 5px; color: #667085; font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.orders-shell .profile-menu .profile-menu-action {
  width: 100%;
  min-height: 54px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: var(--cq-shell-muted);
  text-align: left;
}
.orders-shell .profile-menu .profile-menu-action:hover { border-color: var(--cq-shell-line); background: var(--cq-shell-panel-2); color: var(--cq-shell-text); }
.orders-shell .profile-menu-action > span:first-child { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: rgba(255,255,255,.035); color: var(--cq-shell-accent); }
.orders-shell .profile-menu-action strong,
.orders-shell .profile-menu-action small { display: block; }
.orders-shell .profile-menu-action strong { color: inherit; font-size: 12px; }
.orders-shell .profile-menu-action small { margin-top: 2px; color: var(--cq-shell-muted); font-size: 10px; }
.orders-shell .profile-menu .profile-menu-danger { margin-top: 5px; border-top-color: rgba(255,107,107,.12); color: #ffc2c2; }
.orders-shell .profile-menu .profile-menu-danger > span:first-child { color: #ff8e8e; background: rgba(255,107,107,.08); }

.orders-shell.sidebar-collapsed { --sw: 68px; }
.orders-shell.sidebar-collapsed .cq-shell-sidebar { padding-inline: 10px; }
.orders-shell.sidebar-collapsed .sidebar-identity,
.orders-shell.sidebar-collapsed .sidebar-menu-title,
.orders-shell.sidebar-collapsed .nav-text,
.orders-shell.sidebar-collapsed .nav-separator,
.orders-shell.sidebar-collapsed .sidebar-contact-copy { display: none; }
.orders-shell.sidebar-collapsed .cq-shell-sidebar-header { justify-content: center; flex-wrap: wrap; }
.orders-shell.sidebar-collapsed .sidebar-brand-mark { width: 36px; }
.orders-shell.sidebar-collapsed .sidebar-toggle { margin: 0; transform: rotate(180deg); }
.orders-shell.sidebar-collapsed .sidebar-nav .nav-btn,
.orders-shell.sidebar-collapsed .sidebar-contact { justify-content: center; padding-inline: 0; }
.orders-shell.sidebar-collapsed .sidebar-nav .nav-btn.active::before { left: -10px; }

.orders-shell.light-theme .profile-menu { background: #fff; }
.orders-shell.light-theme .cq-shell-sidebar,
.orders-shell.light-theme .cq-shell-profile-trigger,
.orders-shell.light-theme .cq-shell-project-context { background: #fff; }
.orders-shell.light-theme .profile-menu-action > span:first-child { background: #edf1f4; }

@media (max-width: 760px) {
  .orders-shell { display: block; padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .orders-shell .main { max-width: none; margin-left: 0; padding: 98px 14px 24px; }
  .orders-shell .cq-shell-topbar {
    position: fixed;
    z-index: 500;
    inset: 0 0 auto;
    min-height: 84px;
    padding: 10px 13px;
    margin: 0;
    border-bottom: 1px solid var(--cq-shell-line);
    background: rgba(11,13,17,.96);
    backdrop-filter: blur(16px);
  }
  .orders-shell.light-theme .cq-shell-topbar { background: rgba(255,255,255,.96); }
  .orders-shell .cq-shell-heading,
  .orders-shell .topbar-utilities { display: none; }
  .orders-shell .mobile-user-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .orders-shell .mobile-topbar-actions { flex: 0 0 auto; gap: 6px; }
  .orders-shell .mobile-topbar-actions .topbar-notification-button,
  .orders-shell .mobile-topbar-actions .topbar-theme-switch { width: 38px; height: 38px; min-height: 38px; flex-basis: 38px; }
  .orders-shell .mobile-user-identity { min-width: 0; display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 10px; }
  .orders-shell .mobile-user-avatar { width: 44px; height: 44px; }
  .orders-shell .mobile-account-action { min-height: 42px; padding: 0 11px; border: 1px solid var(--cq-shell-line); border-radius: 8px; background: var(--cq-shell-panel); color: var(--cq-shell-text); display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; }
  .orders-shell .mobile-account-action > span:last-child { display: none; }
  .orders-shell .mobile-account-action { width: 38px; height: 38px; min-height: 38px; padding: 0; justify-content: center; }
  .orders-shell .mobile-topbar-actions .topbar-theme-switch { order: 3; }
  .orders-shell .mobile-topbar-actions .mobile-account-action { order: 2; }
  .orders-shell .mobile-topbar-actions .topbar-notification-button { order: 1; }
  .orders-shell.light-theme .mobile-account-action { background: #fff; }
  .orders-shell .cq-shell-sidebar {
    position: fixed;
    z-index: 700;
    inset: auto 0 0;
    width: 100%;
    min-height: 0;
    height: calc(72px + env(safe-area-inset-bottom, 0px));
    padding: 5px 7px env(safe-area-inset-bottom, 0px);
    border: 0;
    border-top: 1px solid var(--cq-shell-line);
    background: rgba(11,13,17,.98);
  }
  .orders-shell.light-theme .cq-shell-sidebar { background: rgba(255,255,255,.98); }
  .orders-shell .cq-shell-sidebar-header,
  .orders-shell .sidebar-menu-title,
  .orders-shell .nav-separator,
  .orders-shell .sidebar-footer,
  .orders-shell .nav-btn[data-page="drivers"],
  .orders-shell .nav-btn[data-page="cadastros"],
  .orders-shell .nav-btn[data-page="config"] { display: none !important; }
  .orders-shell .sidebar-nav { width: 100%; height: 100%; padding: 0; flex-direction: row; align-items: stretch; justify-content: space-around; gap: 3px; }
  .orders-shell .sidebar-nav .nav-btn {
    min-width: 0;
    min-height: 0;
    padding: 5px 4px;
    border: 0;
    border-radius: 8px;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    text-align: center;
  }
  .orders-shell .sidebar-nav .nav-btn.active::before { inset: -5px auto auto; width: 24px; height: 3px; border-radius: 0 0 3px 3px; }
  .orders-shell .sidebar-nav .nav-icon { width: 24px; height: 24px; font-size: 17px; }
  .orders-shell .sidebar-nav .nav-text { display: block; font-size: 10px; line-height: 1.1; }
  .orders-shell .profile-menu {
    position: fixed;
    top: 78px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 166px);
    border-radius: 16px;
  }
  .orders-shell .page-header { gap: 12px; }
  .orders-shell .page-header h1 { font-size: 22px; }
}

/* Perfil/configurações: mesmo componente usado na Central de Atendimento. */
.orders-shell .settings-popover {
  display: none;
  position: absolute;
  z-index: 1100;
  top: 82px;
  left: 0;
  right: auto;
  width: min(430px, calc(100vw - 24px));
  max-height: none;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.orders-shell .settings-popover.open { display: block; }
.orders-shell .settings-panel {
  max-height: calc(100dvh - 110px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--cq-shell-line);
  border-radius: 12px;
  background: var(--cq-shell-panel);
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
}
.orders-shell .settings-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--cq-shell-line);
  background: var(--cq-shell-panel);
}
.orders-shell .settings-caption { color: #667085; font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.orders-shell .settings-head h3 { margin: 3px 0 0; color: var(--cq-shell-text); font-size: 19px; letter-spacing: -.02em; }
.orders-shell .settings-close { min-height: 34px; padding: 0 10px; border: 1px solid var(--cq-shell-line); border-radius: 7px; background: var(--cq-shell-panel-2); color: var(--cq-shell-muted); font: inherit; font-size: 11px; font-weight: 700; }
.orders-shell .settings-close:hover { color: var(--cq-shell-text); }
.orders-shell .settings-user-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin: 10px 10px 0;
  padding: 12px;
  border: 1px solid var(--cq-shell-line);
  border-radius: 10px;
  background: #0f1218;
}
.orders-shell .settings-user-summary > span:last-child { min-width: 0; }
.orders-shell .settings-user-summary > span:first-child { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(0,229,160,.28); border-radius: 50%; background: rgba(0,229,160,.1); color: var(--cq-shell-accent); font-size: 14px; font-weight: 800; }
.orders-shell .settings-user-summary strong,
.orders-shell .settings-user-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders-shell .settings-user-summary strong { color: var(--cq-shell-text); font-size: 14px; }
.orders-shell .settings-user-summary small { margin-top: 3px; color: var(--cq-shell-muted); font-size: 11px; }
.orders-shell .settings-actions { display: grid; gap: 6px; padding: 10px; }
.orders-shell .settings-group-label { margin: 8px 4px 1px; color: var(--cq-shell-muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.orders-shell .settings-action {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  padding: 9px 11px;
  border: 1px solid var(--cq-shell-line);
  border-radius: 10px;
  background: #0f1218;
  color: var(--cq-shell-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.orders-shell .settings-action:hover { border-color: #667085; background: var(--cq-shell-panel-2); }
.orders-shell .settings-action > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.orders-shell .settings-action strong { font-size: 14px; }
.orders-shell .settings-action small { color: var(--cq-shell-muted); font-size: 12px; line-height: 1.4; }
.orders-shell .settings-action > span:last-child { color: #667085; font-size: 22px; }
.orders-shell .settings-action-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--cq-shell-line);
  border-radius: 9px;
  background: var(--cq-shell-panel-2);
  color: var(--cq-shell-text);
  font-size: 18px;
}
.orders-shell .settings-action:disabled { cursor: default; opacity: .7; }
.orders-shell .settings-action-danger strong { color: #ffc2c2; }

/* Estado ativo e ícones iguais aos do menu da Central. */
.orders-shell .sidebar-nav .nav-btn.active::before { display: none !important; content: none !important; }
.orders-shell .sidebar-nav .nav-btn.active { border-color: transparent; background: var(--cq-shell-panel-2); }
.orders-shell .sidebar-nav .nav-btn.active .nav-icon,
.orders-shell .sidebar-nav .nav-btn.active .nav-text { background: transparent !important; color: var(--cq-shell-text) !important; }
.orders-shell .sidebar-nav .nav-icon { font-size: 18px; }

/* Catálogo acessível sem sair da aplicação. */
.orders-shell .orders-solutions-modal { width: min(820px, calc(100vw - 28px)); max-width: 820px; }
.orders-shell .orders-solutions-intro { margin-bottom: 16px; color: var(--cq-shell-muted); font-size: 13px; }
.orders-shell .orders-solutions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.orders-shell .orders-solution-card { min-width: 0; padding: 18px; border: 1px solid var(--cq-shell-line); border-radius: 12px; background: #0f1218; display: grid; gap: 11px; }
.orders-shell .orders-solution-card.is-current { border-color: rgba(0,229,160,.32); background: rgba(0,229,160,.045); }
.orders-shell .orders-solution-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.orders-shell .orders-solution-head > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: rgba(0,229,160,.1); color: var(--cq-shell-accent); font-size: 18px; }
.orders-shell .orders-solution-head small { color: var(--cq-shell-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.orders-shell .orders-solution-card h4 { color: var(--cq-shell-text); font-size: 16px; }
.orders-shell .orders-solution-card p { min-height: 42px; color: var(--cq-shell-muted); font-size: 12px; line-height: 1.5; }
.orders-shell .orders-solution-card .btn { width: fit-content; }

.orders-shell.light-theme .settings-panel,
.orders-shell.light-theme .settings-head { background: #fff; }
.orders-shell.light-theme .settings-user-summary,
.orders-shell.light-theme .settings-action,
.orders-shell.light-theme .orders-solution-card { background: #f7f9fb; }
.orders-shell.light-theme .orders-solution-card.is-current { background: rgba(0,181,126,.06); }

@media (max-width: 760px) {
  .orders-shell .settings-popover,
  .orders-shell .settings-popover.open {
    position: fixed;
    inset: 0 !important;
    display: none;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 82px);
    overflow-x: hidden;
    overflow-y: auto;
    background: rgba(5,7,10,.76);
    backdrop-filter: blur(10px);
  }
  .orders-shell .settings-popover.open { display: flex; }
  .orders-shell .settings-panel { width: min(480px, 100%); max-height: calc(100dvh - 106px); border-radius: 16px; }
  .orders-shell .settings-action { grid-template-columns: 40px minmax(0, 1fr) auto; min-height: 64px; }
  .orders-shell .settings-action-icon { width: 40px; height: 40px; }
  .orders-shell .orders-solutions-grid { grid-template-columns: 1fr; }
  .orders-shell .orders-solution-card p { min-height: 0; }
}

/* Alinhamento final da Gestão de O.S. com o shell da Central de Atendimento. */
.orders-shell {
  --cq-shell-surface: #0f1218;
}

.orders-shell.light-theme {
  --cq-shell-bg: #f3f6f8;
  --cq-shell-panel: #fff;
  --cq-shell-panel-2: #edf1f4;
  --cq-shell-line: #d8dee6;
  --cq-shell-text: #17202b;
  --cq-shell-muted: #647184;
  --cq-shell-surface: #f7f9fb;
}

.orders-shell:not(.sidebar-collapsed) .sidebar-brand-mark { display: none; }
.orders-shell:not(.sidebar-collapsed) .sidebar-identity { gap: 4px; }
.orders-shell:not(.sidebar-collapsed) .brand-name {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.055em;
}
.orders-shell .sidebar-brand { padding-top: 4px; padding-bottom: 14px; }
.orders-shell .sidebar-footer { display: none; }
.orders-shell .sidebar-nav .nav-icon { width: 28px; font-size: 20px; }

.orders-shell .cq-shell-topbar {
  min-height: 92px;
  margin-bottom: 20px;
  padding: 14px 0;
  align-items: center;
}
.orders-shell .cq-shell-heading h1,
.orders-shell .cq-shell-heading > p { display: none; }
.orders-shell .desktop-user-welcome {
  width: min(340px, 48vw);
  min-width: 300px;
  margin: 0;
}
.orders-shell .cq-shell-project-context { margin: 0 0 0 auto; }
.orders-shell .topbar-utilities .cq-shell-project-context { margin: 0; }
.orders-shell .settings-popover { top: 78px; }

.orders-shell .settings-user-summary,
.orders-shell .settings-action,
.orders-shell .orders-solution-card { background: var(--cq-shell-surface); }

.orders-shell.light-theme .sidebar-nav .nav-btn:hover,
.orders-shell.light-theme .sidebar-nav .nav-btn.active {
  border-color: transparent;
  background: #edf1f4;
  color: #17202b;
}
.orders-shell.light-theme .sidebar-nav .nav-btn.active .nav-icon,
.orders-shell.light-theme .sidebar-nav .nav-btn.active .nav-text { color: #17202b !important; }
.orders-shell.light-theme .settings-action-danger strong { color: #b42318; }

@media (max-width: 980px) and (min-width: 761px) {
  .orders-shell .desktop-user-welcome { width: min(320px, 50vw); min-width: 260px; }
}

@media (max-width: 760px) {
  .orders-shell .cq-shell-topbar { min-height: 84px; margin-bottom: 14px; padding: 10px 0; }
  .orders-shell .settings-popover { top: 0; }
  .orders-shell .mobile-account-action span:last-child { display: none; }
  .orders-shell .mobile-account-action { width: 38px; min-height: 38px; padding: 0; justify-content: center; }
}
