* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6C63FF;
    --secondary-color: #FFD93D;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --success-color: #2ECC71;
    --danger-color: #E74C3C;
    --warning-color: #F39C12;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark-color);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 20px;
}

/* Header */
.header {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.5s ease-out;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.logo-img {
    width: 120px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo svg {
    animation: pulse 2s infinite;
}

.app-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.app-subtitle {
    color: #7F8C8D;
    font-size: 0.9rem;
    font-weight: 300;
}

/* Stats */
.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #7F8C8D;
    font-weight: 400;
}

/* Cards */
.card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease-out;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-color);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a52d5 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.85rem;
    width: auto;
    display: inline-block;
}

.btn-edit {
    background: var(--warning-color);
    color: white;
    margin-right: 8px;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-pagar {
    background: linear-gradient(135deg, var(--success-color) 0%, #27AE60 100%);
    color: white;
    font-weight: 600;
}

.btn-pagar:hover {
    box-shadow: 0 3px 10px rgba(46, 204, 113, 0.4);
}

/* Users List */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-item {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.user-item:hover {
    background: #E8E9EA;
    transform: translateX(5px);
}

.user-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.user-info p {
    font-size: 0.85rem;
    color: #7F8C8D;
    margin-bottom: 3px;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.loading {
    text-align: center;
    color: #7F8C8D;
    padding: 20px;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7F8C8D;
}

.empty-state svg {
    margin-bottom: 15px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--dark-color);
}

/* Toast */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    border-radius: 10px;
    padding: 16px;
    position: fixed;
    z-index: 1001;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    visibility: visible;
    animation: fadeInUp 0.5s, fadeOut 0.5s 2.5s;
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: var(--danger-color);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: white;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a52d5 100%);
    color: white;
}

.results-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.results-table td {
    padding: 12px;
    border-bottom: 1px solid #E8E8E8;
}

.results-table tbody tr {
    transition: background-color 0.3s ease;
}

.results-table tbody tr:hover {
    background-color: #F8F9FA;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.status-nao {
    color: var(--danger-color);
    font-weight: 600;
}

.status-sim {
    color: var(--success-color);
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        bottom: 0;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px 15px;
    }

    .app-title {
        font-size: 1.5rem;
    }

    .card {
        padding: 20px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .user-actions {
        width: 100%;
    }

    .btn-small {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Alertas de Pagamento */
.alertas-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

.alerta-pagamento {
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4);
    animation: slideInRight 0.5s ease-out;
    position: relative;
    border-left: 5px solid #FFD93D;
    transition: all 0.3s ease;
}

.alerta-pagamento:hover {
    transform: translateX(-5px);
    box-shadow: 0 15px 40px rgba(46, 204, 113, 0.5);
}

.alerta-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alerta-body {
    font-size: 0.9rem;
    line-height: 1.6;
}

.alerta-body p {
    margin: 5px 0;
}

.alerta-body strong {
    font-weight: 600;
}

.alerta-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.alerta-close:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsivo para alertas */
@media (max-width: 480px) {
    .alertas-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .alerta-pagamento {
        padding: 15px;
    }
}
