/* ============================================================
   SISTEMA DE EMPENHOS · PREFEITURA DE INAJÁ
   CSS do Dashboard Redesenhado (Home) — Versão Premium 2026
   Suporte nativo a todos os temas do sistema
   ============================================================ */

/* ── Animação de entrada dos elementos ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.dashboard-area {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 10px 52px;
  animation: fadeIn 0.4s ease;
}

/* ===== Greeting Area ===== */
.dashboard-head-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  animation: fadeSlideUp 0.5s ease both;
}

.dashboard-greeting-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1.15;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Fallback para temas dark */
[data-theme="dark"] .dashboard-greeting-title,
[data-theme="cosmos"] .dashboard-greeting-title,
[data-theme="vulcano"] .dashboard-greeting-title,
[data-theme="ametista"] .dashboard-greeting-title,
[data-theme="safira"] .dashboard-greeting-title,
[data-theme="esmeralda"] .dashboard-greeting-title,
[data-theme="crepusculo"] .dashboard-greeting-title,
[data-theme="cacau"] .dashboard-greeting-title,
[data-theme="vintage"] .dashboard-greeting-title {
  background: linear-gradient(135deg, var(--text) 0%, var(--text-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard-greeting-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 5px;
  font-weight: 400;
}

.dashboard-greeting-subtitle strong {
  color: var(--text-2);
  font-weight: 600;
}

/* ===== Hero Grid ===== */
.dash-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  animation: fadeSlideUp 0.5s 0.08s ease both;
}

/* ===== Hero Welcome Card ===== */
.hero-welcome-card {
  position: relative;
  background: linear-gradient(135deg, rgba(20, 20, 35, 0.7) 0%, rgba(10, 10, 15, 0.8) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.hero-welcome-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.15);
}

.hero-welcome-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 2;
}

.hero-welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  width: fit-content;
  text-transform: uppercase;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #818cf8;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(129, 140, 248, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(129, 140, 248, 0);
  }
}

.hero-welcome-card h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.hero-welcome-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.6;
}

.hero-quick-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}

.quick-stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-lbl {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-welcome-visual {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.emblem-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-emblem-logo {
  width: 80px;
  height: auto;
  z-index: 3;
  filter: drop-shadow(0 0 12px rgba(129, 140, 248, 0.4));
  transition: transform 0.5s ease;
}

.hero-welcome-card:hover .hero-emblem-logo {
  transform: scale(1.08) rotate(5deg);
}

/* Glowing rings in background of emblem */
.glow-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.15);
  animation: rotateEmblem 20s linear infinite;
}

.ring-1 {
  width: 140px;
  height: 140px;
  border-style: dashed;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
}

.ring-2 {
  width: 110px;
  height: 110px;
  border-color: rgba(192, 132, 252, 0.2);
  animation-duration: 15s;
  animation-direction: reverse;
}

.ring-3 {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
  filter: blur(8px);
}

@keyframes rotateEmblem {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 576px) {
  .hero-welcome-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
  
  .hero-welcome-visual {
    width: 100%;
    height: 120px;
    margin-top: 12px;
  }
}


/* ===== Calendar Card ===== */
/* ===== Calendar Card ===== */
.cal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cal-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.cal-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-3);
  font-weight: 800;
}

.cal-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-2);
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.cal-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px; /* Softer layout, grid cells are separated cleanly */
  background: transparent;
  border: none;
}

.cal-dow {
  padding: 8px 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  font-weight: 800;
  text-align: center;
  border-bottom: 2px solid var(--border);
  margin-bottom: 4px;
}

