/* ===========================
   Mach Five Magnet Demo Styles
   =========================== */

:root {
    --m5-brand: #3498DB;
    --m5-brand-dark: #2980B9;
    --m5-sidebar: #2C3E50;
    --m5-sidebar-dark: #1A252F;
    --m5-dark: #181818;
    --m5-text: #333;
    --m5-text-light: #666;
    --m5-text-lighter: #999;
    --m5-border: #E0E0E0;
    --m5-bg: #F5F7FA;
    --m5-orange: #FF6B35;
    --m5-green: #27AE60;
    --m5-red: #E74C3C;
    --m5-yellow: #F39C12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--m5-bg);
    color: var(--m5-text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 48px;
}

/* ===========================
   Demo Banner
   =========================== */

.demo-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--m5-orange) 0%, #E85A2A 100%);
    color: white;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.demo-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 32px;
    max-width: 100%;
}

.demo-banner-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.demo-banner-text .material-symbols-outlined {
    font-size: 20px;
}

.demo-banner-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.demo-banner-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-2px);
}

.demo-banner-link .material-symbols-outlined {
    font-size: 18px;
}

/* ===========================
   Sidebar Navigation
   =========================== */

.demo-sidebar {
    width: 260px;
    background: var(--m5-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 48px;
    bottom: 0;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 24px;
    font-weight: 700;
}

.logo-icon {
    font-size: 32px;
    color: var(--m5-brand);
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 15px;
}

.nav-item .material-symbols-outlined {
    font-size: 22px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(52, 152, 219, 0.15);
    color: white;
    border-left: 3px solid var(--m5-brand);
    padding-left: 17px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 6px;
    font-size: 13px;
    color: var(--m5-orange);
    font-weight: 600;
}

.demo-badge .material-symbols-outlined {
    font-size: 18px;
}

/* ===========================
   Main Content Area
   =========================== */

.demo-main {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===========================
   Top Bar
   =========================== */

.demo-topbar {
    background: white;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--m5-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--m5-dark);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--m5-text);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.notification-btn:hover {
    background: var(--m5-bg);
}

.notification-btn .material-symbols-outlined {
    font-size: 24px;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--m5-orange);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px 6px 6px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.user-menu:hover {
    background: var(--m5-bg);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--m5-brand) 0%, var(--m5-brand-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    font-size: 15px;
    color: var(--m5-text);
}

/* ===========================
   Dashboard Content
   =========================== */

.demo-content {
    padding: 32px;
    flex: 1;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--m5-border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.stat-icon {
    font-size: 20px;
    color: var(--m5-brand);
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--m5-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    font-family: 'Roboto Condensed', sans-serif;
    color: var(--m5-dark);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--m5-text-light);
}

.stat-change .material-symbols-outlined {
    font-size: 16px;
}

.stat-change.positive {
    color: var(--m5-green);
}

.stat-change.positive .material-symbols-outlined {
    color: var(--m5-green);
}

.stat-change.neutral {
    color: var(--m5-text-lighter);
}

.stat-sublabel {
    font-size: 13px;
    color: var(--m5-text-light);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Charts Section */
.charts-section {
    margin-bottom: 32px;
}

.chart-card-wide {
    margin-bottom: 24px;
}

.chart-card-wide .card-body {
    height: 300px;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.chart-card-full {
    grid-column: 1 / -1;
}

.chart-card-full .card-body {
    height: 300px;
}

.charts-grid .dashboard-card .card-body {
    height: 280px;
}

/* Chart Controls */
.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-period-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    color: var(--m5-text-light);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-period-btn:hover {
    background: var(--m5-bg);
    border-color: var(--m5-brand);
    color: var(--m5-brand);
}

.chart-period-btn.active {
    background: var(--m5-brand);
    border-color: var(--m5-brand);
    color: white;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--m5-border);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--m5-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--m5-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .material-symbols-outlined {
    font-size: 22px;
    color: var(--m5-brand);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--m5-orange);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--m5-orange);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.view-all-link {
    font-size: 14px;
    color: var(--m5-brand);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: var(--m5-brand-dark);
}

.card-body {
    padding: 24px;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: var(--m5-bg);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon .material-symbols-outlined {
    font-size: 20px;
}

.activity-icon.new-lead {
    background: rgba(52, 152, 219, 0.1);
    color: var(--m5-brand);
}

.activity-icon.engagement {
    background: rgba(39, 174, 96, 0.1);
    color: var(--m5-green);
}

.activity-icon.conversion {
    background: rgba(255, 107, 53, 0.1);
    color: var(--m5-orange);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--m5-dark);
    margin-bottom: 4px;
}

.activity-meta {
    font-size: 13px;
    color: var(--m5-text-light);
}

/* Activity Feed Animations */
.activity-item.new-item {
    opacity: 0;
    transform: translateY(-20px);
    animation: slideIn 0.3s ease-out forwards;
}

.activity-item.new-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.activity-item.removing {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Live indicator pulse animation */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--m5-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--m5-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

/* Leads Table */
.leads-table {
    display: flex;
    flex-direction: column;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 0.8fr 1fr;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--m5-border);
    transition: background 0.2s ease;
}

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

.table-row.header {
    background: var(--m5-bg);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--m5-text-light);
}

.table-row:not(.header):hover {
    background: var(--m5-bg);
}

.table-cell {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.lead-name {
    font-weight: 500;
    color: var(--m5-dark);
    margin-bottom: 2px;
}

.lead-email {
    font-size: 13px;
    color: var(--m5-text-light);
}

.score-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.score-badge.hot {
    background: rgba(231, 76, 60, 0.1);
    color: var(--m5-red);
}

.score-badge.warm {
    background: rgba(243, 156, 18, 0.1);
    color: var(--m5-yellow);
}

.score-badge.cold {
    background: rgba(52, 152, 219, 0.1);
    color: var(--m5-brand);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.new {
    background: rgba(52, 152, 219, 0.1);
    color: var(--m5-brand);
}

.status-badge.engaged {
    background: rgba(39, 174, 96, 0.1);
    color: var(--m5-green);
}

.status-badge.converted {
    background: rgba(255, 107, 53, 0.1);
    color: var(--m5-orange);
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (max-width: 768px) {
    .demo-sidebar {
        width: 200px;
    }

    .demo-main {
        margin-left: 200px;
    }

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

    .demo-topbar {
        padding: 16px 20px;
    }

    .demo-content {
        padding: 20px;
    }

    .table-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .table-row.header {
        display: none;
    }
}

/* ===========================
   Magnets Page
   =========================== */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 24px;
}

.page-header-text {
    flex: 1;
}

.page-description {
    font-size: 15px;
    color: var(--m5-text-light);
    margin: 0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--m5-brand);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover {
    background: var(--m5-brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-primary .material-symbols-outlined {
    font-size: 20px;
}

.magnets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.magnet-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--m5-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.magnet-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.magnet-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--m5-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.magnet-title-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.magnet-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--m5-dark);
    margin: 0;
}

.magnet-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.magnet-status.active {
    background: rgba(39, 174, 96, 0.1);
    color: var(--m5-green);
}

.magnet-status.inactive {
    background: rgba(153, 153, 153, 0.1);
    color: var(--m5-text-lighter);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.magnet-status.active .status-dot {
    animation: pulse 2s ease-in-out infinite;
}

.magnet-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--m5-text-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--m5-bg);
    color: var(--m5-brand);
}

.icon-btn .material-symbols-outlined {
    font-size: 20px;
}

.magnet-body {
    padding: 24px;
}

.magnet-info-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.magnet-info-row:last-of-type {
    margin-bottom: 24px;
}

.magnet-info-row > .material-symbols-outlined {
    font-size: 20px;
    color: var(--m5-brand);
    margin-top: 2px;
}

.magnet-info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--m5-text-light);
}

