        /* Tab Navigation */
        .tab-nav {
            display: flex;
            gap: 8px;
            padding: 16px 24px;
            background: white;
            border-bottom: 1px solid var(--gray-200);
            position: fixed;
            top: 70px;
            left: 0;
            width: 100%;
            z-index: 999;
            overflow-x: auto;
        }

        .tab-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 10px 20px;
            border-radius: var(--radius-md);
            font-size: 0.85rem;
            font-weight: 600;
            border: 1.5px solid var(--gray-200);
            background: white;
            color: var(--gray-600);
            cursor: pointer;
            transition: var(--transition);
            white-space: nowrap;
        }

        .tab-btn:hover {
            background: var(--gray-50);
            border-color: var(--gray-300);
            color: var(--gray-800);
        }

        .tab-btn.active {
            background: #25D366;
            color: white;
            border-color: #25D366;
        }

        .tab-btn.active:hover {
            background: #1da851;
        }

        .g-main.whatsapp-main {
            padding-top: 146px;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        /* WhatsApp Hero */
        .wpp-hero {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            color: white;
            padding: 32px 36px;
            border-radius: var(--radius-xl);
            margin-bottom: 24px;
            position: relative;
            overflow: hidden;
        }

        .wpp-hero::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -10%;
            width: 350px;
            height: 350px;
            background: rgba(255,255,255,0.08);
            border-radius: 50%;
        }

        .wpp-hero-content {
            position: relative;
            z-index: 1;
        }

        .wpp-hero h1 {
            font-size: 1.6rem;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .wpp-hero p {
            opacity: 0.9;
            font-size: 0.9rem;
        }

        /* Section title */
        .section-title {
            font-size: 1rem;
            font-weight: 700;
            color: var(--gray-800);
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .section-title i {
            color: #25D366;
        }

        /* Toggle switch */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background: var(--gray-300);
            border-radius: 24px;
            transition: var(--transition);
        }

        .toggle-slider::before {
            content: '';
            position: absolute;
            width: 18px;
            height: 18px;
            left: 3px;
            bottom: 3px;
            background: white;
            border-radius: 50%;
            transition: var(--transition);
        }

        .toggle-switch input:checked + .toggle-slider {
            background: #25D366;
        }

        .toggle-switch input:checked + .toggle-slider::before {
            transform: translateX(20px);
        }

        .toggle-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 0;
            border-bottom: 1px solid var(--gray-100);
        }

        .toggle-row:last-child {
            border-bottom: none;
        }

        .toggle-label {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--gray-700);
        }

        .toggle-desc {
            font-size: 0.78rem;
            color: var(--gray-500);
            margin-top: 2px;
        }

        /* Input with action */
        .input-with-action {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .input-with-action .g-input {
            flex: 1;
        }

        .input-with-action .g-btn {
            flex-shrink: 0;
        }

        /* Readonly field */
        .readonly-field {
            background: var(--gray-50);
            border: 1.5px solid var(--gray-200);
            border-radius: var(--radius-md);
            padding: 10px 14px;
            font-size: 0.875rem;
            color: var(--gray-600);
            font-family: 'Courier New', monospace;
            word-break: break-all;
        }

        /* Stats cards */
        .stats-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }

        .stat-card {
            background: white;
            border: 1px solid var(--gray-200);
            border-radius: var(--radius-lg);
            padding: 20px;
            text-align: center;
            transition: var(--transition);
        }

        .stat-card:hover {
            box-shadow: var(--shadow-md);
        }

        .stat-card-value {
            font-size: 1.8rem;
            font-weight: 800;
            color: var(--gray-800);
            margin-bottom: 4px;
        }

        .stat-card-value.green { color: #25D366; }
        .stat-card-value.blue { color: var(--primary); }
        .stat-card-value.purple { color: var(--accent); }
        .stat-card-value.orange { color: var(--warning); }

        .stat-card-label {
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--gray-500);
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        /* Filters row */
        .filters-row {
            display: flex;
            gap: 16px;
            align-items: end;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }

        .filters-row .g-form-group {
            margin-bottom: 0;
            min-width: 150px;
        }

        /* Status badges */
        .badge-enviado { background: var(--success-50); color: var(--success); }
        .badge-erro { background: var(--danger-50); color: var(--danger); }
        .badge-entrada { background: var(--primary-50); color: var(--primary); }
        .badge-saida { background: var(--gray-100); color: var(--gray-600); }
        .badge-bot { background: #f0fdf4; color: #25D366; }
        .badge-lembrete { background: #faf5ff; color: var(--accent); }
        .badge-recepcao { background: var(--primary-50); color: var(--primary); }

        /* Pagination */
        .pagination {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 20px;
        }

        .pagination button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border-radius: var(--radius-md);
            border: 1.5px solid var(--gray-200);
            background: white;
            color: var(--gray-600);
            font-size: 0.82rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
        }

        .pagination button:hover:not(:disabled) {
            background: var(--gray-50);
            border-color: var(--gray-300);
        }

        .pagination button.active {
            background: #25D366;
            color: white;
            border-color: #25D366;
        }

        .pagination button:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        .pagination-info {
            font-size: 0.82rem;
            color: var(--gray-500);
            margin: 0 8px;
        }

        /* Status indicator */
        .status-indicator {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
            font-size: 0.875rem;
        }

        .status-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            display: inline-block;
        }

        .status-dot.online { background: #25D366; box-shadow: 0 0 8px rgba(37,211,102,0.4); }
        .status-dot.offline { background: var(--danger); box-shadow: 0 0 8px rgba(239,68,68,0.4); }

        /* Error list */
        .error-item {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 12px 16px;
            background: var(--danger-50);
            border: 1px solid #fecaca;
            border-radius: var(--radius-md);
            margin-bottom: 8px;
            font-size: 0.82rem;
        }

        .error-item i {
            color: var(--danger);
            margin-top: 2px;
        }

        .error-item-time {
            font-weight: 600;
            color: var(--gray-600);
            white-space: nowrap;
        }

        .error-item-msg {
            color: var(--gray-700);
            flex: 1;
        }

        /* Collapsible */
        .collapsible-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 0;
            cursor: pointer;
            user-select: none;
        }

        .collapsible-header h3 {
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--gray-700);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .collapsible-header i.toggle-icon {
            transition: var(--transition);
            color: var(--gray-400);
        }

        .collapsible-header.open i.toggle-icon {
            transform: rotate(180deg);
        }

        .collapsible-body {
            display: none;
            padding-bottom: 16px;
        }

        .collapsible-body.open {
            display: block;
        }

        .guide-steps {
            counter-reset: step;
            list-style: none;
            padding: 0;
        }

        .guide-steps li {
            counter-increment: step;
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 12px 0;
            border-bottom: 1px solid var(--gray-100);
            font-size: 0.875rem;
            color: var(--gray-700);
            line-height: 1.5;
        }

        .guide-steps li:last-child {
            border-bottom: none;
        }

        .guide-steps li::before {
            content: counter(step);
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 28px;
            height: 28px;
            background: #25D366;
            color: white;
            border-radius: 50%;
            font-weight: 700;
            font-size: 0.78rem;
            flex-shrink: 0;
        }

        /* Textarea */
        .g-textarea {
            width: 100%;
            padding: 10px 14px;
            border: 1.5px solid var(--gray-200);
            border-radius: var(--radius-md);
            font-size: 0.875rem;
            color: var(--gray-800);
            background: white;
            transition: var(--transition);
            outline: none;
            font-family: 'Inter', sans-serif;
            resize: vertical;
            min-height: 100px;
        }

        .g-textarea:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
        }

        .placeholder-help {
            font-size: 0.75rem;
            color: var(--gray-400);
            margin-top: 4px;
            font-style: italic;
        }

        /* Form grid */
        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }

        .form-grid .full-width {
            grid-column: 1 / -1;
        }

        /* Connection card */
        .connection-card {
            display: flex;
            align-items: center;
            gap: 20px;
            padding: 24px;
            background: white;
            border: 1px solid var(--gray-200);
            border-radius: var(--radius-lg);
            margin-bottom: 24px;
        }

        .connection-icon {
            width: 56px;
            height: 56px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            flex-shrink: 0;
        }

        .connection-icon.connected {
            background: #f0fdf4;
            color: #25D366;
        }

        .connection-icon.disconnected {
            background: var(--danger-50);
            color: var(--danger);
        }

        .connection-info {
            flex: 1;
        }

        .connection-info h3 {
            font-size: 1rem;
            font-weight: 700;
            color: var(--gray-800);
            margin-bottom: 2px;
        }

        .connection-info p {
            font-size: 0.82rem;
            color: var(--gray-500);
        }

        /* Toast notification */
        .toast {
            position: fixed;
            bottom: 24px;
            right: 24px;
            padding: 14px 24px;
            border-radius: var(--radius-md);
            color: white;
            font-size: 0.875rem;
            font-weight: 600;
            z-index: 2000;
            transform: translateY(100px);
            opacity: 0;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .toast.show {
            transform: translateY(0);
            opacity: 1;
        }

        .toast-success { background: #25D366; }
        .toast-error { background: var(--danger); }
        .toast-info { background: var(--primary); }

        /* Responsive */
        @media (max-width: 768px) {
            .tab-btn {
                padding: 8px 14px;
                font-size: 0.78rem;
            }

            .g-main.whatsapp-main {
                padding-top: 130px;
            }

            .wpp-hero {
                padding: 24px 20px;
            }

            .wpp-hero h1 {
                font-size: 1.3rem;
            }

            .form-grid {
                grid-template-columns: 1fr;
            }

            .stats-row {
                grid-template-columns: 1fr 1fr;
            }

            .filters-row {
                flex-direction: column;
                align-items: stretch;
            }

            .filters-row .g-form-group {
                min-width: auto;
            }

            .connection-card {
                flex-direction: column;
                text-align: center;
            }

            .input-with-action {
                flex-direction: column;
            }
        }

        @media (max-width: 480px) {
            .stats-row {
                grid-template-columns: 1fr;
            }
        }
