/**
 * Croesus Common CSS
 * Shared styles across all web UI pages
 * "Enrich Everything" - IP Intelligence Platform
 */

/* ============================================================================
   CSS Variables & Root Styles
   ============================================================================ */

:root {
    /* Attic Red-Figure Pottery Palette */
    --primary: #D2691E;           /* Warm terracotta/ochre */
    --primary-dark: #8B4513;       /* Dark brown (Saddle Brown) */
    --primary-light: #E8956D;      /* Light ochre/rust */
    --primary-accent: #F5A962;     /* Bright ochre accent */
    --text-dark: #1a202c;
    --text-light: #718096;
    --text-muted: #a0aec0;
    --border-light: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-lighter: #edf2f7;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.2);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
}

/* ============================================================================
   CSS Reset & Base
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #0F0E0E 0%, #1A1410 35%, #3D2817 70%, #2B1810 100%);
    min-height: 100vh;
    padding: 10px;
    color: var(--text-dark);
    line-height: 1.5;
    font-weight: 400;
}

/* ============================================================================
   Greek Key (Meander) Pattern - Legacy Decorative Borders
   ============================================================================ */

.greek-border {
    position: relative;
}

.greek-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: 
        linear-gradient(90deg, transparent 0px, transparent 4px, var(--primary-light) 4px, var(--primary-light) 8px, transparent 8px, transparent 12px, var(--primary-light) 12px, var(--primary-light) 16px) repeat-x,
        linear-gradient(0deg, transparent 0px, transparent 4px, var(--primary-light) 4px, var(--primary-light) 8px) repeat-x;
    background-size: 16px 6px;
    opacity: 0.7;
}

.greek-border::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: 
        linear-gradient(90deg, transparent 0px, transparent 4px, var(--primary-light) 4px, var(--primary-light) 8px, transparent 8px, transparent 12px, var(--primary-light) 12px, var(--primary-light) 16px) repeat-x,
        linear-gradient(0deg, transparent 0px, transparent 4px, var(--primary-light) 4px, var(--primary-light) 8px) repeat-x;
    background-size: 16px 6px;
    opacity: 0.7;
}

/* Simple Greek key border using box-shadow technique */
.greek-key-border {
    border-top: 3px solid var(--primary-light);
    border-bottom: 3px solid var(--primary-light);
    position: relative;
}

.greek-key-border::before,
.greek-key-border::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--primary-light),
        var(--primary-light) 6px,
        transparent 6px,
        transparent 12px
    );
}

.greek-key-border::before {
    top: 3px;
}

.greek-key-border::after {
    bottom: 3px;
}

/* Croesus Logo Container */
.croesus-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin: 0 auto 25px;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
}

.croesus-logo:hover {
    transform: scale(1.05);
}

.croesus-logo-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    box-shadow: var(--shadow-md);
    object-fit: cover;
    transition: transform var(--transition);
}

.croesus-logo-small:hover {
    transform: scale(1.08);
}

/* ============================================================================
   Layout Components
   ============================================================================ */

.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.content {
    padding: 25px 30px;
}

/* ============================================================================
   Header
   ============================================================================ */

.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-accent), transparent);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-accent), transparent);
}

