/* Design System 3.0 — White Rabbit | Tailwind Edition */
/* Overrides e estilos customizados que Tailwind CDN não cobre */

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

html {
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: #EDF1F7;
  color: #1E2E45;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: margin-left 0.3s ease;
}

body.mini {
  margin-left: 64px;
}

/* ============================================
   SCROLLBAR CUSTOMIZADA
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #E0E8F2;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: #9FB4CE;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0B6E8C;
}

/* ============================================
   SIDEBAR
   ============================================ */
#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  background: #0F172A;
  z-index: 50;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  overflow: hidden;
}

body.mini #sidebar {
  width: 64px;
}

.sb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  min-height: 60px;
  position: relative;
}

/* Ajustar sb-head quando sidebar mini */
body.mini .sb-head {
  justify-content: center;
  padding: 1rem 0.5rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

/* Logo wrap quando mini */
body.mini .logo-wrap {
  flex: none;
}

.logo-ico {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

body.mini .logo-ico {
  width: 28px;
  height: 28px;
  margin: 0 auto;
}

.logo-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.logo-ver {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  font-family: 'Plus Jakarta Sans', sans-serif;
  white-space: nowrap;
}

body.mini .logo-name,
body.mini .logo-ver {
  display: none;
}

.collapse-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.collapse-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Quando sidebar está mini, esconder botão de collapse */
body.mini .collapse-btn {
  display: none;
}

/* Logo clicável na sidebar mini para reabrir */
body.mini .logo-wrap {
  cursor: pointer;
  width: 100%;
  justify-content: center;
}

body.mini .logo-wrap:hover {
  opacity: 0.8;
}

body.mini .logo-ico {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  transition: transform 0.2s;
}

body.mini .logo-wrap:hover .logo-ico {
  transform: scale(1.1);
}

.sb-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.sb-scroll::-webkit-scrollbar {
  width: 4px;
}
.sb-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.sb-foot {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Nav Items */
.ni {
  display: flex;
  align-items: center;
  padding: 0.625rem 1rem;
  margin: 0.125rem 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
  position: relative;
}

.ni:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.ni.active {
  background: #0B6E8C;
  color: #fff;
  box-shadow: 0 0 12px rgba(11,110,140,0.4);
}

.ni-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ni-left svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ni-label {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

body.mini .ni-label {
  display: none;
}

/* Tooltips */
.ni-tooltip {
  display: none;
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #0F172A;
  color: #fff;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.ni-tooltip::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: #0F172A;
}

body.mini .ni:hover .ni-tooltip {
  display: block;
}

/* Nav Labels */
.nav-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  padding: 1rem 1.25rem 0.375rem;
  font-weight: 600;
}

body.mini .nav-lbl {
  display: none;
}

/* Nav Badge */
.nav-badge {
  background: #D62B2B;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  margin-left: auto;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Chevron submenu */
.chv {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: rgba(255,255,255,0.4);
  transition: transform 0.2s;
}

.chv.open {
  transform: rotate(90deg);
}

body.mini .chv {
  display: none;
}

/* Submenu */
.sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0,0,0,0.15);
  margin: 0 0.5rem;
  border-radius: 0.375rem;
}

.sub.open {
  max-height: 500px;
}

.si {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.si:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.9);
}

.si.active {
  color: #0B6E8C;
  font-weight: 500;
}

.si-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
  transition: all 0.2s;
}

.si.active .si-dot {
  background: #0B6E8C;
  box-shadow: 0 0 8px rgba(11,110,140,0.6);
}

body.mini .sub,
body.mini .si {
  display: none;
}

/* User Card */
.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

.user-card:hover {
  background: rgba(255,255,255,0.08);
}

.user-texts {
  overflow: hidden;
}

.u-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.u-role {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

body.mini .u-name,
body.mini .u-role {
  display: none;
}

/* ============================================
   TOPBAR
   ============================================ */
#topbar {
  position: fixed;
  top: 0;
  left: 260px;
  right: 0;
  height: 60px;
  background: #0B6E8C;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  transition: left 0.3s ease;
  box-shadow: 0 2px 8px rgba(11,110,140,0.2);
}

body.mini #topbar {
  left: 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
}

.breadcrumb svg {
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.9);
}

.breadcrumb .sep {
  color: rgba(255,255,255,0.5);
}

.breadcrumb .cur {
  color: #fff;
  font-weight: 500;
}

.search-bar {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  gap: 0.5rem;
  min-width: 240px;
}

.search-bar svg {
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.875rem;
  width: 100%;
}

.search-bar input::placeholder {
  color: rgba(255,255,255,0.5);
}

.tb-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  position: relative;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.25);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn-sm {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text-3);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn-sm:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}

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

.icon-btn-sm.text-neon-red:hover {
  background: rgba(214,43,43,0.1);
  color: var(--neon-red);
}

.notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #D62B2B;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(214,43,43,0.6);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
#main {
  margin-left: 260px;
  margin-top: 60px;
  padding: 1.5rem;
  transition: margin-left 0.3s ease;
  min-height: calc(100vh - 60px);
}

body.mini #main {
  margin-left: 64px;
}

.content {
  max-width: 100%;
  margin: 0 auto;
}

.section {
  display: none;
}

.section.active {
  display: block;
  animation: fade-in 0.3s ease-out;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-icon {
  width: 48px;
  height: 48px;
  background: #0B6E8C;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 16px rgba(11,110,140,0.3);
}

.section-icon svg {
  width: 24px;
  height: 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0D1829;
}

.section-sub {
  font-size: 0.875rem;
  color: #4A6080;
}

.divider {
  height: 1px;
  background: #C4D4E6;
  margin: 1rem 0 1.5rem;
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0B6E8C;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
  cursor: pointer;
}

.av-lg {
  width: 56px;
  height: 56px;
  font-size: 1.25rem;
}

.av-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Button Colors */
.btn-cyan {
  background: #0B6E8C;
  color: #fff;
}
.btn-cyan:hover:not(:disabled) {
  background: #095a73;
  box-shadow: 0 0 12px rgba(11,110,140,0.3);
}

.btn-red {
  background: #D62B2B;
  color: #fff;
}
.btn-red:hover:not(:disabled) {
  background: #b82222;
  box-shadow: 0 0 12px rgba(214,43,43,0.3);
}

.btn-green {
  background: #1F7A45;
  color: #fff;
}
.btn-green:hover:not(:disabled) {
  background: #166036;
  box-shadow: 0 0 12px rgba(31,122,69,0.3);
}

.btn-yellow {
  background: #C07C00;
  color: #fff;
}
.btn-yellow:hover:not(:disabled) {
  background: #a36900;
  box-shadow: 0 0 12px rgba(192,124,0,0.3);
}

.btn-purple {
  background: #5A1A9A;
  color: #fff;
}
.btn-purple:hover:not(:disabled) {
  background: #4a1580;
  box-shadow: 0 0 12px rgba(90,26,154,0.3);
}

.btn-orange {
  background: #D95B10;
  color: #fff;
}
.btn-orange:hover:not(:disabled) {
  background: #b84d0d;
  box-shadow: 0 0 12px rgba(217,91,16,0.3);
}

.btn-ghost {
  background: transparent;
  color: #1E2E45;
  border: 1px solid #9FB4CE;
}
.btn-ghost:hover:not(:disabled) {
  background: #BFD0E8;
}

/* Outline Buttons */
.btn-outline-cyan {
  background: transparent;
  color: #0B6E8C;
  border: 2px solid #0B6E8C;
}
.btn-outline-cyan:hover:not(:disabled) {
  background: rgba(11,110,140,0.1);
}

/* Ghost Colored */
.btn-ghost-cyan {
  background: rgba(11,110,140,0.1);
  color: #0B6E8C;
}
.btn-ghost-cyan:hover:not(:disabled) {
  background: rgba(11,110,140,0.2);
}

.btn-ghost-red {
  background: rgba(214,43,43,0.1);
  color: #D62B2B;
}
.btn-ghost-red:hover:not(:disabled) {
  background: rgba(214,43,43,0.2);
}

/* Sizes */
.btn-xl {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}
.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
}

