:root {
    --primary-color: #2563eb; /* Azul Royal */
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.container {
    width: 100%;
    max-width: 600px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
}

.logo-placeholder {
    width: 64px;
    height: 64px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
}

#search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.2s ease;
    background-color: var(--surface);
}

#search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

#search-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#search-button:hover {
    background-color: var(--primary-hover);
}

#search-button:active {
    transform: scale(0.98);
}

.results-container {
    margin-top: 1rem;
    min-height: 100px;
}

.initial-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--background);
}

.result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    background-color: var(--surface);
}

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

.result-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pdf-icon {
    color: #ef4444; /* Vermelho para PDF */
    background: #fee2e2;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.result-name {
    font-weight: 600;
    color: var(--text-main);
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-light);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-radius: 2rem;
    transition: all 0.2s ease;
}

.download-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.loader {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-message {
    color: #dc2626;
    background-color: #fef2f2;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid #f87171;
}

.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--background);
}

footer {
    text-align: center;
    margin-top: auto;
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }
    
    .result-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .download-link {
        width: 100%;
        justify-content: center;
    }
}
