/* RK Express — Gestão de Motoboys responsiva */

#admin-motoboys-panel,
#admin-motoboys-panel * {
  box-sizing: border-box;
}

#admin-motoboys-panel {
  max-width: 100%;
}

#admin-motoboys-panel input,
#admin-motoboys-panel select,
#admin-motoboys-panel textarea {
  min-width: 0;
}

#lista-motoboys-admin article p,
#lista-motoboys-admin article h4 {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 760px) {
  #admin-motoboys-panel {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px !important;
    margin: 0 !important;
    overflow: hidden;
  }

  #admin-motoboys-panel > h3 {
    font-size: 25px;
    line-height: 1.2;
  }

  #admin-motoboys-panel > .footer-note {
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
  }

  #admin-motoboys-panel .section-box {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden;
  }

  #admin-motoboys-panel .section-box > div[style*="grid-template-columns"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
  }

  #admin-motoboys-panel [style*="grid-column"] {
    grid-column: auto !important;
  }

  #admin-motoboys-panel label {
    display: block;
    width: 100%;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.3;
  }

  #admin-motoboys-panel input,
  #admin-motoboys-panel select,
  #admin-motoboys-panel textarea {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 16px !important;
  }

  #admin-motoboys-panel input[type="file"] {
    min-height: 58px;
    padding: 10px !important;
    white-space: normal;
  }

  #admin-motoboys-panel .section-box > div[style*="display:flex"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
  }

  #admin-motoboys-panel .section-box button {
    width: 100% !important;
    max-width: 100% !important;
  }

  #admin-motoboys-panel > div[style*="justify-content:space-between"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  #busca-motoboys-admin {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  #total-motoboys-admin {
    display: block;
    text-align: left;
  }

  #lista-motoboys-admin {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #lista-motoboys-admin article {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
    overflow: hidden;
  }

  #lista-motoboys-admin article > div {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    align-items: start !important;
  }

  #lista-motoboys-admin article > div:not(:has(> img)) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #lista-motoboys-admin article > div > img {
    grid-column: 1;
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
  }

  #lista-motoboys-admin article > div > div:nth-last-child(2) {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #lista-motoboys-admin article > div:not(:has(> img)) > div:nth-last-child(2) {
    grid-column: 1;
  }

  #lista-motoboys-admin article h4,
  #lista-motoboys-admin article p {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
  }

  #lista-motoboys-admin article > div > div:last-child {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  #lista-motoboys-admin article > div > div:last-child button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

@media (max-width: 390px) {
  #lista-motoboys-admin article > div {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #lista-motoboys-admin article > div > img {
    grid-column: 1;
    width: 82px !important;
    height: 82px !important;
    max-width: 82px !important;
  }

  #lista-motoboys-admin article > div > div:nth-last-child(2) {
    grid-column: 1;
  }

  #lista-motoboys-admin article > div > div:last-child {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}