/* style.css */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --header-bg: #343a40;
    --content-bg: #f8f9fa;
    --text-color: #212529;
    --light-text: #adb5bd;
    --white: #fff;
    --danger: #dc3545;
    --warning: #ffc107;
    --success: #28a745;
}

*, *::before, *::after {
    box-sizing: border-box;
}

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

.hidden {
    display: none !important;
}

/* --- Login Sayfası --- */
#login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 1rem;
}

.login-box {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
    max-width: 360px;
}

.login-box h2 { margin-top: 0; margin-bottom: 1.5rem; }
.login-box input { width: 100%; padding: 0.75rem; margin-bottom: 1rem; border: 1px solid #ced4da; border-radius: 6px; }
.login-box button { width: 100%; padding: 0.75rem; border: none; border-radius: 6px; background-color: var(--primary-color); color: var(--white); font-size: 1rem; font-weight: bold; cursor: pointer; }
#login-error { color: var(--danger); margin-top: 1rem; font-size: 0.9rem; }

/* --- Ana Panel ve Menü --- */
.app-header {
    background-color: var(--header-bg);
    color: var(--white);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-header .brand { font-size: 1.25rem; font-weight: bold; }
.hamburger-menu { background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; padding: 0.5rem; }

.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: var(--header-bg);
    z-index: 1030;
    transition: left 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
}

.sidebar.open { left: 0; }
.sidebar .menu-item { display: block; padding: 1rem 1.5rem; color: var(--light-text); text-decoration: none; }
.sidebar .menu-item:hover { background-color: #495057; color: var(--white); }
.sidebar .menu-item.active { background-color: var(--primary-color); color: var(--white); }
.sidebar .logout { margin-top: auto; border-top: 1px solid #495057; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1025; }

/* --- Genel İçerik ve Sayfa Yapısı --- */
.main-content { padding: 1.5rem; }
.page { background-color: var(--white); padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
h1, h3 { margin-top: 0; }
h1 { border-bottom: 1px solid #dee2e6; padding-bottom: 1rem; margin-bottom: 1.5rem; }
h3 { margin-bottom: 1rem; }
hr { border: 0; border-top: 1px solid #dee2e6; margin: 2rem 0; }

/* --- Tablo ve Form Elemanları --- */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.9rem; }
th, td { padding: 0.75rem; border: 1px solid #dee2e6; text-align: left; vertical-align: middle; white-space: nowrap; }
th { background-color: #e9ecef; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background-color: #dde1e5; }

input, select, button { font-size: 0.9rem; padding: 0.5rem; border: 1px solid #ced4da; border-radius: 4px; }
button { background-color: var(--primary-color); color: var(--white); border: none; cursor: pointer; }
button:hover { background-color: var(--primary-hover); }
button.danger { background-color: var(--danger); }
button.danger:hover { background-color: #c82333; }
button.warning { background-color: var(--warning); color: #212529; }
button.warning:hover { background-color: #e0a800; }

.filter-bar { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .filter-bar { flex-direction: row; align-items: center; } }
.pagination { text-align: center; margin-top: 1.5rem; }
.pagination button { margin: 0 2px; }
.asistan-tabs { white-space: nowrap; overflow-x: auto; padding-bottom: 10px; }
.asistan-tabs button { margin-right: 5px; }
.asistan-tabs button.active { background-color: var(--primary-hover); }
td img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* --- Detay ve Modal Pencereleri --- */
.details-row { background-color: #f8f9fa; }
.details-row td { padding: 1rem; }
.details-row .income-box { display: flex; justify-content: space-around; text-align: center; }
.details-row .income-item h4 { margin: 0 0 5px 0; color: #6c757d; font-weight: normal; }
.details-row .income-item p { margin: 0; font-size: 1.1rem; font-weight: bold; }
#upload-status { margin-top: 10px; font-weight: bold; }

.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.modal-body .form-group { margin-bottom: 15px; }
.modal-body label { display: block; margin-bottom: 5px; }
.modal-body input { width: 100%; }