/* Loading Spinner */
.btn-spin {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin-btn 0.8s linear infinite;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.badge.red { background: rgba(214,43,43,0.15); color: #D62B2B; }
.badge.green { background: rgba(31,122,69,0.15); color: #1F7A45; }
.badge.cyan { background: rgba(11,110,140,0.15); color: #0B6E8C; }
.badge.blue { background: rgba(26,68,160,0.15); color: #1A44A0; }
.badge.purple { background: rgba(90,26,154,0.15); color: #5A1A9A; }
.badge.orange { background: rgba(217,91,16,0.15); color: #D95B10; }
.badge.yellow { background: rgba(192,124,0,0.15); color: #C07C00; }

.badge.sm { font-size: 0.65rem; padding: 0.125rem 0.5rem; }
.badge.lg { font-size: 0.875rem; padding: 0.375rem 0.875rem; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.dot.pulse {
  animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: #FFFFFF;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(15,23,42,0.12);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #C4D4E6;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0D1829;
}

.card-body {
  padding: 1.25rem;
}

.card-foot {
  padding: 1rem 1.25rem;
  border-top: 1px solid #C4D4E6;
  display: flex;
  gap: 0.75rem;
}

/* Custom Card */
.custom-card {
  background: #FFFFFF;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(15,23,42,0.12);
  overflow: visible;
  transition: all 0.3s;
}

/* Permitir que dropdowns, datepickers e popovers apareçam fora dos cards */
.custom-card:has(.dropdown-menu),
.custom-card:has(.datepicker-panel),
.custom-card:has(.multi-select-dropdown),
.custom-card:has(.notif-dropdown),
.custom-card:has(.popover) {
  overflow: visible !important;
}

.custom-card-body:has(.dropdown-menu.open),
.custom-card-body:has(.multi-select-wrap.open),
.custom-card-body:has(.datepicker-panel.open) {
  overflow: visible !important;
}

.custom-card:hover {
  box-shadow: 0 4px 16px rgba(15,23,42,0.15);
}

.custom-card.card-glow {
  box-shadow: 0 0 16px rgba(11,110,140,0.2);
  border: 1px solid rgba(11,110,140,0.2);
}

.custom-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #C4D4E6;
}

.custom-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0D1829;
}

.custom-card-body {
  padding: 1.25rem;
  overflow: visible;
}

.custom-card-foot {
  padding: 1rem 1.25rem;
  border-top: 1px solid #C4D4E6;
  display: flex;
  gap: 0.75rem;
  background: #EDF1F7;
}

/* Stat Card */
.card-stat {
  text-align: center;
  padding: 1.5rem;
}

.card-stat-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,110,140,0.1);
  border-radius: 1rem;
  color: #fff;
}

.card-stat-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
}

.card-stat-val {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #0D1829;
}

.card-stat-lbl {
  font-size: 0.75rem;
  color: #4A6080;
  margin-top: 0.25rem;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.alert-red { background: rgba(214,43,43,0.1); border-left: 4px solid #D62B2B; }
.alert-red svg { color: #D62B2B; }
.alert-green { background: rgba(31,122,69,0.1); border-left: 4px solid #1F7A45; }
.alert-green svg { color: #1F7A45; }
.alert-cyan { background: rgba(11,110,140,0.1); border-left: 4px solid #0B6E8C; }
.alert-cyan svg { color: #0B6E8C; }
.alert-yellow { background: rgba(192,124,0,0.1); border-left: 4px solid #C07C00; }
.alert-yellow svg { color: #C07C00; }
.alert-purple { background: rgba(90,26,154,0.1); border-left: 4px solid #5A1A9A; }
.alert-purple svg { color: #5A1A9A; }
.alert-orange { background: rgba(217,91,16,0.1); border-left: 4px solid #D95B10; }
.alert-orange svg { color: #D95B10; }

/* aliases: class="alert red/green/yellow/cyan/blue" (formato usado pelas views) */
.alert.red    { background: rgba(214,43,43,0.1);   border-left: 4px solid #D62B2B; }
.alert.green  { background: rgba(31,122,69,0.1);   border-left: 4px solid #1F7A45; }
.alert.yellow { background: rgba(192,124,0,0.1);   border-left: 4px solid #C07C00; }
.alert.cyan   { background: rgba(11,110,140,0.1);  border-left: 4px solid #0B6E8C; }
.alert.blue   { background: rgba(29,78,216,0.1);   border-left: 4px solid #1D4ED8; }

.alert-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.alert-msg {
  font-size: 0.8rem;
  opacity: 0.8;
}

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: currentColor;
  opacity: 0.5;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.alert-close:hover {
  opacity: 1;
  background: rgba(0,0,0,0.1);
}

.alert-close svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,24,41,0.6);
  backdrop-filter: blur(4px);
  z-index: 4000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fade-in 0.2s ease-out;
}

.modal.open {
  display: flex;
}

.modal-box {
  background: #FFFFFF;
  border-radius: 1rem;
  box-shadow: 0 16px 48px rgba(15,23,42,0.22);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scale-in 0.2s ease-out;
}

.modal-box.modal-lg {
  max-width: 800px;
}

.modal-box.modal-sm {
  max-width: 360px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #C4D4E6;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0D1829;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #4A6080;
  padding: 0.375rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #EDF1F7;
  color: #0D1829;
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 1.5rem;
}

.modal-foot {
  padding: 1rem 1.5rem;
  border-top: 1px solid #C4D4E6;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  background: #EDF1F7;
  border-radius: 0 0 1rem 1rem;
}

body.modal-open {
  overflow: hidden;
}

/* ============================================
   TOASTS CONTAINER
   ============================================ */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 360px;
}

.toast {
  background: #FFFFFF;
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px rgba(15,23,42,0.18);
  overflow: hidden;
  animation: toast-in 0.3s ease-out;
  border-left: 4px solid;
  min-width: 280px;
}

.toast.removing {
  animation: toast-out 0.3s ease-in forwards;
}

.toast-red { border-left-color: #D62B2B; }
.toast-green { border-left-color: #1F7A45; }
.toast-cyan { border-left-color: #0B6E8C; }
.toast-yellow { border-left-color: #C07C00; }
.toast-purple { border-left-color: #5A1A9A; }
.toast-orange { border-left-color: #D95B10; }

.toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.toast-body {
  padding: 0 1rem 0.75rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  padding: 0.25rem;
}

.toast-close:hover {
  opacity: 1;
}

.toast-progress {
  height: 3px;
  background: rgba(0,0,0,0.1);
  overflow: hidden;
}

.toast-progress-bar {
  height: 100%;
  background: currentColor;
  animation: toast-progress linear forwards;
}

/* ============================================
   TOGGLES / SWITCHES
   ============================================ */
.tog,
.tog-s {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tog input,
.tog-s input {
  display: none;
}

.tog-track,
.tog-s .tog-track {
  width: 44px;
  height: 24px;
  background: #9FB4CE;
  border-radius: 9999px;
  position: relative;
  transition: all 0.3s;
}

.tog-s .tog-track {
  width: 36px;
  height: 20px;
}

.tog-thumb,
.tog-s .tog-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

.tog-s .tog-thumb {
  width: 16px;
  height: 16px;
}

.tog input:checked + .tog-track,
.tog-s input:checked + .tog-track {
  background: #0B6E8C;
}

.tog input:checked + .tog-track + .tog-thumb,
.tog-s input:checked + .tog-track + .tog-thumb,
.tog input:checked ~ .tog-thumb,
.tog-s input:checked ~ .tog-thumb {
  transform: translateX(20px);
}

.tog-s input:checked ~ .tog-thumb {
  transform: translateX(16px);
}

.tog.red input:checked + .tog-track,
.tog-s.red input:checked + .tog-track {
  background: #D62B2B;
}

/* ============================================
   FORM INPUTS
   ============================================ */
.fg {
  margin-bottom: 1rem;
}

.fl {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1E2E45;
  margin-bottom: 0.375rem;
}

.fi {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  background: #FFFFFF;
  border: 1px solid #9FB4CE;
  border-radius: 0.5rem;
  color: #1E2E45;
  transition: all 0.2s;
}

.fi:focus {
  outline: none;
  border-color: #0B6E8C;
  box-shadow: 0 0 0 3px rgba(11,110,140,0.15);
}

.fi::placeholder {
  color: #6B82A0;
}

.fi-ok {
  border-color: #1F7A45;
}
.fi-ok:focus {
  box-shadow: 0 0 0 3px rgba(31,122,69,0.15);
}

.fi-err {
  border-color: #D62B2B;
}
.fi-err:focus {
  box-shadow: 0 0 0 3px rgba(214,43,43,0.15);
}

.field-msg {
  font-size: 0.75rem;
  margin-top: 0.375rem;
}

.field-msg.ok {
  color: #1F7A45;
}

.field-msg.err {
  color: #D62B2B;
}

/* Grid Columns */
.col2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.col3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .col2, .col3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.prog-track {
  height: 8px;
  background: #E0E8F2;
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.prog-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 1s ease-out;
}

.prog-bar.cyan { background: #0B6E8C; }
.prog-bar.red { background: #D62B2B; }
.prog-bar.green { background: #1F7A45; }
.prog-bar.yellow { background: #C07C00; }
.prog-bar.purple { background: #5A1A9A; }
.prog-bar.orange { background: #D95B10; }

/* ============================================
   TABS
   ============================================ */
.tabs {
  display: flex;
  border-bottom: 2px solid #C4D4E6;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4A6080;
  transition: all 0.2s;
}

.tab:hover {
  color: #0B6E8C;
}

.tab.active {
  color: #0B6E8C;
  border-bottom-color: #0B6E8C;
}

.tab-pane {
  display: none;
  animation: fade-in 0.2s ease-out;
}

.tab-pane.active {
  display: block;
}

/* Horizontal Color Tabs */
.htabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.htabs button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  background: #E0E8F2;
  color: #4A6080;
  transition: all 0.2s;
}

.htabs button.active {
  color: #fff;
}

.htabs button.active[data-color="cyan"],
.htabs button.active.ht-1 { background: #0B6E8C; color: #fff; }
.htabs button.active.ht-2 { background: #D62B2B; color: #fff; }
.htabs button.active.ht-3 { background: #1F7A45; color: #fff; }
.htabs button.active.ht-4 { background: #5A1A9A; color: #fff; }

.hc-pane {
  display: none;
  animation: fade-in 0.2s ease-out;
}

.hc-pane.active {
  display: block;
}

/* ============================================
   ACCORDION
   ============================================ */
.accordion {
  border: 1px solid #C4D4E6;
  border-radius: 0.5rem;
  overflow: hidden;
}

.acc-item + .acc-item {
  border-top: 1px solid #C4D4E6;
}

.acc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #FFFFFF;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.acc-head:hover {
  background: #EDF1F7;
}

.acc-chv {
  width: 18px;
  height: 18px;
  color: #4A6080;
  transition: transform 0.2s;
}

.acc-chv.open {
  transform: rotate(180deg);
}

.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.acc-body.open {
  max-height: 500px;
}

.acc-body p {
  padding: 1rem;
  font-size: 0.875rem;
  color: #4A6080;
}

/* ============================================
   CAROUSEL
   ============================================ */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-out;
}

.carousel-slide {
  min-width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0B6E8C, #1A44A0);
}

.carousel-content {
  text-align: center;
  color: #fff;
  padding: 2rem;
}

.carousel-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.carousel-desc {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.carousel-nav:hover {
  background: rgba(255,255,255,0.3);
}

.carousel-prev {
  left: 1rem;
}

.carousel-next {
  right: 1rem;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.2s;
}

.carousel-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 5px;
}

/* ============================================
   STEPPER
   ============================================ */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #E0E8F2;
  color: #4A6080;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s;
}

.step-item.active .step-circle {
  background: #0B6E8C;
  color: #fff;
  box-shadow: 0 0 12px rgba(11,110,140,0.3);
}

.step-item.done .step-circle {
  background: #1F7A45;
  color: #fff;
}

.step-label {
  font-size: 0.75rem;
  color: #4A6080;
  font-weight: 500;
}

.step-item.active .step-label {
  color: #0B6E8C;
}

.step-item.done .step-label {
  color: #1F7A45;
}

.step-line {
  width: 80px;
  height: 2px;
  background: #C4D4E6;
  margin: 0 0.5rem;
  margin-bottom: 1.5rem;
}

.step-pane {
  display: none;
  animation: fade-in 0.2s ease-out;
}

.step-pane.active {
  display: block;
}

/* ============================================
   RATINGS
   ============================================ */
.rating-group {
  display: inline-flex;
  gap: 0.25rem;
}

.star {
  font-size: 1.5rem;
  color: #C4D4E6;
  cursor: pointer;
  transition: all 0.15s;
}

.star.active,
.star.hover {
  color: #C07C00;
  text-shadow: 0 0 8px rgba(192,124,0,0.3);
}

/* ============================================
   TABLES
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15,23,42,0.12);
}

.data-table th,
.data-table td {
  padding: 0.875rem 1rem;
  text-align: left;
}

.data-table th {
  background: #EDF1F7;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4A6080;
}

.data-table td {
  border-top: 1px solid #C4D4E6;
  font-size: 0.875rem;
}

.data-table tbody tr:hover {
  background: rgba(11,110,140,0.04);
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: inherit;
  font-size: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.sort-ico {
  font-size: 0.75rem;
}

/* ============================================
   CHIPS & TAGS
   ============================================ */
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: #E0E8F2;
  border-radius: 9999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  background: #BFD0E8;
}

.chip.selected {
  background: #0B6E8C;
  color: #fff;
}

.chip-removable {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem 0.375rem 0.75rem;
  background: #E0E8F2;
  border-radius: 9999px;
  font-size: 0.8rem;
}

.chip-remove {
  background: none;
  border: none;
  color: #4A6080;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.25rem;
  border-radius: 50%;
  transition: all 0.2s;
}

.chip-remove:hover {
  background: rgba(0,0,0,0.1);
  color: #D62B2B;
}

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Cores de Background */
  --bg-darkest: #EDF1F7;
  --bg-dark: #E0E8F2;
  --bg-surface: #D0DCF0;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-hover: #BFD0E8;
  --bg-border: #9FB4CE;
  --bg-border-sub: #C4D4E6;

  /* Cores de Texto */
  --text-1: #0D1829;
  --text-2: #1E2E45;
  --text-3: #4A6080;
  --text-4: #6B82A0;

  /* Cores Neon */
  --neon-red: #D62B2B;
  --neon-orange: #D95B10;
  --neon-yellow: #C07C00;
  --neon-green: #1F7A45;
  --neon-cyan: #0B6E8C;
  --neon-blue: #1A44A0;
  --neon-purple: #5A1A9A;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.12);
  --shadow-md: 0 4px 16px rgba(15,23,42,0.15);
  --shadow-lg: 0 8px 32px rgba(15,23,42,0.18);
  --shadow-xl: 0 16px 48px rgba(15,23,42,0.22);

  /* Transitions */
  --transition-base: all 0.2s ease;
  --transition-smooth: all 0.3s ease;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* ============================================
   DROPDOWNS
   ============================================ */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Permitir que dropdowns apareçam fora dos cards */
.dropdown {
  position: relative;
  z-index: 1;
}

.dropdown:hover,
.dropdown:focus-within {
  z-index: 100;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 200px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(15,23,42,0.25);
  border: 1px solid var(--bg-border-sub);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 9999;
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu-right {
  left: auto;
  right: 0;
}

.dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bg-border-sub);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: var(--bg-dark);
  color: var(--neon-cyan);
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dropdown-divider {
  height: 1px;
  background: var(--bg-border-sub);
  margin: 0.5rem 0;
}

.dropdown-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--bg-border-sub);
  text-align: center;
}

/* ============================================
   TOOLTIPS
   ============================================ */
.tooltip-wrap {
  position: relative;
  display: inline-block;
}

.tooltip-box {
  position: absolute;
  background: var(--text-1);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 3000;
  pointer-events: none;
}

.tooltip-box::after {
  content: '';
  position: absolute;
  border: 6px solid transparent;
}

/* Tooltip positions */
.tooltip-top {
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
}
.tooltip-top::after {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: var(--text-1);
}

.tooltip-bottom {
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
}
.tooltip-bottom::after {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: var(--text-1);
}

.tooltip-left {
  right: calc(100% + 0.5rem);
  top: 50%;
  transform: translateY(-50%);
}
.tooltip-left::after {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: var(--text-1);
}

.tooltip-right {
  left: calc(100% + 0.5rem);
  top: 50%;
  transform: translateY(-50%);
}
.tooltip-right::after {
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: var(--text-1);
}

.tooltip-wrap:hover .tooltip-box {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(.active):not(:disabled) {
  background: var(--bg-dark);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.page-btn.active {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-btn svg {
  width: 16px;
  height: 16px;
}

.page-ellipsis {
  padding: 0 0.25rem;
  color: var(--text-3);
}

.page-info {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-left: 1rem;
}

/* ============================================
   BREADCRUMBS AVANÇADO
   ============================================ */
.breadcrumb-adv {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item:hover {
  color: var(--neon-cyan);
}

.breadcrumb-item.active {
  color: var(--text-1);
  font-weight: 600;
}

.breadcrumb-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.breadcrumb-sep {
  color: var(--bg-border);
  font-size: 0.75rem;
}

/* ============================================
   DATEPICKER
   ============================================ */
.datepicker {
  position: relative;
  display: inline-block;
}

.datepicker-input {
  width: 100%;
  padding: 0.625rem 2.5rem 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
}

.datepicker-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(11,110,140,0.15);
}

.datepicker-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-3);
  pointer-events: none;
}

.datepicker-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  width: 280px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(15,23,42,0.25);
  border: 1px solid var(--bg-border-sub);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 9999 !important;
  pointer-events: none;
}

.datepicker-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.datepicker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bg-border-sub);
}

.datepicker-nav {
  display: flex;
  gap: 0.5rem;
}

.datepicker-nav button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: all 0.2s;
}

.datepicker-nav button:hover {
  background: var(--bg-dark);
  color: var(--neon-cyan);
}

.datepicker-nav button svg {
  width: 18px;
  height: 18px;
}

.datepicker-month {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-1);
}

.datepicker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  padding: 0.75rem;
}

.datepicker-day {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
  justify-self: center;
}

.datepicker-day:hover:not(.empty):not(.selected) {
  background: var(--bg-dark);
  color: var(--neon-cyan);
}

.datepicker-day.today {
  font-weight: 700;
  color: var(--neon-cyan);
}

.datepicker-day.selected {
  background: var(--neon-cyan);
  color: #fff;
}

.datepicker-day.other-month {
  color: var(--text-4);
  opacity: 0.5;
}

.datepicker-day.empty {
  cursor: default;
}

.datepicker-weekday {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  justify-self: center;
}

/* ============================================
   TAGS INPUT
   ============================================ */
.tags-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  min-height: 42px;
  cursor: text;
  transition: all 0.2s;
}

.tags-input-wrap:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(11,110,140,0.15);
}

.tags-input-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: rgba(11,110,140,0.1);
  color: var(--neon-cyan);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  animation: scale-in 0.2s ease-out;
}

.tags-input-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: currentColor;
  opacity: 0.5;
  padding: 0;
  display: flex;
  transition: opacity 0.2s;
}

.tags-input-tag button:hover {
  opacity: 1;
}

.tags-input-tag button svg {
  width: 14px;
  height: 14px;
}

.tags-input-field {
  flex: 1;
  min-width: 120px;
  border: none;
  outline: none;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-2);
  background: transparent;
}

.tags-input-field::placeholder {
  color: var(--text-4);
}

/* ============================================
   TREE VIEW
   ============================================ */
.tree {
  padding-left: 0;
}

.tree-item {
  margin: 0.25rem 0;
}

.tree-node {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.tree-node:hover {
  background: var(--bg-dark);
}

.tree-node.active {
  background: rgba(11,110,140,0.1);
  color: var(--neon-cyan);
  font-weight: 500;
}

.tree-toggle {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.tree-toggle.open {
  transform: rotate(90deg);
}

.tree-toggle.leaf {
  visibility: hidden;
}

.tree-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.tree-label {
  font-size: 0.875rem;
}

.tree-children {
  padding-left: 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.tree-children.open {
  max-height: 1000px;
}

/* ============================================
   AVATAR GROUP
   ============================================ */
.avatar-group {
  display: flex;
  align-items: center;
}

.avatar-group .avatar {
  border: 2px solid var(--bg-card);
  margin-left: -0.5rem;
  transition: all 0.2s;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

.avatar-group .avatar:hover {
  transform: translateY(-2px);
  z-index: 1;
}

.avatar-group .avatar-more {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-dark);
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  border: 2px solid var(--bg-card);
  margin-left: -0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.avatar-group .avatar-more:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}

/* ============================================
   BUTTONS - MELHORIAS
   ============================================ */
.btn {
  position: relative;
  overflow: hidden;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin-btn 0.8s linear infinite;
}

/* ============================================
   CARDS - MELHORIAS
   ============================================ */
.custom-card {
  position: relative;
  transition: all 0.3s ease;
}

/* Cards com dropdown devem ter overflow visible */
.custom-card:has(.dropdown) {
  overflow: visible !important;
}

.custom-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.custom-card.card-gradient {
  border: none;
  background: linear-gradient(135deg, rgba(11,110,140,0.05), rgba(26,68,160,0.05));
}

.custom-card.card-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
}

.card-expandable .card-body {
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.card-expandable.expanded .card-body {
  max-height: 1000px;
}

/* ============================================
   FORMS - MELHORIAS
   ============================================ */
.form-group {
  position: relative;
}

.form-input-wrap {
  position: relative;
}

.form-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-3);
}

.form-input-icon + .fi {
  padding-left: 2.5rem;
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 0.375rem;
}

.form-error {
  display: none;
  font-size: 0.75rem;
  color: var(--neon-red);
  margin-top: 0.375rem;
}

.form-group.error .fi {
  border-color: var(--neon-red);
}

.form-group.error .form-error {
  display: block;
}

.form-group.success .fi {
  border-color: var(--neon-green);
}

.form-success {
  display: none;
  font-size: 0.75rem;
  color: var(--neon-green);
  margin-top: 0.375rem;
}

.form-group.success .form-success {
  display: block;
}

/* Input Groups */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .fi {
  flex: 1;
}

.input-group-prepend,
.input-group-append {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: var(--bg-dark);
  border: 1px solid var(--bg-border);
  font-size: 0.875rem;
  color: var(--text-3);
}

.input-group-prepend {
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group-append {
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group .fi:first-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group .fi:last-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* ============================================
   TABLE - MELHORIAS
   ============================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

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

.table-adv thead {
  background: var(--bg-dark);
}

.table-adv th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-adv td {
  padding: 1rem;
  border-top: 1px solid var(--bg-border-sub);
  font-size: 0.875rem;
}

.table-adv tbody tr {
  transition: background 0.2s;
}

.table-adv tbody tr:hover {
  background: var(--bg-dark);
}

.table-adv tbody tr.selected {
  background: rgba(11,110,140,0.08);
}

.table-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.table-expand {
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: var(--text-3);
  transition: transform 0.2s;
}

.table-expand.open {
  transform: rotate(90deg);
}

.table-detail {
  display: none;
  background: var(--bg-dark);
}

.table-detail.open {
  display: table-row;
}

.table-detail td {
  padding: 1.5rem;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

.table-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: all 0.2s;
}

.table-actions button:hover {
  background: var(--bg-hover);
  color: var(--neon-cyan);
}

.table-actions button svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode {
  --bg-darkest: #0F172A;
  --bg-dark: #1E293B;
  --bg-surface: #334155;
  --bg-card: #1E293B;
  --bg-elevated: #334155;
  --bg-hover: #475569;
  --bg-border: #475569;
  --bg-border-sub: #334155;

  --text-1: #F8FAFC;
  --text-2: #E2E8F0;
  --text-3: #94A3B8;
  --text-4: #64748B;
}

body.dark-mode .custom-card,
body.dark-mode .card,
body.dark-mode .modal-box {
  background: var(--bg-card);
}

body.dark-mode .fi {
  background: var(--bg-surface);
  color: var(--text-2);
}

body.dark-mode .alert {
  background: var(--bg-surface);
}

.dark-toggle {
  position: relative;
  width: 56px;
  height: 28px;
  background: var(--bg-border);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s;
}

.dark-toggle.active {
  background: var(--neon-cyan);
}

.dark-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-toggle.active .dark-toggle-thumb {
  transform: translateX(28px);
}

.dark-toggle-thumb svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton-block {
  background: linear-gradient(90deg, #E0E8F2 25%, #C4D4E6 50%, #E0E8F2 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: 0.375rem;
}

.skel-title {
  height: 24px;
  width: 60%;
  margin-bottom: 1rem;
}

.skel-line {
  height: 16px;
  width: 100%;
  margin-bottom: 0.5rem;
}

.skel-line:last-child {
  width: 80%;
}

.real-content {
  display: none;
}

#skeleton-demo.loading .skeleton-block {
  display: block;
}

#skeleton-demo.loading .real-content {
  display: none;
}

#skeleton-demo:not(.loading) .skeleton-block {
  display: none;
}

#skeleton-demo:not(.loading) .real-content {
  display: block;
}

/* ============================================
   SPINNERS
   ============================================ */
.spinner {
  display: inline-block;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: #0B6E8C;
  border-radius: 50%;
  animation: spin-btn 0.8s linear infinite;
}

.spinner.sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner.lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.spinner.cyan { border-top-color: #0B6E8C; }
.spinner.red { border-top-color: #D62B2B; }
.spinner.green { border-top-color: #1F7A45; }
.spinner.yellow { border-top-color: #C07C00; }
.spinner.purple { border-top-color: #5A1A9A; }

/* ============================================
   POPOVERS
   ============================================ */
.popover-wrap {
  position: relative;
  display: inline-block;
}

.popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  border-radius: 0.5rem;
  box-shadow: 0 8px 32px rgba(15,23,42,0.18);
  z-index: 9999 !important;
  min-width: 200px;
  animation: scale-in 0.2s ease-out;
}

.popover.open {
  display: block !important;
}

.pop-arrow {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  transform: translateX(-50%) rotate(45deg);
}

.pop-head {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #C4D4E6;
  font-weight: 600;
  font-size: 0.875rem;
}

.pop-body {
  padding: 1rem;
  font-size: 0.8rem;
  color: #4A6080;
}

/* ============================================
   TOOLTIPS
   ============================================ */
.tooltip-wrap {
  position: relative;
  display: inline-block;
}

.tooltip {
  display: none;
  position: absolute;
  background: #0F172A;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 3000;
  pointer-events: none;
}

.tooltip-wrap:hover .tooltip {
  display: block;
}

.tooltip.top {
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
}

.tooltip.bottom {
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
}

.tooltip.left {
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
}

.tooltip.right {
  top: 50%;
  left: calc(100% + 8px);
  transform: translateY(-50%);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #C4D4E6;
}

.tl-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.tl-dot {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #9FB4CE;
  border: 3px solid #EDF1F7;
  transform: translateX(-50%);
}

.tl-dot.cyan { background: #0B6E8C; }
.tl-dot.red { background: #D62B2B; }
.tl-dot.green { background: #1F7A45; }
.tl-dot.yellow { background: #C07C00; }

.tl-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0D1829;
  margin-bottom: 0.125rem;
}

.tl-time {
  font-size: 0.7rem;
  color: #6B82A0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  margin-bottom: 0.375rem;
}

.tl-desc {
  font-size: 0.8rem;
  color: #4A6080;
}

/* ============================================
   OFF-CANVAS PANELS
   ============================================ */
#left-canvas,
#right-canvas {
  position: fixed;
  top: 0;
  width: 320px;
  height: 100vh;
  background: #FFFFFF;
  z-index: 5000;
  box-shadow: 0 8px 32px rgba(15,23,42,0.18);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

#left-canvas {
  left: 0;
  transform: translateX(-100%);
}

#right-canvas {
  right: 0;
  background: #0F172A;
  color: #fff;
  transform: translateX(100%);
}

#left-canvas.open {
  transform: translateX(0);
}

#right-canvas.open {
  transform: translateX(0);
}

.lc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #C4D4E6;
  position: sticky;
  top: 0;
  background: #FFFFFF;
  z-index: 10;
}

#right-canvas .lc-head {
  background: #0F172A;
  border-bottom-color: rgba(255,255,255,0.1);
}

.lc-body {
  padding: 1rem;
}

.lc-foot {
  padding: 1rem;
  border-top: 1px solid #C4D4E6;
  position: sticky;
  bottom: 0;
  background: #FFFFFF;
}

#right-canvas .lc-foot {
  background: #0F172A;
  border-top-color: rgba(255,255,255,0.1);
}

/* Right Canvas Tabs */
/* Right Canvas Tabs */
.rc-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 0 0.5rem;
  position: sticky;
  top: 0;
  background: #0F172A;
  z-index: 5;
}

.rc-tab {
  flex: 1;
  padding: 0.75rem 0.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
  transition: all 0.2s;
}

.rc-tab:hover {
  color: rgba(255,255,255,0.8);
}

.rc-tab.active {
  color: #0B6E8C;
  border-bottom-color: #0B6E8C;
}

.rc-body {
  padding: 0;
}

.rc-scroll {
  padding: 1rem;
  overflow-y: auto;
  max-height: calc(100vh - 100px);
}

.rc-pane {
  display: none;
}

.rc-pane.active {
  display: block;
}

/* Perfil no right-canvas */
.prof-hero {
  text-align: center;
  padding: 1.5rem 0;
}

.av-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0B6E8C;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 0.75rem;
  box-shadow: 0 4px 12px rgba(11,110,140,0.3);
}

/* Formulários no right-canvas */
#right-canvas .fg {
  margin-bottom: 1rem;
}

#right-canvas .fl {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.375rem;
}

#right-canvas .fi {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  width: 100%;
  transition: all 0.2s;
}

#right-canvas .fi:focus {
  outline: none;
  border-color: #0B6E8C;
  box-shadow: 0 0 0 3px rgba(11,110,140,0.2);
}

#right-canvas .fi::placeholder {
  color: rgba(255,255,255,0.3);
}

/* Botão no right-canvas */
#right-canvas .btn {
  margin-top: 1rem;
}

/* Calendrio no Right Canvas (fundo escuro) */
#right-canvas .calendar-advanced {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

#right-canvas .calendar-advanced .calendar-weekday {
  color: rgba(255,255,255,0.5);
}

#right-canvas .calendar-advanced .calendar-day {
  color: rgba(255,255,255,0.7);
}

#right-canvas .calendar-advanced .calendar-day:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--neon-cyan);
}

#right-canvas .calendar-advanced .calendar-day.other-month {
  color: rgba(255,255,255,0.2);
}

/* Right Canvas Inputs */
#right-canvas .fi {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}

#right-canvas .fi:focus {
  border-color: #0B6E8C;
  box-shadow: 0 0 0 3px rgba(11,110,140,0.2);
}

#right-canvas .fi::placeholder {
  color: rgba(255,255,255,0.4);
}

#right-canvas .fl {
  color: rgba(255,255,255,0.7);
}

/* ============================================
   OVERLAYS
   ============================================ */
#overlay-left,
#overlay-right {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,24,41,0.5);
  z-index: 4999;
  backdrop-filter: blur(2px);
}

#overlay-left.active,
#overlay-right.active {
  display: block;
}

/* ============================================
   FAB BUTTON
   ============================================ */
.fab {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 48px;
  height: 48px;
  background: #0B6E8C;
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(11,110,140,0.3);
  cursor: pointer;
  z-index: 45;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.fab:hover {
  background: #095a73;
  transform: scale(1.05);
}

body.mini .fab {
  display: flex;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 1024px) {
  #topbar {
    left: 260px;
  }
  body.mini #topbar {
    left: 64px;
  }
  #main {
    margin-left: 260px;
  }
  body.mini #main {
    margin-left: 64px;
  }
}

