/* assets/css/style.css - Premium Modern SaaS & Fintech Aesthetic Theme */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --pill-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  --background: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --foreground: #0f172a;
  --foreground-muted: #64748b;
  --accent: #06b6d4;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

@media (min-width: 992px) {
  .app-container {
    flex-direction: row;
  }
}

/* Mobile Top Bar (Progressive Navbar) */
.mobile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

@media (min-width: 992px) {
  .mobile-topbar {
    display: none;
  }
}

.mobile-brand {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-toggle-btn {
  background: rgba(147, 51, 234, 0.1);
  color: var(--primary);
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.mobile-toggle-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Progressive Sidebar - Mobile Drawer & Desktop Sticky Panel */
.sidebar {
  width: 215px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid #e2e8f0;
  color: #1e293b;
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  top: 0;
  left: 0;
  z-index: 100;
  box-shadow: 2px 0 16px rgba(0,0,0,0.03);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 9999px;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, 0.3);
  border-radius: 9999px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(79, 70, 229, 0.6);
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 95;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

.sidebar-brand {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #0f172a;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 auto;
  overflow-y: auto !important;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  min-height: 0;
  padding-right: 0.25rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sidebar-footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.85rem;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.65rem;
  color: #64748b;
  font-weight: 700;
  font-size: 0.775rem;
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
}

.nav-item.active {
  background: var(--pill-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
  text-decoration: none;
}

.main-content {
  flex: 1;
  padding: 1.25rem;
  max-width: 100%;
  animation: panelFadeIn 0.3s ease-out;
}

@media (min-width: 992px) {
  .main-content {
    margin-left: 215px;
    padding: 1.5rem 2rem;
    max-width: calc(100% - 215px);
  }
}

/* Progressive Panel Animation */
@keyframes panelFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progressive Grids */
.progressive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

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

/* Card System - Modern Clean SaaS & Fintech Aesthetics */
.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: panelFadeIn 0.35s ease-out;
}

.card:hover {
  border-color: #cbd5e1;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

/* Service Card Themes - Modern Crisp Category Accents */
.card-theme-mint {
  background: #ffffff;
  border-left: 4px solid #10b981 !important;
}

.card-theme-purple {
  background: #ffffff;
  border-left: 4px solid #8b5cf6 !important;
}

.card-theme-peach {
  background: #ffffff;
  border-left: 4px solid #f59e0b !important;
}

.card-theme-pink {
  background: #ffffff;
  border-left: 4px solid #ec4899 !important;
}

.card-theme-blue {
  background: #ffffff;
  border-left: 4px solid #3b82f6 !important;
}

.service-card-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
}

.service-card-item:hover {
  transform: translateY(-2px);
  border-color: #818cf8;
  box-shadow: 0 8px 18px -3px rgba(79, 70, 229, 0.12);
}

/* Icon Container */
.icon-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4f46e5;
  transition: all 0.2s ease;
}

.service-card-item:hover .icon-box {
  background: #4f46e5;
  color: #ffffff;
}

/* =========================================================
   DASHBOARD 2-COLUMN WORKSPACE: LEFT HEADER & TOP SERVICES
   ========================================================= */
.dashboard-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .dashboard-workspace {
    flex-direction: row;
    gap: 1.5rem;
    align-items: flex-start;
  }
}

/* Right-side Dashboard Panel & Controls (Reduced Width) */
.dashboard-side-panel,
.dashboard-side-header {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

@media (min-width: 1024px) {
  .dashboard-side-panel,
  .dashboard-side-header {
    width: 275px;
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    padding-right: 0.25rem;
  }
}

.dashboard-side-panel::-webkit-scrollbar,
.dashboard-side-header::-webkit-scrollbar {
  width: 4px;
}
.dashboard-side-panel::-webkit-scrollbar-thumb,
.dashboard-side-header::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

/* Right-side Services Stage (Starts directly at the top) */
.dashboard-services-stage {
  flex: 1;
  width: 100%;
  min-width: 0;
}

.side-cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-weight: 700;
  font-size: 0.775rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.side-cat-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.side-cat-btn.active {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 800;
  border-color: #c7d2fe;
}


/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-new {
  background: #ff2a6d;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 42, 109, 0.3);
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fef3c7; color: #b45309; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--pill-gradient);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  opacity: 0.95;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
  border-radius: 9999px;
}

.btn-success {
  background: #10b981;
  color: #ffffff;
  border-radius: 9999px;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border-radius: 9999px;
}

.btn-outline:hover {
  background: #ffffff;
  text-decoration: none;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foreground-muted);
  margin-bottom: 0.375rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--foreground);
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: #a855f7;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15);
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foreground-muted);
  padding: 1rem 1.25rem;
  background: rgba(248, 250, 252, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Mobile Close Button & Progressive Utilities */
.mobile-only-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.15);
  transition: all 0.2s ease;
}

.mobile-only-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444 !important;
}

@media (min-width: 992px) {
  .mobile-only-close {
    display: none !important;
  }
}

