/* GENEL VE TEMEL AYARLAR */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #2ecc71;
    --background-color: #f4f7f6;
    --text-color: #333;
    --light-text-color: #777;
    --border-color: #e9ecef;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    background-color: var(--background-color); 
    color: var(--text-color); 
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

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

a {
    color: var(--secondary-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* HEADER (BAŞLIK BÖLÜMÜ) */
.main-header { 
    display: flex;
    flex-direction: column; /* Mobil için alt alta */
    align-items: center; /* Mobil için ortalı */
    gap: 15px; /* Elemanlar arası boşluk */
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 15px; 
    margin-bottom: 20px; 
}
.main-header h1 {
    margin: 0;
}
.main-header h1 a { 
    text-decoration: none; 
    color: var(--primary-color);
    font-size: 1.5em; /* Mobil için biraz daha küçük başlık */
}
.main-header nav {
    display: flex;
    flex-wrap: wrap; /* Linkler sığmazsa alt satıra geçsin */
    justify-content: center;
    gap: 15px;
}
.main-header nav a { 
    text-decoration: none; 
    color: var(--secondary-color); 
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.main-header nav a:hover {
    background-color: var(--border-color);
    text-decoration: none;
}

/* FORMLAR (Kayıt, Giriş vb.) */
.form-container { 
    max-width: 500px; 
    margin: 20px auto; 
    padding: 25px; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    background: #fff;
    width: 100%; /* Mobil için ekranı doldur */
    box-sizing: border-box; /* Padding ve border genişliği etkilemesin */
}
.form-group { 
    margin-bottom: 15px; 
}
.form-group label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: 500; 
}
.form-group input, .form-group select, .form-group textarea { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box; 
    font-size: 1em;
}
.btn { 
    display: inline-block; 
    background-color: var(--secondary-color); 
    color: #fff; 
    padding: 12px 25px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    text-align: center; 
    text-decoration: none;
    font-size: 1em;
    width: 100%; /* Mobil için butonlar tam genişlik */
    box-sizing: border-box;
}
.auth-link { 
    margin-top: 15px; 
    text-align: center; 
    font-size: 0.9em; 
}

/* TABLOLAR VE LİSTELER */
.transaction-list table { width: 100%; border-collapse: collapse; }
.transaction-list th, .transaction-list td { padding: 12px 8px; border-bottom: 1px solid var(--border-color); text-align: left; }
.transaction-list th { font-weight: 600; font-size: 0.9em; color: var(--light-text-color); }
.amount { text-align: right; font-weight: 600; white-space: nowrap; }
.income-amount { color: #27ae60; }
.expense-amount { color: #c0392b; }

/* PANEL ve ÖZET ALANLARI */
.panel-section { background-color: #f9f9f9; padding: 20px; border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 20px; }
.summary-section { margin-top: 30px; padding: 20px; background-color: var(--background-color); border-radius: 8px; }
.summary-box .summary-item { display: flex; justify-content: space-between; padding: 10px 0; font-size: 1.1em; }
.summary-box .total-balance { font-size: 1.4em; font-weight: bold; border-top: 2px solid #bdc3c7; margin-top: 10px; padding-top: 10px; color: var(--primary-color); }

/* FOOTER */
.main-footer { text-align: center; margin-top: 30px; padding: 20px; border-top: 1px solid var(--border-color); color: var(--light-text-color); font-size: 0.9em; }


/* =============================================== */
/* BÜYÜK EKRAN AYARLARI (TABLET VE MASAÜSTÜ)       */
/* =============================================== */
@media (min-width: 768px) {
    .container {
        padding: 40px;
    }
    
    /* Header'ı yan yana getir */
    .main-header {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .main-header h1 a {
        font-size: 1.8em;
    }
    
    /* Butonları normale döndür */
    .btn {
        width: auto;
    }
    
    /* Panel ve Liste grid yapıları */
    .panel-grid { 
        display: grid; 
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
        gap: 20px; 
    }
    .list-grid { 
        display: grid; 
        grid-template-columns: 1fr 1fr; 
        gap: 30px; 
        margin-top: 20px; 
    }
}