@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --tc-primary: #4f46e5;
  --tc-primary-hover: #4338ca;
  --tc-primary-light: #eef2ff;
  --tc-secondary: #7c3aed;
  --tc-dark: #0f172a;
  --tc-dark-card: #1e293b;
  --tc-body-bg: #f8fafc;
  --tc-card-bg: #ffffff;
  --tc-border: #e2e8f0;
  --tc-border-light: #f1f5f9;
  --tc-text-main: #0f172a;
  --tc-text-muted: #64748b;
  --tc-success: #10b981;
  --tc-success-light: #ecfdf5;
  --tc-warning: #f59e0b;
  --tc-danger: #ef4444;
  --tc-radius-sm: 8px;
  --tc-radius: 14px;
  --tc-radius-lg: 20px;
  --tc-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --tc-shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --tc-shadow-lg: 0 16px 32px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  --tc-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Body Overrides */
body#page-top {
  font-family: var(--tc-font) !important;
  background-color: var(--tc-body-bg) !important;
  color: var(--tc-text-main);
  -webkit-font-smoothing: antialiased;
}

#content-wrapper {
  background-color: var(--tc-body-bg) !important;
}

/* -------------------------------------------------------------
   TOPBAR
   ------------------------------------------------------------- */
.topbar {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid var(--tc-border) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03) !important;
  height: 4.5rem !important;
}

#sidebarToggleTop {
  color: var(--tc-text-main) !important;
  background: var(--tc-border-light) !important;
}

.topbar .nav-item .nav-link {
  color: var(--tc-text-main) !important;
}

.topbar .user-pill {
  display: flex;
  align-items: center;
  background: var(--tc-border-light);
  padding: 6px 14px 6px 10px;
  border-radius: 9999px;
  border: 1px solid var(--tc-border);
  transition: all 0.2s ease;
}

.topbar .user-pill:hover {
  background: #e2e8f0;
}

.topbar .user-pill span {
  color: var(--tc-text-main) !important;
  font-weight: 600;
  font-size: 0.875rem;
}

/* -------------------------------------------------------------
   SIDEBAR
   ------------------------------------------------------------- */
.sidebar#accordionSidebar {
  background: #0f172a !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .sidebar-brand {
  height: 5rem !important;
  padding: 1.25rem 1rem !important;
}

.sidebar .sidebar-brand-text {
  font-family: var(--tc-font);
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 1.05rem;
  color: #ffffff;
}

.sidebar .nav-item .nav-link {
  font-family: var(--tc-font);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.85rem 1.25rem !important;
  color: #94a3b8 !important;
  border-radius: var(--tc-radius-sm);
  margin: 0.15rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.sidebar .nav-item .nav-link:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .nav-item.active .nav-link {
  color: #ffffff !important;
  background: var(--tc-primary) !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.sidebar .nav-item .nav-link i {
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
}

.sidebar-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin: 0.75rem 1rem !important;
}

.sidebar-balance-widget {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--tc-radius);
  margin: 1rem 0.85rem;
  padding: 1rem;
  color: #ffffff;
}

.sidebar-balance-widget .balance-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  font-weight: 600;
}

.sidebar-balance-widget .balance-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0.25rem 0 0.5rem 0;
}

.sidebar-balance-widget .btn-add-fund {
  background: var(--tc-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--tc-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  width: 100%;
  display: block;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
}

.sidebar-balance-widget .btn-add-fund:hover {
  background: var(--tc-primary-hover);
  color: #ffffff;
}

/* -------------------------------------------------------------
   METRIC / STAT CARDS
   ------------------------------------------------------------- */
.metric-card-balance {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
  border-radius: var(--tc-radius) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px -4px rgba(79, 70, 229, 0.35) !important;
  padding: 1.5rem !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card-balance:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(79, 70, 229, 0.45) !important;
}

.metric-card-balance::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.metric-card-user {
  background: #ffffff !important;
  border-radius: var(--tc-radius) !important;
  border: 1px solid var(--tc-border) !important;
  color: var(--tc-text-main) !important;
  box-shadow: var(--tc-shadow-sm) !important;
  padding: 1.5rem !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card-user:hover {
  transform: translateY(-2px);
  box-shadow: var(--tc-shadow-md) !important;
}

/* -------------------------------------------------------------
   SERVICE CARDS (Legacy #con override)
   ------------------------------------------------------------- */
#con, .service-card {
  background: #ffffff !important;
  border-radius: var(--tc-radius) !important;
  border: 1px solid var(--tc-border) !important;
  box-shadow: var(--tc-shadow-sm) !important;
  color: var(--tc-text-main) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative;
  overflow: hidden;
}

#con:hover, .service-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--tc-shadow-md) !important;
  border-color: #cbd5e1 !important;
}