@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
    width: 260px !important;
  }
  #sidebar.mobile-open {
    transform: translateX(0);
  }
  #topbar {
    left: 0 !important;
  }
  #main {
    margin-left: 0 !important;
  }
  .search-bar {
    display: none;
  }
  .mobile-menu-btn {
    display: flex !important;
  }
}

.mobile-menu-btn {
  display: none;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ============================================
   POPOVERS
   ============================================ */
.popover-wrap {
  position: relative;
  display: inline-block;
}

.popover {
  z-index: 9999;
}

.popover.open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* Popover position utility */
.popover-top {
  bottom: calc(100% + 10px);
  top: auto;
}

.popover-bottom {
  top: calc(100% + 10px);
  bottom: auto;
}

.popover-left {
  right: calc(100% + 10px);
  left: auto;
}

.popover-right {
  left: calc(100% + 10px);
  right: auto;
}

/* ============================================
   SKELETON LOADER (CONTINUAÇÃO)
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-dark) 25%, var(--bg-surface) 50%, var(--bg-dark) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
  margin-bottom: 0.75rem;
}

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

.skeleton-image {
  height: 200px;
}

/* ============================================
   RATING STARS
   ============================================ */
.rating-group {
  display: inline-flex;
  gap: 0.25rem;
}

.star {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: var(--bg-border);
  transition: all 0.2s;
}

.star:hover,
.star.hover {
  color: var(--neon-yellow);
}

.star.active {
  color: var(--neon-yellow);
}

.star.sm {
  width: 18px;
  height: 18px;
}

.star.lg {
  width: 32px;
  height: 32px;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bg-border-sub);
}

