/* ========================================================================
   FINVIX — Design System Premium
   ======================================================================== */

:root {
  --bg-base-light: #F6F8FC;
  --bg-base-dark:  #06091a;
  --easing: cubic-bezier(.16, 1, .3, 1);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-feature-settings: "cv11", "ss01", "ss03";
  letter-spacing: -0.01em;
  background-color: var(--bg-base-light);
}

.dark body { background-color: var(--bg-base-dark); }

h1, h2, h3, h4 { letter-spacing: -0.02em; }

/* ========================================================================
   ANIMAÇÕES
   ======================================================================== */

@keyframes slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes slide-down {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@keyframes scale-in {
  from { transform: scale(.95); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,.4); }
  50%      { box-shadow: 0 0 0 12px rgba(99,102,241,0); }
}
@keyframes count-up {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

.animate-slide-up   { animation: slide-up    .4s var(--easing) both; }
.animate-slide-down { animation: slide-down  .25s var(--easing) both; }
.animate-scale-in   { animation: scale-in    .25s var(--easing) both; }
.animate-fade-in    { animation: fade-in     .3s var(--easing) both; }
.animate-count      { animation: count-up    .5s var(--easing) both; }
.animate-pulse-glow { animation: pulse-glow  2s infinite; }

/* ========================================================================
   SCROLLBAR
   ======================================================================== */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgb(148 163 184 / .25);
  border-radius: 999px;
  transition: background .2s;
}
::-webkit-scrollbar-thumb:hover { background: rgb(148 163 184 / .45); }

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: rgb(148 163 184 / .25) transparent; }

/* ========================================================================
   GLASS CARD
   ======================================================================== */

.glass-card {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(226,232,240,.7);
  box-shadow:
    0 1px 2px rgba(15,23,42,.04),
    0 4px 16px -4px rgba(15,23,42,.06);
  transition: all .35s var(--easing);
}
.dark .glass-card {
  background: rgba(17,24,39,.55);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 0 0 1px rgba(0,0,0,.2),
    0 8px 32px -8px rgba(0,0,0,.4);
}

/* ========================================================================
   SIDEBAR
   ======================================================================== */

.sidebar {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid rgba(226,232,240,.7);
}
.dark .sidebar {
  background: rgba(10,15,30,.85);
  border-right: 1px solid rgba(255,255,255,.05);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .625rem .75rem;
  border-radius: .625rem;
  font-size: .875rem;
  font-weight: 500;
  color: rgb(71 85 105);
  transition: all .2s var(--easing);
  position: relative;
}
.dark .nav-item { color: rgb(148 163 184); }

.nav-item:hover {
  background: rgba(99,102,241,.06);
  color: rgb(79 70 229);
  transform: translateX(2px);
}
.dark .nav-item:hover {
  background: rgba(99,102,241,.1);
  color: rgb(165 180 252);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.08));
  color: rgb(79 70 229);
  font-weight: 600;
}
.dark .nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(139,92,246,.12));
  color: rgb(165 180 252);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, rgb(99 102 241), rgb(139 92 246));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(99,102,241,.5);
}

/* ========================================================================
   METRIC CARDS
   ======================================================================== */

.metric-card {
  padding: .875rem .875rem 1rem;
  border-radius: .875rem;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226,232,240,.7);
  transition: all .35s var(--easing);
  cursor: default;
  position: relative;
  overflow: hidden;
}
@media (min-width: 640px) {
  .metric-card { padding: 1.125rem 1.25rem 1.25rem; border-radius: 1rem; }
}
.dark .metric-card {
  background: rgba(17,24,39,.5);
  border: 1px solid rgba(255,255,255,.05);
}

.metric-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(99,102,241,.04) 100%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.metric-card:hover::before { opacity: 1; }

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 24px 48px -20px rgba(15,23,42,.12),
    0 8px 16px -8px rgba(15,23,42,.06);
  border-color: rgba(99,102,241,.2);
}
.dark .metric-card:hover {
  box-shadow:
    0 24px 48px -20px rgba(0,0,0,.6),
    0 0 0 1px rgba(99,102,241,.2);
}

.metric-icon {
  width: 2rem;
  height: 2rem;
  border-radius: .625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .35s var(--easing);
}
@media (min-width: 640px) {
  .metric-icon { width: 2.5rem; height: 2.5rem; border-radius: .75rem; }
}
.metric-card:hover .metric-icon { transform: scale(1.08) rotate(-4deg); }

.metric-value {
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.15;
  margin-top: .25rem;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}
