/* Header Analyzer Custom Styles - Compact Font Style */
#header-analyzer-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

#header-analyzer-page h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

#header-analyzer-page h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

#header-analyzer-page h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

#header-analyzer-page h4 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.4;
}

#header-analyzer-page p,
#header-analyzer-page .text-sm {
    font-size: 0.875rem;
    line-height: 1.5;
    letter-spacing: -0.005em;
}

#header-analyzer-page .text-xs {
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Compact spacing for check items */
/* #detailed-checks-list .flex {
    padding: 0.875rem 1rem;
} */

#detailed-checks-list h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

#detailed-checks-list p {
    font-size: 0.8125rem;
    line-height: 1.45;
}

/* Badge styling */
#detailed-checks-list .rounded-full {
    padding: 0.125rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Spoofing risk card */
#spoofing-risk-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.375rem;
}

#spoofing-risk-card p {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Statistics */
#header-stats .text-3xl {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

#header-stats .text-sm {
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* IP Intelligence */
#ip-intelligence-card .font-mono {
    font-size: 0.875rem;
    letter-spacing: -0.01em;
}

/* Delivery Route */
#received-path .font-semibold {
    font-size: 0.875rem;
}

#received-path .text-xs {
    font-size: 0.75rem;
}

/* Warnings */
#header-warnings-list li {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Form elements */
#header-analyzer-page label {
    font-size: 0.875rem;
    font-weight: 600;
}

#header-analyzer-page textarea,
#header-analyzer-page input {
    font-size: 0.875rem;
}

/* Button */
#header-analyzer-page button {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.005em;
}

/* Reduce card padding slightly */
#header-analyzer-page .rounded-2xl {
    padding: 1.75rem;
}

@media (min-width: 768px) {
    #header-analyzer-page .rounded-2xl {
        padding: 2rem;
    }
}

/* Tighter spacing between sections */
#header-results > * + * {
    margin-top: 1rem;
}

/* ========== Enhanced Results Layout - ForensicOSINT Style ========== */

/* Main Results Container - Green Left Border */
#header-results {
    border-left: 4px solid #10b981;
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#header-results > * + * {
    margin-top: 1.5rem;
}

/* Hide original risk score card */
#header-results > .bg-white:first-child {
    display: none;
}

/* Risk Score Badge - Circular */
.risk-score-badge {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.risk-score-badge.risk-high {
    background: #ef4444;
}

.risk-score-badge.risk-medium {
    background: #f59e0b;
}

.risk-score-badge.risk-low {
    background: #10b981;
}

/* Spoofing Risk Header - With Badge */
#spoofing-risk-card {
    border: none;
    padding: 0;
    margin-bottom: 1.5rem;
    background: transparent;
    box-shadow: none;
}

#spoofing-risk-card .flex {
    align-items: flex-start;
    gap: 1rem;
}

#spoofing-risk-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #111827;
}

#spoofing-risk-card .risk-level {
    color: #10b981;
    font-weight: 600;
}

#spoofing-risk-card .risk-level.medium {
    color: #f59e0b;
}

#spoofing-risk-card .risk-level.high {
    color: #ef4444;
}

#spoofing-risk-card p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

/* Hide Statistics Bar */
#header-stats {
    display: none;
}

/* Section Navigation Tabs */
.section-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.section-nav-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
}

.section-nav-item:hover {
    color: #111827;
}

.section-nav-item.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Authentication Results - 3 Column Cards */
.auth-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-card {
    border-left: 4px solid;
    padding: 1rem;
    background: white;
    border-radius: 0.375rem;
}

.auth-card.pass {
    border-left-color: #10b981;
    background: linear-gradient(to right, #f0fdf4, #ffffff);
}

.auth-card.fail {
    border-left-color: #ef4444;
    background: linear-gradient(to right, #fef2f2, #ffffff);
}

.auth-card.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fffbeb, #ffffff);
}

.auth-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.auth-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
}

.auth-card-badge {
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

.auth-card-badge.pass {
    background: #d1fae5;
    color: #065f46;
}

.auth-card-badge.fail {
    background: #fee2e2;
    color: #991b1b;
}

.auth-card-detail {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.auth-card-detail strong {
    color: #111827;
    font-weight: 600;
}

.auth-card-detail.aligned {
    color: #10b981;
}

.auth-card-detail.not-aligned {
    color: #ef4444;
}

/* Detailed Checks - Simple List Style */
#detailed-checks-card {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

#detailed-checks-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#detailed-checks-list > div {
    padding: 0.625rem 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: none;
    transition: none;
}

#detailed-checks-list > div:last-child {
    border-bottom: none;
}

#detailed-checks-list > div:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
}

#detailed-checks-list .flex-shrink-0 {
    margin-right: 0.75rem;
}

#detailed-checks-list .check-icon {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

#detailed-checks-list .check-icon.pass {
    background: #10b981;
    color: white;
}

#detailed-checks-list .check-icon.fail {
    background: #ef4444;
    color: white;
}

#detailed-checks-list .check-icon.warning {
    background: #f59e0b;
    color: white;
}

#detailed-checks-list .check-icon.info {
    background: #3b82f6;
    color: white;
}

#detailed-checks-list h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
    color: #111827;
    line-height: 1.4;
}

#detailed-checks-list p {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6b7280;
    margin: 0;
}

#detailed-checks-list .status-badge {
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: capitalize;
}

