/* ========================================
   MODERN FINTECH WEBSITE - PROFESSIONAL DESIGN
   ======================================== */

:root {
  --primary: #0066FF;
  --primary-dark: #0052CC;
  --primary-light: #3385FF;
  --secondary: #00D4FF;
  --success: #00C853;
  --warning: #FFB300;
  --danger: #FF3B30;
  --dark: #0A0E27;
  --dark-2: #161B33;
  --dark-3: #1E2440;
  --light: #F8FAFC;
  --gray: #64748B;
  --gray-light: #E2E8F0;
  --white: #FFFFFF;
  --sidebar-width: 280px;
  --header-height: 70px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

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

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--dark);
  padding: 2rem 0;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 0 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--white);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 0.25rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0 1rem;
}

.sidebar-nav li {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--gray-light);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-weight: 500;
  position: relative;
}

.nav-link:hover {
  background: var(--dark-3);
  color: var(--white);
  transform: translateX(4px);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: var(--secondary);
  border-radius: 0 4px 4px 0;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  padding: 0 1.5rem;
}

.sidebar-cta {
  background: linear-gradient(135deg, var(--success), #00A843);
  color: var(--white);
  padding: 1rem;
  border-radius: var(--radius-lg);
  text-align: center;
  text-decoration: none;
  display: block;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.sidebar-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  color: var(--white);
}

/* Mobile Toggle */
.sidebar-toggle {
  display: none;
  background: var(--dark);
  color: var(--white);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.sidebar-toggle:hover {
  background: var(--dark-3);
}

.sidebar-toggle:active {
  transform: scale(0.95);
}

/* Mobile Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--light);
}

.content-header {
  background: var(--white);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1002;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.header-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn {
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gray-light);
  color: var(--dark);
}

.btn-outline:hover {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--white);
}

.content-body {
  padding: 2rem;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  color: var(--white);
  padding: 4rem 3rem;
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.15) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--white), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: var(--gray-light);
  line-height: 1.8;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
}

.hero-image {
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 450px;
  height: 450px;
  z-index: 2;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

/* ========================================
   STATS SECTION
   ======================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-light);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-change {
  font-size: 0.875rem;
  color: var(--success);
  font-weight: 600;
}

.stat-change.negative {
  color: var(--danger);
}

/* ========================================
   CARDS & CONTENT SECTIONS
   ======================================== */

.section {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--light);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-light);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.card-icon svg {
  color: var(--white);
  stroke: var(--white);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.card-body {
  flex: 1;
}

.card-text {
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--gray-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-meta {
  font-size: 0.875rem;
  color: var(--gray);
  font-weight: 600;
}

/* ========================================
   FORM STYLES
   ======================================== */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
  color: var(--dark);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.form-control.is-invalid {
  border-color: var(--danger);
}

.invalid-feedback {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: block;
}

.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
  color: var(--dark);
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--dark);
  color: var(--gray-light);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--white);
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  color: var(--gray-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--dark-3);
  text-align: center;
  color: var(--gray);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
  .hero-image {
    width: 350px;
    height: 350px;
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
    width: 280px;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .sidebar-overlay {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .content-header {
    padding: 1rem 1.5rem;
  }

  .header-title {
    font-size: 1.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header-actions .btn-outline {
    display: none;
  }

  .hero {
    padding: 3rem 2rem;
  }

  .hero-image {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: 300px;
    margin-top: 2rem;
  }

  .content-body {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .header-title {
    font-size: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-gray { color: var(--gray); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
