/**
 * Authority Mailer SMTP - Unified Admin Stylesheet
 * Version: 2.0.0
 *
 * This file contains all shared styles for Authority Mailer admin pages.
 * Provides consistent branding, layout, and components across:
 * - Dashboard
 * - Email Log
 * - Onboarding Wizard
 *
 * Save as: wp-content/plugins/authority-mailer-smtp/assets/css/authority-mailer-admin.css
 */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
    /* Brand Colors */
    --am-brand-primary: #6366F1;
    --am-brand-primary-dark: #4F46E5;
    --am-brand-primary-light: rgba(99, 102, 241, 0.1);
    --am-brand-accent: #8B5CF6;

    /* Semantic Colors */
    --am-success: #10B981;
    --am-success-light: #D1FAE5;
    --am-success-dark: #047857;
    --am-danger: #EF4444;
    --am-danger-light: #FEE2E2;
    --am-danger-dark: #991B1B;
    --am-warning: #F59E0B;
    --am-warning-light: #FEF3C7;
    --am-warning-dark: #92400E;
    --am-info: #3B82F6;
    --am-info-light: #DBEAFE;

    /* Neutral Colors */
    --am-gray-50: #F9FAFB;
    --am-gray-100: #F3F4F6;
    --am-gray-200: #E5E7EB;
    --am-gray-300: #D1D5DB;
    --am-gray-400: #9CA3AF;
    --am-gray-500: #6B7280;
    --am-gray-600: #4B5563;
    --am-gray-700: #374151;
    --am-gray-800: #1F2937;
    --am-gray-900: #111827;

    /* Pro/Premium Colors */
    --am-pro-gradient: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    --am-pro-glow: rgba(245, 158, 11, 0.4);

    /* Layout */
    --am-radius-sm: 6px;
    --am-radius: 10px;
    --am-radius-md: 8px;
    --am-radius-lg: 14px;
    --am-radius-xl: 20px;

    /* Shadows */
    --am-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --am-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --am-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --am-shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.1), 0 3px 6px -2px rgba(0, 0, 0, 0.05);
    --am-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -5px rgba(0, 0, 0, 0.04);
    --am-shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.15);

    /* Typography */
    --am-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --am-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;

    /* Spacing Variables */
    --am-space-1: 0.25rem;
    --am-space-2: 0.5rem;
    --am-space-3: 0.75rem;
    --am-space-4: 1rem;
    --am-space-5: 1.25rem;
    --am-space-6: 1.5rem;
    --am-space-8: 2rem;
    --am-space-12: 3rem;

    /* Text Sizing */
    --am-text-sm: 0.875rem;
    --am-text-base: 1rem;
    --am-text-lg: 1.125rem;
    --am-text-xl: 1.25rem;

    /* Font Weights */
    --am-weight-normal: 400;
    --am-weight-semibold: 600;
    --am-weight-bold: 700;

    /* Transitions */
    --am-transition-fast: 0.12s ease;
    --am-transition: 0.2s ease;
    --am-transition-base: 0.2s ease;
    --am-transition-slow: 0.3s ease;
}

/* ==========================================================================
   Base Page Wrapper
   ========================================================================== */

.am-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    font-family: var(--am-font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f8f9fc;
    min-height: auto;
    overflow-x: hidden;
}

/* Fix dashboard wrapper constraints */
.am-wrap.am-dashboard {
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-x: hidden;
}

.am-wrap.am-dashboard .am-container {
    max-width: 100%;
    overflow: visible;
}

/* Remove WordPress default margins */
.am-wrap .wrap {
    margin: 0;
    padding: 0;
}

/* Full width container */
.am-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
}

/* ==========================================================================
   Unified Page Header
   ========================================================================== */

.am-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 16px;
}

.am-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.am-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--am-brand-primary) 0%, var(--am-brand-accent) 100%);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow), 0 0 20px rgba(99, 102, 241, 0.25);
    flex-shrink: 0;
}

.am-logo svg {
    width: 30px;
    height: 30px;
    color: #fff;
}

.am-header-info h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--am-gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.am-header-info h1 .am-title-light {
    font-weight: 400;
    color: var(--am-gray-500);
}

