/**
 * Admin CSS for WP Blog Mailer - Enhanced Free Version
 * File: assets/css/admin.css
 */

/* ===========================================
   FIX: Constrain dashboard width to prevent "spreading"
   =========================================== */
.cnbm-dashboard {
    max-width: 1400px;
}

/* ===========================================
   DASHBOARD LAYOUT
   =========================================== */

.cnbm-dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-top: 20px;
    align-items: start;
}

@media (max-width: 1200px) {
    .cnbm-dashboard-grid {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 1400px) {
    .cnbm-dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* ===========================================
   PANEL COMPONENTS
   =========================================== */

.cnbm-main-column,
.cnbm-sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cnbm-panel-section {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.cnbm-panel-header {
    padding: 12px 15px;
    border-bottom: 1px solid #c3c4c7;
    background: #f6f7f7;
}

.cnbm-panel-header h2,
.cnbm-panel-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cnbm-panel-header .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #2271b1;
    flex-shrink: 0;
}

.cnbm-panel-content {
    padding: 15px;
}

/* ===========================================
   SERVICE STATUS BANNER
   =========================================== */

.cnbm-service-status {
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    border-left: 4px solid;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.cnbm-service-status.status-active {
    border-left-color: #00a32a;
    background-color: #edfaef;
}

.cnbm-service-status.status-inactive {
    border-left-color: #d63638;
    background-color: #fcf0f1;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.status-indicator strong {
    font-size: 15px;
    color: #1d2327;
}

.status-icon {
    font-size: 12px;
    line-height: 1;
}

.status-icon.active {
    color: #00a32a;
}

.status-icon.inactive {
    color: #d63638;
}

.next-send-details p {
    margin: 0;
    color: #2c3338;
    font-size: 13px;
}

.countdown {
    color: #646970;
    font-size: 12px;
}

.status-message {
    margin-top: 8px;
}

.status-message p {
    margin: 0 0 8px;
    color: #2c3338;
}

/* ===========================================
   SEND NEWSLETTER FORM
   =========================================== */

.cnbm-send-form .description {
    font-size: 13px;
    line-height: 1.5;
    color: #646970;
    margin-bottom: 15px;
}

.cnbm-send-btn {
    font-size: 15px;
    padding: 10px 20px !important;
    height: auto !important;
    transition: all 0.2s ease;
}

.cnbm-send-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

.cnbm-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cnbm-notice-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px;
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
    border-radius: 2px;
    color: #1d2327;
    font-size: 12px;
}

.cnbm-notice-inline .dashicons {
    color: #2271b1;
    flex-shrink: 0;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ===========================================
   STATISTICS CARDS
   =========================================== */

.cnbm-stat-cards {
    display: grid;
    gap: 12px;
}

.cnbm-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f6f7f7;
    border-radius: 4px;
    border: 1px solid #dcdcde;
    transition: all 0.2s ease;
}

.cnbm-stat-card:hover {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
}

.stat-icon.total {
    background-color: #e3f2fd; /* Light blue */
}

.stat-icon.confirmed {
    background-color: #e8f5e9; /* Light green */
}

.stat-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #1976d2; /* Darker icon color for contrast */
}

.stat-icon.confirmed .dashicons {
    color: #2e7d32; /* Darker green for confirmed icon */
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: #1d2327;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 12px;
    color: #646970;
    font-weight: 500;
}

/* ===========================================
   QUICK LINKS
   =========================================== */

.cnbm-quick-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cnbm-quick-links li {
    border-bottom: 1px solid #f0f0f1;
}

.cnbm-quick-links li:last-child {
    border-bottom: none;
}

.cnbm-quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cnbm-quick-link:hover {
    padding-left: 5px;
}

.cnbm-quick-link:hover .link-icon {
    transform: scale(1.05);
}

.link-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f7f7;
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.cnbm-quick-link:hover .link-icon {
    background: #2271b1;
}

.link-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #646970;
}

