/* SAM Status Checker — Design System v4 */

:root {
    /* Spacing scale (4px base) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;

    /* Colors */
    --bg-base: #050a15;
    --bg-surface: #0d1425;
    --bg-elevated: #111a2e;
    --bg-input: #0f1729;
    --bg-input-hover: #141e34;

    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-glow: rgba(59, 130, 246, 0.25);

    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.1);
    --green-border: rgba(34, 197, 94, 0.18);

    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-bg: rgba(245, 158, 11, 0.1);
    --amber-border: rgba(245, 158, 11, 0.18);

    --red-400: #f87171;
    --red-500: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --red-border: rgba(239, 68, 68, 0.18);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-faint: #475569;

    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-visible: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);
    --border-input: rgba(255, 255, 255, 0.1);
    --border-input-hover: rgba(255, 255, 255, 0.18);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
    --shadow-input: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 24px var(--blue-glow), 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border-visible);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-base);
    min-height: 100vh;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ===== SVG ICON SYSTEM ===== */
.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===== HEADER ===== */
header {
    padding: var(--space-6) 0;
    position: relative;
    z-index: 100;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.logo:hover .logo-img {
    opacity: 1;
}

/* ===== HERO ===== */
.hero {
    padding: var(--space-12) 0 var(--space-16);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Ambient glow */
.hero::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background:
        radial-gradient(ellipse 350px 250px at 40% 45%, rgba(59, 130, 246, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 300px 200px at 65% 35%, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: var(--space-5);
    position: relative;
    z-index: 1;
    color: var(--text-primary);
}

.hero .subtitle {
    color: var(--text-tertiary);
    font-size: 17px;
    font-weight: 400;
    margin-bottom: var(--space-8);
    position: relative;
    z-index: 1;
    letter-spacing: -0.1px;
}

/* ===== SEARCH FORM ===== */
.search-form {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.search-form-card {
    background: var(--bg-surface);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(59, 130, 246, 0.04);
}

.input-row {
    margin-bottom: var(--space-3);
}

.input-row input {
    width: 100%;
    padding: 12px var(--space-4);
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    outline: none;
    box-shadow: var(--shadow-input);
    transition: all var(--duration-normal) var(--ease-out);
}

.input-row input::placeholder {
    color: var(--text-faint);
}

.input-row input:hover {
    background: var(--bg-input-hover);
    border-color: var(--border-input-hover);
}

.input-row input:focus {
    border-color: var(--blue-500);
    background: var(--bg-input-hover);
    box-shadow: 0 0 0 3px var(--blue-glow), var(--shadow-input);
}

.input-row.two-col {
    display: flex;
    gap: var(--space-3);
}

.input-row.two-col input {
    flex: 1;
    min-width: 0;
}

.search-hint-top {
    font-size: 12px;
    color: var(--text-faint);
    margin-bottom: var(--space-5);
    padding-left: 2px;
}

.form-divider-label {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-5) 0 var(--space-4);
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-divider-label::before,
.form-divider-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.search-btn {
    width: 100%;
    padding: 12px var(--space-8);
    margin-top: var(--space-1);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: white;
    background: var(--blue-600);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
}

.search-btn:hover {
    background: var(--blue-500);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: none;
    background: var(--blue-700);
}

.search-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.search-hint {
    color: var(--text-faint);
    font-size: 12px;
    margin-top: var(--space-5);
    text-align: center;
}

/* ===== RESULTS SECTION ===== */
.results-section {
    padding-top: var(--space-8);
    padding-bottom: var(--space-12);
}

.loading {
    text-align: center;
    padding: var(--space-16) 0;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid var(--border-strong);
    border-top-color: var(--blue-500);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto var(--space-4);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    font-size: 13px;
    color: var(--text-faint);
}

/* Results Banner */
.results-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
    animation: fadeInUp 0.3s var(--ease-out) both;
}

.results-banner-icon {
    width: 36px;
    height: 36px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.results-banner-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--green-400);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.results-banner-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.results-banner-text strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--green-400);
}

.results-banner-text span {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Results Count (legacy) */
.results-count {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-5);
    animation: fadeIn 0.3s var(--ease-out) both;
}

/* Result Cards */
.result-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-card);
    transition: all var(--duration-normal) var(--ease-out);
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.result-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.result-card:nth-child(2) { animation-delay: 0.06s; }
.result-card:nth-child(3) { animation-delay: 0.12s; }
.result-card:nth-child(4) { animation-delay: 0.18s; }
.result-card:nth-child(5) { animation-delay: 0.24s; }

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.result-card .entity-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin-bottom: var(--space-1);
    line-height: 1.3;
}

.result-card .entity-uei {
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-active {
    background: var(--green-bg);
    color: var(--green-400);
    border: 1px solid var(--green-border);
}
.status-active::before {
    background: var(--green-500);
    box-shadow: 0 0 6px var(--green-500);
}

.status-expiring {
    background: var(--amber-bg);
    color: var(--amber-400);
    border: 1px solid var(--amber-border);
}
.status-expiring::before {
    background: var(--amber-500);
    box-shadow: 0 0 6px var(--amber-500);
}

.status-expired {
    background: var(--red-bg);
    color: var(--red-400);
    border: 1px solid var(--red-border);
}
.status-expired::before {
    background: var(--red-500);
    box-shadow: 0 0 6px var(--red-500);
}

.status-unknown {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-tertiary);
    border: 1px solid var(--border-subtle);
}
.status-unknown::before {
    background: var(--text-faint);
}

/* Report Grid */
.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-1);
}