.am-version-badge {
    display: inline-flex;
    padding: 3px 10px;
    background: var(--am-gray-100);
    border: 1px solid var(--am-gray-200);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: var(--am-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.am-version-badge.am-badge-pro {
    background: linear-gradient(135deg, var(--am-brand-primary), #8b5cf6);
    border: none;
    color: #fff;
}

.am-header-subtitle {
    font-size: 15px;
    color: var(--am-gray-500);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.am-header-subtitle a {
    color: var(--am-brand-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--am-transition-fast);
}

.am-header-subtitle a:hover {
    color: var(--am-brand-primary-dark);
}

.am-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.am-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--am-radius-sm);
    text-decoration: none;
    transition: all var(--am-transition);
    cursor: pointer;
    border: none;
    line-height: 1.4;
    white-space: nowrap;
}

.am-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.am-btn-primary {
    background: var(--am-brand-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.am-btn-primary:hover,
.am-btn-primary:focus {
    background: var(--am-brand-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.am-btn-secondary {
    background: #fff;
    color: var(--am-gray-700);
    border: 1px solid var(--am-gray-300);
}

.am-btn-secondary:hover,
.am-btn-secondary:focus {
    background: var(--am-brand-primary);
    color: #fff;
    border-color: var(--am-brand-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.am-btn-success {
    background: var(--am-success);
    color: #fff;
}

.am-btn-success:hover,
.am-btn-success:focus {
    background: var(--am-success-dark);
    color: #fff;
}

.am-btn-danger {
    background: var(--am-danger);
    color: #fff;
}

.am-btn-danger:hover,
.am-btn-danger:focus {
    background: var(--am-danger-dark);
    color: #fff;
}

.am-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.am-btn-lg {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
}

/* ==========================================================================
   Pro/Premium Banner
   ========================================================================== */

/* ==========================================================================
   Connection Status Banner
   ========================================================================== */

.am-status-banner {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: var(--am-radius);
    margin-bottom: 24px;
    gap: 16px;
}

.am-status-banner.connected {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border: 1px solid #A7F3D0;
}

.am-status-banner.disconnected {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 1px solid #FCD34D;
}

.am-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.am-status-banner.connected .am-status-icon {
    background: var(--am-success);
}

.am-status-banner.disconnected .am-status-icon {
    background: var(--am-warning);
}

.am-status-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

.am-status-content {
    flex: 1;
}

.am-status-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--am-gray-900);
    margin: 0 0 2px 0;
}

.am-status-subtitle {
    font-size: 13px;
    color: var(--am-gray-600);
    margin: 0;
}

.am-status-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.am-provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--am-gray-700);
    box-shadow: var(--am-shadow-sm);
}

.am-provider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.am-card {
    background: #fff;
    border-radius: var(--am-radius);
    border: 2px solid var(--am-gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: visible;
    transition: all var(--am-transition);
    margin-bottom: 32px;
}

.am-card:hover {
    border-color: var(--am-brand-primary);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.am-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--am-gray-200);
}

.am-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--am-gray-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.am-card-title svg {
    width: 18px;
    height: 18px;
    color: var(--am-gray-400);
}

.am-card-body {
    padding: 20px;
    overflow: visible;
}

.am-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--am-gray-200);
}

/* ==========================================================================
   Stats Grid
   ========================================================================== */

.am-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 32px 0;
    overflow: visible;
}

/* Fix dashboard stats overflow */
.am-dashboard-stats {
    overflow: visible;
}

@media (max-width: 1200px) {
    .am-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .am-stats-grid {
        grid-template-columns: 1fr;
    }
}

.am-stat-card {
    background: #fff;
    border-radius: var(--am-radius);
    padding: var(--am-space-4);
    border: 2px solid var(--am-gray-300);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.am-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.am-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    border-radius: var(--am-radius) var(--am-radius) 0 0;
}

.am-stat-card.total {
    border-color: rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.am-stat-card.total::before {
    background: linear-gradient(90deg, var(--am-brand-primary), var(--am-brand-accent));
}

.am-stat-card.success {
    border-color: rgba(16, 185, 129, 0.2);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
}

.am-stat-card.success::before {
    background: linear-gradient(90deg, var(--am-success), #059669);
}

.am-stat-card.failed {
    border-color: rgba(239, 68, 68, 0.2);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.08) 100%);
}

.am-stat-card.failed::before {
    background: linear-gradient(90deg, var(--am-danger), #DC2626);
}

.am-stat-card.rate {
    border-color: rgba(245, 158, 11, 0.2);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.08) 100%);
}

.am-stat-card.rate::before {
    background: linear-gradient(90deg, var(--am-warning), #D97706);
}

.am-stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.am-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--am-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.am-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--am-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.am-stat-icon svg {
    width: 24px;
    height: 24px;
}

.am-stat-card.total .am-stat-icon {
    background: linear-gradient(135deg, var(--am-brand-primary), var(--am-brand-accent));
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.am-stat-card.success .am-stat-icon {
    background: linear-gradient(135deg, var(--am-success), #059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.am-stat-card.failed .am-stat-icon {
    background: linear-gradient(135deg, var(--am-danger), #DC2626);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.am-stat-card.rate .am-stat-icon {
    background: linear-gradient(135deg, var(--am-warning), #D97706);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.am-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--am-gray-900);
    line-height: 1;
    margin: var(--am-space-2) 0;
    letter-spacing: -0.025em;
}

.am-stat-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--am-gray-500);
}

.am-stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
}

.am-stat-trend.up {
    background: var(--am-success-light);
    color: var(--am-success-dark);
}

.am-stat-trend.down {
    background: var(--am-danger-light);
    color: var(--am-danger-dark);
}

/* Locked stat overlay */
.am-stat-card.locked,
.am-stat-card.locked {
    position: relative;
}

.am-stat-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--am-radius);
}

