/* Frontend Design Enhancements for MailRepute */

/* ============================================
   CSS Variables for Consistent Theming
   ============================================ */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   Enhanced Typography
   ============================================ */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ============================================
   Enhanced Buttons
   ============================================ */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-full);
    font-weight: 600;
    padding: 14px 28px;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-enhanced:hover::before {
    left: 100%;
}

.btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-enhanced:active {
    transform: translateY(0);
}

.btn-primary-enhanced {
    background: var(--primary-gradient);
    color: white;
}

.btn-secondary-enhanced {
    background: var(--secondary-gradient);
    color: white;
}

.btn-success-enhanced {
    background: var(--success-gradient);
    color: white;
}

/* ============================================
   Enhanced Cards
   ============================================ */
.card-enhanced {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.card-enhanced:hover::before {
    transform: scaleX(1);
}

.card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Enhanced Form Elements
   ============================================ */
.form-input-enhanced {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: all var(--transition-base);
    background: var(--bg-light);
    font-family: inherit;
}

.form-input-enhanced:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-label-enhanced {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

/* ============================================
   Enhanced Info Boxes
   ============================================ */
.info-box-enhanced {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.info-box-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.info-box-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-left-width: 6px;
}

.info-box-number-enhanced {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 8px 0;
}

.info-box-text-enhanced {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Enhanced Status Badges
   ============================================ */
.status-badge-enhanced {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge-enhanced i {
    font-size: 10px;
}

.status-deliverable-enhanced {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-not-deliverable-enhanced {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-pending-enhanced {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-error-enhanced {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ============================================
   Enhanced Tables
   ============================================ */
.table-enhanced {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-enhanced thead th {
    background: var(--bg-light);
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 16px;
    border-bottom: 2px solid var(--border-color);
}

.table-enhanced tbody tr {
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

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

.table-enhanced tbody tr:hover {
    background: var(--bg-light);
    transform: scale(1.01);
}

.table-enhanced tbody td {
    padding: 16px;
    color: var(--text-secondary);
}

/* ============================================
   Enhanced Progress Bars
   ============================================ */
.progress-enhanced {
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-light);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-bar-enhanced {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: white;
    background: var(--primary-gradient);
    transition: width var(--transition-base);
    position: relative;
    overflow: hidden;
}

.progress-bar-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   Enhanced Alerts
   ============================================ */
.alert-enhanced {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.3s ease;
}

.alert-enhanced i {
    font-size: 20px;
}

.alert-success-enhanced {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #059669;
}

.alert-warning-enhanced {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #d97706;
}

.alert-error-enhanced {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #dc2626;
}

.alert-info-enhanced {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    color: #4c51bf;
}

/* ============================================
   Enhanced Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease;
}

.scale-in {
    animation: scaleIn 0.6s ease;
}

/* ============================================
   Enhanced Loading States
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Enhanced Responsive Utilities
   ============================================ */
@media (max-width: 768px) {
    .card-enhanced {
        padding: 24px;
    }
    
    .btn-enhanced {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .info-box-enhanced {
        padding: 20px;
    }
    
    .info-box-number-enhanced {
        font-size: 28px;
    }
}

/* ============================================
   Enhanced Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gradient);
}

/* ============================================
   Enhanced Focus States
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ============================================
   Enhanced Selection
   ============================================ */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

