/* ===================================================================
   PHARMACOACH - MODERN HEALTHTECH DESIGN SYSTEM
   Theme: Sleek Dark Slate / Emerald HealthTech / Glassmorphism
   =================================================================== */

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

:root {
  /* Core Palette */
  --bg-main: #0a0f1d;
  --bg-surface: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-input: #1e293b;
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #10b981;
  --border-glow: rgba(16, 185, 129, 0.3);

  /* Accents */
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --secondary: #6366f1;
  --secondary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Shadows & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.18);
}

/* Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 15% 15%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 85% 85%, rgba(99, 102, 241, 0.07) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #34d399;
  text-decoration: none;
}

/* Container Structure */
#body-content {
  flex: 1 0 auto;
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

/* ===================================================================
   NAVBAR COMPONENT
   =================================================================== */
.navbar-custom {
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.navbar-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.navbar-nav {
  align-items: center;
}

.nav-link-custom {
  color: var(--text-muted) !important;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem !important;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem;
}

.nav-link-custom:hover, .nav-link-custom.active {
  color: var(--text-main) !important;
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-menu-custom {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 230px;
}

.dropdown-item-custom {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-item-custom:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
}

/* ===================================================================
   BUTTONS & MICRO-INTERACTIONS
   =================================================================== */
.btn-primary-custom {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary-custom:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-secondary-custom {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary-custom:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.btn-accent-custom {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  transition: all 0.25s ease;
}

.btn-accent-custom:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

/* ===================================================================
   CARDS & SURFACES
   =================================================================== */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.card-glass:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-glass-interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(16, 185, 129, 0.3);
}

.card-glass-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-glass-body {
  padding: 1.5rem;
}

/* ===================================================================
   FORM CONTROLS
   =================================================================== */
.form-label-custom {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-control-custom, .form-select-custom {
  background-color: var(--bg-input) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
  transition: all 0.2s ease !important;
}

.form-control-custom:focus, .form-select-custom:focus {
  background-color: #24334a !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
  color: #ffffff !important;
}

.form-control-custom::placeholder {
  color: var(--text-dim) !important;
}

/* File Upload Zone */
.upload-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.05);
}

.upload-icon {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* ===================================================================
   DATA TABLES
   =================================================================== */
.table-responsive-custom {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

.table-custom {
  width: 100%;
  margin-bottom: 0;
  color: var(--text-main);
  border-collapse: collapse;
}

.table-custom th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.table-custom td {
  padding: 0.95rem 1.25rem;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.table-custom tbody tr {
  transition: background-color 0.15s ease;
}

.table-custom tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Table Search Input */
.table-search-bar {
  position: relative;
  max-width: 380px;
}

.table-search-bar i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.table-search-bar input {
  padding-left: 2.6rem !important;
}

/* ===================================================================
   STATUS PILLS & BADGES
   =================================================================== */
.status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.status-info {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ===================================================================
   ALERTS & TOAST NOTIFICATIONS
   =================================================================== */
.alert-custom {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.alert-danger {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fca5a5;
}

.alert-info {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}

/* ===================================================================
   HERO & SPECIAL SECTIONS
   =================================================================== */
.hero-wrapper {
  padding: 4rem 1rem 3rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.035em;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #ffffff 30%, #34d399 70%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Features Grid */
.feature-card {
  padding: 2rem 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.feature-icon-indigo {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--secondary);
}

.feature-icon-cyan {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.25);
  color: var(--accent-cyan);
}

/* Footer */
.footer-custom {
  background: rgba(10, 15, 29, 0.95);
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 0;
  margin-top: auto;
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  z-index: 9999;
}

.spinner-custom {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .table-custom th, .table-custom td {
    padding: 0.75rem 0.85rem;
  }
}