/* ===================== GERAL ===================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --color-primary: #f97316;
    --color-primary-dark: #ea580c;
    --color-text: #1f2937;
    --color-background: #fcfcfd;
    --color-background-dark: #111111;
    --color-card-border: #e2e8f0;
}

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-text);
    background: #f3f4f6;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

h1,
h2,
h3 {
    font-weight: 700;
    margin: 0;
    color: #111827;
}

button {
    cursor: pointer;
    border: none;
}

/* ===================== HEADER ===================== */
.header-dark {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 32px;
    background: var(--color-background-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 20;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ===================== CONTAINER ===================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 16px 60px;
}

.section {
    margin-bottom: 40px;
}

.page-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 24px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.page-title i {
    color: var(--color-primary);
}

.page-title-left {
    text-align: left;
    justify-content: flex-start;
}

.status-text {
    text-align: center;
    font-size: 15px;
    color: #6b7280;
    margin-top: 8px;
}

/* ===================== PRODUTOS ===================== */
.product-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    padding: 20px 0;
}

.product-card {
    background: var(--color-background);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--color-card-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.25);
    border-color: var(--color-primary);
}

.product-image-wrap {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 16px;
    background: #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image:hover {
    transform: scale(1.05);
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    margin: 10px 0 4px;
    line-height: 1.2;
}

.product-category {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.product-price {
    font-size: 30px;
    font-weight: 800;
    margin: 10px 0 10px;
    color: var(--color-primary-dark);
}

.product-btn {
    margin-top: 12px;
    padding: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* Ações (Editar / Excluir) */
.product-actions {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
}

.btn-inline {
    background: transparent;
    border-radius: 999px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-inline i {
    font-size: 16px;
}

.btn-edit {
    color: #2563eb;
}

.btn-edit:hover {
    background: rgba(37, 99, 235, 0.10);
    transform: translateY(-1px);
}

.btn-delete {
    color: #ef4444;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.10);
    transform: translateY(-1px);
}

/* ===================== CARDS / FORM ===================== */
.card {
    background: var(--color-background);
    padding: 25px 30px;
    border-radius: 25px;
    border: 1px solid var(--color-card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.card-dark {
    background: #f9fafb;
}

.auth-card {
    max-width: 500px;
    margin: 0 auto 40px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    transition: 0.2s;
    font-size: 15px;
}

input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.actions-right {
    display: flex;
    justify-content: flex-end;
    margin-top: 25px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* ===================== BOTÕES ===================== */
.btn {
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    padding: 14px 28px;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.4);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* Secundário dentro de modal (fundo claro) */
.modal-content .btn-secondary {
    background: #f3f4f6;
    color: #111827;
    border: 1px solid #d1d5db;
    padding: 10px 18px;
}

.modal-content .btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.btn-google:hover {
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.google-icon {
    height: 20px;
    width: 20px;
}

/* ===================== TOAST PREMIUM (GLASSMORPHISM) ===================== */
#toast {
    visibility: hidden;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;

    display: flex;
    align-items: center;
    gap: 15px;

    min-width: 320px;
    padding: 18px 24px;
    border-radius: 16px;
    overflow: hidden;

    background: rgba(20, 20, 20, 0.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);

    color: #fff;

    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

#toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

#toast i {
    font-size: 26px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

#toast span {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.4;
    color: #f3f4f6;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform-origin: left;
    transform: scaleX(0);
}

#toast.show .toast-progress {
    animation: progress 4s linear forwards;
}

@keyframes progress {
    0% {
        transform: scaleX(1);
    }

    100% {
        transform: scaleX(0);
    }
}

/* ERRO */
#toast.toast-error {
    border-left: 4px solid #ff4d4d;
    box-shadow: 0 10px 40px rgba(220, 38, 38, 0.15);
}

#toast.toast-error i {
    color: #ff4d4d;
}

#toast.toast-error .toast-progress {
    background: #ff4d4d;
}

/* SUCESSO */
#toast.toast-success {
    border-left: 4px solid #2ecc71;
    box-shadow: 0 10px 40px rgba(46, 204, 113, 0.15);
}

#toast.toast-success i {
    color: #2ecc71;
}

#toast.toast-success .toast-progress {
    background: #2ecc71;
}

/* INFO */
#toast.toast-info {
    border-left: 4px solid #3498db;
    box-shadow: 0 10px 40px rgba(52, 152, 219, 0.15);
}

#toast.toast-info i {
    color: #3498db;
}

#toast.toast-info .toast-progress {
    background: #3498db;
}

/* WARNING */
#toast.toast-warning {
    border-left: 4px solid #f1c40f;
    box-shadow: 0 10px 40px rgba(241, 196, 15, 0.15);
}

#toast.toast-warning i {
    color: #f1c40f;
}

#toast.toast-warning .toast-progress {
    background: #f1c40f;
}

/* Responsivo toast */
@media (max-width: 768px) {
    #toast {
        bottom: 20px;
        right: 16px;
        left: 16px;
        min-width: auto;
        justify-content: flex-start;
    }
}

/* ===================== MODAL GENÉRICO ===================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    z-index: 40;
    background: #ffffff;
    padding: 35px 40px;
    border-radius: 25px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: modalFadeIn 0.3s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.modal-content h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.modal-content h2 i {
    color: var(--color-primary);
}

/* MODAL LOGIN (usa tamanho padrão) */

/* MODAL EDITAR – maior e mais espaçado */
.modal-content.modal-edit {
    max-width: 980px;
    padding: 38px 44px;
    text-align: left;
}

.modal-content.modal-edit h2 {
    justify-content: flex-start;
    margin-bottom: 18px;
}

.modal-content.modal-edit input {
    margin-top: 8px;
    margin-bottom: 8px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

/* MODAL DELETE – layout especial */
.modal-content.modal-delete {
    max-width: 420px;
    padding: 32px 36px;
}

.modal-content.modal-delete h2 {
    margin-bottom: 10px;
    justify-content: center;
}

.modal-content.modal-delete p {
    margin: 0 0 22px;
    color: #4b5563;
    font-size: 14px;
}

.modal-delete-icon {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    font-size: 28px;
}

.modal-delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Animação */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0px) scale(1);
    }
}

/* ===================== FOOTER ===================== */
.footer {
    background: var(--color-background-dark);
    color: #e5e7eb;
    padding: 30px;
    text-align: center;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===================== RESPONSIVO ===================== */
@media (max-width: 768px) {
    .container {
        padding-inline: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}