/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background-color: #2c3e50;
  color: white;
  padding: 1rem;
  text-align: center;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

/* Navigation */
.navigation {
  background-color: #34495e;
  padding: 0.75rem;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 99;
}

.navigation a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
  white-space: nowrap;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.navigation a:hover,
.navigation a:focus {
  background-color: #2c3e50;
  outline: none;
}

/* Manage dropdown */
.manage-dropdown {
  position: relative;
  display: inline-block;
}

.manage-dropdown button.nav-manage-toggle {
  background: none;
  border: 0;
  font: inherit;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
  transition: background-color 0.3s;
}

.manage-dropdown button.nav-manage-toggle:hover,
.manage-dropdown button.nav-manage-toggle:focus,
.manage-dropdown.open button.nav-manage-toggle {
  background: #2c3e50;
  outline: none;
}

.manage-dropdown .caret {
  font-size: 0.8rem;
  line-height: 1;
  transition: transform 0.2s ease;
  margin-left: 0.2rem;
}

.manage-dropdown.open .caret {
  transform: rotate(180deg);
}

.manage-dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #34495e;
  display: none;
  flex-direction: column;
  min-width: 160px;
  padding: 0.35rem 0;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.manage-dropdown.open .dropdown-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.manage-dropdown .dropdown-menu a {
  padding: 0.75rem 0.9rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
  color: white;
  text-decoration: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

.manage-dropdown .dropdown-menu a:hover,
.manage-dropdown .dropdown-menu a:focus {
  background: #2c3e50;
  outline: none;
}

/* Mobile optimizations for dropdown */
@media (max-width: 768px) {
  .manage-dropdown button.nav-manage-toggle {
    padding: 0.75rem 1rem;
    min-height: 48px;
  }

  .manage-dropdown .dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
    min-width: 180px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1001;
  }

  .manage-dropdown .dropdown-menu a {
    padding: 1rem;
    min-height: 48px;
    font-size: 1rem;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .navigation {
    padding: 0.5rem;
    justify-content: space-around;
  }

  .navigation a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .manage-dropdown .dropdown-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    min-width: 100%;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    max-height: 50vh;
    overflow-y: auto;
    z-index: 1002;
  }

  .manage-dropdown .dropdown-menu::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
}

.main-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
}

.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

/* Form styles */
.form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  min-height: 44px;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Button styles */
.btn {
  background-color: #3498db;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: inherit;
  font-weight: 400;
  line-height: 1.5;
}

.btn:hover,
.btn:focus {
  background-color: #2980b9;
  text-decoration: none;
  color: white;
  outline: none;
}

.btn-secondary {
  background-color: #95a5a6;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #7f8c8d;
}