.am-stat-lock-icon {
    width: 40px;
    height: 40px;
    background: var(--am-pro-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px var(--am-pro-glow);
}

.am-stat-lock-icon svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

.am-stat-lock-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--am-gray-700);
    margin-bottom: 8px;
}

.am-stat-lock-btn {
    font-size: 11px;
    padding: 6px 14px;
    background: var(--am-pro-gradient);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--am-transition);
}

.am-stat-lock-btn:hover {
    transform: scale(1.05);
    color: #fff;
}

/* ==========================================================================
   Content Grid Layout
   ========================================================================== */

.am-content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    margin-top: 32px;
}

@media (max-width: 1100px) {
    .am-content-grid {
        grid-template-columns: 1fr;
    }
}

.am-main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.am-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================================================
   Chart Styles
   ========================================================================== */

.am-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 150px;
    padding: 20px 20px 10px;
}

.am-chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.am-chart-bars {
    width: 100%;
    max-width: 40px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
    border-radius: var(--am-radius-sm) var(--am-radius-sm) 0 0;
    overflow: hidden;
}

.am-chart-bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    transition: height var(--am-transition-slow);
}

.am-chart-bar.success {
    background: var(--am-success);
}

.am-chart-bar.failed {
    background: var(--am-danger);
}

.am-chart-label {
    font-size: 11px;
    color: var(--am-gray-500);
    font-weight: 500;
}

.am-chart-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 20px;
    border-top: 1px solid var(--am-gray-200);
}

.am-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--am-gray-600);
}

.am-chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.am-chart-legend-dot.success {
    background: var(--am-success);
}

.am-chart-legend-dot.failed {
    background: var(--am-danger);
}

/* Fix chart body constraints */
.am-chart-card {
    overflow: hidden;
    max-width: 100%;
}

.am-chart-body {
    min-height: 350px;
    max-height: none;
    overflow: hidden;
    max-width: 100%;
}

.am-chart-header {
    padding: 16px 20px;
}

.am-chart-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 350px;
    overflow: hidden;
}

.am-chart-container canvas {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.am-table {
    width: 100%;
    border-collapse: collapse;
}

.am-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--am-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--am-gray-200);
}

.am-table td {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--am-gray-700);
    border-bottom: 1px solid var(--am-gray-100);
    vertical-align: middle;
}


.am-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */

.am-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.am-status-badge.success {
    background: var(--am-success-light);
    color: var(--am-success-dark);
}

.am-status-badge.error {
    background: var(--am-danger-light);
    color: var(--am-danger-dark);
}

.am-status-badge.pending,
.am-status-badge.attempt {
    background: var(--am-warning-light);
    color: var(--am-warning-dark);
}

.am-status-badge svg {
    width: 12px;
    height: 12px;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.am-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.am-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: var(--am-gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.am-empty-icon svg {
    width: 36px;
    height: 36px;
    color: var(--am-gray-400);
}

.am-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--am-gray-700);
    margin: 0 0 8px 0;
}

.am-empty-text {
    font-size: 14px;
    color: var(--am-gray-500);
    margin: 0 0 20px 0;
}

/* ==========================================================================
   Quick Actions
   ========================================================================== */

.am-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.am-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--am-gray-50);
    border: 1px solid var(--am-gray-200);
    border-radius: var(--am-radius-sm);
    color: var(--am-gray-700);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--am-transition);
    cursor: pointer;
}

.am-action-btn:hover {
    background: #fff;
    border-color: var(--am-brand-primary);
    color: var(--am-brand-primary);
    transform: translateX(4px);
}

.am-action-icon {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: var(--am-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--am-shadow-sm);
    transition: all var(--am-transition);
}

.am-action-icon svg {
    width: 18px;
    height: 18px;
    color: var(--am-gray-500);
}

.am-action-btn:hover .am-action-icon {
    background: var(--am-brand-primary);
}

.am-action-btn:hover .am-action-icon svg {
    color: #fff;
}

/* ==========================================================================
   Delivery Health Circle
   ========================================================================== */

.am-health-score {
    text-align: center;
    padding: 24px 20px;
}

.am-health-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    position: relative;
}

.am-health-circle svg {
    transform: rotate(-90deg);
    width: 120px;
    height: 120px;
}

.am-health-circle circle {
    fill: none;
    stroke-width: 10;
}

.am-health-circle .bg {
    stroke: var(--am-gray-200);
}

.am-health-circle .progress {
    stroke: var(--am-success);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.am-health-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 700;
    color: var(--am-gray-900);
}

.am-health-label {
    font-size: 14px;
    color: var(--am-gray-600);
    margin-bottom: 6px;
}

.am-health-status {
    font-size: 13px;
    font-weight: 600;
}

/* ==========================================================================
   Pro Upgrade Card (Sidebar)
   ========================================================================== */

