/* Email Admin Panel Styles */

.email-admin-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: all 0.3s ease;
    max-height: 80vh;
    overflow: hidden;
}

.email-admin-panel.collapsed {
    height: 60px;
}

.admin-panel-header {
    background: linear-gradient(135deg, #c2185b, #e91e63);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.admin-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-panel-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.email-admin-panel.collapsed .toggle-panel-btn {
    transform: rotate(180deg);
}

.admin-panel-content {
    padding: 20px;
    max-height: calc(80vh - 60px);
    overflow-y: auto;
}

.email-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 5px;
}

.tab-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: white;
    color: #c2185b;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

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

.campaign-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.admin-btn.primary {
    background: #c2185b;
    color: white;
}

.admin-btn.primary:hover {
    background: #a91650;
    transform: translateY(-2px);
}

.admin-btn.secondary {
    background: #6c757d;
    color: white;
}

.admin-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.admin-btn.info {
    background: #17a2b8;
    color: white;
}

.admin-btn.info:hover {
    background: #138496;
    transform: translateY(-2px);
}

.quick-campaigns h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1rem;
}

.campaign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.campaign-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.campaign-card:hover {
    background: #e9ecef;
    border-color: #c2185b;
    transform: translateY(-2px);
}

.campaign-card i {
    font-size: 1.5rem;
    color: #c2185b;
    margin-bottom: 8px;
}

.campaign-card h5 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: #333;
}

.campaign-card p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

.template-library h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1rem;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.template-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.template-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.template-preview {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.template-preview i {
    font-size: 1.5rem;
    color: #c2185b;
}

.template-card h5 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #333;
}

.template-actions {
    display: flex;
    gap: 5px;
}

.btn-sm {
    padding: 5px 10px;
    border: 1px solid #c2185b;
    background: transparent;
    color: #c2185b;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    flex: 1;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background: #c2185b;
    color: white;
}

.email-analytics h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1rem;
}

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

.metric-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.metric-change {
    font-size: 0.8rem;
    font-weight: 600;
}

.metric-change.positive {
    color: #28a745;
}

.metric-change.negative {
    color: #dc3545;
}

.metric-change.neutral {
    color: #6c757d;
}

.email-settings h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #c2185b;
}

.admin-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
}

.admin-notification.show {
    transform: translateX(0);
}

.admin-notification.success {
    border-left: 4px solid #28a745;
    color: #28a745;
}

.admin-notification.error {
    border-left: 4px solid #dc3545;
    color: #dc3545;
}

.admin-notification.info {
    border-left: 4px solid #17a2b8;
    color: #17a2b8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .email-admin-panel {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
    
    .campaign-actions {
        flex-direction: column;
    }
    
    .admin-btn {
        min-width: auto;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .campaign-grid {
        grid-template-columns: 1fr;
    }
    
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .email-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
}