.cal-cell {
  background: var(--surface-2);
  padding: 8px;
  height: 80px; /* Fixed height for perfectly standardized day cells */
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.cal-cell:hover {
  background: var(--surface-3, rgba(120, 120, 120, 0.08));
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.cal-cell.muted {
  background: transparent;
  border-color: transparent;
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

.cal-cell .num {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--text-2);
  font-weight: 700;
  margin-bottom: 4px;
}

.cal-cell.today {
  background: rgba(212, 175, 55, 0.06) !important;
  border-color: #d4af37 !important;
  box-shadow: inset 0 0 0 1px #d4af37, 0 2px 10px rgba(212, 175, 55, 0.15) !important;
}

.cal-cell.today .num {
  background: #d4af37 !important;
  color: #1a1a1a !important; /* High contrast dark text for gold background */
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: 10px;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4) !important;
}

/* Weekend columns styled in soft, premium green */
.cal-cell.weekend:not(.muted):not(.today):not(.selected) {
  background: rgba(16, 185, 129, 0.05) !important;
  border-color: rgba(16, 185, 129, 0.12) !important;
}

.cal-cell.weekend:not(.muted):hover {
  background: rgba(16, 185, 129, 0.1) !important;
}

.cal-dow.weekend {
  color: #10b981 !important;
  border-bottom-color: #10b981 !important;
}

.cal-cell.selected {
  border-color: var(--blue) !important;
  background: rgba(37, 99, 235, 0.08) !important;
  box-shadow: 0 0 0 1.5px var(--blue);
}

[data-theme="dark"] .cal-cell.selected,
[data-theme="cosmos"] .cal-cell.selected {
  background: rgba(111, 165, 245, 0.12) !important;
}

.cal-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  margin-top: auto;
}

.cal-evt {
  font-size: 9px;
  color: var(--text-2);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
  border-left: 3.5px solid var(--blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cal-evt.amber {
  border-left-color: var(--orange);
  background: rgba(245, 158, 11, 0.08);
}

.cal-evt.red {
  border-left-color: var(--red);
  background: rgba(239, 68, 68, 0.08);
}

.cal-evt.green {
  border-left-color: var(--green);
  background: rgba(16, 185, 129, 0.08);
}

.cal-more {
  font-size: 9px;
  color: var(--text-3);
  padding: 0 4px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  align-self: flex-end;
}

/* ===== Day Detail Popover ===== */
.day-detail {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: none;
  animation: fadeSlideUp 0.2s ease;
}

.day-detail.active {
  display: block;
}

.day-detail .head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.day-detail .h-num {
  font-family: monospace;
  font-size: 13.5px;
  color: var(--text-3);
  font-weight: 700;
  background: var(--surface);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.day-detail .h-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.day-detail ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-detail li {
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.day-detail li .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

.day-detail li.amber .dot { background: var(--orange); }
.day-detail li.red .dot { background: var(--red); }
.day-detail li.green .dot { background: var(--green); }

.day-detail .empty {
  font-size: 12.5px;
  color: var(--text-3);
  font-style: italic;
  background: transparent;
  border: none;
  padding: 4px 0;
}

/* ===== Today Side Panel ===== */
.today-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease;
}

.today-panel:hover {
  box-shadow: var(--shadow);
}

.today-head {
  display: flex;
  flex-direction: column;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.today-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-3);
  font-weight: 800;
  margin-bottom: 4px;
}

.today-date {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.15;
}

.today-day {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 3px;
  font-family: monospace;
}

.today-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.today-list h4 {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  margin-top: 8px;
  margin-bottom: 2px;
  font-weight: 800;
}

.today-list h4:first-of-type {
  margin-top: 0;
}

.task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: all 150ms ease;
}

.task:hover {
  border-color: var(--border-hover);
  background: var(--surface);
}

.task-check {
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--text-3);
  border-radius: 5px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: all 120ms;
}

.task-check:hover {
  border-color: var(--text-2);
}

.task.done .task-check {
  background: var(--green);
  border-color: var(--green);
}

.task.done .task-check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border-right: 1.8px solid white;
  border-bottom: 1.8px solid white;
  transform: rotate(45deg);
}

.task-body {
  flex: 1;
  line-height: 1.4;
  min-width: 0;
}

.task.done .task-text {
  color: var(--text-3);
  text-decoration: line-through;
  opacity: 0.6;
}