.am-pro-card {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.am-pro-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.am-pro-card .am-card-body {
    position: relative;
    z-index: 2;
}

.am-pro-header {
    text-align: center;
    margin-bottom: 20px;
}

.am-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--am-pro-gradient);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px var(--am-pro-glow);
}

.am-pro-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px 0;
}

.am-pro-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ==========================================================================
   Testimonial
   ========================================================================== */

.am-testimonial {
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--am-radius-sm);
    padding: 16px;
    margin-top: 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.am-testimonial-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.am-testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.am-testimonial-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--am-brand-primary) 0%, var(--am-brand-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.am-testimonial-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.am-testimonial-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Free Plan Limits Card
   ========================================================================== */

.am-limits-card {
    border: 1px dashed var(--am-gray-300);
    background: var(--am-gray-50);
}

.am-limits-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.am-limits-icon {
    width: 32px;
    height: 32px;
    background: var(--am-gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.am-limits-icon svg {
    width: 16px;
    height: 16px;
    color: var(--am-gray-500);
}

.am-limits-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--am-gray-700);
}

.am-limits-list {
    font-size: 12px;
    color: var(--am-gray-600);
    line-height: 1.6;
}

.am-limits-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--am-gray-200);
}

.am-limits-row:last-child {
    border-bottom: none;
}

.am-limits-row span:last-child {
    font-weight: 600;
}

.am-limits-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--am-brand-primary);
    text-decoration: none;
}

.am-limits-link:hover {
    color: var(--am-brand-primary-dark);
}

/* ==========================================================================
   View All Link
   ========================================================================== */

.am-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--am-brand-primary);
    text-decoration: none;
}

.am-view-all:hover {
    color: var(--am-brand-primary-dark);
}

.am-view-all svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.am-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 20px;
}

.am-pagination a,
.am-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--am-radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--am-transition);
}

.am-pagination a {
    background: #fff;
    color: var(--am-gray-700);
    border: 1px solid var(--am-gray-300);
}

.am-pagination a:hover {
    background: var(--am-gray-50);
    border-color: var(--am-brand-primary);
    color: var(--am-brand-primary);
}

.am-pagination span.current {
    background: var(--am-brand-primary);
    color: #fff;
    border: 1px solid var(--am-brand-primary);
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.am-form-group {
    margin-bottom: 16px;
}

.am-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--am-gray-700);
    margin-bottom: 6px;
}

.am-form-input,
.am-form-select,
.am-form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--am-gray-300);
    border-radius: var(--am-radius-sm);
    background: #fff;
    color: var(--am-gray-900);
    transition: border-color var(--am-transition-fast), box-shadow var(--am-transition-fast);
    box-sizing: border-box;
}

.am-form-input:focus,
.am-form-select:focus,
.am-form-textarea:focus {
    outline: none;
    border-color: var(--am-brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.am-form-help {
    font-size: 12px;
    color: var(--am-gray-500);
    margin-top: 6px;
    line-height: 1.4;
}

/* ==========================================================================
   Toggle Switch
   ========================================================================== */

.am-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.am-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.am-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--am-gray-300);
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--am-transition);
}

.am-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--am-transition);
    box-shadow: var(--am-shadow-sm);
}

.am-toggle input:checked + .am-toggle-slider {
    background: var(--am-success);
}

.am-toggle input:checked + .am-toggle-slider::before {
    transform: translateX(20px);
}

.am-toggle input:focus + .am-toggle-slider {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ==========================================================================
   Toolbar & Filters
   ========================================================================== */

.am-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--am-gray-50);
    border-bottom: 1px solid var(--am-gray-200);
    gap: 16px;
    flex-wrap: wrap;
}

.am-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.am-toolbar-right {
    font-size: 13px;
    color: var(--am-gray-500);
}

.am-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px;
    border-bottom: 1px solid var(--am-gray-200);
}

.am-filter-form input,
.am-filter-form select {
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--am-gray-300);
    border-radius: var(--am-radius-sm);
    background: #fff;
}

