/* Variáveis de Cores e Estilos (Design System) */
:root {
    --primary-color: #0D8ABC; /* Azul confiança */
    --primary-hover: #0a6b94;
    --secondary-color: #F2994A; /* Laranja acolhedor */
    --bg-color: #F4F7FE;
    --sidebar-bg: #ffffff;
    --text-main: #2B3674;
    --text-muted: #A3AED0;
    --border-color: #E0E5F2;
    --white: #ffffff;
    
    /* Status Colors */
    --success: #05CD99;
    --warning: #FFCE20;
    --danger: #EE5D50;
    
    --shadow-sm: 0px 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0px 4px 12px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Layout Principal --- */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.sidebar-nav {
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-title {
    padding: 12px 24px 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    gap: 12px;
}

.nav-item a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-item:hover a, .nav-item.active a {
    color: var(--primary-color);
    background-color: rgba(13, 138, 188, 0.05);
    border-right: 3px solid var(--primary-color);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px);
}

/* --- Header Topo --- */
.top-header {
    height: 70px;
    background-color: var(--bg-color);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-main);
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.notifications {
    position: relative;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
}

.notifications .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info .role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Conteúdo Dinâmico --- */
.content-wrapper {
    padding: 24px;
    flex: 1;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Cards e Grids --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.bg-blue { background-color: var(--primary-color); }
.bg-green { background-color: var(--success); }
.bg-orange { background-color: var(--secondary-color); }
.bg-purple { background-color: #8E44AD; }

.stat-details h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-details .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 4px 0;
}

.stat-details .trend {
    font-size: 0.75rem;
    font-weight: 600;
}

.trend.up { color: var(--success); }
.trend.neutral { color: var(--text-muted); }

.card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 24px;
}

/* --- Tabelas --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.data-table td {
    font-size: 0.9rem;
}

.badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-status.success { background-color: rgba(5, 205, 153, 0.1); color: var(--success); }
.badge-status.pending { background-color: rgba(255, 206, 32, 0.1); color: #B8860B; }
.badge-status.danger { background-color: rgba(238, 93, 80, 0.1); color: var(--danger); }

/* --- Utilitários --- */
.text-green { color: var(--success) !important; }
.text-muted { color: var(--text-muted) !important; }
.font-bold { font-weight: 700 !important; }

/* --- Detalhes da Transação (Modal) --- */
.transaction-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
}

.detail-value {
    font-size: 0.9rem;
    color: var(--text-main);
}

/* --- Botões e Inputs --- */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

a.btn {
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--bg-color);
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: var(--transition);
}

.btn-icon:hover { color: var(--primary-color); }
.text-danger { color: var(--danger) !important; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--white);
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    width: 350px;
}

.search-bar i { color: var(--text-muted); margin-right: 10px; }
.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

/* --- Formulários --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.full-width { grid-column: 1 / -1; }

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 138, 188, 0.1);
}

.radio-group { display: flex; gap: 16px; }
.radio-group label { font-weight: 400; display: flex; align-items: center; gap: 8px; cursor: pointer; }

.form-divider {
    margin: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.form-divider span {
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--white);
    padding: 0 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* --- Modais --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal {
    background-color: var(--white);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay.show .modal { transform: translateY(0); }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* --- Responsividade --- */
.d-mobile { display: none; }

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -260px;
        height: 100vh;
    }
    .sidebar.open { left: 0; }
    .main-content { width: 100%; }
    .d-mobile { display: block; }
    .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; gap: 16px; align-items: stretch; }
    .search-bar { width: 100%; }
    .data-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* --- Tela de detalhes (painel admin mock) --- */
.detail-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.detail-toolbar h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
}

.detail-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.detail-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(13, 138, 188, 0.08);
    color: var(--primary-color);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.detail-main-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.summary-tile {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    border: 1px solid var(--border-color);
}

.summary-tile h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.summary-tile p {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 24px;
}

.kv-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.kv-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.kv-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kv-value {
    font-size: 0.92rem;
    color: var(--text-main);
    font-weight: 500;
}

.detail-sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.note-box {
    background: rgba(5, 205, 153, 0.06);
    border: 1px solid rgba(5, 205, 153, 0.25);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.5;
}

.note-box.note-warn {
    background: rgba(255, 206, 32, 0.1);
    border-color: rgba(184, 134, 11, 0.35);
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--border-color);
    margin-left: 8px;
    padding-left: 20px;
}

.timeline li {
    position: relative;
    padding-bottom: 18px;
    font-size: 0.88rem;
    color: var(--text-main);
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px var(--border-color);
}

.timeline .tl-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.timeline .tl-strong {
    font-weight: 600;
    margin-top: 2px;
    display: block;
}

.table-row-action {
    color: var(--primary-color);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.table-row-action:hover {
    opacity: 0.85;
}

.detail-card .card-header {
    padding: 14px 20px;
}

.detail-card .card-body {
    padding: 20px;
}

@media (max-width: 992px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-badge-group {
        margin-left: 0;
        width: 100%;
    }
}

/* --- Mala direta (mock UX) --- */
.modal.modal-wide {
    max-width: 720px;
}

.modal.modal-transfer-contas {
    max-width: 960px;
    width: calc(100vw - 24px);
}

.transfer-contas-scroll {
    max-height: min(62vh, 520px);
    overflow-y: auto;
    padding-right: 4px;
}

.transfer-contas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(278px, 1fr));
    gap: 14px;
}

.transfer-conta-card {
    margin: 0;
    padding: 16px 16px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: rgba(255, 255, 255, 0.97);
}

.transfer-conta-card__top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.transfer-conta-card__num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.2);
}

.transfer-conta-card__bank {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.12);
}