.cnbm-quick-link:hover .link-icon .dashicons {
    color: #fff;
}

.link-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.link-text strong {
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
}

.link-text small {
    color: #646970;
    font-size: 11px;
    line-height: 1.3;
}

/* ===========================================
   UPGRADE PROMPT
   =========================================== */

.cnbm-upgrade-prompt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.upgrade-content {
    padding: 25px;
}

.upgrade-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-bottom: 15px;
}

.upgrade-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #fff;
}

.upgrade-text {
    color: #fff;
}

.upgrade-text h3 {
    margin: 0 0 5px;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.upgrade-text p {
    margin: 0 0 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

ul.cnbm-pro-features-compact {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

ul.cnbm-pro-features-compact li {
    margin-bottom: 8px;
}

.feature-checkmark {
    color: #81f3a2;
    margin-right: 8px;
}

.upgrade-action .button {
    background: #fff;
    color: #667eea;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.upgrade-action .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}


/* ===========================================
   MODAL STYLING
   =========================================== */

.cnbm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cnbm-modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cnbm-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s ease;
    z-index: 1;
}

.cnbm-modal-close:hover {
    background: #f0f0f1;
}

.cnbm-modal-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #646970;
}

.modal-header {
    padding: 25px 25px 20px;
    border-bottom: 1px solid #f0f0f1;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #2271b1;
    flex-shrink: 0;
}

.modal-body {
    padding: 25px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
}

.modal-body input[type="email"] {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
}

#test-result {
    margin: 15px 0;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

#test-result.success {
    background: #edfaef;
    border-left: 4px solid #00a32a;
    color: #1d2327;
}

#test-result.error {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #1d2327;
}

.modal-body .submit {
    margin-top: 20px;
    margin-bottom: 0;
}

.modal-body .button {
    margin-right: 10px;
}

.modal-body .button:last-child {
    margin-right: 0;
}

/* ===========================================
   SUBSCRIBERS PAGE ENHANCEMENTS
   =========================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.confirmed {
    background: #edfaef;
    color: #00a32a;
}

.status-badge.pending {
    background: #fcf9e8;
    color: #dba617;
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */

@media (max-width: 782px) {
    .cnbm-panel-content {
        padding: 15px;
    }
    
    .cnbm-send-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cnbm-stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ===========================================
   LOADING SPINNER
   =========================================== */

.spinner-container {
    text-align: center;
    padding: 40px;
}

.spinner-container .spinner {
    float: none;
    margin: 0 auto;
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */

.cnbm-notice {
    margin: 15px 0;
}

.cnbm-hidden {
    display: none !important;
}

/* ===========================================
   SHORTCODE PANEL STYLING
   =========================================== */

.cnbm-shortcode-panel {
    border-left: 4px solid #2271b1;
}

.cnbm-shortcode-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f6f7f7;
    padding: 15px;
    border-radius: 4px;
    border: 2px dashed #c3c4c7;
    margin: 15px 0;
}

.cnbm-shortcode-code {
    flex: 1;
    font-size: 16px;
    color: #d63638;
    font-weight: 600;
    font-family: 'Courier New', Courier, monospace;
    background: #fff;
    padding: 8px 12px;
    border-radius: 3px;
    border: 1px solid #dcdcde;
}

.cnbm-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cnbm-copy-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.cnbm-copy-btn.copied {
    background: #00a32a;
    color: #fff;
    border-color: #00a32a;
}

.cnbm-shortcode-details {
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.cnbm-shortcode-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #2271b1;
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
    outline: none;
}

.cnbm-shortcode-details summary:hover {
    color: #135e96;
}

.cnbm-shortcode-details summary .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.cnbm-shortcode-details[open] summary .dashicons {
    transform: rotate(90deg);
}

.cnbm-shortcode-details-content {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #2271b1;
}

.cnbm-parameters-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.cnbm-parameters-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.cnbm-parameters-list li:last-child {
    border-bottom: none;
}

.cnbm-parameters-list code {
    background: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 600;
    color: #2271b1;
    margin-right: 8px;
}

.cnbm-example-code {
    background: #fff;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #dcdcde;
    margin-top: 10px;
    overflow-x: auto;
}

.cnbm-example-code code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #2c3338;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Responsive adjustments for shortcode panel */
@media (max-width: 782px) {
    .cnbm-shortcode-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cnbm-copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cnbm-shortcode-code {
        font-size: 14px;
        text-align: center;
    }
}
/* Uninstall Settings Section Styling */
.form-table tr:has(#cnbm_keep_data_on_uninstall) {
    background: #fffbf0;
    border-left: 4px solid #ffc107;
}

.form-table tr:has(#cnbm_keep_data_on_uninstall) th,
.form-table tr:has(#cnbm_keep_data_on_uninstall) td {
    padding-left: 15px;
}

/* Warning box in uninstall section */
#cnbm_uninstall_settings .warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

#cnbm_uninstall_settings .warning-box h4 {
    margin: 0 0 10px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
}

#cnbm_uninstall_settings .warning-box ol {
    margin: 10px 0 10px 20px;
    color: #856404;
}

