/* CarCor Pro - Enhancements v2 */

/* TOAST */
.cc-toast {
  position: fixed; left: 50%; bottom: 56px;
  transform: translateX(-50%) translateY(80px);
  background: #0a1929; color: #fff;
  padding: 12px 20px; border-radius: 10px; font-size: 14px;
  font-family: inherit; font-weight: 500;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 99999; max-width: 90vw; white-space: pre-wrap;
}
.cc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.cc-toast-success { background: #16a34a; }
.cc-toast-warn { background: #d97706; }
.cc-toast-error { background: #dc2626; }
.cc-toast-info { background: #0a1929; }

/* BANNER */
.cc-banner {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  background: #c9a961; color: #0a1929;
  padding: 10px 14px; border-radius: 12px;
  display: flex; gap: 10px; align-items: center;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 14px 40px rgba(0,0,0,.2);
  z-index: 99998; max-width: calc(100vw - 24px);
}
.cc-banner-text { flex: 1; min-width: 0; }
.cc-banner-actions { display: flex; gap: 6px; align-items: center; }
.cc-banner-btn {
  background: #0a1929; color: #c9a961; border: none;
  padding: 6px 12px; border-radius: 8px; font-size: 12px;
  font-weight: 700; cursor: pointer; font-family: inherit;
}
.cc-banner-close { background: transparent !important; color: #0a1929 !important; font-size: 18px; padding: 2px 8px; }

/* STATUS BAR (topo) */
.cc-statusbar {
  position: fixed; top: 0; right: 0; z-index: 9990;
  display: flex; align-items: center; gap: 12px;
  padding: 4px 12px;
  background: rgba(10, 25, 41, 0.85);
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px; font-weight: 500;
  border-bottom-left-radius: 8px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.cc-statusbar-sep { width: 1px; height: 12px; background: rgba(255,255,255,.15); }
.cc-status { transition: color 0.3s; }
.cc-status.saved { color: #4ade80; font-weight: 700; }
.cc-clock { letter-spacing: 0.5px; }

/* OFFLINE INDICATOR */
.cc-net {
  position: fixed; bottom: 56px; left: 14px;
  background: #d97706; color: white;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  display: none; align-items: center; gap: 6px;
  z-index: 99997; box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.cc-net.show { display: inline-flex; }
.cc-net-dot { width: 8px; height: 8px; background: #fff; border-radius: 50%; animation: ccPulse 1.4s infinite; }
@keyframes ccPulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* INSTALL BUTTON */
.cc-install-btn {
  position: fixed; bottom: 14px; left: 14px;
  background: linear-gradient(135deg, #c9a961, #a48536);
  color: #0a1929; border: none;
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 24px rgba(201,169,97,.4);
  z-index: 99996; display: inline-flex; align-items: center;
  font-family: inherit;
}
.cc-install-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(201,169,97,.5); }

/* FAB */
.cc-fab {
  position: fixed; bottom: 14px; right: 14px;
  z-index: 99995; font-family: inherit;
  opacity: 0; transition: opacity .3s;
}
.cc-fab.ready { opacity: 1; }
.cc-fab-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: #0a1929; color: #c9a961;
  border: 1px solid rgba(201,169,97,.4);
  font-size: 20px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.cc-fab-btn:hover { background: #102740; transform: scale(1.05); }
.cc-fab.open .cc-fab-btn { transform: rotate(90deg); }
.cc-fab-menu {
  position: absolute; bottom: 60px; right: 0;
  background: #0a1929;
  border: 1px solid rgba(201,169,97,.25); border-radius: 12px;
  padding: 6px; display: none; flex-direction: column; gap: 2px;
  min-width: 240px; box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.cc-fab.open .cc-fab-menu { display: flex; animation: fabSlideIn 0.2s ease; }
@keyframes fabSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.cc-fab-menu button, .cc-fab-menu .cc-fab-label {
  background: transparent; border: none;
  color: rgba(255,255,255,.85); text-align: left;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; cursor: pointer; font-family: inherit;
  display: block;
}
.cc-fab-menu button:hover, .cc-fab-menu .cc-fab-label:hover {
  background: rgba(201,169,97,.12); color: #c9a961;
}

/* COMMAND PALETTE */
.cc-palette-overlay {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14vh;
  animation: ccFadeIn 0.15s ease;
}
@keyframes ccFadeIn { from { opacity: 0; } to { opacity: 1; } }
.cc-palette {
  width: 92%; max-width: 640px;
  background: #0a1929; color: white;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(201,169,97,.3);
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  font-family: inherit;
  animation: ccPaletteIn 0.18s ease;
}
@keyframes ccPaletteIn { from { transform: translateY(-12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cc-palette-search {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cc-palette-icon { font-size: 18px; opacity: 0.6; }
.cc-palette-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: white; font-size: 16px; font-family: inherit;
}
.cc-palette-search kbd {
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.7);
  border-radius: 4px; padding: 2px 6px; font-size: 10px;
  font-family: ui-monospace, monospace;
}
.cc-palette-results {
  max-height: 60vh; overflow-y: auto; padding: 6px;
}
.cc-palette-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  transition: background 0.1s;
}
.cc-palette-item:hover, .cc-palette-item.active { background: rgba(201,169,97,.15); }
.cc-palette-type {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 700; color: #c9a961;
}
.cc-palette-title { font-size: 14px; }
.cc-palette-sub { font-size: 11px; color: rgba(255,255,255,.5); }
.cc-palette-empty { padding: 20px; text-align: center; color: rgba(255,255,255,.5); font-size: 13px; }
.cc-palette-hint {
  padding: 8px 14px; font-size: 10px;
  color: rgba(255,255,255,.4);
  background: rgba(0,0,0,.2);
  text-align: center;
}

/* CALCULADORA */
.cc-calc-wrap {
  position: fixed; inset: 0; z-index: 100001;
  background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
}
.cc-calc {
  background: #0a1929; color: white;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(201,169,97,.3);
  width: 320px; max-width: 100%;
  font-family: inherit;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
}
.cc-calc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cc-calc-close {
  background: transparent; border: none; color: white;
  font-size: 22px; cursor: pointer; line-height: 1;
}
.cc-calc-body { padding: 14px; }
#__cc_calc_input {
  width: 100%; padding: 10px 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; color: white;
  font-size: 16px; font-family: ui-monospace, monospace;
  outline: none;
}
.cc-calc-result {
  font-size: 28px; font-weight: 700; text-align: right;
  padding: 12px 4px; color: #c9a961;
  font-family: ui-monospace, monospace;
}
.cc-calc-pad {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.cc-calc-pad button {
  padding: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; color: white;
  font-size: 16px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background 0.1s;
}
.cc-calc-pad button:hover { background: rgba(255,255,255,.12); }
.cc-calc-pad .cc-calc-wide { grid-column: span 2; }
.cc-calc-pad .cc-calc-eq { background: #c9a961; color: #0a1929; }
.cc-calc-pad .cc-calc-eq:hover { background: #d4b574; }
.cc-calc-pad .cc-calc-clear { background: #dc2626; color: white; }
.cc-calc-hint {
  margin-top: 10px; font-size: 10px;
  color: rgba(255,255,255,.4); text-align: center;
}
.cc-calc-hint kbd {
  background: rgba(255,255,255,.1); padding: 1px 5px;
  border-radius: 3px; font-size: 10px;
  font-family: ui-monospace, monospace;
}

/* PHOTO PREVIEW */
.cc-photo-overlay {
  position: fixed; inset: 0; z-index: 100002;
  background: rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
}
.cc-photo-modal {
  background: #0a1929; color: white;
  border-radius: 14px; overflow: hidden;
  max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column;
  border: 1px solid rgba(201,169,97,.3);
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  font-family: inherit;
}
.cc-photo-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
}
.cc-photo-close { background: transparent; border: none; color: white; font-size: 22px; cursor: pointer; }
.cc-photo-modal img { max-width: 100%; max-height: 70vh; object-fit: contain; }
.cc-photo-actions {
  display: flex; gap: 6px; padding: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap; justify-content: center;
}
.cc-photo-btn {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 8px 14px; border-radius: 8px;
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.cc-photo-btn:hover { background: rgba(255,255,255,.12); }

/* SHORTCUTS LIST */
.cc-shortcuts-list { padding: 12px 18px; }
.cc-shortcuts-list > div {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px;
}
.cc-shortcuts-list > div:last-child { border-bottom: none; }
.cc-shortcuts-list kbd {
  background: rgba(255,255,255,.1); color: white;
  padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-family: ui-monospace, monospace;
  margin-right: 4px; min-width: 22px;
  display: inline-block; text-align: center;
}
.cc-shortcuts-list span:last-child { flex: 1; opacity: 0.85; }

/* AI ASSISTANT */
.cc-ai-overlay {
  position: fixed; inset: 0; z-index: 100003;
  background: rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 14px;
  animation: ccFadeIn 0.15s ease;
}
.cc-ai {
  background: linear-gradient(160deg, #0a1929, #102740);
  color: white;
  border-radius: 16px;
  width: 100%; max-width: 720px; max-height: 92vh;
  display: flex; flex-direction: column;
  border: 1px solid rgba(201,169,97,.3);
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  font-family: inherit;
  animation: ccPaletteIn 0.2s ease;
  overflow: hidden;
}
.cc-ai-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(201,169,97,.06);
}
.cc-ai-header strong { font-size: 15px; }
.cc-ai-close {
  background: transparent; border: none; color: white;
  font-size: 24px; cursor: pointer; line-height: 1; padding: 0 6px;
}
.cc-ai-body { padding: 20px; overflow-y: auto; flex: 1; }
.cc-ai-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.15);
}
.cc-ai-btn {
  padding: 10px 18px; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06); color: white;
  transition: all 0.15s;
}
.cc-ai-btn:hover { background: rgba(255,255,255,.12); }
.cc-ai-btn-primary { background: #c9a961; color: #0a1929; border-color: #c9a961; font-weight: 700; }
.cc-ai-btn-primary:hover { background: #d4b574; }
.cc-ai-btn-secondary { color: rgba(255,255,255,.7); }

.cc-ai-greeting {
  font-size: 14px; line-height: 1.6;
  margin-bottom: 18px;
  padding: 14px;
  background: rgba(201,169,97,.08);
  border-left: 3px solid #c9a961;
  border-radius: 6px;
}
.cc-ai-tabs {
  display: flex; gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cc-ai-tab {
  background: transparent; border: none; color: rgba(255,255,255,.6);
  padding: 10px 14px; cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit;
  border-bottom: 2px solid transparent;
}
.cc-ai-tab.active { color: #c9a961; border-bottom-color: #c9a961; }
.cc-ai-tab:hover { color: white; }

.cc-ai-hint {
  font-size: 12px; color: rgba(255,255,255,.6);
  margin: 0 0 12px;
}
.cc-ai-rooms {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.cc-ai-room {
  display: grid; grid-template-columns: auto 1fr 70px;
  align-items: center; gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.cc-ai-room input[type="checkbox"] { width: 18px; height: 18px; accent-color: #c9a961; }
.cc-ai-room input[type="number"] {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 5px 8px; border-radius: 4px; font-size: 12px;
  font-family: inherit; outline: none;
}
.cc-ai-room input[type="number"]:focus { border-color: #c9a961; }

#__cc_ai_desc {
  width: 100%; padding: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; color: white;
  font-size: 14px; font-family: inherit;
  resize: vertical; outline: none;
}
#__cc_ai_desc:focus { border-color: #c9a961; }

.cc-ai-summary {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  padding: 18px;
  background: rgba(201,169,97,.08);
  border-radius: 10px;
  margin-bottom: 18px;
}
.cc-ai-summary-num { font-size: 36px; font-weight: 800; color: #c9a961; }
.cc-ai-summary-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.6); }
.cc-ai-summary-total { font-size: 28px; font-weight: 700; margin-left: auto; color: #4ade80; font-family: ui-monospace, monospace; }

.cc-ai-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cc-ai-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px; align-items: center;
  padding: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
}
.cc-ai-item-icon { font-size: 22px; }
.cc-ai-item-info { min-width: 0; }
.cc-ai-item-title { font-size: 14px; font-weight: 600; }
.cc-ai-item-dims { font-size: 11px; color: rgba(255,255,255,.5); margin-left: 8px; font-family: ui-monospace, monospace; }
.cc-ai-item-meta { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 3px; }
.cc-ai-item-price { text-align: right; }
.cc-ai-item-price strong { display: block; font-size: 14px; color: #4ade80; font-family: ui-monospace, monospace; }
.cc-ai-item-price small { font-size: 10px; color: rgba(255,255,255,.4); }
.cc-ai-item-rm {
  background: transparent; border: 1px solid rgba(220,38,38,.3);
  color: #f87171; width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; font-size: 16px;
}
.cc-ai-item-rm:hover { background: rgba(220,38,38,.15); }

/* SHOWROOM */
.cc-showroom-overlay {
  position: fixed; inset: 0; z-index: 100004;
  background: rgba(0,0,0,.85);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: stretch; justify-content: center;
  animation: ccFadeIn 0.2s ease;
}
.cc-showroom {
  width: 100%; max-width: 1400px;
  display: flex; flex-direction: column;
  color: white; font-family: inherit;
  padding: 14px;
}
.cc-showroom-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 6px; margin-bottom: 14px;
}
.cc-showroom-header strong { font-size: 18px; color: #c9a961; }
.cc-showroom-close {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  color: white; width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; cursor: pointer;
}
.cc-showroom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}
.cc-showroom-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cc-showroom-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.4); border-color: #c9a961; }
.cc-showroom-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.cc-showroom-info { padding: 14px; }
.cc-showroom-title { font-weight: 700; font-size: 15px; }
.cc-showroom-desc { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; line-height: 1.4; }
.cc-showroom-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.cc-showroom-tag {
  background: rgba(201,169,97,.15); color: #c9a961;
  padding: 3px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600;
}
.cc-showroom-footer {
  padding: 10px; text-align: center;
  color: rgba(255,255,255,.5); font-size: 12px;
}

/* FULLSCREEN ITEM (showroom) */
.cc-fullscreen-overlay {
  position: fixed; inset: 0; z-index: 100005;
  background: black;
  display: flex; flex-direction: column;
  cursor: zoom-out;
}
.cc-fullscreen-overlay img {
  width: 100%; height: 100%; object-fit: cover; flex: 1;
}
.cc-fullscreen-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 30px;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
  color: white;
}
.cc-fullscreen-info h2 { margin: 0; font-size: 32px; color: #c9a961; }
.cc-fullscreen-info p { margin: 8px 0 0; font-size: 16px; opacity: 0.9; }
.cc-fullscreen-close {
  position: absolute; top: 20px; right: 20px;
  background: rgba(0,0,0,.5); color: white; border: none;
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 24px; cursor: pointer;
}

/* KANBAN */
.cc-kanban-overlay {
  position: fixed; inset: 0; z-index: 100004;
  background: rgba(0,0,0,.85);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: stretch; justify-content: center;
  padding: 14px;
}
.cc-kanban {
  width: 100%; max-width: 1600px;
  display: flex; flex-direction: column;
  color: white; font-family: inherit;
}
.cc-kanban-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 4px 14px;
}
.cc-kanban-header strong { font-size: 16px; color: #c9a961; }
.cc-kanban-close {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  color: white; width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; cursor: pointer;
}
.cc-kanban-board {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px;
  flex: 1;
}
.cc-kanban-col {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; min-width: 240px; max-width: 280px;
  display: flex; flex-direction: column;
  flex-shrink: 0;
}
.cc-kanban-col-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  border-top: 3px solid;
  border-radius: 10px 10px 0 0;
  display: flex; align-items: center; justify-content: space-between;
}
.cc-kanban-col-name { font-size: 12px; font-weight: 700; }
.cc-kanban-col-count {
  background: rgba(255,255,255,.1); padding: 2px 8px;
  border-radius: 10px; font-size: 11px; font-weight: 600;
}
.cc-kanban-col-body {
  padding: 8px; min-height: 100px;
  flex: 1; overflow-y: auto;
  transition: background 0.15s;
}
.cc-kanban-col-body.drag-over { background: rgba(201,169,97,.08); }
.cc-kanban-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 10px;
  margin-bottom: 6px;
  cursor: grab;
  transition: transform 0.1s;
}
.cc-kanban-card:hover { background: rgba(255,255,255,.1); }
.cc-kanban-card.dragging { opacity: 0.5; cursor: grabbing; }
.cc-kanban-card-title { font-size: 13px; font-weight: 600; }
.cc-kanban-card-client { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 3px; }
.cc-kanban-card-deadline { font-size: 11px; color: #f59e0b; margin-top: 4px; }
.cc-kanban-card-value { font-size: 12px; color: #4ade80; font-weight: 600; margin-top: 4px; font-family: ui-monospace, monospace; }
.cc-kanban-footer {
  padding: 8px; text-align: center;
  font-size: 11px; color: rgba(255,255,255,.5);
}

/* QR CODE */
.cc-qr-overlay {
  position: fixed; inset: 0; z-index: 100005;
  background: rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
}
.cc-qr {
  background: #0a1929; color: white;
  border-radius: 14px; max-width: 380px; width: 100%;
  border: 1px solid rgba(201,169,97,.3);
  font-family: inherit;
}
.cc-qr-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.cc-qr-close { background: transparent; border: none; color: white; font-size: 22px; cursor: pointer; }
.cc-qr-body { padding: 18px; text-align: center; }
.cc-qr-body img { max-width: 280px; width: 100%; margin: 0 auto; display: block; }
.cc-qr-text {
  margin: 14px 0; font-size: 11px;
  color: rgba(255,255,255,.6);
  background: rgba(0,0,0,.2); padding: 8px;
  border-radius: 6px; word-break: break-all;
  font-family: ui-monospace, monospace;
}
.cc-qr-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.cc-qr-btn {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 8px 14px; border-radius: 8px;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.cc-qr-btn:hover { background: rgba(255,255,255,.12); }

/* VERSÕES */
.cc-version-row {
  display: grid; grid-template-columns: 50px 1fr 1fr auto auto;
  gap: 8px; align-items: center;
  padding: 8px 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px; margin-bottom: 4px;
  font-size: 12px;
}
.cc-version-label {
  background: #c9a961; color: #0a1929;
  padding: 3px 8px; border-radius: 4px;
  font-weight: 700; font-size: 11px;
  text-align: center;
}
.cc-version-date { color: rgba(255,255,255,.7); font-size: 11px; }
.cc-version-meta { color: rgba(255,255,255,.5); font-size: 11px; }
.cc-version-restore, .cc-version-del {
  background: rgba(255,255,255,.06); color: white;
  border: 1px solid rgba(255,255,255,.1); padding: 5px 10px;
  border-radius: 4px; font-size: 11px; cursor: pointer;
}
.cc-version-restore:hover { background: rgba(74,222,128,.15); border-color: #4ade80; }
.cc-version-del:hover { background: rgba(220,38,38,.15); border-color: #f87171; }

/* CHECKLISTS */
.cc-check-section {
  padding: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; margin-bottom: 10px;
}
.cc-check-title { font-size: 14px; color: #c9a961; margin: 0 0 8px; }
.cc-check-list { list-style: none; padding: 0; margin: 0; }
.cc-check-list li { padding: 4px 0; }
.cc-check-list label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; cursor: pointer;
}
.cc-check-list input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: #c9a961;
}
.cc-check-list input:checked + span { text-decoration: line-through; color: rgba(255,255,255,.5); }

/* PAGAMENTOS */
.cc-pay-row {
  display: grid;
  grid-template-columns: 24px 1fr 100px 130px 30px;
  gap: 6px; align-items: center;
  padding: 6px 0;
}
.cc-pay-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #4ade80; }
.cc-pay-row input[type="text"], .cc-pay-row input[type="number"], .cc-pay-row input[type="date"] {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 6px 8px; border-radius: 4px;
  font-size: 12px; font-family: inherit; outline: none;
}
.cc-pay-row button {
  background: transparent; border: none; color: #f87171;
  font-size: 18px; cursor: pointer;
}

/* CALCULADORA UW */
.cc-uw-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 16px;
}
.cc-uw-grid label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; color: rgba(255,255,255,.7);
}
.cc-uw-grid input, .cc-uw-grid select {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 8px 10px; border-radius: 6px;
  font-size: 13px; font-family: inherit; outline: none;
}
.cc-uw-grid input:focus, .cc-uw-grid select:focus { border-color: #c9a961; }
.cc-uw-out {
  background: rgba(201,169,97,.08);
  border-radius: 8px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.cc-uw-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.cc-uw-row strong { font-size: 15px; color: #c9a961; font-family: ui-monospace, monospace; }
.cc-uw-hint { font-size: 11px; color: rgba(255,255,255,.5); margin: 12px 0 14px; line-height: 1.4; }

/* COMPARADOR */
.cc-cmp-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px; color: white;
}
.cc-cmp-table th, .cc-cmp-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.cc-cmp-table th {
  background: rgba(255,255,255,.05);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.cc-cmp-table th.best { background: rgba(201,169,97,.2); color: #c9a961; }
.cc-cmp-table td.best { background: rgba(201,169,97,.08); font-weight: 700; color: #c9a961; }
.cc-cmp-table td:first-child { text-align: left; font-weight: 600; }
.cc-cmp-conclusion {
  margin-top: 14px;
  padding: 12px;
  background: rgba(74,222,128,.1);
  border-left: 3px solid #4ade80;
  border-radius: 6px;
  font-size: 13px; color: white;
  line-height: 1.5;
}

/* ANTES/DEPOIS slider */
.cc-ba-slider {
  position: relative; width: 100%; aspect-ratio: 16/10;
  background: #1a1a1a; border-radius: 8px;
  overflow: hidden; user-select: none;
}
.cc-ba-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.cc-ba-clip {
  position: absolute; top: 0; left: 0; bottom: 0;
  overflow: hidden; width: 50%;
}
.cc-ba-clip .cc-ba-img { width: calc(100% / (var(--clip-w, 0.5))); }
.cc-ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; background: #c9a961;
  pointer-events: none; transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}
.cc-ba-handle::before, .cc-ba-handle::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 32px; height: 32px;
  background: #c9a961; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cc-ba-handle::after {
  background: white; width: 24px; height: 24px;
}
.cc-ba-range {
  position: absolute; inset: 0; opacity: 0;
  width: 100%; height: 100%;
  cursor: ew-resize;
}
.cc-ba-label {
  position: absolute; top: 12px;
  background: rgba(0,0,0,.7); color: white;
  padding: 4px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  pointer-events: none;
}
.cc-ba-label-l { left: 12px; }
.cc-ba-label-r { right: 12px; }

/* VOZ */
.cc-voice-status {
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  margin-bottom: 14px;
}
.cc-voice-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  margin-bottom: 14px;
}
.cc-voice-btn:hover { transform: scale(1.02); }
.cc-voice-out {
  width: 100%; min-height: 140px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 12px; border-radius: 8px;
  font-size: 14px; font-family: inherit;
  resize: vertical; outline: none;
}
.cc-voice-out:focus { border-color: #c9a961; }

/* RAL CORES */
.cc-ral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px; margin-bottom: 16px;
}
.cc-ral-card {
  position: relative;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 4/3;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  font-family: inherit;
  transition: transform 0.1s;
  padding: 0;
}
.cc-ral-card:hover { transform: translateY(-2px); border-color: rgba(201,169,97,.5); }
.cc-ral-card.active { border-color: #c9a961; transform: scale(1.05); }
.cc-ral-code {
  font-size: 10px; font-weight: 700;
  color: white; background: rgba(0,0,0,.6);
  padding: 2px 6px;
}
.cc-ral-name {
  font-size: 9px;
  color: white; background: rgba(0,0,0,.6);
  padding: 2px 6px;
}
.cc-ral-preview {
  background: linear-gradient(180deg, #87ceeb, #f1f5f9);
  border-radius: 10px;
  padding: 30px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  min-height: 220px;
}
.cc-ral-window {
  position: relative;
  width: 200px; height: 140px;
  background: linear-gradient(135deg, #c8e0eb, #e8f1f5);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.cc-ral-window-frame {
  position: absolute; inset: 0;
  border: 18px solid #fff;
  border-radius: 4px;
  transition: border-color 0.3s;
}
.cc-ral-window-glass {
  position: absolute; inset: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.4), rgba(135,206,235,.3));
  border-radius: 2px;
}
.cc-ral-info {
  font-size: 14px; color: #0a1929;
  background: rgba(255,255,255,.9);
  padding: 8px 14px; border-radius: 20px;
}

/* GLOSSÁRIO */
.cc-gloss-search {
  width: 100%; padding: 10px 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; border-radius: 8px;
  font-size: 14px; font-family: inherit;
  margin-bottom: 14px; outline: none;
}
.cc-gloss-search:focus { border-color: #c9a961; }
.cc-gloss-item {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px; margin-bottom: 6px;
  overflow: hidden;
}
.cc-gloss-item summary {
  padding: 10px 14px; cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: #c9a961;
  list-style: none;
}
.cc-gloss-item summary::before {
  content: "▶"; margin-right: 8px;
  display: inline-block; transition: transform 0.15s;
  font-size: 9px;
}
.cc-gloss-item[open] summary::before { transform: rotate(90deg); }
.cc-gloss-item p {
  margin: 0; padding: 0 14px 12px;
  color: rgba(255,255,255,.85); font-size: 13px;
  line-height: 1.5;
}

/* BRIEFING */
.cc-brief-kpi-row {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin-bottom: 18px;
}
.cc-brief-kpi {
  background: rgba(201,169,97,.1);
  border: 1px solid rgba(201,169,97,.2);
  border-radius: 8px; padding: 12px;
  text-align: center;
}
.cc-brief-num {
  font-size: 24px; font-weight: 800;
  color: #c9a961;
  font-family: ui-monospace, monospace;
}
.cc-brief-lbl {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.5px; color: rgba(255,255,255,.6);
  margin-top: 2px;
}
.cc-brief-h {
  font-size: 13px; color: #c9a961;
  margin: 16px 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(201,169,97,.2);
}
.cc-brief-list {
  list-style: none; padding: 0; margin: 0;
}
.cc-brief-list li {
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 12px; color: rgba(255,255,255,.85);
}
.cc-brief-list li:last-child { border-bottom: none; }
.cc-brief-empty {
  font-size: 12px; color: rgba(255,255,255,.4);
  font-style: italic; text-align: center;
  padding: 12px;
}
.cc-brief-quote {
  margin-top: 18px;
  padding: 14px;
  background: rgba(255,255,255,.03);
  border-left: 3px solid #c9a961;
  border-radius: 4px;
  font-size: 12px; color: rgba(255,255,255,.7);
  font-style: italic;
}

/* SIMULADOR 3D */
.cc-3d-overlay {
  position: fixed; inset: 0; z-index: 100006;
  background: rgba(0,0,0,.85);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: stretch; justify-content: center;
  padding: 14px;
}
.cc-3d {
  width: 100%; max-width: 1200px; max-height: 95vh;
  background: linear-gradient(160deg, #0a1929, #102740);
  color: white; border-radius: 14px;
  border: 1px solid rgba(201,169,97,.3);
  display: flex; flex-direction: column;
  font-family: inherit;
  overflow: hidden;
}
.cc-3d-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cc-3d-close {
  background: transparent; border: none; color: white; font-size: 22px; cursor: pointer;
}
.cc-3d-body {
  display: grid; grid-template-columns: 280px 1fr;
  flex: 1; min-height: 0;
}
.cc-3d-controls {
  padding: 16px;
  border-right: 1px solid rgba(255,255,255,.08);
  overflow-y: auto;
}
.cc-3d-controls h3 { font-size: 11px; color: #c9a961; text-transform: uppercase; letter-spacing: 1px; margin: 14px 0 6px; }
.cc-3d-controls h3:first-child { margin-top: 0; }
.cc-3d-controls input, .cc-3d-controls select {
  width: 100%;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 7px 10px; border-radius: 6px;
  font-size: 13px; font-family: inherit; outline: none;
}
.cc-3d-row { display: flex; gap: 6px; }
.cc-3d-row label { display: flex; flex-direction: column; gap: 3px; flex: 1; font-size: 10px; color: rgba(255,255,255,.6); }
.cc-3d-toggle { display: flex; flex-direction: row !important; align-items: center; gap: 6px; padding: 8px 0; }
.cc-3d-toggle input { width: auto; }
.cc-3d-colors {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
}
.cc-3d-color {
  width: 100%; aspect-ratio: 1;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 6px; cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
}
.cc-3d-color:hover { transform: scale(1.1); }
.cc-3d-color.active { border-color: #c9a961; transform: scale(1.1); box-shadow: 0 0 0 3px rgba(201,169,97,.3); }
.cc-3d-hint { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 14px; line-height: 1.4; }

.cc-3d-stage {
  position: relative;
  perspective: 1200px;
  overflow: hidden;
  background: linear-gradient(180deg, #87ceeb 0%, #d4e5f0 50%, #e8e3d0 75%, #c9a961 100%);
  cursor: grab;
}
.cc-3d-stage.night {
  background: linear-gradient(180deg, #0a1929 0%, #14375e 60%, #1a2540 100%);
}
.cc-3d-stage.night::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,235,180,.5), transparent 30%),
              radial-gradient(circle at 70% 80%, rgba(255,235,180,.3), transparent 25%);
  pointer-events: none;
}
.cc-3d-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 0.4s;
}
.cc-3d-stage.has-bg .cc-3d-bg { opacity: 1; }
.cc-3d-stage.has-bg { background: #1a1a1a; }
.cc-3d-scene {
  position: absolute;
  top: 50%; left: 50%;
  transform-origin: center;
  transform-style: preserve-3d;
  transition: transform 0.05s linear;
  will-change: transform;
}
.cc-3d-window {
  position: relative;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%);
}
.w3d-front {
  position: absolute; inset: 0;
  background: white;
  transform: translateZ(calc(var(--depth) / 2));
  box-sizing: border-box;
}
.w3d-back {
  position: absolute; inset: 0;
  transform: translateZ(calc(var(--depth) / -2));
}
.w3d-top, .w3d-bottom {
  position: absolute; left: 0; right: 0;
}
.w3d-top { top: 0; transform: rotateX(90deg) translateY(calc(var(--depth) / -2)); transform-origin: top; }
.w3d-bottom { bottom: 0; transform: rotateX(-90deg) translateY(calc(var(--depth) / 2)); transform-origin: bottom; }
.w3d-left, .w3d-right {
  position: absolute; top: 0; bottom: 0;
}
.w3d-left { left: 0; transform: rotateY(-90deg) translateX(calc(var(--depth) / -2)); transform-origin: left; }
.w3d-right { right: 0; transform: rotateY(90deg) translateX(calc(var(--depth) / 2)); transform-origin: right; }
.w3d-pane {
  width: 100%; height: 100%;
  box-sizing: border-box;
}
.w3d-info {
  position: absolute; top: -28px; left: 0; right: 0;
  text-align: center;
  font-size: 11px; color: white;
  background: rgba(0,0,0,.6);
  padding: 4px 10px; border-radius: 4px;
  font-family: ui-monospace, monospace;
}

/* APOIOS PT */
.cc-sub-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; padding: 14px;
  margin-bottom: 10px;
}
.cc-sub-card h3 {
  margin: 0 0 8px; font-size: 14px; color: #c9a961;
}
.cc-sub-card ul { margin: 0; padding-left: 18px; line-height: 1.6; }
.cc-sub-card li { font-size: 12px; }
.cc-sub-card strong { color: white; }
.cc-sub-call {
  margin-top: 14px;
  padding: 14px;
  background: rgba(74,222,128,.1);
  border-left: 4px solid #4ade80;
  border-radius: 6px;
  font-size: 13px; line-height: 1.6;
}

/* EQUIPAMENTO */
.cc-eq-tabs {
  display: flex; gap: 4px; margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cc-eq-tab {
  background: transparent; border: none; color: rgba(255,255,255,.6);
  padding: 8px 14px; cursor: pointer;
  font-size: 12px; font-weight: 600; font-family: inherit;
  border-bottom: 2px solid transparent;
}
.cc-eq-tab.active { color: #c9a961; border-bottom-color: #c9a961; }
.cc-eq-hint { font-size: 11px; color: rgba(255,255,255,.5); margin-bottom: 10px; }
.cc-eq-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.cc-eq-row {
  display: grid;
  grid-template-columns: 1fr 1fr 130px 80px 1fr 30px;
  gap: 4px; align-items: center;
}
.cc-eq-row.overdue { background: rgba(220,38,38,.1); padding: 4px; border-radius: 4px; }
.cc-eq-row input, .cc-eq-row select {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 5px 8px; border-radius: 4px;
  font-size: 11px; font-family: inherit; outline: none;
}
.cc-eq-row .cc-eq-due { font-size: 11px; color: rgba(255,255,255,.7); }
.cc-eq-row.overdue .cc-eq-due { color: #f87171; font-weight: 700; }
.cc-eq-row button {
  background: transparent; border: none; color: #f87171;
  font-size: 16px; cursor: pointer;
}

/* I18N */
.cc-i18n-langs {
  display: flex; gap: 6px; margin-bottom: 14px;
  flex-wrap: wrap;
}
.cc-i18n-lang {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 8px 14px; border-radius: 8px;
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.cc-i18n-lang.active { background: #c9a961; color: #0a1929; border-color: #c9a961; font-weight: 700; }
.cc-i18n-row {
  display: grid; grid-template-columns: 1fr 1fr 36px;
  gap: 8px; align-items: center;
  padding: 10px;
  background: rgba(255,255,255,.04);
  border-radius: 6px; margin-bottom: 4px;
}
.cc-i18n-pt { font-size: 13px; color: rgba(255,255,255,.6); }
.cc-i18n-trans { font-size: 14px; color: white; font-weight: 600; }
.cc-i18n-copy {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: white; width: 32px; height: 32px; border-radius: 6px;
  cursor: pointer; font-size: 14px;
}
.cc-i18n-copy:hover { background: rgba(201,169,97,.2); }

/* DASHBOARD EXECUTIVO */
.cc-dash-overlay {
  position: fixed; inset: 0; z-index: 100007;
  background: rgba(0,0,0,.85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; align-items: stretch; justify-content: center;
  padding: 14px;
  animation: ccFadeIn 0.2s ease;
}
.cc-dash {
  width: 100%; max-width: 1280px; max-height: 95vh;
  background: linear-gradient(160deg, #0a1929, #14375e, #0a1929);
  color: white; border-radius: 18px;
  border: 1px solid rgba(201,169,97,.3);
  display: flex; flex-direction: column;
  font-family: inherit;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(0,0,0,.5);
}
.cc-dash-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.2);
}
.cc-dash-header strong { font-size: 18px; color: #c9a961; display: block; }
.cc-dash-date { font-size: 11px; color: rgba(255,255,255,.5); text-transform: capitalize; }
.cc-dash-close {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  color: white; width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; cursor: pointer; transition: background 0.15s;
}
.cc-dash-close:hover { background: rgba(220,38,38,.2); border-color: #f87171; }
.cc-dash-body { padding: 20px; overflow-y: auto; flex: 1; }

.cc-dash-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.cc-dash-kpi {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 16px;
  position: relative; overflow: hidden;
  transition: transform 0.15s;
}
.cc-dash-kpi:hover { transform: translateY(-2px); border-color: rgba(201,169,97,.4); }
.cc-dash-kpi::before {
  content: ""; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,.2);
}
.cc-dash-kpi-primary::before { background: linear-gradient(90deg, #c9a961, #e6c478); }
.cc-dash-kpi-success::before { background: #4ade80; }
.cc-dash-kpi-warn::before { background: #f59e0b; }
.cc-dash-kpi-danger::before { background: #ef4444; }
.cc-dash-kpi-l { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.55); font-weight: 600; }
.cc-dash-kpi-v {
  font-size: 28px; font-weight: 800;
  margin: 6px 0 4px;
  letter-spacing: -0.5px;
  font-family: ui-monospace, "SF Mono", monospace;
}
.cc-dash-kpi-primary .cc-dash-kpi-v { color: #c9a961; }
.cc-dash-kpi-success .cc-dash-kpi-v { color: #4ade80; }
.cc-dash-kpi-danger .cc-dash-kpi-v { color: #f87171; }
.cc-dash-kpi-s { font-size: 11px; color: rgba(255,255,255,.5); }

.cc-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cc-dash-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 18px;
}
.cc-dash-card-wide { grid-column: 1 / -1; }
.cc-dash-card h3 {
  margin: 0 0 14px; font-size: 13px; color: #c9a961;
  text-transform: uppercase; letter-spacing: 1px;
  font-weight: 700;
}
.cc-dash-empty { color: rgba(255,255,255,.4); font-size: 12px; text-align: center; padding: 20px; }

.cc-chart-bars {
  display: flex; align-items: flex-end; gap: 8px;
  height: 200px;
}
.cc-chart-bar-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  height: 100%; justify-content: flex-end;
}
.cc-chart-val {
  font-size: 10px; color: rgba(255,255,255,.7);
  margin-bottom: 4px; font-family: ui-monospace, monospace;
  font-weight: 600;
  height: 14px;
}
.cc-chart-bar {
  width: 100%;
  background: linear-gradient(180deg, #c9a961, #a48536);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  transition: height 0.5s ease, background 0.2s;
}
.cc-chart-bar:hover { background: linear-gradient(180deg, #e6c478, #c9a961); }
.cc-chart-lbl { font-size: 10px; color: rgba(255,255,255,.55); margin-top: 6px; text-transform: capitalize; }

.cc-chart-hbars { display: flex; flex-direction: column; gap: 8px; }
.cc-chart-hbar {
  display: grid; grid-template-columns: 100px 1fr 50px;
  gap: 10px; align-items: center;
}
.cc-chart-hlbl { font-size: 12px; color: rgba(255,255,255,.85); text-transform: capitalize; }
.cc-chart-htrack { background: rgba(255,255,255,.06); border-radius: 4px; height: 22px; overflow: hidden; }
.cc-chart-hfill {
  height: 100%;
  background: linear-gradient(90deg, #c9a961, #e6c478);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.cc-chart-hval { font-size: 12px; font-weight: 700; color: #c9a961; text-align: right; font-family: ui-monospace, monospace; }

.cc-dash-recs { display: flex; flex-direction: column; gap: 8px; }
.cc-dash-rec {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.cc-dash-rec-warn { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.25); }
.cc-dash-rec-danger { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.25); }
.cc-dash-rec-success { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.25); }
.cc-dash-rec-info { background: rgba(59,130,246,.08); border-color: rgba(59,130,246,.25); }
.cc-dash-rec-icon { font-size: 20px; }
.cc-dash-rec-t { font-size: 13px; font-weight: 700; }
.cc-dash-rec-d { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 2px; line-height: 1.4; }

@media (max-width: 768px) {
  .cc-dash-grid { grid-template-columns: 1fr; }
  .cc-dash-kpi-v { font-size: 22px; }
}

/* NOTIFICAÇÕES */
.cc-notif-overlay {
  position: fixed; inset: 0; z-index: 100008;
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; justify-content: flex-end;
  animation: ccFadeIn 0.15s ease;
}
.cc-notif-drawer {
  width: 380px; max-width: 100%; height: 100%;
  background: #0a1929;
  border-left: 1px solid rgba(201,169,97,.3);
  display: flex; flex-direction: column;
  color: white; font-family: inherit;
  animation: ccSlideRight 0.25s ease;
}
@keyframes ccSlideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.cc-notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.3);
}
.cc-notif-header strong { font-size: 15px; }
.cc-notif-close {
  background: transparent; border: none; color: white;
  font-size: 24px; cursor: pointer;
}
.cc-notif-body { padding: 12px; overflow-y: auto; flex: 1; }
.cc-notif-empty { text-align: center; padding: 40px 20px; color: rgba(255,255,255,.5); font-size: 14px; }
.cc-notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: rgba(255,255,255,.04);
  border-left: 3px solid;
  transition: background 0.15s;
}
.cc-notif-item:hover { background: rgba(255,255,255,.06); }
.cc-notif-warn { border-color: #f59e0b; }
.cc-notif-danger { border-color: #ef4444; }
.cc-notif-info { border-color: #3b82f6; }
.cc-notif-success { border-color: #4ade80; }
.cc-notif-icon { font-size: 18px; flex-shrink: 0; }
.cc-notif-info { flex: 1; min-width: 0; }
.cc-notif-t { font-size: 13px; font-weight: 600; }
.cc-notif-s { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 3px; line-height: 1.4; }

/* BADGE NOTIFICAÇÕES */
.cc-notifbadge {
  position: fixed; top: 4px; right: 80px;
  background: rgba(10,25,41,0.85);
  color: white;
  border: 1px solid rgba(255,255,255,.15);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  z-index: 9990;
  display: flex; align-items: center; gap: 4px;
  font-family: inherit;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform 0.15s;
}
.cc-notifbadge:hover { transform: scale(1.05); }
.cc-notifbadge.has-critical { border-color: #f59e0b; }
.cc-notifbadge.has-danger { border-color: #ef4444; animation: ccPulseBadge 2s infinite; }
@keyframes ccPulseBadge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}
.cc-notif-count {
  background: rgba(255,255,255,.15);
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 8px;
  min-width: 14px; text-align: center;
}
.cc-notifbadge.has-critical .cc-notif-count { background: #f59e0b; color: #0a1929; }
.cc-notifbadge.has-danger .cc-notif-count { background: #ef4444; }

/* MELHORIAS GLOBAIS DE DESIGN */
/* Refinamentos para todos os modais */
.cc-photo-modal, .cc-palette, .cc-calc, .cc-qr,
.cc-showroom, .cc-kanban, .cc-3d, .cc-ai, .cc-dash {
  box-shadow: 0 32px 100px rgba(0,0,0,.5), 0 0 0 1px rgba(201,169,97,.15) inset;
}

/* Smooth animations on all buttons */
.cc-ai-btn, .cc-qr-btn, .cc-photo-btn, .cc-fab-btn, .cc-fab-menu button,
.cc-dash-close, .cc-notif-close, .cc-photo-close, .cc-3d-close, .cc-showroom-close, .cc-kanban-close,
.cc-eq-tab, .cc-i18n-lang, .cc-ai-tab {
  transition: all 0.15s ease;
}

/* Scrollbar styling para todos os modais */
.cc-dash-body::-webkit-scrollbar,
.cc-notif-body::-webkit-scrollbar,
.cc-palette-results::-webkit-scrollbar,
.cc-photo-modal > div::-webkit-scrollbar {
  width: 6px;
}
.cc-dash-body::-webkit-scrollbar-thumb,
.cc-notif-body::-webkit-scrollbar-thumb,
.cc-palette-results::-webkit-scrollbar-thumb,
.cc-photo-modal > div::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.15);
  border-radius: 3px;
}
.cc-dash-body::-webkit-scrollbar-thumb:hover {
  background: rgba(201,169,97,.3);
}

/* Print: esconder badges/drawers */
@media print {
  #__cc_notifbadge, .cc-notif-overlay, .cc-dash-overlay { display: none !important; }
}

/* CONFETTI */
.cc-confetti-container {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100009;
  overflow: hidden;
}
.cc-confetti-piece {
  position: absolute; top: -20px;
  border-radius: 2px;
  animation: ccConfettiFall linear forwards;
}
@keyframes ccConfettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* ONBOARDING */
.cc-onb-overlay {
  position: fixed; inset: 0; z-index: 100010;
  background: rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  animation: ccFadeIn 0.3s ease;
}
.cc-onb {
  background: linear-gradient(160deg, #0a1929, #14375e);
  color: white;
  border-radius: 18px;
  max-width: 540px; width: 100%;
  border: 1px solid rgba(201,169,97,.4);
  box-shadow: 0 32px 100px rgba(0,0,0,.5);
  font-family: inherit;
  overflow: hidden;
  animation: ccPaletteIn 0.4s ease;
}
.cc-onb-header {
  padding: 32px 28px 18px;
  text-align: center;
  background: rgba(201,169,97,.08);
  border-bottom: 1px solid rgba(201,169,97,.2);
}
.cc-onb-emoji { font-size: 52px; margin-bottom: 8px; }
.cc-onb-header h2 { margin: 0 0 8px; font-size: 24px; color: #c9a961; }
.cc-onb-header p { margin: 0; font-size: 13px; color: rgba(255,255,255,.7); }
.cc-onb-tips { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.cc-onb-tip {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}
.cc-onb-tip:hover { background: rgba(201,169,97,.08); border-color: rgba(201,169,97,.3); }
.cc-onb-icon { font-size: 24px; }
.cc-onb-tip kbd {
  background: rgba(255,255,255,.1); padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-family: ui-monospace, monospace;
  color: #c9a961; font-weight: 700;
  margin-left: 6px;
}
.cc-onb-tip small { color: rgba(255,255,255,.5); display: block; margin-top: 4px; font-size: 11px; }
.cc-onb-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.15);
}

/* EXPORT MENU */
.cc-export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cc-export-btn {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  color: white;
  padding: 16px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.15s;
}
.cc-export-btn:hover { background: rgba(201,169,97,.1); border-color: #c9a961; transform: translateY(-1px); }
.cc-export-btn small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,.55);
  margin-top: 4px;
}

/* RELATÓRIO PICA-PONTO */
.cc-pp-overlay {
  position: fixed; inset: 0; z-index: 100007;
  background: rgba(0,0,0,.85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; align-items: stretch; justify-content: center;
  padding: 14px;
  animation: ccFadeIn 0.2s ease;
}
.cc-pp {
  width: 100%; max-width: 1400px; max-height: 95vh;
  background: linear-gradient(160deg, #0a1929, #14375e, #0a1929);
  color: white; border-radius: 18px;
  border: 1px solid rgba(201,169,97,.3);
  display: flex; flex-direction: column;
  font-family: inherit;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(0,0,0,.5);
}
.cc-pp-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.2);
  gap: 14px;
}
.cc-pp-header strong { font-size: 16px; color: #c9a961; display: block; }
.cc-pp-meta { font-size: 11px; color: rgba(255,255,255,.5); }
.cc-pp-select, .cc-pp-btn {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  color: white; padding: 7px 12px; border-radius: 8px;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.cc-pp-btn:hover, .cc-pp-select:hover { background: rgba(255,255,255,.12); }
.cc-pp-btn-primary { background: #c9a961; color: #0a1929; border-color: #c9a961; font-weight: 700; }
.cc-pp-btn-primary:hover { background: #d4b574; }
.cc-pp-close {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  color: white; width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; cursor: pointer;
}
.cc-pp-close:hover { background: rgba(220,38,38,.2); }
.cc-pp-body { padding: 22px; overflow-y: auto; flex: 1; }
.cc-pp-section { margin-bottom: 26px; }
.cc-pp-section h3 {
  font-size: 13px; color: #c9a961;
  text-transform: uppercase; letter-spacing: 1.2px;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201,169,97,.25);
}

/* KPIs Pica-Ponto */
.cc-pp-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.cc-pp-kpi {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 16px;
  position: relative; overflow: hidden;
}
.cc-pp-kpi::before {
  content: ""; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,.15);
}
.cc-pp-kpi-primary::before { background: linear-gradient(90deg, #c9a961, #e6c478); }
.cc-pp-kpi-success::before { background: #4ade80; }
.cc-pp-kpi-warn::before { background: #f59e0b; }
.cc-pp-kpi-cost {
  background: linear-gradient(160deg, rgba(201,169,97,.18), rgba(201,169,97,.06));
  border-color: rgba(201,169,97,.4);
}
.cc-pp-kpi-cost::before { background: linear-gradient(90deg, #c9a961, #e6c478, #c9a961); }
.cc-pp-kpi-l { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(255,255,255,.55); font-weight: 600; }
.cc-pp-kpi-v {
  font-size: 26px; font-weight: 800;
  margin: 6px 0 4px;
  letter-spacing: -0.5px;
  font-family: ui-monospace, monospace;
}
.cc-pp-kpi-cost .cc-pp-kpi-v { color: #c9a961; font-size: 28px; }
.cc-pp-kpi-success .cc-pp-kpi-v { color: #4ade80; }
.cc-pp-kpi-s { font-size: 11px; color: rgba(255,255,255,.5); }

/* Daily bars */
.cc-pp-daily {
  display: flex; align-items: flex-end; gap: 6px;
  height: 200px;
  padding: 14px;
  background: rgba(255,255,255,.03);
  border-radius: 10px;
}
.cc-pp-day {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  height: 100%; min-width: 0;
}
.cc-pp-day.weekend .cc-pp-day-bar { opacity: 0.5; background: linear-gradient(180deg, #94a3b8, #64748b); }
.cc-pp-day-val {
  font-size: 9px; color: rgba(255,255,255,.7);
  height: 14px;
  font-family: ui-monospace, monospace;
  font-weight: 600;
}
.cc-pp-day-bar {
  width: 100%;
  background: linear-gradient(180deg, #c9a961, #a48536);
  border-radius: 4px 4px 0 0;
  min-height: 3px;
  transition: height 0.5s ease;
}
.cc-pp-day-lbl { font-size: 9px; color: rgba(255,255,255,.5); margin-top: 5px; }
.cc-pp-day-dn { font-size: 8px; color: rgba(255,255,255,.35); }

/* Tabela colaboradores */
.cc-pp-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
  background: rgba(255,255,255,.03);
  border-radius: 8px; overflow: hidden;
}
.cc-pp-table th {
  background: rgba(0,0,0,.3); padding: 10px;
  text-align: left; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #c9a961;
  font-weight: 700;
}
.cc-pp-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.cc-pp-table .num { text-align: right; font-family: ui-monospace, monospace; }
.cc-pp-table .pos { color: #4ade80; font-weight: 700; }
.cc-pp-table .neg { color: #f87171; font-weight: 700; }
.cc-pp-table tfoot td {
  background: rgba(201,169,97,.1);
  border-top: 2px solid #c9a961;
  font-weight: 700;
}
.cc-pp-eff {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 11px;
  font-weight: 700; font-family: inherit;
}
.cc-pp-eff.good { background: rgba(74,222,128,.15); color: #4ade80; }
.cc-pp-eff.mid { background: rgba(245,158,11,.15); color: #facc15; }
.cc-pp-eff.low { background: rgba(220,38,38,.15); color: #f87171; }

.cc-pp-rate {
  width: 60px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: ui-monospace, monospace;
  text-align: right;
  outline: none;
}
.cc-pp-rate:focus { border-color: #c9a961; }
.cc-pp-hint {
  font-size: 11px; color: rgba(255,255,255,.45);
  margin-top: 10px; line-height: 1.4;
}

/* Multi-language quote picker */
.cc-ml-langs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cc-ml-lang {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: white;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.cc-ml-lang:hover {
  background: rgba(201,169,97,.15);
  border-color: #c9a961;
  transform: translateY(-2px);
}
.cc-ml-lang:active { transform: translateY(0); }
@media (max-width: 480px) {
  .cc-ml-langs { grid-template-columns: repeat(2, 1fr); }
}

/* Cross-reference */
.cc-pp-crossref {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.cc-pp-crossref-stat {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(201,169,97,.2);
  border-radius: 10px; padding: 14px;
  text-align: center;
}
.cc-pp-crossref-num {
  font-size: 28px; font-weight: 800;
  color: #c9a961;
  font-family: ui-monospace, monospace;
}
.cc-pp-crossref-lbl { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 4px; }

/* Recomendações */
.cc-pp-recs { display: flex; flex-direction: column; gap: 8px; }
.cc-pp-rec {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.cc-pp-rec-warn { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.25); }
.cc-pp-rec-success { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.25); }
.cc-pp-rec-info { background: rgba(59,130,246,.08); border-color: rgba(59,130,246,.25); }
.cc-pp-rec-icon { font-size: 20px; }
.cc-pp-rec-t { font-size: 13px; font-weight: 700; }
.cc-pp-rec-d { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 3px; line-height: 1.4; }

/* AUTH / LOGIN */
.cc-auth-overlay {
  position: fixed; inset: 0; z-index: 1000000;
  background: linear-gradient(160deg, #0a1929, #14375e, #0a1929);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: ccFadeIn 0.3s ease;
}
.cc-auth {
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(201,169,97,.3);
  border-radius: 18px;
  padding: 36px 32px;
  max-width: 380px; width: 100%;
  text-align: center;
  color: white; font-family: inherit;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  animation: ccPaletteIn 0.4s ease;
}
.cc-auth-icon { font-size: 56px; margin-bottom: 12px; }
.cc-auth h2 {
  margin: 0 0 12px; font-size: 22px;
  color: #c9a961;
}
.cc-auth p {
  font-size: 13px; color: rgba(255,255,255,.7);
  line-height: 1.5; margin-bottom: 24px;
}
.cc-auth input, .cc-auth select {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: white;
  border-radius: 10px;
  font-size: 16px; font-family: inherit;
  margin-bottom: 10px; outline: none;
  transition: border-color 0.15s;
}
.cc-auth input:focus, .cc-auth select:focus {
  border-color: #c9a961;
  background: rgba(255,255,255,.08);
}
.cc-auth input[type="password"] {
  letter-spacing: 8px;
  text-align: center;
  font-size: 22px;
  font-family: ui-monospace, monospace;
}
.cc-auth-hint {
  margin-top: 16px;
  font-size: 11px;
  color: rgba(255,255,255,.45);
  line-height: 1.4;
}

/* SESSION BADGE */
.cc-session-badge {
  position: fixed; bottom: 14px; right: 80px;
  z-index: 9994;
  background: rgba(10,25,41,0.85);
  color: white;
  border: 1px solid rgba(201,169,97,.3);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-weight: 600;
  transition: transform 0.15s, background 0.15s;
}
.cc-session-badge:hover { background: rgba(220,38,38,.2); transform: scale(1.05); }
.cc-session-icon { font-size: 16px; }

body[data-cc-role="employee"] .cc-session-badge {
  border-color: rgba(59,130,246,.4);
}

/* RESTRIÇÃO PARA FUNCIONÁRIOS (operator) — só medições */
body[data-cc-role="operator"] .cc-admin-only,
body[data-cc-role="employee"] .cc-admin-only { display: none !important; }

body[data-cc-role="operator"] .nav-item:not(.cc-allow-employee),
body[data-cc-role="operator"] .bn-item:not(.cc-allow-employee),
body[data-cc-role="employee"] .nav-item:not(.cc-allow-employee),
body[data-cc-role="employee"] .bn-item:not(.cc-allow-employee) {
  display: none !important;
}
body[data-cc-role="operator"] .kpi-grid,
body[data-cc-role="operator"] .dash-cols,
body[data-cc-role="operator"] .dash-hero-stats,
body[data-cc-role="operator"] .dash-quick-actions,
body[data-cc-role="operator"] .global-search-wrap,
body[data-cc-role="operator"] .nav-section,
body[data-cc-role="operator"] .nav-badge,
body[data-cc-role="employee"] .kpi-grid,
body[data-cc-role="employee"] .dash-cols,
body[data-cc-role="employee"] .dash-hero-stats,
body[data-cc-role="employee"] .dash-quick-actions,
body[data-cc-role="employee"] .global-search-wrap,
body[data-cc-role="employee"] .nav-section,
body[data-cc-role="employee"] .nav-badge {
  display: none !important;
}
body[data-cc-role="operator"] .topbar-page-title,
body[data-cc-role="employee"] .topbar-page-title {
  color: #c9a961 !important;
}
body[data-cc-role="operator"]::before {
  content: "Modo Operador · Medições + Folhas de Corte (só leitura)";
  position: fixed; top: 0; left: 50%;
  transform: translateX(-50%);
  background: #3b82f6; color: white;
  font-size: 11px; font-weight: 600;
  padding: 3px 14px; border-radius: 0 0 10px 10px;
  z-index: 9999; font-family: -apple-system, sans-serif;
}

/* MODO SÓ-LEITURA para operadores nas folhas de corte / séries */
/* Esconder botões de editar/apagar/criar/guardar séries, perfis, variantes, cuts */
body[data-cc-role="operator"] .btn-danger,
body[data-cc-role="operator"] .btn-edit,
body[data-cc-role="operator"] button[title*="apagar" i],
body[data-cc-role="operator"] button[title*="eliminar" i],
body[data-cc-role="operator"] button[title*="remover" i],
body[data-cc-role="operator"] button[title*="editar" i],
body[data-cc-role="operator"] button[onclick*="delete" i],
body[data-cc-role="operator"] button[onclick*="remove" i],
body[data-cc-role="operator"] button[onclick*="addNew" i],
body[data-cc-role="operator"] button[onclick*="addProfile" i],
body[data-cc-role="operator"] button[onclick*="addVariant" i],
body[data-cc-role="operator"] button[onclick*="addCut" i],
body[data-cc-role="operator"] .btn-add-cut,
body[data-cc-role="operator"] .btn-add-profile,
body[data-cc-role="operator"] .btn-add-variant {
  display: none !important;
}

/* Inputs/textareas de fórmulas e perfis: read-only visualmente */
body[data-cc-role="operator"] input[name*="formula" i],
body[data-cc-role="operator"] input[placeholder*="fórmula" i],
body[data-cc-role="operator"] input[placeholder*="formula" i],
body[data-cc-role="operator"] textarea[name*="formula" i],
body[data-cc-role="operator"] input[name*="profile" i],
body[data-cc-role="operator"] input[placeholder*="perfil" i] {
  pointer-events: none !important;
  background: rgba(0,0,0,0.04) !important;
  color: var(--text-soft) !important;
  cursor: not-allowed !important;
}

/* Operador: mostrar aviso "modo leitura" no topo do conteúdo */
body[data-cc-role="operator"] .container::before {
  content: "📖 Modo só leitura — não podes alterar fórmulas, perfis ou séries. Pede ao admin se for necessário modificar algo.";
  display: block;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.3);
  color: #1e40af;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  text-align: center;
}

/* RESTRIÇÃO PARA GERENTE DE OBRA (manager) — vê obras, clientes, mas não tesouraria/dashboards */
body[data-cc-role="manager"] .cc-admin-only { display: none !important; }
body[data-cc-role="manager"] .nav-item.cc-hide-manager,
body[data-cc-role="manager"] .bn-item.cc-hide-manager {
  display: none !important;
}
body[data-cc-role="manager"]::before {
  content: "Modo Gerente de Obra · sem acesso a tesouraria/preços";
  position: fixed; top: 0; left: 50%;
  transform: translateX(-50%);
  background: #8b5cf6; color: white;
  font-size: 11px; font-weight: 600;
  padding: 3px 14px; border-radius: 0 0 10px 10px;
  z-index: 9999; font-family: -apple-system, sans-serif;
}

/* BOTÕES FIXOS no topo (admin) */
.cc-team-btn-fixed, .cc-pp-btn-fixed {
  position: fixed;
  top: 4px;
  z-index: 9990;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.cc-team-btn-fixed {
  right: 200px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}
.cc-team-btn-fixed:hover {
  transform: scale(1.05) translateY(-1px);
  box-shadow: 0 8px 20px rgba(59,130,246,0.5);
}
.cc-pp-btn-fixed {
  right: 360px;
  background: linear-gradient(135deg, #c9a961, #a48536);
  color: #0a1929;
  box-shadow: 0 4px 12px rgba(201,169,97,0.4);
  font-weight: 700;
}
.cc-pp-link-fixed {
  position: fixed; top: 4px; right: 660px; z-index: 9990;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white; border: none;
  padding: 8px 16px; border-radius: 999px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(139,92,246,0.4);
  display: flex; align-items: center; gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.cc-pp-link-fixed:hover {
  transform: scale(1.05) translateY(-1px);
  box-shadow: 0 8px 20px rgba(139,92,246,0.5);
}
@media (max-width: 1400px) {
  .cc-pp-link-fixed { right: 12px; top: 170px; }
}
@media print { .cc-pp-link-fixed { display: none !important; } }

.cc-meas-btn-fixed {
  position: fixed; top: 4px; right: 510px; z-index: 9990;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(22,163,74,0.4);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.cc-meas-btn-fixed:hover {
  transform: scale(1.05) translateY(-1px);
  box-shadow: 0 8px 20px rgba(22,163,74,0.5);
}
@media (max-width: 1280px) {
  .cc-meas-btn-fixed { right: 12px; top: 130px; }
}
@media print { .cc-meas-btn-fixed { display: none !important; } }
.cc-pp-btn-fixed:hover {
  transform: scale(1.05) translateY(-1px);
  box-shadow: 0 8px 20px rgba(201,169,97,0.5);
}
@media (max-width: 1024px) {
  .cc-pp-btn-fixed { right: 12px; top: 50px; }
  .cc-team-btn-fixed { right: 12px; top: 90px; }
}
@media print {
  .cc-team-btn-fixed, .cc-pp-btn-fixed { display: none !important; }
}

/* EQUIPAMENTO V2 - manutenções múltiplas */
.cc-eq-summary {
  display: flex; gap: 8px; margin-bottom: 14px;
  flex-wrap: wrap;
}
.cc-eq-stat {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,.85);
}
.cc-eq-stat.danger { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.4); color: #f87171; }
.cc-eq-stat.warn { background: rgba(245,158,11,.15); border-color: rgba(245,158,11,.4); color: #fbbf24; }

.cc-eq-list-v2 { display: flex; flex-direction: column; gap: 8px; }
.cc-eq-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; overflow: hidden;
  transition: border-color 0.15s;
}
.cc-eq-card.has-overdue { border-color: rgba(239,68,68,.4); }
.cc-eq-card summary {
  list-style: none; cursor: pointer;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  user-select: none;
}
.cc-eq-card summary::-webkit-details-marker { display: none; }
.cc-eq-card summary::before {
  content: "▶"; font-size: 10px; color: rgba(255,255,255,.4);
  transition: transform 0.15s;
}
.cc-eq-card[open] summary::before { transform: rotate(90deg); }
.cc-eq-card summary:hover { background: rgba(255,255,255,.02); }
.cc-eq-card-info { flex: 1; min-width: 0; }
.cc-eq-name { display: block; font-size: 14px; font-weight: 700; }
.cc-eq-brand { display: inline; font-size: 11px; color: rgba(255,255,255,.5); margin-right: 8px; }
.cc-eq-resp { display: inline; font-size: 11px; color: rgba(255,255,255,.6); }
.cc-eq-badge {
  background: rgba(239,68,68,.15); color: #f87171;
  border: 1px solid rgba(239,68,68,.3);
  padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700;
}
.cc-eq-tasks-count {
  font-size: 10px; color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.05);
  padding: 2px 8px; border-radius: 4px;
}

.cc-eq-card-body {
  padding: 14px; padding-top: 0;
  border-top: 1px solid rgba(255,255,255,.05);
}
.cc-eq-fields {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  margin-top: 10px; margin-bottom: 12px;
}
.cc-eq-fields input {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 7px 10px; border-radius: 6px;
  font-size: 12px; font-family: inherit; outline: none;
}
.cc-eq-fields input:focus { border-color: #c9a961; }
.cc-eq-template-row {
  margin-bottom: 12px;
}
.cc-eq-template-row select {
  width: 100%;
  background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.3);
  color: white; padding: 8px 12px; border-radius: 6px;
  font-size: 12px; font-family: inherit; cursor: pointer; outline: none;
}
.cc-eq-h4 { font-size: 11px; color: #c9a961; text-transform: uppercase; letter-spacing: 1px; margin: 14px 0 8px; }
.cc-eq-tasks { display: flex; flex-direction: column; gap: 4px; }
.cc-eq-task {
  display: grid;
  grid-template-columns: 1.5fr 130px 60px 60px auto 30px 30px;
  gap: 4px; align-items: center;
  padding: 6px;
  background: rgba(255,255,255,.03);
  border-radius: 6px;
  border-left: 3px solid rgba(255,255,255,.1);
}
.cc-eq-task-overdue { border-left-color: #ef4444; background: rgba(239,68,68,.06); }
.cc-eq-task-soon { border-left-color: #f59e0b; background: rgba(245,158,11,.05); }
.cc-eq-task-ok { border-left-color: #4ade80; }
.cc-eq-task input {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 5px 8px; border-radius: 4px;
  font-size: 11px; font-family: inherit; outline: none;
}
.cc-eq-task input:focus { border-color: #c9a961; }
.cc-eq-task-status {
  font-size: 10px; color: rgba(255,255,255,.65);
  font-family: ui-monospace, monospace;
  text-align: center;
}
.cc-eq-task-overdue .cc-eq-task-status { color: #f87171; font-weight: 700; }
.cc-eq-task-soon .cc-eq-task-status { color: #fbbf24; font-weight: 700; }
.cc-eq-task-done {
  background: rgba(74,222,128,.15); border: 1px solid rgba(74,222,128,.4);
  color: #4ade80; cursor: pointer;
  width: 28px; height: 28px; border-radius: 6px;
  font-size: 14px; font-weight: 700;
}
.cc-eq-task-done:hover { background: rgba(74,222,128,.3); }
.cc-eq-task-del {
  background: transparent; border: none; color: #f87171;
  cursor: pointer; font-size: 16px;
  width: 28px; height: 28px;
}
.cc-eq-empty {
  font-size: 12px; color: rgba(255,255,255,.4);
  font-style: italic; text-align: center;
  padding: 12px;
}
.cc-eq-card-footer {
  display: flex; gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.05);
  flex-wrap: wrap;
}
.cc-eq-task-add, .cc-eq-history-btn, .cc-eq-card-del {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 6px 12px; border-radius: 6px;
  font-size: 11px; cursor: pointer; font-family: inherit;
}
.cc-eq-task-add:hover { background: rgba(74,222,128,.15); border-color: #4ade80; color: #4ade80; }
.cc-eq-history-btn:hover { background: rgba(201,169,97,.15); border-color: #c9a961; color: #c9a961; }
.cc-eq-card-del:hover { background: rgba(239,68,68,.15); border-color: #f87171; color: #f87171; }

/* HISTÓRICO */
.cc-eq-hist-summary {
  display: flex; justify-content: space-between;
  background: rgba(201,169,97,.08);
  padding: 10px 14px; border-radius: 8px;
  margin-bottom: 12px; font-size: 13px;
}
.cc-eq-hist-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.cc-eq-hist-item {
  background: rgba(255,255,255,.04);
  border-left: 3px solid #c9a961;
  padding: 10px 14px; border-radius: 6px;
  font-size: 12px;
  display: grid;
  grid-template-columns: 90px 1fr 70px auto;
  gap: 8px; align-items: center;
}
.cc-eq-hist-date { color: rgba(255,255,255,.6); font-family: ui-monospace, monospace; }
.cc-eq-hist-task { font-weight: 600; }
.cc-eq-hist-cost { color: #c9a961; font-weight: 700; text-align: right; font-family: ui-monospace, monospace; }
.cc-eq-hist-by { font-size: 10px; color: rgba(255,255,255,.5); }
.cc-eq-hist-notes {
  grid-column: 1/-1;
  font-size: 11px; color: rgba(255,255,255,.6);
  margin-top: 4px; font-style: italic;
}

/* CONSTRUTOR VISUAL — drag-and-drop */
.cc-builder-overlay {
  position: fixed; inset: 0; z-index: 100007;
  background: rgba(0,0,0,.85);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; padding: 8px;
}
.cc-builder {
  flex: 1;
  background: linear-gradient(160deg, #0a1929, #14375e);
  color: white; border-radius: 14px;
  border: 1px solid rgba(201,169,97,0.3);
  display: flex; flex-direction: column;
  font-family: inherit;
  overflow: hidden;
}
.cc-builder-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.25);
  gap: 10px;
}
.cc-builder-header strong { font-size: 14px; color: #c9a961; display: block; }
.cc-builder-meta { font-size: 11px; color: rgba(255,255,255,.6); }
.cc-builder-name {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.15);
  color: white; padding: 6px 10px; border-radius: 6px;
  font-size: 12px; width: 200px;
}
.cc-builder-btn {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  color: white; padding: 6px 12px; border-radius: 6px;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.cc-builder-btn:hover { background: rgba(255,255,255,.12); }
.cc-builder-btn-primary { background: #c9a961; color: #0a1929; border-color: #c9a961; font-weight: 700; }
.cc-builder-btn-primary:hover { background: #d4b574; }
.cc-builder-close {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  color: white; width: 32px; height: 32px; border-radius: 50%;
  font-size: 20px; cursor: pointer;
}

.cc-builder-body {
  flex: 1; display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 0;
  min-height: 0;
}
.cc-builder-palette, .cc-builder-sidebar {
  padding: 14px;
  background: rgba(0,0,0,.18);
  overflow-y: auto;
}
.cc-builder-palette { border-right: 1px solid rgba(255,255,255,.06); }
.cc-builder-sidebar { border-left: 1px solid rgba(255,255,255,.06); }
.cc-builder-palette h3, .cc-builder-sidebar h3 {
  font-size: 11px; color: #c9a961;
  text-transform: uppercase; letter-spacing: 1px;
  margin: 0 0 8px;
}
.cc-builder-hint { font-size: 10px; color: rgba(255,255,255,.45); margin-bottom: 10px; }

.cc-builder-items { display: flex; flex-direction: column; gap: 4px; }
.cc-builder-comp {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: grab;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.15s;
  user-select: none;
}
.cc-builder-comp:hover {
  background: rgba(201,169,97,.1);
  border-color: rgba(201,169,97,.4);
  transform: translateX(2px);
}
.cc-builder-comp:active { cursor: grabbing; }
.cc-builder-comp-icon { font-size: 18px; }
.cc-builder-comp-info { flex: 1; min-width: 0; }
.cc-builder-comp-name { font-size: 12px; font-weight: 600; }
.cc-builder-comp-dim { font-size: 10px; color: rgba(255,255,255,.5); font-family: ui-monospace, monospace; }

.cc-builder-tpl {
  width: 100%;
  background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.3);
  color: white; padding: 8px 10px; border-radius: 6px;
  font-size: 12px; cursor: pointer; font-family: inherit;
  margin-bottom: 4px; text-align: left;
}
.cc-builder-tpl:hover { background: rgba(74,222,128,.18); }

.cc-builder-canvas-wrap {
  display: flex; flex-direction: column;
  background: #1a2540;
  min-width: 0;
}
.cc-builder-toolbar {
  display: flex; gap: 6px; align-items: center;
  padding: 8px 12px;
  background: rgba(0,0,0,.3);
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 12px;
}
.cc-builder-tool {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 5px 10px; border-radius: 5px;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.cc-builder-tool:hover { background: rgba(201,169,97,.15); }
#builder-scale { color: rgba(255,255,255,.5); margin: 0 6px; font-family: ui-monospace, monospace; }

.cc-builder-canvas {
  flex: 1; overflow: auto;
  padding: 14px;
  min-height: 0;
}
.cc-builder-canvas svg {
  width: 100%; min-width: 800px;
  height: auto; max-height: 100%;
  background: rgba(0,0,0,.3);
  border-radius: 8px;
  cursor: default;
}
.builder-item rect[data-act="move"] { cursor: move; transition: stroke-width 0.1s; }
.builder-item.selected rect[data-act="move"] { stroke-dasharray: none; }
.resize-handle { fill: #c9a961; stroke: white; stroke-width: 1; cursor: nwse-resize; }
.resize-handle[data-h="e"] { cursor: ew-resize; }
.resize-handle[data-h="s"] { cursor: ns-resize; }

.cc-builder-status {
  padding: 6px 12px;
  background: rgba(0,0,0,.2);
  font-size: 11px; color: rgba(255,255,255,.6);
  border-top: 1px solid rgba(255,255,255,.06);
}

.cc-builder-bom-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 6px; align-items: center;
  padding: 6px 8px;
  background: rgba(255,255,255,.04);
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 11px;
}
.cc-builder-bom-name { color: rgba(255,255,255,.85); }
.cc-builder-bom-qty { color: #c9a961; font-weight: 700; }
.cc-builder-bom-cost { color: #4ade80; font-family: ui-monospace, monospace; font-weight: 700; }
.cc-builder-bom-cat {
  font-size: 9px; padding: 2px 6px; border-radius: 4px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.cc-builder-bom-len, .cc-builder-bom-area {
  font-size: 10px; color: #c9a961; font-family: ui-monospace, monospace; font-weight: 700;
}
.cc-builder-sel-tag {
  display: inline-block; padding: 4px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.cc-builder-sel-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  margin-top: 12px;
}
.cc-builder-sel-btn {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 6px 8px; border-radius: 5px;
  font-size: 11px; cursor: pointer; font-family: inherit;
}
.cc-builder-sel-btn:hover { background: rgba(201,169,97,.15); border-color: #c9a961; }
.cc-builder-sel-del { background: rgba(220,38,38,.15) !important; border-color: rgba(220,38,38,.3) !important; color: #f87171 !important; }
.cc-builder-sel-del:hover { background: rgba(220,38,38,.3) !important; }
.cc-builder-sel-hint {
  font-size: 9px; color: rgba(255,255,255,.4);
  margin-top: 8px; text-align: center; line-height: 1.5;
}
.builder-item.selected rect[data-act="move"] {
  filter: drop-shadow(0 0 4px rgba(251,191,36,0.6));
}
.cc-builder-empty { font-size: 11px; color: rgba(255,255,255,.4); text-align: center; padding: 14px; font-style: italic; }
.cc-builder-sel-card {
  background: rgba(201,169,97,.08);
  border: 1px solid rgba(201,169,97,.3);
  border-radius: 8px; padding: 10px;
}
.cc-builder-sel-card label {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 10px; color: rgba(255,255,255,.6);
}
.cc-builder-sel-card input {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 5px 8px; border-radius: 4px;
  font-size: 11px; font-family: ui-monospace, monospace; outline: none;
}

@media (max-width: 1200px) {
  .cc-builder-body { grid-template-columns: 180px 1fr 220px; }
}
@media (max-width: 900px) {
  .cc-builder-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .cc-builder-palette { max-height: 200px; }
  .cc-builder-sidebar { max-height: 200px; }
}

/* CONSTRUTOR — modo telemóvel (≤640px) — palette horizontal + sidebar drawer */
#builder-svg [data-act="move"], #builder-svg .resize-handle { touch-action: none; }
.cc-builder-canvas { touch-action: pan-x pan-y; }

.cc-builder-comp.just-added {
  animation: ccCompPulse .35s ease;
  background: rgba(74,222,128,.25) !important;
  border-color: rgba(74,222,128,.6) !important;
}
@keyframes ccCompPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@media (max-width: 640px) {
  .cc-builder-overlay { padding: 0; }
  .cc-builder { border-radius: 0; height: 100%; height: 100dvh; }

  /* Header: empilha em 2 linhas e dá ao input de nome a largura toda */
  .cc-builder-header {
    padding: 8px 10px 10px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .cc-builder-header > div:first-child {
    flex: 1 1 100%;
    display: flex; align-items: center; justify-content: space-between;
    min-width: 0;
  }
  .cc-builder-header strong { font-size: 13px; }
  .cc-builder-meta { font-size: 10.5px; display: block; margin-top: 1px; }
  .cc-builder-header > div:last-child {
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 5px;
  }
  .cc-builder-name {
    width: 100%;
    flex: 1 1 100%;
    padding: 9px 11px;
    font-size: 13px;
    min-height: 38px;
  }
  .cc-builder-btn {
    flex: 1 1 calc(33.333% - 4px);
    min-width: 0;
    padding: 9px 6px;
    font-size: 11.5px;
    min-height: 38px;
    text-align: center;
    justify-content: center;
  }
  .cc-builder-btn-primary { flex-basis: 100%; }
  .cc-builder-close {
    position: absolute;
    top: 8px; right: 10px;
    width: 32px; height: 32px;
    font-size: 18px;
  }

  /* Body em colunas verticais: palette compacta no topo, canvas no meio, sidebar em baixo */
  .cc-builder-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  /* PALETTE: carrossel horizontal de chips em vez de lista vertical scrollada */
  .cc-builder-palette {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 8px 8px 6px;
  }
  .cc-builder-palette h3 { display: none; }
  .cc-builder-hint {
    font-size: 10px;
    color: rgba(201,169,97,.7);
    margin-bottom: 6px;
    text-align: center;
  }
  .cc-builder-hint::before { content: "👆 Toca um componente para o adicionar  ·  "; }
  .cc-builder-items {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cc-builder-items::-webkit-scrollbar { display: none; }
  .cc-builder-comp {
    flex: 0 0 96px;
    flex-direction: column;
    width: 96px;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
  }
  .cc-builder-comp:hover { transform: none; }
  .cc-builder-comp:active { transform: scale(.95); background: rgba(201,169,97,.18); }
  .cc-builder-comp-icon { font-size: 22px; margin-bottom: 2px; }
  .cc-builder-comp-info { width: 100%; text-align: center; }
  .cc-builder-comp-name { font-size: 10.5px; line-height: 1.2; }
  .cc-builder-comp-dim { font-size: 9px; line-height: 1.2; opacity: .7; }

  /* Templates inline horizontal */
  .cc-builder-palette h3 + .cc-builder-tpl,
  .cc-builder-tpl {
    width: auto;
    display: inline-block;
    padding: 6px 10px;
    font-size: 11px;
    margin: 4px 4px 0 0;
  }

  /* Toolbar do canvas: mais compacto e tap-friendly */
  .cc-builder-toolbar {
    padding: 6px 8px;
    gap: 4px;
    flex-wrap: wrap;
  }
  .cc-builder-tool {
    padding: 8px 10px;
    font-size: 12px;
    min-height: 36px;
  }
  #builder-scale { font-size: 10.5px; flex: 1; text-align: center; }

  /* Canvas: deixa scroll horizontal mas reduz o min-width para caber melhor */
  .cc-builder-canvas { padding: 8px; }
  .cc-builder-canvas svg { min-width: 600px; }

  .cc-builder-status { padding: 5px 10px; font-size: 10.5px; }

  /* SIDEBAR como drawer inferior, conteúdo compacto */
  .cc-builder-sidebar {
    max-height: 38vh;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 10px;
  }
  .cc-builder-sidebar h3 {
    font-size: 10px;
    margin: 0 0 6px;
  }
  .cc-builder-sidebar h3:nth-of-type(2) { margin-top: 10px; }
  .cc-builder-bom-row {
    font-size: 11px;
    padding: 6px 8px;
    grid-template-columns: auto 1fr auto auto;
    gap: 5px;
  }
  .cc-builder-sel-card { padding: 9px 10px; }
  .cc-builder-sel-tag { font-size: 10px; padding: 3px 8px; }
  .cc-builder-sel-card label { font-size: 10px; }
  .cc-builder-sel-card input {
    padding: 8px 10px; font-size: 13px; min-height: 36px;
  }
  .cc-builder-sel-actions { gap: 5px; margin-top: 10px; }
  .cc-builder-sel-btn { padding: 9px 6px; font-size: 11px; min-height: 36px; }
  .cc-builder-sel-hint { display: none; }

  /* Itens do canvas — handles maiores para o dedo */
  .resize-handle { stroke-width: 1.5; }
}

/* Tablet pequeno em paisagem (641-900px): mantém 3 col mas mais compacto */
@media (min-width: 641px) and (max-width: 900px) {
  .cc-builder-body { grid-template-columns: 160px 1fr 200px; }
}

/* FORMA LIVRE - controlos */
.cc-fh-controls {
  display: flex; gap: 6px; align-items: center;
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  flex-wrap: wrap;
}
.cc-fh-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px; cursor: pointer;
  font-family: inherit;
}
.cc-fh-btn:hover { background: rgba(74,222,128,0.15); border-color: #4ade80; color: #4ade80; }
.cc-fh-hint {
  font-size: 10px; color: rgba(255,255,255,0.5);
  margin-left: auto;
}

/* QUICK QUOTE */
.cc-qq-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 12px;
  margin-bottom: 16px;
}
.cc-qq-form label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; color: rgba(255,255,255,.7);
  font-weight: 600;
}
.cc-qq-form input, .cc-qq-form select {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 9px 12px; border-radius: 6px;
  font-size: 13px; font-family: inherit; outline: none;
}
.cc-qq-form input:focus, .cc-qq-form select:focus { border-color: #c9a961; }
.cc-qq-toggle {
  display: flex !important; flex-direction: row !important;
  align-items: center; gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  background: rgba(255,255,255,.04);
  border-radius: 6px;
}
.cc-qq-toggle input { width: auto; margin: 0; }

.cc-qq-result {
  background: rgba(201,169,97,.08);
  border: 1px solid rgba(201,169,97,.3);
  border-radius: 10px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.cc-qq-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cc-qq-row:last-child { border-bottom: none; padding-bottom: 0; }
.cc-qq-row strong {
  font-family: ui-monospace, monospace;
  color: #c9a961;
}
.cc-qq-total {
  margin-top: 6px; padding-top: 14px;
  border-top: 2px solid rgba(201,169,97,.4) !important;
  font-size: 16px;
}
.cc-qq-total strong { font-size: 22px; color: #4ade80; }

/* INSIGHTS */
.cc-insights-list { display: flex; flex-direction: column; gap: 10px; }
.cc-insight {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px;
  padding: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  transition: transform 0.15s;
}
.cc-insight:hover { transform: translateX(4px); }
.cc-insight-warn { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.3); border-left: 4px solid #f59e0b; }
.cc-insight-danger { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3); border-left: 4px solid #ef4444; }
.cc-insight-success { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.3); border-left: 4px solid #4ade80; }
.cc-insight-info { background: rgba(59,130,246,.08); border-color: rgba(59,130,246,.3); border-left: 4px solid #3b82f6; }
.cc-insight-icon {
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
}
.cc-insight-title { font-size: 14px; font-weight: 700; color: white; }
.cc-insight-detail { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 4px; line-height: 1.5; }

/* Foto de perfil no badge da sessão */
.cc-session-photo {
  width: 24px; height: 24px; border-radius: 50%;
  object-fit: cover;
}

/* TEAM CARDS */
.cc-team-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; margin-bottom: 8px;
  transition: border-color 0.15s, transform 0.15s;
}
.cc-team-card:hover { border-color: rgba(201,169,97,.4); }
.cc-team-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #c9a961, #a48536);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #0a1929; font-size: 16px;
  overflow: hidden;
}
.cc-team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cc-team-info { min-width: 0; }
.cc-team-card-name { font-weight: 700; font-size: 14px; }
.cc-team-card-role { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 2px; }
.cc-team-card-perm { font-size: 11px; font-weight: 600; margin-top: 4px; }
.cc-team-actions { display: flex; gap: 4px; }
.cc-team-actions button {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; width: 32px; height: 32px; border-radius: 6px;
  cursor: pointer; font-size: 14px; transition: background 0.15s;
}
.cc-team-actions button:hover { background: rgba(201,169,97,.15); }
.cc-team-actions button[data-act="del"]:hover { background: rgba(220,38,38,.15); border-color: #f87171; color: #f87171; }

/* PROFILE EDITOR */
.cc-prof-photo-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; margin-bottom: 14px;
  background: rgba(255,255,255,.04);
  border-radius: 10px;
}
.cc-prof-photo {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, #c9a961, #a48536);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  font-size: 32px;
}
.cc-prof-photo img { width: 100%; height: 100%; object-fit: cover; }
.cc-prof-photo-placeholder { color: rgba(10,25,41,.5); }

.cc-prof-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.cc-prof-fields label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; color: rgba(255,255,255,.7);
  font-weight: 600;
}
.cc-prof-fields label:has(input[type="text"][required]) { grid-column: 1 / -1; }
.cc-prof-fields input {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 9px 12px; border-radius: 6px;
  font-size: 13px; font-family: inherit; outline: none;
}
.cc-prof-fields input:focus { border-color: #c9a961; }

.cc-prof-roles { display: flex; flex-direction: column; gap: 8px; }
.cc-prof-role {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px;
  align-items: center; padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border: 2px solid rgba(255,255,255,.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.cc-prof-role:hover { border-color: rgba(255,255,255,.2); }
.cc-prof-role.active { border-color: var(--rc); background: rgba(201,169,97,.08); }
.cc-prof-role input { display: none; }
.cc-prof-role-icon { font-size: 28px; grid-row: 1 / 3; }
.cc-prof-role-name { font-size: 14px; font-weight: 700; color: var(--rc); }
.cc-prof-role-desc { font-size: 11px; color: rgba(255,255,255,.6); }

/* PP IMPORT */
.cc-team-pp-import {
  background: rgba(74,222,128,.06);
  border: 1px solid rgba(74,222,128,.25);
  padding: 14px; border-radius: 10px;
  margin-bottom: 12px;
}
.cc-team-pp-import strong { color: #4ade80; font-size: 13px; }
.cc-team-pp-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.cc-team-pp-item {
  background: rgba(74,222,128,.1);
  border: 1px solid rgba(74,222,128,.3);
  color: white; padding: 8px 12px; border-radius: 8px;
  font-size: 12px; cursor: pointer;
  font-family: inherit;
  display: flex; flex-direction: column; align-items: flex-start;
  transition: all 0.15s;
}
.cc-team-pp-item:hover { background: rgba(74,222,128,.2); transform: translateY(-1px); }
.cc-team-pp-item small { font-size: 9px; color: rgba(255,255,255,.6); margin-top: 2px; }

/* TEAM MANAGER */
.cc-team-add {
  display: grid; grid-template-columns: 1fr 130px auto; gap: 6px;
  margin-bottom: 14px;
}
.cc-team-add input {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 8px 10px; border-radius: 6px;
  font-size: 12px; font-family: inherit; outline: none;
}
.cc-team-add input:focus { border-color: #c9a961; }
.cc-team-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  margin-bottom: 6px;
}
.cc-team-name { flex: 1; font-size: 13px; }
.cc-team-pin, .cc-team-del {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: white; padding: 5px 10px; border-radius: 4px;
  font-size: 11px; cursor: pointer; font-family: inherit;
}
.cc-team-pin:hover { background: rgba(201,169,97,.15); border-color: #c9a961; }
.cc-team-del:hover { background: rgba(220,38,38,.15); border-color: #f87171; color: #f87171; }

/* Quando instalada/standalone, esconder install btn */
@media (display-mode: standalone) {
  .cc-install-btn { display: none !important; }
}

/* Print */
@media print {
  #__cc_toast, #__cc_banner, #__cc_net, #__cc_install, #__cc_fab,
  #__cc_palette, #__cc_calc, #__cc_statusbar, .cc-photo-overlay { display: none !important; }
}

/* Esconder install-btn-group antigo do app original */
.install-btn-group { display: none !important; }

/* Esconder toasts hardcoded com "Descarregado" da app original */
#toast-container .toast,
.toast-container .toast {
  display: none !important;
}