.tl-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.tl-dot {
  position: absolute;
  left: -1.75rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-border);
  border: 2px solid var(--bg-card);
}

.tl-dot.cyan { background: var(--neon-cyan); }
.tl-dot.green { background: var(--neon-green); }
.tl-dot.red { background: var(--neon-red); }
.tl-dot.yellow { background: var(--neon-yellow); }
.tl-dot.purple { background: var(--neon-purple); }

.tl-dot.pulse {
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.tl-content {
  padding-left: 0.5rem;
}

.tl-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.25rem;
}

.tl-time {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-bottom: 0.25rem;
}

.tl-desc {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  color: var(--bg-border);
}

.empty-state-icon svg {
  width: 100%;
  height: 100%;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   DRAG & DROP - KANBAN BOARD
   ============================================ */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.kanban-column {
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--bg-border-sub);
}

.kanban-column-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kanban-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.kanban-status-dot.todo {
  background: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(11,110,140,0.4);
}

.kanban-status-dot.progress {
  background: var(--neon-yellow);
  box-shadow: 0 0 8px rgba(192,124,0,0.4);
}

.kanban-status-dot.done {
  background: var(--neon-green);
  box-shadow: 0 0 8px rgba(31,122,69,0.4);
}

.kanban-count {
  background: var(--bg-card);
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  margin-left: 0.5rem;
}