.task-text {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

.task-meta {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-family: monospace;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  font-weight: 600;
}

.tag.amber { background: var(--orange-bg); color: var(--text); border-color: rgba(217, 124, 58, 0.15); }
.tag.green { background: var(--green-bg); color: var(--text); border-color: rgba(58, 170, 110, 0.15); }
.tag.red   { background: var(--red-bg); color: var(--text); border-color: rgba(199, 74, 74, 0.15); }
.tag.blue  { background: var(--blue-light); color: var(--text); border-color: rgba(79, 128, 200, 0.15); }

.today-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.today-footer a {
  font-size: 13px;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  transition: gap 0.2s, opacity 0.2s;
  text-decoration: none;
}

.today-footer a i {
  font-size: 14px;
  transition: transform 120ms;
}

.today-footer a:hover {
  gap: 10px;
  opacity: 0.85;
}

.today-footer a:hover i {
  transform: translateX(3px);
}

/* ===== Grid Section Headers ===== */
.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  margin-bottom: 2px;
  animation: fadeSlideUp 0.5s 0.12s ease both;
}

.dash-section-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-3);
  font-weight: 800;
}

.dash-section-link {
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.dash-section-link:hover {
  color: var(--blue);
}

/* ===== Module Grid ===== */
.dash-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  animation: fadeSlideUp 0.5s 0.16s ease both;
}

/* ── Module Card – base ── */
.dash-module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 136px;
  box-shadow: var(--shadow-sm);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient accent on hover */
.dash-module-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.dash-module-card:hover::before {
  opacity: 1;
}

.dash-module-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.dash-module-card:active {
  transform: translateY(-1px);
}

/* Featured card */
.dash-module-card.featured {
  border-color: rgba(37,99,235,0.25);
  background: linear-gradient(145deg, var(--surface), var(--surface));
}

.dash-module-card.featured::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.dash-module-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Icon container – colorful gradients */
.dash-module-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 20px;
  transition: background 0.3s, color 0.3s, transform 0.25s;
  border: 1px solid var(--border);
}

.dash-module-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.dash-module-card:hover .dash-module-icon {
  transform: scale(1.08) rotate(-3deg);
}

/* Featured icon */
.dash-module-card.featured .dash-module-icon {
  background: linear-gradient(135deg, rgba(37,99,235,0.16) 0%, rgba(99,102,241,0.12) 100%);
  color: var(--blue);
  border-color: rgba(37,99,235,0.22);
}

.dash-module-card h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.dash-module-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.5;
  flex: 1;
}

.dash-module-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.dash-module-stat {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Pills */
.dash-pill {
  font-size: 9.5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(37,99,235,0.15);
}

.dash-pill.amber  { background: var(--orange-bg); color: var(--orange); border-color: rgba(192,86,33,0.15); }
.dash-pill.neutral { background: var(--surface-2); color: var(--text-3); border-color: var(--border); }
.dash-pill.red     { background: var(--red-bg);    color: var(--red);    border-color: rgba(155,44,44,0.15); }
.dash-pill.green   { background: var(--green-bg);  color: var(--green);  border-color: rgba(39,103,73,0.15); }

/* ===== Bottom Row ===== */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  animation: fadeSlideUp 0.5s 0.22s ease both;
}

.dash-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.25s ease;
}

.dash-panel:hover {
  box-shadow: var(--shadow);
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.dash-panel-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}

.dash-panel-link {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
}

.dash-panel-link:hover {
  color: var(--blue);
}

.dash-activity-list {
  display: flex;
  flex-direction: column;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

.dash-activity-list::-webkit-scrollbar {
  width: 5px;
}
.dash-activity-list::-webkit-scrollbar-track {
  background: transparent;
}
.dash-activity-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.dash-activity-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}

.dash-activity-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  align-items: center;
}

.dash-activity-row:first-of-type {
  border-top: none;
  padding-top: 4px;
}

.dash-activity-time {
  font-family: monospace;
  font-size: 10.5px;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.dash-activity-text {
  color: var(--text-2);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
}

.dash-activity-text strong {
  color: var(--text);
  font-weight: 700;
}

.dash-activity-actor {
  font-size: 11px;
  color: var(--text-3);
}

/* ===== Ações Rápidas ===== */
.dash-shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dash-shortcut {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 150ms ease;
  border: 1px solid transparent;
}

.dash-shortcut:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.dash-shortcut:active {
  transform: scale(0.98);
}

.dash-shortcut svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
  flex-shrink: 0;
}

