/* GPMoney - Stili Globali */

:root {
    --primary-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-bg: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-bg);
    padding-bottom: 70px;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #20c997 100%);
    color: white;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.app-header h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
}

.card-header {
    background-color: white;
    border-bottom: 2px solid var(--light-bg);
    font-weight: 600;
    padding: 1rem;
}

/* Saldo Card */
.saldo-card {
    background: linear-gradient(135deg, var(--info-color) 0%, #138496 100%);
    color: white;
    text-align: center;
    padding: 1.5rem;
}

.saldo-amount {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.saldo-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Bottoni Mobile Friendly */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border: none;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #20c997 100%);
}

.btn-danger {
    background-color: var(--danger-color);
}

/* Form */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Lista Transazioni */
.transaction-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.transaction-info {
    flex: 1;
}

.transaction-category {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1rem;
}

.transaction-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.transaction-description {
    font-size: 0.9rem;
    color: #495057;
    margin-top: 0.25rem;
}

.transaction-amount {
    font-size: 1.25rem;
    font-weight: bold;
    margin-left: 1rem;
}

.transaction-amount.entrata {
    color: var(--primary-color);
}

.transaction-amount.uscita {
    color: var(--danger-color);
}

.transaction-actions {
    margin-left: 0.5rem;
}

.transaction-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Autocomplete */
.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.autocomplete-items div {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

.autocomplete-items div:hover {
    background-color: var(--light-bg);
}

.autocomplete-active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Badge */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Alert */
.alert {
    border-radius: 8px;
    border: none;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    max-width: 400px;
    width: 100%;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #20c997 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    border-radius: 12px 12px 0 0;
}

.login-header h1 {
    margin: 0;
    font-size: 2rem;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 576px) {
    .saldo-amount {
        font-size: 2rem;
    }
    
    .transaction-amount {
        font-size: 1.1rem;
    }
    
    .app-header h1 {
        font-size: 1.25rem;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Position relative for autocomplete */
.position-relative {
    position: relative;
}