/**
 * OneSchool Clean Blue & White BuddyBoss Theme
 * Version: 4.0.0
 * Clean, Professional, Readable Design
 */

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

/* CSS Variables - Clean Blue & White Theme */
:root {
  /* Primary Colors */
  --bb-blue: #1877f2;
  --bb-blue-hover: #166fe5;
  --bb-blue-light: rgba(24, 119, 242, 0.08);
  --bb-blue-dark: #0d47a1;
  
  /* Secondary Colors */
  --bb-green: #42b72a;
  --bb-orange: #ff6b35;
  --bb-red: #e74c3c;
  --bb-yellow: #f39c12;
  --bb-purple: #9b59b6;
  --bb-teal: #1abc9c;
  
  /* Background Colors */
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e9ecef;
  --bg-light: #f1f3f4;
  --bg-card: #ffffff;
  --bg-hover: #f5f6f7;
  
  /* Text Colors */
  --text-primary: #1c1e21;
  --text-secondary: #65676b;
  --text-muted: #8a8d91;
  --text-light: #bcc0c4;
  --text-white: #ffffff;
  --text-dark: #050505;
  
  /* Border Colors */
  --border-light: #e4e6ea;
  --border-medium: #dadde1;
  --border-dark: #ced0d4;
  --border-focus: #1877f2;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 50%;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-Index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1050;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb {
  background: var(--bb-blue);
  border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bb-blue-hover);
}

/* Selection Styling */
::selection {
  background: var(--bb-blue-light);
  color: var(--bb-blue);
}

/* Header Component */
.bb-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
}

.bb-header-logo {
  display: flex;
  align-items: center;
  margin-right: var(--space-xl);
}

.bb-header-logo img {
  height: 40px;
  width: auto;
}

.bb-header-search {
  flex: 1;
  max-width: 320px;
  margin-right: var(--space-xl);
}

.bb-search-input {
  width: 100%;
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: all var(--transition-normal);
}

.bb-search-input:focus {
  outline: none;
  background: var(--bg-secondary);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--bb-blue-light);
}

.bb-search-input::placeholder {
  color: var(--text-muted);
}

.bb-header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
}

.bb-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-light);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
}

.bb-nav-item:hover {
  background: var(--bb-blue-light);
  color: var(--bb-blue);
  transform: translateY(-2px);
  text-decoration: none;
}

.bb-nav-item.active {
  background: var(--bb-blue);
  color: var(--text-white);
}

.bb-nav-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  background: var(--bb-red);
  color: var(--text-white);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-secondary);
}

.bb-profile-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-lg);
  background: var(--bg-light);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.bb-profile-dropdown:hover {
  background: var(--bb-blue-light);
}

.bb-avatar {
  position: relative;
  display: inline-block;
}

.bb-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  margin-right: var(--space-sm);
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.bb-avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
}

.bb-avatar-status.online {
  background: var(--bb-green);
}

.bb-profile-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Sidebar Component */
.bb-sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 280px;
  height: calc(100vh - 60px);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
  z-index: var(--z-fixed);
  padding: var(--space-lg);
}

.bb-sidebar-section {
  margin-bottom: var(--space-xl);
}

.bb-sidebar-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
  padding: 0 var(--space-md);
}

.bb-sidebar-item {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  margin-bottom: var(--space-xs);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
}

.bb-sidebar-item:hover {
  background: var(--bb-blue-light);
  color: var(--bb-blue);
  transform: translateX(5px);
  text-decoration: none;
}

.bb-sidebar-item.active {
  background: var(--bb-blue);
  color: var(--text-white);
}

.bb-sidebar-icon {
  width: 20px;
  height: 20px;
  margin-right: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.bb-sidebar-text {
  font-weight: 500;
  font-size: 0.9rem;
}

.bb-sidebar-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  background: var(--bb-red);
  color: var(--text-white);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Content Area */
.bb-main {
  margin-left: 280px;
  margin-top: 60px;
  min-height: calc(100vh - 60px);
  padding: var(--space-xl);
  background: var(--bg-primary);
}

.bb-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* Card Components */
.bb-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
  margin-bottom: var(--space-xl);
}

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

.bb-card-header {
  padding: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.bb-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
}

.bb-card-title i {
  margin-right: var(--space-md);
  color: var(--bb-blue);
  font-size: 1.1rem;
}

.bb-card-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: var(--space-xs);
}

.bb-card-body {
  padding: var(--space-xl);
  background: var(--bg-secondary);
}