.kanban-add-btn {
  background: none;
  border: none;
  color: var(--text-3);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.kanban-add-btn:hover {
  background: var(--bg-hover);
  color: var(--neon-cyan);
}

.kanban-add-btn svg {
  width: 18px;
  height: 18px;
}

.kanban-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100px;
  transition: all 0.2s;
  padding: 0.25rem;
}

.kanban-cards.drag-over {
  background: rgba(11,110,140,0.05);
  border-radius: var(--radius-md);
  border: 2px dashed var(--neon-cyan);
}

.kanban-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: all 0.2s;
  border: 1px solid var(--bg-border-sub);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.5;
  transform: scale(1.02) rotate(2deg);
  box-shadow: var(--shadow-lg);
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kanban-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.kanban-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
}

.kanban-card-badge {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kanban-card-badge.high {
  background: rgba(214,43,43,0.1);
  color: var(--neon-red);
}

.kanban-card-badge.medium {
  background: rgba(192,124,0,0.1);
  color: var(--neon-yellow);
}

.kanban-card-badge.low {
  background: rgba(11,110,140,0.1);
  color: var(--neon-cyan);
}

.kanban-card-badge.done {
  background: rgba(31,122,69,0.1);
  color: var(--neon-green);
}

.kanban-card-desc {
  font-size: 0.75rem;
  color: var(--text-3);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bg-border-sub);
}

.kanban-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  color: #fff;
}

.kanban-card-date {
  font-size: 0.75rem;
  color: var(--text-4);
}

/* Responsive Kanban */
@media (max-width: 1024px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }
  
  .kanban-column {
    min-height: auto;
  }
}

/* ============================================
   INFINITE SCROLL LOADER
   ============================================ */
.infinite-loader {
  text-align: center;
  padding: 2rem;
  display: none;
}

.infinite-loader.visible {
  display: block;
}

.loader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bg-dark);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  animation: spin-btn 0.8s linear infinite;
  margin: 0 auto 0.75rem;
}

.infinite-loader-text {
  font-size: 0.875rem;
  color: var(--text-3);
}

/* ============================================
   NOTIFICATION BADGE
   ============================================ */
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 0.375rem;
  background: var(--neon-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 4px rgba(214,43,43,0.6);
  line-height: 1;
  transform: translate(0, 0);
}

/* ============================================
   AUTOCOMPLETE
   ============================================ */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(15,23,42,0.25);
  border: 1px solid var(--bg-border-sub);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 9999;
}

.autocomplete-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--bg-dark);
}

.autocomplete-item.active {
  color: var(--neon-cyan);
}

.autocomplete-highlight {
  background: rgba(11,110,140,0.2);
  color: var(--neon-cyan);
  font-weight: 600;
  padding: 0 0.125rem;
  border-radius: 2px;
}

.autocomplete-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  padding: 0.625rem 1rem 0.375rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--bg-border-sub);
}

.autocomplete-category:first-child {
  border-top: none;
  margin-top: 0;
}

.autocomplete-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-3);
  pointer-events: none;
  transition: color 0.2s;
}

.autocomplete-input {
  width: 100%;
  padding: 0.625rem 0.75rem 0.625rem 2.5rem;
  background: var(--bg-input);
  border: 1px solid var(--bg-border-sub);
  border-radius: var(--radius-md);
  color: var(--text-1);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.autocomplete-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(14,165,190,0.15);
}

.autocomplete-input:focus + .autocomplete-icon {
  color: var(--neon-cyan);
}

.autocomplete-multiple {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--bg-border-sub);
  border-radius: var(--radius-md);
  min-height: 42px;
  transition: all 0.2s;
}

.autocomplete-multiple:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(14,165,190,0.15);
}

.autocomplete-multiple-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  flex: 1;
}

.autocomplete-multiple-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  background: rgba(14,165,190,0.15);
  border: 1px solid rgba(14,165,190,0.3);
  border-radius: var(--radius-sm);
  color: var(--neon-cyan);
  font-size: 0.75rem;
  font-weight: 500;
}

.autocomplete-multiple-tag button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--neon-cyan);
  cursor: pointer;
  padding: 0;
  width: 1rem;
  height: 1rem;
}

.autocomplete-multiple-tag button:hover {
  color: var(--neon-red);
}

.autocomplete-input-multiple {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  color: var(--text-1);
  font-size: 0.875rem;
  outline: none;
}

/* ============================================
   KEYBOARD SHORTCUTS PANEL
   ============================================ */
.shortcuts-panel {
  padding: 1rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg-border-sub);
}

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

.shortcut-desc {
  font-size: 0.875rem;
  color: var(--text-2);
}

.shortcut-keys {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  color: var(--text-2);
  box-shadow: 0 2px 0 var(--bg-border);
}

.kbd-sep {
  color: var(--text-3);
  font-size: 0.75rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.grid { display: grid; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.transition { transition: var(--transition-base); }
.transition-smooth { transition: var(--transition-smooth); }

/* ============================================
   SVG GLOBAL SIZING
   ============================================ */

/* Sidebar icons */
.sb-head .ni-left svg,
nav .ni svg,
nav .si svg,
nav .chv {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Topbar icons */
.breadcrumb svg,
.search-bar svg,
#topbar .icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Section headers */
.section-header svg {
  width: 24px;
  height: 24px;
}

/* Button icons */
.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-sm svg {
  width: 16px;
  height: 16px;
}

/* Card stat icons */
.card-stat-icon svg {
  width: 24px;
  height: 24px;
}

/* Badge/Tag icons */
.badge svg {
  width: 14px;
  height: 14px;
}

/* Table sorting icons */
.th-sort svg {
  width: 16px;
  height: 16px;
}

/* Activity feed small icons */
.activity-meta-item svg {
  width: 12px;
  height: 12px;
}

/* Notification icons */
.notif-icon svg {
  width: 20px;
  height: 20px;
}

/* Calendar navigation */
.calendar-nav-btn svg {
  width: 20px;
  height: 20px;
}

/* Command palette icons */
.command-item svg {
  width: 18px;
  height: 18px;
}

/* FAB button icon */
.fab svg {
  width: 24px;
  height: 24px;
}

/* Mobile menu button */
.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Toast icons */
.toast-head svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Accordion chevron */
.acc-chv svg {
  width: 18px;
  height: 18px;
}

/* Carousel dots */
.carousel-dot svg {
  width: 8px;
  height: 8px;
}

/* Progress check icon */
.prog-check svg {
  width: 16px;
  height: 16px;
}

/* Tree view toggle icon */
.tree-toggle svg {
  width: 16px;
  height: 16px;
}

/* Avatar fallback */
.avatar svg {
  width: 100%;
  height: 100%;
}

/* Logo */
.logo-ico svg {
  width: 36px;
  height: 36px;
}

/* Card header icons */
.custom-card-head svg {
  width: 20px;
  height: 20px;
}

/* Rating stars */
.rating-group svg,
.star svg {
  width: 20px;
  height: 20px;
}

/* Dropdown item icons */
.dropdown-item svg {
  width: 18px;
  height: 18px;
}

/* Tooltip/Popover icons */
.popover-wrap .icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Datepicker */
.datepicker-panel svg {
  width: 16px;
  height: 16px;
}

/* Pagination */
.pagination svg {
  width: 16px;
  height: 16px;
}

/* Stepper */
.step-item svg {
  width: 20px;
  height: 20px;
}

/* Empty state */
.empty-state-icon svg {
  width: 48px;
  height: 48px;
}

/* Alert dismiss button */
.alert-dismiss svg {
  width: 18px;
  height: 18px;
}

/* State container icons */
.state-container svg {
  width: 48px;
  height: 48px;
}

/* Timeline */
.timeline-item svg {
  width: 16px;
  height: 16px;
}

/* User card sidebar */
.user-card svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slide-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

.animate-slide-in {
  animation: slide-in 0.3s ease-out;
}

.animate-scale-in {
  animation: scale-in 0.3s ease-out;
}

/* ============================================
   VERTICAL TABS
   ============================================ */
.tabs-vertical {
  display: flex;
  gap: 0;
  border: 1px solid var(--bg-border-sub);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

.tabs-vertical-nav {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  background: var(--bg-dark);
  border-right: 1px solid var(--bg-border-sub);
}

.tab-v-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-3);
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}

.tab-v-item:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}

.tab-v-item.active {
  background: var(--bg-card);
  color: var(--neon-cyan);
  border-left-color: var(--neon-cyan);
  font-weight: 600;
}

.tab-v-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.tabs-vertical-content {
  flex: 1;
  padding: 1.5rem;
}

.tab-v-pane {
  display: none;
  animation: fade-in 0.2s ease-out;
}

.tab-v-pane.active {
  display: block;
}

/* ============================================
   MULTI-SELECT
   ============================================ */
.multi-select-wrap {
  position: relative;
  z-index: 1;
}

.multi-select-wrap.open {
  z-index: 100;
}

.multi-select-trigger {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem;
  min-height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.multi-select-trigger:hover {
  border-color: var(--neon-cyan);
}

.multi-select-trigger:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(11,110,140,0.15);
}

.multi-select-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  background: rgba(11,110,140,0.1);
  color: var(--neon-cyan);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.multi-select-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: currentColor;
  opacity: 0.6;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.multi-select-tag button:hover {
  opacity: 1;
}

.multi-select-placeholder {
  font-size: 0.875rem;
  color: var(--text-4);
  padding: 0.25rem 0;
}

.multi-select-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(15,23,42,0.25);
  border: 1px solid var(--bg-border-sub);
  z-index: 9999 !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  pointer-events: none;
}

