/* MicroFin — custom styling layer on top of Tailwind CDN */

:root {
  --brand-from: #4f46e5;   /* indigo-600 */
  --brand-to:   #7c3aed;   /* violet-600 */
  --brand-accent: #db2777; /* pink-600 */
}

* { font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif; }

body {
  background: #f4f5fb;
}

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7c9e6; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #a8abd6; }

/* Brand gradient utilities */
.brand-gradient {
  background: linear-gradient(135deg, var(--brand-from) 0%, var(--brand-to) 60%, var(--brand-accent) 120%);
}
.brand-gradient-text {
  background: linear-gradient(135deg, var(--brand-from), var(--brand-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 55%, #4c1d95 100%);
}
.sidebar a.nav-link {
  color: #c7c9f4;
  transition: all .15s ease;
  position: relative;
}
.sidebar a.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.sidebar a.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.14);
}
.sidebar a.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f472b6, #a78bfa);
}

/* Cards */
.card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eceefb;
  box-shadow: 0 1px 2px rgba(23,23,60,0.04), 0 8px 24px -12px rgba(76,29,149,0.10);
}

.stat-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #eceefb;
  box-shadow: 0 1px 2px rgba(23,23,60,0.04), 0 12px 28px -16px rgba(76,29,149,0.18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px -16px rgba(76,29,149,0.28);
}

.icon-badge {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
  color: #fff;
  font-weight: 600;
  transition: filter .15s ease, transform .15s ease;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  border: 1.5px solid #e0e2f5;
  color: #4338ca;
  background: #fff;
  font-weight: 600;
  transition: all .15s ease;
}
.btn-outline:hover { background: #f5f4ff; border-color: #c7c9f4; }

/* Table */
.data-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b6f9a;
  background: #f7f7fc;
}
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover { background: #faf9ff; }
.data-table tbody td, .data-table thead th { border-bottom: 1px solid #f0f0fa; }

/* Inputs */
.form-input, .form-select, .form-textarea {
  border: 1.5px solid #e4e5f6;
  border-radius: 10px;
  background: #fbfbff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139,92,246,0.12);
  background: #fff;
}

/* Login page background */
.auth-bg {
  background: radial-gradient(1200px 600px at 10% -10%, #6d28d9 0%, transparent 60%),
              radial-gradient(1000px 500px at 110% 10%, #db2777 0%, transparent 55%),
              linear-gradient(160deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
}

.progress-track { background: #eceefb; border-radius: 999px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, var(--brand-from), var(--brand-accent)); border-radius: 999px; }

.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
}
