/* Configurações — estilo MEC */

.cfg-subtitulo {
    color: #777;
    font-size: 14px;
    margin: -12px 0 20px;
}

.cfg-status {
    background: var(--systech-surface);
    border: 1px solid var(--systech-border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}

.cfg-status h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.cfg-status p {
    font-size: 13px;
    color: #888;
    margin-bottom: 14px;
}

.cfg-progresso {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(107, 159, 255, 0.15);
    border: 1px solid rgba(107, 159, 255, 0.35);
    color: var(--systech-primary-light);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.cfg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.cfg-tab {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #333;
    background: var(--systech-surface);
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
}

.cfg-tab.ativo {
    background: var(--systech-border);
    color: #fff;
    border-color: var(--systech-primary-light);
}

.cfg-panel {
    display: none;
}

.cfg-panel.ativo {
    display: block;
}

.cfg-hint {
    font-size: 12px;
    color: var(--systech-muted);
    margin: 0 0 12px;
}

.cfg-logo-preview-wrap {
    margin-top: 12px;
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed var(--systech-border);
    background: #111;
    text-align: center;
}

.cfg-logo-preview-wrap--dark {
    background: #0a0f1e;
}

.cfg-logo-preview {
    max-width: 220px;
    max-height: 64px;
    object-fit: contain;
    display: none;
}

/* Logo da Loja — upload assinantes */
.cfg-logo-loja h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.cfg-logo-drop {
    margin: 16px 0 20px;
}

.cfg-logo-preview-box {
    position: relative;
    min-height: 160px;
    padding: 24px;
    border-radius: 14px;
    border: 2px dashed var(--systech-border);
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cfg-logo-preview-box.tem-logo .cfg-logo-vazio {
    display: none;
}

.cfg-logo-preview-img {
    max-width: min(280px, 100%);
    max-height: 120px;
    object-fit: contain;
    display: none;
    border-radius: 10px;
}

.cfg-logo-preview-box.tem-logo .cfg-logo-preview-img {
    display: block;
}

.cfg-logo-preview-box.tem-logo .cfg-logo-remover {
    display: grid;
}

.cfg-logo-vazio {
    margin: 0;
    font-size: 13px;
    color: var(--systech-muted);
}

.cfg-logo-remover {
    display: none;
    place-items: center;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #ff3b30;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    min-height: 32px;
    line-height: 1;
}

.cfg-logo-file-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.cfg-logo-file-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--systech-border);
    background: var(--systech-surface);
    color: var(--systech-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}

.cfg-logo-file-btn:hover {
    border-color: rgba(var(--systech-primary-rgb), 0.45);
}

.cfg-logo-file-nome {
    font-size: 13px;
    color: var(--systech-muted);
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.cfg-logo-formatos {
    margin-top: 8px;
    color: rgba(var(--systech-primary-rgb), 0.85);
}

.cfg-logo-rastreio-check {
    margin: 16px 0 20px;
    font-size: 13px;
    color: var(--systech-text);
}

.cfg-btn-salvar-full {
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .cfg-logo-preview-box {
        min-height: 140px;
        padding: 18px;
    }

    .cfg-logo-file-row {
        flex-direction: column;
        align-items: stretch;
    }

    .cfg-logo-file-btn {
        width: 100%;
    }
}

.cfg-tema-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cfg-tema-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: 2px solid var(--chip, var(--systech-primary));
    background: rgba(var(--systech-primary-rgb), 0.08);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.cfg-tema-preview {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--systech-border);
    background: var(--systech-surface);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cfg-tema-preview-chip {
    background: var(--preview-primary, var(--systech-primary));
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.cfg-tema-preview-text {
    color: var(--preview-accent, var(--systech-accent));
    font-size: 13px;
}

.cfg-salvar-inline {
    margin: 12px 0 0;
}

.cfg-salvar-wrap {
    display: flex;
    justify-content: flex-end;
    margin: 24px 0 16px;
}

.cfg-salvar-footer {
    position: relative;
}

.cfg-btn-salvar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #34c759, #28a745);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    min-height: 48px;
    min-width: 160px;
    box-sizing: border-box;
}

.cfg-btn-salvar:disabled {
    opacity: 0.5;
    cursor: wait;
}

.os-cfg-embed .os-cfg-hint,
.os-cfg-embed label {
    font-size: 13px;
}

.os-cfg-embed input,
.os-cfg-embed textarea,
.os-cfg-embed select {
    width: 100%;
    margin-top: 4px;
    margin-bottom: 10px;
}

.cfg-secao {
    background: var(--systech-surface);
    border: 1px solid var(--systech-border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}

.cfg-secao h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #fff;
}

.cfg-campo {
    margin-bottom: 14px;
}

.cfg-campo label {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 6px;
}

.cfg-campo label.obrigatorio::after {
    content: ' *';
    color: #ff6b6b;
}

.cfg-campo input,
.cfg-campo select,
.cfg-campo textarea {
    width: 100%;
    padding: 12px 14px;
    background: #111;
    border: 1px solid #333;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
}

.cfg-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cfg-grid-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 80px;
    gap: 12px;
}

.cfg-opcional-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.cfg-opcional-header button {
    background: none;
    border: none;
    color: var(--systech-primary-light);
    font-size: 13px;
    cursor: pointer;
}

.cfg-opcional-body {
    display: none;
    margin-top: 16px;
}

.cfg-opcional-body.aberto {
    display: block;
}

.cfg-alerta {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    display: none;
}

.cfg-alerta.erro {
    display: block;
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.4);
    color: #ff6b6b;
}

.cfg-alerta.ok {
    display: block;
    background: rgba(52, 199, 89, 0.15);
    border: 1px solid rgba(52, 199, 89, 0.4);
    color: #34c759;
}

@media (max-width: 1024px) {
    .cfg-grid-2, .cfg-grid-3 {
        grid-template-columns: 1fr;
    }

    .cfg-panel.ativo {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .cfg-panel.ativo .cfg-salvar-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(56px + env(safe-area-inset-bottom));
        z-index: 25;
        margin: 0;
        padding: 10px 14px;
        justify-content: stretch;
        background: linear-gradient(180deg, rgba(5, 10, 24, 0) 0%, rgba(5, 10, 24, 0.92) 35%, var(--systech-bg) 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .cfg-btn-salvar {
        width: 100%;
        min-width: 0;
    }
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.cfg-btn-outline {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(var(--systech-cyan-rgb), 0.35);
    background: rgba(var(--systech-cyan-rgb), 0.08);
    color: var(--systech-primary-light);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.cfg-os-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.cfg-os-shortcut {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #e7eaf0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.cfg-os-shortcut:hover {
    border-color: rgba(var(--systech-cyan-rgb), 0.35);
    background: rgba(var(--systech-cyan-rgb), 0.08);
}

/* --- Notificações push --- */
.cfg-secao-divider {
    margin-top: 24px;
    padding-top: 8px;
    border-top: 1px solid var(--systech-border);
}

.cfg-notif-card {
    background: var(--systech-surface);
    border: 1px solid var(--systech-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.cfg-notif-card-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.cfg-notif-card-ico {
    font-size: 22px;
    line-height: 1;
    margin-top: 2px;
}

.cfg-notif-card-head strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.cfg-notif-card-head p {
    margin: 0;
    font-size: 12px;
    color: var(--systech-muted);
    line-height: 1.4;
}

.cfg-notif-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.cfg-notif-row-summary {
    list-style: none;
    cursor: pointer;
}

.cfg-notif-row-summary::-webkit-details-marker {
    display: none;
}

.cfg-notif-master {
    border-top: none;
    padding-top: 0;
}

.cfg-notif-row-txt {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #e7eaf0;
    min-width: 0;
}

.cfg-notif-ico {
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.cfg-notif-chk,
.cfg-notif-row input[type="checkbox"] {
    width: 44px;
    height: 26px;
    appearance: none;
    background: #3a3f4b;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.cfg-notif-chk::after,
.cfg-notif-row input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.cfg-notif-chk:checked,
.cfg-notif-row input[type="checkbox"]:checked {
    background: var(--systech-primary);
}

.cfg-notif-chk:checked::after,
.cfg-notif-row input[type="checkbox"]:checked::after {
    transform: translateX(18px);
}

.cfg-notif-status-txt {
    font-size: 12px;
    color: var(--systech-muted);
    margin: 0;
    line-height: 1.45;
}

.cfg-notif-status-txt.ok {
    color: var(--systech-primary-light);
}

.cfg-notif-status-txt.erro {
    color: #ff6b6b;
}

.cfg-notif-lista {
    margin-top: 4px;
}

.cfg-notif-expand {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cfg-notif-pwa-aviso {
    background: rgba(var(--systech-primary-rgb), 0.1);
    border: 1px solid rgba(var(--systech-primary-rgb), 0.28);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.cfg-notif-pwa-aviso strong {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.cfg-notif-pwa-aviso p {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--systech-muted);
    line-height: 1.45;
}

.cfg-notif-pwa-btn {
    width: 100%;
    min-height: 40px;
}

.cfg-notif-expand[open] .cfg-notif-row-summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cfg-notif-sublista {
    padding: 4px 0 8px 32px;
}

.cfg-notif-sub .cfg-notif-row-txt {
    font-size: 13px;
    color: #aab4cc;
}

html.mec-tema-claro .cfg-notif-row-txt {
    color: var(--systech-text);
}

html.mec-tema-claro .cfg-notif-sub .cfg-notif-row-txt {
    color: var(--systech-muted);
}

html.mec-tema-claro .cfg-notif-row {
    border-top-color: var(--systech-border);
}

html.mec-tema-claro .cfg-notif-expand {
    border-top-color: var(--systech-border);
}

.cfg-secao-divider {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--systech-border);
}

.cfg-senha-wrap {
    position: relative;
}

.cfg-senha-wrap input {
    width: 100%;
    padding-right: 44px;
}

.cfg-senha-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.65;
    line-height: 1;
}

.cfg-senha-toggle:hover {
    opacity: 1;
}

#btnAlterarSenha {
    margin-top: 8px;
}
