/* ── Variables ─────────────────────────────────────────────── */
:root {
  --primary:      #28569E;
  --primary-dark: #1E4080;
  --primary-light:#C5D5EA;
  --accent:       #FF6F00;
  --bg:           #F5F5F5;
  --surface:      #FFFFFF;
  --text:         #212121;
  --text-sec:     #757575;
  --divider:      #E0E0E0;
  --success-bg:   #E8F5E9;
  --success-text: #2E7D32;
  --error-bg:     #FFEBEE;
  --error-text:   #C62828;
}

/* ── Sidenav direita ───────────────────────────────────────── */
.sidenav {
  top: 64px !important;
  height: calc(100% - 64px) !important;
  z-index: 1001 !important;
}
.sidenav-overlay {
  top: 64px !important;
  z-index: 1000 !important;
}

/* ── Avatar círculo genérico (navbar futura, perfil, etc.) ── */
.avatar-circle {
  border-radius: 50%;
  object-fit: cover;
}

/* ── Upload de foto: preview ──────────────────────────────── */
.foto-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.foto-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--divider);
}
.foto-preview-initials {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  border: 3px solid var(--divider);
}

/* ── Base ──────────────────────────────────────────────────── */
body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ── Navbar ────────────────────────────────────────────────── */
.sp-nav {
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  position: sticky;
  top: 0;
  z-index: 999;
}


/* Navbar: logo esquerda | SinglePoint centro | hamburger direita */
.sp-nav {
  height: 64px;
  overflow: hidden;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

.sp-nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 64px;
  padding: 0;
  position: relative;
  min-width: 0;
  width: 100%;
}

/* Logo: ocupa exatamente toda a altura da barra, colado à esquerda */
.sp-nav-logo {
  display: flex;
  align-items: center;
  height: 64px;
  flex: 0 0 auto;
  padding: 0 0 0 14px;
  overflow: hidden;
}
.sp-nav-logo img {
  height: 42px;
  width: auto;
  display: block;
}

/* Nome alinhado à esquerda */
.sp-brand {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: 16px;
  padding-right: 8px;
  height: 64px;
  color: #fff !important;
  min-width: 0;
  width: 0;
  overflow: hidden;
}
.sp-brand-app {
  font-size: .72rem;
  font-weight: 500;
  line-height: 1.1;
  opacity: .9;
  letter-spacing: .3px;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-brand-module {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .2px;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-brand.sp-brand--single .sp-brand-app {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  opacity: 1;
}
.sp-brand.sp-brand--single .sp-brand-module {
  display: none;
}

.sp-nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  height: 64px;
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
}

/* Avatar + nome do usuário à direita */
.sp-nav-user-trigger {
  display: flex !important;
  align-items: center;
  gap: 8px;
  height: 64px;
  float: none !important;
  position: static !important;
  right: auto !important;
  left: auto !important;
  flex: 0 0 auto;
  flex-shrink: 0;
  cursor: default;
  padding: 0 10px 0 8px;
  text-decoration: none !important;
}
.sp-nav-menu-trigger {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 64px;
  color: #fff !important;
  padding: 0 10px;
}
.sp-nav-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: normal;
}
.sp-nav-user-name {
  font-size: .85rem;
  font-weight: 500;
  color: #fff !important;
  white-space: nowrap;
}
.sp-nav-user-login {
  font-size: .72rem;
  color: rgba(255,255,255,.75) !important;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .sp-brand {
    padding-left: 12px;
    padding-right: 2px;
  }
  .sp-nav-user-trigger {
    gap: 4px;
    padding: 0 6px 0 4px;
  }
  .sp-brand-app { font-size: .68rem; }
  .sp-brand-module { font-size: .95rem; }
  .sp-brand.sp-brand--single .sp-brand-app { font-size: .95rem; }
  .sp-nav-user-info { display: none; }
  .sp-app-toolbar { display: none !important; }
  .sp-toolbar-show { display: none !important; }
}
/* mantém classe antiga usada em outros lugares */
.sp-nav-hamburger {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0 12px;
}
.sp-nav-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(255,255,255,.8);
  flex-shrink: 0;
}
.sp-nav-avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  border: 2px solid rgba(255,255,255,.8);
  color: #fff;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .5px;
  flex-shrink: 0;
}

/* ── Sidenav ───────────────────────────────────────────────── */
.sidenav {
  border-radius: 0 12px 12px 0;
}

.sidenav .user-view {
  padding: 28px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidenav-bg {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
}

.sidenav .name { font-size: 1rem; font-weight: 500; }
.sidenav .email { font-size: .8rem; }

.badge-admin-chip {
  background: rgba(255,255,255,.25);
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}

.sidenav li > a {
  color: #424242;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 0 24px 24px 0;
  margin-right: 8px;
  transition: background .15s, color .15s;
}

.sidenav li > a:hover,
.sidenav li > a:focus {
  background: #E3F2FD;
  color: var(--primary);
}

.sidenav li > a .material-icons { color: #757575; transition: color .15s; }
.sidenav li > a:hover .material-icons { color: var(--primary); }
.sidenav .subheader { color: var(--text-sec) !important; font-size: .75rem; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }

/* ── Apps Launcher ─────────────────────────────────────────── */
.apps-launcher {
  padding: 8px 0 20px;
}
.apps-head h5 {
  margin: 0 0 4px;
  font-weight: 600;
}
.apps-head p {
  margin: 0 0 16px;
  color: var(--text-sec);
}
.apps-section-title {
  margin: 18px 0 10px;
  font-size: .92rem;
  font-weight: 700;
  color: #455A64;
}
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}
.app-tile {
  background: #fff;
  border: 1px solid #ECEFF1;
  border-radius: 14px;
  padding: 14px 10px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.app-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  border-color: #CFD8DC;
}
.app-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-icon .material-icons {
  font-size: 28px;
}
.app-name {
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}
.app-group {
  font-size: .72rem;
  color: #78909C;
}
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.module-tile {
  background: #fff;
  border: 1px solid #ECEFF1;
  border-radius: 16px;
  padding: 28px 20px 22px;
  text-align: center;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  user-select: none;
}
.module-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,.09);
  border-color: #CFD8DC;
}
.module-tile-active {
  border-color: #1565C0;
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
}
.module-tile-disabled {
  opacity: .55;
  cursor: default;
}
.module-badge-soon {
  display: inline-block;
  margin-top: 8px;
  font-size: .68rem;
  font-weight: 600;
  color: #78909C;
  background: #ECEFF1;
  border-radius: 20px;
  padding: 2px 10px;
}
/* ── Sidenav module items ───────────────────────────── */
.sidenav-mod-label {
  padding: 4px 16px 2px;
  pointer-events: none;
}
.sidenav-mod-label span {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #90A4AE;
}
.sidenav-module-switch {
  color: #607D8B !important;
  font-size: .88rem !important;
}
.sidenav-module-switch .material-icons {
  color: #90A4AE !important;
}