.multi-select-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.multi-select-search {
  padding: 0.5rem;
  border-bottom: 1px solid var(--bg-border-sub);
  position: relative;
}

.multi-select-search input {
  width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 2rem;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.multi-select-option:hover {
  background: var(--bg-dark);
}

.multi-select-option.selected {
  background: rgba(11,110,140,0.08);
}

.multi-select-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--bg-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.multi-select-option.selected .multi-select-checkbox {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.multi-select-option.selected .multi-select-checkbox svg {
  opacity: 1;
}

.multi-select-checkbox svg {
  width: 12px;
  height: 12px;
  color: #fff;
  opacity: 0;
}

.multi-select-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-4);
  margin-left: auto;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.multi-select-wrap.open .multi-select-arrow {
  transform: rotate(180deg);
}

/* SVGs dentro do multi-select */
.multi-select-trigger svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.multi-select-search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-4);
  pointer-events: none;
}

.multi-select-checkbox svg {
  width: 12px;
  height: 12px;
}

.multi-select-tag-close {
  background: none;
  border: none;
  cursor: pointer;
  color: currentColor;
  opacity: 0.6;
  padding: 0;
  display: flex;
  font-size: 1rem;
  line-height: 1;
}

.multi-select-tag-close:hover {
  opacity: 1;
}

/* ============================================
   CALENDAR
   ============================================ */
.calendar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--bg-border-sub);
}

.calendar-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: all 0.2s;
}

.calendar-nav-btn:hover {
  background: var(--bg-hover);
  color: var(--neon-cyan);
}

.calendar-nav-btn svg {
  width: 20px;
  height: 20px;
}

.calendar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  padding: 0.75rem;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  padding: 0.5rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  position: relative;
}

.calendar-day:hover:not(.empty):not(.selected) {
  background: var(--bg-dark);
}

.calendar-day.today {
  font-weight: 700;
  color: var(--neon-cyan);
}

.calendar-day.selected {
  background: var(--neon-cyan);
  color: #fff;
}

.calendar-day.other-month {
  color: var(--text-4);
  opacity: 0.4;
}

.calendar-day.empty {
  cursor: default;
}

.calendar-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--neon-purple);
}

.calendar-day.selected.has-event::after {
  background: #fff;
}

/* ============================================
   DATA TABLE AVANÇADA
   ============================================ */
.data-table-adv {
  width: 100%;
  border-collapse: collapse;
  display: table;
  table-layout: auto;
}

.data-table-adv thead {
  background: var(--bg-dark);
  display: table-header-group;
}

.data-table-adv th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--bg-border-sub);
  display: table-cell;
  width: 100%;
}

.data-table-adv td {
  padding: 1rem;
  border-bottom: 1px solid var(--bg-border-sub);
  font-size: 0.875rem;
  display: table-cell;
}

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

.data-table-adv tbody tr {
  display: table-row;
  transition: all 0.2s;
}

.data-table-adv tbody tr:hover {
  background: var(--bg-dark);
}

.data-table-adv tbody tr.selected {
  background: rgba(11,110,140,0.08);
}

.table-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ============================================
   BULK ACTIONS TOOLBAR
   ============================================ */
.bulk-actions {
  display: none;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  animation: slide-in 0.2s ease-out;
}

.bulk-actions.visible {
  display: flex;
}

.bulk-actions-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neon-cyan);
}

.bulk-actions-buttons {
  display: flex;
  gap: 0.5rem;
  flex: 1;
}

.bulk-actions-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 0.375rem;
  border-radius: var(--radius-sm);
}

.bulk-actions-close:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}

/* ============================================
   NOTIFICATION CENTER
   ============================================ */
.notification-center {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 360px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(15,23,42,0.25);
  border: 1px solid var(--bg-border-sub);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
}

.notif-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--bg-border-sub);
}

.notif-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
}

.notif-mark-read {
  background: none;
  border: none;
  color: var(--neon-cyan);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.notif-mark-read:hover {
  background: rgba(11,110,140,0.1);
}

.notif-badge-count {
  background: var(--neon-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.notif-list {
  max-height: 400px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--bg-border-sub);
  cursor: pointer;
  transition: all 0.2s;
}

.notif-item:hover {
  background: var(--bg-dark);
}

.notif-item.unread {
  background: rgba(11,110,140,0.05);
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon.cyan { background: rgba(11,110,140,0.1); color: var(--neon-cyan); }
.notif-icon.green { background: rgba(31,122,69,0.1); color: var(--neon-green); }
.notif-icon.red { background: rgba(214,43,43,0.1); color: var(--neon-red); }
.notif-icon.yellow { background: rgba(192,124,0,0.1); color: var(--neon-yellow); }

.notif-icon svg {
  width: 18px;
  height: 18px;
}

.notif-content {
  flex: 1;
}

.notif-title-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 0.25rem;
}

.notif-desc {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 0.375rem;
}

.notif-time {
  font-size: 0.75rem;
  color: var(--text-4);
}

.notif-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--bg-border-sub);
  text-align: center;
}

.notif-footer a {
  color: var(--neon-cyan);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.notif-footer a:hover {
  text-decoration: underline;
}

/* ============================================
   COMMAND PALETTE
   ============================================ */
.command-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,24,41,0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
}

.command-palette-overlay.open {
  display: flex;
}

.command-palette {
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(15,23,42,0.3);
  overflow: hidden;
  animation: scale-in 0.2s ease-out;
}

.command-palette-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--bg-border-sub);
}

.command-palette-input svg {
  width: 20px;
  height: 20px;
  color: var(--text-3);
}

.command-palette-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-1);
  background: transparent;
}

.command-palette-input input::placeholder {
  color: var(--text-4);
}

.command-palette-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.command-item:hover,
.command-item.active {
  background: var(--bg-dark);
}

.command-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-3);
}

.command-item-text {
  flex: 1;
}

.command-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-1);
}

.command-item-desc {
  font-size: 0.75rem;
  color: var(--text-3);
}

.command-shortcut {
  display: flex;
  gap: 0.25rem;
}

/* ============================================
   ACTIVITY FEED
   ============================================ */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--bg-border-sub);
}

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

.activity-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 0.875rem;
  color: var(--text-1);
  margin-bottom: 0.25rem;
}

.activity-title strong {
  font-weight: 600;
}

.activity-desc {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 0.375rem;
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-4);
}

.activity-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.activity-meta-item svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   STATES UX MODERNOS
   ============================================ */
.state-container {
  text-align: center;
  padding: 4rem 2rem;
}

.state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.state-icon.success {
  background: rgba(31,122,69,0.1);
  color: var(--neon-green);
}

.state-icon.error {
  background: rgba(214,43,43,0.1);
  color: var(--neon-red);
}

.state-icon.loading {
  background: rgba(11,110,140,0.1);
  color: var(--neon-cyan);
}

.state-icon.disabled {
  background: var(--bg-dark);
  color: var(--text-4);
}

.state-icon svg {
  width: 40px;
  height: 40px;
}

.state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.5rem;
}

.state-desc {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.state-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Success State */
.state-success {
  background: rgba(31,122,69,0.05);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* Error State */
.state-error {
  background: rgba(214,43,43,0.05);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* Loading State */
.state-loading {
  background: rgba(11,110,140,0.05);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* ============================================
   CALENDÁRIO COM ANOTAÇÕES (AVANÇADO)
   ============================================ */
.calendar-advanced {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.calendar-advanced .calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: #fff;
}

.calendar-advanced .calendar-title {
  color: #fff;
  font-size: 1.125rem;
}

.calendar-advanced .calendar-nav-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  color: #fff;
  transition: all 0.2s;
}

.calendar-advanced .calendar-nav-btn:hover {
  background: rgba(255,255,255,0.3);
}

.calendar-advanced .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 1rem;
}

.calendar-advanced .calendar-weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  padding: 0.5rem 0.25rem;
}

.calendar-advanced .calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  position: relative;
  min-height: 60px;
  border: 2px solid transparent;
}

.calendar-advanced .calendar-day:hover {
  background: var(--bg-dark);
  border-color: var(--neon-cyan);
}

