@keyframes fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 0.8s linear infinite;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  background: #EEEDED;
  overflow-x: clip;
}

body {
  font-family: inherit;
  color: inherit;
  background: #EEEDED;
  overflow-x: clip;
}


a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
  view-transition-name: sidebar;
  width: 72px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  box-shadow: var(--elevation-x-level-2, 2px) var(--elevation-y-level-2, 2px) var(--elevation-blur-level-2, 8px) var(--elevation-spread-level-2, 0px) #0000000d;
  transition: width 200ms cubic-bezier(0.4, 0, 1, 1);
  overflow: hidden;
}

/* Sidebar header */
.sidebar-header {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.sidebar-body {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 0;
  padding-top: 24px;
  min-height: 0;
  transition: padding 180ms cubic-bezier(0, 0, 0.2, 1);
}

.sidebar-toggle-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #f26b37;
  padding: 8px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  transition: background 0.2s, opacity 200ms cubic-bezier(0.4, 0, 1, 1), transform 200ms cubic-bezier(0.4, 0, 1, 1);
}

.sidebar-toggle-btn:hover {
  background: #fff5f0;
}

.sidebar-toggle-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Expanded header (logo + X) - hidden by default */
.sidebar-expanded-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0px 24px 0px 24px;
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0, 0, 0.2, 1), transform 250ms cubic-bezier(0, 0, 0.2, 1);
}

.sidebar-logo {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #414043;
  white-space: nowrap;
}

.sidebar-close-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fbfcfd;
  border: 1px solid #e6eaf4;
  border-radius: 32px;
  color: #414043;
  flex-shrink: 0;
  transition: background 0.2s;
}

.sidebar-close-btn:hover {
  background: #f4f6fa;
}

.sidebar-close-btn svg {
  width: 24px;
  height: 24px;
}

/* Sidebar menu items */
.sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  flex: 1;
  width: 40px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-top: 0;
  transition: width 180ms cubic-bezier(0, 0, 0.2, 1);
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.sidebar-bottom .version {
  font-size: 11px;
  color: #f7a687;
  white-space: nowrap;
}

.sidebar-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #f26b37;
  background-color: transparent;
  transition: width 180ms cubic-bezier(0, 0, 0.2, 1), padding 180ms cubic-bezier(0, 0, 0.2, 1), gap 180ms cubic-bezier(0, 0, 0.2, 1), margin 180ms cubic-bezier(0, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
  gap: 0;
  overflow: hidden;
}

.sidebar-item:hover {
  background: #fff5f0;
}

.sidebar-item.active {
  background: #fff5f0;
}