.bb-card-footer {
  padding: var(--space-xl);
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Button Components */
.bb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.bb-btn-primary {
  background: var(--bb-blue);
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.bb-btn-primary:hover {
  background: var(--bb-blue-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--text-white);
  text-decoration: none;
}

.bb-btn-secondary {
  background: var(--bb-green);
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.bb-btn-secondary:hover {
  background: #36a420;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--text-white);
  text-decoration: none;
}

.bb-btn-outline {
  background: transparent;
  color: var(--bb-blue);
  border: 2px solid var(--bb-blue);
}

.bb-btn-outline:hover {
  background: var(--bb-blue);
  color: var(--text-white);
  text-decoration: none;
}

.bb-btn-ghost {
  background: var(--bg-light);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.bb-btn-ghost:hover {
  background: var(--bg-secondary);
  border-color: var(--bb-blue);
  color: var(--text-primary);
  text-decoration: none;
}

.bb-btn-sm {
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.8rem;
}

.bb-btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1.1rem;
}

.bb-btn i {
  margin-right: var(--space-sm);
}

/* Form Components */
.bb-form-group {
  margin-bottom: var(--space-xl);
}

.bb-form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.bb-form-control,
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  transition: all var(--transition-normal);
  font-family: inherit;
}

.bb-form-control:focus,
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--bb-blue-light);
  background: var(--bg-secondary);
}

.bb-form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* Table Components */
.bb-table-wrapper,
.table-responsive {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.bb-table,
.table,
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  background: var(--bg-secondary);
}

.bb-table thead th,
.table thead th,
table thead th {
  background: var(--bg-light);
  padding: var(--space-lg) var(--space-xl);
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}

.bb-table tbody td,
.table tbody td,
table tbody td {
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.bb-table tbody tr,
.table tbody tr,
table tbody tr {
  transition: all var(--transition-fast);
}

.bb-table tbody tr:hover,
.table tbody tr:hover,
table tbody tr:hover {
  background: var(--bb-blue-light);
}

.bb-table tbody tr:last-child td,
.table tbody tr:last-child td,
table tbody tr:last-child td {
  border-bottom: none;
}

/* Badge Components */
.bb-badge,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bb-badge-primary,
.badge.bg-primary {
  background: var(--bb-blue);
  color: var(--text-white);
}

.bb-badge-secondary,
.badge.bg-success {
  background: var(--bb-green);
  color: var(--text-white);
}

.bb-badge-warning,
.badge.bg-warning {
  background: var(--bb-yellow);
  color: var(--text-white);
}

.bb-badge-danger,
.badge.bg-danger {
  background: var(--bb-red);
  color: var(--text-white);
}

.bb-badge-light,
.badge.bg-info {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Progress Components */
.bb-progress,
.progress {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  margin-bottom: var(--space-sm);
}

.bb-progress-bar,
.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s ease-in-out;
  background: var(--bb-blue);
}

/* Flash Messages */
.message,
.flash-message {
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.message.success,
.flash-message.success {
  border-left-color: var(--bb-green);
  background: #f0f9f0;
  color: #2d5a2d;
}

.message.error,
.flash-message.error {
  border-left-color: var(--bb-red);
  background: #fdf2f2;
  color: #7d2d2d;
}

.message.warning,
.flash-message.warning {
  border-left-color: var(--bb-yellow);
  background: #fffbf0;
  color: #7d5d2d;
}

.message.info,
.flash-message.info {
  border-left-color: var(--bb-blue);
  background: #f0f4ff;
  color: #2d4a7d;
}

/* Page Header */
.page-header {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-sm) 0;
  display: flex;
  align-items: center;
}

.page-title i {
  margin-right: var(--space-md);
  color: var(--bb-blue);
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0 0 var(--space-lg) 0;
}

.page-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bb-blue);
}

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

.stat-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-info h6 {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0 var(--space-sm) 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-info h3 {
  color: var(--text-primary);
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;
  line-height: 1;
}

.stat-icon {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-white);
  background: var(--bb-blue);
  box-shadow: var(--shadow-md);
}

/* Admin Cards */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

.admin-card .card-header {
  padding: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.admin-card .card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
}

.admin-card .card-title i {
  margin-right: var(--space-md);
  color: var(--bb-blue);
}