.dash-shortcut-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 600;
}

.dash-shortcut:hover .dash-shortcut-text {
  color: var(--text);
}

.dash-shortcut-kbd {
  font-family: monospace;
  font-size: 10px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-3);
  background: var(--surface-2);
  font-weight: 700;
  box-shadow: 0 1px 0 var(--border);
}

/* ── Spotlight / Glow Card Effects ── */
[data-glow] {
  --radius: 16;
  --border: 1.5;
  --backdrop: rgba(128, 128, 128, 0.05);
  --backup-border: var(--backdrop);
  --size: 280;
  --outer: 1;
  --border-size: calc(var(--border, 2) * 1px);
  --spotlight-size: calc(var(--size, 150) * 1px);
  --hue: calc(var(--base, 210) + (var(--xp, 0) * var(--spread, 0)));
  
  position: relative;
  touch-action: none;
  border: var(--border-size) solid var(--backup-border) !important;
  
  background-image: radial-gradient(
    var(--spotlight-size) var(--spotlight-size) at
    calc(var(--x, 0) * 1px)
    calc(var(--y, 0) * 1px),
    hsl(var(--hue, 210) calc(var(--saturation, 100) * 1%) calc(var(--lightness, 70) * 1%) / var(--bg-spot-opacity, 0.08)), transparent
  ) !important;
  background-color: var(--backdrop, transparent) !important;
  background-size: calc(100% + (2 * var(--border-size))) calc(100% + (2 * var(--border-size))) !important;
  background-position: 50% 50% !important;
  background-attachment: fixed !important;
  border-radius: calc(var(--radius) * 1px) !important;
  overflow: hidden;
}

[data-glow]::before,
[data-glow]::after {
  pointer-events: none;
  content: "";
  position: absolute;
  inset: calc(var(--border-size) * -1);
  border: var(--border-size) solid transparent;
  border-radius: calc(var(--radius) * 1px);
  background-attachment: fixed;
  background-size: calc(100% + (2 * var(--border-size))) calc(100% + (2 * var(--border-size)));
  background-repeat: no-repeat;
  background-position: 50% 50%;
  mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
  mask-clip: padding-box, border-box;
  mask-composite: intersect;
  -webkit-mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
  -webkit-mask-clip: padding-box, border-box;
  -webkit-mask-composite: source-in, xor;
  -webkit-mask-composite: intersect;
  z-index: 2;
}

[data-glow]::before {
  background-image: radial-gradient(
    calc(var(--spotlight-size) * 0.75) calc(var(--spotlight-size) * 0.75) at
    calc(var(--x, 0) * 1px)
    calc(var(--y, 0) * 1px),
    hsl(var(--hue, 210) calc(var(--saturation, 100) * 1%) calc(var(--lightness, 50) * 1%) / var(--border-spot-opacity, 0.85)), transparent 100%
  );
  filter: brightness(1.8);
}

[data-glow]::after {
  background-image: radial-gradient(
    calc(var(--spotlight-size) * 0.5) calc(var(--spotlight-size) * 0.5) at
    calc(var(--x, 0) * 1px)
    calc(var(--y, 0) * 1px),
    hsl(0 100% 100% / var(--border-light-opacity, 0.6)), transparent 100%
  );
}

/* Inner glow container */
[data-glow] [data-glow] {
  position: absolute;
  inset: 0;
  will-change: filter;
  opacity: var(--outer, 1);
  border-radius: calc(var(--radius) * 1px);
  border-width: calc(var(--border-size) * 20);
  filter: blur(calc(var(--border-size) * 10));
  background: none;
  pointer-events: none;
  border: none !important;
  z-index: 1;
}

[data-glow] > [data-glow]::before {
  inset: -10px;
  border-width: 10px;
  background-image: radial-gradient(
    calc(var(--spotlight-size) * 0.75) calc(var(--spotlight-size) * 0.75) at
    calc(var(--x, 0) * 1px)
    calc(var(--y, 0) * 1px),
    hsl(var(--hue, 210) calc(var(--saturation, 100) * 1%) calc(var(--lightness, 50) * 1%) / var(--border-spot-opacity, 0.85)), transparent 100%
  );
}

