* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
}

.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #4a1a6b 0%, #2d0f47 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    color: #4a1a6b;
    margin-bottom: 30px;
    text-align: center;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #4a1a6b;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-box button:hover {
    background: #3a1455;
}

.error-msg {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

.main-app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    background: #4a1a6b;
    color: white;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    font-size: 20px;
    font-weight: 500;
}

.menu {
    list-style: none;
    flex: 1;
    padding: 10px 0;
}

.menu li {
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s;
    border-left: 3px solid transparent;
}

.menu li:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: white;
}

.logout-btn {
    margin: 20px;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2);
}

.content {
    flex: 1;
    margin-left: 200px;
    padding: 30px;
}

.menu-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.menu-section h2 {
    color: #4a1a6b;
    margin-bottom: 25px;
    font-size: 24px;
}

.menu-section h3 {
    color: #4a1a6b;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

button {
    padding: 12px 24px;
    background: #4a1a6b;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #3a1455;
}

.tipo-chave-btn {
    padding: 10px;
    background: #ecf0f1;
    color: #2c3e50;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.tipo-chave-btn:hover {
    background: #dfe6e9;
    border-color: #95a5a6;
}

.tipo-chave-btn.active {
    background: #4a1a6b;
    color: white;
    border-color: #4a1a6b;
}

button:hover {
    background: #3a1455;
}

.btn-add {
    background: #27ae60;
    margin-bottom: 20px;
}

.btn-add:hover {
    background: #229954;
}

.btn-cancel {
    background: #95a5a6;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

.btn-confirm {
    background: #27ae60;
}

.btn-confirm:hover {
    background: #229954;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.totais-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.total-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
}

.total-item:last-child {
    border-bottom: none;
}

.total-item span:first-child {
    font-weight: 500;
    color: #555;
}

.total-item span:last-child {
    font-weight: 600;
    color: #4a1a6b;
}

.lista-pagamentos,
.lista-boletos,
.lista-dividas,
.lista-contas,
.lista-contatos {
    margin-top: 20px;
}

.item-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #4a1a6b;
}

.item-card:hover {
    background: #ecf0f1;
}

.item-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.item-label {
    color: #7f8c8d;
    font-size: 13px;
}

.item-value {
    color: #2c3e50;
    font-weight: 500;
}

.pix-result {
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.divida-card {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #e74c3c;
    cursor: pointer;
    transition: all 0.3s;
}

.divida-card:hover {
    background: #ffe8b3;
    transform: translateX(5px);
}

.divida-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.divida-nome {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.devedor-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.divida-detalhes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.btn-pagar-divida {
    background: #f39c12;
    padding: 8px 16px;
    font-size: 12px;
    margin-top: 10px;
    margin-right: 10px;
}

.btn-pagar-divida:hover {
    background: #e67e22;
}

.conta-compacta {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid #4a1a6b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.conta-info-compacta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
}

.conta-info-item {
    font-size: 13px;
}

.conta-info-label {
    color: #7f8c8d;
    margin-right: 4px;
}

.conta-info-value {
    color: #2c3e50;
    font-weight: 500;
}

.btn-copiar-conta {
    background: #3498db;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-copiar-conta:hover {
    background: #2980b9;
}

.contato-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #3498db;
}

.contato-nome {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.modal-extrato {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    color: #4a1a6b;
    margin-bottom: 20px;
}

.modal-content p {
    margin-bottom: 15px;
    color: #555;
}

.aviso {
    background: #fff3cd;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #f39c12;
    color: #856404;
    font-weight: 500;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.extrato-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 3px solid #27ae60;
}

.extrato-data {
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 5px;
}

.extrato-valor {
    font-size: 18px;
    font-weight: 600;
    color: #27ae60;
}

.extrato-resumo {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

.extrato-resumo-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 15px;
}

.extrato-resumo-item:last-child {
    margin-bottom: 0;
    font-size: 16px;
    font-weight: 600;
    padding-top: 10px;
    border-top: 2px solid #27ae60;
}

@media (max-width: 768px) {
    .sidebar {
        width: 250px;
        height: 100vh;
        position: fixed;
        left: -250px;
        top: 0;
        bottom: auto;
        flex-direction: column;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-header {
        display: block;
        padding: 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .sidebar-header h3 {
        font-size: 18px;
    }

    .menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        overflow-y: auto;
        padding: 10px 0;
        flex: 1;
    }

    .menu li {
        flex: none;
        padding: 15px 20px;
        font-size: 14px;
        text-align: left;
        white-space: nowrap;
        border-left: 3px solid transparent;
    }

    .menu li:hover {
        background: rgba(255,255,255,0.1);
        border-left-color: white;
    }

    .logout-btn {
        display: block;
        margin: 20px;
    }

    .menu-toggle {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: #4a1a6b;
        color: white;
        border: none;
        width: 45px;
        height: 45px;
        border-radius: 8px;
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .menu-overlay.active {
        display: block;
    }

    .content {
        margin-left: 0;
        margin-bottom: 0;
        padding: 70px 15px 15px 15px;
    }

    .menu-section {
        padding: 15px 10px;
    }

    .menu-section h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .menu-section h3 {
        font-size: 16px;
        margin-top: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 10px;
    }

    button {
        padding: 10px 20px;
        font-size: 13px;
    }

    .divida-detalhes {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .login-box {
        margin: 20px;
        padding: 30px 20px;
    }

    .conta-info-compacta {
        flex-direction: column;
        gap: 8px;
    }

    .totais-box {
        padding: 15px;
    }

    .total-item {
        font-size: 14px;
        padding: 8px 0;
    }

    .item-card {
        padding: 12px;
    }

    .item-info {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .divida-card,
    .pessoa-card {
        padding: 15px;
    }

    .divida-nome,
    .pessoa-nome {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 60px 10px 10px 10px;
    }

    .menu-section {
        padding: 10px;
    }

    .form-buttons {
        flex-direction: column;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .btn-pagar-divida,
    .btn-copiar-conta {
        width: 100%;
        margin-top: 8px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Sistema de Notificações */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    min-width: 280px;
}

.notification.success {
    border-left: 4px solid #27ae60;
}

.notification.error {
    border-left: 4px solid #e74c3c;
}

.notification.info {
    border-left: 4px solid #3498db;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    color: #27ae60;
}

.notification.error .notification-icon {
    color: #e74c3c;
}

.notification.info .notification-icon {
    color: #3498db;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 14px;
}

.notification-message {
    color: #7f8c8d;
    font-size: 13px;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification.hide {
    animation: slideOut 0.3s ease-in forwards;
}

/* Menu Item Ativo */
.menu-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid white;
    padding-left: 16px;
}

@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}