.info-value {
    font-size: 14px;
    color: var(--m5-dark);
    font-weight: 500;
}

.magnet-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--m5-border);
}

.magnet-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.magnet-stat .stat-number {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Roboto Condensed', sans-serif;
    color: var(--m5-dark);
    line-height: 1;
    margin-bottom: 6px;
}

.magnet-stat .stat-label {
    font-size: 12px;
    color: var(--m5-text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* Responsive Magnets Grid */
@media (max-width: 1200px) {
    .magnets-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ===========================
   Templates Page
   =========================== */

.template-category {
    margin-bottom: 60px;
}

.category-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--m5-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title .material-symbols-outlined {
    font-size: 28px;
    color: var(--m5-brand);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.template-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--m5-border);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.template-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: var(--m5-brand);
}

.template-card.featured {
    border: 2px solid var(--m5-orange);
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--m5-orange);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.template-preview {
    background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
    padding: 32px 20px;
    border-bottom: 1px solid var(--m5-border);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 20px;
    background: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-content {
    width: 100%;
    max-width: 240px;
}

.preview-bubble {
    background: white;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--m5-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    line-height: 1.4;
}

.preview-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-btn {
    background: var(--m5-brand);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.preview-input {
    background: white;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--m5-text-light);
    border: 1px solid var(--m5-border);
}

.preview-calendar {
    background: white;
    padding: 20px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--m5-text);
    text-align: center;
    border: 1px solid var(--m5-border);
    font-weight: 500;
}

.template-body {
    padding: 24px;
}

.template-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--m5-dark);
    margin-bottom: 8px;
}

.template-description {
    font-size: 14px;
    color: var(--m5-text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

.template-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.template-steps,
.template-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--m5-text-light);
}

.template-steps .material-symbols-outlined,
.template-stat .material-symbols-outlined {
    font-size: 16px;
    color: var(--m5-brand);
}

.template-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tag {
    background: var(--m5-bg);
    color: var(--m5-text);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-template {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: var(--m5-brand);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-template:hover {
    background: var(--m5-brand-dark);
    transform: translateY(-1px);
    color: white;
}

/* Responsive Templates Grid */
@media (max-width: 1200px) {
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }

    .category-title {
        font-size: 20px;
    }
}


/* =============================================
   FLOW BUILDER PAGE
   ============================================= */

.flow-builder-main {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 55px); /* Account for demo banner */
    min-height: 0; /* Override demo-main min-height */
}

.flow-builder-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid var(--m5-border);
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flow-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.flow-name-input {
    font-size: 18px;
    font-weight: 600;
    color: var(--m5-dark);
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.flow-name-input:hover {
    border-color: var(--m5-border);
    background: var(--m5-bg);
}

.flow-name-input:focus {
    outline: none;
    border-color: var(--m5-orange);
    background: white;
}

.flow-meta {
    font-size: 13px;
    color: var(--m5-text-light);
}

.topbar-right {
    display: flex;
    gap: 12px;
}

.btn-icon {
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--m5-bg);
    border-color: var(--m5-orange);
}

.btn-icon .material-symbols-outlined {
    font-size: 20px;
    color: var(--m5-text);
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--m5-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--m5-bg);
    border-color: var(--m5-orange);
}

.btn-secondary .material-symbols-outlined {
    font-size: 18px;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--m5-orange);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #C84E28;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(221, 65, 36, 0.3);
}

.btn-primary .material-symbols-outlined {
    font-size: 18px;
}

/* Flow Builder Container */
.flow-builder-container {
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    flex: 1;
    overflow: hidden;
}

/* Node Palette (Left Sidebar) */
.node-palette {
    background: white;
    border-right: 1px solid var(--m5-border);
    padding: 20px 16px;
    overflow-y: auto;
}

.palette-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--m5-dark);
    margin-bottom: 20px;
}

.palette-section {
    margin-bottom: 24px;
}

.palette-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--m5-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.palette-node {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all 0.2s ease;
}

.palette-node:hover {
    background: var(--m5-bg);
    border-color: var(--m5-orange);
    transform: translateX(4px);
}

.palette-node:active {
    cursor: grabbing;
}

.palette-node .material-symbols-outlined {
    font-size: 20px;
    color: var(--m5-orange);
}

.palette-node span:last-child {
    font-size: 14px;
    color: var(--m5-text);
    font-weight: 500;
}

