/* UX multi-loja — alinhado ao Super Admin 2026 (tablet ≥48px) */

.ml-page {
    max-width: 1100px;
    margin: 0 auto 6rem;
    padding: 1rem 1rem 5.5rem;
    color: var(--sa-text, #0F172A);
}

.sa-form-body .ml-page {
    margin-bottom: 0;
}

.ml-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ml-page-header h1 {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 700;
    margin: 0;
    color: #1a1d21;
}

.ml-page-header .ml-sub {
    width: 100%;
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

.ml-card {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 16px;
    padding: 1.25rem 1.25rem 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ml-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #243447;
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #eef1f5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ml-card-title .ml-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: var(--sa-accent, #0F766E);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

.ml-field {
    margin-bottom: 1rem;
}

.ml-field .form-control,
.ml-field .form-select,
.ml-field textarea.form-control {
    min-height: 52px;
    font-size: 1.05rem;
    border-radius: 12px;
    padding-top: 1.35rem;
    padding-bottom: 0.55rem;
}

.ml-field .form-select {
    padding-top: 1.45rem;
}

.ml-field .form-floating > label {
    font-size: 0.95rem;
    padding-left: 0.95rem;
}

.ml-field textarea.form-control {
    min-height: 110px;
}

.ml-check {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    background: #f8fafc;
    margin-bottom: 1rem;
}

.ml-check .form-check-input {
    width: 1.35rem;
    height: 1.35rem;
    margin: 0;
}

.ml-check .form-check-label {
    font-size: 1.05rem;
    margin: 0;
}

/* Barra de ações sticky (polegar no tablet) */
.ml-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e6e9ef;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.ml-actions .btn {
    min-height: 52px;
    min-width: 140px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.65rem 1.25rem;
}

.ml-actions .btn-primary {
    flex: 1 1 auto;
    max-width: 320px;
}

.ml-actions .btn-secondary {
    flex: 0 0 auto;
}

/* Listagens em cards (melhor no tablet que tabela densa) */
.ml-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    width: 100%;
}

.ml-list-toolbar .btn {
    min-height: 48px;
    border-radius: 12px;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    font-size: 1rem;
}

.ml-search {
    flex: 1 1 220px;
    min-height: 48px;
    border-radius: 12px;
    font-size: 1.05rem;
}

.ml-item {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.ml-item:active {
    background: #f5f8ff;
}

.ml-item.active {
    border-color: #D84D15;
    box-shadow: inset 3px 0 0 #D84D15;
    background: #FFF7F2;
}

.ml-item-main {
    flex: 1 1 auto;
    min-width: 0;
}

.ml-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1d21;
    margin: 0 0 0.25rem;
    word-break: break-word;
}

.ml-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    color: #667085;
    font-size: 0.92rem;
}

.ml-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--sa-accent-soft, #CCFBF1);
    color: var(--sa-accent, #0F766E);
}

.ml-badge.ok { background: #15803D; color: #fff; }
.ml-badge.warn { background: #B45309; color: #fff; }
.ml-badge.bad { background: #B91C1C; color: #fff; }

.ml-item-action {
    flex: 0 0 auto;
}

.ml-item-action .btn {
    min-width: 52px;
    min-height: 52px;
    border-radius: 12px;
    font-size: 1.15rem;
}

.ml-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #667085;
    border: 1px dashed #d0d5dd;
    border-radius: 14px;
    background: #fafbfc;
    width: 100%;
}

.ml-accordion-wrap {
    width: 100%;
}

@media (min-width: 768px) {
    .ml-page {
        padding: 1.5rem 1.5rem 5.5rem;
    }
    .ml-card {
        padding: 1.5rem 1.5rem 0.75rem;
    }
    .ml-actions {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 575.98px) {
    .ml-actions .btn-secondary {
        flex: 1 1 40%;
    }
    .ml-actions .btn-primary {
        max-width: none;
    }
}

body.pl-theme-dark .ml-page,
body.pl-theme-dark .ml-page-header h1,
body.pl-theme-dark .ml-card-title,
body.pl-theme-dark .ml-item-title {
    color: #F8FAFC;
}

body.pl-theme-dark .ml-page-header .ml-sub,
body.pl-theme-dark .ml-item-meta {
    color: #93A4BB;
}

body.pl-theme-dark .ml-card,
body.pl-theme-dark .ml-item {
    background: #0C2344;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: none;
}

body.pl-theme-dark .ml-card-title {
    border-bottom-color: rgba(148, 163, 184, 0.18);
}

body.pl-theme-dark .ml-item:active {
    background: rgba(216, 77, 21, 0.12);
}

body.pl-theme-dark .ml-item.active {
    background: rgba(216, 77, 21, 0.16);
    border-color: #D84D15;
}

body.pl-theme-dark .ml-check {
    background: #0B1F3C;
    border-color: rgba(148, 163, 184, 0.22);
    color: #F8FAFC;
}

body.pl-theme-dark .ml-actions {
    background: rgba(11, 31, 60, 0.96);
    border-top-color: rgba(148, 163, 184, 0.22);
}

body.pl-theme-dark .ml-empty {
    color: #93A4BB;
    border-color: rgba(148, 163, 184, 0.28);
    background: #0B1F3C;
}

body.pl-theme-dark .ml-search,
body.pl-theme-dark .ml-field .form-control,
body.pl-theme-dark .ml-field .form-select {
    background: #0C2344;
    color: #F8FAFC;
    border-color: rgba(148, 163, 184, 0.28);
}

body.pl-theme-dark .ml-badge {
    background: rgba(216, 77, 21, 0.2);
    color: #FFB089;
}

body.pl-theme-dark .ml-badge.ok { background: #15803D; color: #fff; }
body.pl-theme-dark .ml-badge.warn { background: #B45309; color: #fff; }
body.pl-theme-dark .ml-badge.bad { background: #B91C1C; color: #fff; }

body.pl-theme-dark .ml-page,
body.pl-theme-dark .ml-page-header h1,
body.pl-theme-dark .ml-item-title,
body.pl-theme-dark .ml-card-title {
    color: #F8FAFC;
}

body.pl-theme-dark .ml-page-header .ml-sub,
body.pl-theme-dark .ml-item-meta {
    color: #93A4BB;
}

body.pl-theme-dark .ml-card,
body.pl-theme-dark .ml-item {
    background: #0C2344;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: none;
}

body.pl-theme-dark .ml-card-title {
    border-bottom-color: rgba(148, 163, 184, 0.18);
}

body.pl-theme-dark .ml-item:active,
body.pl-theme-dark .ml-item.active {
    background: rgba(216, 77, 21, 0.14);
}

body.pl-theme-dark .ml-item.active {
    border-color: #D84D15;
}

body.pl-theme-dark .ml-check {
    background: #0B1F3C;
    border-color: rgba(148, 163, 184, 0.22);
    color: #F8FAFC;
}

body.pl-theme-dark .ml-empty {
    color: #93A4BB;
    border-color: rgba(148, 163, 184, 0.28);
    background: #0B1F3C;
}

body.pl-theme-dark .ml-search,
body.pl-theme-dark .ml-field .form-control,
body.pl-theme-dark .ml-field .form-select,
body.pl-theme-dark .ml-field textarea.form-control {
    background: #0C2344;
    color: #F8FAFC;
    border-color: rgba(148, 163, 184, 0.28);
}

body.pl-theme-dark .ml-actions {
    background: rgba(11, 31, 60, 0.96);
    border-top-color: rgba(148, 163, 184, 0.22);
}

body.pl-theme-dark .ml-badge {
    background: rgba(216, 77, 21, 0.2);
    color: #FFB089;
}

body.pl-theme-dark .ml-badge.ok {
    background: #15803D;
    color: #fff;
}

body.pl-theme-dark .ml-badge.warn {
    background: #B45309;
    color: #fff;
}

body.pl-theme-dark .ml-badge.bad {
    background: #B91C1C;
    color: #fff;
}