.calendar-advanced .calendar-day.today {
  background: rgba(11,110,140,0.1);
  font-weight: 700;
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.calendar-advanced .calendar-day.selected {
  background: var(--neon-cyan);
  color: #fff;
}

.calendar-advanced .calendar-day.other-month {
  color: var(--text-4);
  opacity: 0.4;
}

.calendar-advanced .calendar-day.has-annotation::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
}

.calendar-advanced .calendar-day.drag-over {
  background: rgba(11,110,140,0.15);
  border-color: var(--neon-cyan);
  transform: scale(1.05);
}

.calendar-annotation {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  display: flex;
  gap: 1px;
  justify-content: center;
  flex-wrap: wrap;
}

.calendar-annotation-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--neon-cyan);
}

.calendar-annotation-dot.red { background: var(--neon-red); }
.calendar-annotation-dot.green { background: var(--neon-green); }
.calendar-annotation-dot.yellow { background: var(--neon-yellow); }
.calendar-annotation-dot.purple { background: var(--neon-purple); }

/* Annotation Modal */
.annotation-modal {
  position: fixed;
  inset: 0;
  background: rgba(13,24,41,0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.annotation-modal.open {
  display: flex;
}

.annotation-modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: scale-in 0.2s ease-out;
}

.annotation-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-border-sub);
}

.annotation-modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-1);
}

.annotation-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.annotation-modal-close:hover {
  background: var(--bg-dark);
  color: var(--text-1);
}

.annotation-modal-body {
  padding: 1.5rem;
}

.annotation-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  cursor: grab;
  transition: all 0.2s;
  border: 1px solid var(--bg-border-sub);
}

.annotation-item:hover {
  background: var(--bg-hover);
  border-color: var(--neon-cyan);
}

.annotation-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.annotation-item-color {
  width: 4px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.annotation-item-color.cyan { background: var(--neon-cyan); }
.annotation-item-color.red { background: var(--neon-red); }
.annotation-item-color.green { background: var(--neon-green); }
.annotation-item-color.yellow { background: var(--neon-yellow); }
.annotation-item-color.purple { background: var(--neon-purple); }

.annotation-item-content {
  flex: 1;
}

.annotation-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.25rem;
}

.annotation-item-desc {
  font-size: 0.75rem;
  color: var(--text-3);
}

.annotation-item-actions {
  display: flex;
  gap: 0.375rem;
}

.annotation-item-action {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-4);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.annotation-item-action:hover {
  background: var(--bg-surface);
  color: var(--neon-red);
}

.annotation-form {
  margin-top: 1rem;
}

.annotation-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 0.75rem;
}

.annotation-form textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(11,110,140,0.15);
}

.annotation-color-picker {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.annotation-color-option {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.annotation-color-option:hover {
  transform: scale(1.2);
}

.annotation-color-option.selected {
  border-color: var(--text-1);
  box-shadow: 0 0 0 2px var(--bg-card);
}

.annotation-color-option.cyan { background: var(--neon-cyan); }
.annotation-color-option.red { background: var(--neon-red); }
.annotation-color-option.green { background: var(--neon-green); }
.annotation-color-option.yellow { background: var(--neon-yellow); }
.annotation-color-option.purple { background: var(--neon-purple); }

/* Popover para anotações */
.annotation-popover {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--bg-border-sub);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  z-index: 9999;
  min-width: 200px;
  max-width: 280px;
  animation: scale-in 0.2s ease-out;
  pointer-events: auto;
}

.annotation-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--bg-border-sub);
}

.annotation-popover-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--bg-border-sub);
}

.annotation-popover-item {
  font-size: 0.75rem;
  color: var(--text-2);
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--bg-border-sub);
}

.annotation-popover-item:last-child {
  border-bottom: none;
}

.annotation-popover-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.375rem;
}

.annotation-popover-badge.cyan { background: var(--neon-cyan); }
.annotation-popover-badge.red { background: var(--neon-red); }
.annotation-popover-badge.green { background: var(--neon-green); }
.annotation-popover-badge.yellow { background: var(--neon-yellow); }
.annotation-popover-badge.purple { background: var(--neon-purple); }

/* ============================================
   INFINITE SCROLL
   ============================================ */
.infinite-scroll-container {
  max-height: 500px;
  overflow-y: auto;
  position: relative;
}

.infinite-scroll-item {
  padding: 1rem;
  border-bottom: 1px solid var(--bg-border-sub);
  transition: all 0.2s;
  animation: fade-in 0.3s ease-out;
}

.infinite-scroll-item:hover {
  background: var(--bg-dark);
}

.infinite-scroll-loader {
  text-align: center;
  padding: 2rem;
  display: none;
}

.infinite-scroll-loader.visible {
  display: block;
}

.infinite-scroll-loader .spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 4px solid var(--bg-dark);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  animation: spin-btn 0.8s linear infinite;
}

.infinite-scroll-text {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-top: 0.75rem;
}

/* ============================================
   RESPONSIVE UTILITIES (CONTINUAÇÃO)
   ============================================ */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }

  /* Grid responsivo */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }

  .col2, .col3 {
    grid-template-columns: 1fr !important;
  }

  /* Calendar responsivo */
  .calendar-advanced .calendar-day {
    min-height: 40px;
    font-size: 0.75rem;
    padding: 0.25rem;
  }

  .calendar-advanced .calendar-grid {
    gap: 1px;
    padding: 0.5rem;
  }

  .calendar-advanced .calendar-header {
    padding: 0.75rem 1rem;
  }

  .calendar-advanced .calendar-title {
    font-size: 0.875rem;
  }

  .calendar-advanced .calendar-nav-btn {
    padding: 0.375rem;
  }

  .calendar-advanced .calendar-nav-btn svg {
    width: 16px;
    height: 16px;
  }

  /* Annotation modal responsivo */
  .annotation-modal-box {
    max-width: 95%;
    max-height: 90vh;
  }

  .annotation-modal-header {
    padding: 1rem;
  }

  .annotation-modal-body {
    padding: 1rem;
  }

  /* Multi-select responsivo */
  .multi-select-dropdown {
    position: fixed;
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
    max-height: 50vh;
  }

  /* Datepicker responsivo */
  .datepicker-panel {
    position: fixed;
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
    bottom: 1rem;
    top: auto !important;
  }

  /* Tabs verticais responsivo */
  .tabs-vertical {
    flex-direction: column;
  }

  .tabs-vertical-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-right: none;
    border-bottom: 1px solid var(--bg-border-sub);
    padding-bottom: 0.5rem;
  }

  .tab-v-item {
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .tab-v-item.active {
    border-bottom-color: var(--neon-cyan);
  }

  /* Section header responsivo */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .section-icon {
    width: 40px;
    height: 40px;
  }

  .section-title {
    font-size: 1.25rem;
  }

  /* Card responsivo */
  .custom-card-body {
    padding: 1rem;
  }

  .custom-card-head {
    padding: 0.75rem 1rem;
  }

  /* Buttons responsivos */
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .btn-xl {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  /* Toast responsivo */
  #toast-container {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }

  .toast {
    min-width: auto;
  }
}

@media (max-width: 1024px) {
  .hide-tablet {
    display: none !important;
  }

  /* Grid 2 colunas em tablets */
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  /* Mobile pequeno */
  .section-title {
    font-size: 1.125rem;
  }

  .calendar-advanced .calendar-day {
    min-height: 32px;
    font-size: 0.7rem;
  }

  .annotation-modal-box {
    max-width: 98%;
  }

  .annotation-item {
    padding: 0.5rem;
  }

  .annotation-form textarea {
    min-height: 60px;
  }
}

/* ============================================
   TEMAS DE CORES ADICIONAIS
   ============================================ */

/* Tema Azul */
.theme-blue {
  --theme-primary: #1A44A0;
  --theme-primary-light: rgba(26,68,160,0.1);
  --theme-primary-hover: #153a8a;
}

.theme-blue .btn-cyan {
  background: var(--theme-primary);
}

.theme-blue .btn-cyan:hover {
  background: var(--theme-primary-hover);
}

/* Tema Verde */
.theme-green {
  --theme-primary: #1F7A45;
  --theme-primary-light: rgba(31,122,69,0.1);
  --theme-primary-hover: #166036;
}

/* Tema Roxo */
.theme-purple {
  --theme-primary: #5A1A9A;
  --theme-primary-light: rgba(90,26,154,0.1);
  --theme-primary-hover: #4a1580;
}

/* Tema Laranja */
.theme-orange {
  --theme-primary: #D95B10;
  --theme-primary-light: rgba(217,91,16,0.1);
  --theme-primary-hover: #b84d0d;
}

/* Tema Rosa */
.theme-pink {
  --theme-primary: #E91E63;
  --theme-primary-light: rgba(233,30,99,0.1);
  --theme-primary-hover: #c2185b;
}

/* Tema Slate (Cinza Escuro) */
.theme-slate {
  --theme-primary: #0F172A;
  --theme-primary-light: rgba(15,23,42,0.1);
  --theme-primary-hover: #1e293b;
}

/* Tema Âmbar */
.theme-amber {
  --theme-primary: #F59E0B;
  --theme-primary-light: rgba(245,158,11,0.1);
  --theme-primary-hover: #d97706;
}

/* Tema Esmeralda */
.theme-emerald {
  --theme-primary: #10B981;
  --theme-primary-light: rgba(16,185,129,0.1);
  --theme-primary-hover: #059669;
}

/* Tema Índigo */
.theme-indigo {
  --theme-primary: #6366F1;
  --theme-primary-light: rgba(99,102,241,0.1);
  --theme-primary-hover: #4f46e5;
}

/* ============================================
   ANIMAÇÕES ADICIONAIS
   ============================================ */
@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-left {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes bounce-in {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fade-in-up {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(11,110,140,0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(11,110,140,0);
  }
}

/* Utility classes para animações */
.animate-slide-in-right {
  animation: slide-in-right 0.3s ease-out;
}

.animate-slide-in-left {
  animation: slide-in-left 0.3s ease-out;
}

.animate-bounce-in {
  animation: bounce-in 0.6s ease-out;
}

.animate-fade-in-up {
  animation: fade-in-up 0.4s ease-out;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus visible para melhor acessibilidade */
*:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--neon-cyan);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10000;
  transition: top 0.2s;
}

.skip-to-content:focus {
  top: 0;
}

/* Reduzir movimento para acessibilidade */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --bg-border: #000000;
    --text-1: #000000;
    --text-3: #333333;
  }
}

