/* Pitada Natural — eBook service. Simples, limpo, mobile-first. */
:root {
    --verde: #1a7a3e;
    --verde-claro: #e8f5ec;
    --verde-escuro: #0e5028;
    --texto: #1f2937;
    --texto-suave: #6b7280;
    --fundo: #f7f8f5;
    --card: #ffffff;
    --borda: #e5e7eb;
    --erro: #b91c1c;
    --pill: #ecfdf5;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--fundo);
    color: var(--texto);
    line-height: 1.5;
}

a { color: var(--verde); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--borda);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--verde-escuro);
}
.nav a {
    margin-left: 1.5rem;
    color: var(--texto);
    font-weight: 500;
}
.nav a:hover { color: var(--verde); text-decoration: none; }

.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.hero {
    background: var(--card);
    border: 1px solid var(--borda);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 600px;
    margin: 3rem auto;
    text-align: left;
}
.hero h1 { margin-top: 0; color: var(--verde-escuro); }
.lead { font-size: 1.05rem; color: var(--texto-suave); }
.hint { font-size: 0.9rem; color: var(--texto-suave); margin-top: 1.5rem; }

.lookup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}
.lookup-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--texto);
}
.lookup-form input {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--borda);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    background: #fff;
}
.lookup-form input:focus {
    border-color: var(--verde);
    box-shadow: 0 0 0 3px var(--verde-claro);
}

button, .btn {
    background: var(--verde);
    color: white;
    border: 0;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background 0.15s ease;
}
button:hover, .btn:hover { background: var(--verde-escuro); text-decoration: none; }

.btn-secondary {
    background: var(--card);
    color: var(--verde);
    border: 1px solid var(--verde);
}
.btn-secondary:hover { background: var(--verde-claro); }

.btn-danger { background: var(--erro); }
.btn-danger:hover { background: #7f1d1d; }

.card {
    background: var(--card);
    border: 1px solid var(--borda);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

table.ebooks-list {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--borda);
    border-radius: 12px;
    overflow: hidden;
}
table.ebooks-list th, table.ebooks-list td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--borda);
    vertical-align: middle;
}
table.ebooks-list th {
    background: #fafafa;
    font-weight: 600;
    color: var(--texto-suave);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
table.ebooks-list tr:last-child td { border-bottom: none; }

.pill {
    display: inline-block;
    background: var(--pill);
    color: var(--verde-escuro);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}
.pill.warn { background: #fef3c7; color: #92400e; }
.pill.err  { background: #fee2e2; color: var(--erro); }

.footer {
    max-width: 1100px;
    margin: 3rem auto 2rem;
    padding: 0 1.5rem;
    text-align: center;
    color: var(--texto-suave);
    font-size: 0.9rem;
}

.thumb {
    width: 44px; height: 44px;
    border-radius: 6px;
    object-fit: cover;
    background: #f3f4f6;
}

.error { color: var(--erro); font-size: 0.9rem; }
.muted { color: var(--texto-suave); }

@media (max-width: 640px) {
    .topbar { flex-direction: column; align-items: flex-start; }
    .nav a { margin-left: 0; margin-right: 1rem; }
    .hero { padding: 1.5rem; margin: 1rem auto; }
}
