@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-red-light: #FF5A5A;
    --primary-red-dark: #9A0000;
    --primary-gradient: linear-gradient(135deg, var(--primary-red-light), var(--primary-red-dark));
    --dark-bg: #121212;
    --text-light: #ffffff;
    --success-green: #00D95F;
    --finance-blue: #0EA5E9;
    --warning-yellow: #F59E0B;
    --danger-red: #EF4444;
    --card-bg: rgba(30, 30, 30, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 90, 90, 0.3);
}

.btn-success {
    background: var(--success-green);
    color: white;
}

.btn-success:hover {
    background: #00b84d;
}

.btn-danger {
    background: var(--danger-red);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--finance-blue);
    background: rgba(255, 255, 255, 0.08);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

select.form-control {
    cursor: pointer;
    background-color: #2a2a2a !important;
    color: white !important;
    border: 1px solid var(--border-color);
}

select.form-control option {
    background-color: #2a2a2a !important;
    color: white !important;
    padding: 10px;
}

/* Firefox */
select.form-control option:checked {
    background-color: var(--finance-blue) !important;
    color: white !important;
}

/* Webkit browsers (Chrome, Safari, Edge) */
select.form-control::-webkit-scrollbar {
    width: 8px;
}

select.form-control::-webkit-scrollbar-track {
    background: #1a1a1a;
}

select.form-control::-webkit-scrollbar-thumb {
    background: var(--finance-blue);
    border-radius: 4px;
}

input[type="file"].form-control {
    padding: 8px;
    cursor: pointer;
}

input[type="file"].form-control::file-selector-button {
    background: var(--finance-blue);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

input[type="file"].form-control::file-selector-button:hover {
    background: var(--success-green);
    transform: translateY(-2px);
}

/* Header/Navbar */
.navbar {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand img {
    height: 50px;
}

.navbar-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.navbar-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--finance-blue);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table thead {
    background: rgba(14, 165, 233, 0.1);
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--finance-blue);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.badge-receita {
    background: rgba(0, 217, 95, 0.2);
    color: var(--success-green);
}

.badge-despesa {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-red);
}

.badge-pendente {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-yellow);
}

.badge-confirmada {
    background: rgba(0, 217, 95, 0.2);
    color: var(--success-green);
}

/* Grid System */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Stats Card */
.stats-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stats-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stats-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(0, 217, 95, 0.1);
    border: 1px solid var(--success-green);
    color: var(--success-green);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning-yellow);
    color: var(--warning-yellow);
}

.alert-info {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid var(--finance-blue);
    color: var(--finance-blue);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--dark-bg);
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--finance-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.gap-3 { gap: 30px; }

/* Responsive */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .navbar-menu {
        display: none;
    }

    .container {
        padding: 0 15px;
    }
}

/* Toggle Password Button */
.toggle-password-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.toggle-password-btn:hover {
    opacity: 0.7;
}

.eye-icon {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
}

.toggle-password-btn.active .eye-icon {
    color: var(--finance-blue);
}
