:root {
    --accent: #f72585;
    --blue: #3882f6;
    --bg: #081220;
    --surface: #101f32;
    --border: #233950;
    --text: #f1f5f9;
    --muted: #a2b2c6;
}

:root[data-theme="light"] {
    --bg: #f1f5f9;
    --surface: #ffffff;
    --border: #dce4ed;
    --text: #152238;
    --muted: #64748b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 0 25px;
    min-height: 70px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.logo {
    color: var(--text);
    font-size: 25px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.logo span {
    color: var(--accent);
}

.menu {
    display: flex;
    gap: 24px;
    flex: 1;
    align-items: center;
    flex-wrap: wrap;
}

.menu a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

.menu a:hover,
.menu a.active {
    color: var(--accent);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-name {
    font-size: 13px;
    color: var(--muted);
}

button,
select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
}

.container {
    max-width: 1400px;
    margin: auto;
    padding: 30px;
}

h1 {
    margin-bottom: 5px;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 30px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
}

.card h3 {
    margin-top: 0;
    font-size: 14px;
    color: var(--muted);
}

.card strong {
    font-size: 30px;
}

.notice {
    margin-top: 25px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .topbar {
        flex-wrap: wrap;
        padding: 15px;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

.logo img {
    width: 170px;
    height: auto;
    display: block;
}

.logo-claro {
    display: none !important;
}

.logo-escuro {
    display: block !important;
}

:root[data-theme="light"] .logo-claro {
    display: block !important;
}

:root[data-theme="light"] .logo-escuro {
    display: none !important;
}

/* ==========================================
   PIPPEHUB - FORMULÁRIOS ADMINISTRATIVOS
========================================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 14px;
    font-weight: 600;
}

.form-field input,
.form-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #64748b55;
    background: transparent;
    color: inherit;
    font-size: 14px;
}

.form-field select option {
    color: #111827;
    background: #ffffff;
}

.card h2 {
    font-size: 18px;
    margin-bottom: 20px;
}

.card form button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #f72585;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}

.card form button:hover {
    background: #db2777;
}

/* TABELAS */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.data-table th,
.data-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #64748b33;
}

.data-table th {
    font-weight: 600;
    font-size: 13px;
}

.data-table td {
    font-size: 14px;
}

.data-table a {
    color: #f72585;
    text-decoration: none;
    font-weight: 600;
}

.data-table a:hover {
    text-decoration: underline;
}

/* RESPONSIVIDADE */

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
/* ==========================================
   PIPPEHUB - PERMISSÕES DE LOJAS
========================================== */

.lista-permissoes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.loja-permissao {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid #64748b55;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.loja-permissao:hover {
    border-color: #f72585;
}

.loja-permissao input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #f72585;
    cursor: pointer;
}

.loja-permissao span {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .lista-permissoes {
        grid-template-columns: 1fr;
    }
}

/* Botões da tela de permissões */

.acoes-permissoes {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.acoes-permissoes .btn-salvar,
.acoes-permissoes .btn-voltar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    margin: 0;
}

.acoes-permissoes .btn-salvar {
    background: #f72585;
    color: #ffffff;
    border: 1px solid #f72585;
}

.acoes-permissoes .btn-voltar {
    background: transparent;
    color: inherit;
    border: 1px solid #64748b;
}

.acoes-permissoes .btn-voltar:hover {
    background: #64748b22;
}

/* ==========================================
   PIPPEHUB - LOGIN
========================================== */

:root[data-theme="light"] body.login-page,
body.login-page {
    background:
        radial-gradient(circle at top left, #dff7ef 0%, transparent 28%),
        radial-gradient(circle at bottom right, #dbeafe 0%, transparent 32%),
        linear-gradient(135deg, #f7fafc 0%, #eef6ff 100%);
    min-height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    color: #0f172a;
}

.login-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px;
    box-sizing: border-box;
}

.login-brand-panel {
    padding: 30px 20px 30px 10px;
}

.login-logo {
    margin-bottom: 28px;
}

.login-logo img {
    width: 220px;
    height: auto;
    display: block;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffffcc;
    border: 1px solid #dbeafe;
    color: #2563eb;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 22px;
    box-shadow: 0 8px 20px #0f172a10;
    backdrop-filter: blur(10px);
}

.login-title {
    font-size: 48px;
    line-height: 1.05;
    margin: 0 0 18px;
    color: #0f172a;
    max-width: 560px;
}

.login-title .destaque {
    background: linear-gradient(90deg, #2563eb 0%, #f72585 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-description {
    max-width: 560px;
    font-size: 18px;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 30px;
}

.login-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 620px;
}

.login-feature {
    background: #ffffffc9;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 28px #0f172a0e;
    backdrop-filter: blur(10px);
}

.login-feature strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    color: #0f172a;
}

.login-feature span {
    font-size: 14px;
    line-height: 1.55;
    color: #64748b;
}

.login-card-area {
    display: flex;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffffee;
    border: 1px solid #dbeafe;
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 22px 60px #0f172a18;
    backdrop-filter: blur(14px);
}

.login-card-top {
    margin-bottom: 26px;
}

.login-card-top h1 {
    margin: 0 0 8px;
    font-size: 30px;
    color: #0f172a;
}

.login-card-top p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
    font-size: 15px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form-field label {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.login-form-field input {
    width: 100%;
    box-sizing: border-box;
    height: 52px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0 16px;
    font-size: 15px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    transition: 0.2s;
}

.login-form-field input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px #3b82f620;
}

.login-submit {
    height: 54px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(90deg, #2563eb 0%, #f72585 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 14px 28px #2563eb30;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px #2563eb38;
}

.login-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
}

.login-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 13px;
    text-align: center;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .login-brand-panel {
        padding: 0;
    }

    .login-title {
        font-size: 36px;
        max-width: 100%;
    }

    .login-description {
        max-width: 100%;
    }

    .login-features {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .login-card {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .login-wrapper {
        padding: 18px;
    }

    .login-card {
        padding: 24px;
        border-radius: 22px;
    }

    .login-title {
        font-size: 30px;
    }
}

/* PIPPEHUB - FILTROS DE PEDIDOS */

.pedidos-acoes {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-limpar-pedidos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid #64748b;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.btn-limpar-pedidos:hover {
    background: #64748b22;
}

/* PIPPEHUB - ALINHAMENTO DOS BOTOES DE FILTRO */

.pedidos-acoes {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pedidos-acoes button,
.pedidos-acoes .btn-limpar-pedidos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 48px;
    padding: 0 24px;
    margin: 0;
    line-height: 1;
    vertical-align: middle;
}

/* PIPPEHUB - ALINHAMENTO DEFINITIVO DOS BOTOES */

.pedidos-acoes {
    display: flex !important;
    flex-direction: row;
    align-items: center !important;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.pedidos-acoes > button,
.pedidos-acoes > a.btn-limpar-pedidos {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box !important;

    height: 48px !important;
    min-height: 48px !important;

    padding: 0 24px !important;
    margin: 0 !important;

    line-height: 1 !important;
    vertical-align: middle !important;

    position: static !important;
    transform: none !important;
}

/* PIPPEHUB - ACOES DOS LOTES */

.acoes-lote {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.acoes-lote form {
    margin: 0;
}

.btn-visualizar-lote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #db2777;
    border-radius: 8px;
    color: #f72585;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.btn-visualizar-lote:hover {
    background: rgba(16, 185, 129, 0.10);
}

/* PIPPEHUB - PADRONIZACAO DOS BOTOES DE LOTES */

.acoes-lote {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.acoes-lote form {
    margin: 0 !important;
    padding: 0 !important;
}

.acoes-lote > a.btn-visualizar-lote,
.acoes-lote > form > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box !important;

    height: 48px !important;
    min-height: 48px !important;

    padding: 0 24px !important;
    margin: 0 !important;

    border-radius: 8px;
    line-height: 1 !important;
    vertical-align: middle !important;
    transform: none !important;
}

/* PIPPEHUB - RESUMO DE ETIQUETAS */

.resumo-etiquetas {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.resumo-etiquetas > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid #334155;
    border-radius: 10px;
}

.resumo-etiquetas strong {
    font-size: 28px;
    color: #f72585;
}

.resumo-etiquetas span {
    font-size: 14px;
    color: #94a3b8;
}

@media (max-width: 800px) {
    .resumo-etiquetas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* PIPPEHUB - ACOES DE IMPRESSAO */

.acoes-impressao {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.acoes-impressao form {
    margin: 0;
}

.acoes-impressao button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* PippeHub - Campo de período de envio */

.prazo-periodo-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.prazo-periodo-icone {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.prazo-periodo-icone svg {
    width: 20px;
    height: 20px;
}

.prazo-periodo-input {
    width: 100%;
    box-sizing: border-box;
    padding-left: 50px !important;
    cursor: pointer;
}

.resumo-operacional {
    margin-bottom: 24px;
}

.resumo-operacional h2 {
    margin: 0 0 18px 0;
}

.resumo-cards {
    display: flex;
    gap: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
}

.resumo-card {
    flex: 1 1 0;
    min-width: 180px;
    max-width: 220px;
    min-height: 118px;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1px solid rgba(77, 124, 174, 0.35);
    background: rgba(15, 37, 63, 0.95);
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease,
                border-color 0.15s ease,
                box-shadow 0.15s ease;
}

.resumo-card:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 197, 94, 0.60);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.resumo-card.ativo {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25) inset;
}

.resumo-card-titulo {
    font-size: 0.98rem;
    font-weight: 600;
    color: #9fb2c8;
    line-height: 1.3;
}

.resumo-card-valor {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    color: #f8fafc;
}

/* Popup de edicao de produtos */

.modal-produto-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
}

.modal-produto-overlay[style*="display: none"] {
    display: none !important;
}

.modal-produto-conteudo {
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-produto-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.modal-produto-cabecalho h2 {
    margin: 0;
}

.modal-produto-fechar {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

/* Texto do popup de exclusao */

.modal-exclusao-pergunta {
    text-align: center;
    margin-bottom: 16px;
}

.modal-exclusao-nome {
    text-align: center;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: rgba(128, 128, 128, 0.08);
}

.modal-exclusao-nome strong {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.modal-exclusao-aviso {
    text-align: center;
    margin-bottom: 24px;
}

/* Composicao dos kits - PippeHub */

.componente-anuncio {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

.componente-anuncio > .form-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
    margin: 0;
}

.componente-anuncio > .form-field label {
    margin-bottom: 8px;
}

.componente-anuncio > .form-field select,
.componente-anuncio > .form-field input {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    margin: 0;
}

@media (max-width: 650px) {
    .componente-anuncio {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
        gap: 8px;
    }
}

/* Icone de composicao dos anuncios */

.btn-composicao-anuncio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0.8;
}

.btn-composicao-anuncio:hover {
    opacity: 1;
    background: rgba(128, 128, 128, 0.12);
}

.btn-composicao-anuncio svg {
    display: block;
}

/* Status dos anúncios */
.btn-status-anuncio.status-ativo {
    color: #f72585;
}

.btn-status-anuncio.status-inativo {
    color: #94a3b8;
}

.btn-status-anuncio.status-ativo:hover {
    color: #fb7185;
}

/* Botão de exclusão dos anúncios */
.btn-excluir-anuncio {
    color: #ef4444;
    cursor: pointer;
}

.btn-excluir-anuncio:hover {
    color: #f87171;
}