body {
  background: #f4f6f9;
}

.tab-btn {
  color: rgba(255,255,255,.75);
  border: none;
  background: transparent;
}
.tab-btn.active, .tab-btn:hover {
  color: #fff;
  font-weight: 600;
}

.card-stat {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.table-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  padding: 1.25rem;
}

.badge-status-functional { background:#198754; }
.badge-status-maintenance { background:#fd7e14; }
.badge-status-damaged { background:#dc3545; }

.badge-res-reserved { background:#0d6efd; }
.badge-res-checked_out { background:#fd7e14; }
.badge-res-returned { background:#198754; }
.badge-res-cancelled { background:#6c757d; }

.chip {
  display:inline-block;
  background:#eef2ff;
  color:#3730a3;
  border-radius:999px;
  padding:2px 10px;
  margin:2px;
  font-size:.8rem;
}

.item-picker {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: .5rem;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1d29 0%, #2d3250 100%);
  padding: 1rem;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
}

.login-logo {
  font-size: 2.5rem;
  color: #0d6efd;
}

.badge-role-admin { background:#6610f2; }
.badge-role-user { background:#6c757d; }

/* Tabelas com rolagem horizontal suave em telas pequenas, em vez de
   espremer todas as colunas ou quebrar o layout da página. */
.table-responsive {
  border-radius: 10px;
}
.table-responsive .table {
  margin-bottom: 0;
}

/* Ajustes para celular */
@media (max-width: 576px) {
  .container-fluid.py-4.px-4 {
    padding-left: .75rem !important;
    padding-right: .75rem !important;
    padding-top: 1rem !important;
  }

  .table-card {
    padding: .75rem;
    border-radius: 10px;
  }

  .table-card h3, h3 {
    font-size: 1.25rem;
  }

  .btn-sm {
    padding: .25rem .55rem;
    font-size: .8rem;
  }

  .chip {
    font-size: .72rem;
    padding: 1px 8px;
  }

  .navbar-brand {
    font-size: 1.05rem;
  }
  .navbar-brand i {
    font-size: 1.1rem;
  }

  #nav-tabs .tab-btn {
    font-size: .82rem;
    padding: .35rem .5rem;
  }

  .card-stat {
    padding: .85rem !important;
  }
  .card-stat .fs-4 {
    font-size: 1.15rem !important;
  }

  .login-card {
    padding: 2rem 1.25rem;
  }

  .modal-body {
    padding: 1rem;
  }

  /* Tabelas viram "cartões" empilhados no celular, em vez de espremer
     colunas ou exigir rolagem horizontal para achar os botões de ação. */
  .table-mobile-cards thead {
    display: none;
  }
  .table-mobile-cards, .table-mobile-cards tbody,
  .table-mobile-cards tr, .table-mobile-cards td {
    display: block;
    width: 100%;
  }
  .table-mobile-cards tr {
    margin-bottom: .6rem;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: .65rem .8rem;
  }
  .table-mobile-cards tr:last-child {
    margin-bottom: 0;
  }
  .table-mobile-cards td {
    border: none;
    padding: .3rem 0;
    text-align: left !important;
    white-space: normal !important;
  }
  .table-mobile-cards td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
    font-weight: 700;
    margin-bottom: .15rem;
  }
  .table-mobile-cards td.card-actions {
    display: flex;
    gap: .4rem;
    padding-top: .5rem;
    margin-top: .3rem;
    border-top: 1px dashed #e9ecef;
  }
}
