/* mobile.css */
/* Styles applied only on small screens (phones/tablets) */
@media only screen and (max-width: 768px) {

  /* === Header === */
  header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  header h1 {
    font-size: 22px;
    margin: 0;
  }

  #globalSearch,
  #columnFilter {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
  }

  /* === Hamburger button === */
  .hamburger {
    display: block;
    font-size: 28px;
    background: none;
    border: none;
    color: #0d2a59;
    padding: 8px 12px;
    cursor: pointer;
    width: 48px;
  }

  /* === Mobile menu === */
  .menu {
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 10px;
    padding: 10px;
  }

  .menu.open {
    display: block;
  }

  .menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .menu li {
    margin-bottom: 8px;
  }

  .menu a {
    display: block;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 6px;
    color: #0d2a59;
    text-decoration: none;
    font-size: 17px;
  }

  .menu a.active {
    background: #0d2a59 !important;
    color: #fff !important;
  }

  /* === Grid section === */
  #gridSection {
    padding: 12px;
  }

  #grid {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
  }

  #grid table {
    min-width: 650px;
    border-collapse: collapse;
    font-size: 15px;
  }

  #grid th {
    position: sticky;
    top: 0;
    background-color: #0d2a59;
    color: #fff;
    z-index: 2;
    padding: 10px;
    text-align: left;
    font-size: 15px;
  }

  #grid td {
    padding: 8px;
    white-space: nowrap;
    font-size: 14px;
  }

  /* === Actions bar === */
  .actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
  }

  .actions .left {
    width: 100%;
  }

  /* Mobile dropdown for actions */
  #mobileActions {
    width: 100%;
    font-size: 17px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #bbb;
    background: #fff;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #0d2a59 50%),
                      linear-gradient(135deg, #0d2a59 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 4px),
                         calc(100% - 15px) calc(50% - 4px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
  }

  /* Hide desktop buttons on mobile */
  #addRow,
  #exportCsv {
    display: none !important;
  }

  /* === Pagination controls === */
  .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
  }

  .pagination button {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
  }

  /* === Grid title === */
  #gridTitle {
    font-size: 20px;
    margin-bottom: 12px;
  }

  /* === Active button/link styles === */
  button.active,
  a.active {
    background-color: #0d2a59;
    color: #fff;
    border: 1px solid #0d2a59;
  }

  button.active:focus,
  button.active:hover,
  a.active:focus,
  a.active:hover,
  a.active:visited {
    color: #fff !important;
    background-color: #0d2a59 !important;
    border-color: #0d2a59 !important;
    text-decoration: none;
  }

  .actions button.active,
  .pagination button.active,
  #menu a.active,
  .tabs a.active {
    color: #fff !important;
    background-color: #0d2a59 !important;
    border-color: #0d2a59 !important;
  }

  a.active {
    -webkit-text-fill-color: #fff;
  }
}

#mobileActions {
  display: block !important;
}

