/* Main Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
}

/* Header Styles */
header {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1000;
}

/* Mobile Menu Button */
#mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Menu */
#mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1001;
  background-color: #7e22ce; /* Matching your pink-900 color */
}

#mobile-menu.active {
  display: block;
}

/* Mobile menu list */
#mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#mobile-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#mobile-menu li:last-child {
  border-bottom: none;
}

#mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: white;
  text-decoration: none;
  transition: background-color 0.3s;
}

#mobile-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #mobile-menu-btn {
    display: block;
  }
  
  nav:not(#mobile-menu) {
    display: none !important;
  }
  
  .navbar-nav {
    flex-direction: column;
  }
  
  .card {
    margin-bottom: 1.5rem;
  }
}

@media (min-width: 769px) {
  #mobile-menu {
    display: none !important;
  }
}

/* Button Styles */
.btn {
  transition: all 0.3s ease;
  font-weight: 500;
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: #7e22ce;
  border-color: #7e22ce;
  color: white;
}

.btn-primary:hover {
  background-color: #6b21a8;
  border-color: #6b21a8;
}

/* Card Styles */
.card {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: white;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.form-control {
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  border: 1px solid #D1D5DB;
  width: 100%;
  font-size: 0.875rem;
}

.form-control:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 0.25rem rgba(168, 85, 247, 0.25);
  outline: none;
}

/* Input label */
.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.input-field {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #D1D5DB;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

/* Table Styles */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #6b7280;
  padding: 0.75rem;
  text-align: left;
  background-color: #f9fafb;
}

.table td {
  padding: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

/* Modal Styles */
.modal-content {
  border: none;
  border-radius: 0.5rem;
  background: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Custom Colors */
.bg-primary-light {
  background-color: #f3e8ff;
}

.text-accent {
  color: #10b981;
}

.bg-accent-light {
  background-color: #d1fae5;
}

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

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

/* Utility classes */
.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

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

.justify-between {
  justify-content: space-between;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Ensure proper box sizing */
*, *::before, *::after {
  box-sizing: border-box;
}
/* ── Accessibility: High Contrast Mode ── */
html.high-contrast,
body.high-contrast {
    filter: contrast(1.5) !important;
}

/* ── Accessibility: Reduced Motion ── */
html.reduced-motion *,
html.reduced-motion *::before,
html.reduced-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* ── Responsive utilities ── */
/* Ensure all data tables scroll horizontally on small screens */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Prevent text overflow in table cells on mobile */
@media (max-width: 640px) {
    .admin-table td, .admin-table th { 
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    /* Stack label+control groups on mobile */
    .control-group { 
        min-width: 100% !important;
        flex: 1 1 100% !important;
    }
}

/* Ensure modals don't overflow on small screens */
.modal-inner {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal overflow globally */
body { overflow-x: hidden; }
