/* 
  STU Membership Management System - Custom Modern CSS Design System 
  Designed with HSL color variables, Glassmorphism, Responsive Grids, and Sleek Dark/Light Accents.
*/

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

:root {
  /* Color Palette */
  --primary-hsl: 222, 89%, 56%;
  --primary: hsl(var(--primary-hsl));
  --primary-hover: hsl(222, 89%, 48%);
  --primary-glow: hsla(var(--primary-hsl), 0.25);

  --secondary-hsl: 262, 83%, 58%;
  --secondary: hsl(var(--secondary-hsl));

  --bg-dark: #0b0f19;
  --bg-card-dark: #131b2e;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-color: #e2e8f0;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 28px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 16px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 30px -10px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: #f1f5f9;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #0f172a;
  font-weight: 700;
  line-height: 1.25;
}

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

a:hover {
  color: var(--primary-hover);
}

/* Navbar */
.navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-badge {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-glow);
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -4px rgba(37, 99, 235, 0.4);
}

/* Layout Container */
.main-wrapper {
  max-width: 1280px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
}

/* Alert Messages */
.messages-container {
  margin-bottom: 1.5rem;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius-md);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-warning {
  background-color: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Cards & Glass Containers */
.glass-card {
  background: #ffffff;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2rem;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--border-radius-xl);
  padding: 3.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 2.75rem;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 680px;
  margin: 0 auto 2rem auto;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Dashboard Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition);
}

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

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ffffff;
  flex-shrink: 0;
}

.stat-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }

.stat-info h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Data Filters Bar */
.filter-bar {
  background: #ffffff;
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.search-input-group {
  flex: 1;
  min-width: 220px;
}

.select-filter {
  min-width: 170px;
}

/* Standard Controls & Buttons */
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background-color: #f8fafc;
  color: var(--text-main);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
}

.btn-success:hover {
  background: linear-gradient(135deg, #047857, #059669);
  color: #ffffff;
}

.btn-secondary {
  background-color: #e2e8f0;
  color: #334155;
}

.btn-secondary:hover {
  background-color: #cbd5e1;
  color: #0f172a;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #ffffff;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #ffffff;
}

.btn-excel {
  background: #107c41;
  color: #ffffff;
}

.btn-excel:hover {
  background: #0e6b37;
  color: #ffffff;
}

.btn-pdf {
  background: #b30b00;
  color: #ffffff;
}

.btn-pdf:hover {
  background: #8e0900;
  color: #ffffff;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

/* Modern Data Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.data-table th {
  background-color: #0f172a;
  color: #f8fafc;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 1rem 1.25rem;
  white-space: nowrap;
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: #334155;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-active {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-inactive {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-designation {
  background-color: #e0f2fe;
  color: #0369a1;
}

/* Member Digital Membership Card View */
.id-card-wrapper {
  max-width: 580px;
  margin: 2rem auto;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--border-radius-lg);
  color: #ffffff;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.id-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.id-card-title h2 {
  color: #ffffff;
  font-size: 1.5rem;
}

.id-card-title p {
  color: #3b82f6;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.id-card-serial {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3b82f6;
  padding: 6px 14px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #60a5fa;
  font-size: 0.95rem;
}

.id-card-body {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
}

.id-card-photo {
  width: 120px;
  height: 140px;
  background: #334155;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #64748b;
  color: #94a3b8;
  font-size: 0.75rem;
  text-align: center;
}

.id-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-row {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 600;
}

.detail-value {
  font-size: 1.05rem;
  color: #f8fafc;
  font-weight: 600;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 1.5rem;
}

.page-link {
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 600;
}

.page-link.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Footer */
.footer {
  background: #0f172a;
  color: #94a3b8;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    gap: 1rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .id-card-body {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .id-card-photo {
    margin: 0 auto;
  }
}