.am-filter-form input:focus,
.am-filter-form select:focus {
    outline: none;
    border-color: var(--am-brand-primary);
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

@media (max-width: 768px) {
    .am-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .am-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .am-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .am-filter-form input,
    .am-filter-form select,
    .am-filter-form button {
        width: 100%;
    }
}

/* ==========================================================================
   Main Content Grid with Proper Spacing
   ========================================================================== */

.am-dashboard {
    background: #f8f9fc;
}

/* Force proper gap on main dashboard content grid */
.am-dashboard > .am-container > div[style*="grid-template-columns"] {
    gap: 20px !important;
    margin-top: 20px;
}

/* ==========================================================================
   Conditional Display: Hide Send Test Button When No Provider
   ========================================================================== */

/* Hide Send Test Email button when no provider is configured */
body.authority-mailer-no-provider .am-header-actions .am-btn-secondary {
    display: none !important;
}

/* ==========================================================================
   Top Navigation Menu
   ========================================================================== */

.am-top-nav {
    background: #fff;
    border-bottom: 1px solid var(--am-gray-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

.am-nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.am-nav-menu::-webkit-scrollbar {
    height: 4px;
}

.am-nav-menu::-webkit-scrollbar-thumb {
    background: var(--am-gray-300);
    border-radius: 2px;
}

.am-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--am-gray-600);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.am-nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.am-nav-item:hover {
    color: var(--am-primary);
    background: var(--am-primary-light);
}

.am-nav-item:hover svg {
    opacity: 1;
}

.am-nav-active,
.am-nav-active:hover {
    color: var(--am-primary);
    border-bottom-color: var(--am-primary);
    background: transparent;
}

.am-nav-active svg {
    opacity: 1;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .am-nav-menu {
        padding: 0 12px;
    }

    .am-nav-item {
        padding: 12px 14px;
        font-size: 13px;
    }

    .am-nav-item span {
        display: none;
    }

    .am-nav-item svg {
        width: 20px;
        height: 20px;
    }
}

/* ==========================================================================
   Dashboard-Specific Styles
   ========================================================================== */

/* Provider Status Card - No Provider Configured */
.am-provider-empty-state {
    text-align: center;
    padding: var(--am-space-4);
}

.am-provider-empty-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto var(--am-space-2);
    background: var(--am-error-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.am-provider-empty-title {
    font-size: var(--am-text-base);
    font-weight: var(--am-weight-semibold);
    color: var(--am-gray-900);
    margin: 0 0 var(--am-space-1);
}

.am-provider-empty-desc {
    font-size: var(--am-text-sm);
    color: var(--am-gray-600);
    margin: 0 0 var(--am-space-3);
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

/* Provider Status Card - Provider Configured */
.am-provider-connected {
    background: #fff;
    border-left: 4px solid var(--am-success);
    padding: var(--am-space-3) var(--am-space-4);
}

.am-provider-connected-flex {
    display: flex;
    align-items: center;
    gap: var(--am-space-4);
}

.am-provider-connected-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--am-success) 0%, #059669 100%);
    border-radius: var(--am-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.am-provider-connected-content {
    flex: 1;
}

.am-provider-title-row {
    display: flex;
    align-items: center;
    gap: var(--am-space-2);
    margin-bottom: var(--am-space-1);
}

.am-provider-title {
    font-size: var(--am-text-lg);
    font-weight: var(--am-weight-semibold);
    color: var(--am-gray-900);
    margin: 0;
}

.am-provider-badge-enhanced {
    font-weight: 600;
    padding: 4px 12px;
}

.am-provider-desc {
    font-size: var(--am-text-sm);
    color: var(--am-gray-600);
    margin: 0;
}

/* Main Dashboard Content Grid */
.am-dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    margin-top: 32px;
    height: auto;
    min-height: 0;
    overflow: visible;
}

/* Ensure grid children don't overflow */
.am-dashboard-main-grid > div {
    position: relative;
    overflow: visible;
    min-width: 0;
}

@media (max-width: 1100px) {
    .am-dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

/* View All Link in Card Header */
.am-view-all-link {
    color: var(--am-primary);
    font-size: 14px;
    text-decoration: none;
}

.am-view-all-link:hover {
    color: var(--am-primary-hover);
}

/* Email Table Text Ellipsis */
.am-text-ellipsis-email {
    max-width: 200px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-text-ellipsis-subject {
    max-width: 250px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Timestamp Text in Table */
.am-timestamp-text {
    color: var(--am-gray-500);
    font-size: 14px;
}

/* Empty State Message */
.am-empty-state-text {
    color: var(--am-gray-500);
    text-align: center;
    margin: 20px 0;
}

/* Health Status Text with Dynamic Color */
.am-health-status-text {
    font-size: 13px;
    font-weight: 600;
}

/* Email Health Monitor Card */
.am-health-monitor-card {
    margin-top: 32px;
}

/* N/A state for health value */
.am-health-value-na {
    font-size: 18px;
}

/* Health Monitor Status Text */
.am-health-status-label {
    font-size: 14px;
    color: var(--am-gray-600);
    margin-top: 12px;
    margin-bottom: 16px;
    text-align: center;
}

/* Health Monitor Metrics Grid */
.am-health-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 480px) {
    .am-health-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.am-health-metric-label {
    color: var(--am-gray-500);
    display: block;
    margin-bottom: 6px;
}

/* Two-Column Grid for Pro Features */
.am-two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 900px) {
    .am-two-column-grid {
        grid-template-columns: 1fr;
    }
}

/* Quick Actions Flex Container */
.am-quick-actions-flex {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Full-width buttons with center text alignment */
.am-btn-full-width {
    width: 95%;
    text-align: center;
}

/* ==========================================================================
   Utility Classes for Alignment
   ========================================================================== */

.am-text-center {
    text-align: center;
}

.am-mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Premium/Pro Banner Overflow Fix
   ========================================================================== */

/* Fix premium banner visibility */
.am-premium-banner,
.am-pro-banner-full,
.am-pro-banner-sidebar,
.am-pro-banner-compact {
    overflow: visible !important;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Pro Banner Components
   ========================================================================== */

/* Full Banner (Dashboard) */
.am-pro-banner-full {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 2rem;
    border-radius: var(--am-radius);
    margin-bottom: 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.am-pro-banner-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--am-success);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--am-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
}

.am-pro-banner-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.am-pro-banner-header {
    margin: 0;
}

.am-pro-banner-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.am-pro-banner-icon {
    font-size: 1.5rem;
}

.am-pro-banner-body {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
    justify-content: space-between;
}

.am-pro-banner-features {
    flex: 1;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.am-pro-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.am-pro-feature-icon {
    flex-shrink: 0;
    stroke: var(--am-success);
}

.am-pro-banner-cta {
    display: flex;
    align-items: center;
}

.am-pro-upgrade-btn {
    background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    display: inline-block;
    box-shadow: 0 4px 20px var(--am-pro-glow);
    transition: all var(--am-transition);
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.am-pro-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--am-pro-glow);
}

/* Responsive adjustments for full banner */
@media (max-width: 768px) {
    .am-pro-banner-body {
        flex-direction: column;
        align-items: stretch;
    }

    .am-pro-banner-features {
        grid-template-columns: 1fr;
    }

    .am-pro-banner-cta {
        width: 100%;
    }

    .am-pro-upgrade-btn {
        width: 100%;
        text-align: center;
    }
}

/* Sidebar Banner (Onboarding Wizard) */
.am-pro-banner-sidebar {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 1.5rem;
    border-radius: var(--am-radius);
    color: #fff;
}

.am-pro-sidebar-header {
    margin-bottom: 1.5rem;
}

.am-pro-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.am-pro-sidebar-subtitle {
    font-size: 0.875rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.am-pro-sidebar-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.am-pro-sidebar-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.am-pro-sidebar-testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: var(--am-radius-sm);
    margin-bottom: 1.5rem;
}

.am-pro-testimonial-quote {
    font-size: 0.875rem;
    font-style: italic;
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.am-pro-testimonial-author {
    font-size: 0.75rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.am-pro-testimonial-role {
    color: rgba(255, 255, 255, 0.6);
}

.am-pro-sidebar-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.am-pro-sidebar-cta .am-pro-upgrade-btn {
    width: 100%;
    text-align: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.am-pro-sidebar-guarantee {
    font-size: 0.75rem;
    text-align: center;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Compact Banner (Email Log) */
.am-pro-banner-compact {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 1rem 1.5rem;
    border-radius: var(--am-radius);
    margin-bottom: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.am-pro-compact-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.am-pro-compact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.am-pro-compact-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.am-pro-compact-text strong {
    font-weight: 700;
    font-size: 1rem;
}

.am-pro-compact-text span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.am-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Responsive adjustments for compact banner */
@media (max-width: 640px) {
    .am-pro-banner-compact {
        flex-direction: column;
        align-items: stretch;
    }

    .am-pro-compact-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .am-btn-sm {
        width: 100%;
        text-align: center;
    }
}

/* Locked Provider Cards (Onboarding) */
.am-provider-card.locked {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.am-provider-card.locked::after {
    content: 'PRO';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: var(--am-radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.am-provider-card.locked .am-provider-icon {
    filter: grayscale(100%);
}

.am-provider-card.locked:hover {
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--am-shadow-sm);
}

/* ==========================================================================
   Upgrade Page Styles
   ========================================================================== */

.am-upgrade-page {
    max-width: 1200px;
    margin: 0 auto;
}

.am-upgrade-hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.am-upgrade-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--am-gray-900);
    margin: 0 0 1rem 0;
}

.am-upgrade-subtitle {
    font-size: 1.25rem;
    color: var(--am-gray-600);
    margin: 0;
}

.am-pricing-section {
    margin-bottom: 4rem;
}

.am-section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--am-gray-900);
    margin: 0 0 0.5rem 0;
}

.am-section-subtitle {
    text-align: center;
    font-size: 1rem;
    color: var(--am-gray-600);
    margin: 0 0 3rem 0;
}

.am-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.am-pricing-card {
    background: #fff;
    border: 2px solid var(--am-gray-200);
    border-radius: var(--am-radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--am-transition);
}

.am-pricing-card:hover {
    border-color: var(--am-brand-primary);
    box-shadow: var(--am-shadow-lg);
    transform: translateY(-4px);
}

.am-pricing-featured {
    border-color: var(--am-brand-primary);
    box-shadow: var(--am-shadow-md);
}

.am-pricing-badge {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--am-warning) 0%, var(--am-danger) 100%);
    color: #fff;
    padding: 0.375rem 1rem;
    border-radius: var(--am-radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.am-pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.am-pricing-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--am-gray-900);
    margin: 0 0 1rem 0;
}

.am-pricing-price {
    margin-bottom: 0.5rem;
}

.am-price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--am-brand-primary);
}

.am-price-period {
    font-size: 1rem;
    color: var(--am-gray-600);
}

.am-pricing-sites {
    font-size: 0.875rem;
    color: var(--am-gray-600);
    margin: 0;
}

.am-pricing-body {
    flex: 1;
    margin-bottom: 2rem;
}

.am-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.am-feature-list li {
    padding: 0.75rem 0;
    padding-left: 1.75rem;
    position: relative;
    color: var(--am-gray-700);
    border-bottom: 1px solid var(--am-gray-100);
}

.am-feature-list li:last-child {
    border-bottom: none;
}

.am-feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--am-success);
    font-weight: 700;
}

.am-pricing-footer {
    margin-top: auto;
}

.am-btn-full {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.am-guarantee-section {
    text-align: center;
    padding: 2rem;
    background: var(--am-gray-50);
    border-radius: var(--am-radius);
}

.am-guarantee-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: var(--am-success);
    color: #fff;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.am-guarantee-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--am-gray-900);
    margin: 0 0 0.5rem 0;
}

.am-guarantee-desc {
    font-size: 1rem;
    color: var(--am-gray-600);
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

.am-testimonial-section {
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.am-testimonial {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
    background: var(--am-brand-primary-light);
    border-radius: var(--am-radius);
}

.am-testimonial-quote {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--am-gray-800);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.am-testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.am-testimonial-author strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--am-gray-900);
}

.am-testimonial-author span {
    font-size: 0.875rem;
    color: var(--am-gray-600);
}

.am-comparison-section {
    margin-bottom: 4rem;
}

.am-comparison-table {
    overflow-x: auto;
}

.am-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--am-radius);
    overflow: hidden;
}

.am-table thead {
    background: var(--am-gray-100);
}

.am-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--am-gray-900);
    border-bottom: 2px solid var(--am-gray-200);
}

