/* Reset Moderno */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --accent: #f59e0b;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f8fafc;
    --success: #10b981;
    --error: #ef4444;
    --border: #334155;
    --glow: rgba(124, 58, 237, 0.4);
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--background);
    padding: 1rem;
    line-height: 1.5;
}

.container {
    background: var(--surface);
    width: 100%;
    max-width: 300px;
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        var(--primary),
        transparent
    );
    animation: rotate 6s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

h1 {
    color: var(--text);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

h1 i {
    color: var(--primary);
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    opacity: 0.9;
}

.input-wrapper {
    position: relative;
}

input {
    width: 100%;
    padding: 1rem;
    padding-left: 3rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    font-size: 1rem;
    background: rgba(0,0,0,0.3);
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow);
}

input::placeholder {
    color: #94a3b8;
    opacity: 0.7;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    opacity: 0.8;
    z-index: 1;
}

button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--glow);
}

button i {
    font-size: 1.2rem;
}

#mensagem {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid;
}

.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-color: var(--success);
}

.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border-color: var(--error);
}

.loading {
    pointer-events: none;
    opacity: 0.8;
}

.loading::after {
    content: "";
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: loading 0.8s linear infinite;
}

@keyframes loading {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        border-radius: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
}

/* Novos estilos para a lista */
.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

#pesquisa {
    width: 100%;
    padding: 1rem;
    padding-left: 3rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    background: rgba(0,0,0,0.3);
    color: var(--text);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    opacity: 0.8;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: rgba(0,0,0,0.3);
    color: var(--primary);
}

.atualizar-vencimento {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
}

.atualizar-vencimento:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--glow);
}