@media (min-width: 400px) {
  .metric-value { font-size: 1.25rem; }
}
@media (min-width: 640px) {
  .metric-value { font-size: 1.625rem; margin-top: .375rem; }
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .125rem .5rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.metric-trend.up   { background: rgba(16,185,129,.12); color: rgb(5 150 105); }
.metric-trend.down { background: rgba(239,68,68,.12);  color: rgb(220 38 38); }
.metric-trend.flat { background: rgba(148,163,184,.15); color: rgb(100 116 139); }
.dark .metric-trend.up   { color: rgb(52 211 153); }
.dark .metric-trend.down { color: rgb(248 113 113); }

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .625rem 1rem;
  border-radius: .75rem;
  font-size: .875rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, rgb(99 102 241), rgb(79 70 229));
  box-shadow:
    0 0 0 1px rgba(99,102,241,.3),
    0 4px 14px -2px rgba(99,102,241,.4);
  transition: all .25s var(--easing);
  letter-spacing: -.01em;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(99,102,241,.5),
    0 8px 24px -4px rgba(99,102,241,.5);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  padding: .625rem 1rem;
  border-radius: .75rem;
  font-size: .875rem;
  font-weight: 600;
  color: rgb(51 65 85);
  background: white;
  border: 1px solid rgb(226 232 240);
  transition: all .25s var(--easing);
  letter-spacing: -.01em;
}
.dark .btn-secondary {
  color: rgb(226 232 240);
  background: rgba(30,41,59,.6);
  border-color: rgba(255,255,255,.08);
}
.btn-secondary:hover:not(:disabled) {
  background: rgb(248 250 252);
  border-color: rgb(203 213 225);
  transform: translateY(-1px);
}
.dark .btn-secondary:hover:not(:disabled) {
  background: rgba(51,65,85,.6);
  border-color: rgba(255,255,255,.12);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: .625rem;
  font-size: .875rem;
  font-weight: 500;
  color: rgb(71 85 105);
  transition: all .2s var(--easing);
}
.dark .btn-ghost { color: rgb(148 163 184); }
.btn-ghost:hover { background: rgb(241 245 249); color: rgb(15 23 42); }
.dark .btn-ghost:hover { background: rgba(51,65,85,.4); color: rgb(241 245 249); }

.btn-ghost-danger {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: .625rem;
  font-size: .875rem;
  font-weight: 500;
  color: rgb(220 38 38);
  transition: all .2s var(--easing);
}
.btn-ghost-danger:hover { background: rgba(239,68,68,.1); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .625rem;
  color: rgb(100 116 139);
  transition: all .2s var(--easing);
}
.dark .icon-btn { color: rgb(148 163 184); }
.icon-btn:hover {
  background: rgb(241 245 249);
  color: rgb(15 23 42);
  transform: scale(1.05);
}
.dark .icon-btn:hover {
  background: rgba(51,65,85,.5);
  color: rgb(241 245 249);
}

/* ========================================================================
   FILTER CHIPS
   ======================================================================== */

.filter-chip {
  padding: .5rem .875rem;
  border-radius: .625rem;
  font-size: .8125rem;
  font-weight: 500;
  background: rgb(241 245 249);
  color: rgb(71 85 105);
  transition: all .2s var(--easing);
  border: 1px solid transparent;
}
.dark .filter-chip {
  background: rgba(30,41,59,.5);
  color: rgb(148 163 184);
}
.filter-chip:hover {
  background: rgb(226 232 240);
  transform: translateY(-1px);
}
.dark .filter-chip:hover { background: rgba(51,65,85,.6); }

.filter-chip.filter-active {
  background: linear-gradient(135deg, rgb(99 102 241), rgb(79 70 229));
  color: white;
  box-shadow:
    0 0 0 1px rgba(99,102,241,.3),
    0 4px 14px -2px rgba(99,102,241,.4);
}
.filter-chip.filter-active:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(99,102,241,.5),
    0 8px 24px -4px rgba(99,102,241,.5);
}

/* ========================================================================
   TABS (LOGIN)
   ======================================================================== */

.tab-active {
  background: white;
  color: rgb(15 23 42);
  box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
}
.dark .tab-active {
  background: rgba(30,41,59,.8);
  color: rgb(241 245 249);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}

/* ========================================================================
   INPUTS
   ======================================================================== */

.input-premium {
  width: 100%;
  padding: .625rem .875rem;
  font-size: .9375rem;
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: .625rem;
  color: rgb(15 23 42);
  transition: all .2s var(--easing);
  font-family: inherit;
}
.dark .input-premium {
  background: rgba(15,23,42,.6);
  border-color: rgba(255,255,255,.08);
  color: rgb(241 245 249);
}
.input-premium:focus {
  outline: none;
  border-color: rgb(99 102 241);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.input-premium::placeholder { color: rgb(148 163 184); }
.dark .input-premium::placeholder { color: rgb(100 116 139); }

.form-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgb(100 116 139);
  margin-bottom: .375rem;
}
.dark .form-label { color: rgb(148 163 184); }