.am-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--am-gray-100);
}

.am-table tbody tr:last-child td {
    border-bottom: none;
}


.am-table-yes {
    color: var(--am-success);
    font-weight: 700;
    font-size: 1.25rem;
}

.am-table-no {
    color: var(--am-gray-400);
    font-size: 1.25rem;
}

/* Responsive adjustments for upgrade page */
@media (max-width: 768px) {
    .am-upgrade-title {
        font-size: 2rem;
    }

    .am-upgrade-subtitle {
        font-size: 1rem;
    }

    .am-pricing-grid {
        grid-template-columns: 1fr;
    }

    .am-section-title {
        font-size: 1.5rem;
    }

    .am-testimonial-quote {
        font-size: 1rem;
    }
}

/* ==========================================================================
   PROTOTYPE B: Pro Banner Sidebar (Onboarding Wizard)
   Dark gradient, testimonial, and free plan limits table
   ========================================================================== */

.am-pro-banner-sidebar {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    width: 250px;
    margin: 0 auto;
}

@media (max-width: 1023px) {
    .am-pro-banner-sidebar {
        width: 100%;
        max-width: 600px;
    }
}

.am-pro-sidebar-header {
    margin-bottom: 20px;
}

.am-pro-sidebar-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.am-pro-sidebar-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

