.message-preview {
    max-height: 1.2em;
    overflow: hidden;
}

.message-row:hover {
    cursor: pointer;
}

.message-actions .badge {
    font-size: 0.7em;
}

/* Email Container Layout */
.email-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
}

.email-header {
  flex-shrink: 0;
}

.email-attachments {
  flex-shrink: 0;
}

/* Email Body Styles - Fixed Scrolling */
.email-body-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  overflow: hidden;
  position: relative;
}

.email-body {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto !important;
  height: auto !important;
  padding: 15px;
  -webkit-overflow-scrolling: touch;
}

.email-body img {
  max-width: 100%;
  height: auto;
}

.email-body table {
  max-width: 100%;
}

/* Attachment Styles */
.attachment-card {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 4px;
  transition: box-shadow 0.2s;
}

.attachment-card:hover {
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Modal Integration Styles */
.modal-dialog.modal-fullscreen #fullMessage {
  padding: 0;
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  overflow: hidden;
}

.modal-dialog.modal-fullscreen .email-container {
  height: 100%;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .email-body-container {
    min-height: 200px;
  }
}

/* Domain Management Styles */
.domain-card {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    transition: all 0.3s ease;
}

.domain-card:hover {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transform: translateY(-2px);
}

.domain-metrics .metric {
    padding: 0.5rem 0;
}

.domain-metrics .metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.domain-metrics .metric-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dns-status {
    padding: 0.75rem;
    background-color: #f8f9fc;
    border-radius: 0.25rem;
}

.dns-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.dns-indicator.bg-success {
    background-color: #1cc88a !important;
}

.dns-indicator.bg-danger {
    background-color: #e74a3b !important;
}

.dns-indicator.bg-warning {
    background-color: #f6c23e !important;
}

.dns-indicator.bg-secondary {
    background-color: #858796 !important;
}

/* Domain verification styles */
.verification-token-input {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: #f8f9fa;
}

/* Modal improvements for domain forms */
.modal-lg .modal-dialog {
    max-width: 600px;
}

/* Domain status badges */
.badge.bg-success {
    background-color: #1cc88a !important;
}

.badge.bg-warning {
    background-color: #f6c23e !important;
    color: #5a5c69 !important;
}

.badge.bg-danger {
    background-color: #e74a3b !important;
}

/* Button group spacing */
.btn-group .btn {
    margin-left: 0.125rem;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

/* Alert styling for domain verification */
.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .domain-card .card-footer .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .domain-card .btn-group {
        justify-content: center;
        width: 100%;
    }
    
    .dns-status .row {
        text-align: center;
    }
    
    .dns-status .col-6 {
        margin-bottom: 0.5rem;
    }
}

/* Copy button animation */
.btn-outline-secondary:active {
    transform: scale(0.95);
}

/* Domain list empty state */
.text-center i[data-feather] {
    stroke: #6c757d;
    stroke-width: 1;
}

/* Loading spinner in verification */
.alert-progress .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* DNS record display improvements */
.form-control-plaintext {
    background-color: #f8f9fa;
    border: 1px solid #e3e6f0;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Add these styles to your custom.css file */

/* Outline badge styles for better readability */
.badge.outline-badge {
    background-color: transparent !important;
    border: 1px solid;
    color: inherit;
}

.badge.outline-badge.bg-success {
    border-color: #6bcac2;
    color: #6bcac2 !important;
    background-color: rgba(107, 202, 194, 0.1) !important;
}

.badge.outline-badge.bg-info {
    border-color: #9C6EFC;
    color: #9C6EFC !important;
    background-color: rgba(156, 110, 252, 0.1) !important;
}

.badge.outline-badge.bg-warning {
    border-color: #ffaf0f;
    color: #ffaf0f !important;
    background-color: rgba(255, 175, 15, 0.1) !important;
}

.badge.outline-badge.bg-danger {
    border-color: #f75d6f;
    color: #f75d6f !important;
    background-color: rgba(247, 93, 111, 0.1) !important;
}

.badge.outline-badge.bg-secondary {
    border-color: #E4E6EF;
    color: #7e8299 !important;
    background-color: rgba(228, 230, 239, 0.1) !important;
}

/* Domain card layout fixes */
.mail-author-info {
    width: 100%;
}

.mail-author-info .mail-author-name {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.mail-author-info .mail-author-address {
    display: block;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Existing styles... */
.message-preview {
    max-height: 1.2em;
    overflow: hidden;
}

.message-row:hover {
    cursor: pointer;
}

.message-actions .badge {
    font-size: 0.7em;
}

/* Email Container Layout */
.email-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
}

.email-header {
  flex-shrink: 0;
}

.email-attachments {
  flex-shrink: 0;
}

/* Email Body Styles - Fixed Scrolling */
.email-body-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  overflow: hidden;
  position: relative;
}

.email-body {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto !important;
  height: auto !important;
  padding: 15px;
  -webkit-overflow-scrolling: touch;
}

.email-body img {
  max-width: 100%;
  height: auto;
}

.email-body table {
  max-width: 100%;
}

/* Attachment Styles */
.attachment-card {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 4px;
  transition: box-shadow 0.2s;
}

.attachment-card:hover {
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Modal Integration Styles */
.modal-dialog.modal-fullscreen #fullMessage {
  padding: 0;
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  overflow: hidden;
}

.modal-dialog.modal-fullscreen .email-container {
  height: 100%;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .email-body-container {
    min-height: 200px;
  }
}

/* Domain Management Styles */
.domain-card {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    transition: all 0.3s ease;
}

.domain-card:hover {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0,15);
    transform: translateY(-2px);
}