.report-field {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.report-field:nth-child(odd) {
    padding-right: var(--space-4);
}

.report-field:nth-child(even) {
    padding-left: var(--space-4);
    border-left: 1px solid var(--border-subtle);
}

/* Remove bottom border from last row */
.report-field:nth-last-child(-n+2) {
    border-bottom: none;
}

.report-field .label {
    font-size: 10px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.report-field .value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: -0.1px;
}

/* Card CTA */
.card-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
}

.card-cta span {
    font-size: 12px;
    color: var(--text-faint);
}

.card-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-400);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--duration-fast) var(--ease-out);
}

.card-cta-link:hover {
    color: var(--blue-500);
}

.card-cta-link svg {
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--duration-fast) var(--ease-out);
}

.card-cta-link:hover svg {
    transform: translateX(2px);
}

/* ===== EMAIL GATE ===== */
.email-gate {
    background: var(--bg-surface);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    margin-top: var(--space-5);
    text-align: center;
}

.email-gate h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.email-gate p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: var(--space-5);
}

.email-form {
    display: flex;
    gap: var(--space-2);
    max-width: 400px;
    margin: 0 auto;
}

.email-form input {
    flex: 1;
    padding: 11px 14px;
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    outline: none;
    transition: all var(--duration-normal) var(--ease-out);
}

.email-form input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.email-form button {
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: white;
    background: var(--blue-600);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--duration-fast) var(--ease-out);
}

.email-form button:hover {
    background: var(--blue-500);
}

/* ===== FULL REPORT ===== */
.full-report {
    background: var(--bg-surface);
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    margin-top: var(--space-5);
    box-shadow: var(--shadow-card);
}

.full-report h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--space-4);
}

/* ===== ERROR / NOT FOUND ===== */
.error-message {
    background: var(--red-bg);
    color: var(--red-400);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-sm);
    border: 1px solid var(--red-border);
    text-align: center;
    font-size: 14px;
}

.not-found-message {
    background: var(--bg-surface);
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-md);
    padding: var(--space-16) var(--space-8);
    text-align: center;
    box-shadow: var(--shadow-card);
}

.not-found-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-5);
    color: var(--text-faint);
    display: flex;
    align-items: center;
    justify-content: center;
}

.not-found-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-faint);
    stroke-width: 1;
    fill: none;
}

.not-found-message h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.not-found-message p {
    color: var(--text-tertiary);
    font-size: 14px;
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding-bottom: var(--space-16);
}

.cta-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-xl);
    padding: var(--space-16) var(--space-8);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.cta-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--blue-400);
    margin-bottom: var(--space-4);
    position: relative;
}

.cta-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--space-4);
    letter-spacing: -0.5px;
    line-height: 1.2;
    position: relative;
}

.cta-card > p {
    color: var(--text-tertiary);
    font-size: 15px;
    margin-bottom: var(--space-8);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    position: relative;
}

.cta-button {
    display: inline-block;
    padding: 12px 28px;
    background: var(--blue-600);
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
}

.cta-button:hover {
    background: var(--blue-500);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.cta-note {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: var(--space-4);
    margin-bottom: 0;
    position: relative;
}

/* ===== TRUST BAR ===== */
.trust-bar {
    padding: var(--space-16) 0;
    border-top: 1px solid var(--border-subtle);
}

.trust-items {
    display: flex;
    justify-content: center;
    gap: var(--space-12);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-align: left;
}

.trust-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-tertiary);
}

.trust-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trust-text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.trust-text span {
    font-size: 11px;
    color: var(--text-faint);
    line-height: 1.3;
}

/* ===== FOOTER ===== */
footer {
    padding: var(--space-8) 0 var(--space-12);
    border-top: 1px solid var(--border-subtle);
}

footer p {
    font-size: 11px;
    color: var(--text-faint);
    text-align: center;
    margin-bottom: var(--space-2);
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

footer p:last-child {
    margin-bottom: 0;
    color: var(--text-faint);
    opacity: 0.7;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .container {
        padding: 0 var(--space-5);
    }

    .hero {
        padding: var(--space-10) 0 var(--space-16);
    }

    .hero h1 {
        font-size: 30px;
        letter-spacing: -1px;
    }

    .hero .subtitle {
        font-size: 15px;
        margin-bottom: var(--space-8);
    }

    .search-form-card {
        padding: var(--space-5);
    }

    .input-row.two-col {
        flex-direction: column;
    }

    .email-form {
        flex-direction: column;
    }

    .email-form button {
        width: 100%;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }

    .report-field:nth-child(even) {
        padding-left: 0;
        border-left: none;
    }

    .report-field:nth-child(odd) {
        padding-right: 0;
    }

    .trust-items {
        flex-direction: column;
        gap: var(--space-4);
        align-items: center;
    }

    .trust-item {
        min-width: 200px;
    }

    .cta-card {
        padding: var(--space-10) var(--space-5);
    }
}

/* ===== EMAIL REPORT BUTTON ===== */
.email-report-card {
    margin-bottom: var(--space-6);
    text-align: center;
}

.card-email-action {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border-strong);
    text-align: center;
}

.card-email-action + .card-cta {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: none;
}

.email-report-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: 12px var(--space-6);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: white;
    background: var(--blue-600);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    max-width: 100%;
}

.email-report-btn:hover:not(:disabled) {
    background: var(--blue-500);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.email-report-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
    background: var(--blue-700);
}

.email-report-btn:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.email-report-btn.sent {
    background: var(--green-border, #22c55e);
    opacity: 1;
}

.email-icon {
    font-size: 16px;
    line-height: 1;
}

.email-btn-label {
    font-size: 14px;
    font-weight: 600;
}

.email-report-hint {
    margin-top: var(--space-3);
    font-size: 12px;
    color: var(--text-faint);
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}