.am-pro-sidebar-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.am-pro-sidebar-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.5;
}

.am-pro-sidebar-feature .am-pro-feature-icon {
    flex-shrink: 0;
    color: #10b981;
    margin-top: 2px;
}

.am-pro-sidebar-cta {
    margin-bottom: 24px;
}

.am-pro-sidebar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    transition: all 0.2s ease;
}

.am-pro-sidebar-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.5);
    color: #ffffff;
    text-decoration: none;
}

.am-pro-sidebar-guarantee {
    font-size: 13px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin: 12px 0 0 0;
    line-height: 1.4;
}

.am-pro-sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 24px 0;
}

.am-pro-sidebar-testimonial {
    margin-bottom: 24px;
}

.am-pro-testimonial-quote {
    font-size: 14px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.am-pro-testimonial-author {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.am-pro-sidebar-limits {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.am-pro-limits-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
}

.am-pro-limits-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.am-pro-limits-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.am-pro-limits-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.am-pro-limits-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.am-pro-limits-value {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

/* Spacing for pro banner when shown below white-glove sidebar */
.authority-mailer-pro-banner-spacing {
    margin-top: 24px;
}

/* ==========================================================================
   Free vs Pro Menu Highlighting
   ========================================================================== */

/* Highlight Free vs Pro menu item to make it stand out */
#adminmenu .toplevel_page_authority-mailer-smtp-dashboard .wp-submenu a[href*="authority-mailer-free-vs-pro"] {
color: #ff9800;
font-weight: 600;
position: relative;
}

#adminmenu .toplevel_page_authority-mailer-smtp-dashboard .wp-submenu a[href*="authority-mailer-free-vs-pro"]:hover,
#adminmenu .toplevel_page_authority-mailer-smtp-dashboard .wp-submenu a[href*="authority-mailer-free-vs-pro"]:focus {
color: #e65100;
}

/* Add star icon before Free vs Pro menu item */
#adminmenu .toplevel_page_authority-mailer-smtp-dashboard .wp-submenu a[href*="authority-mailer-free-vs-pro"]::before {
content: "⭐";
margin-right: 4px;
font-size: 12px;
}