#cnbm_uninstall_settings .warning-box p {
    margin: 10px 0 0;
    color: #856404;
    font-weight: 600;
}
/* 
 * CSS Styles for WP Blog Mailer Admin
 * File: admin/css/cnbm-admin.css
 */

/* General Styles */
.cnbm-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.cnbm-box h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Template Cards */
.cnbm-template-card {
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    background: #fff;
    transition: all 0.3s ease;
}

.cnbm-template-card:hover {
    border-color: #0073aa;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.cnbm-template-card.selected {
    border-color: #00a0d2;
    background: #f0f8ff;
}

.cnbm-template-card h3 {
    margin-top: 0;
    color: #23282d;
}

.cnbm-template-preview {
    margin: 15px 0;
    border-radius: 3px;
    overflow: hidden;
}

/* Modal Styles */
.cnbm-modal {
    display: flex;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.cnbm-modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border-radius: 5px;
}

.cnbm-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.cnbm-modal-close:hover,
.cnbm-modal-close:focus {
    color: #000;
}

.cnbm-preview-iframe {
    width: 100%;
    height: 500px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

/* History Table */
#cnbm-history-table {
    margin-top: 20px;
}

#cnbm-history-table .status-sent {
    color: #46b450;
}

#cnbm-history-table .status-failed {
    color: #dc3232;
}

#cnbm-history-table .status-pending {
    color: #ffb900;
}

/* Stats Dashboard */
.cnbm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.cnbm-stat-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
}

.cnbm-stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

.cnbm-stat-card .number {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
}

