:root {
    --mkt-primary: #6366f1;
    --mkt-secondary: #8b5cf6;
    --mkt-accent: #fbbf24;
    --mkt-bg-dark: #0f172a;
    --mkt-card-bg: rgba(30, 41, 59, 0.7);
    --mkt-sidebar-bg: #1e293b;
    --mkt-text-dim: #94a3b8;
    --mkt-glass-border: rgba(255, 255, 255, 0.08);
}

.marketing-dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--mkt-bg-dark);
    font-family: 'Outfit', sans-serif;
    color: white;
}

/* Sidebar */
.mkt-sidebar {
    width: 280px;
    background: var(--mkt-sidebar-bg);
    border-right: 1px solid var(--mkt-glass-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.mkt-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
    padding-left: 0.5rem;
}

.mkt-logo img {
    height: 40px;
}

.mkt-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.mkt-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--mkt-text-dim);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mkt-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.mkt-nav-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.mkt-nav-item i {
    font-size: 1.2rem;
}

/* Main Content */
.mkt-content {
    flex-grow: 1;
    padding: 2rem 3rem;
    max-width: 1600px;
}

/* Sections */
.mkt-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.mkt-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats Cards */
.mkt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.mkt-stat-card {
    background: var(--mkt-card-bg);
    border: 1px solid var(--mkt-glass-border);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.mkt-stat-card .label {
    color: var(--mkt-text-dim);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}

.mkt-stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    display: block;
}

.mkt-stat-card .trend {
    font-size: 0.8rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.up {
    color: #10b981;
}

/* Grid for Editor + Preview */
.mkt-editor-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2.5rem;
}

/* Editor Cards */
.mkt-card {
    background: var(--mkt-card-bg);
    border: 1px solid var(--mkt-glass-border);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.mkt-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Forms Modern */
.mkt-form-group {
    margin-bottom: 1.5rem;
}

.mkt-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--mkt-text-dim);
    font-size: 0.9rem;
    font-weight: 500;
}

.mkt-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--mkt-glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    transition: all 0.3s ease;
}

.mkt-input:focus {
    outline: none;
    border-color: var(--mkt-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Format Switcher Modern */
.mkt-format-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 2rem;
}

.mkt-format-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--mkt-glass-border);
    border-radius: 16px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mkt-format-btn i {
    font-size: 1.5rem;
}

.mkt-format-btn span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.mkt-format-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
}

.mkt-format-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--mkt-primary);
    color: var(--mkt-primary);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

/* Preview Sticky */
.mkt-preview-container {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

#mkt-preview-wrapper {
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--mkt-glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

/* Responsive */
@media (max-width: 1200px) {
    .mkt-editor-layout {
        grid-template-columns: 1fr;
    }

    .mkt-preview-container {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .mkt-sidebar {
        display: none;
        /* Mobile will use a different menu */
    }

    .mkt-content {
        padding: 1.5rem;
    }

    .mkt-format-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mkt-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Subscribers Management */
.mkt-subscriber-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid var(--mkt-glass-border);
}

.mkt-export-btn {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid var(--mkt-glass-border);
    background: var(--mkt-sidebar-bg);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mkt-export-btn:hover {
    background: var(--mkt-primary);
    border-color: var(--mkt-primary);
    transform: translateY(-2px);
}

.mkt-export-btn i {
    font-size: 1rem;
}

.sub-table-container {
    overflow-x: auto;
}

.sub-table {
    width: 100%;
    border-collapse: collapse;
}

.sub-table th {
    text-align: left;
    color: var(--mkt-text-dim);
    font-size: 0.8rem;
    padding: 12px;
    border-bottom: 1px solid var(--mkt-glass-border);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sub-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

.sub-status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.sub-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* Mobile Subscriber Cards */
@media (max-width: 768px) {
    .sub-table thead {
        display: none;
    }

    .sub-table tr {
        display: block;
        background: rgba(255, 255, 255, 0.02);
        margin-bottom: 1rem;
        border-radius: 12px;
        padding: 10px;
        border: 1px solid var(--mkt-glass-border);
    }

    .sub-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 5px;
        border: none;
    }

    .sub-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--mkt-text-dim);
        font-size: 0.8rem;
    }

    .mkt-export-btn {
        padding: 12px;
        font-size: 0.8rem;
    }
}