/* Date picker dark */
.dark input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}

/* Remove number arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* ========================================================================
   RADIO CARD (status)
   ======================================================================== */

.radio-card { display: block; cursor: pointer; }
.radio-card-inner {
  padding: .625rem;
  text-align: center;
  border: 1.5px solid rgb(226 232 240);
  border-radius: .625rem;
  font-size: .875rem;
  font-weight: 500;
  color: rgb(71 85 105);
  transition: all .2s var(--easing);
}
.dark .radio-card-inner {
  border-color: rgba(255,255,255,.08);
  color: rgb(148 163 184);
}
.radio-card:hover .radio-card-inner {
  border-color: rgb(99 102 241);
  background: rgba(99,102,241,.05);
}
.radio-card input:checked + .radio-card-inner {
  border-color: rgb(99 102 241);
  background: rgba(99,102,241,.12);
  color: rgb(79 70 229);
  font-weight: 600;
}
.dark .radio-card input:checked + .radio-card-inner {
  color: rgb(165 180 252);
}
.radio-card input:checked + .radio-card-inner.\!data-success {
  border-color: rgb(16 185 129);
  background: rgba(16,185,129,.12);
  color: rgb(5 150 105);
}
.dark .radio-card input:checked + .radio-card-inner.\!data-success {
  color: rgb(52 211 153);
}

/* ========================================================================
   META ICON PICKER
   ======================================================================== */

.meta-icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .625rem;
  font-size: 1.25rem;
  border: 1.5px solid rgb(226 232 240);
  background: white;
  transition: all .2s var(--easing);
}
.dark .meta-icon-btn {
  background: rgba(15,23,42,.5);
  border-color: rgba(255,255,255,.08);
}
.meta-icon-btn:hover {
  transform: scale(1.1);
  border-color: rgb(99 102 241);
}
.meta-icon-btn.selected {
  border-color: rgb(99 102 241);
  background: rgba(99,102,241,.12);
  transform: scale(1.05);
}

/* ========================================================================
   MODAL
   ======================================================================== */

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6,9,26,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fade-in .2s var(--easing);
}
@media (min-width: 640px) {
  .modal-wrap { align-items: center; padding: 1rem; }
}

.modal-card {
  width: 100%;
  max-width: 32rem;
  max-height: 92vh;
  overflow-y: auto;
  background: white;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow:
    0 -24px 48px -12px rgba(0,0,0,.25),
    0 0 0 1px rgba(255,255,255,.05);
  animation: slide-up .35s var(--easing);
}
.dark .modal-card {
  background: rgb(17 24 39);
  box-shadow:
    0 -24px 48px -12px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.06);
}
@media (min-width: 640px) {
  .modal-card { border-radius: 1.25rem; animation: scale-in .25s var(--easing); }
}

.modal-header {
  position: sticky;
  top: 0;
  padding: 1.25rem;
  background: inherit;
  border-bottom: 1px solid rgb(241 245 249);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}
.dark .modal-header { border-bottom-color: rgba(255,255,255,.05); }

/* ========================================================================
   CONTA ITEM (lista)
   ======================================================================== */

.conta-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem .75rem;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226,232,240,.7);
  border-radius: .875rem;
  transition: all .25s var(--easing);
  animation: slide-up .3s var(--easing) both;
}
@media (min-width: 640px) {
  .conta-item { gap: .75rem; padding: .875rem 1rem; }
}
.dark .conta-item {
  background: rgba(17,24,39,.55);
  border-color: rgba(255,255,255,.05);
}
.conta-item:hover {
  transform: translateY(-1px);
  border-color: rgba(99,102,241,.3);
  box-shadow: 0 8px 24px -8px rgba(15,23,42,.1);
}
.dark .conta-item:hover {
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.4);
}

.conta-status-btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s var(--easing);
  position: relative;
}
.conta-status-btn:hover { transform: scale(1.1); }

.conta-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s var(--easing);
}
.conta-item:hover .conta-icon { transform: scale(1.05); }