/* Canvas Container */
.flow-canvas-container {
    background: #F8FAFC;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
    overflow: auto;
}

.canvas-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.zoom-level {
    font-size: 13px;
    font-weight: 600;
    color: var(--m5-text);
    min-width: 45px;
    text-align: center;
}

.canvas-controls .btn-icon {
    width: 32px;
    height: 32px;
}

.canvas-controls .btn-icon .material-symbols-outlined {
    font-size: 18px;
}

/* Flow Canvas */
.flow-canvas {
    position: relative;
    min-width: 1200px;
    min-height: 1000px;
    padding: 40px;
}

/* Flow Nodes */
.flow-node {
    position: absolute;
    width: 200px;
    background: white;
    border: 2px solid var(--m5-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: move;
    transition: all 0.2s ease;
}

.flow-node:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.flow-node.selected {
    border-color: var(--m5-orange);
    box-shadow: 0 4px 16px rgba(221, 65, 36, 0.25);
}

/* Node Headers */
.node-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 10px 10px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.node-header .material-symbols-outlined {
    font-size: 18px;
}

.node-header.trigger {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.node-header.message {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.node-header.question {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.node-header.action {
    background: linear-gradient(135deg, var(--m5-orange) 0%, #C84E28 100%);
}

.node-header.end {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
}

.node-header.success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

/* Node Body */
.node-body {
    padding: 14px;
}

.node-preview {
    font-size: 13px;
    color: var(--m5-text);
    line-height: 1.5;
    margin-bottom: 10px;
}

.node-config {
    font-size: 12px;
    color: var(--m5-text-light);
    padding: 8px 10px;
    background: var(--m5-bg);
    border-radius: 6px;
}

.node-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.node-option {
    font-size: 12px;
    color: var(--m5-text);
    padding: 6px 10px;
    background: var(--m5-bg);
    border: 1px solid var(--m5-border);
    border-radius: 6px;
}

/* Node Connectors */
.node-connector {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid var(--m5-orange);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.node-connector:hover {
    width: 16px;
    height: 16px;
    background: var(--m5-orange);
}

.node-connector.top {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
}

.node-connector.bottom {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
}

.node-connector.left {
    bottom: -6px;
    left: 25%;
    transform: translateX(-50%);
}

.node-connector.center {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
}

.node-connector.right {
    bottom: -6px;
    left: 75%;
    transform: translateX(-50%);
}

/* Connection Lines */
.flow-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.connection-line {
    fill: none;
    stroke: #CBD5E1;
    stroke-width: 2;
    stroke-linecap: round;
}

.flow-node {
    z-index: 1;
}

/* Properties Panel (Right Sidebar) */
.properties-panel {
    background: white;
    border-left: 1px solid var(--m5-border);
    padding: 20px;
    overflow-y: auto;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--m5-dark);
    margin-bottom: 20px;
}

.properties-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 30px;
    text-align: center;
}

.properties-empty .material-symbols-outlined {
    font-size: 64px;
    color: var(--m5-text-light);
    opacity: 0.3;
}

.properties-empty p {
    font-size: 14px;
    color: var(--m5-text-light);
    margin: 0;
    line-height: 1.6;
    max-width: 200px;
}

/* Property Groups */
.property-group {
    margin-bottom: 24px;
}

.property-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--m5-text);
    margin-bottom: 8px;
}

.property-value {
    font-size: 14px;
    color: var(--m5-text-light);
    padding: 10px 12px;
    background: var(--m5-bg);
    border-radius: 6px;
}

.property-input {
    width: 100%;
    font-size: 14px;
    color: var(--m5-text);
    padding: 10px 12px;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
}

.property-input:focus {
    outline: none;
    border-color: var(--m5-orange);
    box-shadow: 0 0 0 3px rgba(221, 65, 36, 0.1);
}

/* Option List */
.option-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.option-item {
    display: flex;
    gap: 8px;
}

.option-item input {
    flex: 1;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.option-item input:focus {
    outline: none;
    border-color: var(--m5-orange);
}

.btn-icon-small {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-small:hover {
    background: #FEE2E2;
    border-color: #EF4444;
}

.btn-icon-small .material-symbols-outlined {
    font-size: 16px;
    color: var(--m5-text-light);
}

.btn-icon-small:hover .material-symbols-outlined {
    color: #EF4444;
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px dashed var(--m5-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--m5-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-text:hover {
    background: var(--m5-bg);
    border-color: var(--m5-orange);
    border-style: solid;
}

.btn-text .material-symbols-outlined {
    font-size: 16px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #CBD5E1;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--m5-orange);
}

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

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .flow-builder-container {
        grid-template-columns: 200px 1fr 240px;
    }

    .node-palette {
        padding: 16px 12px;
    }

    .properties-panel {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .flow-builder-container {
        grid-template-columns: 1fr;
    }

    .node-palette,
    .properties-panel {
        display: none;
    }

    .flow-builder-topbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .topbar-right {
        justify-content: stretch;
    }

    .topbar-right button {
        flex: 1;
    }
}


/* =============================================
   CONVERSATIONS PAGE
   ============================================= */

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

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--m5-text);
}

.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--m5-text);
    background: white;
    min-width: 180px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--m5-orange);
    box-shadow: 0 0 0 3px rgba(221, 65, 36, 0.1);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    background: white;
    min-width: 280px;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--m5-orange);
    box-shadow: 0 0 0 3px rgba(221, 65, 36, 0.1);
}

.search-box .material-symbols-outlined {
    font-size: 20px;
    color: var(--m5-text-light);
}

.search-box input {
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--m5-text);
    flex: 1;
}

.search-box input::placeholder {
    color: var(--m5-text-light);
}

/* Conversations Table */
.conversations-table-container {
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.conversations-table {
    width: 100%;
    border-collapse: collapse;
}

.conversations-table thead {
    background: var(--m5-bg);
    border-bottom: 1px solid var(--m5-border);
}

.conversations-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--m5-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conversations-table tbody tr {
    border-bottom: 1px solid var(--m5-border);
    transition: background 0.2s ease;
}

.conversations-table tbody tr:last-child {
    border-bottom: none;
}

.conversations-table tbody tr:hover {
    background: var(--m5-bg);
}

.conversations-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--m5-text);
}

