body { font-family: 'Segoe UI', sans-serif; background: #f4f7f6; margin: 0; padding: 0; height: 100vh; overflow: hidden; }

/* Layout */
.main-wrapper { display: flex; height: 100%; }

/* Sidebar */
.sidebar { width: 280px; background: #2c3e50; color: white; padding: 20px; display: flex; flex-direction: column; border-right: 1px solid #1a252f; }
.sidebar h3 { margin-top: 0; color: #ecf0f1; border-bottom: 1px solid #34495e; padding-bottom: 15px; }
.profile-item { background: #34495e; padding: 12px; border-radius: 6px; margin-bottom: 10px; cursor: pointer; transition: 0.2s; }
.profile-item:hover { background: #1abc9c; }
.p-email { font-weight: bold; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.p-host { font-size: 11px; color: #bdc3c7; }
.btn-secondary { margin-top: auto; background: transparent; border: 1px solid #7f8c8d; color: #bdc3c7; padding: 8px; cursor: pointer; border-radius: 4px; }
.btn-secondary:hover { border-color: white; color: white; }

/* Content */
.content-area { flex: 1; padding: 40px; overflow-y: auto; }
.container { background: white; padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); width: 100%; height: fit-content; }
#tab-compose { max-width: none; margin: 0; width: 100%; }

/* Form Elements */
input, textarea { width: 100%; padding: 10px; margin-top: 5px; border: 1px solid #dfe6e9; border-radius: 4px; box-sizing: border-box; font-family: inherit; }
label { font-size: 12px; font-weight: 600; color: #636e72; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group { margin-bottom: 15px; }
.form-row { display: flex; gap: 15px; }
hr { border: 0; border-top: 1px solid #dfe6e9; margin: 20px 0; }

.btn-primary { width: 100%; background: #0984e3; color: white; border: none; padding: 12px; font-weight: bold; border-radius: 4px; cursor: pointer; font-size: 16px; transition: 0.3s; }
.btn-primary:hover { background: #74b9ff; }
.btn-primary:disabled { background: #b2bec3; cursor: not-allowed; }

/* Progress Bar */
#progress-container { display: none; margin-top: 25px; padding-top: 15px; border-top: 1px solid #eee; }
#progress-bar-bg { background: #dfe6e9; height: 12px; border-radius: 6px; overflow: hidden; margin-top: 8px; }
#progress-bar-fill { background: #00b894; height: 100%; width: 0%; transition: width 0.3s ease; }
#status-text { font-size: 14px; color: #2d3436; text-align: center; }
/* Navigation */
.nav-menu { margin-bottom: 30px; }
.nav-btn { width: 100%; background: transparent; border: none; color: #bdc3c7; padding: 12px; text-align: left; cursor: pointer; border-radius: 4px; margin-bottom: 5px; transition: 0.2s; }
.nav-btn:hover, .nav-btn.active { background: #1abc9c; color: white; }
.nav-btn i { margin-right: 8px; width: 16px; }

/* Dashboard */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.btn-download { background: #27ae60; color: white; padding: 8px 15px; text-decoration: none; border-radius: 4px; font-size: 14px; }
.btn-download:hover { background: #2ecc71; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { background: #f8f9fa; padding: 20px; border-radius: 8px; text-align: center; border-left: 4px solid #3498db; }
.stat-card h3 { margin: 0 0 10px 0; font-size: 14px; color: #7f8c8d; text-transform: uppercase; }
.stat-card p { margin: 0; font-size: 28px; font-weight: bold; color: #2c3e50; }
.dashboard-actions { text-align: center; }

/* Utility */
.fade-in { animation: fadeIn 0.3s ease-in; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* Tracking Table */
.tracking-section { margin-top: 30px; }
.tracking-section h3 { color: #2c3e50; margin-bottom: 15px; border-bottom: 2px solid #3498db; padding-bottom: 8px; }
.table-container { max-height: 400px; overflow-y: auto; border: 1px solid #dfe6e9; border-radius: 6px; }
#tracking-table { width: 100%; border-collapse: collapse; font-size: 13px; }
#tracking-table th { background: #34495e; color: white; padding: 12px 8px; text-align: left; position: sticky; top: 0; z-index: 10; }
#tracking-table td { padding: 10px 8px; border-bottom: 1px solid #ecf0f1; }
#tracking-table tbody tr:hover { background: #f8f9fa; }
.status-sent { color: #7f8c8d; }
.status-opened { color: #2980b9; font-weight: bold; }
.status-clicked { color: #27ae60; font-weight: bold; }
.loading { text-align: center; color: #7f8c8d; font-style: italic; }
.tracking-id { font-family: monospace; font-size: 11px; color: #6c757d; }
.recipient-email { font-weight: 500; }
.timestamp { font-size: 11px; color: #6c757d; }
.auto-refresh-active { background: #27ae60 !important; color: white !important; }
/* Dashboard Actions */
.dashboard-actions { display: flex; align-items: center; gap: 15px; justify-content: center; margin-bottom: 20px; }
.last-updated { font-size: 12px; color: #6c757d; font-style: italic; }
/* Authentication Styles */
.user-info { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-top: 10px; 
    padding-top: 10px; 
    border-top: 1px solid #34495e; 
    font-size: 14px; 
    color: #bdc3c7; 
}
.logout-btn { 
    color: #e74c3c; 
    text-decoration: none; 
    padding: 5px; 
    border-radius: 3px; 
    transition: 0.2s; 
}
.logout-btn:hover { 
    background: #e74c3c; 
    color: white; 
}
/* Profile & Admin Styles */
.profile-section { 
    background: #f8f9fa; 
    padding: 25px; 
    border-radius: 8px; 
    margin-bottom: 25px; 
    border-left: 4px solid #3498db; 
}
.profile-section h3 { 
    margin-top: 0; 
    color: #2c3e50; 
    border-bottom: 1px solid #ddd; 
    padding-bottom: 10px; 
}
.mfa-enabled, .mfa-disabled { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.mfa-disabled a { 
    margin-left: auto; 
}
.btn-danger { 
    background: #e74c3c; 
    color: white; 
    padding: 10px 20px; 
    text-decoration: none; 
    border-radius: 6px; 
    display: inline-block; 
}
.btn-danger:hover { 
    background: #c0392b; 
}
.admin-actions { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 30px; 
}
.admin-actions a { 
    padding: 12px 20px; 
    text-decoration: none; 
    border-radius: 6px; 
    display: inline-block; 
}
.admin-info { 
    background: #e8f4fd; 
    padding: 20px; 
    border-radius: 8px; 
    border-left: 4px solid #3498db; 
}
.user-role { 
    font-size: 11px; 
    background: #3498db; 
    color: white; 
    padding: 2px 6px; 
    border-radius: 3px; 
    margin-left: 5px; 
}
.alert { 
    padding: 12px; 
    border-radius: 6px; 
    margin-bottom: 20px; 
}
.alert-success { 
    background: #d4edda; 
    color: #155724; 
    border: 1px solid #c3e6cb; 
}
/* Full Width Compose Form */
#tab-compose .form-row { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 20px; 
}
#tab-compose .form-group.highlight-box,
#tab-compose .form-group:has(textarea),
#tab-compose .form-group:has(input[type="file"]) { 
    grid-column: 1 / -1; 
}
#tab-compose .container { 
    max-width: none; 
}
@media (max-width: 768px) {
    #tab-compose .form-row { 
        grid-template-columns: 1fr; 
    }
}
/* Campaign Dashboard Styles */
.campaigns-container { 
    margin-top: 20px; 
}
.campaigns-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 20px; 
    margin-top: 15px; 
}
.campaign-card { 
    background: #f8f9fa; 
    border: 1px solid #dee2e6; 
    border-radius: 8px; 
    padding: 20px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    border-left: 4px solid #3498db; 
}
.campaign-card:hover { 
    background: #e9ecef; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}
.campaign-name { 
    font-size: 18px; 
    font-weight: 600; 
    color: #2c3e50; 
    margin-bottom: 15px; 
    border-bottom: 1px solid #dee2e6; 
    padding-bottom: 10px; 
}
.campaign-stats { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
}
.stat-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 5px 0; 
}
.stat-label { 
    font-size: 13px; 
    color: #6c757d; 
    font-weight: 500; 
}
.stat-value { 
    font-size: 14px; 
    font-weight: 600; 
    color: #2c3e50; 
}
.campaign-details-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
    padding-bottom: 15px; 
    border-bottom: 2px solid #3498db; 
}
.no-campaigns { 
    text-align: center; 
    padding: 40px; 
    color: #6c757d; 
    font-style: italic; 
}
@media (max-width: 768px) {
    .campaigns-grid { 
        grid-template-columns: 1fr; 
    }
    .campaign-details-header { 
        flex-direction: column; 
        gap: 10px; 
        align-items: flex-start; 
    }
}
/* Pagination Controls */
.campaigns-pagination {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dfe6e9;
}

.pagination-controls-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-btn {
    background: #0984e3;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
    min-width: 40px;
}

.pagination-btn:hover {
    background: #74b9ff;
}

.pagination-btn.active {
    background: #00b894;
    font-weight: bold;
}

.pagination-btn:disabled {
    background: #b2bec3;
    cursor: not-allowed;
}

.pagination-dots {
    color: #636e72;
    padding: 0 8px;
    font-weight: bold;
}

.pagination-info {
    font-size: 14px;
    color: #636e72;
    font-weight: 500;
}
/* Message Controls */
.message-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    gap: 10px;
}

.tracking-link-controls {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-insert-link {
    background: #0984e3;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-insert-link:hover {
    background: #74b9ff;
}

.btn-insert-link i {
    font-size: 11px;
}

.btn-preview {
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}

.btn-preview:hover {
    background: #a29bfe;
}

.btn-preview.active {
    background: #fd79a8;
}

/* Help Icon */
.help-icon {
    cursor: help;
    color: #3498db;
    font-size: 14px;
    margin-left: 5px;
}

/* Placeholder Info */
.placeholder-info {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.placeholder-info i {
    font-size: 14px;
}

/* Textarea with placeholders */
#message.has-placeholders {
    background: linear-gradient(to right, #f8f9fa 0%, #fff 100%);
}

/* Preview Placeholder Styling */
.preview-placeholder {
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px dashed #ffc107;
    color: #856404;
    font-weight: 500;
    display: inline-block;
    margin: 0 2px;
}

.preview-placeholder code {
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 11px;
}

/* HTML Preview */
.html-preview {
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
    background: #f8f9fa;
    min-height: 100px;
}

.preview-content {
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Attachments */
.attachment-list {
    margin-top: 10px;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f2f6;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 14px;
}

.attachment-name {
    flex: 1;
    color: #2d3436;
}

.attachment-size {
    color: #636e72;
    font-size: 12px;
    margin-right: 10px;
}

.attachment-remove {
    background: #d63031;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.attachment-remove:hover {
    background: #e17055;
}

/* Form adjustments */
#message {
    transition: all 0.3s ease;
}

#message.preview-mode {
    display: none;
}
/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dfe6e9;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #0984e3;
    box-shadow: 0 0 0 2px rgba(9, 132, 227, 0.1);
}

.search-clear {
    background: #d63031;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}

.search-clear:hover {
    background: #e17055;
}

/* Search Results */
.search-results-info {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #e8f4fd;
    border: 1px solid #74b9ff;
    border-radius: 4px;
    color: #0984e3;
    font-size: 14px;
}

.no-search-results {
    text-align: center;
    padding: 40px;
    color: #636e72;
    font-style: italic;
}

/* Highlight search matches */
.search-highlight {
    background-color: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: bold;
}
/* Odometer/Speedometer Style Counter */
.odometer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    margin: 10px 0;
}

.odometer {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 16px;
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.1),
        0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.odometer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shine 2s infinite;
}

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

.odometer-digit {
    display: inline-block;
    position: relative;
    width: 20px;
    height: 40px;
    overflow: hidden;
    margin: 0 1px;
}

.digit-roller {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    line-height: 40px;
}

.digit-roller.rolling {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Counter Animation Effects */
.counter-animating {
    transform: scale(1.02);
    transition: transform 0.3s ease;
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.1),
        0 4px 16px rgba(9, 132, 227, 0.3);
}

.stat-card .odometer {
    transition: all 0.3s ease;
    font-variant-numeric: tabular-nums;
}

/* Pulse effect during animation */
@keyframes odometerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

.counter-animating {
    animation: odometerPulse 0.6s ease-in-out;
}
