/* Bisdel_SMS - Premium SaaS UI Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.1);
  --secondary-color: #06b6d4;
  --accent-color: #8b5cf6;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-dark: rgba(30, 41, 59, 0.7);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --sidebar-width: 260px;
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
  --radius-lg: 16px;
  --radius-md: 12px;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #f8fafc;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-title {
  font-family: 'Outfit', sans-serif;
}

/* Glassmorphism & SaaS Utility Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
}

.glass-panel-dark {
  background: var(--card-dark);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
}

/* Gradient Hero Banner */
.hero-gradient {
  background: var(--bg-gradient);
  color: #fff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
}

/* Sidebar Layout */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: #0f172a;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.sidebar-brand span {
  color: var(--secondary-color);
}

.sidebar-menu {
  list-style: none;
  padding: 16px 12px;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-menu .menu-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #64748b;
  padding: 12px;
  font-weight: 700;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
  background: rgba(79, 70, 229, 0.2);
  color: #fff;
  border-left: 4px solid var(--primary-color);
}

.sidebar-menu a i {
  font-size: 1.2rem;
}

/* Custom Sleek Scrollbar for Sidebars */
.sidebar-menu::-webkit-scrollbar {
  width: 5px;
}
.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Dedicated Admin Sidebar & Portal Styling */
.sidebar-admin {
  background: #090d16 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-admin .sidebar-header {
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

.sidebar-admin .sidebar-brand {
  color: #fff;
}

.sidebar-admin .sidebar-brand span {
  color: #f59e0b;
}

.sidebar-admin .sidebar-menu .menu-header {
  color: #94a3b8;
  font-size: 0.72rem;
  letter-spacing: 1.4px;
}

.sidebar-admin .sidebar-menu a {
  color: #cbd5e1;
}

.sidebar-admin .sidebar-menu a:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-left: 4px solid #f59e0b;
}

.sidebar-admin .sidebar-menu a.active {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 100%);
  color: #fbbf24;
  font-weight: 700;
  border-left: 4px solid #f59e0b;
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-navbar {
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 900;
}

.content-body {
  padding: 32px;
  flex-grow: 1;
}

/* Balance Cards & Metrics */
.stat-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.icon-sms { background: rgba(79, 70, 229, 0.12); color: var(--primary-color); }
.icon-voice { background: rgba(6, 182, 212, 0.12); color: var(--secondary-color); }
.icon-email { background: rgba(139, 92, 246, 0.12); color: var(--accent-color); }
.icon-wallet { background: rgba(16, 185, 129, 0.12); color: #10b981; }

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 4px 0;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 10px 20px;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff;
  border: none;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-gradient:hover {
  background: linear-gradient(135deg, var(--primary-hover), #7c3aed);
  color: #fff;
}

/* Bundle Cards */
.bundle-card {
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
  background: #ffffff;
}

.bundle-card.featured {
  border: 2px solid var(--primary-color);
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.15);
}

.bundle-card .badge-featured {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* Table Customization */
.custom-table {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.custom-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 14px 20px;
}

.custom-table td {
  padding: 16px 20px;
  vertical-align: middle;
}

/* Responsive Design System & Mobile Optimization */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.user-name-truncate {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

/* Tablet & Mobile Screens (<= 991.98px) */
@media (max-width: 991.98px) {
  :root {
    --sidebar-width: 280px;
  }

  .sidebar {
    transform: translateX(-100%);
    margin-left: 0 !important;
    z-index: 1050;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .top-navbar {
    padding: 0 16px;
    height: 64px;
  }

  .content-body {
    padding: 20px 14px;
  }

  .hero-gradient {
    padding: 60px 0;
  }

  .hero-carousel-item {
    min-height: 400px !important;
  }
}

/* Mobile Screens (<= 767.98px) */
@media (max-width: 767.98px) {
  .display-3 {
    font-size: calc(1.75rem + 1.5vw) !important;
  }
  .display-4 {
    font-size: calc(1.5rem + 1.2vw) !important;
  }
  .display-5 {
    font-size: calc(1.35rem + 1vw) !important;
  }
  .display-6 {
    font-size: calc(1.2rem + 0.8vw) !important;
  }

  .content-body {
    padding: 16px 10px;
  }

  .top-navbar {
    padding: 0 12px;
    height: 60px;
  }

  .stat-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }

  .stat-card .stat-value {
    font-size: 1.6rem;
  }

  .stat-card .stat-icon {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
    margin-bottom: 12px;
  }

  .user-name-truncate {
    max-width: 90px;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
  }

  .table-responsive .table {
    min-width: 580px;
  }

  .ticker-item {
    font-size: 0.85rem;
    margin-right: 24px;
  }
}

/* Extra Small Screens (<= 575.98px) */
@media (max-width: 575.98px) {
  .content-body {
    padding: 12px 6px;
  }

  .card-body {
    padding: 16px 12px !important;
  }

  .card-header {
    padding: 12px 14px !important;
  }

  .stat-card .stat-value {
    font-size: 1.4rem;
  }

  .btn-lg {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .modal-dialog {
    margin: 10px;
  }

  .modal-content {
    border-radius: 16px !important;
  }

  .modal-body {
    padding: 16px !important;
  }

  .modal-header, .modal-footer {
    padding: 12px 16px !important;
  }

  .user-name-truncate {
    max-width: 75px;
  }
}
