:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-2: #222633;
    --border: #2a2f3d;
    --text: #e4e6ed;
    --muted: #8b919e;
    --primary: #4f8cff;
    --primary-hover: #3d7aef;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --sidebar-w: 260px;
    --header-h: 56px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --tap: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Mobile header ── */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--header-h) + var(--safe-top));
    padding-top: var(--safe-top);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 150;
    align-items: center;
    gap: 0.5rem;
    padding-inline: 0.75rem;
}

.mobile-title {
    flex: 1;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-user {
    font-size: 0.75rem;
    color: var(--muted);
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-queue-pill {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: rgba(79, 140, 255, 0.2);
    border: 1px solid var(--primary);
    border-radius: 999px;
    color: var(--primary);
    white-space: nowrap;
}

.mobile-queue-pill:empty { display: none; }

/* ── Sidebar ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 180;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-w);
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 1rem 0;
    padding-top: calc(1rem + var(--safe-top));
    padding-bottom: calc(1rem + var(--safe-bottom));
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-brand {
    padding: 0.5rem 1.25rem 1rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
}

.nav-link {
    display: block;
    padding: 0.75rem 1.25rem;
    min-height: var(--tap);
    color: var(--muted);
    transition: background 0.15s, color 0.15s;
    font-size: 0.95rem;
}
.nav-link:hover,
.nav-link:active { background: rgba(79, 140, 255, 0.1); color: var(--text); text-decoration: none; }
.nav-logout { margin-top: 0.5rem; color: var(--danger); }

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--tap);
    height: var(--tap);
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.25rem;
    -webkit-user-select: none;
    user-select: none;
}

.menu-toggle:active { background: var(--border); }

/* ── Content ── */
.content {
    margin-left: var(--sidebar-w);
    padding: 1.5rem 2rem;
    padding-bottom: calc(1.5rem + var(--safe-bottom));
    min-height: 100vh;
    min-height: 100dvh;
}

.content-auth {
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1rem;
    padding-top: calc(1rem + var(--safe-top));
    padding-bottom: calc(1rem + var(--safe-bottom));
}

.topbar {
    margin-bottom: 1.25rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.page-header {
    margin-bottom: 1.25rem;
}

.page-header h1 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

h1 { font-size: 1.4rem; margin-bottom: 1rem; }
h2 { font-size: 1.05rem; margin-bottom: 0.75rem; }
h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }

label {
    display: block;
    margin: 0.75rem 0 0.35rem;
    font-size: 0.85rem;
    color: var(--muted);
}

input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="number"], input[type="file"],
select, textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    min-height: var(--tap);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 16px; /* evita zoom no iOS */
    -webkit-appearance: none;
    appearance: none;
}

textarea {
    resize: vertical;
    font-family: inherit;
    min-height: 120px;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b919e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2rem;
}

input[type="file"] {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 1.1rem;
    min-height: var(--tap);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 0.75rem;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}
