* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Fundo geral */
body {
    background: #f5f7ff;
    color: #1f2933;
}

/* LOGIN */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #0f62fe, #2f80ed);
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid #e5e7eb;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.logo-img {
    height: 42px;
    object-fit: contain;
}

.logo-text {
    font-weight: 600;
    color: #1f2933;
    line-height: 1.2;
}

.logo-text small {
    font-weight: 400;
    color: #6b7280;
}

.login-box h2 {
    margin-bottom: 16px;
    color: #111827;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #374151;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background-color: #ffffff;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #0f62fe;
    outline: none;
    box-shadow: 0 0 0 2px rgba(15,98,254,0.15);
}

.btn-primary {
    background: #0f62fe;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.btn-primary:hover {
    background: #0353e9;
    box-shadow: 0 8px 18px rgba(15,98,254,0.35);
    transform: translateY(-1px);
}

.login-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.error-msg {
    margin-top: 8px;
    font-size: 13px;
    color: #b91c1c;
}

.success-msg {
    margin-top: 8px;
    font-size: 13px;
    color: #047857;
}

/* LAYOUT INTERNO */

.topbar {
    background: #ffffff;
    border-bottom: 2px solid #0f62fe;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo-img {
    height: 32px;
    object-fit: contain;
}

.brand-text {
    font-weight: 600;
    color: #0f62fe;
    font-size: 18px;
}

.menu a {
    margin: 0 6px;
    text-decoration: none;
    color: #1f3b73;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 999px;
}

.menu a:hover {
    background: #e5f0ff;
    color: #0f62fe;
}

.menu a.active {
    background: #0f62fe;
    color: #ffffff;
}

.btn-outline-link {
    border-radius: 999px;
    border: 1px solid #0f62fe;
    padding: 6px 14px;
    font-size: 13px;
    color: #0f62fe;
    background: #ffffff;
    text-decoration: none;
}

.btn-outline-link:hover {
    background: #0f62fe;
    color: #ffffff;
}

/* CONTAINER */

.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 16px;
}

h1 {
    margin-bottom: 16px;
    color: #111827;
}

/* CARDS */

.cards-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 20px;
}

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 6px 18px rgba(15,98,254,0.05);
    border: 1px solid #e5e7eb;
}

.card h3 {
    font-size: 15px;
    margin-bottom: 6px;
    color: #4b5563;
}

.card-number {
    font-size: 28px;
    font-weight: 700;
    color: #0f62fe;
}

.card-number.warning {
    color: #b91c1c;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* FORM GRID */

.form-grid {
    display: grid;
    gap: 12px;
}

.form-actions {
    margin-top: 6px;
}

/* TABELAS */

.table-card {
    margin-top: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
}

thead {
    background: #0f62fe;
    color: #ffffff;
}

th, td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

tbody tr:nth-child(even) {
    background: #f3f6ff;
}

/* RESPONSIVO */

@media (max-width: 768px) {
    .topbar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .menu {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .menu a {
        margin-bottom: 4px;
    }
}
.btn-delete {
    padding: 6px 12px;
    background: #e63946;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.btn-delete:hover {
    background: #d62828;
}
.filtro-categoria-form {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.filtro-label {
    color: #374151;
    font-weight: 500;
}

.filtro-select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.filtro-select:focus {
    border-color: #0f62fe;
    outline: none;
    box-shadow: 0 0 0 2px rgba(15,98,254,0.15);
}

.filtro-limpar {
    font-size: 13px;
    text-decoration: none;
    color: #0f62fe;
}

.filtro-limpar:hover {
    text-decoration: underline;
}
.filtro-estoque-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.filtro-label {
    color: #374151;
    font-weight: 500;
}

.filtro-select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.filtro-busca-input {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    min-width: 180px;
}

.filtro-busca-input:focus,
.filtro-select:focus {
    border-color: #0f62fe;
    outline: none;
    box-shadow: 0 0 0 2px rgba(15,98,254,0.15);
}

.btn-filtro {
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    background: #0f62fe;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-filtro:hover {
    background: #0353e9;
}

.filtro-limpar {
    font-size: 13px;
    text-decoration: none;
    color: #0f62fe;
}

.filtro-limpar:hover {
    text-decoration: underline;
}