.admin-card .card-body {
  padding: var(--space-xl);
  background: var(--bg-secondary);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .bb-sidebar {
    width: 70px;
  }
  
  .bb-sidebar-text {
    display: none;
  }
  
  .bb-main {
    margin-left: 70px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .bb-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
  }
  
  .bb-sidebar.show {
    transform: translateX(0);
  }
  
  .bb-main {
    margin-left: 0;
    padding: var(--space-lg);
  }
  
  .bb-header {
    padding: 0 var(--space-md);
  }
  
  .bb-header-search {
    display: none;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .page-header,
  .bb-card-header,
  .bb-card-body,
  .bb-card-footer,
  .admin-card .card-header,
  .admin-card .card-body {
    padding: var(--space-lg);
  }
  
  .stat-card {
    padding: var(--space-lg);
  }
  
  .page-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .bb-main {
    padding: var(--space-md);
  }
  
  .bb-header {
    padding: 0 var(--space-sm);
  }
  
  .bb-header-nav {
    gap: var(--space-xs);
  }
  
  .bb-nav-item {
    width: 36px;
    height: 36px;
  }
  
  .bb-profile-name {
    display: none;
  }
  
  .page-header,
  .bb-card-header,
  .bb-card-body,
  .bb-card-footer,
  .admin-card .card-header,
  .admin-card .card-body {
    padding: var(--space-md);
  }
  
  .stat-card {
    padding: var(--space-md);
  }
  
  .stat-content {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }
}

/* Utility Classes */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--text-white) !important; }

.bg-primary { background: var(--bb-blue) !important; }
.bg-secondary { background: var(--bg-secondary) !important; }
.bg-light { background: var(--bg-light) !important; }

.border { border: 1px solid var(--border-light) !important; }
.border-0 { border: none !important; }

.rounded { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }

.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-xs) !important; }
.mb-2 { margin-bottom: var(--space-sm) !important; }
.mb-3 { margin-bottom: var(--space-md) !important; }
.mb-4 { margin-bottom: var(--space-lg) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-xs) !important; }
.p-2 { padding: var(--space-sm) !important; }
.p-3 { padding: var(--space-md) !important; }
.p-4 { padding: var(--space-lg) !important; }

/* Animation Classes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.slide-in-up {
  animation: slideInUp 0.5s ease-out;
}

/* Content Grid Layout */
.bb-content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
  align-items: start;
}

.bb-content-main {
  min-width: 0; /* Prevent grid overflow */
}

.bb-content-sidebar {
  position: sticky;
  top: var(--space-xl);
}

/* Page Header Component */
.bb-page-header {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.bb-page-header-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-xl);
}

.bb-page-title h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-sm) 0;
  display: flex;
  align-items: center;
}

.bb-page-title h1 i {
  margin-right: var(--space-md);
  color: var(--bb-blue);
}

.bb-page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

.bb-page-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Form Components Extended */
.bb-form {
  width: 100%;
}

.bb-form-grid {
  display: grid;
  gap: var(--space-lg);
}

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

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

.bb-form-group-inline {
  margin-bottom: 0;
}

.bb-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

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

.bb-form-file {
  padding: 0.75rem;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-light);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.bb-form-file:hover {
  border-color: var(--bb-blue);
  background: var(--bb-blue-light);
}

.bb-form-help {
  display: block;
  margin-top: var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.bb-form-help i {
  margin-right: var(--space-xs);
  color: var(--bb-blue);
}

.bb-form-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-light);
}

/* Card Variants */
.bb-card-compact {
  margin-bottom: var(--space-lg);
}

.bb-card-compact .bb-card-header {
  padding: var(--space-lg);
}

.bb-card-compact .bb-card-body {
  padding: var(--space-lg);
}

.bb-card-compact .bb-card-title {
  font-size: 1.1rem;
}

/* Button Variants */
.bb-btn-danger {
  background: var(--bb-red);
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.bb-btn-danger:hover {
  background: #c0392b;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--text-white);
  text-decoration: none;
}

/* Responsive Grid Layout */
@media (max-width: 1024px) {
  .bb-content-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .bb-content-sidebar {
    position: static;
    order: -1;
  }
  
  .bb-page-header-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .bb-page-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .bb-form-grid-2,
  .bb-form-grid-3 {
    grid-template-columns: 1fr;
  }
  
  .bb-form-actions {
    flex-direction: column;
  }
  
  .bb-form-actions .bb-btn {
    width: 100%;
    justify-content: center;
  }
  
  .bb-page-actions {
    flex-direction: column;
  }
  
  .bb-page-actions .bb-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Print Styles */
@media print {
  .bb-sidebar,
  .bb-header,
  .bb-btn,
  .page-actions,
  .bb-page-actions {
    display: none !important;
  }
  
  .bb-main {
    margin-left: 0;
    margin-top: 0;
  }
  
  .bb-content-grid {
    grid-template-columns: 1fr;
  }
  
  body {
    background: white;
  }
  
  .bb-card,
  .admin-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}