.btn-small {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  min-height: 44px;
  line-height: 1.2;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Button color variants for consistent styling across management pages */
.btn-primary {
  background-color: #3498db;
  color: white;
  border: none;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
  border: none;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-success {
  background-color: #27ae60;
  color: white;
  border: none;
}

.btn-success:hover {
  background-color: #229954;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
  border: none;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-warning {
  background-color: #ffc107;
  color: #212529;
  border: 1px solid #ffc107;
}

.btn-warning:hover,
.btn-warning:focus {
  background-color: #e0a800;
  border-color: #d39e00;
  color: #212529;
  text-decoration: none;
}

.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Message styles */
.messages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.message.error {
  background-color: #e74c3c;
  color: white;
}

.message.success {
  background-color: #27ae60;
  color: white;
}

.message.info {
  background-color: #3498db;
  color: white;
}

/* Profile styles */
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-info {
  background-color: #ecf0f1;
  padding: 1.5rem;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-info h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.25rem;
}

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

.profile-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.profile-detail strong {
  color: #34495e;
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-detail span {
  color: #2c3e50;
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
  margin-top: 1rem;
}

.auth-links a {
  color: #3498db;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.auth-links a:hover {
  background-color: #ecf0f1;
}

/* Customer info panel */
.customer-info-panel {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 98;
}

.customer-info-content {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.customer-info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}

.customer-info-label {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.customer-info-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.balance-positive {
  color: #2ecc71;
}

.balance-negative {
  color: #e74c3c;
}

.balance-zero {
  color: #f39c12;
}

.classes-remaining {
  color: #3498db;
}

/* Typography utilities */
.text-center {
  text-align: center;
}

.page-title {
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.page-subtitle {
  color: #7f8c8d;
  margin-bottom: 2rem;
}

.section-title {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.section-description {
  color: #7f8c8d;
  margin-bottom: 1.5rem;
}

/* Status indicators */
.status-active {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-inactive {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Alert styles */
.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-info {
  background-color: #e3f2fd;
  border: 1px solid #bbdefb;
  color: #1565c0;
}

.alert strong {
  font-weight: 600;
}

.alert-content {
  margin-top: 0.5rem;
}

.alert-content div {
  margin-bottom: 0.25rem;
}

.alert-content div:last-child {
  margin-bottom: 0;
}

/* Form validation styles */
.form-error {
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-help {
  color: #6c757d;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Action grid */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.action-card {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.action-card h4 {
  margin: 0 0 0.75rem 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.action-card p {
  margin: 0 0 1rem 0;
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.5;
  flex-grow: 1;
}

/* Feature list */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #34495e;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-bullet {
  color: #3498db;
  font-weight: bold;
}

/* Recent activity */
.activity-placeholder {
  color: #7f8c8d;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background-color: #3498db;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

.fab:hover {
  background-color: #2980b9;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.6);
  color: white;
  text-decoration: none;
}

.fab:active {
  transform: scale(0.95);
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
  .header {
    padding: 0.75rem;
  }

  .main-wrapper {
    padding: 0.75rem;
  }

  .card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .form-wrapper {
    max-width: none;
  }

  .btn-group {
    flex-direction: column;
  }

  .profile-detail {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }

  .profile-detail strong {
    flex-shrink: 0;
    margin-right: 1rem;
  }

  .customer-info-content {
    gap: 1rem;
  }

  .customer-info-item {
    min-width: 100px;
  }

  .customer-info-label {
    font-size: 0.75rem;
  }

  .customer-info-value {
    font-size: 1rem;
  }

  .fab {
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .action-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .action-card {
    padding: 1rem;
  }
}

/* Tablet adjustments */
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    max-width: 600px;
  }

  .form-wrapper {
    max-width: 450px;
  }
}

/* Desktop adjustments */
@media (min-width: 769px) {
  .main-wrapper {
    padding: 2rem;
  }

  .container {
    max-width: 800px;
  }

  .profile-detail {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }

  .profile-detail strong {
    flex-shrink: 0;
    margin-right: 2rem;
  }

  .btn-group {
    flex-direction: row;
    justify-content: center;
  }
}

/* Desktop responsive styling for management interface */
@media (min-width: 768px) {
  .mgmt-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr 1fr auto;
    gap: 1.5rem;
    align-items: end;
  }

  .mgmt-filters .form-group {
    margin-bottom: 0;
  }

  .mgmt-submit {
    align-self: end;
  }

  .action-buttons {
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .management-cards {
    gap: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .mgmt-filters {
    grid-template-columns: 2.5fr 1.2fr 1.2fr 1.8fr 1.2fr auto;
    gap: 2rem;
  }
}

/* Mobile responsive for filters */
@media (max-width: 767px) {
  .mgmt-filters {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
  }

  .mgmt-filters .form-group {
    width: 100%;
  }

  .mgmt-submit {
    align-self: stretch;
  }

  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Action buttons shared styling */
.action-buttons {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.action-buttons .btn {
  min-width: 120px;
  white-space: nowrap;
}

/* Card layout shared styles */
.management-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.management-card {
  background: white;
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.management-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #3498db;
}

/* Status badges shared styling */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.status-badge.active,
.status-badge.upcoming {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.status-badge.inactive,
.status-badge.cancelled {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.status-badge.past {
  background-color: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
}

/* Management filters shared styling */
.mgmt-filters {
  background: white;
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mgmt-filters .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.mgmt-filters .form-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.mgmt-filters .form-control,
.mgmt-filters .form-select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.mgmt-filters .btn {
  align-self: flex-start;
  margin-top: auto;
}

.mgmt-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.mgmt-status-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  margin: 0;
  cursor: pointer;
}

.mgmt-submit {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-start;
  margin-top: 1rem;
}

.mgmt-submit .btn {
  min-width: 100px;
}

/* Search and pagination shared styling */
.search-pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-form input[type="text"] {
  min-width: 200px;
  flex: 1;
}

/* Unified pagination styling - Intuitive Layout with Smart Numbers */
.pagination-wrapper,
.pagination {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  max-width: 100%;
  overflow: hidden;
}

/* Top position styling for pagination at top of lists */
.pagination-top-position {
  margin-top: 0;
  margin-bottom: 2rem;
}

/* When page size selector is hidden */
.pagination-no-page-size .pagination-top {
  justify-content: center;
}

/* Top row: Results info and page size */
.pagination-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

/* Bottom row: Navigation controls centered */
.pagination-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination-info,
.pagination-stats {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.pagination-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  background: #f8fafc;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: hidden;
}

.page-current,
.pagination-page-label {
  font-weight: 600;
  color: white !important;
  margin: 0;
  font-size: 0.875rem;
  padding: 0.375rem 0.25rem;
  background: #3b82f6 !important;
  border-radius: 4px;
  border: 1px solid #3b82f6 !important;
  min-width: 24px;
  min-height: 32px;
  text-align: center;
  cursor: default;
  box-shadow: 0 1px 2px rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-link {
  background: white;
  color: #475569;
  padding: 0.375rem 0.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
  line-height: 1;
  min-height: 32px;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Different styles for page numbers vs nav buttons */
.page-number {
  min-width: 24px;
}

.page-nav-btn {
  min-width: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.page-ellipsis {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  cursor: default !important;
  padding: 0.5rem 0.25rem;
  min-width: 20px;
}

.page-link:hover,
.page-link:focus {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  text-decoration: none;
  outline: none;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.page-ellipsis:hover,
.page-ellipsis:focus {
  background: transparent !important;
  color: #94a3b8 !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.pagination-disabled {
  background: #f8fafc !important;
  color: #cbd5e1 !important;
  cursor: not-allowed !important;
  border-color: #f1f5f9 !important;
}

.pagination-disabled:hover,
.pagination-disabled:focus {
  background: #f8fafc !important;
  color: #cbd5e1 !important;
  border-color: #f1f5f9 !important;
  box-shadow: none !important;
  transform: none !important;
}

.page-size-selector,
.pagination-main {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.page-size-selector label,
.pagination-main label {
  font-size: 0.875rem;
  color: #475569;
  font-weight: 500;
  white-space: nowrap;
}

.page-size-selector select,
.pagination-main select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #374151;
  min-height: 40px;
  min-width: 80px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-size-selector select:hover,
.pagination-main select:hover {
  border-color: #3b82f6;
}

.page-size-selector select:focus,
.pagination-main select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pagination-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

/* No results shared styling */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
  font-style: italic;
}

/* Responsive adjustments for management interface */
@media (max-width: 768px) {
  .action-buttons {
    justify-content: center;
  }

  .search-pagination-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form {
    justify-content: center;
  }

  .search-form input[type="text"] {
    min-width: 150px;
  }

  /* Mobile pagination - COMPACT, single line, no horizontal scroll */
  .pagination,
  .pagination-wrapper {
    padding: 0.75rem;
    margin-top: 0.75rem;
  }

  .pagination-top {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
  }

  .pagination-no-page-size .pagination-top {
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
  }

  .pagination-info,
  .pagination-stats {
    font-size: 0.8rem;
    color: #64748b;
    order: 1;
    margin: 0;
  }

  .page-size-selector,
  .pagination-main {
    display: none !important; /* Hide on mobile by default */
  }

  .pagination-bottom {
    margin-top: 0;
  }

  .pagination-nav,
  .pagination-controls {
    flex-direction: row;
    gap: 0.125rem;
    padding: 0.375rem 0.25rem;
    background: #f8fafc;
    border-radius: 6px;
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: hidden;
    max-width: 100%;
  }

  .page-link {
    min-width: 18px;
    padding: 0.25rem 0.1rem;
    font-size: 0.75rem;
    min-height: 28px;
    flex-shrink: 1;
  }

  .page-number {
    min-width: 18px;
    padding: 0.25rem 0.1rem;
  }

  .page-nav-btn {
    min-width: 16px;
    font-size: 0.75rem;
    padding: 0.25rem 0.1rem;
  }

  .page-current,
  .pagination-page-label {
    min-width: 18px;
    padding: 0.25rem 0.1rem;
    font-size: 0.75rem;
    margin: 0;
    min-height: 28px;
    flex-shrink: 1;
    background: #3b82f6 !important;
    color: white !important;
    border: 1px solid #3b82f6 !important;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.3);
  }

  .page-ellipsis {
    min-width: 10px;
    padding: 0.25rem 0.025rem;
    font-size: 0.7rem;
  }

  /* Very small screens - ultra compact */
  @media (max-width: 480px) {
    .pagination,
    .pagination-wrapper {
      padding: 0.5rem 0.25rem;
      margin-top: 0.5rem;
    }

    .pagination-top {
      gap: 0.375rem;
      margin-bottom: 0.5rem;
      padding-bottom: 0.375rem;
    }

    .pagination-nav {
      flex-direction: row;
      gap: 0.1rem;
      padding: 0.375rem 0.125rem;
      flex-wrap: nowrap;
      overflow-x: hidden;
    }

    .page-link,
    .page-current {
      min-width: 16px;
      padding: 0.2rem 0.05rem;
      font-size: 0.7rem;
      min-height: 24px;
      flex-shrink: 1;
      white-space: nowrap;
    }

    .page-number {
      min-width: 16px;
      padding: 0.2rem 0.05rem;
    }

    .page-nav-btn {
      min-width: 14px;
      font-size: 0.7rem;
      padding: 0.2rem 0.05rem;
    }

    .page-current {
      background: #3b82f6 !important;
      color: white !important;
      border: 1px solid #3b82f6 !important;
    }

    .page-ellipsis {
      min-width: 8px;
      padding: 0.2rem 0.01rem;
      font-size: 0.65rem;
    }
  }

  .mgmt-status-group {
    justify-content: center;
  }

  .mgmt-submit {
    justify-content: center;
  }

  .mgmt-status-group {
    justify-content: center;
  }

  .mgmt-submit {
    justify-content: center;
  }
}

/* Tablet and larger screens */
@media (min-width: 769px) {
  .pagination-wrapper,
  .pagination {
    padding: 2rem;
  }

  .pagination-top {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .pagination-nav,
  .pagination-controls {
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .page-link {
    min-width: 36px;
    padding: 0.5rem 0.75rem;
  }

  .page-current,
  .pagination-page-label {
    min-width: 36px;
    padding: 0.5rem 0.75rem;
  }

  .page-size-selector,
  .pagination-main {
    padding: 1rem 1.25rem;
  }
}