/* Visitor Info */
.visitor-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.visitor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--m5-orange) 0%, #C84E28 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.visitor-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.visitor-name {
    font-weight: 600;
    color: var(--m5-dark);
}

.visitor-email {
    font-size: 13px;
    color: var(--m5-text-light);
}

.magnet-name-cell {
    font-weight: 500;
    color: var(--m5-text);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge.completed {
    background: #D4EDDA;
    color: #155724;
}

.status-badge.completed .material-symbols-outlined {
    font-size: 16px;
    color: #155724;
}

.status-badge.abandoned {
    background: #F8D7DA;
    color: #721C24;
}

.status-badge.abandoned .material-symbols-outlined {
    font-size: 16px;
    color: #721C24;
}

.status-badge.in-progress {
    background: #FFF3CD;
    color: #856404;
}

.status-badge.in-progress .material-symbols-outlined {
    font-size: 16px;
    color: #856404;
}

/* Progress Info */
.progress-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-bar {
    width: 100px;
    height: 6px;
    background: var(--m5-bg);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27AE60 0%, #229954 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-fill.abandoned {
    background: linear-gradient(90deg, #E74C3C 0%, #C0392B 100%);
}

.progress-text {
    font-size: 12px;
    color: var(--m5-text-light);
}

/* Time Info */
.time-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.time-primary {
    font-weight: 500;
    color: var(--m5-text);
}

.time-secondary {
    font-size: 12px;
    color: var(--m5-text-light);
}

/* View Button */
.btn-view-conversation {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--m5-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-conversation:hover {
    background: var(--m5-bg);
    border-color: var(--m5-orange);
    color: var(--m5-orange);
}

.btn-view-conversation .material-symbols-outlined {
    font-size: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--m5-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--m5-bg);
    border-color: var(--m5-orange);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn .material-symbols-outlined {
    font-size: 18px;
}

.pagination-info {
    font-size: 14px;
    color: var(--m5-text-light);
}

/* Responsive */
@media (max-width: 1200px) {
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select,
    .search-box {
        width: 100%;
        min-width: 0;
    }

    .conversations-table-container {
        overflow-x: auto;
    }

    .conversations-table {
        min-width: 1000px;
    }
}


/* =============================================
   SETTINGS PAGE
   ============================================= */

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 12px;
    overflow: hidden;
}

.settings-section.danger {
    border-color: #E74C3C;
}

.settings-section-header {
    padding: 24px;
    border-bottom: 1px solid var(--m5-border);
}

.settings-section.danger .settings-section-header {
    background: #FEF5F5;
    border-bottom-color: #E74C3C;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.settings-section-title .material-symbols-outlined {
    font-size: 28px;
    color: var(--m5-orange);
}

.settings-section.danger .settings-section-title .material-symbols-outlined {
    color: #E74C3C;
}

.settings-section-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--m5-dark);
}

.settings-section-description {
    margin: 0;
    font-size: 14px;
    color: var(--m5-text-light);
}

.settings-section-body {
    padding: 24px;
}

/* Settings Fields */
.settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.settings-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--m5-text);
}

.settings-input,
.settings-select {
    padding: 12px 14px;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--m5-text);
    background: white;
    transition: all 0.2s ease;
}

.settings-input:focus,
.settings-select:focus {
    outline: none;
    border-color: var(--m5-orange);
    box-shadow: 0 0 0 3px rgba(221, 65, 36, 0.1);
}

.btn-save {
    padding: 12px 24px;
    background: var(--m5-orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-save:hover {
    background: #C84E28;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(221, 65, 36, 0.3);
}

/* Integrations */
.integration-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--m5-border);
    border-radius: 8px;
    margin-bottom: 12px;
}

.integration-item:last-child {
    margin-bottom: 0;
}

.integration-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.integration-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
}

.integration-icon.salesforce {
    background: linear-gradient(135deg, #00A1E0 0%, #0070D2 100%);
}

.integration-icon.hubspot {
    background: linear-gradient(135deg, #FF7A59 0%, #FF5C35 100%);
}

.integration-icon.calendly {
    background: linear-gradient(135deg, #0069FF 0%, #0052CC 100%);
}

.integration-icon.mailchimp {
    background: linear-gradient(135deg, #FFE01B 0%, #FFC800 100%);
    color: #2C3E50;
}

.integration-icon.zapier {
    background: linear-gradient(135deg, #FF4F00 0%, #E03E00 100%);
}

.integration-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.integration-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--m5-dark);
}

.integration-status {
    font-size: 13px;
    color: var(--m5-text-light);
}

.integration-status.connected {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #27AE60;
    font-weight: 500;
}

.integration-status .status-dot {
    width: 6px;
    height: 6px;
    background: #27AE60;
    border-radius: 50%;
}

.btn-integration {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-integration.connect {
    background: var(--m5-orange);
    color: white;
    border: none;
}

.btn-integration.connect:hover {
    background: #C84E28;
}

.btn-integration.disconnect {
    background: white;
    color: var(--m5-text);
    border: 1px solid var(--m5-border);
}

.btn-integration.disconnect:hover {
    background: var(--m5-bg);
    border-color: #E74C3C;
    color: #E74C3C;
}

/* Notification Settings */
.notification-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--m5-border);
}

.notification-setting:last-child {
    border-bottom: none;
}

.notification-info {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--m5-dark);
    margin-bottom: 4px;
}

.notification-description {
    font-size: 13px;
    color: var(--m5-text-light);
}

/* Billing */
.plan-info {
    background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
    padding: 24px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 24px;
}

.plan-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--m5-orange);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.plan-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--m5-dark);
    margin-bottom: 8px;
}

.plan-period {
    font-size: 18px;
    font-weight: 400;
    color: var(--m5-text-light);
}

.plan-renewal {
    font-size: 14px;
    color: var(--m5-text-light);
}

.billing-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-billing-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--m5-orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-billing-action:hover {
    background: #C84E28;
    transform: translateY(-1px);
}

