/* =============================
   RESPONSIVE DESIGN SYSTEM 2025
   Mobile-First Approach
   ============================= */

/* =============================
   1. BASE & RESET
   ============================= */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =============================
   2. CONTAINER SYSTEM
   ============================= */

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

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1280px) {
  .container {
    padding: 0 3rem;
  }
}

/* =============================
   3. GRID SYSTEM (Mobile-First)
   ============================= */

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

@media (min-width: 640px) {
  .grid-sm-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-sm-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .grid-md-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-md-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-md-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-lg-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-lg-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .grid-lg-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* =============================
   4. NAVIGATION - RESPONSIVE
   ============================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Menu Items */
.nav-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: white;
  padding: 5rem 2rem 2rem;
  transition: left 0.3s ease;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.nav-menu.active {
  left: 0;
}

.nav-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-menu a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.nav-menu a:hover {
  background: #f0f0f0;
  transform: translateX(4px);
}

/* Desktop Navigation */
@media (min-width: 768px) {
  .nav-menu {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    background: transparent;
    padding: 0;
    box-shadow: none;
    overflow-y: visible;
  }
  
  .nav-menu ul {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  
  .nav-menu a {
    padding: 0.5rem 1rem;
  }
}

/* Overlay for mobile menu */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* =============================
   5. HERO SECTION - RESPONSIVE
   ============================= */

.hero-section {
  padding: 3rem 1rem;
  text-align: center;
}

.hero-title {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .hero-section {
    padding: 4rem 1.5rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
}

@media (min-width: 768px) {
  .hero-section {
    padding: 5rem 2rem;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .hero-section {
    padding: 6rem 2rem;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.375rem;
  }
}

@media (min-width: 1280px) {
  .hero-section {
    padding: 8rem 3rem;
  }
  
  .hero-title {
    font-size: 4rem;
  }
}

/* =============================
   6. BUTTONS - RESPONSIVE
   ============================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-align: center;
  white-space: nowrap;
  min-width: 120px;
}

.btn-primary {
  background: linear-gradient(135deg, #0A4D8F 0%, #6366F1 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(10, 77, 143, 0.3);
}

.btn-secondary {
  background: white;
  color: #0A4D8F;
  border: 2px solid #0A4D8F;
}

.btn-full-mobile {
  width: 100%;
}

@media (min-width: 640px) {
  .btn-full-mobile {
    width: auto;
  }
  
  .btn {
    padding: 0.875rem 2rem;
  }
}

/* =============================
   7. CARDS - RESPONSIVE
   ============================= */

.card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
  .card {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .card {
    padding: 2.5rem;
  }
}

/* =============================
   8. FORMS - RESPONSIVE
   ============================= */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  transition: all 0.2s;
  -webkit-appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: #0A4D8F;
  box-shadow: 0 0 0 3px rgba(10, 77, 143, 0.1);
}

@media (min-width: 768px) {
  .form-label {
    font-size: 1rem;
  }
  
  .form-input {
    padding: 1rem 1.25rem;
  }
}

/* =============================
   9. DASHBOARD - RESPONSIVE
   ============================= */

.dashboard-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dashboard-sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
}

.dashboard-sidebar.active {
  left: 0;
}

.dashboard-main {
  flex: 1;
  padding: 1rem;
  margin-left: 0;
  transition: margin-left 0.3s ease;
}

@media (min-width: 768px) {
  .dashboard-sidebar {
    left: 0;
  }
  
  .dashboard-main {
    margin-left: 280px;
    padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .dashboard-main {
    padding: 2rem;
  }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #0A4D8F;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #666;
}

@media (min-width: 768px) {
  .stat-value {
    font-size: 2.5rem;
  }
  
  .stat-label {
    font-size: 1rem;
  }
}

/* =============================
   10. TABLES - RESPONSIVE
   ============================= */

.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 2rem;
}

.table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #1a1a1a;
  position: sticky;
  top: 0;
  z-index: 10;
}

@media (min-width: 768px) {
  .table {
    min-width: auto;
  }
  
  .table th,
  .table td {
    padding: 1.25rem 1.5rem;
  }
}

/* Mobile-Optimized Table (Cards) */
@media (max-width: 639px) {
  .table-mobile-cards {
    display: none;
  }
  
  .mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .mobile-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-card-header {
    font-weight: 600;
    color: #0A4D8F;
    margin-bottom: 1rem;
    font-size: 1.125rem;
  }
  
  .mobile-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .mobile-card-label {
    font-weight: 600;
    color: #666;
    font-size: 0.875rem;
  }
  
  .mobile-card-value {
    color: #1a1a1a;
    font-weight: 500;
  }
}

@media (min-width: 640px) {
  .table-mobile-cards {
    display: table;
  }
  
  .mobile-card-list {
    display: none;
  }
}

/* =============================
   11. MODALS - RESPONSIVE
   ============================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  overflow-y: auto;
}

.modal {
  background: white;
  border-radius: 1rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

@media (min-width: 640px) {
  .modal {
    max-width: 600px;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 2rem;
  }
  
  .modal-footer {
    flex-direction: row;
    justify-content: flex-end;
  }
}

/* =============================
   12. UTILITIES - RESPONSIVE
   ============================= */

/* Hide/Show */
.hide-mobile {
  display: none;
}

@media (min-width: 640px) {
  .hide-mobile {
    display: block;
  }
}

.show-mobile {
  display: block;
}

@media (min-width: 640px) {
  .show-mobile {
    display: none;
  }
}

/* Text Alignment */
.text-center-mobile {
  text-align: center;
}

@media (min-width: 768px) {
  .text-center-mobile {
    text-align: left;
  }
}

/* Spacing */
.spacing-sm {
  padding: 1rem;
}

.spacing-md {
  padding: 1.5rem;
}

.spacing-lg {
  padding: 2rem;
}

@media (min-width: 768px) {
  .spacing-sm {
    padding: 1.5rem;
  }
  
  .spacing-md {
    padding: 2rem;
  }
  
  .spacing-lg {
    padding: 3rem;
  }
}

/* Flex Utilities */
.flex-mobile-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .flex-mobile-column {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* =============================
   13. TOUCH OPTIMIZATIONS
   ============================= */

@media (hover: none) and (pointer: coarse) {
  /* Touch device optimizations */
  
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .form-input,
  .form-select {
    min-height: 44px;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  a,
  button {
    -webkit-tap-highlight-color: rgba(10, 77, 143, 0.2);
  }
}

/* =============================
   14. PRINT STYLES
   ============================= */

@media print {
  .navbar,
  .dashboard-sidebar,
  .mobile-menu-toggle,
  .btn,
  .modal-overlay {
    display: none !important;
  }
  
  .dashboard-main {
    margin-left: 0 !important;
  }
  
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
}

/* =============================
   15. ACCESSIBILITY
   ============================= */

/* Focus Visible (Keyboard Navigation) */
:focus-visible {
  outline: 3px solid #0A4D8F;
  outline-offset: 2px;
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================
   16. PERFORMANCE OPTIMIZATIONS
   ============================= */

/* GPU Acceleration for Smooth Animations */
.will-animate {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Lazy Load Images */
img[loading="lazy"] {
  background: #f0f0f0;
}

/* =============================
   END RESPONSIVE SYSTEM 2025
   ============================= */