/* ── Admin Module Editor ────────────────────────────── */
.modform-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.modform-app-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #ECEFF1;
  border-radius: 10px;
  cursor: grab;
  transition: border-color .12s, background .12s;
  user-select: none;
  position: relative;
}
.modform-app-item input[type=checkbox] {
  display: none;
}
.modform-app-item:hover {
  background: #F5F7FA;
}
.modform-app-checked {
  border-color: #1565C0;
  background: #E3F2FD;
}
.modform-app-item.modform-app-dragging {
  opacity: 0.35;
  border-style: dashed;
  cursor: grabbing;
}
.modform-app-item.modform-app-dragover {
  border-color: #1565C0;
  background: #BBDEFB;
  border-style: dashed;
}
.modform-drag-handle {
  position: absolute;
  top: 3px;
  right: 5px;
  color: #CFD8DC;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity .1s;
  pointer-events: none;
}
.modform-app-item:hover .modform-drag-handle {
  opacity: 1;
}
.modform-app-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.modform-app-icon .material-icons {
  font-size: 16px;
}
.modform-app-name {
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
}
.module-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.module-icon .material-icons {
  font-size: 34px;
}
.module-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

@media (max-width: 840px) {
  .modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .module-tile {
    padding: 22px 14px 18px;
    border-radius: 14px;
  }
  .module-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin-bottom: 10px;
  }
  .module-icon .material-icons {
    font-size: 30px;
  }
}

@media (max-width: 380px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }
}
.module-desc {
  font-size: .76rem;
  color: #78909C;
  line-height: 1.4;
}
.apps-view-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.apps-view-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #ECEFF1;
}
.apps-back-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-sec);
  text-decoration: none;
  transition: color .12s;
}
.apps-back-link:hover {
  color: var(--primary);
}
.apps-back-link .material-icons {
  font-size: 18px;
}
.apps-view-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.apps-view-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.apps-empty {
  text-align: center;
  padding: 48px 20px;
  color: #90A4AE;
}
.apps-empty .material-icons {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}
.apps-empty p {
  font-size: .9rem;
  margin: 0;
}

/* ── Alerts / Flash ────────────────────────────────────────── */
.sp-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: .9rem;
  font-weight: 500;
  animation: fadeIn .3s ease;
}

.sp-alert-success { background: var(--success-bg); color: var(--success-text); }
.sp-alert-error   { background: var(--error-bg);   color: var(--error-text);   }

@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