.btn-billing-action.secondary {
    background: white;
    color: var(--m5-text);
    border: 1px solid var(--m5-border);
}

.btn-billing-action.secondary:hover {
    background: var(--m5-bg);
    border-color: var(--m5-orange);
}

.btn-billing-action .material-symbols-outlined {
    font-size: 18px;
}

/* Danger Zone */
.danger-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #FEF5F5;
    border: 1px solid #FADBD8;
    border-radius: 8px;
    margin-bottom: 16px;
}

.danger-action:last-child {
    margin-bottom: 0;
}

.danger-action-info {
    flex: 1;
}

.danger-action-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--m5-dark);
    margin-bottom: 4px;
}

.danger-action-description {
    font-size: 13px;
    color: var(--m5-text-light);
}

.btn-danger-action {
    padding: 10px 20px;
    background: white;
    color: var(--m5-text);
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-action:hover {
    background: var(--m5-bg);
}

.btn-danger-action.destructive {
    border-color: #E74C3C;
    color: #E74C3C;
}

.btn-danger-action.destructive:hover {
    background: #E74C3C;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .integration-item,
    .notification-setting,
    .danger-action {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .btn-integration,
    .btn-danger-action {
        width: 100%;
    }

    .billing-actions {
        gap: 8px;
    }
}


/* =============================================
   DISPLAY FORMAT PREVIEWS
   ============================================= */

.format-previews-section {
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 40px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 600;
    color: var(--m5-dark);
    margin: 0 0 8px 0;
}

.section-title .material-symbols-outlined {
    font-size: 28px;
    color: var(--m5-orange);
}

.section-description {
    margin: 0 0 32px 0;
    font-size: 15px;
    color: var(--m5-text-light);
}

.format-previews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.format-preview-card {
    border: 1px solid var(--m5-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.format-preview-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.format-preview-header {
    padding: 20px;
    background: var(--m5-bg);
    border-bottom: 1px solid var(--m5-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.format-icon {
    font-size: 32px;
}

.format-name {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--m5-dark);
}

.format-description {
    margin: 0;
    font-size: 13px;
    color: var(--m5-text-light);
}

.format-preview-demo {
    padding: 20px;
    background: #F8FAFC;
}

.preview-browser {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.browser-bar {
    background: #E5E7EB;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9CA3AF;
}

.browser-dots span:nth-child(1) {
    background: #EF4444;
}

.browser-dots span:nth-child(2) {
    background: #F59E0B;
}

.browser-dots span:nth-child(3) {
    background: #10B981;
}

.browser-url {
    flex: 1;
    background: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--m5-text-light);
}

.browser-content {
    height: 180px;
    position: relative;
    background: linear-gradient(135deg, #F8FAFC 0%, #E5E7EB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat Bubble Format */
.chat-bubble-icon {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--m5-orange) 0%, #C84E28 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(221, 65, 36, 0.3);
    cursor: pointer;
}

.chat-bubble-icon .material-symbols-outlined {
    font-size: 28px;
    color: white;
}

.chat-bubble-window {
    position: absolute;
    bottom: 80px;
    right: 16px;
    width: 240px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, var(--m5-orange) 0%, #C84E28 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
}

.chat-close {
    font-size: 24px;
    cursor: pointer;
}

.chat-message {
    padding: 16px;
    font-size: 13px;
    color: var(--m5-text);
}

/* Embedded Format */
.embedded-widget {
    width: 280px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--m5-dark);
    margin-bottom: 12px;
}

.widget-bubble {
    background: var(--m5-bg);
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--m5-text);
    margin-bottom: 12px;
}

.widget-input {
    padding: 10px 12px;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--m5-text-light);
    background: white;
}

/* Pop-up Format */
.browser-content.dimmed {
    background: rgba(0, 0, 0, 0.5);
}

.popup-modal {
    width: 280px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    color: var(--m5-text-light);
    cursor: pointer;
}

.modal-content {
    text-align: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--m5-dark);
    margin-bottom: 8px;
}

.modal-message {
    font-size: 13px;
    color: var(--m5-text);
    margin-bottom: 16px;
}

.modal-button {
    padding: 10px 20px;
    background: var(--m5-orange);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

/* Slide-out Format */
.slideout-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: white;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
    padding: 24px;
}

.panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    color: var(--m5-text-light);
    cursor: pointer;
}

.panel-content {
    padding-top: 20px;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--m5-dark);
    margin-bottom: 16px;
}

.panel-input {
    padding: 10px 12px;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--m5-text-light);
    background: white;
    margin-bottom: 12px;
}

