﻿/* ============================================================
   MAKINE IKMAL SISTEMI - ANA STIL DOSYASI
   ============================================================ */

:root {
    --sidebar-bg: #0d2137;
    --sidebar-hover: #1a3a5c;
    --sidebar-active: #1976d2;
    --sidebar-width: 260px;
    --header-height: 60px;
    --primary: #1976d2;
    --primary-dark: #1565c0;
    --accent: #ffc107;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #f57f17;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border: #dee2e6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--bg); color: var(--text-dark); }

/* ── GİRİŞ SAYFASI ───────────────────────────────────────── */

/* Arka plan fotoğraf katmanı */
#loginBg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url('../img/login/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: kenBurns 20s ease-in-out infinite alternate;
}


@keyframes kenBurns {
    from { transform: scale(1);   transform-origin: center center; }
    to   { transform: scale(1.08); transform-origin: 60% 40%; }
}

.login-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(255,255,255,0.60);
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

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

.login-logo .logo-icon {
    width: 88px;
    height: 88px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    overflow: hidden;
    padding: 6px;
}

.login-logo .logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.login-logo .logo-icon i { font-size: 32px; color: #1976d2; }
.login-logo h5 { color: #0d2137; font-weight: 700; margin-bottom: 4px; }
.login-logo p { color: var(--text-muted); font-size: 0.85rem; }

.login-card .form-label { font-weight: 600; color: var(--text-dark); font-size: 0.9rem; }
.login-card .form-control { border-radius: 8px; padding: 10px 14px; border: 1.5px solid var(--border); font-size: 0.95rem; }
.login-card .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(25,118,210,0.15); }
.login-card .input-group-text { background: #f8f9fa; border: 1.5px solid var(--border); border-radius: 8px 0 0 8px; color: var(--primary); }

.btn-login {
    background: linear-gradient(135deg, #1565c0, #1976d2);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}
.btn-login:hover { background: linear-gradient(135deg, #0d47a1, #1565c0); transform: translateY(-1px); box-shadow: 0 4px 15px rgba(25,118,210,0.4); }

.login-footer { text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 0.8rem; }

/* ── ANA PANEL LAYOUT ─────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── SİDEBAR — AKORDIYON (hover açılır / pin ile sabit kalır) */
.sidebar {
    width: 64px;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: width 0.25s ease;
}

/* Hover VEYA pinli ise tam genişlik */
.sidebar:hover,
.sidebar.pinned {
    width: var(--sidebar-width); /* 260px */
}

/* ── MARKA ALANI */
.sidebar-brand {
    padding: 14px 11px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.brand-icon {
    width: 42px; height: 42px;
    background: #fff;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 2px;
}
.brand-icon i { font-size: 18px; color: #fff; }
.brand-logo-img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text { display: none; white-space: nowrap; }
.brand-text h6 { color: #fff; font-size: 0.8rem; font-weight: 700; margin: 0; line-height: 1.2; }
.brand-text span { color: rgba(255,255,255,0.5); font-size: 0.7rem; }
.sidebar:hover .brand-text,
.sidebar.pinned .brand-text { display: block; }

/* Pin butonu */
.pin-btn {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.pin-btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); }
.pin-btn.active { color: var(--accent); }
.pin-btn.active i { transform: rotate(45deg); }
.pin-btn i { transition: transform 0.2s; }

.sidebar:hover .pin-btn,
.sidebar.pinned .pin-btn { display: block; }

/* ── KULLANICI ALANI */
.sidebar-user {
    padding: 10px 13px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    flex-shrink: 0;
}
.user-avatar {
    width: 38px; height: 38px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-avatar i { font-size: 16px; color: #fff; }
.user-info { display: none; overflow: hidden; }
.user-info .user-name { color: #fff; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.user-info .user-role { color: rgba(255,255,255,0.5); font-size: 0.72rem; white-space: nowrap; }
.sidebar:hover .user-info,
.sidebar.pinned .user-info { display: block; }

/* ── NAVİGASYON */
.sidebar-nav { padding: 8px 0; flex: 1; overflow-y: auto; overflow-x: hidden; }

.nav-section-title {
    display: none;
    color: rgba(255,255,255,0.35);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 20px 4px;
    margin-top: 8px;
    white-space: nowrap;
}
.sidebar:hover .nav-section-title,
.sidebar.pinned .nav-section-title { display: block; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-size: 0.88rem;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar:hover .nav-item,
.sidebar.pinned .nav-item {
    padding: 11px 20px;
    justify-content: flex-start;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: rgba(25,118,210,0.2); color: #fff; border-left-color: var(--primary); }
.nav-item i { width: 20px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }
.nav-item .nav-text { display: none; }
.sidebar:hover .nav-item .nav-text,
.sidebar.pinned .nav-item .nav-text { display: inline; }

/* ── SIDEBAR ALT KISIM */
.sidebar-footer {
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.sidebar-footer .nav-item { border-left: none; }
.sidebar-credit {
    padding: 10px 14px 6px;
    color: rgba(255,255,255,0.45);
    font-size: 0.68rem;
    line-height: 1.4;
}
.sidebar-credit .nav-text { display: none; }
.sidebar:hover .sidebar-credit .nav-text,
.sidebar.pinned .sidebar-credit .nav-text { display: block; }

/* ── HEADER / MAIN CONTENT */
.main-content {
    margin-left: 64px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

/* Sidebar pinli iken içerik kayar */
.app-wrapper.sidebar-pinned .main-content {
    margin-left: var(--sidebar-width);
}

.topbar {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.topbar-title { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); }
.topbar-title span { color: var(--primary); }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date { color: var(--text-muted); font-size: 0.82rem; }

.btn-logout {
    background: transparent;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    display: flex; align-items: center; gap: 6px;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); background: #fff5f5; }

/* Content Area */
.content-area {
    padding: 24px;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

/* ── DASHBOARD ────────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-header h4 { font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.page-header p { color: var(--text-muted); font-size: 0.88rem; margin: 0; }

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon i { font-size: 22px; color: #fff; }
.stat-icon.blue { background: linear-gradient(135deg, #1565c0, #1976d2); }
.stat-icon.green { background: linear-gradient(135deg, #2e7d32, #43a047); }
.stat-icon.orange { background: linear-gradient(135deg, #e65100, #f57c00); }
.stat-icon.red { background: linear-gradient(135deg, #c62828, #e53935); }
.stat-icon.purple { background: linear-gradient(135deg, #4527a0, #7b1fa2); }
.stat-icon.teal { background: linear-gradient(135deg, #00695c, #00897b); }

.stat-info .stat-value { font-size: 1.8rem; font-weight: 700; color: var(--text-dark); line-height: 1; }
.stat-info .stat-label { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}
.dash-loading {
    grid-column: 1 / -1;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
    color: var(--text-muted);
    text-align: center;
}
.dash-module-card {
    --dash-accent: var(--primary);
    background: linear-gradient(180deg, #fff 0%, #fcfcfd 100%);
    border: 1px solid rgba(0,0,0,0.075);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.075);
    min-height: 310px;
    overflow: hidden;
    position: relative;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.dash-module-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--dash-accent);
}
.dash-module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.11);
    border-color: color-mix(in srgb, var(--dash-accent) 30%, rgba(0,0,0,0.075));
}
.dash-module-head {
    padding: 14px 16px 13px 18px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, color-mix(in srgb, var(--dash-accent) 10%, #fff), #fff 68%);
}
.dash-module-head > div {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dash-module-head h5 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 800;
}
.dash-module-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    background: var(--dash-accent);
    box-shadow: 0 7px 14px color-mix(in srgb, var(--dash-accent) 28%, transparent);
}
.dash-module-body {
    padding: 15px 17px 17px 19px;
}
.dash-module-body h6 {
    margin: 12px 0 8px;
    color: color-mix(in srgb, var(--dash-accent) 68%, #424242);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.dash-topline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.dash-metric {
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--dash-accent) 14%, #eeeeee);
    border-radius: 8px;
    padding: 10px 11px;
    min-width: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 1px 3px rgba(0,0,0,0.035);
}
.dash-metric-value {
    font-size: 1.42rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
}
.dash-metric-label {
    color: #757575;
    font-size: 0.74rem;
    margin-top: 3px;
}
.dash-metric-note {
    color: var(--dash-accent);
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.dash-bar-row {
    display: grid;
    grid-template-columns: minmax(72px, 1fr) 1.4fr 28px;
    align-items: center;
    gap: 8px;
    margin: 7px 0;
    font-size: 0.78rem;
}
.dash-bar-row span {
    color: #616161;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-bar-row div {
    height: 8px;
    background: #eef0f2;
    border-radius: 999px;
    overflow: hidden;
}
.dash-bar-row i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--dash-accent), color-mix(in srgb, var(--dash-accent) 55%, #26a69a));
    border-radius: inherit;
}
.dash-bar-row b {
    color: var(--text-dark);
    text-align: right;
}
.dash-donut-wrap {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px;
    align-items: center;
    margin: 10px 0 12px;
    background: #fff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    padding: 10px;
}
.dash-donut-wrap.compact {
    grid-template-columns: 70px 1fr;
}
.dash-donut {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}
.dash-donut-wrap.compact .dash-donut {
    width: 68px;
    height: 68px;
}
.dash-donut::after {
    content: "";
    position: absolute;
    inset: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.035);
}
.dash-donut span {
    position: relative;
    z-index: 1;
    font-weight: 800;
    color: var(--text-dark);
    font-size: 1rem;
}
.dash-legend {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.78rem;
    color: #616161;
}
.dash-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dash-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dash-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
    gap: 8px;
}
.dash-vehicle-summary,
.dash-vehicle-penalty,
.dash-vehicle-checks {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}
.dash-vehicle-summary {
    grid-template-columns: 134px 1fr;
    align-items: stretch;
    gap: 14px;
}
.dash-vehicle-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
    padding: 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--dash-accent) 16%, #fff), #fff);
    border: 1px solid color-mix(in srgb, var(--dash-accent) 18%, #eeeeee);
    box-shadow: 0 3px 12px rgba(46, 125, 50, 0.08);
}
.dash-vehicle-hero span,
.dash-penalty-main span {
    color: #616161;
    font-size: 0.72rem;
    font-weight: 700;
}
.dash-vehicle-hero b {
    color: var(--dash-accent);
    font-size: 2.25rem;
    line-height: 1;
    margin-top: 4px;
}
.dash-vehicle-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(104px, 1fr));
    align-content: center;
    gap: 10px;
}
.dash-vehicle-chips span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eeeeee;
    color: #616161;
    font-size: 0.78rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.035);
}
.dash-vehicle-chips i,
.dash-vehicle-checks i {
    color: var(--dash-accent);
}
.dash-vehicle-chips b {
    color: var(--text-dark);
    font-size: 0.9rem;
}
.dash-vehicle-penalty {
    grid-template-columns: 132px 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
}
.dash-penalty-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 86px;
    min-height: 86px;
    padding: 12px;
    border-radius: 8px;
    background: color-mix(in srgb, #c62828 6%, #fff);
    border: 1px solid color-mix(in srgb, #c62828 20%, #eeeeee);
    box-shadow: 0 4px 14px rgba(198, 40, 40, 0.06);
}
.dash-penalty-main b {
    color: #c62828;
    font-size: 1.9rem;
    line-height: 1;
    margin-top: 3px;
}
.dash-penalty-main em {
    color: #c62828;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 800;
    margin-top: 5px;
}
.dash-penalty-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    align-content: stretch;
    align-items: stretch;
    gap: 10px;
}
.dash-penalty-status span {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    height: 86px;
    min-height: 86px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid color-mix(in srgb, #c62828 13%, #eeeeee);
    color: #616161;
    font-size: 0.72rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.035);
}
.dash-penalty-status b {
    color: var(--text-dark);
    font-size: 1.22rem;
    line-height: 1;
}
.dash-penalty-status small {
    color: #616161;
    font-size: 0.72rem;
    font-weight: 700;
}
.dash-penalty-status em {
    color: #c62828;
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 800;
}
.dash-vehicle-checks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.dash-vehicle-checks > div {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 4px 8px;
    align-items: center;
    min-height: 78px;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eeeeee;
    box-shadow: 0 4px 14px rgba(0,0,0,0.035);
}
.dash-vehicle-checks i {
    grid-row: span 3;
    font-size: 1.1rem;
}
.dash-vehicle-checks strong {
    color: var(--text-dark);
    font-size: 0.82rem;
}
.dash-vehicle-checks span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #616161;
    font-size: 0.72rem;
}
.dash-vehicle-checks b {
    color: var(--dash-accent);
    font-size: 0.78rem;
}
.dash-period {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.dash-period div {
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--dash-accent) 13%, #eeeeee);
    border-radius: 7px;
    padding: 8px 9px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.035);
}
.dash-period b {
    display: block;
    font-size: 1.04rem;
    color: var(--text-dark);
}
.dash-period span {
    color: #757575;
    font-size: 0.7rem;
}
.dash-purchase-period {
    display: grid;
    grid-template-columns: 0.9fr 0.9fr 0.9fr 1.3fr;
    gap: 8px;
    margin-bottom: 12px;
}
.dash-purchase-period > div {
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--dash-accent) 14%, #eeeeee);
    border-radius: 8px;
    padding: 7px 9px;
    min-width: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.035);
}
.dash-purchase-period span,
.dash-purchase-period em {
    display: block;
    color: #757575;
    font-size: 0.7rem;
    font-style: normal;
}
.dash-purchase-period b {
    display: block;
    color: var(--text-dark);
    font-size: 1.08rem;
    line-height: 1.15;
    margin: 2px 0 1px;
}
.dash-purchase-period em {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-purchase-publish {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 8px;
    align-items: center;
}
.dash-purchase-publish > span {
    grid-column: 1 / -1;
    margin-bottom: 4px;
}
.dash-tiny-pie {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    padding: 0;
    border: 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.dash-tiny-pie-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.dash-tiny-pie-lines span {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    color: #616161;
    font-size: 0.66rem;
    line-height: 1.05;
    white-space: nowrap;
}
.dash-tiny-pie-lines i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dash-tiny-pie-lines b {
    display: inline;
    margin: 0;
    color: var(--text-dark);
    font-size: 0.68rem;
}
.dash-stage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.dash-stage-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.dash-stage-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    align-items: start;
    gap: 8px;
    min-height: 34px;
    padding: 5px 8px;
    background: #fff;
    border: 1px solid #eeeeee;
    border-radius: 7px;
}
.dash-stage-row span {
    min-width: 0;
    color: #616161;
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.dash-stage-row b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--dash-accent) 12%, #f8f8f8);
    color: var(--dash-accent);
    font-size: 0.76rem;
    margin-top: 1px;
}
.dash-workshop-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 20px;
}
.dash-compare {
    background: #fff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    padding: 13px 12px 11px;
}
.dash-compare-row {
    display: grid;
    grid-template-columns: 44px 1fr 46px;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.76rem;
}
.dash-compare-row > span {
    color: #616161;
    font-weight: 700;
}
.dash-compare-row > b {
    color: var(--text-dark);
    font-size: 0.74rem;
    text-align: right;
    font-family: monospace;
}
.dash-compare-bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.dash-compare-bars i {
    display: block;
    height: 8px;
    border-radius: 999px;
}
.dash-compare-bars i.open,
.dash-compare-legend i.open {
    background: #1565c0;
}
.dash-compare-bars i.closed,
.dash-compare-legend i.closed {
    background: #2e7d32;
}
.dash-compare-legend {
    display: flex;
    gap: 12px;
    border-top: 1px dashed #e0e0e0;
    padding-top: 10px;
    margin-top: 4px;
    color: #757575;
    font-size: 0.7rem;
}
.dash-compare-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.dash-compare-legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dash-workshop-location {
    margin-top: 40px;
}
.dash-center-number {
    font-size: 3.35rem;
    font-weight: 900;
    color: var(--dash-accent);
    text-align: center;
    margin-top: 38px;
    line-height: 1;
    text-shadow: 0 8px 18px color-mix(in srgb, var(--dash-accent) 18%, transparent);
}
.dash-center-label {
    max-width: 300px;
    margin: 12px auto 0;
    text-align: center;
    color: #616161;
    font-size: 0.88rem;
    line-height: 1.35;
}
.dash-muted-line,
.dash-empty,
.dash-locked {
    color: #9e9e9e;
    font-size: 0.82rem;
    padding: 8px 0;
}
.dash-muted-line {
    border-top: 1px dashed #e0e0e0;
    margin-top: 8px;
    padding-top: 10px;
}
.dash-locked {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    min-height: 210px;
}

@media (max-width: 980px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dash-split { grid-template-columns: 1fr; }
    .dash-workshop-compare { grid-template-columns: 1fr; }
    .dash-purchase-period { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .atolye-performans-ozet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .atolye-performans-grid { grid-template-columns: 1fr; }
    .dash-vehicle-summary,
    .dash-vehicle-penalty { grid-template-columns: 1fr; }
    .dash-vehicle-chips,
    .dash-penalty-status,
    .dash-vehicle-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── KARTLAR & TABLOLAR ───────────────────────────────────── */
.card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: visible;
}
.card-header {
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
    overflow: visible;
}
.card-header h6 { font-weight: 700; margin: 0; color: var(--text-dark); font-size: 0.95rem; }
.card-body { padding: 20px; }

.table-wrapper { overflow-x: auto; border-radius: 0 0 12px 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table thead th {
    background: #f8f9fa;
    padding: 12px 14px;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    text-align: left;
}
.data-table thead th.th-resizable {
    position: relative;
}
.sutun-genislik-tutamac {
    position: absolute;
    top: 0;
    right: -3px;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 3;
}
.sutun-genislik-tutamac::after {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 3px;
    width: 1px;
    background: transparent;
}
.data-table thead th.th-resizable:hover .sutun-genislik-tutamac::after,
.data-table thead th.genislik-ayarlaniyor .sutun-genislik-tutamac::after {
    background: var(--primary);
}
body.sutun-genislik-surukleniyor {
    cursor: col-resize !important;
    user-select: none;
}
.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
#tfUrunlerTablosu {
    table-layout: fixed;
}
#tfUrunlerTablosu thead th {
    padding: 8px 7px;
}
#tfUrunlerTablosu tbody td {
    padding: 6px 5px;
}
#tfUrunlerTablosu .form-control {
    padding: 6px 7px;
    min-height: 34px;
}
#tfUrunlerTablosu .tf-sira-no {
    padding-left: 2px;
    padding-right: 2px;
}
#tfUrunlerTablosu tbody td:last-child {
    padding-left: 2px;
    padding-right: 2px;
}
.personel-data-table {
    width: max-content;
    min-width: 100%;
}
.personel-data-table th,
.personel-data-table td {
    white-space: nowrap;
}
#hrListeTab,
.hr-personel-list-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
#hrListeTab {
    overflow: visible;
}
.hr-personel-list-card {
    max-width: calc(100vw - 112px);
}
.app-wrapper.sidebar-pinned .hr-personel-list-card {
    max-width: calc(100vw - var(--sidebar-width) - 48px);
}
.hr-personel-list-card .card-header {
    width: 100%;
    min-width: 0;
}
.hr-personel-toolbar {
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
}
.hr-personel-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    contain: inline-size;
}
.data-table tbody tr:hover { background: #f8f9ff; }
.data-table tbody tr:last-child td { border-bottom: none; }
.th-sirala { cursor: pointer; user-select: none; }
.th-sirala:hover { background: #eef2fb !important; color: var(--primary) !important; }
.th-filtreli {
    position: relative;
    padding-right: 34px !important;
}
.th-filtreli > span {
    display: inline-block;
    max-width: 100%;
}
.kolon-filtre-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #9aa5b1;
    opacity: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
}
.th-filtreli:hover .kolon-filtre-btn,
.kolon-filtre-btn.aktif {
    opacity: 1;
}
.kolon-filtre-btn:hover,
.kolon-filtre-btn.aktif {
    color: var(--primary);
    background: #e8f0fe;
    border-color: #c7d7fb;
}
.kolon-filtre-popup {
    position: fixed;
    z-index: 10000;
    width: 340px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid #cfd8dc;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    border-radius: 8px;
    padding: 0;
    color: var(--text-dark);
}
.kolon-filtre-tabs {
    display: flex;
    gap: 22px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.kolon-filtre-tabs strong {
    font-size: 0.86rem;
}
.kolon-filtre-bolum {
    padding: 12px 14px;
    border-bottom: 1px solid #eef1f4;
}
.kolon-filtre-altbaslik {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.kolon-filtre-values {
    max-height: 210px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-top: 8px;
    background: #fff;
}
.kolon-filtre-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-bottom: 1px solid #f1f3f5;
    font-size: 0.84rem;
    cursor: pointer;
}
.kolon-filtre-value-row:last-child {
    border-bottom: none;
}
.kolon-filtre-value-row:hover {
    background: #f5f8ff;
}
.kolon-filtre-date-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    font-size: 0.84rem;
}
.kolon-filtre-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.kolon-filtre-footer {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    background: #fafafa;
    border-radius: 0 0 8px 8px;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-warning { background: #fff8e1; color: #f57f17; }
.badge-info { background: #e3f2fd; color: #1565c0; }
.badge-secondary { background: #f5f5f5; color: #616161; }
.badge-purple { background: #f3e5f5; color: #6a1b9a; }

/* Butonlar */
.btn { border-radius: 8px; font-weight: 600; font-size: 0.85rem; padding: 8px 16px; cursor: pointer; border: none; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: #43a047; color: #fff; }
.btn-success:hover { background: #2e7d32; }
.btn-danger { background: #e53935; color: #fff; }
.btn-danger:hover { background: #c62828; }
.btn-warning { background: #fb8c00; color: #fff; }
.btn-warning:hover { background: #e65100; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-dark); }
.btn-outline:hover { background: #f5f5f5; }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-icon { padding: 6px 8px; }

/* Form Elemanları */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; color: var(--text-dark); }
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(25,118,210,0.12); }
input[type="text"].form-control, textarea.form-control { text-transform: uppercase; }
.form-select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
}
.form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(25,118,210,0.12); }

.required { color: #e53935; }

/* ── GLOBAL MODAL BACKDROP ───────────────────────────────── */
#modalBackdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.48);
    z-index: 1998;
    display: none;
    transition: opacity 0.2s;
}
#modalBackdrop.active { display: block; }

/* ── AÇIK PENCERELER HAVUZU (FAB) ────────────────────────── */
#modalHavuzu {
    position: fixed; bottom: 20px; right: 20px;
    z-index: 3500;
    display: none;
}
#modalHavuzu.gorunur { display: block; }

#modalHavuzBtn {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(25,118,210,0.45);
    font-size: 1.1rem;
    position: relative;
    transition: transform 0.15s, background 0.15s;
    display: flex; align-items: center; justify-content: center;
}
#modalHavuzBtn:hover { transform: scale(1.1); background: var(--primary-dark); }

.havuz-badge {
    position: absolute; top: -5px; right: -5px;
    background: #e53935; color: #fff;
    border-radius: 50%; width: 20px; height: 20px;
    font-size: 0.68rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
    pointer-events: none;
}

.havuz-liste {
    position: absolute; bottom: calc(100% + 10px); right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    width: 280px;
    max-height: 420px;
    overflow-y: auto;
    display: none;
    border: 1px solid var(--border);
}
.havuz-liste.acik { display: block; }

.havuz-baslik {
    padding: 12px 16px 10px;
    font-size: 0.72rem; font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: #fff; z-index: 1;
}

.havuz-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
}
.havuz-item:last-child { border-bottom: none; }
.havuz-item:hover { background: #f8f9ff; }

.havuz-item-ikon {
    width: 34px; height: 34px; border-radius: 8px;
    background: #e8f0fe; color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; flex-shrink: 0;
}

.havuz-item-metin {
    flex: 1; min-width: 0; cursor: pointer;
}
.havuz-item-baslik {
    font-size: 0.82rem; font-weight: 600; color: var(--text-dark);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.havuz-item-alt {
    font-size: 0.73rem; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 1px;
}

.havuz-item-geri {
    background: none; border: none;
    color: var(--primary); cursor: pointer;
    padding: 4px 6px; border-radius: 6px;
    font-size: 0.8rem; flex-shrink: 0;
    transition: background 0.1s;
}
.havuz-item-geri:hover { background: #e8f0fe; }

.havuz-item-kapat {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    padding: 4px 6px; border-radius: 6px;
    font-size: 0.8rem; flex-shrink: 0;
    transition: background 0.1s;
}
.havuz-item-kapat:hover { background: #ffebee; color: #c62828; }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    pointer-events: none;
    z-index: 2000;
    opacity: 0; visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-overlay.minimized { display: none; }

.modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.2s, box-shadow 0.15s;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    pointer-events: all;
}
.modal-overlay.active .modal-box { transform: translateY(0); }
.modal-box.modal-lg { max-width: 760px; }
.modal-box.modal-xl { max-width: 1100px; width: 96%; }
.modal-box.odak { box-shadow: 0 28px 80px rgba(0,0,0,0.38); }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h5 { font-weight: 700; margin: 0; color: var(--text-dark); flex: 1; }
.modal-header-actions { display: flex; align-items: center; gap: 2px; }
.modal-minimize {
    background: none; border: none;
    font-size: 0.95rem; cursor: pointer;
    color: var(--text-muted); padding: 4px 8px; border-radius: 6px;
    line-height: 1;
}
.modal-minimize:hover { background: #fff3e0; color: #e65100; }
.modal-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: #ffebee; color: #c62828; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Alert */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.88rem; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.alert-danger { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-warning { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }

/* Arama Kutusu */
.search-box { position: relative; }
.search-box input { padding-left: 36px; }
.search-box i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; }

.sigorta-filo-toolbar {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.sigorta-filo-arama {
    position: relative;
    margin-left: auto;
    width: 260px;
    max-width: 100%;
}
.sigorta-filo-arama i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #607d8b;
    font-size: 0.85rem;
    pointer-events: none;
}
.sigorta-filo-arama input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    border: 1.5px solid #d7dee8;
    border-radius: 8px;
    background: #fff;
    color: var(--text-dark);
    font-size: 0.86rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.sigorta-filo-arama input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25,118,210,0.12);
}

/* Boş Durum */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 12px; opacity: 0.3; display: block; }
.empty-state p { font-size: 0.9rem; margin: 0; }

.atolye-performans-ozet {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 14px 0;
}
.ap-kpi {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 76px;
}
.ap-kpi-ikon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3f2fd;
    color: var(--primary);
    flex-shrink: 0;
}
.ap-kpi strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.1;
    color: var(--text-dark);
}
.ap-kpi span {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 3px;
}
.ap-kpi small {
    display: block;
    color: #78909c;
    font-size: 0.72rem;
    margin-top: 2px;
}
.atolye-performans-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
}
.atolye-analiz-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.analiz-panel-baslik {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.analiz-panel-baslik span {
    font-weight: 800;
    color: var(--text-dark);
    font-size: 0.9rem;
}
.analiz-panel-baslik small {
    color: var(--text-muted);
    font-size: 0.74rem;
}
.atolye-performans-bar {
    padding: 10px 14px;
    border-bottom: 1px solid #eef1f4;
}
.atolye-performans-bar:last-child {
    border-bottom: none;
}
.ap-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-dark);
}
.ap-bar-head strong {
    font-size: 0.9rem;
    color: var(--primary);
}
.ap-bar-track {
    height: 7px;
    border-radius: 999px;
    background: #edf2f7;
    overflow: hidden;
    margin-top: 7px;
}
.ap-bar-track div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1976d2, #43a047);
}
.atolye-performans-bar small {
    display: block;
    margin-top: 5px;
    font-size: 0.74rem;
    color: #78909c;
}

@media (max-width: 980px) {
    .atolye-performans-ozet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .atolye-performans-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .atolye-performans-ozet { grid-template-columns: 1fr; }
    .analiz-panel-baslik { align-items: flex-start; flex-direction: column; }
}

/* Yakında */
.coming-soon {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}
.coming-soon i { font-size: 4rem; margin-bottom: 16px; color: #e0e0e0; display: block; }
.coming-soon h5 { color: var(--text-dark); font-weight: 700; margin-bottom: 8px; }
.coming-soon p { font-size: 0.88rem; max-width: 300px; margin: 0 auto; }

/* Toast Bildirim */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: #fff;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 12px;
    min-width: 280px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
}
.toast.toast-success { border-left-color: #43a047; }
.toast.toast-success i { color: #43a047; }
.toast.toast-danger { border-left-color: #e53935; }
.toast.toast-danger i { color: #e53935; }
.toast.toast-warning { border-left-color: #fb8c00; }
.toast.toast-warning i { color: #fb8c00; }
.toast span { font-size: 0.88rem; color: var(--text-dark); }

@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* Yardımcı */
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.fw-bold { font-weight: 700; }
.d-none { display: none !important; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.ms-auto { margin-left: auto; }
.me-2 { margin-right: 8px; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-3 { margin-top: 16px; }
.w-100 { width: 100%; }
.row { display: grid; gap: 20px; }
.row-2 { grid-template-columns: repeat(2, 1fr); }
.row-3 { grid-template-columns: repeat(3, 1fr); }
.row-4 { grid-template-columns: repeat(4, 1fr); }
.row-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1200px) { .row-4 { grid-template-columns: repeat(2, 1fr); } .row-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .row-2, .row-3, .row-4, .row-6 { grid-template-columns: 1fr; } .sidebar { transform: translateX(-100%); } .main-content { margin-left: 0; } }

/* Separator */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── FORM BÖLÜMLERİ ──────────────────────────────────────── */
.form-section { margin-bottom: 22px; }
.form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding-bottom: 8px;
    margin-bottom: 14px;
    border-bottom: 2px solid #e3f2fd;
}

/* ── FOTOĞRAF ────────────────────────────────────────────── */
.foto-alani { display: flex; align-items: center; gap: 16px; }
.foto-onizleme {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    display: block;
}
.foto-onizleme-placeholder {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #f5f5f5;
    border: 2px dashed #c0c0c0;
    display: flex; align-items: center; justify-content: center;
    color: #bdbdbd;
    font-size: 1.6rem;
    flex-shrink: 0;
}

/* ── ÇOKLU SEÇİM DROPDOWN (Ehliyet vb.) ─────────────────── */
.coklu-secim { position: relative; }

.coklu-secim-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    font-size: 0.9rem;
    transition: border-color 0.15s;
    user-select: none;
}
.coklu-secim-trigger:hover { border-color: #9e9e9e; }
.coklu-secim.acik .coklu-secim-trigger { border-color: var(--primary); border-radius: 8px 8px 0 0; }
.coklu-secim.acik .coklu-secim-trigger i { transform: rotate(180deg); }
.coklu-secim-trigger i { transition: transform 0.2s; }

.coklu-secim-liste {
    display: none;
    position: absolute;
    left: 0; right: 0;
    background: #fff;
    border: 1.5px solid var(--primary);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 200;
    max-height: 220px;
    overflow-y: auto;
}
.coklu-secim.acik .coklu-secim-liste { display: block; }

.coklu-secim-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: background 0.1s;
}
.coklu-secim-item:hover { background: #f5f7ff; }
.coklu-secim-item:has(input:checked) { background: #f0f7ff; color: var(--primary); }

/* ── PERSONEL BELGE / EVRAK ALANI ────────────────────────── */
.pbelge-blok { background: #f8f9fb; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.pbelge-blok-baslik {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.pbelge-blok-baslik i { margin-right: 5px; }
.pbelge-bos { text-align: center; color: #bdbdbd; font-size: 0.82rem; padding: 10px 0; }
.pbelge-item {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid #e8eaed;
    border-radius: 8px; padding: 8px 10px;
    margin-bottom: 6px; transition: box-shadow 0.1s;
}
.pbelge-item:last-child { margin-bottom: 0; }
.pbelge-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.pbelge-metin { flex: 1; min-width: 0; }
.pbelge-ad   { font-size: 0.83rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbelge-tarih { font-size: 0.73rem; color: var(--text-muted); margin-top: 1px; }
.pbelge-form {
    background: #fff; border: 1.5px dashed var(--primary);
    border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
}
.pbelge-form-aksiyonlar { display: flex; gap: 8px; margin-top: 8px; }
.coklu-secim-item input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; flex-shrink: 0; }

.avans-kalem-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    min-width: 1120px;
    font-size: 0.82rem;
    background: #fff;
}
.avans-modal-box {
    width: 94vw;
    max-width: 1280px;
}
.avans-modal-box .form-control[readonly],
.avans-modal-box .form-control:disabled,
.avans-modal-box .form-select:disabled {
    background: #f5f6f8;
    color: #6b7280;
    cursor: default;
    border-color: #e1e5ea;
}
.avans-kalem-table th {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    padding: 7px 8px;
    color: var(--text-muted);
    font-weight: 800;
    white-space: nowrap;
}
.avans-kalem-table td {
    border: 1px solid #e0e0e0;
    padding: 5px 7px;
    vertical-align: middle;
}
.avans-kalem-table input,
.avans-kalem-table select {
    width: 100%;
    min-width: 90px;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 5px 6px;
    background: transparent;
    font-size: 0.8rem;
}
.avans-kalem-table input:focus,
.avans-kalem-table select:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}
.avans-kalem-table td:nth-child(7),
.avans-kalem-table td:nth-child(9) {
    text-align: right;
    white-space: nowrap;
}
.avans-kalem-table th:nth-child(1),
.avans-kalem-table td:nth-child(1) { width: 42px; }
.avans-kalem-table th:nth-child(2),
.avans-kalem-table td:nth-child(2) { width: 132px; white-space: nowrap; }
.avans-kalem-table th:nth-child(3),
.avans-kalem-table td:nth-child(3) { width: 158px; }
.avans-kalem-table th:nth-child(4),
.avans-kalem-table td:nth-child(4) { width: 132px; }
.avans-kalem-table th:nth-child(5),
.avans-kalem-table td:nth-child(5) { width: 180px; }
.avans-kalem-table th:nth-child(6),
.avans-kalem-table td:nth-child(6) { width: 88px; }
.avans-kalem-table th:nth-child(7),
.avans-kalem-table td:nth-child(7) { width: 92px; }
.avans-kalem-table th:nth-child(8),
.avans-kalem-table td:nth-child(8) { width: auto; }
.avans-kalem-table th:nth-child(9),
.avans-kalem-table td:nth-child(9) { width: 110px; }
.avans-kalem-table td:nth-child(2) span {
    white-space: nowrap;
}
.avans-kalem-table td:nth-child(3) input {
    font-family: monospace;
    letter-spacing: 0.2px;
}
.avans-kalem-table td.avans-cell-sira {
    width: 42px;
    text-align: center;
}
.avans-kalem-table td.avans-cell-sira,
.avans-kalem-table td.avans-cell-fis,
.avans-kalem-table td.avans-cell-tur,
.avans-kalem-table td.avans-cell-adet {
    background: #f7f8fa;
    color: #5f6875;
}
.avans-kalem-table td.avans-cell-fis {
    width: 132px;
    text-align: center;
    white-space: nowrap;
}
.avans-kalem-table td.avans-cell-fatura-no {
    width: 158px;
}
.avans-kalem-table td.avans-cell-fatura-tarih {
    width: 132px;
}
.avans-kalem-table td.avans-cell-firma {
    width: 180px;
}
.avans-kalem-table td.avans-cell-tur {
    width: 88px;
    text-align: center;
}
.avans-kalem-table td.avans-cell-adet {
    width: 92px;
    text-align: center;
    white-space: nowrap;
}
.avans-kalem-table td.avans-cell-aciklama {
    text-align: left;
}
.avans-kalem-table td.avans-cell-tutar {
    width: 110px;
    text-align: right;
}
.avans-kalem-table .avans-cell-fatura-no input,
.avans-kalem-table .avans-cell-fatura-tarih input {
    text-align: center;
}
.avans-kalem-table .avans-cell-tutar input {
    text-align: right;
    font-family: monospace;
}

.arac-avans-kalem-table th:nth-child(1),
.arac-avans-kalem-table td:nth-child(1) { width: 56px; }
.arac-avans-kalem-table th:nth-child(2),
.arac-avans-kalem-table td:nth-child(2) { width: 158px; }
.arac-avans-kalem-table th:nth-child(3),
.arac-avans-kalem-table td:nth-child(3) { width: 132px; }
.arac-avans-kalem-table th:nth-child(4),
.arac-avans-kalem-table td:nth-child(4) { width: 180px; }
.arac-avans-kalem-table th:nth-child(5),
.arac-avans-kalem-table td:nth-child(5) { width: 110px; }
.arac-avans-kalem-table th:nth-child(6),
.arac-avans-kalem-table td:nth-child(6) { width: 92px; }
.arac-avans-kalem-table th:nth-child(7),
.arac-avans-kalem-table td:nth-child(7) { width: auto; }
.arac-avans-kalem-table th:nth-child(8),
.arac-avans-kalem-table td:nth-child(8) { width: 112px; }
.arac-avans-kalem-table td:nth-child(6) { text-align: center; }
.arac-avans-kalem-table td:nth-child(7) { text-align: left; }
.arac-avans-kalem-table td:nth-child(8) { text-align: right; white-space: nowrap; }
.arac-avans-kalem-table input,
.arac-avans-kalem-table select {
    min-width: 0;
    box-sizing: border-box;
}
.arac-avans-kalem-table td.avans-cell-tur,
.arac-avans-kalem-table td.avans-cell-adet {
    background: #fff;
    color: var(--text);
}

/* ── SİGORTA TEKLİF TABLOSU — EN UYGUN FİYAT ─────────────── */
.en-uygun { background: #e8f5e9 !important; }
.en-uygun input { background: #e8f5e9 !important; border-color: #66bb6a !important; color: #1b5e20 !important; font-weight: 700 !important; }

/* ── SÜTUN SEÇİCİ PANELİ ─────────────────────────────────── */
.sutun-panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.13);
    z-index: 500;
    min-width: 230px;
    max-height: 340px;
    overflow-y: auto;
}
.sutun-panel-baslik {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 8px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.sutun-panel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: grab;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: background 0.1s;
}
.sutun-panel-item:hover { background: #f5f5f5; }
.sutun-panel-item:active { cursor: grabbing; }
.sutun-panel-item.surukleniyor {
    opacity: 0.45;
    background: #e8f0fe;
    outline: 1px dashed var(--primary);
}
.sutun-surukle-tutamac {
    width: 12px;
    color: #b0b6bd;
    font-size: 0.78rem;
    flex: 0 0 auto;
}
.sutun-panel-item:hover .sutun-surukle-tutamac { color: var(--primary); }
.sutun-panel-item input { accent-color: var(--primary); cursor: pointer; }
.sutun-panel-item span { flex: 1; }
.sutun-panel-item small { color: #bdbdbd; font-size: 0.68rem; margin-left: auto; }
.sutun-panel-item.zorunlu { opacity: 0.68; }

.excel-aktar-btn {
    color: #217346;
    border-color: #217346;
    background: #fff;
}
.excel-aktar-btn:hover {
    color: #fff;
    border-color: #217346;
    background: #217346;
}
.excel-aktar-btn i { font-size: 1rem; }

.tge-secim-sonuclari {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 120;
    max-height: 230px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.14);
    padding: 4px;
}
.tge-secim-satiri {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.tge-secim-satiri:hover { background: #f3f6fa; }
.tge-secim-satiri strong { font-size: 0.84rem; }
.tge-secim-satiri span { font-size: 0.74rem; color: var(--text-muted); }
.tge-secim-bos { padding: 14px 10px; color: var(--text-muted); text-align: center; font-size: 0.82rem; }
.tge-yer-ekleme {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}
.tge-secili-liste {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.tge-secili-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 7px 9px 7px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fafbfc;
}
.tge-secili-item > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tge-secili-item strong {
    overflow-wrap: anywhere;
    font-size: 0.84rem;
}
.tge-secili-item span {
    color: var(--text-muted);
    font-size: 0.74rem;
}
.tge-secili-bos {
    padding: 10px 12px;
    border: 1px dashed var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
}
@media (max-width: 768px) {
    .tge-yer-ekleme { grid-template-columns: 1fr; }
}

/* Rol Checkbox Listesi */
.role-list { display: flex; flex-direction: column; gap: 6px; max-height: 380px; overflow-y: auto; padding-right: 4px; }
.role-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}
.role-item:hover { border-color: var(--primary); background: #f0f7ff; }
.role-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.role-item.admin-role { border-color: #7b1fa2; background: #faf0ff; }
.role-item.admin-role:hover { background: #f3e5f5; }
.role-item.disabled { opacity: 0.45; pointer-events: none; }
.role-item .role-label { font-size: 0.88rem; font-weight: 600; color: var(--text-dark); }
.role-item .role-desc { font-size: 0.75rem; color: var(--text-muted); }
/* Sekme bazlı yetki — modül grubu */
.rol-modul-grup { display: flex; flex-direction: column; gap: 3px; }
.role-item.rol-modul-baslik { background: #f5f7fa; font-weight: 700; }
.role-item.rol-modul-baslik:hover { background: #eef2ff; }
.rol-sekme-listesi { display: flex; flex-direction: column; gap: 3px; padding-left: 20px; }
.role-item.rol-sekme-item { border-style: dashed; padding: 6px 10px; }
.role-item.rol-sekme-item .role-label { font-weight: 500; color: var(--text-muted); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c0c0c0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0a0a0; }