.cnbm-stat-card .change {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.cnbm-stat-card .change.positive {
    color: #46b450;
}

.cnbm-stat-card .change.negative {
    color: #dc3232;
}

/* Form Styles */
.cnbm-form-group {
    margin-bottom: 20px;
}

.cnbm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.cnbm-form-group input[type="text"],
.cnbm-form-group input[type="email"],
.cnbm-form-group select,
.cnbm-form-group textarea {
    width: 100%;
    max-width: 500px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.cnbm-form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Buttons */
.cnbm-button-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.cnbm-button-group .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Import/Export Section */
.cnbm-import-export-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.cnbm-import-box,
.cnbm-export-box {
    background: #f9f9f9;
    border: 2px dashed #ddd;
    padding: 30px;
    text-align: center;
    border-radius: 5px;
}

.cnbm-import-box:hover,
.cnbm-export-box:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.cnbm-import-box input[type="file"] {
    margin: 20px 0;
}

/* Support Form */
.cnbm-support-form {
    background: #fff;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-width: 600px;
}

.cnbm-support-info {
    background: #f0f8ff;
    padding: 20px;
    border-left: 4px solid #0073aa;
    margin-top: 20px;
}

/* Subscriber Table */
.cnbm-subscriber-actions {
    display: flex;
    gap: 10px;
}

.cnbm-subscriber-actions a {
    text-decoration: none;
}

/* Double Opt-in Settings */
.cnbm-optin-settings {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.cnbm-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.cnbm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cnbm-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.cnbm-switch .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.cnbm-switch input:checked + .slider {
    background-color: #0073aa;
}

.cnbm-switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Custom Pages */
.cnbm-page-builder {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.cnbm-page-builder .preview {
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 20px;
    background: #f9f9f9;
    border-radius: 3px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cnbm-templates-grid {
        grid-template-columns: 1fr;
    }
    
    .cnbm-import-export-grid {
        grid-template-columns: 1fr;
    }
    
    .cnbm-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cnbm-modal-content {
        width: 95%;
    }
}

/* Loading Spinner */
.cnbm-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: cnbm-spin 1s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

@keyframes cnbm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.cnbm-message {
    padding: 10px 15px;
    border-radius: 3px;
    margin: 10px 0;
}

.cnbm-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.cnbm-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.cnbm-message.warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

/* Badge Styles */
.cnbm-badge {
    display: inline-block;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    text-transform: uppercase;
}

.cnbm-badge.starter {
    background: #0073aa;
    color: #fff;
}

.cnbm-badge.pro {
    background: #46b450;
    color: #fff;
}

.cnbm-badge.free {
    background: #666;
    color: #fff;
}

/* Feature Lock Overlay */
.cnbm-feature-locked {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.cnbm-feature-locked::after {
    content: "🔒 Upgrade to Starter";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 10;
}

.cnbm-feature-locked.requires-pro::after {
    content: "🔒 Upgrade to Pro";
}
/**
 * WP Blog Mailer - Pro Admin Styles
 * Version: 1.0.0
 */

/* ==========================================
   PRO FEATURES OVERVIEW
   ========================================== */

.cnbm-pro-features-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cnbm-pro-features-banner h2 {
    color: white;
    margin-top: 0;
}

/* ==========================================
   CUSTOM TEMPLATES
   ========================================== */

.cnbm-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.cnbm-template-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.cnbm-template-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cnbm-template-card.active {
    border-color: #00a32a;
    background: #f6fff8;
}

.cnbm-template-preview {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin: 15px 0;
    min-height: 300px;
    background: #f9f9f9;
}

.cnbm-template-preview iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.cnbm-template-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.cnbm-template-actions .button {
    flex: 1;
}

/* Template Editor */
.cnbm-template-editor {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.cnbm-editor-toolbar {
    background: #f9f9f9;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 10px;
    align-items: center;
}

.cnbm-editor-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
}

.cnbm-tab-button {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.cnbm-tab-button:hover {
    background: white;
}

.cnbm-tab-button.active {
    background: white;
    border-bottom-color: #2271b1;
    color: #2271b1;
}

.cnbm-tab-content {
    display: none;
    padding: 20px;
}

.cnbm-tab-content.active {
    display: block;
}

.cnbm-code-editor {
    width: 100%;
    min-height: 400px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f8f8;
    resize: vertical;
}

/* ==========================================
   ADVANCED ANALYTICS
   ========================================== */

.cnbm-analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cnbm-date-range-picker {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cnbm-date-range-picker input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Stats Cards */
.cnbm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cnbm-stat-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.cnbm-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background:#f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
    color: #333;
}

.stat-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Charts */
.cnbm-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cnbm-chart-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.cnbm-chart-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

/* Analytics Tables */
.cnbm-analytics-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
    border-collapse: separate;
    border-spacing: 0;
}

.cnbm-analytics-table th,
.cnbm-analytics-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.cnbm-analytics-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.cnbm-analytics-table tr:last-child td {
    border-bottom: none;
}

.cnbm-analytics-table th.text-center,
.cnbm-analytics-table td.text-center {
    text-align: center;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-opened {
    background: #d1f4e0;
    color: #0e6027;
}

.status-badge.status-sent {
    background: #e5e5e5;
    color: #666;
}

.status-badge.status-clicked {
    background: #cfe2ff;
    color: #084298;
}

.rate-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
}

.rate-good {
    background: #e8f5e9;
    color: #2e7d32;
}

.rate-medium {
    background: #fff8e1;
    color: #f57f17;
}

.rate-low {
    background: #ffebee;
    color: #c62828;
}

/* ==========================================
   SECTION CARDS
   ========================================== */

.cnbm-section-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.cnbm-section-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
}

/* ==========================================
   TABLE FILTERS
   ========================================== */

.cnbm-table-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cnbm-table-filters input,
.cnbm-table-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cnbm-table-filters input[type="search"] {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

/* ==========================================
   EMPTY STATE
   ========================================== */

.cnbm-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.cnbm-empty-state .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.cnbm-empty-state h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #666;
}

.cnbm-empty-state p {
    color: #999;
    margin-bottom: 25px;
}

/* ==========================================
   HELP & DOCUMENTATION
   ========================================== */

.cnbm-help-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.cnbm-help-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2271b1;
}

.cnbm-help-section code {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #d63638;
    font-size: 13px;
}

.cnbm-help-section pre {
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
}

.cnbm-help-section pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media screen and (max-width: 782px) {
    .cnbm-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cnbm-charts-row {
        grid-template-columns: 1fr;
    }
    
    .cnbm-templates-grid {
        grid-template-columns: 1fr;
    }
    
    .cnbm-table-filters {
        flex-direction: column;
    }
    
    .cnbm-table-filters input[type="search"] {
        max-width: 100%;
    }
}
/**
 * WP Blog Mailer - Starter Features Admin Styles
 * 
 * @package CN_Blog_Mailer
 * @version 1.0.0
 */

/* ==========================================
   GENERAL STYLES
   ========================================== */

.cnbm-starter-wrap {
    background: #f0f0f1;
    padding: 20px;
    margin: 20px 20px 20px 0;
}

.cnbm-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.cnbm-card h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    color: #1d2327;
}

.cnbm-card h2 .dashicons {
    color: #2271b1;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* ==========================================
   IMPORT/EXPORT SECTION
   ========================================== */

.cnbm-import-export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cnbm-download-sample {
    background: #f6f7f7;
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.cnbm-download-sample .button {
    margin: 0;
}

.cnbm-export-info {
    background: #e7f5fe;
    border-left: 4px solid #2271b1;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.cnbm-export-info p {
    margin: 0;
    color: #1d2327;
}

#import-result,
#export-result,
#page-creation-result {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
}

/* ==========================================
   TEMPLATES SECTION
   ========================================== */

.cnbm-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cnbm-template-card {
    background: #fff;
    border: 2px solid #c3c4c7;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.cnbm-template-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cnbm-template-card.active {
    border-color: #00a32a;
    box-shadow: 0 0 0 2px rgba(0, 163, 42, 0.1);
}

.template-preview {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: #f6f7f7;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-active-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #00a32a;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 163, 42, 0.3);
}

.template-active-badge .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.template-info {
    padding: 20px;
}

.template-info h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #1d2327;
}

.template-info p {
    margin: 0 0 15px;
    color: #50575e;
    line-height: 1.6;
}

.template-info .button {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* ==========================================
   SEND HISTORY SECTION
   ========================================== */

.cnbm-history-stats { /* Container for the boxes */
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box { /* This style matches the appearance in your screenshot */
    background: linear-gradient(135deg, #5fa3d0 0%, #3d8ab8 100%); /* Lighter blue gradient */
    color: #ffffff; /* White text */
    padding: 25px;
    border-radius: 8px;
    flex: 1;
    text-align: center;
    opacity: 0.95; /* Better contrast */
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2);
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cnbm-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cnbm-status-sent {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cnbm-status-failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cnbm-status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.cnbm-status-bounced {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* ==========================================
   CUSTOM PAGES SECTION
   ========================================== */

.cnbm-page-preview {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-top: 15px;
}

.cnbm-page-preview h3 {
    margin-top: 0;
    color: #1d2327;
}

/* ==========================================
   DOUBLE OPT-IN SETTINGS
   ========================================== */

.cnbm-double-optin-settings {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 20px;
    margin-top: 15px;
    border-radius: 4px;
}

.cnbm-double-optin-settings h4 {
    margin-top: 0;
    color: #1d2327;
}

.cnbm-email-preview {
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 20px;
    margin-top: 15px;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */

.cnbm-card input[type="file"] {
    padding: 8px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    width: 100%;
    max-width: 400px;
}

.cnbm-card input[type="file"]:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.cnbm-card label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    color: #1d2327;
}

.cnbm-card label input[type="checkbox"],
.cnbm-card label input[type="radio"] {
    margin: 0;
}

/* ==========================================
   BUTTONS
   ========================================== */

.button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

.cnbm-delete-history:hover {
    color: #d63638;
    border-color: #d63638;
}

/* ==========================================
   TABLES
   ========================================== */

.wp-list-table th {
    font-weight: 600;
    color: #1d2327;
}

.wp-list-table td {
    vertical-align: middle;
}

.tablenav-pages {
    margin: 20px 0;
}

.tablenav-pages .page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    text-decoration: none;
    color: #2271b1;
    transition: all 0.2s;
}

.tablenav-pages .page-numbers:hover {
    background: #f6f7f7;
    border-color: #2271b1;
}

.tablenav-pages .page-numbers.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* ==========================================
   NOTICES
   ========================================== */

.notice {
    padding: 12px 15px;
    border-left: 4px solid;
    border-radius: 0 4px 4px 0;
    margin: 15px 0;
}

.notice p {
    margin: 5px 0;
}

.notice-success {
    background: #edfaef;
    border-left-color: #00a32a;
}

.notice-error {
    background: #fcf0f1;
    border-left-color: #d63638;
}

.notice-warning {
    background: #fcf9e8;
    border-left-color: #dba617;
}

.notice-info {
    background: #f0f6fc;
    border-left-color: #2271b1;
}

/* ==========================================
   LOADING STATES
   ========================================== */

.spinner.is-active {
    display: inline-block;
    visibility: visible;
    float: none;
    margin: 0 5px 0 0;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 782px) {
    .cnbm-import-export-grid,
    .cnbm-templates-grid {
        grid-template-columns: 1fr;
    }
    
    .cnbm-history-stats {
        flex-direction: column;
    }
    
    .stat-box {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .cnbm-card {
        padding: 20px 15px;
    }
}

@media (max-width: 600px) {
    .cnbm-starter-wrap {
        padding: 15px;
        margin: 15px 10px 15px 0;
    }
    
    .template-preview {
        height: 300px;
    }
    
    .cnbm-card h2 {
        font-size: 18px;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cnbm-card,
.cnbm-template-card {
    animation: fadeIn 0.3s ease-out;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.cnbm-text-center {
    text-align: center;
}

.cnbm-mt-20 {
    margin-top: 20px;
}

.cnbm-mb-20 {
    margin-bottom: 20px;
}

.cnbm-p-20 {
    padding: 20px;
}

.cnbm-hidden {
    display: none;
}

.cnbm-flex {
    display: flex;
}

.cnbm-gap-10 {
    gap: 10px;
}

/* ==========================================
   BADGE STYLES
   ========================================== */

.cnbm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cnbm-badge-starter {
    background: #2271b1;
    color: #fff;
}

.cnbm-badge-pro {
    background: #00a32a;
    color: #fff;
}

.cnbm-badge-new {
    background: #d63638;
    color: #fff;
}