/* === RESPONSIVE IMPROVEMENTS FOR ADMIN PAGES === */

/* Common Responsive Styles */
@media (max-width: 1200px) {
    .container-fluid {
      padding-left: 10px;
      padding-right: 10px;
    }
  
    .card-body {
      padding: 1rem;
    }
  }
  
  /* Tablet Styles */
  @media (max-width: 992px) {
    /* Sidebar improvements */
    .sidebar {
      width: 240px;
      transform: translateX(-100%);
      z-index: 1050;
      box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
      transition: transform 0.3s ease;
    }
  
    .sidebar.show {
      transform: translateX(0);
    }
  
    .main-content {
      margin-left: 0;
      width: 100%;
      transition: margin-left 0.3s ease;
    }
  
    /* Form improvements */
    .form-group {
      margin-bottom: 0.75rem;
    }
  
    /* Card height adjustments */
    .editor-card .card-body,
    .info-card .card-body {
      height: auto;
      min-height: 0;
    }
  
    /* Table improvements */
    .table-responsive {
      border: 0;
    }
  
    /* Button spacing */
    .btn {
      padding: 0.5rem 0.75rem;
    }
  
    /* Dashboard cards */
    .stat-card {
      margin-bottom: 1rem;
    }
  }
  
  /* Mobile Styles */
  @media (max-width: 768px) {
    /* Header adjustments */
    .page-header {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .page-actions {
      margin-top: 1rem;
      width: 100%;
      display: flex;
      justify-content: space-between;
    }
  
    /* Form improvements */
    .form-control,
    .form-select {
      font-size: 16px; /* Prevents iOS zoom on focus */
    }
  
    /* Card adjustments */
    .card {
      margin-bottom: 1rem;
    }
  
    /* Table improvements */
    .table th,
    .table td {
      padding: 0.5rem;
    }
  
    /* Modal adjustments */
    .modal-dialog {
      margin: 0.5rem;
    }
  
    /* Login container */
    .login-container {
      width: 90%;
      max-width: 350px;
      padding: 1.25rem;
    }
  
    /* Dashboard layout */
    .stat-card h3 {
      font-size: 1.5rem;
    }
  
    /* Button improvements */
    .btn-group .btn {
      padding: 0.25rem 0.5rem;
    }
  
    /* Sidebar toggle button */
    .toggle-sidebar {
      display: block;
    }
  }
  
  /* Small Mobile Styles */
  @media (max-width: 576px) {
    /* Header adjustments */
    .page-title {
      font-size: 1.25rem;
    }
  
    /* Form improvements */
    .form-label {
      font-size: 0.85rem;
    }
  
    /* Card adjustments */
    .card-header {
      padding: 0.75rem 1rem;
    }
  
    /* Table improvements */
    .table th {
      font-size: 0.7rem;
    }
  
    /* Hide less important columns on small screens */
    .table-responsive .d-sm-none {
      display: none !important;
    }
  
    /* Button improvements */
    .btn-submit {
      font-size: 1rem;
      padding: 0.6rem 1rem;
    }
  
    /* Modal adjustments */
    .modal-body {
      padding: 1rem;
    }
  
    /* Dashboard cards */
    .stat-card i {
      font-size: 1.25rem;
    }
  
    /* Improve form spacing */
    .mb-3 {
      margin-bottom: 0.5rem !important;
    }
  }
  
  /* Specific improvements for admin.html */
  @media (max-width: 992px) {
    #editor {
      min-height: 120px;
    }
  
    .info-card .card-body {
      min-height: auto;
    }
  
    .file-input-btn {
      padding: 0.75rem;
    }
  
    .preview-placeholder {
      height: 120px;
    }
  }
  
  /* Specific improvements for login page */
  @media (max-width: 576px) {
    .login-container {
      padding: 1rem;
    }
  
    .logo-container img {
      max-width: 100px;
    }
  
    .success-animation {
      width: 60px;
      height: 60px;
    }
  
    .checkmark {
      width: 60px;
      height: 60px;
    }
  }
  
  /* Specific improvements for dashboard */
  @media (max-width: 768px) {
    .navbar {
      padding: 0.5rem 1rem;
    }
  
    .navbar-brand img {
      height: 35px;
    }
  
    .media-item img {
      height: 150px;
    }
  
    .media-item .media-overlay {
      padding: 8px;
    }
  }
  
  /* Fix for iOS input zoom */
  @media screen and (-webkit-min-device-pixel-ratio: 0) {
    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"],
    input[type="color"] {
      font-size: 16px;
    }
  }
  
  /* Improved sidebar toggle for mobile */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
  }
  
  .sidebar-backdrop.show {
    display: block;
  }
  
  /* Improved toast positioning for mobile */
  @media (max-width: 576px) {
    .toast-container {
      padding: 0.5rem;
      max-width: 90%;
      right: 5%;
    }
  
    .toast {
      max-width: 100%;
    }
  }
  
  /* Improved table responsiveness */
  @media (max-width: 768px) {
    .table-responsive-improved th:not(:first-child):not(:last-child),
    .table-responsive-improved td:not(:first-child):not(:last-child) {
      display: none;
    }
  
    .table-responsive-improved th:first-child,
    .table-responsive-improved td:first-child {
      width: 70%;
    }
  
    .table-responsive-improved th:last-child,
    .table-responsive-improved td:last-child {
      width: 30%;
    }
  }
  
  /* Improved form layout for mobile */
  @media (max-width: 576px) {
    .form-row-mobile {
      flex-direction: column;
    }
  
    .form-row-mobile > div {
      width: 100%;
      margin-right: 0;
    }
  }
  