.sidebar-item svg,
.sidebar-item i {
  width: 24px;
  height: 24px;
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

/* Sidebar section divider + label */
.sidebar-divider {
  width: 100%;
  height: 1px;
  background: #e6eaf4;
  margin: 8px 0;
  flex-shrink: 0;
}
.sidebar-section-label {
  display: none;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7f7e80;
  padding: 4px 12px 0;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar.expanded .sidebar-section-label {
  display: block;
}

/* Label hidden in collapsed state */
.sidebar-label {
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #414043;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  max-width: 0;
  margin-left: 0;
  flex: 0;
  pointer-events: none;
  transition: opacity 150ms cubic-bezier(0.4, 0, 1, 1), max-width 200ms cubic-bezier(0.4, 0, 1, 1);
}

/* ===== SIDEBAR EXPANDED STATE ===== */
.sidebar.expanded {
  width: 312px;
  align-items: flex-start;
  padding: 0;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  will-change: width;
}

.sidebar.expanded.is-opening .sidebar-body {
  align-items: center;
  padding: 0;
  padding-top: 24px;
}

.sidebar.expanded.is-opening .sidebar-top {
  width: 40px;
  align-items: center;
}

.sidebar.expanded.is-opening .sidebar-item {
  width: 40px;
  padding: 0;
  gap: 0;
  justify-content: center;
  background-color: transparent !important;
}
.sidebar.expanded.is-opening .sidebar-expanded-header {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

.sidebar.expanded.is-opening .sidebar-label {
  opacity: 0;
  max-width: 0;
  flex: 0;
  pointer-events: none;
}

.sidebar.expanded.is-closing {
  width: 72px;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.sidebar.expanded .sidebar-toggle-btn {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
}

.sidebar.expanded.is-closing .sidebar-toggle-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 80ms;
}

.sidebar.expanded .sidebar-expanded-header {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  padding: 0px 24px 0px 24px;
  transition-delay: 120ms;
  transition-duration: 70ms;
  will-change: opacity, transform;
}

.sidebar.expanded.is-closing .sidebar-expanded-header {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  transition-duration: 140ms;
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.sidebar.expanded .sidebar-top {
  width: 100%;
  align-items: flex-start;
  will-change: width;
}

.sidebar.expanded .sidebar-body {
  align-items: flex-start;
  padding: 24px;
}

.sidebar.expanded .sidebar-item {
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 8px;
  gap: 8px;
  justify-content: flex-start;
  background-color: transparent;
  transition-delay: 80ms;
  transition-duration: 160ms;
  will-change: width, padding, gap, margin, background-color;
}

.sidebar.expanded .sidebar-item:hover,
.sidebar.expanded .sidebar-item.active {
  background-color: #fff5f0;
  transition-delay: 80ms;
  transition-duration: 160ms;
}

.sidebar.expanded.is-closing .sidebar-item {
  width: 40px;
  padding: 0;
  gap: 0;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  transition-duration: 140ms;
  transition-delay: 60ms;
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.sidebar.expanded .sidebar-label {
  opacity: 1;
  max-width: 220px;
  flex: 1;
  pointer-events: auto;
  transition-delay: 80ms, 80ms;
  will-change: opacity, max-width;
  transition-duration: 160ms, 160ms;
}

.sidebar.expanded.is-closing .sidebar-label {
  opacity: 0;
  max-width: 0;
  flex: 0;
  pointer-events: none;
  transition: opacity 100ms cubic-bezier(0.4, 0, 1, 1), max-width 140ms cubic-bezier(0.4, 0, 1, 1);
}

/* Overlay */
.sidebar-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms cubic-bezier(0.4, 0, 1, 1), visibility 200ms cubic-bezier(0.4, 0, 1, 1);
}

.sidebar-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  will-change: opacity, visibility;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar-overlay,
  .sidebar-toggle-btn,
  .sidebar-expanded-header,
  .sidebar-label {
    transition: none !important;
  }
}

/* ===== TOP NAVBAR ===== */
.top-navbar {
  view-transition-name: navbar;
  height: 64px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 8px 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  box-shadow: var(--elevation-x-level-2, 2px) var(--elevation-y-level-2, 2px) var(--elevation-blur-level-2, 8px) var(--elevation-spread-level-2, 0px) #0000000d;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 42px;
  flex-shrink: 0;
}

.navbar-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 8px;
  color: #414043;
}

.navbar-hamburger svg {
  width: 24px;
  height: 24px;
}

.navbar-logo {
  display: flex;
  align-items: center;
}

.navbar-logo img {
  width: 87px;
  height: 25px;
}

.navbar-center {
  display: flex;
  align-items: center;
  gap: 48px;
}

.navbar-center a,
.navbar-center button {
  padding: 8px;
  font-size: 14px;
  font-weight: 400;
  color: #414043;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-center a:hover,
.navbar-center button:hover {
  background: #f4f6fa;
}

.navbar-center .has-dropdown svg {
  width: 12px;
  height: 12px;
  color: #414043;
  transition: transform 0.2s;
}

/* Active nav link */
.navbar-center .navbar-link-active {
  color: #f26b37 !important;
  font-weight: 600;
}

/* Navbar dropdown */
.navbar-dropdown-wrapper {
  position: relative;
  display: inline-flex;
}

.navbar-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 300px;
  background: #fff;
  border: 1px solid #e6eaf4;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 200;
  padding: 6px;
}

.navbar-dropdown.open { display: block; }

.navbar-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: #414043;
  border-radius: 8px;
  transition: background 0.15s;
  white-space: nowrap;
}

.navbar-dropdown-item:hover {
  background: #f4f6fa;
  color: #f26b37;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.company-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  width: 297px;
  max-width: 297px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  color: #414043;
  background: #f4f6fa;
  cursor: pointer;
  transition: background 0.2s;
}

.company-selector:hover {
  background: #e8ecf2;
}

.company-selector .icon-action {
  font-size: 16px;
  flex-shrink: 0;
}

.company-selector .typo-label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

.company-selector .clamp-1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-selector .icon-select {
  font-size: 12px;
  color: var(--surface-primary);
  flex-shrink: 0;
}

/* Company selector dropdown */
.company-selector-wrapper {
  position: relative;
}

.company-selector-dropdown {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 444px;
  height: 224px;
  z-index: 200;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s cubic-bezier(.4, 0, 1, 1);
}

.company-selector-dropdown.open {
  opacity: 1;
  pointer-events: auto;
}

.company-selector-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  border-radius: var(--radius-default, 16px);
  border: 1px solid var(--border-darker, #e6eaf4);
  background: var(--surface-default, #fff);
  padding: 16px;
  overflow: hidden;
  gap: 16px;
  box-shadow: var(--elevation-x-level-3, 0px) var(--elevation-y-level-3, 6px) var(--elevation-blur-level-3, 10px) var(--elevation-spread-level-3, 4px) #b1b1b11f, 0 1px 3px #0000000a;
}

.company-selector-header {
  flex-shrink: 0;
}

.company-selector-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.company-selector-search {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 12px;
  border: 1px solid var(--border-darker, #e6eaf4);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Source Sans 3', sans-serif;
  color: var(--typography-primary, #414043);
  background: var(--surface-default, #fff);
  outline: none;
  transition: border-color 0.15s;
}

.company-selector-search:focus {
  border-color: var(--border-info);
}

.company-selector-search-icon {
  position: absolute;
  right: 12px;
  font-size: 16px;
  color: var(--typography-secondary, #94a3b8);
  pointer-events: none;
}

.company-selector-options {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #888 transparent;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.company-selector-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-darker, #e6eaf4);
  background-color: transparent;
  text-align: left;
  font-family: 'Source Sans 3', sans-serif;
  color: inherit;
  outline: inherit;
  transition: background-color .15s cubic-bezier(.4, 0, 1, 1);
}

.company-selector-option:hover {
  background-color: var(--surface-default-hover, #f4f6fa);
}

.company-selector-option.selected {
  background-color: var(--surface-default-hover, #f4f6fa);
}

.company-selector-option.hidden { display: none; }

.company-selector-not-found {
  display: none;
  height: 134px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: 'Source Sans 3', sans-serif;
  color: var(--typography-secondary, #94a3b8);
  text-align: center;
}

.company-selector-not-found.visible { display: flex; }

.company-selector-option .info-container {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  transition: color .15s cubic-bezier(.4, 0, 1, 1);
}

.company-selector-option .ph {
  transition: color .15s cubic-bezier(.4, 0, 1, 1);
}

.company-selector-option .info-container .typo-caption {
  font-size: 12px;
  color: var(--typography-secondary, #94a3b8);
  line-height: 16px;
}

.company-selector-option .info-container .typo-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--typography-primary, #414043);
  line-height: 18px;
}

.company-selector-option .info-container .clamp-1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-selector-option:hover .info-container,
.company-selector-option:hover .ph,
.company-selector-option:hover .info-container .typo-caption,
.company-selector-option.selected .info-container,
.company-selector-option.selected .ph,
.company-selector-option.selected .info-container .typo-caption,
.company-selector-option.selected .info-container .typo-label,
.company-selector-option:hover .info-container .typo-label {
  color: var(--typography-highlighted, #414043);
  transition: color .15s cubic-bezier(.4, 0, 1, 1);
}

.user-menu-wrapper {
  position: relative;
}

/* Notification bell button in navbar */
.navbar-notif-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #64748b;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-notif-btn:hover { background: #f4f6fa; color: #414043; }
.navbar-notif-btn i { font-size: 22px; }
.navbar-notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* Notification list styles */
.notif-filter-tabs { display: flex; gap: 4px; }
.notif-tab {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #e6eaf4;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}
.notif-tab:hover { border-color: #f26b37; color: #f26b37; }
.notif-tab.active { background: #f26b37; border-color: #f26b37; color: #fff; }

.notif-list { display: flex; flex-direction: column; }
.notif-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #f4f6fa;
  cursor: pointer;
  transition: background 0.1s;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.notif-unread { background: #fef7f3; }
.notif-item.notif-unread:hover { background: #fef0e8; }

.notif-item-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; flex-shrink: 0; }
.notif-dot.active { background: #f26b37; }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; background: #f4f6fa; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 18px; }
.notif-unread .notif-icon { background: #fff3ed; color: #f26b37; }

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 14px; font-weight: 500; color: #414043; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-unread .notif-item-title { font-weight: 600; }
.notif-item-date { font-size: 12px; color: #94a3b8; margin-top: 2px; }

.notif-item-right { flex-shrink: 0; }

/* Profile layout */
/* --- Profile pill tabs (title-bar) --- */
.profile-tabs-pill {
  display: inline-flex;
  align-items: center;
  background: #f4f6fa;
  border-radius: 24px;
  padding: 4px;
  box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.05);
}
.profile-tab-pill {
  padding: 8px 16px;
  border: none;
  background: none;
  border-radius: 24px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #414043;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.profile-tab-pill:hover { background: #e8ecf2; }
.profile-tab-pill.active { background: #f26b37; color: #fff; }
.profile-pill-btn {
  padding: 8px 16px;
  border: 1px solid #e6eaf4;
  background: #fbfcfd;
  border-radius: 24px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #f26b37;
  cursor: pointer;
  white-space: nowrap;
  min-height: 40px;
  transition: background 0.15s;
}
.profile-pill-btn:hover { background: #fff3ed; }
.profile-pill-btn.active { background: #f26b37; color: #fff; border-color: #f26b37; }

/* --- Profile card (replaces sidebar layout) --- */
.profile-card {
  padding: 16px;
  border-radius: 16px;
  box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.05);
  margin-bottom: 80px;
}
.profile-card .form-grid { gap: 24px !important; }
.profile-card .form-field { margin-bottom: 0; }
.profile-section-header { margin-bottom: 16px; }
.profile-section-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1b;
  margin: 0;
}
.profile-section-desc {
  font-size: 13px;
  color: #94a3b8;
  margin: 4px 0 0;
}
.profile-divider {
  border-top: 1px solid #e6eaf4;
  margin: 24px 0;
}

/* --- Profile footer bar (fixed bottom) --- */
.profile-footer-bar {
  position: fixed;
  bottom: 0;
  left: 72px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
  padding: 12px 24px;
  background: #fff;
  border-top: 1px solid #f7a687;
  box-shadow: 0 -2px 10px 0 rgba(177,177,177,0.12), 0 -1px 3px 0 rgba(0,0,0,0.04);
  z-index: 90;
}
.profile-footer-cancel {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: #f26b37;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px 4px;
}
.profile-footer-cancel:hover { text-decoration: underline; }

.profile-upload-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #7f7e80;
  transition: border-color 0.15s, background 0.15s;
}
.profile-upload-area:hover { border-color: #f26b37; background: #fff8f5; }
.profile-upload-area i { font-size: 18px; color: #f26b37; }

.profile-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #414043;
}
.profile-toggle input[type="checkbox"],
.profile-toggle input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #f26b37;
  flex-shrink: 0;
  cursor: pointer;
}

@media (max-width: 768px) {
  /* Tabs: scroll horizontal abaixo do título */
  .profile-tabs-pill {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
  }
  .profile-tabs-pill::-webkit-scrollbar { display: none; }
  .profile-tab-pill {
    font-size: 13px;
    padding: 6px 14px;
  }
  .profile-pill-btn {
    font-size: 13px;
    padding: 6px 14px;
    min-height: 36px;
  }

  /* Title-bar: tabs abaixo do título, empilhado */
  .title-bar-with-back:has(.profile-tabs-pill) {
    flex-wrap: wrap;
  }
  .title-bar-with-back:has(.profile-tabs-pill) .title-bar-right {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 2px;
  }

  /* Card e form */
  .profile-card {
    padding: 16px;
    margin: 0 0 16px;
    border-radius: 12px;
  }
  .profile-card .form-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .profile-divider { margin: 16px 0; }

  /* Footer acima do float-action-bar */
  .profile-footer-bar {
    left: 0;
    bottom: 92px;
    gap: 16px;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
  }

  /* Form container */
  #profile-form {
    padding: 0 16px !important;
    padding-bottom: 72px !important;
  }
}

.user-avatar-btn {
  position: relative;
  width: 48px;
  height: 48px;
  cursor: pointer;
  flex-shrink: 0;
}

.user-status-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--color-error-500, #ef4444);
  border-radius: 50%;
  z-index: 1;
}

/* User dropdown menu */
.user-menu {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 310px;
  background: var(--surface-default, #fff);
  border: 1px solid var(--border-darker, #e6eaf4);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--elevation-x-level-3, 0px) var(--elevation-y-level-3, 6px) var(--elevation-blur-level-3, 10px) var(--elevation-spread-level-3, 4px) #b1b1b11f, 0 1px 3px #0000000a;
  z-index: 200;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s cubic-bezier(.4, 0, 1, 1);
}

.user-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.user-menu-header {
  padding: 0;
}

.user-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.user-menu-form {
  margin: 0;
  display: flex;
  width: 100%;
}

.user-info-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  min-width: 0;
}

.user-info-container .saudacao {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #000;
  min-width: 0;
}

.user-info-container .saudacao .text-typography-highlighted {
  color: #f26b37;
}

.user-info-container .saudacao .clamp-1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info-container .tag {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  background-color: var(--color-brand-orange-100, #fff7f3);
  color: var(--color-brand-orange-800, #f26b37);
  border-radius: 8px;
  font-weight: 500;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.user-menu-company {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
}

.user-menu-company i {
  font-size: 16px;
  flex-shrink: 0;
}

.user-menu-company span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-item {
  display: flex;
  padding: 9px;
  height: 34px;
  min-height: 34px;
  border-radius: 8px;
  flex: 0 0 auto;
  background: none;
  align-items: center;
  gap: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: inherit;
  cursor: pointer;
  transition-property: color, background-color;
  transition-duration: .2s;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  border: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  outline: inherit;
}

.user-menu-item:hover {
  transition-duration: 50ms;
  color: var(--typography-highlighted, #414043);
  background: var(--surface-highlighted, #f4f6fa);
}

.user-menu-item i {
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  transition-property: color, background-color;
  transition-duration: .2s;
  font-size: 16px;
  color: var(--typography-highlighted, #414043);
  flex-shrink: 0;
}

.user-menu-item:hover i {
  transition-duration: 50ms;
  color: var(--typography-highlighted, #414043);
}

.user-menu-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  background-color: var(--surface-secondary, #f4f6fa);
  color: var(--typography-black, #000);
  border-radius: 8px;
  font-weight: 500;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.user-menu-logout {
  color: inherit;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  view-transition-name: none;
  flex: 1;
  min-width: 0;
  margin-left: 72px;
  margin-top: 63px;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #EEEDED;
}

/* ===== IMPERSONATE BAR ===== */
.impersonate-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: #1e40af;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.impersonate-bar-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.impersonate-bar-content svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.impersonate-bar-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 2px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  margin-left: 8px;
}

.impersonate-bar-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Ajustar offsets quando impersonando */
body:has(.impersonate-bar) .top-navbar {
  top: 36px;
}

body:has(.impersonate-bar) .main-content {
  margin-top: 92px; /* 56px navbar + 36px bar */
}

body:has(.impersonate-bar) .sidebar {
  top: 36px;
}

/* ===== GLOBAL ALERTS ===== */
.app-alert {
  margin: 0 24px 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  flex-shrink: 0;
}

.app-alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.app-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.app-alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.app-alert-warning {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.app-alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Title Bar */
.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  flex-shrink: 0;
}

.title-bar h1 {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 32px;
  color: #414043;
}

/* ===== ADMIN NOTICE ===== */
.admin-notice-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.admin-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 40px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  max-width: 480px;
  text-align: center;
}

.admin-notice-icon {
  font-size: 32px;
  color: #3b82f6;
}

.admin-notice-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e40af;
}

.admin-notice-desc {
  font-size: 13px;
  color: #3b82f6;
}

.admin-notice-desc a {
  color: #1e40af;
  text-decoration: underline;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 24px 24px;
  flex: 1;
  min-height: 0;
}

.dashboard-col-1 {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-col-1 > *:not(:last-child) {
  margin-bottom: 16px;
}

/* ===== CARDS (sx-widget) ===== */
.card {
  border: none;
  border-radius: 16px;
  background: white;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card::-webkit-scrollbar {
  display: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.card-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #414043;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.btn-details {
  display: inline-flex;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  font-size: 14px;
  color: #f26b37;
  border: 1px solid #e6eaf4;
  background: #fbfcfd;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  height: 32px;
  min-width: 32px;
  justify-content: center;
}

.btn-details:hover {
  background: #fed7c7;
}

/* ===== DASHBOARD LOCK OVERLAY ===== */
.card-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  z-index: 5;
  pointer-events: none;
}
.card-lock-overlay i {
  font-size: 28px;
  color: #7f7e80;
}
.card-lock-overlay span {
  font-size: 13px;
  color: #7f7e80;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.item-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 6px;
  z-index: 5;
  pointer-events: none;
}
.item-lock-overlay i {
  font-size: 13px;
  color: #7f7e80;
}
.item-lock-overlay span {
  font-size: 11px;
  color: #7f7e80;
  font-weight: 600;
}

/* ===== SCORE AGILIZZA ===== */
.score-card {
  background: #414043;
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: stretch;
  height: 108px;
  flex-shrink: 0;
  box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.score-card .skeleton-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
}

.score-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.score-card-row-1 {
  /* Primeira linha: apenas título */
}

.score-card-row-2 {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.score-card-row-2 .score-info {
  flex: 1;
}

.score-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.score-info h4 {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  line-height: 24px;
}

.score-info .score-label {
  font-size: 16px;
  color: #1aac68;
  font-weight: 700;
}

.score-info .score-value {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 24px;
}

.score-info .score-total {
  font-size: 13px;
  font-weight: 400;
  color: #94a3b8;
}

.score-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  align-self: flex-end;
  height: 52px;
}

.score-bar {
  width: 12px;
  border-radius: 12px;
  background: #dbe1f0;
}

.score-bar[data-index="0"] { height: 60%; }
.score-bar[data-index="1"] { height: 70%; }
.score-bar[data-index="2"] { height: 80%; }
.score-bar[data-index="3"] { height: 90%; }
.score-bar[data-index="4"] { height: 100%; }

.card-auto {
  flex: 0 0 auto;
}

/* ===== INDICADORES ===== */
.indicadores-layout {
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  border: 1px solid var(--border-darker, #e6eaf4);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  padding: 0 16px;
}

.indicador-principal {
  flex: 1;
  padding: 0;
  text-align: left;
  background: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.indicadores-group-right {
  display: flex;
  gap: 24px;
  min-height: 64px;
  align-items: center;
}

.indicadores-group-right .indicador-item {
  flex: 1;
  padding: 0;
  text-align: center;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.indicador-item-text-nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.indicador-item-value-left {
  width: 100%;
  text-align: left;
}

.indicador-item-label-semibold {
  font-weight: 600;
}

.indicador-item .indicador-value {
  width: 100%;
  text-align: left;
  font-family: var(--font-family-source);
  font-weight: var(--font-weight-900, 900);
  line-height: 1;
}

.indicador-principal .indicador-value {
  color: #f26b37;
}

.indicador-item .indicador-label {
  color: #414043;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.indicador-principal .indicador-label {
  color: #f26b37;
}

/* Coloração por posição — grupo direito */
.indicadores-group-right .indicador-item:nth-child(1) .indicador-value { color: #148651; }
.indicadores-group-right .indicador-item:nth-child(2) .indicador-value { color: #b38d07; }
.indicadores-group-right .indicador-item:nth-child(3) .indicador-value { color: #e2354a; }

/* ===== SITUAÇÃO FISCAL ===== */
#fiscal-card {
  overflow: hidden;
}

#fiscal-card .card-body {
  min-height: 0;
  overflow: hidden;
}

.fiscal-content-real {
  border: 1px solid #edf0f8;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex: 1;
  min-height: 0;
}

.fiscal-content {
  display: flex;
  gap: 0;
  flex: 1;
  height: 100%;
  min-height: 0;
}

.fiscal-chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 16px;
  flex: 1;
  min-width: 0;
  min-height: 220px;
  max-height: clamp(280px, 46vh, 520px);
}

.bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 100%;
  min-height: 0;
}

.bar-container {
  width: 100%;
  max-width: 80px;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.bar-fill {
  width: 100%;
  border-radius: 12px;
}

.bar-percentage {
  width: 100%;
  text-align: center;
}

.bar-label {
  width: 100%;
  text-align: center;
}

.bar-label-black {
  color: #000000;
}

.fiscal-pendencias {
  flex: 1;
  max-width: 189.33px;
  min-height: 0;
  background: #edf0f8;
  padding: 16px;
}

#fiscal-pendencias-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  max-height: clamp(280px, 46vh, 520px);
  overflow: hidden;
}

.fiscal-pendencias-items {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.fiscal-pendencias-items::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.fiscal-pendencias h4 {
  font-weight: 600;
  font-size: 14px;
  color: #334155;
  text-align: center;
  margin: 0 0 12px;
}

.pendencia-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0px 16px 0px 16px;
  flex: 0 0 48px;
  height: 48px;
  border-radius: 16px;
  background: white;
}

.pendencia-item span:first-child {
  font-size: 13px;
  color: #475569;
  flex: 1;
  min-width: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pendencia-item span:last-child {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  flex-shrink: 0;
}

@media (min-width: 769px) {
  #fiscal-card .fiscal-pendencias {
    max-width: 208px;
  }

  #fiscal-card .pendencia-item {
    padding: 0 12px;
    gap: 6px;
  }

  #fiscal-card .pendencia-item span:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  #fiscal-card .pendencia-item span:last-child {
    margin-left: auto;
    padding-left: 6px;
    flex: 0 0 auto;
  }
}

@media (min-width: 1201px) {
  #fiscal-card .fiscal-chart {
    max-height: clamp(280px, 69vh, 520px);
  }

  #fiscal-card #fiscal-pendencias-list {
    max-height: clamp(280px, 69vh, 520px);
  }
}

/* ===== MONITORAMENTO CNDS ===== */
.cnds-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cnds-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 16px 24px;
}

.cnds-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #414043;
  text-align: center;
  padding: 0;
}

.donut-chart-large {
  position: relative;
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}

.donut-chart-large svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-chart-large .donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-center .donut-value {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
}

.cnds-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cnds-legend-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.cnds-legend-item .legend-value {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.cnds-legend-item .legend-label {
  font-size: 13px;
  color: #64748b;
}

/* Por tipo section */
.por-tipo {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
  border: 1px solid #edf0f8;
  border-radius: 16px;
}

.por-tipo h4 {
  text-align: center;
  margin-bottom: 16px;
}

.tipo-row {
  margin-bottom: 16px;
}

.tipo-row:last-child {
  margin-bottom: 0;
}

.tipo-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 6px;
}

.tipo-name-semibold {
  font-weight: 600;
}

.tipo-percent {
  flex-shrink: 0;
  text-align: right;
}

.tipo-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #dbe1f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0;
}

.progress-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.5s ease;
}

.tipo-details {
  display: flex;
  min-height: 38px;
  gap: 8px;
}

.tipo-detail-col {
  display: flex;
  justify-content: center;
  flex-direction: column;
  flex: 1;
  padding: 4px 8px;
  background: #f4f6fa;
  border-radius: 8px;
}

/* ===== DOMICÍLIO ===== */
.domicilio-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.domicilio-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #414043;
  text-align: center;
  padding: 0;
}

/* Horizontal Bars */
.horiz-bars {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  height: 116px;
  min-height: 116px;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.horiz-bar-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
}

.horiz-bar-label {
  width: 70px;
  font-size: 12px;
  color: #475569;
  text-align: left;
  flex-shrink: 0;
}

.horiz-bar-track {
  flex: 1;
  height: 12px;
  background: #dbe1f0;
  border-radius: 12px;
  overflow: hidden;
}

.horiz-bar-fill {
  height: 100%;
  border-radius: 6px;
}

.horiz-bar-value {
  min-width: 48px;
  width: 48px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  text-align: right;
  flex-shrink: 0;
}

/* Donut charts section */
.donuts-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 16px;
}

.donuts-title {
  font-size: 14px;
  font-weight: 600;
  color: #414043;
  text-align: center;
  margin-bottom: 0;
}

/* Donut charts row */
.donuts-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  column-gap: 8px;
  row-gap: 16px;
  padding-top: 10.9px;
  padding-bottom: 22.9px;
}

.donut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 112px;
  width: min(177px, calc((100% - 16px) / 3));
  min-width: 112px;
  max-width: 177px;
  gap: 16px;
}

.donut-chart-small {
  position: relative;
  width: 112px;
  height: 112px;
}

.donut-chart-small svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-chart-small .donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.donut-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #7f7e80;
}

.donut-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.donut-meta svg {
  width: 12px;
  height: 12px;
}

.donut-meta i {
  font-size: 16px;
}

.donut-unread {
  font-size: 14px;
  font-weight: 600;
}

.donut-unread.text-yellow { color: #b38d07; }
.donut-unread.text-blue { color: #5091e6; }
.donut-unread.text-red { color: #e2354a; }

/* Mensagens importantes */
.mensagens-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
  border-radius: 16px;
  border: 1px solid var(--border-smooth);
}

.mensagens-title {
  text-align: center;
}

.mensagens-grid {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.mensagem-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mensagem-item .msg-icon {
  font-size: 16px;
}

.mensagem-item .msg-count {}

.mensagem-item .msg-label {}

.mensagem-item:nth-child(1) .msg-count,
.mensagem-item:nth-child(1) .msg-icon { color: #e6b509; }
.mensagem-item:nth-child(2) .msg-count,
.mensagem-item:nth-child(2) .msg-icon { color: #59a1ff; }
.mensagem-item:nth-child(3) .msg-count,
.mensagem-item:nth-child(3) .msg-icon { color: #fb3b52; }

/* ===== BUTTONS ===== */

/* --- Base button reset --- */
.btn-primary,
.btn-outline,
.btn-secondary,
.btn-ghost,
.btn-icon,
.btn-back,
.btn-action-dropdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  line-height: 1;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary:disabled,
.btn-outline:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled,
.btn-icon:disabled,
.btn-back:disabled,
.btn-action-dropdown:disabled {
  background-color: #f4f6fa;
  border-color: #e6eaf4;
  color: #a0a4b0;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Sizes --- */
/* Default = medium */
.btn-primary,
.btn-outline,
.btn-secondary,
.btn-ghost {
  height: 42px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 8px;
}

.btn-primary.btn-lg,
.btn-outline.btn-lg,
.btn-secondary.btn-lg,
.btn-ghost.btn-lg {
  height: 48px;
  padding: 0 20px;
  font-size: 15px;
}

.btn-primary.btn-sm,
.btn-outline.btn-sm,
.btn-secondary.btn-sm,
.btn-ghost.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

/* --- Primary (fill) --- */
.btn-primary {
  background: #f26b37;
  border: 1px solid #f26b37;
  color: #fbfcfd;
}

.btn-primary:hover {
  background: #e05a28;
  border-color: #e05a28;
}

.btn-primary:active {
  background: #c94d20;
  border-color: #c94d20;
}

/* --- Outline --- */
.btn-outline {
  background: #fbfcfd;
  border: 1px solid #e6eaf4;
  border-radius: 24px;
  color: #f26b37;
}

.btn-outline:hover {
  background: #fff5f0;
  border-color: #fed7c7;
}

.btn-outline:active {
  background: #ffe8dc;
  border-color: #f26b37;
}

/* --- Secondary --- */
.btn-secondary {
  background: transparent;
  border: 1px solid #e6eaf4;
  border-radius: 24px;
  color: #414043;
}

.btn-secondary:hover {
  background: #f4f6fa;
  border-color: #d0d5e2;
}

.btn-secondary:active {
  background: #e8ecf2;
}

/* --- Ghost (text) --- */
.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: #414043;
}

.btn-ghost:hover {
  background: #f4f6fa;
}

.btn-ghost:active {
  background: #e8ecf2;
}

/* --- Icon button --- */
.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid #e6eaf4;
  border-radius: 24px;
  color: #414043;
}

.btn-icon.btn-lg {
  width: 48px;
  height: 48px;
}

.btn-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-info-icon:hover {
  background: #f4f6fa;
}
.btn-info-icon i {
  font-size: 16px;
  color: #7f7e80;
}

/* --- Small inline icon buttons (alias editing, etc.) --- */
.btn-icon-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
}
.btn-outline-sm {
  background: transparent;
  border: 1px solid #e6eaf4;
  color: #414043;
}
.btn-outline-sm:hover { background: #f4f6fa; }
.btn-success-sm { background: #22c55e; color: #fff; }
.btn-success-sm:hover { background: #16a34a; }
.btn-ghost-sm { background: transparent; color: #7f7e80; }
.btn-ghost-sm:hover { background: #f4f6fa; }
.btn-danger-sm { background: transparent; border: 1px solid #e6eaf4; color: #ef4444; }
.btn-danger-sm:hover { background: #fef2f2; }
.btn-danger { background: #ef4444; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; }
.btn-danger:hover { background: #dc2626; }

/* --- Alias inline edit --- */
.alias-cell { display: flex; align-items: center; gap: 6px; min-height: 28px; }
.alias-edit-container { display: none; align-items: center; gap: 4px; }
.alias-edit-container.active { display: flex; }
.alias-input {
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  min-width: 180px;
  height: 28px;
  outline: none;
}
.alias-input:focus { border-color: #6c5ce7; box-shadow: 0 0 0 2px rgba(108,92,231,0.12); }

/* --- Form inline row (select + button side by side) --- */
.form-inline-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.form-inline-row .form-inline-grow {
  flex: 1;
  min-width: 0;
}
.btn-add {
  height: 40px;
  padding: 8px 16px;
  flex-shrink: 0;
}

/* --- Checkbox groups (permissions, security) --- */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #414043;
  margin: 0;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #f26b37;
}

/* --- Form hints --- */
.form-hint {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

/* --- Password toggle --- */
.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-password-wrapper input {
  flex: 1;
  padding-right: 40px !important;
}
.btn-toggle-password {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 18px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.btn-toggle-password:hover {
  color: #64748b;
}

/* --- Form alert --- */
.form-alert-error {
  margin: 0 24px 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  background: #fecaca;
  color: #991b1b;
}
.form-alert-error ul {
  margin: 0;
  padding-left: 16px;
}

/* --- Companies table wrapper (inside form) --- */
.form-companies-wrapper {
  margin-top: 24px;
}

/* --- Modal info list --- */
.modal-info-list {
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 14px;
  color: #414043;
  line-height: 2;
}
.modal-info-list .text-muted {
  color: #7f7e80;
  font-size: 12px;
}
.modal-info-note {
  margin-top: 12px;
  font-style: italic;
  color: #7f7e80;
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
}

.btn-icon:hover {
  background: #f4f6fa;
}

.btn-icon:active {
  background: #e8ecf2;
}

/* --- Back button --- */
.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--surface-primary);
  background-color: var(--surface-minimal);
  border: 1px solid var(--border-darker);
  border-radius: 32px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.btn-back:hover {
  background-color: var(--surface-highlighted);
  border-color: var(--border-highlighted);
}

.btn-back:active {
  background-color: var(--surface-soft);
}

.btn-back i {
  font-size: var(--icon-size-large);
  color: var(--typography-soft);
  line-height: 1;
}

/* --- Action dropdown (table rows) --- */
.btn-action-dropdown {
  height: 32px;
  min-height: 32px;
  min-width: 32px;
  padding: 0 11.37px;
  gap: 8px;
  background-color: var(--surface-soft, #f4f6fa);
  border: 1px solid var(--surface-soft, #edf0f8);
  border-radius: 32px;
  font-size: 13px;
  color: var(--typography-highlighted, #414043);
  opacity: 1;
  transition:
    flex-grow .3s cubic-bezier(.4, 0, .2, 1),
    color .3s cubic-bezier(.4, 0, .2, 1),
    border-color .3s cubic-bezier(.4, 0, .2, 1),
    background-color .3s cubic-bezier(.4, 0, .2, 1),
    opacity .15s cubic-bezier(.4, 0, 1, 1);
}

.btn-action-dropdown:hover {
  background-color: var(--surface-default-hover, #e8ecf2);
  border-color: var(--surface-default-hover, #e8ecf2);
}

.btn-action-dropdown:active {
  background-color: #dde1eb;
  border-color: #dde1eb;
}

.btn-action-dropdown .ph {
  font-size: 12px;
  color: var(--typography-secondary, #7f7e80);
  line-height: 1;
}

.btn-action-dropdown svg {
  width: 12px;
  height: 12px;
  color: var(--typography-secondary, #7f7e80);
}

/* --- Icon sizing inside buttons --- */
.btn-primary i,
.btn-outline i,
.btn-secondary i,
.btn-ghost i,
.btn-icon i {
  font-size: var(--icon-size-large);
  line-height: 1;
}

.toolbar-icon-mobile {
  display: none;
}

/* ===== TABS (Segmented pill style) ===== */
.tabs-pill {
  display: inline-flex;
  align-items: center;
  background: #f4f6fa;
  border-radius: 24px;
  padding: 4px;
  height: 40px;
  box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 24px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #414043;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 16px;
  height: 100%;
}

.tab-pill:hover {
  background: rgba(0, 0, 0, 0.04);
}

.tab-pill.active {
  background: #f26b37;
  color: #fff;
  border-radius: 24px;
}

.tab-pill.active:hover {
  background: #e05a28;
}

/* ===== TAGS / BADGES ===== */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 20px;
  min-width: 20px;
  padding: 0 8px;
  border-radius: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
}

.login-table-tag {
  max-width: 100%;
  overflow: hidden;
}

.login-table-tag-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logins-companies-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.login-company-tag {
  max-width: 220px;
}

.logins-companies-tags .login-company-tag {
  max-width: 220px;
}

.tag-success {
  background: #bbecd5;
  color: #0e5f39;
}

.tag-danger {
  background: #fecaca;
  color: #991b1b;
}

.tag-warning {
  background: #fef3c7;
  color: #92400e;
}

.tag-info {
  background: #dbeafe;
  color: #1e40af;
}

.tag-secondary {
  background: #f1f5f9;
  color: #64748b;
}

.tag-client {
  background: #ede9fe;
  color: #5b21b6;
}

/* ===== STAT CARDS (top summary) ===== */
.stat-cards {
  display: flex;
  gap: 16px;
  padding: 0 24px 24px;
}

.stat-card {
  flex: 1;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card .stat-value {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 14px;
  font-weight: 400;
  color: #414043;
}

.stat-card .stat-value.text-success { color: #1aac68; }
.stat-card .stat-value.text-warning { color: #eab308; }
.stat-card .stat-value.text-danger  { color: #ef4444; }
.stat-card .stat-value.text-info    { color: #3b82f6; }
.stat-card .stat-value.text-primary { color: #f26b37; }

/* ===== DATA TABLE ===== */
.data-table-wrapper {
  overflow: visible;
  margin: 0 24px;
}

.table-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--border-darker);
  border-radius: 16px;
  overflow: visible;
}

.data-table-viewport {
  flex: 1;
  min-height: 0;
  overflow: visible;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-toolbar-left {
  flex-shrink: 0;
}

.table-toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 332px;
  height: 40px;
  padding: 12px;
  background: #fff;
  border: 1px solid #c6cbd8;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.table-search:focus-within {
  border-color: #f26b37;
}

.table-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  color: #414043;
  outline: none;
}

.table-search input::placeholder {
  color: #7f7e80;
}

.table-search-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.table-search svg,
.table-search-btn svg {
  width: 16px;
  height: 16px;
  color: #7f7e80;
  flex-shrink: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table thead th {
  background: #f4f6fa;
  border-bottom: 1px solid #e6eaf4;
  border-right: 1px solid var(--border-darker);
  padding: 12px 16px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #7f7e80;
  text-align: left;
  white-space: nowrap;
}

.data-table thead th:first-child {
  border-top-left-radius: 16px;
}

.data-table thead th:last-child {
  border-top-right-radius: 16px;
  border-right: none;
}

.data-table thead th.th-checkbox,
.data-table tbody td.td-checkbox {
  width: 52px;
  text-align: center;
  padding: 12px 16px;
}

.data-table thead th.th-actions,
.data-table tbody td.td-actions {
  width: 103px;
  text-align: center;
  overflow: visible;
  position: relative;
}

.data-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table thead th.sortable:hover {
  color: #414043;
}

.data-table thead th .sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 12px;
}

.data-table thead th.sorted-asc .sort-icon {
  transform: rotate(180deg);
}

.data-table thead th.sorted-desc .sort-icon {
  transform: rotate(0deg);
}

.data-table tbody td {
  border-bottom: 1px solid #e6eaf4;
  border-right: 1px solid var(--border-darker);
  padding: 8px 16px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
  vertical-align: middle;
  color: #414043;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}

.data-table tbody td:last-child {
  border-right: none;
}

.data-table tbody tr:hover {
  background: #fafbfd;
}

.data-table tbody td .cell-main {
  font-size: 14px;
  color: #414043;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table tbody td .cell-sub {
  font-size: 12px;
  color: #7f7e80;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action dropdown in table — styles consolidated above */

/* Table checkbox */
.table-check {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  border: 1px solid #c6cbd8;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
}

.table-check:checked {
  background: #f26b37;
  border-color: #f26b37;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Pagination bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #f4f6fa;
  border-top: 1px solid #e6eaf4;
  border-radius: 0 0 16px 16px;
  font-size: 12px;
  color: #414043;
}

.pagination-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-bar-left .results-per-page-label {
  color: var(--typography-primary, #414043);
}

.per-page-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pagination-bar-left select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: var(--typography-primary, #414043);
  cursor: pointer;
  outline: none;
  padding-right: 18px;
}

.per-page-select-icon {
  position: absolute;
  right: 0;
  font-size: 12px;
  color: var(--typography-highlighted, #414043);
  pointer-events: none;
  line-height: 1;
}

.pagination-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pagination-bar-right .result-count {
  font-size: 12px;
  color: #414043;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #E6EAF4;
  border-radius: 16px;
  background: var(--surface-minimal, transparent);
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.6, 1),
              border-color 250ms cubic-bezier(0.4, 0, 0.6, 1),
              box-shadow 250ms cubic-bezier(0.4, 0, 0.6, 1),
              color 250ms cubic-bezier(0.4, 0, 0.6, 1);
  position: relative;
  overflow: hidden;
}

.pagination-btn:hover:not(:disabled) {
  background-color: rgba(65, 64, 67, 0.04);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.pagination-btn:active:not(:disabled) {
  background-color: rgba(65, 64, 67, 0.08);
}

.pagination-btn:focus-visible {
  outline: 2px solid var(--surface-primary, #414043);
  outline-offset: 2px;
}

.pagination-btn:disabled {
  background-color: #F4F6FA;
  border-color: #EDF0F8;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-btn i {
  font-size: 12px;
  color: var(--surface-primary, #414043);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pagination-btn:disabled i {
  color: #a0a4b0;
}

.pagination-info {
  font-size: 13px;
  color: #7f7e80;
  padding: 0 8px;
}

a.pagination-btn {
  text-decoration: none;
  color: #414043;
}

.sort-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

th.sorted .sort-link {
  color: #f26b37;
}

/* ===== SEARCHABLE SELECT ===== */
.ss-wrapper {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.ss-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #c6cbd8;
  border-radius: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: #414043;
  cursor: pointer;
  transition: border-color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-trigger:hover { border-color: #94a3b8; }
.ss-wrapper.open .ss-trigger { border-color: #f26b37; }

.ss-trigger .ss-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.ss-trigger .ss-placeholder { color: #7f7e80; }
.ss-trigger .ss-clear {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 50%;
}
.ss-trigger .ss-clear:hover { color: #ef4444; }
.ss-wrapper.has-value .ss-trigger .ss-clear { display: flex; }
.ss-trigger .ss-arrow {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  color: #94a3b8;
  transition: transform 0.2s;
}
.ss-wrapper.open .ss-trigger .ss-arrow { transform: rotate(180deg); }

.ss-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e6eaf4;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 999;
  max-height: 280px;
  overflow: hidden;
  flex-direction: column;
}

.ss-wrapper.open .ss-dropdown { display: flex; }
.ss-wrapper.ss-dropup .ss-dropdown { top: auto; bottom: calc(100% + 4px); }
.ss-wrapper.ss-dropup .ss-trigger .ss-arrow { transform: rotate(180deg); }
.ss-wrapper.ss-dropup.open .ss-trigger .ss-arrow { transform: rotate(0deg); }

.ss-search-box {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.ss-search-box input {
  width: 100%;
  height: 32px;
  padding: 4px 8px;
  border: 1px solid #e6eaf4;
  border-radius: 6px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  color: #414043;
  outline: none;
  background: #f8fafc;
}

.ss-search-box input:focus { border-color: #f26b37; }
.ss-search-box input::placeholder { color: #94a3b8; }

.ss-options {
  overflow-y: auto;
  max-height: 220px;
  padding: 4px;
}

.ss-option {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: #414043;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-option:hover { background: #f4f6fa; }
.ss-option.selected { background: #fff5f0; color: #f26b37; }
.ss-option.hidden { display: none; }
.ss-no-results {
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

/* ===== COLOR PICKER ===== */
.cp-wrapper {
  position: relative;
  width: 100%;
}

.cp-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #c6cbd8;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.cp-trigger:hover { border-color: #94a3b8; }
.cp-wrapper.open .cp-trigger { border-color: #f26b37; }

.cp-swatch {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
  transition: transform 0.15s;
}

.cp-label {
  flex: 1;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: #414043;
}

.cp-label.placeholder { color: #7f7e80; }

.cp-arrow {
  width: 12px;
  height: 12px;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.cp-wrapper.open .cp-arrow { transform: rotate(180deg); }

.cp-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 222px;
  background: #fff;
  border: 1px solid #e6eaf4;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 999;
  padding: 14px;
}

.cp-wrapper.open .cp-dropdown { display: block; }

.cp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-color {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
  position: relative;
  flex-shrink: 0;
}

.cp-color:hover {
  transform: scale(1.25);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.cp-color.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px #414043;
}

.cp-color.selected::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 72px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: #fff;
  min-width: 280px;
  max-width: 400px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.removing {
  opacity: 0;
  transform: translateX(30px);
}

.toast-success { background: #1aac68; }
.toast-error   { background: #ef4444; }
.toast-info    { background: #3b82f6; }
.toast-warning { background: #eab308; color: #414043; }

.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast-text { flex: 1; }
.toast-close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 16px;
  padding: 0 2px;
}
  transition-delay: 0ms, 0ms;
.toast-close:hover { opacity: 1; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===== CHECKLIST (multi-select with search) ===== */
.checklist-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #414043;
}

.checklist-search {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #e6eaf4;
  border-radius: 6px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  color: #414043;
  outline: none;
  background: #f8fafc;
}

.checklist-search:focus { border-color: #f26b37; }
.checklist-search::placeholder { color: #94a3b8; }

.checklist-items {
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #e6eaf4;
  border-radius: 8px;
  padding: 4px;
  display: flex;
  flex-direction: column;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: #414043;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}

.checklist-item:hover { background: #f4f6fa; }
.checklist-item.hidden { display: none; }

.checklist-item input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  border: 1px solid #c6cbd8;
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.checklist-item input[type="checkbox"]:checked {
  background-color: #f26b37;
  border-color: #f26b37;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
}

.checklist-item input[type="checkbox"]:hover {
  border-color: #f26b37;
}

.checklist-item span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.checklist-all {
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 2px;
  padding-bottom: 8px;
}

/* ===== ADVANCED FILTERS PANEL ===== */
/* Filter pill button (Figma style) */
.btn-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  min-width: 40px;
  padding: 0 14px;
  border: 1px solid #e6eaf4;
  border-radius: 24px;
  background: #fbfcfd;
  color: #f26b37;
  font-size: 14px;
  font-weight: 400;
  font-family: 'Source Sans 3', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  position: relative;
}
.btn-filter-pill:hover { background: #fef7f3; border-color: #f26b37; }
.btn-filter-pill svg { flex-shrink: 0; }
.filter-count-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #f26b37;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

/* Legacy filter toggle (keep for backward compat) */
.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e6eaf4;
  border-radius: 50%;
  background: #fff;
  color: #414043;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.filter-toggle-btn:hover { background: #f4f6fa; }
.filter-toggle-btn.active { background: #f26b37; border-color: #f26b37; color: #fff; }
.filter-toggle-btn svg { width: 18px; height: 18px; }

/* Filters drawer (slide from right) */
.filters-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.filters-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.filters-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  height: 100dvh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.filters-drawer.open {
  transform: translateX(0);
}

.filters-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e6eaf4;
}
.filters-drawer-header h3 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #414043;
  margin: 0;
}
.filters-drawer-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}
.filters-drawer-close:hover { background: #f4f6fa; color: #414043; }

.filters-drawer-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px;
}

.filters-drawer-body .ss-wrapper,
.filters-drawer-body .ss-trigger,
.filters-drawer-body .filter-field {
  max-width: 100%;
  min-width: 0;
}

.filters-drawer-body .ss-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filters-drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.filters-drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid #e6eaf4;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Legacy filters-panel (keep for pages not yet migrated) */
.filters-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfd;
}
.filters-panel.open { display: block; }

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  align-items: end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-field label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #7f7e80;
}

.filter-field select,
.filter-field input {
  height: 36px;
  padding: 4px 10px;
  border: 1px solid #e6eaf4;
  border-radius: 6px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  color: #414043;
  background: #fff;
  outline: none;
  width: 100%;
}

.filter-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23414043' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; padding-right: 24px; }
.filter-field select:focus,
.filter-field input:focus { border-color: #f26b37; }

.filters-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.filter-apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  background: #f26b37;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.filter-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  background: none;
  color: #7f7e80;
  border: none;
  border-radius: 6px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  cursor: pointer;
}

.filter-clear-btn:hover { color: #414043; }

.filter-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: #f26b37;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* ===== FORM COMPONENTS ===== */
.form-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  padding: 24px;
  margin: 0 24px;
}

.form-card + .form-card {
  margin-top: 20px;
}

.form-card .form-section-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #414043;
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 24px;
  min-width: 0;
}

.form-grid > * {
  min-width: 0;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #414043;
}

.form-field label .optional {
  color: #7f7e80;
  font-style: italic;
  margin-left: 4px;
}

.form-field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-field select,
.form-field textarea {
  height: 40px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #c6cbd8;
  border-radius: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: #414043;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-field textarea {
  height: auto;
  min-height: 80px;
  resize: vertical;
}

.form-field input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  cursor: pointer;
}

.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.5;
  font-size: 16px;
}

.form-field input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.form-field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #f26b37;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #7f7e80;
}

.form-field input:disabled,
.form-field select:disabled {
  background: #f4f6fa;
  color: #7f7e80;
  cursor: not-allowed;
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23414043' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-field .input-with-icon {
  position: relative;
}

.form-field .input-with-icon input {
  padding-right: 40px;
}

.form-field .input-with-icon .field-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #7f7e80;
  pointer-events: none;
}

.form-field .input-with-icon .field-icon svg {
  width: 16px;
  height: 16px;
}

/* Form footer (Cancelar / Confirmar) */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 24px 24px;
}

/* ===== TITLE BAR VARIANTS ===== */
.title-bar-with-back {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 24px 0px 24px;
  margin: 24px 0;
  flex-wrap: wrap;
  gap: 16px;
}

.title-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.title-bar-left .h1 {
  min-height: 24px;
}

.title-bar-subtitle {
  font-size: 13px;
  color: #7f7e80;
  font-weight: 400;
  margin-top: 2px;
}

.title-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== DROPDOWN MENUS (generic) ===== */
.dropdown-wrapper {
  position: relative;
  display: inline-flex;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e6eaf4;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 1100;
  padding: 4px;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-menu-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: #414043;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  white-space: nowrap;
}

.dropdown-menu-item:hover {
  background: #f4f6fa;
}

.dropdown-menu-item.active,
.dropdown-menu-item.selected {
  color: #f26b37;
  background: #fff5f0;
}

.dropdown-menu-divider {
  height: 1px;
  background: #e6eaf4;
  margin: 4px 0;
}

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay .ss-dropdown {
  z-index: 1001;
  position: fixed;
  right: auto;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

html.modal-open,
body.modal-open {
  overflow: hidden !important;
  overscroll-behavior: contain;
}

.modal-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e6eaf4;
}

.modal-box-header h3 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #414043;
}

.btn-quick-fill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #fed7c7;
  border-radius: 20px;
  background: #fff7f3;
  color: #f26b37;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-quick-fill:hover { background: #fef0e8; border-color: #f26b37; }

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #f4f6fa;
  border-radius: 8px;
  font-size: 18px;
  color: #414043;
  cursor: pointer;
}

.modal-close:hover { background: #e6eaf4; }

.modal-box-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.modal-box-body p {
  font-size: 14px;
  color: #414043;
  line-height: 1.6;
}

.modal-box-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e6eaf4;
}

/* ===== TASK ATTRIBUTION ===== */
.task-attr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.task-attr-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.task-attr-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-attr-assign { background: #fff; color: #f26b37; border: 1px dashed #fed7c7; }
.task-attr-none { background: #fef2f2; color: #ef4444; }
.task-attr-none .task-attr-dot { background: #ef4444; }
.task-attr-progress { background: #fef3c7; color: #92400e; }
.task-attr-progress .task-attr-dot { background: #eab308; }
.task-attr-review { background: #fef3c7; color: #92400e; }
.task-attr-review .task-attr-dot { background: #f97316; }
.task-attr-completed { background: #dcfce7; color: #166534; }
.task-attr-completed .task-attr-dot { background: #22c55e; }
.task-attr-canceled { background: #f1f5f9; color: #64748b; }
.task-attr-canceled .task-attr-dot { background: #94a3b8; }

/* Task list modal */
.tl-info-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 24px;
  font-size: 13px;
  color: #94a3b8;
  border-bottom: 1px solid #f1f5f9;
}
.tl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.tl-row:last-child { border-bottom: none; }
.tl-row-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.tl-row-right { flex-shrink: 0; }
.tl-row-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tl-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-row-name {
  font-size: 14px;
  font-weight: 600;
  color: #414043;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-row-date { font-size: 13px; color: #94a3b8; }
#modal-task-list .ss-wrapper { width: 150px; }
#modal-task-list .ss-trigger { height: 30px; padding: 4px 10px; font-size: 13px; }
#modal-task-list .ss-dropdown { min-width: 150px; }

/* ===== KANBAN ===== */
.kanban-col-header {
  padding: 12px 16px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kanban-col-count {
  background: rgba(255,255,255,.25);
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 12px;
}

.kanban-col-warning { background: #f59e0b; }
.kanban-col-info { background: #3b82f6; }
.kanban-col-success { background: #22c55e; }

.kanban-card {
  display: block;
  background: #fff;
  border: 1px solid #e6eaf4;
  border-left: 3px solid #94a3b8;
  border-radius: 8px;
  padding: 12px;
  text-decoration: none;
  transition: box-shadow .15s ease;
}

.kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.kanban-ghost {
  opacity: .4;
  background: #e9ecef;
}

.kanban-chosen {
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

/* ===== UNDERLINE TABS ===== */
.underline-tab {
  padding: 8px 16px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #7f7e80;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.2s;
}

.underline-tab:hover { color: #414043; }
.underline-tab.active { color: #f26b37; border-bottom-color: #f26b37; }

/* ===== ACTION MENU (table row dropdown) ===== */
.action-menu {
  position: absolute;
  right: 0;
  bottom: 100%;
  margin-bottom: 4px;
  background: #fff;
  border: 1px solid #e6eaf4;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  min-width: 200px;
  z-index: 999;
  padding: 4px;
  overflow: hidden;
}

.action-menu-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: #414043;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}

.action-menu-item:hover {
  background: #f4f6fa;
}

.action-menu-item-danger {
  color: #ef4444;
}

.action-menu-item-danger:hover {
  background: #fef2f2;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  padding: 12px 20px;
  font-size: 13px;
}

.detail-table th {
  text-align: left;
  font-weight: 500;
  color: #7f7e80;
  white-space: nowrap;
  width: 1%;
  background: #f8f9fb;
}

.detail-table td {
  color: #1e293b;
}

.detail-table tr + tr th,
.detail-table tr + tr td {
  border-top: 1px solid #f1f5f9;
}

/* ===== FOOTER ===== */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  font-size: 11px;
  color: #94a3b8;
  margin-left: 72px;
}

/* ===== SKELETON / PRELOADER ===== */
.skeleton-wrapper {
  animation: skeleton-fade-in 0.3s ease;
}

.skeleton-block {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
  display: inline-block;
}

.skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes skeleton-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dark background variant */
.score-card .skeleton-block {
  background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

/* ===== FLOAT ACTION BAR (hidden on desktop) ===== */
.float-action-bar,
.mobile-overlay,
.mobile-drawer {
  display: none;
}

/* ===== ADMIN DASHBOARD ===== */

.admin-section {
  margin-bottom: 28px;
  padding: 0 24px;
}
.admin-section--flush {
  padding: 0;
}
.admin-section--flush .admin-section-title {
  padding: 0 24px;
}
.admin-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #414043;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-section-title i {
  font-size: 20px;
  color: #f26b37;
}

/* Two-column layout */
.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.admin-panel {
  background: #fff;
  border: 1px solid #e6eaf4;
  border-radius: 12px;
  padding: 20px;
}
.admin-panel .admin-section-title {
  margin-bottom: 16px;
}

/* Action cards (quick actions) */
.admin-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.admin-action-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.admin-action-card--stacked {
  flex-direction: column;
  align-items: stretch;
}
.admin-action-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.admin-action-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.admin-action-icon--danger { color: #ef4444; }
.admin-action-icon--warning { color: #f59e0b; }
.admin-action-icon--primary { color: #3b82f6; }
.admin-action-name {
  font-size: 13px;
  font-weight: 600;
  color: #414043;
}
.admin-action-desc {
  font-size: 12px;
  color: #7f7e80;
  line-height: 1.3;
}
.admin-action-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  margin-top: 8px;
}
.admin-select {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #e6eaf4;
  border-radius: 8px;
  font-size: 13px;
  color: #414043;
}

/* Infra list (VMs) */
.admin-infra-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-infra-list--horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-infra-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.admin-infra-item:last-child { border-bottom: none; }
.admin-infra-info {
  flex: 1;
  min-width: 0;
}
.admin-infra-name {
  font-size: 13px;
  font-weight: 600;
  color: #414043;
  display: block;
}
.admin-infra-meta {
  font-size: 12px;
  color: #7f7e80;
}

/* Robot cards */
.admin-robot-card {
  background: #fff;
  border: 1px solid #e6eaf4;
  border-radius: 10px;
  padding: 14px;
  width: 240px;
  flex-shrink: 0;
}
.admin-robot-card.admin-status-active { border-left: 3px solid #22c55e; }
.admin-robot-card.admin-status-inactive { border-left: 3px solid #ef4444; }
.admin-robot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.admin-robot-name {
  font-size: 13px;
  font-weight: 600;
  color: #414043;
  flex: 1;
}
.admin-robot-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.admin-robot-details span {
  font-size: 12px;
  color: #7f7e80;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Status dot */
.admin-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-active {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.dot-inactive {
  background: #ef4444;
}

/* Sync pair (CND + SF side by side) */
.admin-sync-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.admin-sync-card {
  background: #fff;
  border: 1px solid #e6eaf4;
  border-radius: 10px;
  padding: 16px;
}
.admin-sync-card--danger { border-left: 3px solid #ef4444; }
.admin-sync-card--warning { border-left: 3px solid #f59e0b; }
.admin-sync-card--ok { border-left: 3px solid #22c55e; }
.admin-sync-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.admin-sync-label {
  font-size: 14px;
  font-weight: 600;
  color: #414043;
}
.admin-sync-value {
  font-size: 22px;
  font-weight: 700;
  color: #414043;
}
.admin-sync-actions {
  display: flex;
  gap: 8px;
}
.admin-sync-ok {
  color: #22c55e;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Sync table (DTE/DET/DJE summary) */
.admin-sync-table td,
.admin-sync-table th {
  vertical-align: middle;
}
.admin-sync-table-service {
  font-weight: 600;
  color: #414043;
}
.admin-sync-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-sync-cell-value {
  font-size: 16px;
  font-weight: 700;
}
.admin-sync-cell-actions {
  display: flex;
  gap: 6px;
}
.admin-sync-cell-link {
  font-size: 12px;
  color: #f26b37;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
}
.admin-sync-cell-link--danger {
  color: #ef4444;
}

/* Empty state */
.admin-empty {
  color: #7f7e80;
  font-size: 13px;
}
.admin-empty-state {
  text-align: center;
  padding: 32px;
}
.admin-empty-state i {
  font-size: 40px;
  color: #22c55e;
}
.admin-empty-state-title {
  font-weight: 600;
  color: #22c55e;
  margin-top: 8px;
}
.admin-empty-state-desc {
  color: #7f7e80;
  font-size: 13px;
}

/* Error text */
.admin-error-text {
  color: #ef4444;
  font-size: 13px;
}

/* Modal helpers */
.admin-modal-warning {
  color: #ef4444;
  font-size: 13px;
}
.admin-modal-hint {
  color: #7f7e80;
  font-size: 13px;
}

/* Button variants */
.btn-outline--sm {
  font-size: 13px;
  padding: 6px 12px;
}
.btn-outline--danger {
  color: #ef4444;
  border-color: #ef4444;
}
.btn-outline--warning {
  color: #f59e0b;
  border-color: #f59e0b;
}
.btn-primary--danger {
  background: #ef4444;
  border-color: #ef4444;
}
.btn-primary--warning {
  background: #f59e0b;
  border-color: #f59e0b;
}

/* ===== GUIDED TOUR ===== */
body.tour-active { overflow: hidden; }
.tour-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 10000;
  transition: opacity 0.2s;
}
.tour-spotlight {
  display: none;
  position: absolute;
  z-index: 10001;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.55);
  pointer-events: none;
  transition: all 0.3s ease;
}
.tour-tooltip {
  display: none;
  position: absolute;
  z-index: 10002;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  font-family: 'Source Sans 3', sans-serif;
  width: max-content;
  max-width: 380px;
  animation: tour-fade-in 0.25s ease;
}
@keyframes tour-fade-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.tour-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 0;
}
.tour-tooltip-counter {
  font-size: 12px;
  font-weight: 600;
  color: #f26b37;
  background: #fff5f0;
  padding: 2px 10px;
  border-radius: 10px;
}
.tour-tooltip-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.tour-tooltip-close:hover { color: #414043; }

.tour-tooltip-body { padding: 14px 20px; }
.tour-tooltip-title {
  font-size: 16px;
  font-weight: 700;
  color: #414043;
  margin-bottom: 6px;
}
.tour-tooltip-text {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}
.tour-tooltip-text strong { color: #414043; }

.tour-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 14px;
  gap: 8px;
}
.tour-tooltip-nav { display: flex; gap: 8px; }

.tour-btn-skip {
  background: none;
  border: none;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px 0;
  font-family: 'Source Sans 3', sans-serif;
}
.tour-btn-skip:hover { color: #64748b; }
.tour-btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  font-family: 'Source Sans 3', sans-serif;
}
.tour-btn-prev:hover { background: #e2e8f0; }
.tour-btn-next, .tour-btn-finish {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f26b37;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  font-family: 'Source Sans 3', sans-serif;
}
.tour-btn-next:hover, .tour-btn-finish:hover { background: #e05a2b; }

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablet / small laptop */
@media (max-width: 1199px) and (min-width: 769px) {
  .navbar-left {
    gap: 20px;
    min-width: 0;
  }

  .navbar-center {
    gap: 20px;
    min-width: 0;
  }

  .navbar-center a,
  .navbar-center button {
    padding: 6px;
    font-size: 13px;
    gap: 6px;
  }

  .navbar-right {
    gap: 10px;
  }

  .company-selector {
    width: 240px;
    max-width: 240px;
  }

  .title-bar-with-back {
    padding: 0 24px;
    gap: 12px;
  }

  .title-bar-right {
    gap: 16px;
  }

  .stat-cards {
    flex-wrap: wrap;
    padding: 0 24px 16px;
    gap: 12px;
  }

  .stat-card {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }

  .data-table-wrapper {
    margin: 0 24px;
  }

  .table-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 12px 24px;
  }

  .table-toolbar-left {
    min-width: 0;
    width: 100%;
  }

  .table-toolbar-right {
    display: flex;
    min-width: 0;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 4px;
  }

  .table-toolbar-right > * {
    flex: 0 0 auto;
  }

  .table-search {
    width: 100%;
    max-width: none;
  }

  .data-table-viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 860px;
  }

  .data-table thead th {
    padding: 10px 12px;
  }

  .data-table tbody td {
    padding: 8px 12px;
  }
}

/* Mobile */
@media (max-width: 768px) {

  /* --- Layout geral --- */
  .sidebar {
    display: none !important;
  }

  .sidebar-overlay {
    display: none !important;
  }

  .app-layout {
    display: block;
    min-height: auto;
  }

  .main-content {
    margin-left: 0;
    margin-top: 56px;
    padding-bottom: 100px; /* espaço para float-action-bar */
    min-height: auto;
    flex: none;
  }

  .app-footer {
    margin-left: 0;
    padding: 12px 16px;
    padding-bottom: 100px; /* acima do float-action-bar */
    font-size: 10px;
  }

  /* --- Navbar top simplificada --- */
  .navbar-center {
    display: none;
  }

  .navbar-hamburger {
    display: none;
  }

  .top-navbar {
    padding: 0 12px;
    gap: 8px;
  }

  .navbar-left {
    gap: 0;
    flex-shrink: 0;
  }

  .navbar-logo img {
    width: 72px;
    height: auto;
  }

  .navbar-right {
    flex: 1;
    min-width: 0;
    gap: 8px;
    justify-content: flex-end;
  }

  .company-selector {
    width: auto;
    max-width: none;
    flex: 1;
    min-width: 0;
  }

  .company-selector-wrapper {
    flex: 1;
    min-width: 0;
  }

  .company-selector-dropdown {
    position: fixed;
    top: 60px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .user-avatar-btn img,
  .user-avatar-btn > div {
    width: 36px !important;
    height: 36px !important;
  }

  /* --- User menu: bottom-sheet no mobile --- */
  .user-menu {
    position: fixed;
    top: auto;
    bottom: 92px;
    left: 12px;
    right: 12px;
    width: auto;
    z-index: 1100;
    border-radius: 16px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(10px);
    transition: opacity .2s, transform .2s;
  }

  .user-menu.open {
    transform: translateY(0);
  }

  /* --- Title bar --- */
  .title-bar {
    padding: 12px 16px;
  }

  .title-bar h1 {
    font-size: 24px;
  }

  .title-bar-with-back {
    padding: 16px;
  }

  /* --- Dashboard --- */
  .dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px 80px;
    min-height: auto;
    flex: none;
  }

  .dashboard-col-1 {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-col-1 > *:not(:last-child) {
    margin-bottom: 0;
  }

  /* Cards no mobile: tamanho automático, sem overflow cortando */
  .dashboard-grid .card,
  .dashboard-col-1 .card {
    flex: none;
    overflow: visible;
    height: auto;
    min-height: auto;
    border-radius: 12px;
    padding: 14px;
    gap: 12px;
  }

  .dashboard-grid .card-header h3 {
    font-size: 15px;
  }

  /* Score card */
  .score-card {
    height: auto;
    min-height: auto;
    padding: 14px;
    border-radius: 12px;
  }

  .score-card-row-2 {
    gap: 12px;
  }

  .score-bars {
    height: 40px;
    gap: 3px;
  }

  .score-info .h3 {
    font-size: 22px;
  }

  .score-info .h5 {
    font-size: 13px;
  }

  /* Indicadores: horizontal compacto */
  .indicadores-layout {
    flex-direction: row;
    gap: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    min-height: auto;
  }

  .indicador-principal {
    min-height: auto;
    flex: 1;
    border-right: 1px solid #e6eaf4;
    padding-right: 12px;
  }

  .indicadores-group-right {
    flex-direction: row;
    gap: 0;
    min-height: auto;
    flex: 2;
  }

  .indicadores-group-right .indicador-item {
    flex: 1;
    padding: 0 8px;
    border-right: 1px solid #e6eaf4;
  }

  .indicadores-group-right .indicador-item:last-child {
    border-right: none;
  }

  .indicador-item .indicador-value,
  .indicador-item .h4 {
    font-size: 18px;
  }

  .indicador-principal .indicador-value,
  .indicador-principal .h4 {
    font-size: 22px;
  }

  .indicador-item .indicador-label,
  .indicador-item .typo-caption {
    font-size: 11px;
    margin-top: 2px;
  }

  .indicador-principal .indicador-label {
    font-size: 11px;
    margin-top: 4px;
  }

  /* Situação Fiscal */
  .fiscal-content-real {
    overflow: visible;
    flex: none;
    min-height: auto;
    border-radius: 12px;
  }

  .fiscal-content {
    flex-direction: column;
    height: auto;
    min-height: auto;
  }

  .fiscal-chart {
    flex: none;
    justify-content: center;
    padding: 12px 16px 8px;
    min-height: 160px;
    max-height: none;
  }

  .bar-group {
    height: auto;
    min-height: 140px;
  }

  .bar-container {
    height: 120px;
    flex: none;
  }

  .bar-label {
    font-size: 11px;
  }

  .bar-percentage {
    font-size: 11px;
  }

  .fiscal-pendencias {
    flex: none;
    border-top: 1px solid #e6eaf4;
    border-left: none;
    max-width: none;
    padding: 12px 16px;
    background: #f8f9fc;
    border-radius: 0 0 12px 12px;
  }

  .fiscal-pendencias h4 {
    font-size: 14px;
    margin-bottom: 8px;
  }

  #fiscal-pendencias-list {
    height: auto;
    max-height: 200px;
    overflow-y: auto;
  }

  /* CNDs */
  .cnds-top {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 16px;
    padding: 0 0 12px;
  }

  .cnds-legend {
    flex-direction: column;
    gap: 8px;
  }

  .donut-chart-large {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
  }

  .donut-center .donut-value {
    font-size: 22px;
  }

  .cnds-subtitle {
    font-size: 13px;
  }

  .por-tipo {
    padding: 12px 0;
  }

  .por-tipo h4 {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .tipo-row {
    padding: 8px 0;
  }

  .tipo-details {
    flex-direction: column;
    gap: 6px;
  }

  .tipo-detail-col {
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 4px 8px;
    font-size: 12px;
  }

  /* Domicílio */
  .horiz-bars {
    padding: 0;
    gap: 16px;
    height: auto;
    min-height: auto;
  }

  .horiz-bar-label {
    width: 50px;
    font-size: 11px;
  }

  .horiz-bar-value {
    min-width: 40px;
    width: 40px;
    font-size: 11px;
  }

  .donuts-section {
    padding: 0 8px;
    gap: 10px;
  }

  .donuts-title {
    font-size: 13px;
  }

  .donuts-row {
    gap: 0;
    justify-content: space-around;
    padding-top: 8px;
    padding-bottom: 12px;
  }

  .donut-item {
    min-width: 90px;
    gap: 8px;
  }

  .donut-chart-small {
    width: 90px;
    height: 90px;
  }

  .donut-chart-small .donut-center {
    font-size: 13px;
  }

  .donut-meta {
    font-size: 10px;
  }

  .donut-unread {
    font-size: 11px;
  }

  .mensagens-section {
    padding: 12px 0 4px;
  }

  .mensagens-title {
    font-size: 13px;
  }

  .mensagens-grid {
    gap: 24px;
  }

  .mensagem-item .msg-count {
    font-size: 18px;
  }

  .mensagem-item .msg-label {
    font-size: 11px;
  }

  /* Domicílio subtitle */
  .domicilio-subtitle {
    font-size: 13px;
  }

  /* --- Stat cards (resumo no topo das páginas) --- */
  .stat-cards {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 16px 16px;
    gap: 8px;
  }

  .stat-card {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    padding: 12px;
    gap: 4px;
  }

  .stat-card .stat-value {
    font-size: 24px;
  }

  .stat-card .stat-label {
    font-size: 12px;
  }

  /* --- Tabelas --- */
  .data-table-wrapper {
    margin: 0 16px;
    overflow: visible;
    border-radius: 12px;
    min-width: 0;
  }

  .table-toolbar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    padding: 12px;
  }

  .table-toolbar-left {
    order: 0;
  }

  .table-search {
    width: 100%;
    height: 44px;
  }

  .table-toolbar-right {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
    padding-bottom: 4px;
  }

  .table-toolbar-right > * {
    flex: 0 0 auto;
  }

  /* --- Mobile: Ocultar botões secundários da toolbar --- */
  .table-toolbar-right > a.btn-outline,
  .table-toolbar-right > .btn-outline,
  .table-toolbar-right > .dropdown-wrapper:has(#dropdown-relatorio) {
    display: none;
  }

  /* --- Mobile: Toolbar dropdown buttons como ícones --- */
  .table-toolbar-right .dropdown-wrapper .btn-secondary {
    padding: 0;
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    justify-content: center;
  }

  .table-toolbar-right .dropdown-wrapper .btn-secondary .toolbar-label,
  .table-toolbar-right .dropdown-wrapper .btn-secondary .toolbar-caret {
    display: none;
  }

  .table-toolbar-right .dropdown-wrapper .btn-secondary .toolbar-icon-mobile {
    display: block;
    font-size: 20px;
    color: #7f7e80;
  }

  /* --- Mobile: Check All na toolbar --- */
  .mobile-check-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 4px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
  }

  .mobile-check-all input {
    width: 18px;
    height: 18px;
    cursor: pointer;
  }

  /* --- Mobile Card Layout (tabela principal) --- */
  .table-content {
    border: none;
    border-radius: 0;
  }

  .data-table-viewport {
    overflow: visible;
  }

  .table-content .data-table {
    display: block;
    width: 100%;
  }

  .table-content .data-table thead {
    display: none;
  }

  .table-content .data-table tbody {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 4px;
  }

  .table-content .data-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    position: relative;
    border: 1px solid #e6eaf4;
    border-radius: 12px;
    padding: 12px 44px 12px 40px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: visible;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .table-content .data-table tbody tr:hover {
    background: #fff;
  }

  .table-content .data-table tbody td {
    display: block;
    border: none;
    padding: 0;
    font-size: 14px;
    white-space: normal;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .table-content .data-table tbody td.td-checkbox {
    position: absolute;
    top: 14px;
    left: 10px;
    width: auto;
    padding: 0;
  }

  .table-content .data-table tbody td.td-actions {
    position: absolute;
    top: 8px;
    right: 2px;
    width: auto;
    overflow: visible;
  }

  .btn-action-dropdown .typo-caption {
    display: none;
  }

  .btn-action-dropdown .ph-caret-down {
    display: none;
  }

  .btn-action-dropdown::before {
    content: "\22EE";
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: #7f7e80;
  }

  .table-content .data-table tbody td .cell-main {
    font-size: 14px;
    font-weight: 600;
    color: #414043;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: calc(100vw - 160px);
  }

  .table-content .data-table tbody td .cell-sub {
    font-size: 13px;
    color: #7f7e80;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: calc(100vw - 160px);
  }

  /* Mobile card: secondary info row */
  .table-content .data-table tbody td.td-mobile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    width: 100%;
    min-width: 0;
  }

  .table-content .data-table tbody td.td-mobile-meta .login-table-tag {
    max-width: 100%;
  }

  /* Mobile card: labeled data */
  .table-content .data-table tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 8px;
    margin-bottom: 2px;
  }

  /* Cards sem checkbox: ajustar padding esquerdo */
  .table-content .data-table tbody tr:not(:has(.td-checkbox)) {
    padding-left: 12px;
  }

  /* Loading/empty state no card layout */
  .table-content .data-table tbody tr:only-child td[colspan] {
    text-align: center;
    padding: 24px 0;
    color: #7f7e80;
  }

  /* Tabelas dentro de modais: manter formato tabela */
  .modal-box .data-table thead {
    display: table-header-group;
  }

  .modal-box .data-table tbody {
    display: table-row-group;
  }

  .modal-box .data-table tbody tr {
    display: table-row;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }

  .modal-box .data-table tbody td {
    display: table-cell;
    border-bottom: 1px solid #e6eaf4;
    padding: 10px 12px;
    font-size: 13px;
  }

  /* Pagination compacta */
  .pagination-bar {
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    align-items: center;
    border-top: 1px solid #e6eaf4;
    margin-top: 4px;
  }

  .pagination-bar-left {
    font-size: 11px;
  }

  .pagination-bar-right {
    gap: 8px;
  }

  .pagination-bar-right .result-count {
    font-size: 11px;
  }

  /* --- Filtros --- */
  .filters-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .filter-field select,
  .filter-field input {
    height: 44px;
    font-size: 14px;
  }

  .filters-actions {
    flex-direction: column;
    gap: 8px;
  }

  .filters-actions .btn-primary,
  .filters-actions .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .filters-drawer-overlay {
    z-index: 1050;
  }

  .filters-drawer {
    top: 0;
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    z-index: 1100;
    height: 100dvh;
  }

  /* --- Forms --- */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    margin: 0 16px;
    padding: 16px;
    border-radius: 12px;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    height: 44px;
    font-size: 14px;
  }

  .form-field textarea {
    height: auto;
    min-height: 88px;
  }

  /* --- Modals --- */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-box {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    margin: 0;
  }

  .modal-box-header {
    padding: 16px;
  }

  .modal-box-header h3 {
    font-size: 16px;
  }

  .modal-box-body {
    padding: 16px;
  }

  .modal-box-footer {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  }

  /* --- Dropdowns / Action menus --- */
  .action-menu {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 80px;
    top: auto;
    border-radius: 12px;
    z-index: 999;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  }

  .dropdown-menu {
    z-index: 1100;
    max-height: 50vh;
    overflow-y: auto;
  }

  /* --- Buttons touch-friendly --- */
  .btn-primary,
  .btn-outline,
  .btn-secondary {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
  }

  .btn-icon {
    min-width: 44px;
    min-height: 44px;
  }

  .btn-details {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
  }

  /* --- Title bar com botão voltar --- */
  .title-bar-with-back {
    padding: 16px;
    gap: 12px;
  }

  .title-bar-left h1,
  .title-bar-left .h1 {
    font-size: 20px;
  }

  .title-bar-right {
    gap: 8px;
    flex-wrap: wrap;
  }

  .title-bar-right .btn-outline {
    font-size: 13px;
    padding: 8px 12px;
    min-height: 36px;
  }

  .title-bar-right .btn-primary {
    position: fixed;
    bottom: calc(100px + env(safe-area-inset-bottom, 0));
    right: 16px;
    z-index: 900;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(242, 107, 55, 0.35);
  }

  /* --- Underline tabs --- */
  .underline-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .underline-tabs::-webkit-scrollbar {
    display: none;
  }

  .underline-tab {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
  }

  /* --- Tags / badges --- */
  .task-attr {
    font-size: 11px;
    padding: 4px 8px;
  }

  /* --- Cards gerais --- */
  .card {
    border-radius: 12px;
  }

  /* ============================
     FLOAT ACTION BAR
     ============================ */
  .float-action-bar {
    display: flex;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 361px;
    background: #fbfcfd;
    border: 1px solid #e6eaf4;
    border-radius: 40px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  }

  .fab-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    color: #414043;
    font-size: 12px;
    font-weight: 400;
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 12px;
    transition: color 0.2s;
  }

  .fab-nav-icon {
    display: flex;
    align-items: center;
    padding: 4px;
  }

  .fab-nav-icon i {
    font-size: 24px;
  }

  .fab-nav-item.active {
    color: #f26b37;
  }

  /* ============================
     OVERLAY
     ============================ */
  .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .mobile-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  /* ============================
     DRAWERS (Cadastros, Serviços, Outros)
     ============================ */
  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1001;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 70vh;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .mobile-drawer.open {
    transform: translateY(0);
  }

  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
    border-bottom: 1px solid #edf0f8;
    flex-shrink: 0;
  }

  .mobile-drawer-title {
    font-size: 18px;
    font-weight: 700;
    color: #414043;
  }

  .mobile-drawer-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #7f7e80;
    background: none;
    border: none;
    cursor: pointer;
  }

  .mobile-drawer-close i {
    font-size: 20px;
  }

  .mobile-drawer-body {
    overflow-y: auto;
    padding: 8px 12px 16px;
  }

  .mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border-radius: 12px;
    color: #414043;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
  }

  .mobile-drawer-item:active {
    background: #f4f6fa;
  }

  .mobile-drawer-item.active {
    color: #f26b37;
  }

  .mobile-drawer-item.active i {
    color: #f26b37;
  }

  .mobile-drawer-item i {
    font-size: 20px;
    color: #7f7e80;
    flex-shrink: 0;
  }

  /* Admin responsive */
  .admin-two-col {
    grid-template-columns: 1fr;
  }
  .admin-sync-pair {
    grid-template-columns: 1fr;
  }
  .admin-infra-list--horizontal {
    flex-direction: column;
  }
  .admin-robot-card {
    max-width: 100%;
  }
  .admin-section {
    padding: 0 16px;
  }
}

/* ===== SETTINGS GROUP (aba Configurações do perfil) ===== */
.settings-group {
  border: 1px solid #e6eaf4;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.settings-group:last-child { margin-bottom: 0; }

.settings-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #f8f9fc;
  border-bottom: 1px solid #e6eaf4;
}
.settings-group-header i {
  font-size: 18px;
  color: #f26b37;
}
.settings-group-header span {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1b;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: #fafbfe; }
.settings-row-text { flex: 1; }
.settings-row-label {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1b;
}
.settings-row-desc {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Toggle switch pill */
.toggle-switch {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-switch-track {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 24px;
  transition: background 0.2s;
}
.toggle-switch-thumb {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.2s;
}
.toggle-switch input:checked ~ .toggle-switch-track { background: #f26b37; }
.toggle-switch input:checked ~ .toggle-switch-thumb { transform: translateX(18px); }

@media (max-width: 768px) {
  .settings-row { flex-wrap: wrap; gap: 12px; }
  .settings-row-text { min-width: 0; }
}

/* settings-group-body: área de conteúdo livre dentro do grupo */
.settings-group-body {
  padding: 20px;
  border-bottom: 1px solid #e6eaf4;
}
.settings-group-body:last-child { border-bottom: none; }
.settings-group-body .form-field { margin-bottom: 0; }
.settings-group-body .form-grid { gap: 20px !important; }

/* Campo de info somente-leitura (e-mail) */
.settings-info-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f4f6fa;
  border: 1px solid #e6eaf4;
  font-size: 14px;
  color: #94a3b8;
}
.settings-info-field i { font-size: 16px; color: #c0c7d6; flex-shrink: 0; }

/* Seletor de tema */
.theme-selector {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.theme-option {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  flex: 0 0 auto;
}
.theme-option input[type="radio"] { display: none; }
.theme-preview {
  width: 160px;
  height: 96px;
  border-radius: 10px;
  border: 2px solid #e6eaf4;
  overflow: hidden;
  display: flex;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.theme-option.selected .theme-preview,
.theme-option:hover .theme-preview {
  border-color: #f26b37;
  box-shadow: 0 0 0 3px rgba(242,107,55,0.15);
}
.theme-preview-sidebar-light {
  width: 36px;
  background: #fff;
  border-right: 1px solid #e6eaf4;
  flex-shrink: 0;
}
.theme-preview-sidebar-dark {
  width: 36px;
  background: #1e293b;
  flex-shrink: 0;
}
.theme-preview-content-area {
  flex: 1;
  background: #f4f6fa;
}
.theme-option-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #414043;
}
.theme-option-footer i {
  font-size: 16px;
  color: #c0c7d6;
}
.theme-option.selected .theme-option-footer i { color: #f26b37; }

@media (max-width: 768px) {
  .theme-preview { width: 130px; height: 78px; }
  .settings-group-body { padding: 16px; }
}

/* ===== CHAT WIDGET (Lizza) ===== */

/* FAB */
.chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f26b37 0%, #e04e18 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(242,107,55,0.42), 0 1px 4px rgba(0,0,0,0.12);
  z-index: 1200;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s;
}
.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(242,107,55,0.52), 0 2px 6px rgba(0,0,0,0.14);
}
.chat-fab-icon {
  font-size: 24px;
  color: #fff;
  transition: transform 0.3s;
}
.chat-fab:hover .chat-fab-icon { transform: rotate(20deg) scale(1.1); }

/* Panel */
.chat-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 356px;
  max-height: 520px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  z-index: 1199;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s ease;
  transform-origin: bottom right;
}
.chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.chat-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f26b37 0%, #e04e18 100%);
  color: #fff;
  flex-shrink: 0;
}
.chat-panel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-panel-header-info { flex: 1; min-width: 0; }
.chat-panel-header-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-panel-header-badge {
  font-size: 9px;
  background: rgba(255,255,255,0.22);
  border-radius: 4px;
  padding: 2px 5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  vertical-align: middle;
}
.chat-panel-header-status {
  font-size: 11px;
  opacity: 0.82;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.chat-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86efac;
  box-shadow: 0 0 0 2px rgba(134,239,172,0.35);
  flex-shrink: 0;
}
.chat-panel-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  opacity: 0.8;
  transition: background 0.15s, opacity 0.15s;
}
.chat-panel-close:hover { background: rgba(255,255,255,0.15); opacity: 1; }

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafa;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.chat-bubble-wrap { display: flex; flex-direction: column; gap: 3px; }
.chat-bubble-wrap.user { align-items: flex-end; }
.chat-bubble-wrap.bot { align-items: flex-start; }

.chat-bubble-meta {
  font-size: 10px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px;
}
.chat-bubble-meta .chat-meta-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg,#f26b37,#e04e18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  flex-shrink: 0;
}
.chat-bubble {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}
.chat-bubble.bot {
  background: #fff;
  color: #1e293b;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}
.chat-bubble.user {
  background: linear-gradient(135deg, #f26b37, #e04e18);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.loading {
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}
.chat-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  animation: chat-dot-bounce 1.2s infinite ease-in-out;
}
.chat-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chat-dot-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Suggestions */
.chat-suggestions {
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  flex-shrink: 0;
}
.chat-suggestion-btn {
  font-size: 12px;
  background: #fff;
  color: #f26b37;
  border: 1px solid #fbd5c0;
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-suggestion-btn:hover { background: #fff5f0; border-color: #f26b37; }

/* Input */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  flex-shrink: 0;
}
.chat-input-row input {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 22px;
  padding: 8px 14px;
  font-size: 13px;
  outline: none;
  background: #f8fafc;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.chat-input-row input:focus { border-color: #f26b37; background: #fff; }
.chat-send-btn {
  background: linear-gradient(135deg, #f26b37, #e04e18);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(242,107,55,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.chat-send-btn:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(242,107,55,0.45); }
.chat-send-btn:active { transform: scale(0.96); }

@media (max-width: 768px) {
  .chat-fab { bottom: 80px; right: 16px; }
  .chat-panel { bottom: 148px; right: 12px; left: 12px; width: auto; }
}
