:root {
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --black: #111111;
    --accent: #ff5a36;
    --accent-dark: #e44726;
    --danger: #dc2626;
    --success: #16a34a;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}


/* =====================================
   HEADER
===================================== */

.admin-header {
    min-height: 72px;
    padding: 0 32px;
    background: #111111;
    color: white;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;
    z-index: 100;

    box-shadow: 0 2px 15px rgba(0, 0, 0, .12);
}

.admin-logo {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -1px;
}

.admin-logo span {
    font-weight: 500;
    margin-left: 2px;
}

.admin-header > div:last-child {
    font-size: 13px;
    color: #d1d5db;
}


/* =====================================
   CONTAINER
===================================== */

.admin-container {
    width: min(100% - 32px, 1100px);
    margin: 42px auto 80px;
}


/* =====================================
   TITULO
===================================== */

.admin-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 28px;
}

.admin-title h1 {
    margin: 0 0 7px;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.admin-title p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.admin-title a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: var(--black);
    color: white;

    padding: 11px 17px;

    border-radius: 8px;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition: .2s;
}

.admin-title a:hover {
    background: #333;
    transform: translateY(-1px);
}


/* =====================================
   CARDS
===================================== */

.admin-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    padding: 28px;

    margin-bottom: 24px;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, .04);
}

.admin-card h2 {
    margin: 0 0 22px;
    font-size: 19px;
    letter-spacing: -.3px;
}


/* =====================================
   FORM
===================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.form-group small {
    color: var(--muted);
    font-size: 12px;
}

input,
select {
    width: 100%;
    height: 46px;

    border: 1px solid var(--border);
    border-radius: 8px;

    padding: 0 13px;

    font-size: 14px;
    color: var(--text);

    background: #fff;

    transition:
        border-color .2s,
        box-shadow .2s;
}

input:hover,
select:hover {
    border-color: #c7cbd1;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);

    box-shadow:
        0 0 0 3px rgba(255, 90, 54, .12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}


/* =====================================
   FILE
===================================== */

input[type="file"] {
    height: auto;
    padding: 11px;
    cursor: pointer;
}


/* =====================================
   PREVIEW
===================================== */

.image-preview {
    margin: 5px 0 20px;
    min-height: 0;
}

.image-preview img {
    width: 220px;
    max-width: 100%;
    max-height: 220px;

    object-fit: contain;

    display: block;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #f9fafb;

    padding: 5px;
}


/* =====================================
   BOTÃO PRINCIPAL
===================================== */

.save-button {
    width: 100%;
    min-height: 50px;

    border: 0;
    border-radius: 9px;

    background: var(--accent);
    color: white;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background .2s,
        transform .2s,
        box-shadow .2s;
}

.save-button:hover {
    background: var(--accent-dark);

    transform: translateY(-1px);

    box-shadow:
        0 5px 15px rgba(255, 90, 54, .22);
}

.save-button:active {
    transform: translateY(0);
}


/* =====================================
   CABEÇALHO DA LISTA
===================================== */

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 20px;
}

.list-header h2 {
    margin-bottom: 5px;
}

.list-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}


/* =====================================
   APAGAR TODAS
===================================== */

.danger-button {
    border: 1px solid #fecaca;

    background: #fff;

    color: var(--danger);

    padding: 9px 13px;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition: .2s;
}

.danger-button:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}


/* =====================================
   STATUS
===================================== */

#status {
    min-height: 20px;

    margin-bottom: 14px;

    font-size: 13px;
    font-weight: 600;
}


/* =====================================
   LISTA
===================================== */

.offer-list {
    display: grid;
    gap: 12px;
}


/* =====================================
   ITEM PROMOÇÃO
===================================== */

.offer-item {
    display: grid;

    grid-template-columns:
        90px
        minmax(0, 1fr)
        auto;

    gap: 17px;

    align-items: center;

    padding: 12px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: #fff;

    transition:
        border-color .2s,
        box-shadow .2s,
        transform .2s;
}

.offer-item:hover {
    border-color: #d1d5db;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, .06);

    transform: translateY(-1px);
}


/* =====================================
   IMAGEM DA PROMOÇÃO
===================================== */

.offer-item img {
    width: 90px;
    height: 75px;

    object-fit: contain;

    background: #f5f5f5;

    border-radius: 8px;

    border: 1px solid #eee;
}


/* =====================================
   INFORMAÇÃO
===================================== */

.offer-item h3 {
    margin: 0 0 6px;

    font-size: 15px;
    line-height: 1.3;

    color: var(--text);
}

.offer-item p {
    margin: 0;

    font-size: 12px;

    color: var(--muted);
}


/* =====================================
   BOTÕES DOS ITENS
===================================== */

.offer-item button {
    min-width: 75px;

    border-radius: 7px;

    padding: 8px 11px;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition: .2s;
}


/* EDITAR */

.edit-button {
    border: 1px solid #dbeafe;

    background: #eff6ff;

    color: #2563eb;
}

.edit-button:hover {
    background: #dbeafe;
}


/* APAGAR */

.delete-button {
    border: 1px solid #fecaca;

    background: #fff;

    color: #dc2626;
}

.delete-button:hover {
    background: #fef2f2;
}


/* =====================================
   GRUPO DE BOTÕES
===================================== */

.offer-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}


/* =====================================
   MOBILE
===================================== */

@media (max-width: 700px) {

    .admin-header {
        padding: 0 18px;
        min-height: 64px;
    }

    .admin-logo {
        font-size: 20px;
    }

    .admin-header > div:last-child {
        font-size: 11px;
    }

    .admin-container {
        width: min(100% - 22px, 1100px);
        margin-top: 25px;
    }

    .admin-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .admin-title h1 {
        font-size: 28px;
    }

    .admin-title a {
        width: 100%;
    }

    .admin-card {
        padding: 20px;
        border-radius: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .list-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .danger-button {
        width: 100%;
    }

    .offer-item {
        grid-template-columns:
            70px
            minmax(0, 1fr);

        gap: 12px;
    }

    .offer-item img {
        width: 70px;
        height: 65px;
    }

    .offer-actions {
        grid-column: 1 / -1;

        width: 100%;
    }

    .offer-item button {
        flex: 1;
    }
}


/* =====================================
   MOBILE PEQUENO
===================================== */

@media (max-width: 420px) {

    .admin-card {
        padding: 16px;
    }

    .admin-title h1 {
        font-size: 25px;
    }

    .offer-item h3 {
        font-size: 14px;
    }

}
