:root {
    --blue-50: #EBF1FF;
    --blue-100: #D6E4FF;
    --blue-500: #0059F2;
    --blue-600: #0047CC;
    --blue-700: #003DA6;
    --navy: #0B1D3A;
    --bg-light: #FAFBFC;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: #0059F2;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 89, 242, 0.2);
}

.btn-primary:hover {
    background: #0047CC;
    box-shadow: 0 4px 12px rgba(0, 89, 242, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #d1d5db;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
}

.input-field {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: #0059F2;
    box-shadow: 0 0 0 3px rgba(0, 89, 242, 0.1);
}

.input-field::placeholder {
    color: #9ca3af;
}

select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #0059F2;
    background: #EBF1FF;
    border: 1px solid #D6E4FF;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.15s;
}

.download-btn:hover {
    background: #D6E4FF;
    color: #0047CC;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-pending {
    background: #f3f4f6;
    color: #6b7280;
}

.status-generating {
    background: #fef3c7;
    color: #92400e;
    animation: pulse-subtle 2s infinite;
}

.status-processing_deliverables {
    background: #D6E4FF;
    color: #003DA6;
    animation: pulse-subtle 2s infinite;
}

.status-ready {
    background: #d1fae5;
    color: #065f46;
}

.status-emailed {
    background: #d1fae5;
    color: #065f46;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

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

.prose h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 0.75rem;
}

/* Category search dropdown */
.category-search-wrap {
    position: relative;
}

.category-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    max-height: 15rem;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.category-dropdown.open {
    display: block;
}

.category-dropdown-item {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.1s;
}

.category-dropdown-item:hover {
    background: #EBF1FF;
    color: #0047CC;
}

.category-dropdown-empty {
    padding: 0.75rem 0.875rem;
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
}

/* Mobile nav */
.mobile-menu-btn {
    display: none;
    padding: 0.375rem;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 0.375rem;
}

.mobile-menu-btn:hover {
    background: #f3f4f6;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links .nav-items {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 640px) {
    .card { padding: 1rem; }

    .mobile-menu-btn { display: block; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        padding: 0.75rem 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .nav-links.open { display: block; }

    .nav-links .nav-items {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-links .nav-items a,
    .nav-links .nav-items span {
        display: block;
        padding: 0.5rem 0;
        text-align: left;
    }

    .nav-links .nav-items .h-4 { display: none; }
}
