* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding-bottom: 60px;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-left {
    flex: 1;
}

.navbar h1 {
    color: #667eea;
    margin-bottom: 1rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-menu a:hover {
    background: #667eea;
    color: white;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-chip {
    background: #eef2ff;
    color: #4338ca;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-card .amount {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-card.positive .amount {
    color: #10b981;
}

.stat-card.negative .amount {
    color: #ef4444;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-danger {
    background: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #dc2626;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

table tr:hover {
    background: #f8f9fa;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    text-align: center;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
    }
}

.btn-success {
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.btn-success:hover {
    background: #059669;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.row-alindi {
    opacity: 0.6;
    background: #f0fdf4 !important;
}

.row-alindi td {
    text-decoration: line-through;
}

.row-alindi td:nth-child(4),
.row-alindi td:last-child {
    text-decoration: none;
}

.row-odendi {
    opacity: 0.6;
    background: #f0fdf4 !important;
}

.row-odendi td {
    text-decoration: line-through;
}

.row-odendi td:nth-child(4),
.row-odendi td:last-child {
    text-decoration: none;
}

/* Modal Stilleri */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 25px;
    background: #e0e0e0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 0.85rem;
    color: #333;
}

.row-tamamlandi {
    opacity: 0.7;
    background: #f0fdf4 !important;
}

.row-tamamlandi td {
    color: #059669;
}

/* Tıklanabilir kartlar */
.clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.clickable small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Büyük modal */
.modal-large {
    max-width: 900px;
}

/* Modal tablo */
.modal-table {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
}

.modal-table th,
.modal-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.modal-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.modal-table tbody tr:hover {
    background: #f8f9fa;
}

.modal-table tfoot tr {
    background: #667eea;
    color: white;
    font-weight: bold;
}

.modal-table tfoot td {
    border: none;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Autocomplete stilleri */
input[list] {
    position: relative;
}

datalist {
    position: absolute;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

datalist option {
    padding: 0.5rem;
    cursor: pointer;
}

datalist option:hover {
    background-color: #f0f0f0;
}

/* Kişiler Grid */
.kisiler-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.kisi-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.kisi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.kisi-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea15, #764ba215);
}

.kisi-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    flex-shrink: 0;
}

.kisi-info {
    flex: 1;
}

.kisi-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #333;
}

.kisi-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mini-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mini-badge.positive {
    background: #d1fae5;
    color: #065f46;
}

.mini-badge.negative {
    background: #fee2e2;
    color: #991b1b;
}

/* Auth sayfası */
body.auth-page {
    padding-bottom: 0;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.auth-card p {
    margin-bottom: 2rem;
    color: #6b7280;
}

.auth-card .form-group {
    text-align: left;
}

.auth-card button {
    width: 100%;
    font-size: 1.05rem;
}

.auth-error {
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .kisiler-grid {
        grid-template-columns: 1fr;
    }
}