.domain-metrics .metric {
    padding: 0.5rem 0;
}

.domain-metrics .metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.domain-metrics .metric-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dns-status {
    padding: 0.75rem;
    background-color: #f8f9fc;
    border-radius: 0.25rem;
}

.dns-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.dns-indicator.bg-success {
    background-color: #1cc88a !important;
}

.dns-indicator.bg-danger {
    background-color: #e74a3b !important;
}

.dns-indicator.bg-warning {
    background-color: #f6c23e !important;
}

.dns-indicator.bg-secondary {
    background-color: #858796 !important;
}

/* Blacklist Warning Styles */
.blacklist-warning {
    background-color: #ffeaea;
    border-left: 4px solid #e74a3b;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 0.875rem;
}

.blacklist-warning .blacklist-icon {
    color: #e74a3b;
    margin-right: 6px;
    vertical-align: middle;
}

.blacklist-warning .blacklist-text {
    color: #e74a3b;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.blacklist-warning .blacklist-help {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Blacklist Details in Modal */
.blacklist-details {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
}

.blacklist-details .blacklist-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.blacklist-details .blacklist-links {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.blacklist-details .blacklist-links a {
    font-size: 0.875rem;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.blacklist-details .blacklist-links a:hover {
    text-decoration: none;
    background-color: rgba(0,123,255,0.1);
}

.blacklist-ip {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Domain verification styles */
.verification-token-input {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: #f8f9fa;
}

/* Modal improvements for domain forms */
.modal-lg .modal-dialog {
    max-width: 600px;
}

/* Domain status badges */
.badge.bg-success {
    background-color: #1cc88a !important;
}

.badge.bg-warning {
    background-color: #f6c23e !important;
    color: #5a5c69 !important;
}

.badge.bg-danger {
    background-color: #e74a3b !important;
}

/* Button group spacing */
.btn-group .btn {
    margin-left: 0.125rem;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

/* Alert styling for domain verification */
.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .domain-card .card-footer .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .domain-card .btn-group {
        justify-content: center;
        width: 100%;
    }
    
    .dns-status .row {
        text-align: center;
    }
    
    .dns-status .col-6 {
        margin-bottom: 0.5rem;
    }
    
    .blacklist-warning {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    
    .blacklist-details .blacklist-links {
        flex-direction: column;
        gap: 6px;
    }
}

/* Copy button animation */
.btn-outline-secondary:active {
    transform: scale(0.95);
}

/* Domain list empty state */
.text-center i[data-feather] {
    stroke: #6c757d;
    stroke-width: 1;
}

/* Loading spinner in verification */
.alert-progress .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* DNS record display improvements */
.form-control-plaintext {
    background-color: #f8f9fa;
    border: 1px solid #e3e6f0;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Outline badge styles for better readability */
.badge.outline-badge {
    background-color: transparent !important;
    border: 1px solid;
    color: inherit;
}

.badge.outline-badge.bg-success {
    border-color: #6bcac2;
    color: #6bcac2 !important;
    background-color: rgba(107, 202, 194, 0.1) !important;
}

.badge.outline-badge.bg-info {
    border-color: #9C6EFC;
    color: #9C6EFC !important;
    background-color: rgba(156, 110, 252, 0.1) !important;
}

.badge.outline-badge.bg-warning {
    border-color: #ffaf0f;
    color: #ffaf0f !important;
    background-color: rgba(255, 175, 15, 0.1) !important;
}

.badge.outline-badge.bg-danger {
    border-color: #f75d6f;
    color: #f75d6f !important;
    background-color: rgba(247, 93, 111, 0.1) !important;
}

.badge.outline-badge.bg-secondary {
    border-color: #E4E6EF;
    color: #7e8299 !important;
    background-color: rgba(228, 230, 239, 0.1) !important;
}

/* Domain card layout fixes */
.mail-author-info {
    width: 100%;
}

.mail-author-info .mail-author-name {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.mail-author-info .mail-author-address {
    display: block;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Blacklist alert animations */
.blacklist-warning {
    animation: slideInFromLeft 0.3s ease-out;
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-10px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Blacklist status indicators */
.blacklist-status-clean {
    color: #28a745;
    font-weight: 500;
}

.blacklist-status-listed {
    color: #dc3545;
    font-weight: 500;
}

/* Domain info modal blacklist section */
.domain-blacklist-section {
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.domain-blacklist-section.clean {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.domain-blacklist-section.listed {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

.blacklist-match-item {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 10px;
    margin: 8px 0;
    border-left: 3px solid #dc3545;
}

.blacklist-match-name {
    font-weight: 600;
    color: #721c24;
    margin-bottom: 4px;
}

.blacklist-match-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.blacklist-match-actions a {
    font-size: 0.875rem;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.blacklist-match-actions a.check-status {
    background-color: #007bff;
    color: white;
}

.blacklist-match-actions a.removal-help {
    background-color: #17a2b8;
    color: white;
}

.blacklist-match-actions a:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Last checked timestamp styling */
.blacklist-last-check {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 8px;
}


/* Page Management Styles - similar to domain management */
.page-card {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    transition: all 0.3s ease;
}

.page-card:hover {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transform: translateY(-2px);
}

.page-metrics .metric {
    padding: 0.5rem 0;
}

.page-metrics .metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-metrics .metric-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-status {
    padding: 0.75rem;
    background-color: #f8f9fc;
    border-radius: 0.25rem;
}

.page-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.page-indicator.bg-success {
    background-color: #1cc88a !important;
}

.page-indicator.bg-danger {
    background-color: #e74a3b !important;
}

.page-indicator.bg-warning {
    background-color: #f6c23e !important;
}

.page-indicator.bg-secondary {
    background-color: #858796 !important;
}

/* Page blacklist warning styles */
.page-blacklist-warning {
    background-color: #ffeaea;
    border-left: 4px solid #e74a3b;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 0.875rem;
}

.page-blacklist-warning .blacklist-icon {
    color: #e74a3b;
    margin-right: 6px;
    vertical-align: middle;
}

.page-blacklist-warning .blacklist-text {
    color: #e74a3b;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.page-blacklist-warning .blacklist-help {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Page verification styles */
.page-verification-input {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: #f8f9fa;
}

/* Performance score badges for pages */
.performance-badge {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.performance-excellent {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.performance-good {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.performance-fair {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.performance-poor {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Page status indicators */
.page-status-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.page-status-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #f8f9fa;
}

.page-status-indicator.status-ok {
    background-color: #d4edda;
    color: #155724;
}

.page-status-indicator.status-warning {
    background-color: #fff3cd;
    color: #856404;
}

.page-status-indicator.status-error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Speed indicator styles */
.speed-fast {
    color: #28a745;
}

.speed-average {
    color: #ffc107;
}

.speed-slow {
    color: #dc3545;
}

/* SSL status styles */
.ssl-ok {
    color: #28a745;
}

.ssl-warning {
    color: #ffc107;
}

.ssl-error {
    color: #dc3545;
}

/* HTTP status styles */
.http-200 {
    color: #28a745;
}

.http-300 {
    color: #ffc107;
}

.http-400,
.http-500 {
    color: #dc3545;
}

/* Page URL display in cards */
.page-url-display {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 2px;
    word-break: break-all;
}

/* Responsive adjustments for page cards */
@media (max-width: 768px) {
    .page-card .card-footer .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-card .btn-group {
        justify-content: center;
        width: 100%;
    }
    
    .page-status .row {
        text-align: center;
    }
    
    .page-status .col-6 {
        margin-bottom: 0.5rem;
    }
    
    .page-blacklist-warning {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    
    .page-status-indicators {
        justify-content: center;
    }
}

/* Page verification modal styles */
.page-verification-modal .meta-tag-display {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    word-break: break-all;
}

/* Page information modal styles */
.page-info-section {
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.page-info-section.performance-good {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.page-info-section.performance-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.page-info-section.performance-poor {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

/* Animation for page status changes */
.page-status-change {
    animation: fadeInOut 0.5s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* Animation for page status changes */
.page-status-change {
    animation: fadeInOut 0.5s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* Message Analysis Styles */
.message-card {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    transition: all 0.3s ease;
}

.message-card:hover {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transform: translateY(-2px);
}

.message-metrics .metric {
    padding: 0.5rem 0;
}

.message-metrics .metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.message-metrics .metric-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-scores {
    padding: 0.75rem;
    background-color: #f8f9fc;
    border-radius: 0.25rem;
}

.score-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.score-indicator.bg-success {
    background-color: #1cc88a !important;
}

.score-indicator.bg-danger {
    background-color: #e74a3b !important;
}

.score-indicator.bg-warning {
    background-color: #f6c23e !important;
}

.score-indicator.bg-secondary {
    background-color: #858796 !important;
}

.score-indicator.bg-info {
    background-color: #36b9cc !important;
}

/* Final score badge styles */
.final-score-badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    min-width: 60px;
    text-align: center;
}

.final-score-excellent {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.final-score-good {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.final-score-fair {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.final-score-poor {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.final-score-unknown {
    background-color: #e2e3e5;
    color: #6c757d;
    border: 1px solid #d6d8db;
}

/* Message subject and from styling */
.message-subject {
    font-weight: 500;
    color: #495057;
    display: block;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-from {
    color: #6c757d;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-date {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Score breakdown in message cards */
.score-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.score-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #f8f9fa;
    white-space: nowrap;
}

.score-item.score-excellent {
    background-color: #d4edda;
    color: #155724;
}

.score-item.score-good {
    background-color: #d1ecf1;
    color: #0c5460;
}

.score-item.score-fair {
    background-color: #fff3cd;
    color: #856404;
}

.score-item.score-poor {
    background-color: #f8d7da;
    color: #721c24;
}

.score-item.score-unknown {
    background-color: #e2e3e5;
    color: #6c757d;
}

/* Message folder indicator */
.folder-indicator {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.folder-inbox {
    background-color: #e3f2fd;
    color: #1976d2;
}

.folder-spam {
    background-color: #ffebee;
    color: #d32f2f;
}

.folder-sent {
    background-color: #e8f5e8;
    color: #388e3c;
}

.folder-trash {
    background-color: #fafafa;
    color: #616161;
}

/* AI Analysis display in modal */
.ai-analysis-section {
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    border-left: 4px solid #007bff;
    background-color: #f8f9fc;
}

.ai-analysis-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.ai-analysis-title .score-badge {
    margin-left: 8px;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
}

.ai-advice-list {
    list-style: none;
    padding-left: 0;
    margin-top: 8px;
}

.ai-advice-list li {
    padding: 4px 0;
    border-left: 2px solid #dee2e6;
    padding-left: 8px;
    margin-bottom: 4px;
}

.ai-advice-list li:before {
    content: "💡";
    margin-right: 6px;
}

/* Message links section */
.message-links-section {
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    background-color: #f8f9fa;
}

.link-item {
    padding: 8px;
    margin: 4px 0;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-item.blacklisted {
    border-left: 4px solid #dc3545;
    background-color: #f8d7da;
}

.link-item.safe {
    border-left: 4px solid #28a745;
}

.link-url {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

.link-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.link-status.safe {
    background-color: #d4edda;
    color: #155724;
}

.link-status.warning {
    background-color: #fced79;
    color: #f2ba02;
}

.link-status.blacklisted {
    background-color: #f8d7da;
    color: #721c24;
}

/* Authentication details styling */
.auth-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.auth-item {
    padding: 12px;
    border-radius: 6px;
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
}

.auth-item.auth-pass {
    border-left-color: #28a745;
    background-color: #d4edda;
}

.auth-item.auth-fail {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.auth-item.auth-warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.auth-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-item-status {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Message summary stats */
.message-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f8f9fc;
    border-radius: 6px;
    margin-bottom: 16px;
}

.summary-item {
    text-align: center;
    flex: 1;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
}

.summary-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter button styling */
.filter-btn {
    position: relative;
}

.filter-btn.has-filters:after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Responsive adjustments for message cards */
@media (max-width: 768px) {
    .message-card .card-footer .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .message-card .btn-group {
        justify-content: center;
        width: 100%;
    }
    
    .score-breakdown {
        justify-content: center;
        text-align: center;
    }
    
    .score-breakdown .score-item {
        margin: 2px;
    }
    
    .message-summary {
        flex-direction: column;
        gap: 12px;
    }
    
    .summary-item {
        width: 100%;
    }
    
    .auth-details {
        grid-template-columns: 1fr;
    }
    
    .link-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .link-url {
        margin-right: 0;
        width: 100%;
    }
}

/* Loading states */
.loading-message {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Message analysis badge variations */
.analysis-complete {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.analysis-partial {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.analysis-failed {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.analysis-pending {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Score comparison styling */
.score-comparison {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.score-vs {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.score-change {
    font-size: 0.75rem;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.score-improved {
    background-color: #d4edda;
    color: #155724;
}

.score-declined {
    background-color: #f8d7da;
    color: #721c24;
}

.score-unchanged {
    background-color: #e2e3e5;
    color: #6c757d;
}

/* Tooltip enhancements */
.tooltip {
    font-size: 0.8rem;
}

.tooltip-inner {
    max-width: 300px;
    text-align: left;
    background-color: #495057;
    border-radius: 6px;
}

/* Message actions dropdown */
.message-actions {
    position: relative;
}

.message-actions .dropdown-menu {
    min-width: 160px;
}

.message-actions .dropdown-item {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.message-actions .dropdown-item:hover {
    background-color: #f8f9fa;
}

.message-actions .dropdown-item.text-danger:hover {
    background-color: #f8d7da;
    color: #721c24;
}

/* Chart and visualization styles for analysis */
.analysis-chart {
    height: 200px;
    margin: 16px 0;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Advanced filter styling */
.advanced-filters {
    background-color: #f8f9fc;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.filter-chip {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    border: 1px solid #bbdefb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background-color: #bbdefb;
}

.filter-chip.active {
    background-color: #1976d2;
    color: white;
}

.filter-chip .remove {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* Print styles */
@media print {
    .message-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .btn, .modal, .dropdown {
        display: none !important;
    }
    
    .message-summary {
        border: 1px solid #dee2e6;
    }
}

/* Upload area styling */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area.drag-over {
    border-color: #0d6efd;
    background-color: #f8f9ff;
}

.upload-area:hover {
    border-color: #0d6efd;
}

.upload-link {
    color: #0d6efd;
    text-decoration: underline;
    cursor: pointer;
}

.file-info {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}

/* Cleaning card enhancements */
.cleaning-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cleaning-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.empty-state {
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Progress display styles */
.progress-text {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: center;
    line-height: 1.2;
}

.processing-stats {
    font-size: 0.85rem;
}

.processing-stats .stat-item {
    margin-bottom: 0.25rem;
}

.progress-bar .progress-text {
    color: white;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Enhanced progress bar */
.progress {
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

/* Cleaning card progress enhancements */
.cleaning-card .progress {
    margin-bottom: 0.5rem;
}

.cleaning-card .progress-text {
    margin-bottom: 0.75rem;
    text-align: center;
}

/* Status-specific progress colors */
.cleaning-card .progress-bar.bg-info {
    background-color: #17a2b8 !important;
}

/* Processing status indicator */
.status-badge[data-status="processing"] {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Information modal progress styling */
.alert .progress {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.alert .progress-bar {
    font-size: 0.875rem;
    line-height: 20px;
}

/* Stat cards in information modal */
.stat-card {
    border: 1px solid #dee2e6;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}