* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #222;
}

a {
    text-decoration: none;
}

/* Login */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1f2937;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.login-card h1 {
    margin: 0;
    text-align: center;
    color: #111827;
}

.login-card p {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

.login-card label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
}

.login-card input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.login-card button {
    width: 100%;
    margin-top: 20px;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.login-card button:hover {
    background: #1d4ed8;
}

.alerta {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alerta.erro {
    background: #fee2e2;
    color: #991b1b;
}

/* Sistema */

.app {
    min-height: 100vh;
}

.topo {
    background: #111827;
    color: #fff;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topo strong {
    font-size: 20px;
    display: block;
}

.topo span {
    font-size: 13px;
    color: #d1d5db;
}

.usuario-topo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-sair {
    background: #dc2626;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.conteudo {
    padding: 25px;
}

.titulo-area h1 {
    margin: 0;
    color: #111827;
}

.titulo-area p {
    color: #666;
}

.cards-resumo {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin: 25px 0;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card span {
    color: #666;
    font-size: 14px;
}

.card strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
    color: #111827;
}

.grid-menu {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.botao-menu {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #111827;
    border-radius: 14px;
    padding: 25px 15px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: 0.2s;
}

.botao-menu:hover {
    transform: translateY(-2px);
    background: #eff6ff;
    border-color: #2563eb;
}

.botao-menu span {
    display: block;
    font-size: 32px;
    margin-bottom: 8px;
}

.botao-menu.admin {
    background: #fff7ed;
    border-color: #fb923c;
}

/* Responsivo */

@media (max-width: 900px) {
    .cards-resumo {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-menu {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .topo {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .usuario-topo {
        width: 100%;
        justify-content: space-between;
    }

    .conteudo {
        padding: 15px;
    }

    .cards-resumo {
        grid-template-columns: 1fr;
    }

    .grid-menu {
        grid-template-columns: 1fr;
    }

    .botao-menu {
        padding: 20px;
    }
}
/* Botões e áreas */

.linha-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.btn-principal,
.btn-secundario,
.btn-perigo {
    display: inline-block;
    padding: 11px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.btn-principal {
    background: #2563eb;
    color: #fff;
}

.btn-principal:hover {
    background: #1d4ed8;
}

.btn-secundario {
    background: #e5e7eb;
    color: #111827;
}

.btn-secundario:hover {
    background: #d1d5db;
}

.btn-perigo {
    background: #dc2626;
    color: #fff;
}

.btn-perigo:hover {
    background: #b91c1c;
}

/* Filtros */

.filtros {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin: 20px 0;
}

.filtros form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filtros input,
.filtros select {
    padding: 11px;
    border: 1px solid #ccc;
    border-radius: 8px;
    min-width: 220px;
}

.filtros button {
    padding: 11px 16px;
    border: none;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    cursor: pointer;
}

/* Tabelas */

.tabela-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 13px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}

table th {
    background: #f9fafb;
    color: #374151;
}

table tr:hover td {
    background: #f9fafb;
}

.acoes {
    white-space: nowrap;
    text-align: right;
}

.btn-tabela {
    display: inline-block;
    padding: 7px 9px;
    border-radius: 6px;
    font-size: 12px;
    margin-left: 4px;
    color: #fff;
}

.btn-tabela.visualizar {
    background: #2563eb;
}

.btn-tabela.editar {
    background: #059669;
}

.btn-tabela.excluir {
    background: #dc2626;
}

.sem-registro {
    text-align: center;
    color: #666;
    padding: 25px;
}

/* Badges */

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    text-transform: capitalize;
}

.status-disponivel {
    background: #dcfce7;
    color: #166534;
}

.status-em_uso {
    background: #dbeafe;
    color: #1e40af;
}

.status-manutencao {
    background: #fef3c7;
    color: #92400e;
}

.status-inativa {
    background: #fee2e2;
    color: #991b1b;
}

/* Formulários */

.form-card,
.confirm-card,
.detalhes-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 22px;
    margin-top: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-grid label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #374151;
}

.form-grid input,
.form-grid select {
    width: 100%;
    padding: 11px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.form-acoes,
.voltar-area {
    margin-top: 22px;
    display: flex;
    gap: 10px;
}

/* Detalhes */

.detalhes-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.detalhe-item {
    background: #f9fafb;
    padding: 15px;
    border-radius: 10px;
}

.detalhe-item span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 6px;
}

.detalhe-item strong {
    color: #111827;
}

/* Responsivo */

@media (max-width: 900px) {
    .linha-topo {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid,
    .detalhes-card {
        grid-template-columns: 1fr;
    }

    .filtros form {
        flex-direction: column;
    }

    .filtros input,
    .filtros select,
    .filtros button,
    .filtros .btn-secundario {
        width: 100%;
    }
}
.acoes-topo {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filtros {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.campo input,
.campo select {
    padding: 9px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.botoes-filtro {
    flex-direction: row;
}

.tabela-responsiva {
    overflow-x: auto;
}

.tabela {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.tabela th,
.tabela td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.tabela th {
    background: #f5f5f5;
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-sm {
    padding: 5px 8px;
    font-size: 13px;
}

.btn-primary {
    background: #0d6efd;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-success {
    background: #198754;
    color: #fff;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.alerta {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.alerta.sucesso {
    background: #d1e7dd;
    color: #0f5132;
}

.alerta.erro {
    background: #f8d7da;
    color: #842029;
}

.badge {
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.badge.ativo {
    background: #d1e7dd;
    color: #0f5132;
}

.badge.inativo {
    background: #f8d7da;
    color: #842029;
}

.alerta.sucesso {
    background: #dcfce7;
    color: #166534;
}

.status-ativo {
    background: #dcfce7;
    color: #166534;
}

.status-inativo {
    background: #fee2e2;
    color: #991b1b;
}

.btn-tabela.ativar {
    background: #059669;
}

.btn-tabela.inativar {
    background: #dc2626;
}