/* ============================================
   UTILITÁRIOS CUSTOMIZADOS
   ============================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-glass {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.bg-glass-dark {
  background: rgba(15,23,42,0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.shadow-neon {
  box-shadow: 0 0 20px rgba(11,110,140,0.3);
}

.shadow-neon-red {
  box-shadow: 0 0 20px rgba(214,43,43,0.3);
}

.shadow-neon-green {
  box-shadow: 0 0 20px rgba(31,122,69,0.3);
}

/* ============================================
   DARK MODE MELHORIAS
   ============================================ */
body.dark-mode {
  --bg-darkest: #0F172A;
  --bg-dark: #1E293B;
  --bg-surface: #334155;
  --bg-card: #1E293B;
  --bg-elevated: #334155;
  --bg-hover: #475569;
  --bg-border: #475569;
  --bg-border-sub: #334155;
  
  --text-1: #F1F5F9;
  --text-2: #E2E8F0;
  --text-3: #94A3B8;
  --text-4: #64748B;
}

body.dark-mode .custom-card,
body.dark-mode .card {
  background: var(--bg-card);
  border-color: var(--bg-border);
}

body.dark-mode .fi {
  background: var(--bg-dark);
  border-color: var(--bg-border);
  color: var(--text-1);
}

body.dark-mode .data-table {
  background: var(--bg-card);
}

body.dark-mode .data-table th {
  background: var(--bg-dark);
}

/* ============================================
   SCROLLBAR CUSTOMIZADA (DARK MODE)
   ============================================ */
body.dark-mode ::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: var(--bg-border);
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan);
}

/* ============================================
   LOADING SKELETON MELHORADO
   ============================================ */
.skeleton-line {
  height: 12px;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
}

.skeleton-line.w-75 {
  width: 75%;
}

.skeleton-line.w-50 {
  width: 50%;
}

.skeleton-line.w-25 {
  width: 25%;
}

/* ============================================
   BADGE MELHORIAS
   ============================================ */
.badge-outline {
  background: transparent;
  border: 1px solid currentColor;
}

.badge-soft {
  opacity: 0.7;
}

.badge-pill {
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
}

/* ============================================
   CARD VARIANTS
   ============================================ */
.card-compact .custom-card-body,
.card-compact .card-body {
  padding: 0.75rem;
}

.card-bordered {
  border: 1px solid var(--bg-border);
}

.card-flat {
  box-shadow: none;
}

.card-hoverable {
  transition: all 0.3s;
}

.card-hoverable:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   BUTTON VARIANTS
   ============================================ */
.btn-rounded {
  border-radius: 9999px;
}

.btn-block {
  width: 100%;
}

.btn-square {
  width: 40px;
  height: 40px;
  padding: 0;
}

.btn-circle {
  border-radius: 50%;
}

/* ============================================
   INPUT VARIANTS
   ============================================ */
.fi-rounded {
  border-radius: 9999px;
}

.fi-bordered {
  border-width: 2px;
}

.fi-ghost {
  background: transparent;
  border-color: transparent;
}

.fi-ghost:focus {
  background: var(--bg-card);
  border-color: var(--neon-cyan);
}

/* ============================================
   TOOLTIP MELHORIAS
   ============================================ */
.tooltip-box {
  max-width: 300px;
  white-space: normal;
  line-height: 1.4;
}

.tooltip-rich {
  padding: 0.75rem 1rem;
  min-width: 200px;
}

.tooltip-rich .tooltip-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.tooltip-rich .tooltip-desc {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ============================================
   DROPDOWN MELHORIAS
   ============================================ */
.dropdown-menu-rich {
  min-width: 250px;
}

.dropdown-menu-rich .dropdown-item {
  padding: 0.75rem 1rem;
}

.dropdown-menu-rich .dropdown-item-desc {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 0.125rem;
}

/* ============================================
   MODAL MELHORIAS
   ============================================ */
.modal-fullscreen {
  max-width: 100%;
  max-height: 100vh;
  border-radius: 0;
}

.modal-slide-up {
  animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ============================================
   TABLE MELHORIAS
   ============================================ */
.data-table-compact th,
.data-table-compact td {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.data-table-striped tbody tr:nth-child(odd) {
  background: var(--bg-dark);
}

.data-table-hoverable tbody tr:hover {
  background: var(--bg-hover);
  cursor: pointer;
}

/* ============================================
   PROGRESS MELHORIAS
   ============================================ */
.prog-track-thick {
  height: 12px;
}

.prog-bar-animated {
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue), var(--neon-cyan));
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

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

/* ============================================
   AVATAR MELHORIAS
   ============================================ */
.avatar-group {
  display: flex;
}

.avatar-group .avatar,
.avatar-group .av-lg,
.avatar-group .av-sm {
  margin-left: -0.5rem;
  border: 2px solid var(--bg-card);
}

.avatar-group .avatar:first-child,
.avatar-group .av-lg:first-child,
.avatar-group .av-sm:first-child {
  margin-left: 0;
}

.avatar-status {
  position: relative;
}

.avatar-status::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

.avatar-status.online::after {
  background: var(--neon-green);
}

.avatar-status.offline::after {
  background: var(--text-4);
}

.avatar-status.busy::after {
  background: var(--neon-red);
}

/* ============================================
   BREADCRUMB MELHORIAS
   ============================================ */
.breadcrumb-modern {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb-modern .breadcrumb-item {
  color: var(--text-3);
  transition: color 0.2s;
}

.breadcrumb-modern .breadcrumb-item:hover {
  color: var(--neon-cyan);
}

.breadcrumb-modern .breadcrumb-item.active {
  color: var(--text-1);
  font-weight: 600;
}

.breadcrumb-modern .breadcrumb-sep {
  color: var(--bg-border);
}

/* ============================================
   EMPTY STATE MELHORADO
   ============================================ */
.empty-state-modern {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-modern .empty-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  opacity: 0.3;
}

.empty-state-modern .empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.5rem;
}

.empty-state-modern .empty-desc {
  font-size: 1rem;
  color: var(--text-3);
  margin-bottom: 2rem;
}

/* ============================================
   NOTIFICATION IMPROVEMENTS
   ============================================ */
.notif-dropdown-wide {
  width: 400px;
}

.notif-item-modern {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--bg-border-sub);
  transition: all 0.2s;
}

.notif-item-modern:hover {
  background: var(--bg-dark);
}

.notif-item-modern.unread {
  background: rgba(11,110,140,0.05);
  border-left: 3px solid var(--neon-cyan);
}

/* ============================================
   SEARCH IMPROVEMENTS
   ============================================ */
.search-advanced {
  position: relative;
}

.search-advanced .search-input {
  width: 100%;
  padding: 0.625rem 0.875rem 0.625rem 2.5rem;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.search-advanced .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-3);
  pointer-events: none;
}

/* ============================================
   FILTER CHIPS
   ============================================ */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-dark);
  border: 1px solid var(--bg-border);
  border-radius: 9999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover {
  background: var(--bg-hover);
  border-color: var(--neon-cyan);
}

.filter-chip.active {
  background: var(--neon-cyan);
  color: #fff;
  border-color: var(--neon-cyan);
}

.filter-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: currentColor;
  opacity: 0.6;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-chip-remove:hover {
  opacity: 1;
}

/* ============================================
   COMMAND PALETTE MELHORIAS
   ============================================ */
.command-palette-modern {
  max-width: 600px;
  margin: 10vh auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.command-palette-modern .command-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  font-size: 1rem;
  background: transparent;
  color: var(--text-1);
}

.command-palette-modern .command-input:focus {
  outline: none;
}

.command-palette-modern .command-results {
  max-height: 400px;
  overflow-y: auto;
  border-top: 1px solid var(--bg-border-sub);
}

.command-palette-modern .command-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.command-palette-modern .command-result-item:hover,
.command-palette-modern .command-result-item.active {
  background: var(--bg-dark);
  color: var(--neon-cyan);
}

/* ============================================
   TOUR/WALKTHROUGH
   ============================================ */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9998;
  pointer-events: none;
}

.tour-tooltip {
  position: relative;
  z-index: 9999;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  max-width: 400px;
  pointer-events: auto;
}

.tour-tooltip .tour-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.5rem;
}

.tour-tooltip .tour-desc {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: 1rem;
}

.tour-tooltip .tour-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.tour-tooltip .tour-step {
  font-size: 0.75rem;
  color: var(--text-4);
  margin-top: 0.75rem;
}

/* ============================================
   STATUS INDICATORS
   ============================================ */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.success { background: var(--neon-green); }
.status-dot.error { background: var(--neon-red); }
.status-dot.warning { background: var(--neon-yellow); }
.status-dot.info { background: var(--neon-cyan); }
.status-dot.pending { background: var(--neon-purple); }

.status-dot.pulse {
  animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ============================================
   CODE BLOCKS
   ============================================ */
.code-block {
  background: var(--bg-dark);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  overflow-x: auto;
  color: var(--text-1);
}

.code-inline {
  background: var(--bg-dark);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8em;
  color: var(--neon-cyan);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .hide-mobile {
    display: none !important;
  }
  
  .full-mobile {
    width: 100% !important;
  }

  .stack-mobile {
    flex-direction: column !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ============================================
   TABLE (corrigido para compatibilidade)
   ============================================ */
.table {
  border-collapse: collapse;
  width: 100%;
}
.table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-4);
  border-bottom: 2px solid var(--bg-border-sub);
}
.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bg-border-sub);
  vertical-align: middle;
  color: var(--text-2);
}
.table tr:hover td {
  background: var(--bg-hover);
}
.table th:first-child,
.table td:first-child {
  padding-left: 1.5rem;
}
.table th:last-child,
.table td:last-child {
  padding-right: 1.5rem;
}

/* Tabelas Responsivas Globais */
@media (max-width: 1024px) {
  .data-table, .cred-table, .tbl, .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Listas com scroll vinculado à altura da viewport ────── */
.scroll-vh { max-height: calc(100vh - 200px); overflow-y: auto; }