.header h1 {
    font-size: 2em;
    margin-bottom: 8px;
    text-shadow: none;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.header p {
    font-size: 0.95em;
    opacity: 0.95;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.header .tagline {
    font-style: normal;
    color: var(--primary-accent);
    font-size: 0.95em;
    margin-top: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Provider-specific header colors */
.header.aws {
    background: linear-gradient(135deg, #FF9900 0%, #EC7211 100%);
}

.header.azure {
    background: linear-gradient(135deg, #0078D4 0%, #0063B1 100%);
}

.header.ipam {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* ============================================================================
   User Info Bar & Navigation (Unified)
   ============================================================================ */

.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-bottom: 2px solid var(--primary-light);
    font-size: 0.85em;
    box-shadow: var(--shadow-sm);
    gap: 20px;
    flex-wrap: wrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9em;
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95em;
    letter-spacing: 0.3px;
}

.user-role {
    font-size: 0.8em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.role-badge.admin {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: #ffffff;
}

.role-badge.senior_analyst {
    background: linear-gradient(135deg, #63b3ed 0%, #4299e1 100%);
    color: #ffffff;
}

.role-badge.analyst {
    background: linear-gradient(135deg, #68d391 0%, #48bb78 100%);
    color: #ffffff;
}

.role-badge.viewer {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    color: #ffffff;
}

.logout-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    padding: 10px 18px;
    border-radius: 8px;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.logout-button:hover {
    background: rgba(218, 165, 32, 0.15);
    border-color: var(--primary-light);
    color: var(--primary-accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.logout-button:active {
    transform: translateY(0);
}

/* ============================================================================
   Navigation - Integrated with User Bar
   ============================================================================ */

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all var(--transition-fast);
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 0.2px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav a:hover {
    background: rgba(218, 165, 32, 0.15);
    color: var(--primary-accent);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.nav a.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
    border-color: var(--primary-accent);
}

/* Provider-specific active nav colors */
.nav a.active.aws {
    background: linear-gradient(135deg, #FF9900 0%, #FFB84D 100%);
}

.nav a.active.azure {
    background: linear-gradient(135deg, #0078D4 0%, #2B9FE8 100%);
}

.nav a.active.ipam {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.nav a.home-icon {
    font-size: 1em;
    padding: 8px 14px;
    line-height: 1;
}

.nav a.home-icon:hover {
    background: rgba(218, 165, 32, 0.2);
    color: var(--primary-accent);
    border-color: var(--primary-light);
}

/* ============================================================================
   Controls (Search, Filters)
   ============================================================================ */

/* ============================================================================
   Search Controls Bar
   ============================================================================ */

.controls {
    padding: 20px 30px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.controls input[type="text"] {
    flex: 1 1 200px;
    min-width: 180px;
    padding: 10px 14px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all var(--transition-fast);
    background: white;
    color: var(--text-dark);
}

.controls select {
    flex: 0 1 auto;
    min-width: 130px;
    max-width: 180px;
    padding: 10px 14px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all var(--transition-fast);
    background: white;
    color: var(--text-dark);
    cursor: pointer;
}

.controls button {
    flex: 0 0 auto;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
    background: var(--primary);
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.controls input:hover {
    border-color: var(--primary-light);
}

.controls input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.08);
    background: white;
}

.controls select:hover {
    border-color: var(--primary-light);
}

.controls select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.08);
}

.controls button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.controls button:active {
    transform: translateY(0);
}

/* Version selector dropdown styling */
.controls .version-selector {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 700;
    border: 2px solid var(--primary-light);
}

.controls .version-selector:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* Provider-specific button colors */
.controls.aws button {
    background: #FF9900;
}

.controls.aws button:hover {
    background: #EC7211;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.controls.azure button {
    background: #0078D4;
}

.controls.azure button:hover {
    background: #0063B1;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.controls.ipam button {
    background: #11998e;
}

.controls.ipam button:hover {
    background: #0d7a6f;
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

/* Responsive controls for smaller screens */
@media (max-width: 768px) {
    .controls {
        gap: 10px;
    }
    
    .controls input[type="text"] {
        flex: 1 1 100%;
        min-width: 100%;
        max-width: 100%;
    }
    
    .controls select {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 5px);
    }
}

/* ============================================================================
   Statistics Bar
   ============================================================================ */

.stats {
    padding: 15px 30px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f4ff 100%);
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-light);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8em;
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.5em;
    color: var(--primary);
    font-weight: 700;
    margin-top: 5px;
    letter-spacing: -0.5px;
}

/* ============================================================================
   Tables
   ============================================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, #495057 0%, #2d3748 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 0.8px;
    vertical-align: middle;
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9em;
    line-height: 1.4;
}

tbody tr:hover {
    background: var(--bg-lighter);
}

/* ============================================================================
   Pagination
   ============================================================================ */

.pagination {
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
    border-top: 2px solid var(--border-light);
}

.pagination button {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all var(--transition-fast);
    font-size: 0.85em;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    box-shadow: none;
}

.pagination-info {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95em;
}

/* Provider-specific pagination colors */
.pagination.aws button {
    background: #FF9900;
}

.pagination.aws button:hover:not(:disabled) {
    background: #EC7211;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.pagination.azure button {
    background: #0078D4;
}

.pagination.azure button:hover:not(:disabled) {
    background: #0063B1;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.pagination.ipam button {
    background: #11998e;
}

.pagination.ipam button:hover:not(:disabled) {
    background: #0d7a6f;
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

/* ============================================================================
   Badges
   ============================================================================ */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 700;
    background: #e0f2ff;
    color: #0056b3;
    letter-spacing: 0.2px;
    text-transform: capitalize;
}

.badge.service {
    background: #f0fdf4;
    color: #155724;
}

.badge.risk {
    background: #fef3c7;
    color: #92400e;
}

.badge.datacenter {
    background: #f3f4f6;
    color: #374151;
}

/* Provider-specific badges */
.service-badge {
    background: #fef3c7;
    color: #92400e;
}

.ods-badge {
    background: #fef3c7;
    color: #92400e;
}

.provider-badge {
    background: #f0fdf4;
    color: #155724;
}

.platform-badge {
    background: #f0fdf4;
    color: #155724;
}

/* Abuse score badges */
.badge.abuse-high {
    background: #fee2e2;
    color: #991b1b;
}

.badge.abuse-medium {
    background: #fef3c7;
    color: #92400e;
}

.badge.abuse-low {
    background: #f0fdf4;
    color: #155724;
}

/* ============================================================================
   Loading & Spinner
   ============================================================================ */

.loading {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-light);
    font-size: 1.1em;
    font-weight: 500;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
    box-shadow: var(--shadow-sm);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Provider-specific spinner colors */
.spinner.aws {
    border-top-color: #FF9900;
}

.spinner.azure {
    border-top-color: #0078D4;
}

.spinner.ipam {
    border-top-color: #11998e;
}

/* ============================================================================
   Alerts & Messages
   ============================================================================ */

.error {
    background: #fee;
    color: #c53030;
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 2px solid #fca;
    border-left: 4px solid var(--error);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.warning {
    background: #fef3c7;
    color: #92400e;
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 2px solid #fcd34d;
    border-left: 4px solid #ca8a04;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.info-box {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f4ff 100%);
    border-left: 5px solid var(--primary);
    padding: 24px;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: var(--shadow-sm);
}

.info-box h3 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.15em;
    font-weight: 700;
}

.info-box p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 10px;
    font-weight: 500;
}

/* ============================================================================
   Prominent Alerts (VPN/Tunnel Detection)
   ============================================================================ */

.prominent-alert {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 3px solid #fca5a5;
    border-left: 5px solid var(--error);
    box-shadow: 0 10px 30px rgba(245, 101, 101, 0.25);
    animation: pulse 2s ease-in-out infinite;
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(245, 101, 101, 0.25);
    }
    50% {
        box-shadow: 0 10px 40px rgba(245, 101, 101, 0.35);
    }
}

.prominent-details {
    background: rgba(255, 255, 255, 0.2);
    padding: 18px;
    border-radius: 8px;
    margin-top: 18px;
}

.prominent-details h3 {
    font-size: 1.1em;
    margin-bottom: 12px;
    color: #7f1d1d;
    font-weight: 700;
}

.prominent-details .detail-item {
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #7f1d1d;
    font-weight: 600;
}

.prominent-details .detail-label {
    font-weight: 700;
    margin-right: 10px;
}

/* ============================================================================
   Archive Mode Banner
   ============================================================================ */

.archive-mode-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 3px solid #ca8a04;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--shadow-sm);
}

.archive-mode-banner .info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #92400e;
    font-weight: 700;
    font-size: 0.95em;
    letter-spacing: 0.3px;
}

.archive-mode-banner .exit-btn {
    background: #92400e;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all var(--transition-fast);
    letter-spacing: 0.3px;
}

.archive-mode-banner .exit-btn:hover {
    background: #7c2d12;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ============================================================================
   Version Selector
   ============================================================================ */

.version-selector {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: 2px solid var(--primary-light);
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    min-width: 140px;
    max-width: 180px;
    transition: all var(--transition-fast);
    letter-spacing: 0.3px;
}

.version-selector:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #6B5310 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.version-selector option {
    background: white;
    color: var(--text-dark);
    font-weight: 600;
}

/* Provider-specific version selectors */
.version-selector.aws {
    background: linear-gradient(135deg, #FF9900 0%, #CC7A00 100%);
    border-color: #ffb84d;
}

.version-selector.aws:hover {
    background: linear-gradient(135deg, #CC7A00 0%, #b36b00 100%);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.version-selector.azure {
    background: linear-gradient(135deg, #0078D4 0%, #0063B1 100%);
    border-color: #40c4ff;
}

.version-selector.azure:hover {
    background: linear-gradient(135deg, #0063B1 0%, #005a9e 100%);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

/* ============================================================================
   Search Box (Enrichment pages)
   ============================================================================ */

.search-container {
    padding: 20px 30px;
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-light);
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    align-items: stretch;
}

.search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.95em;
    transition: all var(--transition-fast);
    background: white;
    color: var(--text-dark);
    font-weight: 500;
    min-width: 250px;
}

.search-box input:hover {
    border-color: var(--primary-light);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.08);
    background: white;
}

.search-box button {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
}

.search-box button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================================================
   Provider Checkboxes
   ============================================================================ */

.provider-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.provider-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 2px solid var(--border-light);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.provider-checkbox:hover {
    border-color: var(--primary);
    background: var(--bg-lighter);
}

.provider-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.provider-checkbox label {
    font-weight: 600;
    cursor: pointer;
    color: var(--text-dark);
    flex: 1;
}

/* ============================================================================
   Result Cards
   ============================================================================ */

.results-container {
    display: grid;
    gap: 12px;
    padding: 20px 25px;
}

.result-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.result-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.result-card h2 {
    color: var(--text-dark);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15em;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* Provider-specific result card colors */
.result-card.spur {
    border-color: #B8860B;
}

.result-card.spur h2 {
    color: #B8860B;
    border-bottom-color: #DAA520;
}

.result-card.maxmind {
    border-color: #11998e;
}

.result-card.maxmind h2 {
    color: #11998e;
    border-bottom-color: #38ef7d;
}

.result-card.aws {
    border-color: #ff9900;
}

.result-card.aws h2 {
    color: #ff9900;
    border-bottom-color: #ffb84d;
}

.result-card.azure {
    border-color: #0078d4;
}

.result-card.azure h2 {
    color: #0078d4;
    border-bottom-color: #40c4ff;
}

.result-card.abuseipdb {
    border-color: #e74c3c;
}

.result-card.abuseipdb h2 {
    color: #e74c3c;
    border-bottom-color: #e74c3c;
}

/* ============================================================================
   Info Grid (Key-Value Display)
   ============================================================================ */

.info-grid {
    display: grid;
    gap: 4px;
}

.info-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 15px;
    padding: 6px 12px;
    background: var(--bg-lighter);
    border-radius: 6px;
    border-left: 3px solid var(--primary-light);
    transition: all var(--transition-fast);
}

.info-row:hover {
    background: white;
    box-shadow: var(--shadow-sm);
}

.info-label {
    font-weight: 700;
    color: var(--primary);
    text-transform: capitalize;
    letter-spacing: 0.2px;
    font-size: 0.9em;
}

.info-value {
    color: var(--text-dark);
    word-break: break-word;
    font-weight: 500;
    font-size: 0.9em;
    line-height: 1.4;
}

/* ============================================================================
   Tabs
   ============================================================================ */

.tab-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-light);
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 700;
    transition: all var(--transition-fast);
    color: var(--text-light);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85em;
}

.tab-button:hover {
    color: var(--primary);
    border-bottom-color: var(--primary-light);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(184, 134, 11, 0.05);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* ============================================================================
   JSON Display
   ============================================================================ */

.json-container {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 24px;
    border-radius: 10px;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.json-container pre {
    margin: 0;
    white-space: pre;
    overflow-wrap: normal;
}

/* ============================================================================
   Code Elements
   ============================================================================ */

code {
    background: var(--bg-lighter);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================================
   Empty State
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 80px 40px;
    color: var(--text-light);
}

.empty-state .icon {
    font-size: 4.5em;
    margin-bottom: 24px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1.6em;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-weight: 700;
}

.empty-state p {
    font-size: 0.95em;
    color: var(--text-light);
    font-weight: 500;
}

/* ============================================================================
   Footer
   ============================================================================ */

.footer {
    text-align: center;
    padding: 28px 40px;
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 0.9em;
    border-top: 1px solid var(--border-light);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ============================================================================
   Responsive Design - Navigation Bar
   ============================================================================ */

@media (max-width: 1024px) {
    .user-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px 20px;
    }
    
    .nav {
        width: 100%;
        justify-content: flex-start;
        order: 2;
    }
    
    .user-info {
        order: 1;
    }
    
    .logout-button {
        order: 3;
        align-self: flex-end;
    }
}

@media (max-width: 768px) {
    .nav a {
        font-size: 0.85em;
        padding: 7px 10px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.85em;
    }
    
    .user-name {
        font-size: 0.9em;
    }
    
    .role-badge {
        font-size: 0.65em;
        padding: 4px 10px;
    }
}
