@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-deep: #000000;
    --bg-card: rgba(0, 0, 0, 0.3);
    --bg-sidebar: #050505;
    --primary: #1DFF72;
    --primary-glow: rgba(29, 255, 114, 0.2);
    --error: #FF3B3B;
    --error-glow: rgba(255, 59, 59, 0.2);
    --warning: #FFB800;
    --warning-glow: rgba(255, 184, 0, 0.2);
    --text-white: #F4F4F4;
    --text-muted: #888888;
    --border: rgba(255, 255, 255, 0.05);
    --sidebar-width: 280px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif !important;
}

body {
    background-color: var(--bg-deep) !important;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-white) !important;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Sidebar Floating Monarch Style */
.sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - 40px);
    background-color: var(--bg-sidebar) !important;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border);
    position: fixed;
    left: 20px;
    top: 20px;
    bottom: 20px;
    padding: 20px 24px 32px;
    display: flex;
    flex-direction: column;
    z-index: 2000;
    border-radius: 32px;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    margin-bottom: 20px;
    text-decoration: none;
}

.logo-img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.nav-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    margin-top: 24px;
    opacity: 0.6;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-link.active {
    background: rgba(29, 255, 114, 0.03);
    border-color: rgba(29, 255, 114, 0.15);
    color: var(--primary);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 0 12px rgba(29, 255, 114, 0.05);
}

.nav-link.active svg {
    filter: drop-shadow(0 0 8px var(--primary));
}

.nav-link.active .nav-main-text {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(29, 255, 114, 0.3);
}

.nav-link.active .nav-desc {
    color: var(--primary);
    opacity: 0.8;
}

.nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-white);
}

.nav-link-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-main-text {
    display: block;
    font-weight: 600;
}

.nav-desc {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.6;
    display: block;
}

/* Navigation Dropdown System */
.nav-dropdown {
    position: relative;
    margin-bottom: 4px;
}

.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--primary);
}

.nav-dropdown-items {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0 8px 10px;
    margin-top: -4px;
    position: relative;
}


.nav-dropdown.open .nav-dropdown-items {
    display: flex;
    animation: navSlideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.nav-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-dropdown-link svg {
    opacity: 0.6;
}

.nav-dropdown-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.nav-dropdown-link:hover svg {
    opacity: 1;
    color: var(--primary);
}

.nav-dropdown-link.active {
    background: rgba(29, 255, 114, 0.03);
    border-color: rgba(29, 255, 114, 0.1);
    color: var(--primary);
}

@keyframes navSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-white);
    text-decoration: none;
    margin-bottom: 24px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #16c65b);
    color: #000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    box-shadow: 0 0 20px var(--primary-glow);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
}

.user-role {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
}

/* Main Content Area */
.main-content {
    margin-left: calc(var(--sidebar-width) + 60px);
    flex: 1;
    padding: 40px 48px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

/* Glass Card System */
.glass-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 28px;
    padding: 32px;
    transition: var(--transition);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(29, 255, 114, 0.3);
}

.glass-card.card-active {
    border-color: rgba(29, 255, 114, 0.3);
}

.glass-card.card-inactive {
    border-color: rgba(255, 59, 59, 0.3);
}

.glass-card.card-warning {
    border-color: rgba(255, 184, 0, 0.3);
}

/* Dashboard UI Components */
.stat-header {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.stat-header span {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    color: #fff;
    margin-left: 4px;
}

.stat-success {
    color: var(--primary);
}

.stat-error {
    color: var(--error);
}

.pulse-button {
    background: linear-gradient(135deg, var(--primary), #16c65b);
    color: #000;
    padding: 8px 24px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    box-shadow: 0 0 20px var(--primary-glow);
    cursor: pointer;
    transition: var(--transition);
}

.pulse-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-glow);
}