.panel-button {
    padding: 10px 20px;
    background: var(--m5-orange);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.format-use-case {
    padding: 16px 20px;
    background: var(--m5-bg);
    font-size: 13px;
    color: var(--m5-text);
    border-top: 1px solid var(--m5-border);
}

/* Responsive */
@media (max-width: 1200px) {
    .format-previews-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .format-previews-section {
        padding: 20px;
    }

    .chat-bubble-window,
    .embedded-widget,
    .popup-modal,
    .slideout-panel {
        transform: scale(0.85);
    }
}

/* Updated Embedded Chat Styling */
.embedded-widget {
    width: 280px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.embedded-chat-msg {
    background: #F3F4F6;
    padding: 12px 14px;
    border-radius: 12px 12px 12px 4px;
    font-size: 13px;
    color: var(--m5-dark);
    margin-bottom: 12px;
}

.embedded-chat-input {
    margin-bottom: 12px;
}

.embedded-chat-input input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.embedded-chat-buttons {
    display: flex;
    gap: 8px;
}

.embedded-chat-buttons .chat-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--m5-orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Updated Pop-up Chat Styling */
.popup-chat-msg {
    font-size: 16px;
    font-weight: 600;
    color: var(--m5-dark);
    margin-bottom: 8px;
}

.popup-chat-question {
    font-size: 14px;
    color: var(--m5-text);
    margin-bottom: 16px;
}

.popup-chat-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popup-btn {
    padding: 12px 20px;
    background: var(--m5-orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.popup-btn.secondary {
    background: white;
    color: var(--m5-text);
    border: 1px solid var(--m5-border);
}

/* Updated Slide-out Panel Chat Styling */
.panel-chat-msg {
    font-size: 16px;
    font-weight: 600;
    color: var(--m5-dark);
    margin-bottom: 8px;
}

.panel-chat-question {
    font-size: 14px;
    color: var(--m5-text);
    margin-bottom: 16px;
}

.panel-chat-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.panel-btn {
    padding: 12px 20px;
    background: var(--m5-orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.panel-btn.secondary {
    background: white;
    color: var(--m5-text);
    border: 1px solid var(--m5-border);
}

/* =============================================

/* =============================================
   PREMIUM CONVERSATIONAL CHAT INTERFACES
   ============================================= */

/* Chat Messages Container */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    max-height: 140px;
    overflow-y: auto;
    padding: 4px;
}

.chat-messages.compact {
    max-height: 80px;
    gap: 8px;
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 2px;
}

/* Individual Chat Messages */
.chat-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: messageSlideIn 0.3s ease-out;
}

.chat-msg.user {
    align-items: flex-end;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.msg-bubble:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.chat-msg.bot .msg-bubble {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    color: #1E293B;
    border-bottom-left-radius: 4px;
    border: 1px solid #E2E8F0;
}

.chat-msg.user .msg-bubble {
    background: linear-gradient(135deg, #FF6B35 0%, #DD4124 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(221, 65, 36, 0.25);
}

/* Chat Input Area */
.chat-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: #F8FAFC;
    border-radius: 24px;
    border: 2px solid #E2E8F0;
    transition: all 0.3s ease;
}

.chat-input-area:focus-within {
    border-color: #FF6B35;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.chat-input-area input {
    flex: 1;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 13px;
    outline: none;
    color: #1E293B;
}

.chat-input-area input::placeholder {
    color: #94A3B8;
}

.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35 0%, #DD4124 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(221, 65, 36, 0.3);
    transition: all 0.2s ease;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(221, 65, 36, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn .material-symbols-outlined {
    font-size: 18px;
    color: white;
}

/* Choice Buttons */
.choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.choice-btn:hover {
    border-color: #FF6B35;
    color: #FF6B35;
    background: linear-gradient(135deg, #FFF5F2 0%, #FFEDE8 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.choice-btn:active {
    transform: translateX(2px) scale(0.98);
}

.choice-btn.secondary {
    border-color: #E2E8F0;
    color: #64748B;
    background: #F8FAFC;
}

.choice-btn.secondary:hover {
    border-color: #CBD5E1;
    background: #F1F5F9;
    color: #475569;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.choice-icon {
    font-size: 20px;
    line-height: 1;
}

/* Embedded Widget */
.embedded-widget {
    width: 320px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    border: 1px solid #E2E8F0;
}

/* Pop-up Modal */
.popup-modal {
    width: 340px;
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    color: #94A3B8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #F1F5F9;
    color: #475569;
}

/* Slide-out Panel */
.slideout-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 340px;
    background: white;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    padding: 24px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #E2E8F0;
}

.panel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    color: #94A3B8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.panel-close:hover {
    background: #F1F5F9;
    color: #475569;
}

.panel-content {
    padding-top: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .embedded-widget,
    .popup-modal,
    .slideout-panel {
        width: 280px;
    }

    .msg-bubble {
        font-size: 12px;
        padding: 8px 12px;
    }

    .choice-btn {
        font-size: 12px;
        padding: 10px 14px;
    }
}


/* =============================================
   LIVE PREVIEW MODAL
   ============================================= */

.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
}

.preview-modal.active {
    display: block;
}

.preview-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.preview-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E2E8F0;
}

.preview-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1E293B;
}

.preview-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #F1F5F9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.preview-close:hover {
    background: #E2E8F0;
}

.preview-close .material-symbols-outlined {
    font-size: 20px;
    color: #64748B;
}

.preview-format-selector {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}

.format-tab {
    flex: 1;
    padding: 12px 16px;
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s ease;
}

.format-tab:hover {
    border-color: #CBD5E1;
    background: #F8FAFC;
}

.format-tab.active {
    border-color: #FF6B35;
    background: linear-gradient(135deg, #FFF5F2 0%, #FFEDE8 100%);
    color: #FF6B35;
}

.format-tab span {
    margin-right: 6px;
}

.preview-stage {
    flex: 1;
    padding: 32px;
    overflow: auto;
}

.preview-browser-mock {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.mock-browser-bar {
    background: #E5E7EB;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mock-dots {
    display: flex;
    gap: 6px;
}

.mock-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9CA3AF;
}

.mock-dots span:nth-child(1) { background: #EF4444; }
.mock-dots span:nth-child(2) { background: #F59E0B; }
.mock-dots span:nth-child(3) { background: #10B981; }

.mock-url {
    flex: 1;
    background: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    color: #64748B;
}

.mock-browser-content {
    height: 400px;
    background: linear-gradient(135deg, #F8FAFC 0%, #E5E7EB 100%);
    position: relative;
}

.mock-browser-content.dimmed {
    background: rgba(0, 0, 0, 0.5);
}

/* Preview Chat Styles */
.preview-chat-widget {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 340px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #E2E8F0;
}

.preview-chat-icon {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35 0%, #DD4124 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(221, 65, 36, 0.3);
    cursor: pointer;
}

.preview-chat-icon .material-symbols-outlined {
    font-size: 32px;
    color: white;
}

.preview-embedded-widget {
    width: 340px;
    margin: 30px auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid #E2E8F0;
}

.preview-popup-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.preview-popup-close,
.preview-panel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F1F5F9;
    border: none;
    font-size: 24px;
    color: #64748B;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-slideout-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 360px;
    background: white;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    border-left: 1px solid #E2E8F0;
}

.preview-chat-messages {
    padding: 20px;
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preview-msg {
    display: flex;
    flex-direction: column;
}

.preview-msg.user {
    align-items: flex-end;
}

.preview-msg-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    animation: messageFadeIn 0.3s ease;
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-msg.bot .preview-msg-bubble {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    color: #1E293B;
    border-bottom-left-radius: 4px;
    border: 1px solid #E2E8F0;
}

.preview-msg.user .preview-msg-bubble {
    background: linear-gradient(135deg, #FF6B35 0%, #DD4124 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.preview-chat-input {
    padding: 16px 20px;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.preview-chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #E2E8F0;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
}

.preview-chat-input input:focus {
    border-color: #FF6B35;
}

.preview-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35 0%, #DD4124 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.preview-send-btn .material-symbols-outlined {
    font-size: 18px;
    color: white;
}

.preview-controls {
    display: flex;
    justify-content: space-between;
    padding: 20px 24px;
    border-top: 1px solid #E2E8F0;
    background: #F8FAFC;
}

.btn-preview-restart,
.btn-preview-next {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-preview-restart {
    background: white;
    border: 2px solid #E2E8F0;
    color: #64748B;
}

.btn-preview-restart:hover {
    border-color: #CBD5E1;
    background: #F1F5F9;
}

.btn-preview-next {
    background: linear-gradient(135deg, #FF6B35 0%, #DD4124 100%);
    border: none;
    color: white;
}

.btn-preview-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(221, 65, 36, 0.3);
}

.btn-preview-restart .material-symbols-outlined,
.btn-preview-next .material-symbols-outlined {
    font-size: 18px;
}

@media (max-width: 768px) {
    .preview-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .preview-format-selector {
        flex-wrap: wrap;
    }

    .format-tab {
        flex: 1 1 45%;
    }

    .preview-stage {
        padding: 16px;
    }

    .mock-browser-content {
        height: 350px;
    }

    .preview-chat-widget,
    .preview-embedded-widget,
    .preview-popup-modal,
    .preview-slideout-panel {
        width: 280px;
    }
}

/* ===========================
   INSTALL CODE MODAL
   =========================== */

.install-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.install-modal.active {
    display: flex;
}

.install-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.install-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.install-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid var(--m5-border);
}

.install-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--m5-dark);
    margin: 0;
}

.install-modal-title .material-symbols-outlined {
    font-size: 28px;
    color: var(--m5-brand);
}

.install-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--m5-text-light);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.install-modal-close:hover {
    background: var(--m5-bg);
    color: var(--m5-dark);
}

.install-modal-close .material-symbols-outlined {
    font-size: 24px;
}

.install-modal-body {
    padding: 24px 32px 32px;
    overflow-y: auto;
    flex: 1;
}

.install-intro {
    margin: 0 0 24px 0;
    color: var(--m5-text);
    line-height: 1.6;
}

.install-intro strong {
    color: var(--m5-brand);
    font-weight: 600;
}

/* Install Tabs */
.install-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--m5-border);
}

.install-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--m5-text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.install-tab:hover {
    color: var(--m5-brand);
    background: rgba(52, 152, 219, 0.05);
}

.install-tab.active {
    color: var(--m5-brand);
    border-bottom-color: var(--m5-brand);
}

.install-tab .material-symbols-outlined {
    font-size: 20px;
}

/* Tab Content */
.install-tab-content {
    position: relative;
}

.install-tab-pane {
    display: none;
}

.install-tab-pane.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.install-instructions {
    margin: 0 0 16px 0;
    color: var(--m5-text);
    line-height: 1.7;
}

.install-instructions code {
    background: var(--m5-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--m5-brand);
}

.install-instructions strong {
    font-weight: 600;
    color: var(--m5-dark);
}

/* Code Block */
.code-block-container {
    position: relative;
    margin-bottom: 20px;
}

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.code-block code {
    display: block;
    white-space: pre;
}

.copy-code-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(52, 152, 219, 0.9);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.copy-code-btn:hover {
    background: var(--m5-brand);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.copy-code-btn.copied {
    background: var(--m5-green);
}

.copy-code-btn .material-symbols-outlined {
    font-size: 18px;
}

/* Install Info */
.install-info {
    margin-top: 32px;
    padding: 20px;
    background: var(--m5-bg);
    border-radius: 8px;
    border-left: 4px solid var(--m5-brand);
}

.install-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.install-info-row:last-child {
    margin-bottom: 0;
}

.install-info-row .material-symbols-outlined {
    font-size: 20px;
    color: var(--m5-brand);
    margin-top: 2px;
}

.install-info-row code {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--m5-brand);
    border: 1px solid var(--m5-border);
}

.info-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--m5-orange);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .install-modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .install-modal-header,
    .install-modal-body {
        padding: 20px;
    }

    .install-tabs {
        flex-wrap: wrap;
    }

    .install-tab {
        flex: 1 1 45%;
        padding: 10px 12px;
        font-size: 13px;
    }

    .code-block {
        font-size: 12px;
        padding: 16px;
    }

    .copy-code-btn {
        position: static;
        margin-top: 12px;
        width: 100%;
        justify-content: center;
    }
}