.transfer-conta-card__use {
    margin: -4px 0 0;
    font-size: 0.8rem;
    line-height: 1.42;
    opacity: 0.92;
}

.transfer-conta-card__meta {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.16);
    display: grid;
    gap: 8px;
    font-size: 0.78rem;
}

.transfer-conta-card__meta dt {
    margin: 0;
    font-weight: 600;
    opacity: 0.75;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.transfer-conta-card__meta dd {
    margin: 2px 0 0;
    font-weight: 700;
}

.transfer-conta-saque-btn {
    margin-top: auto;
    width: 100%;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border: none !important;
    color: #1e293b !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.transfer-conta-saque-btn:hover {
    filter: brightness(1.06);
}

/* Gradientes por card — paleta sortida e legível em fundo escuro/branded */
.transfer-conta-card--tone-1 {
    background: linear-gradient(145deg, #1c4f7a 0%, #2ea86a 52%, #0f2840 100%);
}
.transfer-conta-card--tone-2 {
    background: linear-gradient(145deg, #c9182f 0%, #7a0820 42%, #1a1a22 100%);
}
.transfer-conta-card--tone-3 {
    background: linear-gradient(145deg, #2563eb 0%, #7c5cff 46%, #0f172a 100%);
}
.transfer-conta-card--tone-4 {
    background: linear-gradient(145deg, #f97316 0%, #ea580c 38%, #422006 100%);
}
.transfer-conta-card--tone-5 {
    background: linear-gradient(145deg, #b91c1c 0%, #991b1b 40%, #1c1917 100%);
}
.transfer-conta-card--tone-6 {
    background: linear-gradient(145deg, #7c3aed 0%, #a21caf 50%, #1e0638 100%);
}
.transfer-conta-card--tone-7 {
    background: linear-gradient(145deg, #f59e0b 0%, #f97316 45%, #78350f 100%);
}
.transfer-conta-card--tone-8 {
    background: linear-gradient(145deg, #0369a1 0%, #0c3563 42%, #02131f 100%);
}
.transfer-conta-card--tone-9 {
    background: linear-gradient(145deg, #059669 0%, #047857 40%, #022c22 100%);
}
.transfer-conta-card--tone-10 {
    background: linear-gradient(145deg, #0d9488 0%, #0f766e 48%, #042f2e 100%);
}
.transfer-conta-card--tone-11 {
    background: linear-gradient(145deg, #0ea5e9 0%, #0284c7 45%, #0c4a6e 100%);
}
.transfer-conta-card--tone-12 {
    background: linear-gradient(145deg, #52525b 0%, #27272a 52%, #09090b 100%);
}
.transfer-conta-card--tone-13 {
    background: linear-gradient(145deg, #eab308 0%, #d97706 40%, #422006 100%);
}

.mala-twocol {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mala-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mala-list-scroll {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fafbff;
}

.mala-recipient-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.mala-recipient-row:last-child {
    border-bottom: none;
}

.mala-recipient-row.mala-hidden {
    display: none;
}

.mala-recipient-meta {
    flex: 1;
    min-width: 0;
}

.mala-recipient-meta strong {
    display: block;
    margin-bottom: 4px;
}

.mala-feedback-ok {
    color: var(--success);
    font-size: 0.88rem;
    font-weight: 600;
}

.mala-feedback-err {
    color: var(--danger);
    font-size: 0.88rem;
    font-weight: 600;
}

/* --- Galeria 12 cartões mala direta --- */
.mala-modelos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 11px;
}

.mala-modelo-pick {
    display: block;
    width: 100%;
    text-align: left;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 13px 12px 14px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    font: inherit;
    color: inherit;
}

.mala-modelo-pick:hover {
    border-color: rgba(13, 138, 188, 0.35);
    box-shadow: var(--shadow-md);
}

.mala-modelo-pick.is-active {
    border-color: var(--primary-color);
    box-shadow: 0 10px 36px rgba(13, 138, 188, 0.22);
}

.mala-modelo-gradient {
    height: 7px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.mala-modelo-pick-emoji {
    display: block;
    font-size: 1.35rem;
    margin-bottom: 8px;
    line-height: 1;
}

.mala-modelo-pick-tit {
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.3;
    color: var(--text-main);
}

.mala-modelo-pick-desc {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

.mala-keywords-panel {
    margin-top: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.mala-kw-legend {
    margin: 0 0 8px;
    font-size: 0.92rem;
    color: var(--text-main);
}

.mala-kw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px 14px;
}

.mala-kw-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 11px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--white);
    cursor: pointer;
    font-size: 0.82rem;
    line-height: 1.38;
}

.mala-kw-item:hover {
    border-color: rgba(13, 138, 188, 0.35);
    box-shadow: var(--shadow-sm);
}

.mala-kw-item-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.mala-kw-item input {
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.mala-kw-label {
    font-weight: 600;
    color: var(--text-main);
}

.mala-kw-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 400;
}

.mala-tech-html-details summary::-webkit-details-marker {
    margin-right: 6px;
}

.mala-preview-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 22px;
}

.mala-live-card-wrap {
    min-width: 0;
}

.mala-live-card-scaler {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 14px;
    overflow: auto;
    max-height: min(58vh, 560px);
}

.mala-live-card-scaler #mala-live-card-preview table {
    margin-left: auto !important;
    margin-right: auto !important;
}

.mala-editor-col {
    min-width: 0;
}

.textarea-mono {
    font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.48;
}

.mala-preview-html-box {
    max-height: min(70vh, 640px);
    overflow: auto;
    background: var(--bg-color);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

@media (max-width: 992px) {
    .mala-preview-split {
        grid-template-columns: 1fr;
    }

    .mala-live-card-scaler {
        max-height: 420px;
    }
}