/* Color definitions */
[data-glow-color="blue"] {
  --base: 220;
  --spread: 200;
}
[data-glow-color="purple"] {
  --base: 280;
  --spread: 300;
}
[data-glow-color="green"] {
  --base: 120;
  --spread: 200;
}
[data-glow-color="red"] {
  --base: 0;
  --spread: 200;
}
[data-glow-color="orange"] {
  --base: 30;
  --spread: 200;
}
[data-glow-color="yellow"] {
  --base: 50;
  --spread: 200;
}
[data-glow-color="cyan"] {
  --base: 180;
  --spread: 200;
}
[data-glow-color="grey"] {
  --base: 200;
  --saturation: 0;
  --spread: 200;
}

/* Default variables if not set */
:root {
  --border-spot-opacity: 0.85;
  --border-light-opacity: 0.6;
  --bg-spot-opacity: 0.12;
  --saturation: 90;
  --lightness: 65;
}

/* ===== KPI Strip ===== */
.dash-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  animation: fadeSlideUp 0.5s 0.09s ease both;
}

@media (max-width: 900px) {
  .dash-kpi-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .dash-kpi-strip { grid-template-columns: 1fr; }
}

.dash-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  cursor: default;
}

.dash-kpi-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.dash-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-kpi-val {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.1;
}

.dash-kpi-lbl {
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 3px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Quick Actions Row ===== */
.dash-qa-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: fadeSlideUp 0.5s 0.1s ease both;
}

.dash-qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.dash-qa-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-hover);
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.dash-qa-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.dash-qa-btn svg {
  color: var(--blue);
  flex-shrink: 0;
}

.dash-qa-btn kbd {
  font-family: monospace;
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-3);
  background: var(--surface-2);
  margin-left: 2px;
  box-shadow: 0 1px 0 var(--border);
  font-weight: 700;
}

/* ===== Calendar + Today Panel 2-Column ===== */
.dash-grid-cal-today {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
  animation: fadeSlideUp 0.5s 0.14s ease both;
}

@media (max-width: 820px) {
  .dash-grid-cal-today { grid-template-columns: 1fr; }
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cal-nav-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text-2);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  padding: 0;
}

.cal-nav-btn:hover {
  background: var(--surface-3, rgba(120,120,120,0.1));
  border-color: var(--border-hover);
  color: var(--text);
}

.cal-nav-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  min-width: 120px;
  text-align: center;
}

/* ── Tooltip flutuante dos módulos ── */
.dash-card-tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  max-width: 240px;
  line-height: 1.55;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.08);
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: normal;
  word-break: break-word;
  will-change: opacity, transform;
}
.dash-card-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   MOBILE — Dashboard responsive fixes
   ============================================================ */

@media (max-width: 600px) {
  .dashboard-area {
    gap: 18px;
    padding: 0 10px 80px;
  }

  .dashboard-head-wrap {
    margin-top: 10px;
    gap: 14px;
  }

  .dashboard-greeting-title {
    font-size: 24px;
    letter-spacing: -0.5px;
  }

  .dashboard-greeting-subtitle {
    font-size: 13px;
    margin-top: 3px;
  }

  .hero-welcome-card {
    padding: 20px;
  }

  .hero-welcome-card h2 {
    font-size: 18px;
  }

  .hero-welcome-card p {
    font-size: 13px;
  }

  .hero-quick-stats {
    gap: 12px;
    flex-wrap: wrap;
  }

  .stat-num {
    font-size: 18px;
  }

  .stat-lbl {
    font-size: 10px;
  }

  .dash-qa-row {
    gap: 8px;
  }

  .dash-qa-btn {
    font-size: 12px;
    padding: 8px 12px;
  }

  .dash-qa-btn kbd {
    display: none;
  }

  .dash-kpi-val {
    font-size: 20px;
  }
}

@media (max-width: 400px) {
  .dashboard-greeting-title {
    font-size: 20px;
  }

  .hero-welcome-card h2 {
    font-size: 16px;
  }

  .hero-welcome-visual {
    display: none;
  }
}