.btn:hover { background: var(--border); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #000; }
.btn-sm {
    padding: 0.4rem 0.65rem;
    min-height: 36px;
    font-size: 0.85rem;
    margin-top: 0;
}
.btn-block { width: 100%; }

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-group .btn { margin-top: 0; flex: 1; min-width: 0; }

/* ── Tables ── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border-radius: 8px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}

.table th, .table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.table th {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Card layout para mobile */
.table-responsive { min-width: 0; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-draft { background: #374151; }
.badge-sending, .badge-scheduled { background: #1e40af; }
.badge-completed, .badge-sent { background: #166534; }
.badge-failed { background: #991b1b; }
.badge-paused, .badge-pending { background: #92400e; }
.badge-email { background: #1e3a5f; color: #e0e7ff; }
.badge-whatsapp { background: #166534; color: #dcfce7; }
.channel-badges { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }

.wa-actions {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.wa-actions-inline {
    flex-direction: row;
    flex-wrap: wrap;
    border-top: none;
    padding-top: 0;
    margin-top: 1rem;
}
.wa-connection-card h2 { margin: 0; }
.wa-connection-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.wa-qr-box {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
}
.wa-qr-image {
    max-width: 260px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}
.wa-pairing-code {
    margin: 0.75rem 0 0;
    font-size: 1.1rem;
}
.wa-steps-list {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.7;
}
.wa-steps-list li { margin-bottom: 0.35rem; }
.wa-step-current { color: var(--text); }
.wa-step-done { color: var(--muted); }
.wa-steps-title { margin-top: 0; }
.setup-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}
.setup-checklist li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.setup-checklist li:last-child { border-bottom: none; }
.wa-dashboard-setup h2 { margin-top: 0; }
.form-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0 1rem;
}
.form-section-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}
.provider-fields { margin-bottom: 0.5rem; }

.copy-field {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}
.copy-field-input {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
}
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    cursor: pointer;
}
.checkbox-item input { width: auto; margin: 0; }

.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.alert-success { background: rgba(34, 197, 94, 0.15); border: 1px solid var(--success); }
.alert-error { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--danger); }

.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.4; }

.auth-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    width: 100%;
    max-width: 400px;
}

.auth-footer { margin-top: 1.25rem; text-align: center; color: var(--muted); font-size: 0.9rem; }

.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: stretch;
}
.search-form input { flex: 1; min-width: 0; margin-top: 0; }
.search-form .btn { margin-top: 0; white-space: nowrap; }

.pagination {
    display: flex;
    gap: 0.35rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--tap);
    min-height: 36px;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.multi-select { min-height: 140px; margin-top: 0.5rem; }

/* Checklist de contatos (mobile-friendly) */
.contact-filter {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    background: var(--bg);
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    min-height: var(--tap);
    -webkit-user-select: none;
    user-select: none;
}

.check-item:active { background: var(--surface-2); }

.check-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.check-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.9rem;
    line-height: 1.3;
}

.check-label small { color: var(--muted); font-size: 0.8rem; }

.group-box {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
}

.logo-preview { max-height: 60px; margin: 0.5rem 0; border-radius: 6px; }

.doc pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem;
    overflow-x: auto;
    font-size: 0.8rem;
    margin: 0.5rem 0 1rem;
    -webkit-overflow-scrolling: touch;
}

.doc h3 { margin-top: 1rem; font-size: 0.95rem; }

.api-key {
    display: block;
    padding: 0.85rem;
    background: var(--bg);
    border-radius: 8px;
    margin-top: 0.5rem;
    word-break: break-all;
    font-size: 0.85rem;
}

.list { list-style: none; }
.list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.list-item-actions {
    display: flex;
    gap: 0.35rem;
    margin-left: auto;
}

.dispatch-options {
    display: grid;
    gap: 1rem;
}