/* ===========================
   A/B TESTING SECTION
   =========================== */

.section-header {
    margin: 48px 0 24px 0;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--m5-dark);
}

/* A/B Test Card */
.ab-test-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--m5-border);
    padding: 24px;
    margin-bottom: 24px;
}

.active-test {
    border-left: 4px solid var(--m5-brand);
}

.ab-test-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.ab-test-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ab-test-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--m5-dark);
    margin: 0;
}

.ab-test-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ab-test-status.running {
    background: rgba(52, 152, 219, 0.1);
    color: var(--m5-brand);
}

.ab-test-status.completed {
    background: rgba(39, 174, 96, 0.1);
    color: var(--m5-green);
}

.ab-test-status.completed .material-symbols-outlined {
    font-size: 16px;
}

.ab-test-actions {
    display: flex;
    gap: 12px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-secondary {
    background: transparent;
    color: var(--m5-brand);
    border: 1px solid var(--m5-brand);
}

.btn-secondary:hover {
    background: var(--m5-brand);
    color: white;
}

.btn-text {
    background: none;
    border: none;
    color: var(--m5-brand);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-text:hover {
    color: var(--m5-brand-dark);
}

.winner-btn {
    background: var(--m5-green);
    border-color: var(--m5-green);
}

.winner-btn:hover {
    background: #229954;
}

/* Test Info */
.ab-test-info {
    margin-bottom: 24px;
}

.ab-test-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--m5-text-light);
    font-size: 14px;
}

