/* Reset básico e fontes */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Container Principal */
.container {
    max-width: 500px;
    width: 100%;
}

/* Estilo de Card (usado pelas duas telas) */
.card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    border: 1px solid #e0e0e0;
}

.logo {
    display: block;
    max-width: 200px;
    margin: 0 auto 2rem auto;
}

/* TELA 1: Formulário de Login */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: #2ECC71; /* Verde do botão "Consultar" */
    color: white;
}

.btn-primary:hover {
    background-color: #27ae60;
}

.error-message {
    color: #e74c3c; /* Vermelho do erro */
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
}

/* TELA 2: Resultados */
#resultsView .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

#resultsView h2 {
    font-size: 1.25rem;
    color: #333;
}

#resultsView h3 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
    font-weight: 600;
}

.btn-voltar {
    background: none;
    border: 1px solid #ccc;
    color: #555;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
}
.btn-voltar:hover {
    background-color: #f9f9f9;
}


/* Card de Fatura Individual */
.invoice-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.invoice-card .status-badge {
    display: inline-block;
    background-color: #f39c12; /* Laranja "A vencer" */
    color: white;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.invoice-card .status-badge.vencido {
    background-color: #e74c3c; /* Vermelho "Vencido" */
}

.invoice-card .price {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
}

.invoice-card .due-date {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1.5rem;
}

.invoice-card .actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-secondary {
    background-color: #3498db; /* Azul */
    color: white;
    width: 100%;
}
.btn-secondary:hover {
    background-color: #2980b9;
}

.btn-download {
    background-color: #7f8c8d; /* Cinza */
    color: white;
    width: 100%;
}
.btn-download:hover {
    background-color: #6c7a7b;
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 1rem auto 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}