.dispatch-block {
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.dispatch-block h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.dispatch-test {
    border-color: rgba(245, 158, 11, 0.5);
}

.dispatch-mass {
    border-color: rgba(79, 140, 255, 0.4);
}

.group-section-title {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.group-box-test {
    border-left: 3px solid var(--warning);
    padding-left: 0.85rem;
}

.badge-test {
    background: rgba(245, 158, 11, 0.25);
    color: var(--warning);
}

.variant-list { list-style: none; margin-bottom: 1rem; }
.variant-item {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 0.5rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border);
}
.variant-item-head { flex: 1; min-width: 0; }
.variant-fallback { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.ab-splits-form {
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.85rem; margin-bottom: 1rem;
}
.ab-splits-title { font-size: 0.85rem; margin-bottom: 0.35rem; }
.ab-splits-grid { display: grid; gap: 0.5rem; }
.ab-split-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.ab-split-row label { margin: 0; font-size: 0.9rem; color: var(--text); }
.ab-split-input { display: flex; align-items: center; gap: 0.35rem; }
.ab-split-input input { width: 72px; min-height: 40px; margin: 0; text-align: center; }
.ab-split-total strong.ab-ok { color: var(--success); }
.ab-split-total strong.ab-bad { color: var(--danger); }

.ab-split-total strong.ab-bad { color: var(--danger); }

.link-detect-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.5rem 0 1rem;
    font-size: 0.85rem;
}

.link-detect-box ul {
    list-style: none;
    margin: 0.5rem 0 0;
}

.link-detect-box li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.link-label-form {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-wrap: wrap;
}

.link-label-input {
    min-width: 100px;
    max-width: 140px;
    min-height: 36px;
    margin: 0;
}

.schedule-info {
    padding: 0.85rem 1rem;
    background: rgba(79, 140, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.schedule-hint {
    margin-top: 0.35rem;
}

input[type="datetime-local"] {
    margin-bottom: 0.25rem;
}

@media (min-width: 769px) {
    .dispatch-options {
        grid-template-columns: 1fr 1fr;
    }
    .dispatch-options-3 {
        grid-template-columns: 1fr 1fr;
    }
}

.queue-badge {
    margin: 0.75rem 1.25rem;
    padding: 0.55rem 0.75rem;
    background: rgba(79, 140, 255, 0.15);
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--primary);
    text-align: center;
}

/* Cards de lista (mobile) */
.mobile-cards { display: none; }

.mobile-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem;
    margin-bottom: 0.65rem;
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.mobile-card-label {
    color: var(--muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.mobile-card-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

/* Mapping cards import */
.mapping-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem;
    margin-bottom: 0.65rem;
}

.mapping-card strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.mapping-sample {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

/* ── Mobile breakpoint ── */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        width: min(var(--sidebar-w), 88vw);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 1rem;
        padding-top: calc(var(--header-h) + var(--safe-top) + 0.75rem);
        padding-left: calc(1rem + var(--safe-left));
        padding-right: calc(1rem + var(--safe-right));
    }

    .topbar { display: none; }

    .grid-2,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-card { padding: 0.75rem 0.5rem; }
    .stat-value { font-size: 1.4rem; }
    .stat-label { font-size: 0.7rem; }

    h1, .page-header h1 { font-size: 1.25rem; }

    .card { padding: 1rem; border-radius: 12px; }

    .btn-group { flex-direction: column; }
    .btn-group .btn { width: 100%; }

    .search-form { flex-direction: column; }
    .search-form .btn { width: 100%; }

    /* Esconder tabela desktop, mostrar cards */
    .desktop-table { display: none; }
    .mobile-cards { display: block; }

    /* Tabelas que precisam ficar: card rows */
    .table-responsive thead { display: none; }

    .table-responsive,
    .table-responsive tbody,
    .table-responsive tr,
    .table-responsive td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .table-responsive tr {
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 0.75rem;
        margin-bottom: 0.65rem;
    }

    .table-responsive td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.35rem 0;
        border: none;
        font-size: 0.9rem;
    }

    .table-responsive td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted);
        font-size: 0.75rem;
        flex-shrink: 0;
        max-width: 40%;
    }

    .table-responsive td[data-label=""]::before,
    .table-responsive td:not([data-label])::before {
        content: none;
    }

    .table-wrap { overflow-x: visible; }

    .table:not(.table-responsive) {
        min-width: 0;
    }

    .auth-box { padding: 1.25rem; border-radius: 14px; }

    .pagination a {
        min-width: 40px;
        min-height: 40px;
    }

    .contact-checklist { max-height: 240px; }

    .list li { flex-direction: column; align-items: flex-start; }
    .list-item-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
}

@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid .stat-card:last-child {
        grid-column: 1 / -1;
    }

    .mobile-user { display: none; }
}

/* IDs para API */
.id-badge {
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    background: var(--surface-2);
    color: var(--muted);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    vertical-align: middle;
}

.id-badge-inline { font-size: 0.65rem; }

.id-hint {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: normal;
}

.page-header-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.nav-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 0.75rem 1rem 0.25rem;
    opacity: 0.85;
}

.library-list { list-style: none; }

.library-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.library-item:last-child { border-bottom: none; }

.library-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.campaign-step { margin-bottom: 1rem; }

.campaign-step h2 { margin-bottom: 0.5rem; }

.import-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Desktop: esconder toggle flutuante */
@media (min-width: 769px) {
    .menu-toggle { display: none; }
}