.meta-item .material-symbols-outlined {
    font-size: 18px;
    color: var(--m5-brand);
}

/* Variants Comparison */
.variants-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.variant-card {
    background: var(--m5-bg);
    border: 2px solid var(--m5-border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.variant-card.winner {
    border-color: var(--m5-green);
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.05) 0%, rgba(39, 174, 96, 0.02) 100%);
}

.variant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.variant-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--m5-dark);
    margin: 0;
}

.variant-label {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variant-label.control {
    background: rgba(102, 102, 102, 0.1);
    color: var(--m5-text-light);
}

.variant-label.winning {
    background: var(--m5-green);
    color: white;
}

.variant-description {
    color: var(--m5-text-light);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.variant-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-row.highlight {
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin: 8px 0;
}

.metric-label {
    font-size: 13px;
    color: var(--m5-text-light);
    font-weight: 500;
}

.metric-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--m5-dark);
}

.metric-value.large {
    font-size: 24px;
    color: var(--m5-brand);
}

.variant-card.winner .metric-value.large {
    color: var(--m5-green);
}

.improvement {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--m5-green);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.winner-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--m5-green);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.winner-badge .material-symbols-outlined {
    font-size: 18px;
}

/* VS Divider */
.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-circle {
    width: 48px;
    height: 48px;
    background: white;
    border: 3px solid var(--m5-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--m5-text-light);
}

/* Statistical Significance */
.statistical-significance {
    padding: 20px;
    background: white;
    border: 1px solid var(--m5-border);
    border-radius: 8px;
}

.significance-bar {
    height: 8px;
    background: var(--m5-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.significance-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--m5-brand) 0%, var(--m5-green) 100%);
    transition: width 1s ease;
}

.significance-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--m5-text);
}

.significance-text .material-symbols-outlined {
    font-size: 20px;
    color: var(--m5-green);
}

.significance-text strong {
    color: var(--m5-dark);
    font-weight: 600;
}

/* Completed Tests */
.completed-tests {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.completed-test {
    padding: 20px;
}

.completed-test .ab-test-name {
    font-size: 16px;
}

.completed-test-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-size: 12px;
    color: var(--m5-text-light);
    font-weight: 500;
}

.summary-value {
    font-size: 16px;
    color: var(--m5-dark);
    font-weight: 600;
}

.summary-value.positive {
    color: var(--m5-green);
}

/* Responsive */
@media (max-width: 1024px) {
    .variants-comparison {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .vs-divider {
        display: none;
    }

    .winner-badge {
        top: 12px;
        right: 12px;
    }

    .completed-test-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ab-test-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .ab-test-actions {
        width: 100%;
    }

    .ab-test-actions button {
        flex: 1;
    }

    .ab-test-meta {
        flex-direction: column;
        gap: 12px;
    }

    .completed-test-summary {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   TEAM COLLABORATION
   =========================== */

.team-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: flex-end;
}

.invite-member-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Team Members */
.team-members {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.team-member {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: var(--m5-bg);
    border-radius: 12px;
    border: 1px solid var(--m5-border);
    transition: all 0.2s ease;
}

.team-member:hover {
    border-color: var(--m5-brand);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--m5-dark);
}

.member-you {
    font-size: 13px;
    font-weight: 500;
    color: var(--m5-text-light);
}

.member-email {
    font-size: 14px;
    color: var(--m5-text-light);
}

.member-role {
    display: flex;
    align-items: center;
}

.role-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.owner {
    background: linear-gradient(135deg, var(--m5-orange), #E85A2A);
    color: white;
}

.role-select {
    padding: 8px 12px;
    border: 1px solid var(--m5-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--m5-dark);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.role-select:hover {
    border-color: var(--m5-brand);
}

.role-select:focus {
    outline: none;
    border-color: var(--m5-brand);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.member-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-joined {
    font-size: 13px;
    color: var(--m5-text-light);
}

.icon-btn-small {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--m5-text-light);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-btn-small:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--m5-red);
}

.icon-btn-small .material-symbols-outlined {
    font-size: 20px;
}

/* Role Permissions */
.role-permissions {
    padding: 20px;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--m5-brand);
    margin-bottom: 32px;
}

.role-permissions-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--m5-dark);
    margin-bottom: 12px;
}

.role-permissions-title .material-symbols-outlined {
    font-size: 20px;
    color: var(--m5-brand);
}

.role-permissions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.role-permission-item {
    font-size: 13px;
    color: var(--m5-text);
    line-height: 1.6;
}

.role-permission-item strong {
    color: var(--m5-dark);
    font-weight: 600;
}

/* Team Activity Log */
.team-activity-section {
    margin-top: 32px;
}

.team-activity-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--m5-dark);
    margin: 0 0 20px 0;
}

.team-activity-log {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-log-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--m5-bg);
    border-radius: 8px;
    border: 1px solid var(--m5-border);
    transition: all 0.2s ease;
}

.activity-log-item:hover {
    border-color: var(--m5-brand);
    box-shadow: 0 1px 4px rgba(52, 152, 219, 0.1);
}

.activity-log-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.activity-log-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-log-text {
    font-size: 14px;
    color: var(--m5-text);
    line-height: 1.5;
}

.activity-log-text strong {
    color: var(--m5-dark);
    font-weight: 600;
}

.activity-highlight {
    color: var(--m5-brand);
    font-weight: 600;
}

.activity-log-time {
    font-size: 12px;
    color: var(--m5-text-lighter);
}

/* Responsive */
@media (max-width: 1024px) {
    .role-permissions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .team-member {
        grid-template-columns: auto 1fr;
        gap: 12px;
    }

    .member-role {
        grid-column: 1 / -1;
        margin-top: 8px;
    }

    .member-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
        margin-top: 8px;
    }

    .role-select {
        width: 100%;
    }
}