/* ── Main ──────────────────────────────────────────────────── */
.sp-wrap {
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

.sp-main {
  padding-top: 24px;
  padding-bottom: 80px;
}

body { padding-top: 112px; } /* JS ajusta dinamicamente */
body.page-apps { padding-top: 64px; }
body.page-apps .sp-app-toolbar { display: none; }

/* ── App toolbar (always-visible icon dock) ─────────────────── */
.sp-app-toolbar {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 998;
  background: #fff;
  border-bottom: 1px solid #E8ECEF;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  height: auto;
  min-height: 58px;
  transition: min-height .18s, box-shadow .18s;
}
.sp-app-toolbar.toolbar-collapsed {
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden;
  border-bottom: none;
  box-shadow: none;
}
/* Botão flutuante para reexibir toolbar quando oculta */
.sp-toolbar-show {
  position: fixed;
  top: 64px;
  right: 12px;
  z-index: 999;
  background: #fff;
  border: 1px solid #E0E7EC;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 2px 10px 4px;
  cursor: pointer;
  color: #90A4AE;
  font-size: .65rem;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.sp-toolbar-show:hover { color: #1565C0; }
.sp-toolbar-show.visible { display: flex; }

.sp-app-toolbar-inner {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 6px 44px 6px 16px;
  gap: 2px;
  position: relative;
}
.sp-toolbar-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  padding: 5px 4px;
  border-radius: 8px;
  gap: 4px;
  width: 76px;
  transition: background .12s;
}
.sp-toolbar-app:hover {
  background: #F5F7FA;
}
.sp-toolbar-app-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.sp-toolbar-app-icon .material-icons {
  font-size: 20px;
}
.sp-toolbar-app-label {
  font-size: .68rem;
  font-weight: 500;
  color: #607D8B;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  line-height: 1.25;
}
.sp-toolbar-sep {
  width: 1px;
  align-self: stretch;
  background: #E0E7EC;
  margin: 4px 6px;
  flex-shrink: 0;
}
.sp-toolbar-module {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2px;
}
/* Botão ocultar dentro da toolbar */
.sp-toolbar-toggle {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 28px;
  height: 28px;
  border: 1px solid #E0E7EC;
  background: #F8FAFC;
  border-radius: 6px;
  cursor: pointer;
  color: #90A4AE;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .12s, color .12s;
}
.sp-toolbar-toggle:hover { background: #E3F2FD; color: #1565C0; }

/* ── Page header ───────────────────────────────────────────── */
.sp-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.sp-page-header h5 {
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

.sp-subtitle {
  color: var(--text-sec);
  font-size: .875rem;
  margin: 2px 0 0;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  background: var(--primary);
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: none;
  font-size: .9rem;
}

.btn:hover, .btn:focus { background: var(--primary-dark); }

.sp-btn-flat {
  color: var(--primary) !important;
  font-weight: 500;
  text-transform: none;
  font-size: .875rem;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: background .15s;
  color: #616161;
}

.btn-icon:hover { background: rgba(0,0,0,.07); }
.btn-icon .material-icons { font-size: 20px; }

/* ── Table ─────────────────────────────────────────────────── */
.sp-table {
  width: 100%;
  border-collapse: collapse;
}

.sp-table th {
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-sec);
  padding: 12px 16px;
  border-bottom: 2px solid var(--divider);
  white-space: nowrap;
}

.sp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
  font-size: .9rem;
  vertical-align: middle;
}

.sp-table tbody tr:last-child td { border-bottom: none; }
.sp-table tbody tr:hover { background: #FAFAFA; }

/* ── Badges ────────────────────────────────────────────────── */
.badge-ativo, .badge-inativo, .badge-admin, .badge-normal {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ativo   { background: var(--success-bg); color: var(--success-text); }
.badge-inativo { background: var(--error-bg);   color: var(--error-text);   }
.badge-admin   { background: #E8EAF6; color: #283593; }
.badge-normal  { background: #F5F5F5; color: #616161; }

/* ── User cards (mobile) ───────────────────────────────────── */
.sp-user-card { border-radius: 8px; margin-bottom: 12px; }
.sp-user-name { font-weight: 600; font-size: 1rem; margin: 0 0 2px; }
.sp-user-login { color: var(--text-sec); font-size: .85rem; margin: 0; }
.sp-user-perfis { color: var(--text-sec); font-size: .8rem; margin: 8px 0 0; display:flex; align-items:center; gap:4px; }

/* ── Kanban grid ───────────────────────────────────────────── */
.sp-kanban-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.sp-perfil-card-link { display: block; text-decoration: none; }

.sp-perfil-card {
  border-radius: 10px;
  border-top: 4px solid var(--primary);
  transition: transform .2s, box-shadow .2s;
  height: 100%;
}

.sp-perfil-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,.14) !important;
}

.sp-perfil-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.sp-perfil-icon {
  font-size: 36px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 50%;
  padding: 10px;
}

.sp-perfil-nome {
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  color: var(--text);
  margin: 0 0 6px;
}

.sp-perfil-desc {
  font-size: .85rem;
  color: var(--text-sec);
  text-align: center;
  margin: 0;
}

.sp-perfil-stats {
  display: flex;
  justify-content: space-around;
  color: var(--text-sec);
  font-size: .8rem;
  border-top: 1px solid var(--divider);
}

.sp-perfil-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Funcionalidades (perfil detalhe) ──────────────────────── */
.sp-func-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}

.sp-func-item:last-child { border-bottom: none; }

.sp-func-nome { font-weight: 500; font-size: .95rem; }

.sp-func-desc {
  font-size: .8rem;
  color: var(--text-sec);
  margin: 3px 0 0 26px;
}

/* ── Modals ────────────────────────────────────────────────── */
.sp-modal { border-radius: 12px; max-width: 540px; width: 95% !important; }

.sp-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

.sp-modal-title .material-icons { color: var(--primary); }

.sp-field-label {
  font-size: .8rem;
  color: var(--text-sec);
  display: block;
  margin-bottom: 6px;
}

/* ── Dashboard welcome ─────────────────────────────────────── */
.sp-welcome-card { border-radius: 10px; }
.sp-empty-icon { font-size: 56px; color: #BDBDBD; }

/* ── Login ─────────────────────────────────────────────────── */
.login-body {
  height: 100%;
  overflow: hidden;
  padding-top: 0 !important;
  background: linear-gradient(150deg, #1565C0 0%, #1976D2 55%, #42A5F5 100%);
}

.login-wrapper {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 16px !important;
  overflow: hidden;
  margin: 0 !important;
  flex-shrink: 0;
}

.login-logo-area {
  text-align: center;
  padding: 28px 24px 4px;
  background: #fff;
}

.login-logo-img {
  height: 120px;
  width: auto;
}

.login-logo-area p {
  color: var(--text-sec);
  margin: 6px 0 0;
  font-size: .9rem;
}

@media (max-height: 700px), (max-width: 420px) {
  .login-logo-img { height: 80px; }
  .login-logo-area { padding: 20px 24px 4px; }
}

.login-form-area { padding: 20px 40px 28px !important; }

/* Compensa o prefix-icon (3rem) espelhando o mesmo espaço à direita,
   centralizando o input visualmente em relação ao botão Entrar */
.login-form-area .input-field {
  padding-right: 3rem;
}

.login-form-area .input-field input {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.login-btn {
  width: 100%;
  background: var(--primary) !important;
  text-transform: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .3px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.08) !important;
}

/* ── Checkbox accent ───────────────────────────────────────── */
[type="checkbox"].filled-in:checked + span:not(.lever)::after {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* ── Input padding global ──────────────────────────────────── */
.input-field input,
.input-field textarea {
  padding-left: 8px !important;
  padding-right: 8px !important;
  box-sizing: border-box;
}
.input-field label {
  left: 8px !important;
}
.input-field label.active {
  left: 0 !important;
}

/* ── Input focus ───────────────────────────────────────────── */
.input-field input:focus + label,
.input-field input.valid + label {
  color: var(--primary) !important;
}

.input-field input:focus {
  border-bottom-color: var(--primary) !important;
  box-shadow: 0 1px 0 0 var(--primary) !important;
}

.input-field .prefix.active { color: var(--primary) !important; }

/* ── Banner de filtro ativo (vindo do dashboard) ───────────── */
.sp-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #E3F2FD;
  border: 1px solid #90CAF9;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: .88rem;
  color: #1565C0;
}

/* ── Modal footer: espaçamento dos botões ─────────────────── */
.modal-footer {
  height: auto !important;
  padding: 16px !important;
}

/* ── Métrica toggle (MRR / ARR / TCV) ─────────────────────── */
.metric-toggle-group {
  display: inline-flex;
  border: 1px solid var(--divider);
  border-radius: 6px;
  overflow: hidden;
}
.metric-btn {
  border: none;
  background: #fff;
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--text-sec);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.metric-btn + .metric-btn { border-left: 1px solid var(--divider); }
.metric-btn:hover { background: #F5F5F5; }
.metric-btn-active {
  background: var(--primary) !important;
  color: #fff !important;
}

/* ── Dashboard ─────────────────────────────────────────────── */
.db-kpi-card {
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

.db-kpi-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-sec);
  margin: 0 0 6px;
}

.db-kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.db-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

.db-prob {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: #F5F5F5;
  font-size: .78rem;
  font-weight: 600;
  color: #616161;
}

.db-money {
  font-variant-numeric: tabular-nums;
  font-size: .9rem;
}

.db-pct {
  font-size: .75rem;
  margin-left: 4px;
}

tfoot.db-footer td,
tr.db-footer td {
  border-top: 2px solid var(--divider) !important;
  background: #FAFAFA;
  font-weight: 600;
}

.db-row-excluido td { opacity: .45; }

.db-excluido-label {
  font-size: .68rem;
  font-weight: 500;
  color: #9E9E9E;
  background: #F5F5F5;
  border-radius: 8px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Pipeline ──────────────────────────────────────────────── */
.pl-toggle {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pl-toggle-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  text-transform: none;
  font-size: .82rem;
  font-weight: 500;
  padding: 0 14px;
  height: 34px;
  cursor: pointer;
  color: #616161;
  border: 1px solid #E0E0E0;
  background: white;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}

.pl-toggle-btn:hover { background: #F5F5F5; color: #424242; }

.pl-toggle-active {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
}

/* ── Temperature filter buttons ────────────────────────────── */
.temp-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 16px;
  font-size: .8rem;
  font-weight: 500;
  padding: 4px 12px;
  height: 30px;
  cursor: pointer;
  border: 1px solid #E0E0E0;
  background: #F5F5F5;
  color: #BDBDBD;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.temp-filter-btn .material-icons { font-size: 14px; }
.temp-filter-btn[data-temp="Quente"].tf-active { background: #FFEBEE; color: #B71C1C; border-color: #EF9A9A; }
.temp-filter-btn[data-temp="Morna"].tf-active  { background: #FFF3E0; color: #E65100; border-color: #FFCC80; }
.temp-filter-btn[data-temp="Fria"].tf-active   { background: #E3F2FD; color: #1565C0; border-color: #90CAF9; }

/* ── Kanban board ──────────────────────────────────────────── */
.kbn-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 20px;
  align-items: flex-start;
  /* permite rolar horizontalmente fora do container */
  margin-left:  -12px;
  margin-right: -12px;
  padding-left: 12px;
  padding-right: 12px;
}

.kbn-col {
  flex: 0 0 270px;
  background: #F0F4F8;
  border-radius: 10px;
  padding: 10px 10px 4px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

.kbn-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 6px;
}

.kbn-col-title {
  font-size: .82rem;
  font-weight: 700;
  color: #37474F;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kbn-count {
  flex-shrink: 0;
  background: #CFD8DC;
  color: #37474F;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: .72rem;
  font-weight: 700;
}

.kbn-col-totais {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid #CFD8DC;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kbn-col-metrica {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
}
.kbn-col-metrica-label {
  font-size: .67rem;
  font-weight: 700;
  color: #90A4AE;
  letter-spacing: .4px;
  flex-shrink: 0;
}
.kbn-col-metrica-val {
  font-size: .72rem;
  font-weight: 600;
  color: #546E7A;
  text-align: right;
}

.kbn-card {
  background: white;
  border-radius: 6px;
  border-top: 3px solid #1976D2;
  padding: 10px 10px 8px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.10);
  transition: box-shadow .15s, transform .15s;
}

.kbn-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,.14);
  transform: translateY(-1px);
}

.kbn-card-cliente {
  font-weight: 700;
  font-size: .82rem;
  color: #212121;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kbn-card-titulo {
  font-size: .75rem;
  color: #757575;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin-bottom: 7px;
  min-height: 2em;
}

.kbn-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-top: 7px;
  border-top: 1px solid #F5F5F5;
}

.kbn-fat  { font-size: .75rem; font-weight: 700; color: #1565C0; }
.kbn-date { font-size: .7rem; color: #BDBDBD; }
.kbn-prob {
  font-size: .7rem; font-weight: 700;
  background: #E8F5E9; color: #2E7D32;
  border-radius: 10px; padding: 1px 6px;
}

.pl-table th {
  white-space: nowrap;
  font-size: .75rem;
}

.pl-table td {
  font-size: .82rem;
  padding: 10px 12px;
  vertical-align: middle;
}

.pl-cliente  { font-weight: 600; white-space: nowrap; }
.pl-titulo   { max-width: 260px; color: #424242; }
.pl-oferta   { max-width: 160px; font-size: .78rem; color: #616161; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-accmgr   { white-space: nowrap; font-size: .8rem; }
.pl-data     { white-space: nowrap; font-size: .8rem; }

/* Busca por descrição no Kanban (barra de filtros) */
.kbn-busca-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  background: #fff;
  border: 1px solid #CFD8DC;
  border-radius: 18px;
  padding: 3px 10px;
}
.kbn-busca-wrap > .material-icons { font-size: 17px; color: #90A4AE; }
.kbn-busca-wrap input {
  border: none;
  outline: none;
  background: transparent;
  font-size: .8rem;
  width: 190px;
  height: auto;
  margin: 0;
  padding: 3px 0;
  box-shadow: none;
}
.kbn-busca-x { font-size: 16px; color: #90A4AE; cursor: pointer; }
.kbn-busca-x:hover { color: #C62828; }

/* Nome do contato no card do Kanban */
.kbn-card-contato {
  font-size: .7rem;
  color: #00796B;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kbn-card-contato .material-icons { font-size: 13px; flex-shrink: 0; }

/* Busca por descrição na coluna Oportunidade */
.pl-th-busca { white-space: nowrap; }
.pl-busca-ico {
  font-size: 16px;
  vertical-align: middle;
  cursor: pointer;
  color: #B0BEC5;
  margin-left: 5px;
}
.pl-busca-ico:hover { color: #1976D2; }
.pl-busca-ico.active { color: #1976D2; }
.pl-busca-pop {
  position: fixed;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #CFD8DC;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  padding: 7px 9px;
}
.pl-busca-pop input {
  border: 1px solid #CFD8DC;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: .82rem;
  width: 230px;
  height: auto;
  margin: 0;
  box-sizing: border-box;
  outline: none;
}
.pl-busca-pop input:focus { border-color: #1976D2; box-shadow: none; }
.pl-busca-x { font-size: 18px; color: #90A4AE; cursor: pointer; }
.pl-busca-x:hover { color: #C62828; }

/* Coluna Contato com tooltip (nome / e-mail / telefone) */
.pl-contato { position: relative; cursor: default; }
.pl-contato-nome {
  border-bottom: 1px dotted #B0BEC5;
  color: #37474F;
}
.pl-contato-tip {
  position: fixed;
  z-index: 2000;
  display: none;
  min-width: 200px;
  background: #263238;
  color: #ECEFF1;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  font-size: .78rem;
  white-space: nowrap;
}
.pl-contato-tip span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
}
.pl-contato-tip .material-icons {
  font-size: 15px;
  color: #80CBC4;
}

.pl-stage-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: #E3F2FD;
  color: #1565C0;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.pl-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.pl-mobile-list { display: none; }
.pl-mobile-card {
  background: #fff;
  border-radius: 6px;
  border-top: 3px solid #1976D2;
  padding: 10px 10px 8px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.10);
}

/* Mobile/tablet: cards mais neutros e sem visual pesado */
@media (max-width: 992px) {
  .pl-mobile-card {
    border: 1px solid #E3E7EB;
    border-top-width: 1px;
    border-top-color: #E3E7EB !important;
    border-radius: 8px;
    box-shadow: none;
    margin-bottom: 10px;
  }

  .pl-mobile-card .pl-mobile-card-head {
    background: transparent;
  }

  .pl-mobile-card .pl-stage-badge,
  .pl-mobile-card .pl-status-badge,
  .pl-mobile-card .temp-badge {
    background: #F7F8FA !important;
    color: #54606D !important;
    border: 1px solid #E4E8EE !important;
  }

  .pl-mobile-card .kbn-prob {
    background: #F7F8FA;
    color: #54606D;
    border: 1px solid #E4E8EE;
  }
}

/* ── Kanban ocultar colunas ────────────────────────────────── */
.kbn-hide-btn {
  background: none; border: none; padding: 0; margin: 0 0 0 4px;
  cursor: pointer; opacity: 0; transition: opacity .15s;
  color: #BDBDBD; line-height: 1; flex-shrink: 0;
}
.kbn-col-header:hover .kbn-hide-btn { opacity: 1; }
.kbn-hide-btn:hover { color: #616161; }
.kbn-hide-btn .material-icons { font-size: 16px; display: block; }

.kbn-hidden-bar {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 6px 0 10px;
}
.kbn-hidden-bar:empty { display: none; }
.kbn-col-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #E3F2FD; color: #1565C0;
  border: 1px solid #90CAF9; border-radius: 14px;
  padding: 3px 10px 3px 8px; font-size: .78rem;
  cursor: pointer; transition: background .15s;
  white-space: nowrap;
}
.kbn-col-chip:hover { background: #BBDEFB; }
.kbn-col-chip .material-icons { font-size: 14px; }

/* ── Kanban drag-and-drop ──────────────────────────────────── */
.kbn-card[draggable="true"] { cursor: grab; }
.kbn-card[draggable="true"]:active { cursor: grabbing; }
.kbn-card.kbn-dragging { opacity: .25; }
.kbn-col.kbn-drop-target {
  background: #E3F2FD;
  outline: 2px dashed #1976D2;
  outline-offset: -3px;
  border-radius: 8px;
}
.kbn-col.kbn-drop-target .kbn-col-header { background: #BBDEFB; border-radius: 8px 8px 0 0; }

/* ── Action menu ───────────────────────────────────────────── */
.act-menu-wrap {
  position: absolute;
  z-index: 9100;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.16);
  min-width: 168px;
  padding: 4px 0;
  font-size: .84rem;
}
.act-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-size: .84rem;
  color: #424242;
  text-align: left;
  transition: background .1s;
}
.act-menu-item:hover { background: #F5F5F5; }
.act-menu-item .material-icons { font-size: 17px; color: #9E9E9E; }

.act-menu-item.act-item-success       { color: #2E7D32; }
.act-menu-item.act-item-success .material-icons { color: #2E7D32; }
.act-menu-item.act-item-danger        { color: #C62828; }
.act-menu-item.act-item-danger .material-icons  { color: #C62828; }
.act-menu-item.act-item-warn          { color: #E65100; }
.act-menu-item.act-item-warn .material-icons    { color: #E65100; }
.act-menu-item.act-item-delete        { color: #B71C1C; }
.act-menu-item.act-item-delete:hover  { background: #FFEBEE; }
.act-menu-item.act-item-delete .material-icons  { color: #B71C1C; }

/* ── Table column filter dropdowns ────────────────────────── */
.tbl-filter-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.tbl-filter-th::after {
  content: '\e152'; /* material-icons: filter_list */
  font-family: 'Material Icons';
  font-size: 14px;
  vertical-align: middle;
  margin-left: 4px;
  color: #BDBDBD;
  transition: color .15s;
}
.tbl-filter-th:hover::after { color: var(--primary); }
.tbl-filter-th.filter-active::after { color: var(--primary); }
.tbl-filter-th.filter-active { color: var(--primary); }

.tbl-dd-wrap {
  position: relative;
  z-index: 9002;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
  width: min(520px, calc(100vw - 32px));
  max-width: 520px;
  padding: 0;
  font-size: .83rem;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}
.tbl-dd-overlay {
  position: fixed;
  inset: 0;
  z-index: 9001;
  background: rgba(33, 33, 33, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tbl-dd-search {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-bottom: 1px solid #E0E0E0;
  padding: 8px 12px;
  font-size: .83rem;
  outline: none;
  border-radius: 6px 6px 0 0;
}
.tbl-dd-selall {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-bottom: 1px solid #F0F0F0;
  font-weight: 500;
  cursor: pointer;
}
/* Override Materialize que esconde checkboxes nativos */
.tbl-dd-wrap input[type=checkbox] {
  position: static !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}
.tbl-dd-selall input[type=checkbox] { margin: 0; }
.tbl-dd-list {
  max-height: min(320px, calc(100vh - 240px));
  overflow-y: auto;
  padding: 4px 0;
}
.tbl-dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background .1s;
}
.tbl-dd-item:hover { background: #F5F5F5; }
.tbl-dd-item input[type=checkbox] { margin: 0; flex-shrink: 0; }
.tbl-dd-item label { cursor: pointer; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-dd-footer {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid #E0E0E0;
  justify-content: flex-end;
}
.tbl-dd-footer button {
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: .8rem;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
}
.tbl-dd-btn-clear { background: #F5F5F5; color: #757575; }
.tbl-dd-btn-clear:hover { background: #EEEEEE; }
.tbl-dd-btn-ok { background: var(--primary); color: #fff; }
.tbl-dd-btn-ok:hover { background: var(--primary-dark); }
body.tbl-dd-open { overflow: hidden; }

/* ── Responsive ────────────────────────────────────────────── */
.db-val-short { display: none; }

@media (max-width: 600px) {
  .sp-page-header { flex-direction: column; align-items: flex-start; }
  .sp-kanban-grid { grid-template-columns: 1fr; }
  .db-col-desktop { display: none; }
  .db-val-full  { display: none; }
  .db-val-short { display: inline; }
  .db-kpi-value { font-size: 1.2rem; }
  .pl-list-table-wrap { display: none; }
  .pl-mobile-list { display: block; }
}

@media (min-width: 601px) and (max-width: 992px) {
  .pl-list-table-wrap { display: none; }
  .pl-mobile-list { display: block; }
}

/* ── Temperatura ───────────────────────────────────────────── */
.temp-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .68rem;
  font-weight: 500;
  padding: 1px 7px 1px 4px;
  border-radius: 10px;
  white-space: nowrap;
}
.temp-fria   { background: #E3F2FD; color: #1565C0; border: 1px solid #90CAF9; }
.temp-morna  { background: #FFF3E0; color: #E65100; border: 1px solid #FFCC80; }
.temp-quente { background: #FFEBEE; color: #B71C1C; border: 1px solid #EF9A9A; }
.temp-badge .material-icons { font-size: 12px; }

/* ── Agenda: visualização semana ────────────────────────────── */
.agenda-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: start;
}
.agenda-week-col {
  min-width: 0;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--divider);
  overflow: hidden;
}
.agenda-week-col-header {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 2px solid var(--divider);
  background: #F5F5F5;
}
.agenda-week-col-header.today { background: var(--primary); color: #fff; border-bottom-color: var(--primary-dark); }
.agenda-week-col-header.past  { color: #9E9E9E; }
.agenda-week-dow   { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.agenda-week-day   { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.agenda-week-count { font-size: .62rem; margin-top: 2px; opacity: .8; }

.agenda-week-col-body { padding: 0; }
.agenda-week-event {
  padding: 8px 10px;
  border-bottom: 1px solid #F0F0F0;
  border-left: 3px solid transparent;
}
.agenda-week-event:last-child { border-bottom: none; }
.agenda-week-event.vencido  { border-left-color: #E53935; background: #FFF5F5; }
.agenda-week-event.concluido { opacity: .55; }

.agenda-week-time   { font-size: .67rem; color: var(--text-sec); margin-bottom: 3px; }
.agenda-week-title  {
  font-size: .78rem; font-weight: 500; color: var(--text);
  line-height: 1.3; margin: 4px 0 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.agenda-week-cliente { font-size: .68rem; color: var(--text-sec); }

/* ── Agenda: visualização mensal (calendário) ───────────────── */
.agenda-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--divider);
}
.agenda-cal-header {
  background: #ECEFF1;
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-sec);
  padding: 10px 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.agenda-cal-cell {
  background: #fff;
  padding: 6px 8px;
  min-height: 88px;
}
.agenda-cal-cell.other-month { background: #FAFAFA; }
.agenda-cal-cell.today       { background: #E3F2FD; }
.agenda-cal-cell.past        { background: #FAFAFA; }
.agenda-cal-day-num {
  font-size: .8rem;
  font-weight: 600;
  color: #BDBDBD;
  margin-bottom: 4px;
  line-height: 1;
}
.agenda-cal-cell:not(.past):not(.other-month) .agenda-cal-day-num { color: var(--text); }
.agenda-cal-cell.today .agenda-cal-day-num {
  color: var(--primary);
  font-weight: 700;
  font-size: .9rem;
}
.agenda-cal-event {
  display: block;
  font-size: .66rem;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #E3F2FD;
  color: #1565C0;
  text-decoration: none;
  line-height: 1.5;
  transition: opacity .1s;
}
.agenda-cal-event:hover { opacity: .8; }
.agenda-cal-event.concluido { background: #E8F5E9; color: #2E7D32; }
.agenda-cal-event.vencido   { background: #FFEBEE; color: #C62828; }

@media (max-width: 840px) {
  .agenda-week-grid {
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    padding-bottom: 8px;
  }
}
@media (max-width: 600px) {
  .agenda-cal-cell    { min-height: 56px; padding: 4px; }
  .agenda-cal-event   { display: none; }
  .agenda-cal-day-num { font-size: .75rem; }
}

/* ── Roadmap ───────────────────────────────────────────────── */
.rdm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.rdm-kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px !important;
  margin: 0 !important;
}
.rdm-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rdm-kpi-icon .material-icons { font-size: 22px; color: #fff; }
.rdm-kpi-num   { font-size: 2rem; font-weight: 700; line-height: 1; }
.rdm-kpi-label { font-size: .8rem; color: var(--text-sec); margin-top: 2px; }

.rdm-pending .rdm-kpi-icon { background: #1976D2; }
.rdm-pending .rdm-kpi-num  { color: #1565C0; }
.rdm-dev     .rdm-kpi-icon { background: #E65100; }
.rdm-dev     .rdm-kpi-num  { color: #BF360C; }
.rdm-done    .rdm-kpi-icon { background: #2E7D32; }
.rdm-done    .rdm-kpi-num  { color: #1B5E20; }

.rdm-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 500;
  font-size: .9rem;
  border-bottom: 1px solid var(--divider);
}
.rdm-group-header .material-icons { font-size: 18px; }
.rdm-group-count {
  margin-left: auto;
  font-size: .78rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
}
.rdm-s-pending { color: #1565C0; background: #E3F2FD; }
.rdm-s-pending .rdm-group-count { background: #1976D2; color: #fff; }
.rdm-s-dev     { color: #BF360C; background: #FFF3E0; }
.rdm-s-dev     .rdm-group-count { background: #E65100; color: #fff; }
.rdm-s-done    { color: #1B5E20; background: #E8F5E9; }
.rdm-s-done    .rdm-group-count { background: #2E7D32; color: #fff; }

.rdm-btn-action {
  padding: 0 6px !important;
  height: 30px !important;
  line-height: 30px !important;
  min-width: 0 !important;
  border-radius: 50% !important;
}
.rdm-btn-action .material-icons { font-size: 18px; line-height: 30px; }
.rdm-btn-dev  .material-icons { color: #1976D2; }
.rdm-btn-done .material-icons { color: #2E7D32; }
.rdm-btn-back .material-icons { color: #757575; }
.rdm-btn-del  .material-icons { color: #C62828; }
.rdm-btn-edit .material-icons { color: #F57C00; }
.rdm-list-table-wrap { display: block; }
.rdm-mobile-list { display: none; }
.rdm-mobile-card {
  background: #fff;
  border: 1px solid var(--divider);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 12px;
}

@media (max-width: 600px) {
  .rdm-kpi-grid { grid-template-columns: 1fr; }
  .rdm-kpi-card { padding: 14px 16px !important; }
  .rdm-list-table-wrap { display: none; }
  .rdm-mobile-list { display: block; }
}

/* ── Roadmap: código ───────────────────────────────────────── */
.rdm-codigo {
  display: inline-block;
  font-family: 'Roboto Mono', monospace, monospace;
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: #E3F2FD;
  border: 1px solid #90CAF9;
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: .3px;
  white-space: nowrap;
}

/* ── Ações Comerciais ──────────────────────────────────────── */
.acao-card { transition: box-shadow .15s; }
.acao-concluida { opacity: .75; border-left: 3px solid #43A047 !important; }
.acao-vencida   { border-left: 3px solid #E53935 !important; }

.acao-tipo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: #E3F2FD;
  color: #1565C0;
}
.acao-tipo-ligação      { background: #E8F5E9; color: #2E7D32; }
.acao-tipo-e-mail       { background: #FFF3E0; color: #E65100; }
.acao-tipo-reunião      { background: #EDE7F6; color: #4527A0; }
.acao-tipo-whatsapp     { background: #E8F5E9; color: #1B5E20; }
.acao-tipo-visita       { background: #FCE4EC; color: #880E4F; }
.acao-tipo-proposta     { background: #E3F2FD; color: #0D47A1; }
.acao-tipo-follow-up    { background: #F3E5F5; color: #6A1B9A; }
.acao-tipo-demonstração { background: #E0F7FA; color: #006064; }
.acao-tipo-evento       { background: #FFF8E1; color: #F57F17; }
.acao-tipo-outro        { background: #F5F5F5; color: #616161; }

/* ── Navbar badge (agenda) ─────────────────────────────────── */
.sp-nav-agenda-btn {
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 8px;
  height: 64px;
  color: rgba(255,255,255,.9);
  transition: color .15s;
  float: none !important;
  flex: 0 0 auto;
  flex-shrink: 0;
}
.sp-nav-agenda-btn:hover { color: #fff; }
.sp-nav-agenda-btn .material-icons { font-size: 22px; }

.sp-nav-apps-btn {
  color: #fff;
  display: inline-flex;
  align-items: center;
  height: 64px;
  padding: 0 3px 0 5px;
  text-decoration: none;
  opacity: .85;
  float: none !important;
  position: static !important;
  flex: 0 0 auto;
  flex-shrink: 0;
}
.sp-nav-apps-btn:hover { color: #fff; opacity: 1; }
.sp-nav-apps-btn .material-icons { font-size: 22px; }

.sp-apps-sidenav li > a { font-size: .95rem; }

.sp-badge {
  position: absolute;
  top: 10px;
  right: 2px;
  background: #FF5252;
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sp-badge-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FF5252;
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  margin-left: 4px;
  line-height: 1;
}

/* ── Agenda ─────────────────────────────────────────────────── */
.agenda-day-block { margin-bottom: 16px; }

.agenda-day-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 6px 6px 0 0;
  font-weight: 600;
  font-size: .9rem;
  color: #fff;
  background: var(--primary);
}
.agenda-day-header.past   { background: #9E9E9E; }
.agenda-day-header.today  { background: #1B5E20; }

.agenda-day-body {
  background: #fff;
  border: 1px solid var(--divider);
  border-top: none;
  border-radius: 0 0 6px 6px;
}

.agenda-acao-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
  transition: background .1s;
}
.agenda-acao-row:last-child { border-bottom: none; }
.agenda-acao-row:hover { background: #FAFAFA; }
.agenda-acao-row.concluida-row { opacity: .6; }

.agenda-acao-time {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-sec);
  white-space: nowrap;
  min-width: 46px;
  padding-top: 3px;
  flex-shrink: 0;
}

.agenda-acao-body { flex: 1; min-width: 0; }
.agenda-acao-title { font-weight: 500; font-size: .9rem; color: var(--text); }
.agenda-acao-opp   { font-size: .78rem; color: var(--text-sec); margin-top: 2px; }

/* ── Pipeline: fullscreen kanban (desktop only) ───────────── */
@media (min-width: 769px) {
  .pipeline-kbn {
    padding: 0 !important;
    height: calc(100vh - 64px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .pipeline-kbn .kbn-header-area {
    flex-shrink: 0;
    padding: 16px 24px 0;
  }
  .pipeline-kbn .kbn-board-area {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 24px;
  }
  .pipeline-kbn .kbn-board-area .kbn-hidden-bar {
    flex-shrink: 0;
  }
  .pipeline-kbn .kbn-board-area .kbn-board {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
    padding-bottom: 8px;
  }
  .pipeline-kbn .kbn-board-area .kbn-col {
    max-height: none;
  }
}

/* ── Roadmap: spec badges e botão ─────────────────────────── */
.spec-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}
.spec-rascunho     { background: #FFF3E0; color: #E65100; border: 1px solid #FFCC80; }
.spec-em_validacao { background: #E8EAF6; color: #3949AB; border: 1px solid #9FA8DA; }
.spec-validada     { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.spec-sem          { background: #F5F5F5; color: #9E9E9E; border: 1px solid #E0E0E0; }
.rdm-btn-spec .material-icons { color: #5C6BC0; }

/* ── Assistente IA ─────────────────────────────────────────── */
#ai-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(25,118,210,.45);
  z-index: 9000;
  transition: transform .2s, box-shadow .2s, background .15s;
}
#ai-fab:hover {
  background: var(--primary-dark);
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(25,118,210,.55);
}
#ai-fab .material-icons { font-size: 26px; }

.ai-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 8999;
  transform: translateY(20px) scale(.97);
  opacity: 0;
  pointer-events: none;
  transition: transform .22s cubic-bezier(.4,0,.2,1), opacity .22s;
}
.ai-panel-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.ai-panel-header {
  background: var(--primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #F8FAFB;
}

.ai-msg { display: flex; }
.ai-msg-user { justify-content: flex-end; }
.ai-msg-bot  { justify-content: flex-start; flex-direction: column; align-items: flex-start; }

.ai-bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .84rem;
  line-height: 1.5;
  word-break: break-word;
}
.ai-msg-user .ai-bubble {
  background: var(--primary);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.ai-msg-bot .ai-bubble {
  background: #fff;
  color: #212121;
  border: 1px solid #E8ECF0;
  border-radius: 14px 14px 14px 4px;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 2px;
  max-width: 88%;
}
.ai-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff !important;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.ai-action-btn::before {
  content: 'list';
  font-family: 'Material Icons';
  font-size: 15px;
  font-weight: normal;
}
.ai-action-btn:hover { filter: brightness(.92); }

.ai-quick {
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline dotted;
  font-style: normal;
}
.ai-quick:hover { color: var(--primary-dark); }

.ai-table-row {
  display: flex;
  gap: 6px;
  font-size: .78rem;
  border-bottom: 1px solid #F0F0F0;
  padding: 2px 0;
}
.ai-table-row span { flex: 1; }

/* Typing indicator */
.ai-typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px !important; }
.ai-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #BDBDBD;
  animation: aiDot 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiDot {
  0%, 80%, 100% { transform: scale(1); opacity: .5; }
  40%           { transform: scale(1.3); opacity: 1; }
}

.ai-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #E8ECF0;
  background: #fff;
  flex-shrink: 0;
}
.ai-input {
  flex: 1;
  border: 1px solid #E0E0E0;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: .84rem;
  font-family: inherit;
  resize: none;
  outline: none;
  line-height: 1.4;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color .15s;
}
.ai-input:focus { border-color: var(--primary); }
.ai-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.ai-send-btn:hover  { background: var(--primary-dark); }
.ai-send-btn:disabled { background: #BDBDBD; cursor: default; }
.ai-send-btn .material-icons { font-size: 18px; }

@media (max-width: 480px) {
  .ai-panel { right: 12px; bottom: 84px; width: calc(100vw - 24px); }
  #ai-fab   { right: 16px; bottom: 20px; }
}

/* Pricing Case: linha com valores alterados em relacao ao base do RateCard */
.sp-table tr.pc-item-desvio {
  background: #fff8e1;
}

/* Toasts globais no topo direito (Materialize) */
#toast-container {
  top: 84px;
  right: 16px;
  left: auto;
  bottom: auto;
  max-width: 420px;
}
#toast-container .toast {
  min-height: 48px;
  height: auto;
  line-height: 1.35;
  padding: 12px 16px;
}

/* ─── R&S Module ──────────────────────────────────────────────── */
.rs-stepper {
  display: flex;
  align-items: center;
  min-width: max-content;
  gap: 0;
}
.rs-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
}
.rs-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ECEFF1;
  color: #90A4AE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.rs-step-label {
  font-size: .62rem;
  color: #90A4AE;
  text-align: center;
  line-height: 1.2;
  max-width: 64px;
}
.rs-step-done .rs-step-circle {
  background: #1565C0;
  color: #fff;
}
.rs-step-done .rs-step-label { color: #1565C0; }
.rs-step-active .rs-step-circle {
  background: #1976D2;
  color: #fff;
  box-shadow: 0 0 0 3px #BBDEFB;
}
.rs-step-active .rs-step-label { color: #1565C0; font-weight: 700; }
.rs-step-cancel .rs-step-circle { background: #E53935; color: #fff; }
.rs-step-cancel .rs-step-label { color: #E53935; }
.rs-step-line {
  flex: 1;
  height: 2px;
  background: #ECEFF1;
  min-width: 16px;
  margin-bottom: 20px;
}
.rs-step-line-done { background: #1565C0; }