#con .card-body, .service-card .card-body {
  padding: 1.35rem 1.25rem !important;
}

#con .text-xs, .service-card .service-title {
  color: var(--tc-text-main) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px;
  margin-bottom: 0.35rem !important;
  text-transform: none !important;
}

#con .h5, .service-card .service-desc {
  color: var(--tc-text-muted) !important;
  font-size: 0.825rem !important;
  font-weight: 400 !important;
  line-height: 1.4;
}

/* Service Button Overrides */
.btn-service-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9999px;
  text-decoration: none !important;
  border: none;
  transition: all 0.2s ease;
}

.btn-service-active {
  background: var(--tc-primary);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.btn-service-active:hover {
  background: var(--tc-primary-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-service-inactive {
  background: #f1f5f9;
  color: #94a3b8 !important;
  cursor: not-allowed;
}

/* Modern status pills */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

.status-active {
  background: #ecfdf5;
  color: #059669;
}

.status-active::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-inactive {
  background: #fef2f2;
  color: #dc2626;
}

.status-inactive::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
}

/* -------------------------------------------------------------
   AUTH PAGES (Login & Register)
   ------------------------------------------------------------- */
.auth-body {
  font-family: var(--tc-font) !important;
  background: radial-gradient(at 0% 0%, #312e81 0px, transparent 50%),
              radial-gradient(at 100% 100%, #1e1b4b 0px, transparent 50%),
              #0f172a !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  padding: 1.5rem 1rem;
}

.auth-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--tc-radius-lg);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 440px;
  padding: 2.25rem 2rem;
  color: var(--tc-text-main);
}

.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-card .auth-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  border-radius: 12px;
}

.auth-card .auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--tc-text-main);
  margin-bottom: 0.25rem;
}

.auth-card .auth-subtitle {
  font-size: 0.85rem;
  color: var(--tc-text-muted);
  margin-bottom: 1.75rem;
}

.auth-input-group {
  margin-bottom: 1.15rem;
}

.auth-input-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-radius: var(--tc-radius-sm);
  border: 1.5px solid var(--tc-border);
  background: #f8fafc;
  color: var(--tc-text-main);
  transition: all 0.2s ease;
  font-family: var(--tc-font);
}

.auth-input:focus {
  outline: none;
  border-color: var(--tc-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.auth-btn-primary {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--tc-radius-sm);
  background: var(--tc-primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  font-family: var(--tc-font);
}

.auth-btn-primary:hover:not(:disabled) {
  background: var(--tc-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.auth-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* -------------------------------------------------------------
   SMOOTH MICRO-LOADER (Replaces aggressive spin-scale)
   ------------------------------------------------------------- */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 99999;
  pointer-events: none;
}

.loader-bar {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #06b6d4);
  width: 100%;
  animation: loadProgress 0.8s ease-out forwards;
}

@keyframes loadProgress {
  0% { width: 0%; opacity: 1; }
  80% { width: 90%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}

/* -------------------------------------------------------------
   WHATSAPP FLOATING BUTTON
   ------------------------------------------------------------- */
#wt {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 9999 !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
}

#wt a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.2s ease;
}

#wt a:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55);
}

#wt a img {
  width: 32px !important;
  height: 32px !important;
}

/* -------------------------------------------------------------
   MODERN FOOTER
   ------------------------------------------------------------- */
footer.sticky-footer {
  background: #ffffff !important;
  border-top: 1px solid var(--tc-border) !important;
  padding: 1.5rem 0 !important;
  color: var(--tc-text-muted) !important;
  font-size: 0.85rem;
}

footer.sticky-footer p {
  margin-bottom: 0.25rem;
}
