/* === GENEL === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #0d6efd;
    --primary-dark: #0b5ed7;
    --accent: #ffc107;
    --accent-dark: #e0a800;
    --secondary: #333;
    --bg: #f5f6fa;
    --white: #fff;
    --border: #dee2e6;
    --text: #333;
    --text-muted: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --shadow: 0 2px 8px rgba(0,0,0,.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

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

/* === NAVBAR === */
.navbar {
    background: var(--primary);
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 56px;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    border-bottom: 3px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-right: 32px;
    white-space: nowrap;
    text-decoration: none !important;
}

.navbar-logo {
    height: 36px;
    width: 36px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 2px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link {
    color: rgba(255,255,255,.9) !important;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    transition: background .2s;
    text-decoration: none !important;
}

.nav-link:hover { background: rgba(255,255,255,.15); }

/* === NAVBAR DROPDOWN === */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    padding: 6px;
    z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 4px;
    color: var(--text) !important;
    font-size: 13px;
    text-decoration: none !important;
}
.nav-dropdown-item:hover { background: var(--bg); }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 13px;
}

.badge-admin {
    background: #fff;
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.btn-logout {
    background: rgba(255,255,255,.2);
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none !important;
    transition: background .2s;
}

.btn-logout:hover { background: rgba(255,255,255,.35); }

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* === CARDS === */
.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: var(--white);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2, .card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary);
}

.card-body { padding: 20px; }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all .2s;
    text-decoration: none !important;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #5a6268; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #218838; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c82333; color: #fff; }
.btn-warning { background: var(--warning); color: #333; }
.btn-warning:hover { background: #e0a800; }
.btn-accent { background: var(--accent); color: #333; }
.btn-accent:hover { background: var(--accent-dark); color: #333; }
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #138496; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* === FORMS === */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    transition: border-color .2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232,0,13,.1);
}

textarea.form-control { min-height: 100px; resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* === TABLES === */
.table-wrapper { overflow-x: auto; }
table.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.tbl thead tr {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border);
}

table.tbl thead th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--secondary);
    white-space: nowrap;
}

table.tbl tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}

table.tbl tbody tr:hover { background: #fafafa; }
table.tbl tbody td { padding: 10px 14px; }

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-secondary { background: #e2e3e5; color: #383d41; }

/* === ALERTS === */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success { background: #d4edda; color: #155724; border-left: 4px solid var(--success); }
.alert-danger { background: #f8d7da; color: #721c24; border-left: 4px solid var(--danger); }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid var(--warning); }
.alert-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid var(--info); }

/* === STATS CARDS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.stat-icon.red { background: var(--primary); }
.stat-icon.blue { background: var(--info); }
.stat-icon.green { background: var(--success); }
.stat-icon.orange { background: #fd7e14; }

.stat-info h3 { font-size: 26px; font-weight: 700; line-height: 1; }
.stat-info p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* === LOGIN PAGE === */
.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    overflow: hidden;
}

/* akparti.webp filigran arka plan */
.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/uploads/akparti.webp') center center / cover no-repeat;
    opacity: .12;
    pointer-events: none;
}

.login-box {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(2px);
    border-radius: 14px;
    border-top: 5px solid var(--accent);
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo img {
    width: 130px;
    height: auto;
    margin-bottom: 6px;
}

.login-logo i {
    display: inline-block;
    font-size: 46px;
    color: var(--primary);
    background: var(--bg);
    width: 92px;
    height: 92px;
    line-height: 92px;
    text-align: center;
    border-radius: 50%;
    border: 3px solid var(--accent);
}

.login-logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 14px;
}

.login-logo p { font-size: 13px; color: var(--text-muted); }

/* === PAGINATION / FILTER === */
.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* === RAPOR === */
.rapor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) { .rapor-grid { grid-template-columns: 1fr; } }

.progress-bar-wrap {
    background: #e9ecef;
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    transition: width .5s;
}

.progress-bar.green { background: var(--success); }
.progress-bar.blue { background: var(--info); }
.progress-bar.orange { background: #fd7e14; }

/* === YOKLAMA CHECKBOXES === */
.yoklama-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.yoklama-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background .15s;
}

.yoklama-item:hover { background: #f8f9fa; }

/* === AVATAR (yuvarlak personel resmi) === */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    background: #fff;
    flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-muted);
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.avatar-placeholder.avatar-sm { font-size: 16px; }
.avatar-placeholder.avatar-md { font-size: 20px; }
.yoklama-item input[type=checkbox] { cursor: pointer; }

/* === PAGE HEADER === */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary);
}

/* === TALEP SAHIBI SECTION === */
.section-divider {
    border: none;
    border-top: 2px dashed var(--border);
    margin: 20px 0;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 14px;
}

/* === VALIDATION === */
.field-validation-error {
    color: var(--danger);
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

.input-validation-error { border-color: var(--danger) !important; }

.validation-summary-errors {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
}

/* === DETAIL ROW === */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-item label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: .5px;
    display: block;
    margin-bottom: 4px;
}

.detail-item span {
    font-size: 14px;
    color: var(--text);
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: .4; }
.empty-state p { font-size: 15px; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar { padding: 0 12px; }
    .navbar-menu { gap: 0; }
    .nav-link { padding: 8px 8px; font-size: 12px; }
    .container { padding: 16px 10px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