#detailed-checks-list .status-badge.pass {
    background: #d1fae5;
    color: #065f46;
}

#detailed-checks-list .status-badge.fail {
    background: #fee2e2;
    color: #991b1b;
}

#detailed-checks-list .status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

#detailed-checks-list .status-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

/* Status Colors - More Vibrant */
.bg-green-50 { background-color: #f0fdf4 !important; }
.border-green-200 { border-color: #bbf7d0 !important; }
.bg-green-100 { background-color: #dcfce7 !important; }
.text-green-600 { color: #16a34a !important; }
.text-green-800 { color: #166534 !important; }

.bg-red-50 { background-color: #fef2f2 !important; }
.border-red-200 { border-color: #fecaca !important; }
.bg-red-100 { background-color: #fee2e2 !important; }
.text-red-600 { color: #dc2626 !important; }
.text-red-800 { color: #991b1b !important; }

.bg-yellow-50 { background-color: #fefce8 !important; }
.border-yellow-200 { border-color: #fde047 !important; }
.bg-yellow-100 { background-color: #fef9c3 !important; }
.text-yellow-600 { color: #ca8a04 !important; }
.text-yellow-800 { color: #854d0e !important; }

.bg-blue-50 { background-color: #eff6ff !important; }
.border-blue-200 { border-color: #bfdbfe !important; }
.bg-blue-100 { background-color: #dbeafe !important; }
.text-blue-600 { color: #2563eb !important; }
.text-blue-800 { color: #1e40af !important; }

/* Message Summary - Table Style */
.message-summary {
    margin: 1.5rem 0;
}

.message-summary h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-summary h3 i {
    color: #3b82f6;
}

.message-summary-table {
    display: grid;
    gap: 0.75rem;
}

.message-summary-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.message-summary-row:last-child {
    border-bottom: none;
}

.message-summary-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
}

.message-summary-value {
    font-size: 0.875rem;
    color: #111827;
    word-break: break-all;
}

.message-summary-value .warning-icon {
    color: #f59e0b;
    margin-left: 0.5rem;
}

/* Header Information Card - Table Style */
#header-info-card {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    margin: 1.5rem 0;
}

#header-info-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#header-info-card h3 i {
    color: #3b82f6;
}

.header-info-table {
    display: grid;
    gap: 0.625rem;
}

.header-info-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    align-items: start;
}

.header-info-row:last-child {
    border-bottom: none;
}

.header-info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    padding-top: 0.125rem;
}

.header-info-value {
    font-size: 0.875rem;
    color: #111827;
    word-break: break-all;
    line-height: 1.5;
}

.header-info-value .copy-icon {
    margin-left: 0.5rem;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.75rem;
}

.header-info-value .copy-icon:hover {
    color: #3b82f6;
}

.header-info-value .warning-icon {
    color: #f59e0b;
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

/* IP Intelligence Card */
#ip-intelligence-card {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    margin: 2rem 0;
}

#ip-intelligence-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #111827;
}

#ip-intelligence-card h3 i {
    color: #3b82f6;
}

.ip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ip-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.ip-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ip-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #111827;
}

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

.ip-table .ip-address {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #3b82f6;
    font-weight: 600;
}

.ip-table .scope-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
}

.ip-table .scope-badge.public {
    background: #d1fae5;
    color: #065f46;
}

/* Delivery Route Card - Email Routing Path */
#delivery-route-card {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    margin: 1.5rem 0;
}

#delivery-route-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #111827;
}

#delivery-route-card h3 i {
    color: #3b82f6;
}

.delivery-route-header {
    display: none;
}

.delivery-route-stats {
    display: none;
}

#received-path {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#received-path > div {
    padding: 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    position: relative;
    transition: all 0.2s;
}

#received-path > div:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

/* #received-path > div::before {
    content: attr(data-hop);
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 2rem;
    height: 2rem;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
} */

#received-path > div .hop-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

#received-path > div .hop-detail {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

#received-path > div .hop-detail strong {
    color: #111827;
    font-weight: 600;
    margin-right: 0.5rem;
}

#received-path > div .hop-time {
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

#received-path > div .hop-time i {
    font-size: 0.7rem;
}

#received-path .font-semibold {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

#received-path .text-xs {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Warnings Card */
#header-warnings-card {
    padding: 1.25rem 1.5rem;
    border-left: 4px solid #ef4444;
}

#header-warnings-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 0.75rem;
}

#header-warnings-list li {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #991b1b;
    padding: 0.5rem 0;
    border-bottom: 1px solid #fee2e2;
}

#header-warnings-list li:last-child {
    border-bottom: none;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    #header-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    #detailed-checks-list > div {
        padding: 0.625rem 0.875rem;
    }
    
    #header-risk-score {
        font-size: 2.5rem;
    }
}

/* Card Shadows - Subtle Depth */
#header-results .bg-white,
#header-results .rounded-2xl {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    border: 1px solid #f3f4f6;
}

/* Section Titles - Consistent Style */
#header-results h3 {
    display: flex;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

#header-results h3 i {
    font-size: 1rem;
    margin-right: 0.5rem;
    color: #667eea;
}

/* Loading State */
#header-loading {
    padding: 3rem 0;
}

#header-loading i {
    font-size: 2.5rem;
    color: #667eea;
}

#header-loading p {
    font-size: 1rem;
    color: #6b7280;
    margin-top: 1rem;
}