.btn-primary-page {
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: .2s ease;
}

.btn-primary-page:hover {
    background: var(--primary-hover);
}

.btn-light {
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: #374151;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: .2s ease;
}

.btn-light:hover {
    background: var(--surface-2);
}

.page-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.page-card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.page-card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.page-card-header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.page-card-body {
    padding: 20px;
}

.toolbar-produtos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.search-box-produtos {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.search-box-produtos i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.92rem;
}

.search-box-produtos input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px 0 42px;
    outline: none;
    transition: .2s ease;
    background: #fff;
}

.search-box-produtos input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-wrap-produtos {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.table-produtos {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.table-produtos thead th {
    background: #f8fafc;
    color: #374151;
    text-align: left;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.table-produtos tbody td {
    padding: 15px 16px;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.92rem;
    color: #374151;
    vertical-align: middle;
}

.table-produtos tbody tr:hover td {
    background: #fafcff;
}

.empty-row {
    text-align: center;
    color: var(--muted);
    padding: 26px !important;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-ativo {
    background: #dcfce7;
    color: #166534;
}

.status-inativo {
    background: #fee2e2;
    color: #b91c1c;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: pointer;
    transition: .2s ease;
}

.action-btn:hover {
    background: var(--surface-2);
    color: var(--text);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 3000;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 760px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.modal-header h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
}

.modal-header p {
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--muted);
}

.modal-body {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.form-group label span {
    color: #dc2626;
}

.form-group input,
.form-group select {
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    outline: none;
    transition: .2s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.modal-footer {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .toolbar-produtos {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box-produtos {
        max-width: none;
    }

    .toolbar-actions {
        width: 100%;
    }

    .toolbar-actions .btn-light {
        width: 100%;
        justify-content: center;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-footer button {
        width: 100%;
        justify-content: center;
    }

    .btn-primary-page {
        width: 100%;
        justify-content: center;
    }
}