/* Apollo Loader */
.loader-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    z-index: 3000;
    transition: width 0.4s ease;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.fade-out {
    animation: fadeOut 0.2s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ==========================================================================
   CENTRAL DE OPERAÇÕES - MONARCH V8.5
   ========================================================================== */

.filter-group {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    padding: 6px;
    border-radius: 100px;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.filter-pill {
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.filter-pill.active {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary-glow);
}

.filter-pill:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chip-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(20px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.chip-card.connected {
    border-color: rgba(29, 255, 114, 0.15);
}

.chip-card.disconnected {
    border-color: rgba(255, 59, 59, 0.15);
}

.chip-card:hover {
    transform: translateY(-5px);
    background: rgba(15, 15, 15, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.chip-avatar {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
    display: block;
}

.chip-status-badge {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-connected {
    background: rgba(29, 255, 114, 0.05);
    color: var(--primary);
    border: 1px solid rgba(29, 255, 114, 0.15);
}

.badge-disconnected {
    background: rgba(255, 59, 59, 0.05);
    color: var(--error);
    border: 1px solid rgba(255, 59, 59, 0.15);
}

.chip-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.chip-action-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.chip-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.1);
}

.btn-reconnect {
    border-color: rgba(29, 255, 114, 0.4) !important;
    color: var(--primary) !important;
    background: rgba(29, 255, 114, 0.05) !important;
}

.btn-reconnect:hover {
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-verify {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.btn-delete {
    border-color: rgba(255, 59, 59, 0.4) !important;
    color: var(--error) !important;
    background: rgba(255, 59, 59, 0.05) !important;
}

.btn-delete:hover {
    box-shadow: 0 0 15px var(--error-glow);
}

@keyframes neon-pulse {
    0% {
        box-shadow: 0 0 5px var(--primary-glow);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 15px var(--primary-glow);
        transform: scale(1.1);
    }

    100% {
        box-shadow: 0 0 5px var(--primary-glow);
        transform: scale(1);
    }
}

.status-pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    animation: neon-pulse 2s infinite;
    z-index: 10;
}

.loader-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(29, 255, 114, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   TOGGLE SWITCHES - MONARCH V8.5
   ========================================================================== */

.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: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked+.toggle-slider {
    background: rgba(29, 255, 114, 0.15);
    border-color: rgba(29, 255, 114, 0.3);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================================================
   COMANDO DE TRANSMISSÃO - CAMPAIGN MODULE
   ========================================================================== */

.campaign-shell {
    padding-bottom: 100px;
}

.campaign-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: flex-start;
}

.campaign-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.campaign-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 8px;
    color: #fff;
}

.campaign-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.btn-outline-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* Campaign Cards */
.campaign-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(20px);
}

.campaign-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.campaign-section-title {
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
}

.campaign-counter {
    font-size: 10px;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.campaign-label {
    display: block;
    font-size: 10px;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.campaign-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 16px 20px;
    color: #fff;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.campaign-input:focus {
    border-color: rgba(29, 255, 114, 0.3);
    box-shadow: 0 0 20px rgba(29, 255, 114, 0.05);
}

.campaign-input::placeholder {
    color: #333;
}

.campaign-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 16px 20px;
    color: #fff;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.campaign-textarea:focus {
    border-color: rgba(29, 255, 114, 0.3);
}

.campaign-textarea::placeholder {
    color: #333;
}

.campaign-hint {
    font-size: 11px;
    color: #444;
    margin-top: 8px;
    font-weight: 500;
}

/* Leads Source Tabs */
.leads-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.leads-tab {
    padding: 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
}

.leads-tab.active {
    background: rgba(29, 255, 114, 0.08);
    border-color: rgba(29, 255, 114, 0.4);
    color: #fff;
    box-shadow: 0 0 15px rgba(29, 255, 114, 0.08);
}

.leads-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.file-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.01);
}

.file-upload-zone:hover {
    border-color: rgba(29, 255, 114, 0.3);
    background: rgba(29, 255, 114, 0.02);
}

.file-upload-zone.has-file {
    border-color: rgba(29, 255, 114, 0.4);
    background: rgba(29, 255, 114, 0.03);
}

/* Instance Selector Grid */
.instance-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.instance-select-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 18px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.instance-select-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.instance-select-card.selected {
    border-color: rgba(29, 255, 114, 0.4);
    background: rgba(29, 255, 114, 0.03);
}

.instance-select-card.offline {
    opacity: 0.5;
}

.instance-name {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instance-badge {
    font-size: 8px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instance-badge.online {
    background: rgba(29, 255, 114, 0.1);
    color: var(--primary);
    border: 1px solid rgba(29, 255, 114, 0.2);
}

.instance-badge.offline {
    background: rgba(255, 59, 59, 0.1);
    color: var(--error);
    border: 1px solid rgba(255, 59, 59, 0.2);
}

.instance-meta {
    font-size: 10px;
    font-weight: 700;
    color: #444;
    letter-spacing: 0.3px;
}

.instance-phone {
    font-size: 13px;
    font-weight: 900;
    color: #fff;
    margin-top: 4px;
}

/* Message Composer */
.message-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
}

.message-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.message-block-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
}

.message-variables {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.var-tag {
    background: rgba(29, 255, 114, 0.08);
    border: 1px solid rgba(29, 255, 114, 0.25);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.var-tag:hover {
    background: rgba(29, 255, 114, 0.15);
    transform: scale(1.05);
}

.format-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: var(--transition);
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.media-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.media-upload-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.media-upload-btn.has-file {
    border-color: rgba(29, 255, 114, 0.3);
    background: rgba(29, 255, 114, 0.03);
    color: var(--primary);
}

.media-upload-btn span {
    font-size: 12px;
    font-weight: 700;
}

.media-upload-btn small {
    font-size: 9px;
    font-weight: 600;
    opacity: 0.5;
}

.media-preview {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

.btn-add-message {
    width: 100%;
    padding: 14px;
    background: rgba(29, 255, 114, 0.03);
    border: 1px dashed rgba(29, 255, 114, 0.2);
    border-radius: 16px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-add-message:hover {
    background: rgba(29, 255, 114, 0.08);
    border-color: rgba(29, 255, 114, 0.4);
}

/* Interactive Menu Tabs */
.menu-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
}

.menu-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-remove-sm {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-remove-sm:hover {
    background: rgba(255, 59, 59, 0.1);
    border-color: rgba(255, 59, 59, 0.3);
    color: var(--error);
}

.menu-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.menu-tab {
    padding: 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
}

.menu-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary-glow);
}

.menu-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.menu-content {
    min-height: 40px;
    margin-bottom: 16px;
}

.btn-add-sub {
    background: rgba(29, 255, 114, 0.05);
    border: 1px solid rgba(29, 255, 114, 0.2);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-sub:hover {
    background: rgba(29, 255, 114, 0.1);
}

.menu-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Governance */
.governance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.governance-label {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.delay-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.delay-input {
    width: 70px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 14px;
    color: #fff;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.delay-input:focus {
    border-color: rgba(29, 255, 114, 0.3);
}

.delay-separator {
    font-size: 12px;
    font-weight: 900;
    color: var(--text-muted);
}

.delay-unit {
    font-size: 12px;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Phone Preview - Realistic Smartphone */
.phone-preview-container {
    position: sticky;
    top: 48px;
}

.phone-bezel {
    background: #1a1a1a;
    border: 4px solid #2a2a2a;
    border-radius: 48px;
    padding: 10px;
    position: relative;
    max-width: 360px;
    height: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 30px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.phone-notch {
    width: 100px;
    height: 24px;
    background: #1a1a1a;
    border-radius: 0 0 16px 16px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-screen {
    background: #0b141a;
    border-radius: 38px;
    overflow: hidden;
    height: 700px;
    max-height: 700px;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.phone-header {
    grid-row: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    padding-top: 32px;
    background: rgba(11, 20, 26, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.phone-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.phone-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-contact-name {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

.phone-contact-status {
    font-size: 10px;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.phone-contact-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(29, 255, 114, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(29, 255, 114, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(29, 255, 114, 0);
    }
}

.phone-chat {
    grid-row: 2;
    min-height: 0;
    padding: 16px 20px;
    background: #0b141a;
    position: relative;
    overflow-y: scroll !important;
    /* Force scrollbar and context */
    overscroll-behavior: contain;
    /* Prevent leaking scroll to page */
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(0, 0, 0, 0.5);
    /* High contrast scrollbar */
    z-index: 5;
}


.phone-chat::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    /* Bigger watermark */
    height: 200px;
    background: url('../../assets/img/logo-zapp.png') center/contain no-repeat;
    opacity: 0.5;
    /* User asked for 50% */
    pointer-events: none;
    z-index: 0;
}


.preview-bubble {
    background: #005c4b;
    border-radius: 12px 12px 0 12px;
    padding: 8px 12px;
    padding-bottom: 22px;
    /* Space for time */
    max-width: 85%;
    align-self: flex-end;
    font-size: 14px;
    line-height: 1.4;
    color: #fff;
    word-wrap: break-word;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.preview-bubble-time {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 10px;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 3px;
}


.preview-bubble::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 12px;
    height: 12px;
    background: #005c4b;
    clip-path: polygon(0 0, 0% 100%, 100% 100%);
}

.phone-footer {
    grid-row: 3;
    padding: 12px 16px 20px;
    background: #0b141a;
}

/* Time badge removed - integrated into bubble */
.phone-time-badge {
    display: none;
}


.phone-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-input-placeholder {
    flex: 1;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.phone-send-btn {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Campaign Footer (Fixed) */
.campaign-footer {
    position: fixed;
    bottom: 0;
    left: calc(var(--sidebar-width) + 60px);
    right: 0;
    padding: 16px 64px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.campaign-footer-stats {
    display: flex;
    gap: 40px;
}

.footer-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.footer-stat-label {
    font-size: 10px;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-stat-value {
    font-size: 20px;
    font-weight: 950;
    color: #fff;
}

.footer-stat-active {
    color: var(--primary);
}

.footer-stat-unit {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.campaign-launch-btn {
    background: linear-gradient(135deg, var(--primary), #16c65b);
    color: #000;
    padding: 16px 40px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 30px var(--primary-glow);
    transition: var(--transition);
}

.campaign-launch-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px var(--primary-glow);
}

/* Smart Scheduling */
.schedule-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 8px;
}

.schedule-col {
    display: flex;
    flex-direction: column;
}

.time-input {
    width: 140px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 14px 16px;
    color: #fff;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.time-input:focus {
    border-color: rgba(29, 255, 114, 0.3);
}

.time-input::-webkit-calendar-picker-indicator {
    filter: invert(0.5);
    cursor: pointer;
}

.weekday-grid {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.weekday-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.weekday-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.weekday-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Campaign Progress & Status */
.progress-bar-container {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 12px;
    border: 1px solid var(--border);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-glow));
    box-shadow: 0 0 15px var(--primary-glow);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.live-logs-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-top: 16px;
    max-height: 150px;
    overflow-y: auto;
    font-family: 'Consolas', monospace;
    font-size: 11px;
}

.log-entry {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-lead {
    color: #fff;
    font-weight: 700;
}

.log-status {
    font-weight: 800;
    text-transform: uppercase;
}

.log-status.sent {
    color: var(--primary);
}

.log-status.failed {
    color: var(--error);
}

.log-time {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Profile Editor - Select Dropdowns Dark Mode */
select.campaign-input option {
    background: #0a0a0a;
    color: #fff;
    padding: 8px 12px;
}

select.campaign-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}


/* Profile Editor - Instance Cards */
.profile-inst-check {
    accent-color: var(--primary);
}

/* Monarch Toast System 🛰️ */
#monarch-toast-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.monarch-toast {
    min-width: 320px;
    max-width: 450px;
    padding: 20px 24px;
    background: rgba(10, 10, 10, 0.9) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    pointer-events: all;
    animation: toast-slide-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

.monarch-toast.success { border-left: 4px solid var(--primary) !important; }
.monarch-toast.error { border-left: 4px solid var(--error) !important; }
.monarch-toast.warning { border-left: 4px solid var(--warning) !important; }

.monarch-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.monarch-toast.success .monarch-toast-icon { color: var(--primary); background: rgba(29, 255, 114, 0.1); }
.monarch-toast.error .monarch-toast-icon { color: var(--error); background: rgba(255, 59, 59, 0.1); }

.monarch-toast-content {
    flex: 1;
}

.monarch-toast-title {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.monarch-toast-msg {
    line-height: 1.5;
    color: #fff;
}

@keyframes toast-slide-in {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-fade-out {
    to { transform: scale(0.9) translateY(-10px); opacity: 0; }
}

.monarch-toast.fade-out {
    animation: toast-fade-out 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}