/* Toggle Pago/Pendente dedicado à direita */
.pay-toggle {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgb(226 232 240);
  background: rgba(255,255,255,.5);
  color: rgb(148 163 184);
  transition: all .2s var(--easing);
  position: relative;
}
.dark .pay-toggle {
  border-color: rgba(255,255,255,.08);
  background: rgba(15,23,42,.4);
  color: rgb(100 116 139);
}
.pay-toggle:hover {
  border-color: rgb(16 185 129);
  background: rgba(16,185,129,.1);
  color: rgb(5 150 105);
  transform: scale(1.05);
}
.pay-toggle:active { transform: scale(.95); }
.pay-toggle.paid {
  border-color: rgb(16 185 129);
  background: linear-gradient(135deg, rgb(16 185 129), rgb(5 150 105));
  color: white;
  box-shadow:
    0 0 0 1px rgba(16,185,129,.3),
    0 4px 14px -2px rgba(16,185,129,.4);
}
.pay-toggle.paid:hover {
  background: linear-gradient(135deg, rgb(248 113 113), rgb(220 38 38));
  border-color: rgb(220 38 38);
  box-shadow:
    0 0 0 1px rgba(239,68,68,.3),
    0 4px 14px -2px rgba(239,68,68,.4);
}

/* ========================================================================
   CALENDÁRIO
   ======================================================================== */

.cal-day {
  aspect-ratio: 1;
  padding: .5rem;
  border-radius: .625rem;
  border: 1px solid transparent;
  background: rgba(241,245,249,.4);
  transition: all .2s var(--easing);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  min-height: 56px;
}
.dark .cal-day {
  background: rgba(15,23,42,.3);
}
.cal-day:hover {
  background: rgba(99,102,241,.08);
  border-color: rgba(99,102,241,.2);
}
.cal-day-num {
  font-size: .75rem;
  font-weight: 600;
  color: rgb(71 85 105);
}
.dark .cal-day-num { color: rgb(203 213 225); }
.cal-day.other-month { opacity: .35; }
.cal-day.today {
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.1));
  border-color: rgba(99,102,241,.3);
}
.cal-day.today .cal-day-num { color: rgb(79 70 229); font-weight: 800; }
.dark .cal-day.today .cal-day-num { color: rgb(165 180 252); }
.cal-day.selected {
  background: linear-gradient(135deg, rgb(99 102 241), rgb(79 70 229));
  border-color: rgb(79 70 229);
}
.cal-day.selected .cal-day-num,
.cal-day.selected .cal-day-num { color: white; }
.cal-day-dots {
  margin-top: auto;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.cal-day-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

/* ========================================================================
   META CARD
   ======================================================================== */

.meta-card {
  padding: 1.25rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226,232,240,.7);
  transition: all .35s var(--easing);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.dark .meta-card {
  background: rgba(17,24,39,.55);
  border-color: rgba(255,255,255,.05);
}
.meta-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -20px rgba(15,23,42,.12);
  border-color: rgba(99,102,241,.2);
}

.meta-progress-track {
  height: .375rem;
  background: rgba(148,163,184,.2);
  border-radius: 999px;
  overflow: hidden;
}
.meta-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgb(99 102 241), rgb(139 92 246));
  border-radius: 999px;
  transition: width 1s var(--easing);
  position: relative;
}
.meta-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: shimmer 2.5s infinite linear;
  background-size: 1000px 100%;
}

/* ========================================================================
   INSIGHT CARDS
   ======================================================================== */

.insight-card {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  border-radius: .875rem;
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226,232,240,.7);
  transition: all .3s var(--easing);
  animation: slide-up .4s var(--easing) both;
}
.dark .insight-card {
  background: rgba(17,24,39,.5);
  border-color: rgba(255,255,255,.05);
}
.insight-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,.2);
}
.insight-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ========================================================================
   TOAST
   ======================================================================== */

.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1rem;
  background: rgb(15 23 42);
  color: white;
  border-radius: .75rem;
  font-size: .8125rem;
  font-weight: 500;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08),
    0 16px 40px -8px rgba(0,0,0,.4);
  animation: slide-up .25s var(--easing);
  max-width: 90vw;
}
.toast.success { background: linear-gradient(135deg, rgb(16 185 129), rgb(5 150 105)); }
.toast.error   { background: linear-gradient(135deg, rgb(239 68 68), rgb(220 38 38)); }
.toast.exit    { animation: scale-in .25s var(--easing) reverse; }

/* ========================================================================
   LOADER
   ======================================================================== */

#loader.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--easing);
}

/* ========================================================================
   SKELETON
   ======================================================================== */

.skeleton {
  background: linear-gradient(90deg,
    rgba(148,163,184,.1) 0%,
    rgba(148,163,184,.2) 50%,
    rgba(148,163,184,.1) 100%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: .5rem;
}

/* ========================================================================
   CATEGORY LEGEND
   ======================================================================== */

.cat-legend-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
}
.cat-legend-dot {
  width: .625rem;
  height: .625rem;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ========================================================================
   UTIL
   ======================================================================== */

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

.tabular { font-variant-numeric: tabular-nums; }

/* Focus rings consistentes */
button:focus-visible, a:focus-visible {
  outline: 2px solid rgb(99 102 241);
  outline-offset: 2px;
}
