/* Professional Dashboard CSS - Inspired by modern UI design */
:root {
  --primary-bg: #1a1f37;
  --secondary-bg: #2b3349;
  --accent-color: #4ade80;
  --accent-blue: #3b82f6;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --surface-bg: #ffffff;
  --surface-hover: #f8fafc;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif; 
}

body { 
  background: #f8fafc; 
  display: flex; 
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
}

/* Professional Sidebar */
.sidebar {
  width: 280px;
  background: var(--primary-bg);
  color: var(--text-primary);
  padding: 0;
  position: fixed;
  height: 100vh;
  z-index: 1000;
  box-shadow: var(--shadow-large);
  overflow-y: auto;
}

.sidebar h2 {
  padding: 24px 20px;
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 700;
  background: var(--secondary-bg);
  border-bottom: 1px solid #374151;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.sidebar a {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 14px 20px;
  margin: 2px 12px;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 14px;
  position: relative;
}

.sidebar a:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
  transform: translateX(2px);
}

.sidebar a.active {
  background: var(--accent-blue);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar a.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 0 2px 2px 0;
}

/* Main Content */
.main {
  flex: 1;
  margin-left: 280px;
  padding: 32px;
  background: #f8fafc;
  min-height: 100vh;
}

/* Professional Top Bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 0 0 24px 0;
  border-bottom: 1px solid var(--border-color);
}

.topbar h1 { 
  font-size: 28px; 
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.025em;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-bg);
  padding: 12px 16px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

.admin-profile span {
  font-weight: 500;
  color: #374151;
}

.admin-profile a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.admin-profile a:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

/* Professional Cards Grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.card {
  background: var(--surface-bg);
  padding: 24px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
  border-color: var(--accent-blue);
}

.card h3 { 
  font-size: 14px; 
  font-weight: 600;
  color: var(--text-muted); 
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card p { 
  font-size: 32px; 
  font-weight: 700; 
  color: #111827;
  line-height: 1.2;
  margin-bottom: 8px;
}

.card .trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
}

.card .trend.up {
  color: var(--success-color);
}

.card .trend.down {
  color: var(--error-color);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-color));
}

/* Professional Action Buttons */
.actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.actions button, .btn-primary {
  background: var(--accent-blue);
  color: var(--text-primary);
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-light);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.actions button:hover, .btn-primary:hover {
  background: #1d4ed8;
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* Professional Tables */
.table-container {
  background: var(--surface-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.table-container h3 {
  padding: 20px 24px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  border-bottom: 1px solid var(--border-color);
  background: #fafafa;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

thead th {
  background: #f8fafc;
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Column widths for better organization */
thead th:nth-child(1) { width: 25%; } /* Student */
thead th:nth-child(2) { width: 15%; } /* Student ID */
thead th:nth-child(3) { width: 15%; } /* Date of Birth */
thead th:nth-child(4) { width: 15%; } /* Current Class */
thead th:nth-child(5) { width: 20%; } /* Guardian */
thead th:nth-child(6) { width: 10%; } /* Status */

tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  color: #374151;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

tbody tr:hover {
  background: var(--surface-hover);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-paid {
  background: #d1fae5;
  color: #065f46;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-overdue {
  background: #fee2e2;
  color: #991b1b;
}

/* Professional Navigation */
.sidebar nav {
  padding: 20px 0;
}

.nav-icon {
  width: 20px;
  text-align: center;
  margin-right: 12px;
  opacity: 0.8;
}

.nav-divider {
  height: 1px;
  background: #374151;
  margin: 16px 12px;
}

/* Professional User Profile */
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-weight: 600;
  color: #374151;
  font-size: 14px;
}

.user-role {
  color: var(--text-muted);
  font-size: 12px;
}

.logout-btn, .login-btn {
  color: var(--accent-blue) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  border-radius: var(--border-radius) !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
}

.logout-btn:hover, .login-btn:hover {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

/* Progress Bars for Dashboard */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-color));
  transition: width 0.3s ease;
  border-radius: 4px;
}

.metric-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 16px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.metric-change {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.metric-change.positive {
  color: var(--success-color);
}

.metric-change.negative {
  color: var(--error-color);
}

/* Professional Action Buttons */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.action-card {
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.action-card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
  text-decoration: none;
}

.action-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.action-card-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.action-card-description {
  color: var(--text-muted);
  font-size: 13px;
}

/* Mobile Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main {
    margin-left: 0;
    padding: 20px;
  }
  
  .topbar {
    position: relative;
    padding-left: 60px;
  }
  
  .mobile-menu-btn {
    display: block !important;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-bg);
    color: var(--text-primary);
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    z-index: 1001;
  }
  
  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .actions {
    flex-direction: column;
  }
}

/* Professional Page Headers */
.page-header {
  background: var(--surface-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.page-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
}

.page-title-section {
  flex: 1;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
  letter-spacing: -0.025em;
}

.page-subtitle {
  color: var(--text-muted);
  margin: 0;
  font-size: 14px;
}

.page-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Search and Filters */
.filters-container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  margin-bottom: 24px;
  gap: 24px;
  background: var(--surface-bg);
  padding: 24px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.filter-actions {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.search-box {
  display: flex;
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  padding-right: 48px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  background: var(--surface-bg);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.search-btn:hover {
  background: var(--surface-hover);
}

.filter-buttons {
  display: flex;
  gap: 12px;
}

.filter-select {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface-bg);
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Enhanced Button Styles */
.btn-primary {
  background: var(--accent-blue);
  color: var(--text-primary);
  border: none;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-light);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-height: 44px;
}

.btn-primary:hover {
  background: #1d4ed8;
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
  padding: 12px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-height: 44px;
}

.btn-outline:hover {
  background: var(--accent-blue);
  color: var(--text-primary);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-danger {
  background: var(--error-color);
  color: var(--text-primary);
  border: none;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-light);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-height: 44px;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--text-primary);
}

.btn-success {
  background: var(--success-color);
  color: var(--text-primary);
  border: none;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-light);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-height: 44px;
}

.btn-success:hover {
  background: #059669;
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--text-primary);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
}

/* Mobile Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main {
    margin-left: 0;
    padding: 20px;
  }
  
  .topbar {
    position: relative;
    padding-left: 60px;
  }
  
  .mobile-menu-btn {
    display: block !important;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-bg);
    color: var(--text-primary);
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    z-index: 1001;
  }
  
  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .actions {
    flex-direction: column;
  }
}
}

.actions button, .actions a button {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
  text-decoration: none;
}

.actions button:hover, .actions a button:hover { 
  background: #1e40af; 
}

.actions a {
  text-decoration: none;
}

/* Enhanced Professional Form Styles */
.professional-form-container {
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.form-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 40px 30px;
  text-align: center;
  color: white;
}

.form-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.form-subtitle {
  font-size: 16px;
  margin: 0;
  opacity: 0.9;
  font-weight: 400;
  line-height: 1.5;
}

.professional-form {
  padding: 0;
}

.form-section {
  padding: 40px;
  border-bottom: 1px solid #f3f4f6;
}

.form-section:last-child {
  border-bottom: none;
}

.section-header {
  margin-bottom: 32px;
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 2px solid #f3f4f6;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
  letter-spacing: -0.3px;
}

.section-subtitle {
  color: #6b7280;
  font-size: 15px;
  margin: 0;
  line-height: 1.4;
}

/* Profile Upload Styles */
.profile-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 400px;
  margin: 0 auto;
}

.profile-upload-zone {
  width: 300px;
  height: 200px;
  border: 3px dashed #d1d5db;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f9fafb;
  position: relative;
  overflow: hidden;
}

.profile-upload-zone:hover {
  border-color: #667eea;
  background: #f0f7ff;
  transform: translateY(-2px);
}

.profile-upload-zone.drag-over {
  border-color: #667eea;
  background: linear-gradient(45deg, #f0f7ff, #e0f2fe);
  transform: scale(1.02);
}

.profile-upload-zone.has-file {
  border-color: #10b981;
  background: #f0fdf4;
}

.profile-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.upload-text {
  text-align: center;
  margin-bottom: 8px;
}

.upload-text strong {
  display: block;
  color: #374151;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.upload-text span {
  color: #6b7280;
  font-size: 14px;
}

.upload-note {
  color: #9ca3af;
  font-size: 12px;
}

/* Form Grid and Fields */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field-full {
  grid-column: 1 / -1;
}

.field-label {
  font-weight: 600;
  color: #374151;
  font-size: 15px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-mark {
  color: #ef4444;
  font-weight: 700;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  padding: 14px 16px;
  padding-right: 48px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
  color: #374151;
  font-weight: 500;
}

.input-wrapper textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

.input-wrapper .input-icon {
  position: absolute;
  right: 14px;
  font-size: 16px;
  pointer-events: none;
  opacity: 0.6;
  z-index: 1;
}

.input-wrapper .textarea-icon {
  top: 14px;
  right: 14px;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.input-wrapper input:hover:not(:focus),
.input-wrapper select:hover:not(:focus),
.input-wrapper textarea:hover:not(:focus) {
  border-color: #d1d5db;
}

/* Field Help and Error Styles */
.field-help {
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.4;
}

.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

.error-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.error-text {
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
}

/* Enhanced Action Buttons */
.form-actions {
  padding: 40px;
  background: #f9fafb;
  display: flex;
  justify-content: center;
  gap: 20px;
  border-top: 1px solid #f3f4f6;
}

.btn-primary-large,
.btn-secondary-large {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  min-width: 160px;
  justify-content: center;
}

.btn-primary-large {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a67d8 0%, #6b46a3 100%);
}

.btn-secondary-large {
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}

.btn-secondary-large:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .professional-form-container {
    margin: 20px;
    border-radius: 16px;
  }
  
  .form-header {
    padding: 30px 24px 24px;
  }
  
  .form-title {
    font-size: 24px;
  }
  
  .form-subtitle {
    font-size: 14px;
  }
  
  .form-section {
    padding: 24px;
  }
  
  .section-title {
    font-size: 20px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .profile-upload-zone {
    width: 100%;
    max-width: 280px;
    height: 180px;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 12px;
    padding: 24px;
  }
  
  .btn-primary-large,
  .btn-secondary-large {
    width: 100%;
  }
}

/* Legacy Form Container (for backwards compatibility) */
.form-container {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  max-width: 800px;
}

.form-container .form-group {
  margin-bottom: 20px;
}

.form-container .form-group label {
  display: block;
  margin-bottom: 5px;
  color: #374151;
  font-weight: 500;
}

.form-container .form-group input,
.form-container .form-group select,
.form-container .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-container .form-group input:focus,
.form-container .form-group select:focus,
.form-container .form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-container .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-container .btn-primary {
  background: #2563eb;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.form-container .btn-primary:hover {
  background: #1e40af;
}

.form-container .btn-secondary {
  background: #6b7280;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
  text-decoration: none;
  display: inline-block;
}

.form-container .btn-secondary:hover {
  background: #4b5563;
}

/* Table */
.table-container {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  overflow-x: auto;
  max-width: 100%;
}

.breakdown-container .table-container {
  margin-top: 15px;
  padding: 15px;
}

.breakdown-container table {
  width: 100%;
  font-size: 13px;
  min-width: 800px;
}

.breakdown-container th {
  padding: 10px 8px;
  font-size: 12px;
  white-space: nowrap;
  background: #f8fafc;
  font-weight: 600;
}

.breakdown-container td {
  padding: 8px;
  font-size: 13px;
  white-space: nowrap;
}

.breakdown-container .amount {
  text-align: right;
  font-weight: 500;
  font-family: 'Courier New', monospace;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th { 
  color: #6b7280; 
  font-size: 13px; 
}

td { 
  color: #111827; 
  font-size: 14px; 
}

.status {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  display: inline-block;
}

.active { 
  background: #dcfce7; 
  color: #166534; 
}

.pending { 
  background: #fee2e2; 
  color: #991b1b; 
}

.partial { 
  background: #fef3c7; 
  color: #92400e; 
}

.paid { 
  background: #dcfce7; 
  color: #166534; 
}

.overdue { 
  background: #fecaca; 
  color: #dc2626; 
}

/* Messages */
.messages {
  margin-bottom: 20px;
}

.messages .alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fecaca;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Search and Filter */
.filters {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  align-items: end;
}

.search-box {
  position: relative;
}

.search-box input {
  padding-left: 40px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
}

.pagination a,
.pagination span {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s;
}

.pagination a:hover {
  background: #f3f4f6;
}

.pagination .current {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* Responsive */
@media (max-width: 1024px) {
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .filter-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  
  .sidebar { 
    width: 100%;
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  
  .sidebar h2 {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  .sidebar a {
    padding: 10px 12px;
    margin-bottom: 5px;
    font-size: 14px;
  }
  
  .main {
    padding: 15px;
  }
  
  .topbar {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    text-align: center;
  }
  
  .topbar h1 { 
    font-size: 20px; 
  }
  
  .admin-profile {
    text-align: center;
  }
  
  .cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .actions button, .actions a button {
    width: 100%;
    padding: 15px;
  }
  
  .filter-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .form-container {
    padding: 20px;
    margin: 0;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  /* Table responsive */
  .table-container {
    overflow-x: auto;
    padding: 15px;
  }
  
  table {
    min-width: 600px;
  }
  
  th, td {
    padding: 8px;
    font-size: 13px;
  }
  
  /* Mobile table cards alternative */
  .table-mobile {
    display: none;
  }
  
  .table-mobile .table-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .table-mobile .table-card h4 {
    color: #1e3a8a;
    margin-bottom: 10px;
    font-size: 16px;
  }
  
  .table-mobile .table-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
  }
  
  .table-mobile .table-row:last-child {
    border-bottom: none;
  }
  
  .table-mobile .table-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 14px;
  }
  
  .table-mobile .table-value {
    color: #111827;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    padding: 10px;
  }
  
  .main {
    padding: 10px;
  }
  
  .form-container {
    padding: 15px;
  }
  
  .card {
    padding: 15px;
  }
  
  .card h3 { 
    font-size: 13px; 
  }
  
  .card p { 
    font-size: 22px; 
  }
  
  .actions button, .actions a button {
    padding: 12px;
    font-size: 13px;
  }
  
  .filters {
    padding: 15px;
  }
  
  .form-container .form-group input,
  .form-container .form-group select,
  .form-container .form-group textarea {
    padding: 12px;
    font-size: 13px;
  }
  
  .table-container {
    padding: 10px;
  }
  
  /* Show mobile cards, hide regular table on very small screens */
  table {
    display: none;
  }
  
  .table-mobile {
    display: block;
  }
  
  .pagination {
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .pagination a,
  .pagination span {
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* Tablet specific styles */
@media (min-width: 768px) and (max-width: 1024px) {
  .sidebar {
    width: 200px;
  }
  
  .sidebar h2 {
    font-size: 16px;
  }
  
  .sidebar a {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .main {
    padding: 20px;
  }
  
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .filter-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Navigation toggle for mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  padding: 5px;
  cursor: pointer;
  position: absolute;
  right: 15px;
  top: 15px;
}

.sidebar.collapsed {
  display: none;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
  
  body {
    flex-direction: column;
  }
  
  .main {
    width: 100%;
  }
  
  .topbar {
    position: relative;
    padding-right: 50px;
  }
}

/* Additional utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }

/* Filter responsive styles */
@media (max-width: 768px) {
  .filters-container {
    flex-direction: column !important;
    gap: 16px;
    align-items: stretch !important;
  }
  
  .filter-group {
    min-width: auto !important;
  }
  
  .filter-actions {
    justify-content: center;
    margin-top: 16px;
  }
  
  .filter-actions .btn-primary,
  .filter-actions .btn-secondary {
    width: 100%;
    margin: 4px 0 !important;
  }
}

/* Compact table action buttons */
.btn-compact {
  padding: 4px 8px !important;
  font-size: 11px !important;
  min-height: auto !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  margin: 0 2px !important;
}

/* Table specific optimizations */
table {
  table-layout: fixed;
}

table td:last-child {
  width: 280px;
  max-width: 280px;
  overflow: visible;
}

/* Action button container */
.action-buttons {
  display: flex !important;
  gap: 3px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

/* Responsive breakdown table */
@media (max-width: 768px) {
  .breakdown-container .table-container {
    padding: 10px;
    margin: 0 -10px;
    border-radius: 0;
  }
  
  .breakdown-container table {
    font-size: 11px;
    min-width: 700px;
  }
  
  .breakdown-container th,
  .breakdown-container td {
    padding: 6px 4px;
  }
  
  .breakdown-container th {
    font-size: 11px;
  }
}