/* ===================================================================
   Pro Feature Card (Dashboard Sidebar)
   =================================================================== */

/* Pro Feature Card */
.am-pro-feature-card {
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
	color: #fff;
	border: none !important;
	margin-top: var(--am-space-6);
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

.am-pro-feature-card:hover {
	border: none !important;
	box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4) !important;
	transform: translateY(-2px);
}

.am-pro-feature-card .am-card-body {
	padding: var(--am-space-6);
	text-align: center;
}

.am-pro-feature-icon {
	margin: 0 auto var(--am-space-4);
	width: 64px;
	height: 64px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.am-pro-feature-icon svg {
	stroke: #fff;
}

.am-pro-feature-title {
	font-size: var(--am-text-xl);
	font-weight: var(--am-weight-bold);
	margin: 0 0 var(--am-space-5) 0;
	color: #fff;
}

.am-pro-feature-list {
	list-style: none;
	margin: 0 0 var(--am-space-6) 0;
	padding: 0;
	text-align: left;
}

.am-pro-feature-list li {
	display: flex;
	gap: var(--am-space-3);
	align-items: flex-start;
	margin-bottom: var(--am-space-4);
	padding: var(--am-space-3);
	background: rgba(255, 255, 255, 0.1);
	border-radius: var(--am-radius-md);
}

.am-pro-feature-list li:last-child {
	margin-bottom: 0;
}

.am-pro-feature-list li svg {
	flex-shrink: 0;
	stroke: #10b981;
	margin-top: 2px;
}

.am-pro-feature-list li div {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.am-pro-feature-list li strong {
	font-weight: var(--am-weight-semibold);
	color: #fff;
	display: block;
}

.am-pro-feature-list li span {
	font-size: var(--am-text-sm);
	color: rgba(255, 255, 255, 0.8);
}

.am-pro-feature-btn {
	background: #fff !important;
	color: #6366f1 !important;
	font-weight: var(--am-weight-bold);
	border: none !important;
	transition: all var(--am-transition-base);
}

.am-pro-feature-btn:hover {
	background: rgba(255, 255, 255, 0.95) !important;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===================================================================
   Empty States - Calm & Reassuring Design
   =================================================================== */

/* Email Analytics Empty State */
.am-chart-empty-state {
	text-align: center;
	padding: var(--am-space-8) var(--am-space-6);
	min-height: 300px; /* Reduced from 400px */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

/* Empty State Illustration Container */
.am-empty-illustration {
	margin: 0 auto var(--am-space-6);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Smaller version for Recent Emails */
.am-empty-illustration-sm {
	margin-bottom: var(--am-space-4);
}

/* Empty State Title - Calm and reassuring */
.am-empty-state-title {
	font-size: var(--am-text-xl);
	font-weight: var(--am-weight-semibold);
	color: var(--am-gray-700);
	margin: 0 0 var(--am-space-3) 0;
	line-height: 1.4;
}

/* Smaller title for Recent Emails section */
.am-empty-state-title-sm {
	font-size: var(--am-text-lg);
	font-weight: var(--am-weight-semibold);
	color: var(--am-gray-700);
	margin: 0 0 var(--am-space-2) 0;
	line-height: 1.4;
}

/* Empty State Description - Reassuring copy */
.am-empty-state-description {
	font-size: var(--am-text-base);
	color: var(--am-gray-600);
	line-height: 1.6;
	margin: 0 0 var(--am-space-6) 0;
	max-width: 480px;
}

/* Empty State Text - For simpler empty states */
.am-empty-state-text {
	font-size: var(--am-text-sm);
	color: var(--am-gray-500);
	line-height: 1.5;
	margin: 0;
}

/* Empty State Actions - Secondary CTA */
.am-empty-state-actions {
	margin-top: var(--am-space-2);
}

/* Small secondary button styling */
.am-btn-sm {
	padding: var(--am-space-2) var(--am-space-4);
	font-size: var(--am-text-sm);
	gap: var(--am-space-2);
}

.am-btn-sm svg {
	width: 14px;
	height: 14px;
}

/* Ensure illustrations are responsive */
@media (max-width: 768px) {
	.am-chart-empty-state {
		padding: var(--am-space-8) var(--am-space-4);
		min-height: 300px;
	}

	.am-empty-illustration svg {
		width: 100px;
		height: 100px;
	}

	.am-empty-illustration-sm svg {
		width: 60px;
		height: 60px;
	}

	.am-empty-state-title {
		font-size: var(--am-text-lg);
	}

	.am-empty-state-description {
		font-size: var(--am-text-sm);
	}
}
