/* ── Sidebar Admin ─────────────────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: #1a3a5c;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
}
.sidebar-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-nav {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 14px;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-left-color: #4fc3f7;
}
.sidebar-divider {
  border-top: 1px solid rgba(255,255,255,.1);
  margin: 8px 0;
}
.sidebar-footer {
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.main-content {
  margin-left: 240px;
  min-height: 100vh;
  background: #f5f7fa;
}
.topbar {
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
  min-height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.content-area {
  min-height: calc(100vh - 52px);
}

/* Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}
@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .main-content {
    margin-left: 0;
  }
}

/* ── Stat Cards ─────────────────────────────────────────────────────────────── */
.stat-card {
  border-radius: 8px;
}
.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #888;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

/* ── Login ───────────────────────────────────────────────────────────────────── */
.login-body {
  background: linear-gradient(135deg, #1a3a5c 0%, #1a5276 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  overflow: hidden;
  border: none;
}

/* ── Portal ──────────────────────────────────────────────────────────────────── */
.portal-body {
  background: #f5f7fa;
}
.card-hover {
  transition: box-shadow .15s, transform .15s;
  cursor: pointer;
}
.card-hover:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
  transform: translateY(-1px);
}

/* ── Chat / Timeline ────────────────────────────────────────────────────────── */
.chat-bubble {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 14px;
  max-width: 80%;
  line-height: 1.5;
}
.chat-other {
  background: #e9f0fb;
  color: #1a3a5c;
  border-radius: 0 12px 12px 12px;
}
.chat-self {
  background: #1a5276;
  color: #fff;
  border-radius: 12px 0 12px 12px;
}
.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Cliente Autocomplete ──────────────────────────────────────────────────── */
.cliente-ac-wrapper {
  position: relative;
  /* herda o tamanho do input filho, não expande o layout */
}
.cliente-ac-hidden-required {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.cliente-ac-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1080;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 0 0 .375rem .375rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  margin-top: -1px;
}
.cliente-ac-dropdown.show {
  display: block;
}
.cliente-ac-item {
  padding: 7px 12px;
  cursor: pointer;
  font-size: 14px;
}
.cliente-ac-item:hover,
.cliente-ac-item.active {
  background: #0d6efd;
  color: #fff;
}
.cliente-ac-empty {
  padding: 10px 12px;
  color: #6c757d;
  font-size: 13px;
  text-align: center;
}
.cliente-ac-create {
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #0d6efd;
}
.cliente-ac-create:hover {
  background: #e8f0fe;
}
.cliente-ac-sep {
  border-top: 1px solid #e9ecef;
  margin: 2px 0;
}

/* ── Misc ───────────────────────────────────────────────────────────────────── */
.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.breadcrumb {
  font-size: 13px;
}

