/**
 * GovComply - Modern SaaS Styling
 * Professional E-commerce Compliance Platform
 */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    
    --secondary-dark: #0f172a;
    --secondary-text: #475569;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;

    /* Statutory Status Palette */
    --status-pass-text: #065f46;
    --status-pass-bg: #ecfdf5;
    --status-pass-border: #a7f3d0;

    --status-review-text: #92400e;
    --status-review-bg: #fffbeb;
    --status-review-border: #fde68a;

    --status-not-detected-text: #475569;
    --status-not-detected-bg: #f1f5f9;
    --status-not-detected-border: #cbd5e1;

    --status-na-text: #3730a3;
    --status-na-bg: #eef2ff;
    --status-na-border: #c7d2fe;

    --status-error-text: #991b1b;
    --status-error-bg: #fef2f2;
    --status-error-border: #fecaca;

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--secondary-dark);
}

/* Brand Navbar */
.navbar-gov {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 0;
    transition: all 0.2s ease;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.brand-icon-light {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #60a5fa;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--secondary-dark);
    letter-spacing: -0.02em;
    line-height: 1;
}

.brand-badge {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.nav-link {
    font-weight: 500;
    color: #475569 !important;
    padding: 0.5rem 0.85rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background-color: var(--primary-light);
}

/* Custom Buttons */
.btn-primary-gov {
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
}

.btn-primary-gov:hover {
    background: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.btn-outline-gov {
    background: transparent;
    color: #334155;
    border: 1px solid var(--border-color);
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.65rem 1.25rem;
    transition: all 0.15s ease;
}

.btn-outline-gov:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Hero Section */
.hero-section {
    padding: 5rem 0 4.5rem;
    background: radial-gradient(circle at top right, #eff6ff 0%, #ffffff 50%, #f8fafc 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.18;
    color: var(--secondary-dark);
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--secondary-text);
    max-width: 680px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

/* Hero Input Box */
.scan-input-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 0.6rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    max-width: 680px;
    margin: 0 auto;
}

.scan-input-card .form-control {
    border: none;
    font-size: 1.05rem;
    padding: 0.75rem 1.25rem;
    box-shadow: none !important;
    background: transparent;
}

.scan-input-card .form-control:focus {
    outline: none;
}

/* Statutory Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-pass {
    background-color: var(--status-pass-bg);
    color: var(--status-pass-text);
    border: 1px solid var(--status-pass-border);
}

.badge-review {
    background-color: var(--status-review-bg);
    color: var(--status-review-text);
    border: 1px solid var(--status-review-border);
}

.badge-not-detected {
    background-color: var(--status-not-detected-bg);
    color: var(--status-not-detected-text);
    border: 1px solid var(--status-not-detected-border);
}

.badge-not-applicable {
    background-color: var(--status-na-bg);
    color: var(--status-na-text);
    border: 1px solid var(--status-na-border);
}

.badge-error {
    background-color: var(--status-error-bg);
    color: var(--status-error-text);
    border: 1px solid var(--status-error-border);
}

/* Compliance Findings Cards */
.finding-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.finding-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.finding-card-header {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    user-select: none;
}

.finding-card-header:hover {
    background-color: #f8fafc;
}

.finding-card-body {
    padding: 1.5rem;
    border-top: 1px solid #f1f5f9;
    background-color: #fafbfc;
}

.finding-field-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.finding-evidence-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-word;
}

.manual-verification-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 2px 8px;
    border-radius: 4px;
}

/* User Menu & Avatar */
.user-menu-pill {
    padding: 0.25rem 0.65rem 0.25rem 0.25rem;
    border-radius: 999px;
    background: #f1f5f9;
    transition: background 0.15s ease;
}

.user-menu-pill:hover {
    background: #e2e8f0;
}

.user-avatar {
    object-fit: cover;
}

.avatar-placeholder {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Progress Step Tracker in Scan.php */
.scan-progress-container {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    max-width: 720px;
    margin: 2rem auto;
}

.scan-step-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    position: relative;
    padding-bottom: 2rem;
}

.scan-step-item:last-child {
    padding-bottom: 0;
}

.scan-step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 36px;
    left: 17px;
    width: 2px;
    height: calc(100% - 36px);
    background: #e2e8f0;
}

.scan-step-item.completed:not(:last-child)::after {
    background: #10b981;
}

.scan-step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    z-index: 1;
    transition: all 0.3s ease;
}

.scan-step-item.completed .scan-step-icon {
    background: #10b981;
    color: #ffffff;
}

.scan-step-item.active .scan-step-icon {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px var(--primary-border);
}

/* Public Scans Table */
.recent-scans-table {
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.recent-scans-table tr {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
}

.recent-scans-table td {
    border: 1px solid var(--border-color);
    border-width: 1px 0;
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

.recent-scans-table tr td:first-child {
    border-left-width: 1px;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.recent-scans-table tr td:last-child {
    border-right-width: 1px;
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Summary Counter Cards */
.stat-summary-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-summary-num {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.stat-summary-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #64748b;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }
    .scan-input-card {
        padding: 0.5rem;
    }
    .finding-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
