* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* Giriş Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.login-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-content h2 {
    margin-bottom: 10px;
    color: #333;
    font-size: 24px;
}

.login-content p {
    margin-bottom: 25px;
    color: #666;
    font-size: 14px;
}

.login-input-group {
    margin-bottom: 20px;
}

.login-input-group input {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    border: 3px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 700;
    transition: border-color 0.3s;
}

.login-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-error {
    color: #ef4444;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 10px;
    background: #fee2e2;
    border-radius: 8px;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* Çıkış Butonu */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    position: relative;
}

.btn-logout {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.main-content {
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}


header h1 {
    font-size: 28px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Özet Kartları */
.summary-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.card-content h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.card-content .amount {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.income-card .amount {
    color: #10b981;
}

.debt-card .amount {
    color: #ef4444;
}

.balance-card .amount {
    color: #3b82f6;
}

/* Veri Yönetimi */
.data-management-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-export,
.btn-import {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.btn-import {
    display: inline-block;
    text-align: center;
    line-height: 1.5;
}

.btn-export:hover,
.btn-import:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-export:active,
.btn-import:active {
    transform: translateY(0);
}

/* Üst Bölüm */
.top-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

/* Filtreleme */
.filter-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.filter-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.filter-section select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-section select:focus {
    outline: none;
    border-color: #667eea;
}

/* Form Bölümü */
.form-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* İşlem Tabloları Container */
.tables-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* İşlemler Bölümü */
.transactions-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.income-section {
    border-top: 4px solid #10b981;
}

.expense-section {
    border-top: 4px solid #ef4444;
}

.transactions-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid;
    transition: background 0.2s;
}

.transaction-item.income {
    border-left-color: #10b981;
}

.transaction-item.expense {
    border-left-color: #ef4444;
}

.transaction-item:hover {
    background: #f3f4f6;
}

.transaction-info {
    flex: 1;
}

.transaction-info .description {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 16px;
}

.transaction-info .date {
    font-size: 12px;
    color: #666;
}

.transaction-amount {
    font-size: 18px;
    font-weight: 700;
    margin-right: 10px;
}

.transaction-item.income .transaction-amount {
    color: #10b981;
}

.transaction-item.expense .transaction-amount {
    color: #ef4444;
}

.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.delete-btn:hover {
    background: #dc2626;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 16px;
}

/* Responsive Tasarım */
@media (max-width: 767px) {
    .btn-logout {
        position: static;
        margin-top: 15px;
        display: inline-block;
    }
    
    header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (min-width: 768px) {
    .summary-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    header h1 {
        font-size: 32px;
    }

    .card-content .amount {
        font-size: 28px;
    }

    .top-section {
        flex-direction: row;
    }

    .filter-section {
        flex: 1;
    }

    .form-section {
        flex: 2;
    }

    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .tables-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.transaction-item {
    animation: fadeIn 0.3s ease-out;
}
