/* =========================================================================
   41 Özel Güvenlik CRM — Tema
   Rotasis esintili indigo/mor tema + altın (gold) marka vurgusu
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Marka renkleri */
    --indigo-50:  #eef2ff;
    --indigo-100: #e0e7ff;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;
    --purple-500: #8b5cf6;
    --purple-600: #7c3aed;

    --primary:      #4f46e5;
    --primary-dark: #4338ca;
    --primary-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --purple-grad:  linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    --orange-grad:  linear-gradient(135deg, #f59e0b 0%, #f97316 100%);

    /* Altın marka aksanı (logo ile uyum) */
    --gold:      #c8962a;
    --gold-soft: #e0b64f;
    --gold-grad: linear-gradient(135deg, #e0b64f 0%, #c8962a 100%);

    /* Sidebar (koyu) */
    --sidebar-bg:     #171733;
    --sidebar-bg-2:   #1e1e40;
    --sidebar-item:   #a9abcf;
    --sidebar-active: #ffffff;
    --sidebar-hover:  #26264d;

    /* Zemin & yüzeyler */
    --bg:        #f5f6fb;
    --surface:   #ffffff;
    --border:    #e8eaf3;
    --border-2:  #eef0f7;

    /* Metin */
    --text:      #1e2138;
    --text-soft: #6b7090;
    --text-mute: #9aa0bd;

    /* Durum renkleri */
    --success: #10b981;
    --danger:  #ef4444;
    --warning: #f59e0b;
    --info:    #3b82f6;

    /* Ölçü */
    --radius:    16px;
    --radius-sm: 10px;
    --radius-lg: 22px;
    --sidebar-w: 268px;
    --sidebar-w-collapsed: 82px;
    --topbar-h:  74px;

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow:    0 4px 20px rgba(30, 33, 56, .06);
    --shadow-md: 0 10px 30px rgba(30, 33, 56, .10);
    --shadow-lg: 0 20px 50px rgba(30, 33, 56, .16);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img { max-width: 100%; display: block; }
/* Satır içi SVG ikonlar varsayılan olarak metin boyutunda; kapsayıcı kuralları geçersiz kılar */
svg { flex-shrink: 0; width: 1em; height: 1em; }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--text); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3d6e6; border-radius: 20px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b9bdd6; }

/* =========================================================================
   UYGULAMA KABUĞU
   ========================================================================= */
.app-shell { display: flex; min-height: 100vh; }

/* ------------------------------- Sidebar --------------------------------- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    background-image: linear-gradient(180deg, #1a1a3a 0%, #141430 100%);
    color: var(--sidebar-item);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    transition: width .22s ease, transform .22s ease;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px;
    min-height: var(--topbar-h);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar__logo {
    width: 46px; height: 46px;
    border-radius: 13px;
    background: var(--gold-grad);
    display: grid; place-items: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(200,150,42,.35);
    overflow: hidden;
}
.sidebar__logo img { width: 38px; height: 38px; object-fit: contain; }
.sidebar__brand-text { display: flex; flex-direction: column; overflow: hidden; }
.sidebar__brand-title { color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .2px; white-space: nowrap; }
.sidebar__brand-sub { color: var(--gold-soft); font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; white-space: nowrap; }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 16px 14px 20px; }
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border: none; }

.sidebar__section { margin: 18px 8px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #5b5f8c; }
.sidebar__section:first-child { margin-top: 4px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--sidebar-item);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 3px;
    position: relative;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}
.nav-item svg { width: 20px; height: 20px; stroke-width: 1.9; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-hover); color: #e6e7f7; }
.nav-item.active {
    background: var(--primary-grad);
    color: #fff;
    box-shadow: 0 8px 20px rgba(79,70,229,.4);
}
.nav-item.active svg { stroke-width: 2.2; }
.nav-item__badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    min-width: 20px; height: 20px;
    border-radius: 20px;
    display: grid; place-items: center;
    padding: 0 6px;
}
.nav-item.active .nav-item__badge { background: rgba(255,255,255,.25); }

.sidebar__footer {
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 14px;
}
.sidebar__user { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 12px; }
.sidebar__user:hover { background: var(--sidebar-hover); }
.sidebar__user .avatar { flex-shrink: 0; }
.sidebar__user-info { overflow: hidden; }
.sidebar__user-name { color: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-role { color: var(--text-mute); font-size: 11.5px; }
.sidebar__user .dot-online { width: 9px; height: 9px; border-radius: 50%; background: var(--success); margin-left: auto; box-shadow: 0 0 0 3px rgba(16,185,129,.2); }

.sidebar__collapse {
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    margin-top: 8px;
    padding: 10px 14px;
    border: none; background: transparent; cursor: pointer;
    color: var(--sidebar-item); border-radius: 12px; font-size: 13.5px;
}
.sidebar__collapse:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar__collapse svg { width: 20px; height: 20px; }

/* Daraltılmış sidebar */
body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .sidebar__brand-text,
body.sidebar-collapsed .sidebar__section,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .sidebar__user-info,
body.sidebar-collapsed .sidebar__user .dot-online,
body.sidebar-collapsed .sidebar__collapse span { display: none; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 11px; }
body.sidebar-collapsed .nav-item__badge { position: absolute; top: 4px; right: 4px; margin: 0; }
body.sidebar-collapsed .sidebar__brand { justify-content: center; padding: 20px 0; }
body.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .sidebar__collapse { justify-content: center; }
body.sidebar-collapsed .sidebar__user { justify-content: center; }

/* ------------------------------- Main ------------------------------------ */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    transition: margin .22s ease;
    display: flex;
    flex-direction: column;
}

/* ------------------------------- Topbar ---------------------------------- */
.topbar {
    height: var(--topbar-h);
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 26px;
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar__title { font-size: 21px; font-weight: 800; }
.topbar__spacer { flex: 1; }

.topbar__search {
    position: relative;
    width: 320px;
    max-width: 34vw;
}
.topbar__search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-mute); }
.topbar__search input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    background: #f7f8fc;
    border-radius: 12px;
    padding: 0 14px 0 42px;
    outline: none;
    transition: border .15s, box-shadow .15s, background .15s;
}
.topbar__search input:focus { border-color: var(--indigo-500); background: #fff; box-shadow: 0 0 0 4px var(--indigo-50); }
.topbar__search kbd {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    font-size: 11px; padding: 2px 7px; color: var(--text-mute); font-family: inherit;
}

/* Arama sonuç kutusu */
.search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow-lg);
    max-height: 400px; overflow-y: auto; padding: 8px; z-index: 60; display: none;
}
.search-results.open { display: block; }
.search-results a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
}
.search-results a:hover { background: var(--indigo-50); }
.search-results__name { font-weight: 600; }
.search-results__meta { font-size: 12px; color: var(--text-soft); }
.search-results__empty { padding: 18px; text-align: center; color: var(--text-soft); }

.topbar__icon-btn {
    position: relative;
    width: 44px; height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    display: grid; place-items: center;
    cursor: pointer;
    color: var(--text-soft);
    transition: background .15s, color .15s, border .15s;
}
.topbar__icon-btn:hover { background: var(--indigo-50); color: var(--primary); border-color: var(--indigo-100); }
.topbar__icon-btn svg { width: 20px; height: 20px; }
.topbar__icon-btn .badge-count {
    position: absolute; top: -6px; right: -6px;
    background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
    min-width: 19px; height: 19px; border-radius: 20px; display: grid; place-items: center;
    padding: 0 5px; border: 2px solid #fff;
}

.topbar__user {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    padding: 5px 10px 5px 5px; border-radius: 12px; border: 1px solid transparent;
}
.topbar__user:hover { background: #f4f5fb; border-color: var(--border); }
.topbar__user-name { font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.topbar__user-role { font-size: 11.5px; color: var(--text-soft); }

/* Açılır menü */
.dropdown { position: relative; }
.dropdown__menu {
    position: absolute; top: calc(100% + 10px); right: 0;
    min-width: 220px; background: #fff; border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 70;
    display: none; animation: dropIn .14s ease;
}
.dropdown.open .dropdown__menu { display: block; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px);} to { opacity: 1; transform: translateY(0);} }
.dropdown__item {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
    color: var(--text); font-size: 13.5px; width: 100%; border: none; background: none; cursor: pointer; text-align: left;
}
.dropdown__item svg { width: 18px; height: 18px; color: var(--text-soft); }
.dropdown__item:hover { background: var(--indigo-50); color: var(--primary); }
.dropdown__item:hover svg { color: var(--primary); }
.dropdown__item.danger:hover { background: #fef2f2; color: var(--danger); }
.dropdown__item.danger:hover svg { color: var(--danger); }
.dropdown__divider { height: 1px; background: var(--border); margin: 6px 4px; }
.dropdown__header { padding: 10px 12px 8px; font-size: 12px; color: var(--text-mute); font-weight: 600; }

/* ------------------------------- Content --------------------------------- */
.content { padding: 26px; flex: 1; }
.content-narrow { max-width: 960px; margin: 0 auto; width: 100%; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head__title { font-size: 24px; font-weight: 800; }
.page-head__sub { color: var(--text-soft); margin-top: 3px; font-size: 13.5px; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.breadcrumb { display: flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 13px; margin-bottom: 6px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb svg { width: 14px; height: 14px; }

/* =========================================================================
   BİLEŞENLER
   ========================================================================= */

/* Kartlar */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border-2); }
.card__title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card__title svg { width: 20px; height: 20px; color: var(--primary); }
.card__body { padding: 22px; }
.card__body--flush { padding: 0; }
.card__foot { padding: 16px 22px; border-top: 1px solid var(--border-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__link { color: var(--primary); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 5px; }
.card__link:hover { text-decoration: underline; }

/* İzgaralar */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1200px) { .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 760px)  { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

/* İstatistik kartı */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.stat-card__icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; }
.stat-card__icon svg { width: 26px; height: 26px; }
.stat-card__pill { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 20px; display: inline-flex; align-items: center; gap: 4px; }
.stat-card__value { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.stat-card__label { color: var(--text-soft); font-size: 13.5px; margin-top: 2px; font-weight: 500; }
.stat-card__glow { position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; opacity: .5; }

/* Renk yardımcıları (ikon arkaplanları / glow) */
.soft-indigo { background: #eef2ff; color: #4f46e5; }
.soft-green  { background: #dcfce7; color: #16a34a; }
.soft-purple { background: #f3e8ff; color: #9333ea; }
.soft-amber  { background: #fef3c7; color: #d97706; }
.soft-blue   { background: #dbeafe; color: #2563eb; }
.soft-red    { background: #fee2e2; color: #dc2626; }
.soft-pink   { background: #fce7f3; color: #db2777; }
.soft-slate  { background: #eef1f6; color: #64748b; }
.soft-gold   { background: #fdf3dc; color: #b58121; }

.glow-indigo { background: radial-gradient(circle, #eef2ff, transparent 70%); }
.glow-green  { background: radial-gradient(circle, #dcfce7, transparent 70%); }
.glow-purple { background: radial-gradient(circle, #f3e8ff, transparent 70%); }
.glow-amber  { background: radial-gradient(circle, #fef3c7, transparent 70%); }

/* Rozetler */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px; border-radius: 20px;
    font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.4;
}
.badge svg { width: 12px; height: 12px; }
.badge--indigo { background: #eef2ff; color: #4338ca; }
.badge--blue   { background: #dbeafe; color: #1d4ed8; }
.badge--green  { background: #dcfce7; color: #15803d; }
.badge--amber  { background: #fef3c7; color: #b45309; }
.badge--red    { background: #fee2e2; color: #b91c1c; }
.badge--purple { background: #f3e8ff; color: #7e22ce; }
.badge--pink   { background: #fce7f3; color: #be185d; }
.badge--slate  { background: #eef1f6; color: #475569; }
.badge--gold   { background: #fdf3dc; color: #a06f16; }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Butonlar */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px;
    border-radius: 12px; border: 1px solid transparent;
    font-weight: 600; font-size: 14px; cursor: pointer;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border .15s;
    white-space: nowrap; text-decoration: none; line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 8px 18px rgba(79,70,229,.28); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(79,70,229,.4); }
.btn-orange  { background: var(--orange-grad); color: #fff; box-shadow: 0 8px 18px rgba(245,158,11,.28); }
.btn-orange:hover { box-shadow: 0 10px 24px rgba(245,158,11,.4); }
.btn-purple  { background: var(--purple-grad); color: #fff; box-shadow: 0 8px 18px rgba(124,58,237,.28); }
.btn-purple:hover { box-shadow: 0 10px 24px rgba(124,58,237,.4); }
.btn-gold    { background: var(--gold-grad); color: #fff; box-shadow: 0 8px 18px rgba(200,150,42,.3); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #0ea371; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-light   { background: #fff; color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-light:hover { background: #f7f8fc; border-color: #d8dbea; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--indigo-100); }
.btn-outline:hover { background: var(--indigo-50); }
.btn-ghost   { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: #f1f2f8; color: var(--text); }

.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-xs { height: 29px; padding: 0 10px; font-size: 12px; border-radius: 9px; }
.btn-xs svg { width: 14px; height: 14px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn-icon.btn-xs { width: 29px; }

/* İkon aksiyon butonları (tablo) */
.icon-action {
    width: 32px; height: 32px; border-radius: 9px;
    display: grid; place-items: center; cursor: pointer;
    border: 1px solid var(--border); background: #fff; color: var(--text-soft);
    transition: all .14s;
}
.icon-action svg { width: 16px; height: 16px; }
.icon-action:hover { background: var(--indigo-50); color: var(--primary); border-color: var(--indigo-100); }
.icon-action.danger:hover { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.icon-action.success:hover { background: #ecfdf5; color: var(--success); border-color: #a7f3d0; }

/* Avatar */
.avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--primary-grad); color: #fff;
    font-weight: 700; font-size: 14px; flex-shrink: 0;
    text-transform: uppercase;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; border-radius: 20px; }
.avatar-xl { width: 84px; height: 84px; font-size: 28px; border-radius: 24px; }
.avatar--gold { background: var(--gold-grad); }
.avatar--green { background: linear-gradient(135deg,#10b981,#059669); }
.avatar--blue { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.avatar--amber { background: linear-gradient(135deg,#f59e0b,#d97706); }
.avatar--purple { background: var(--purple-grad); }

/* Tablolar */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--text-mute); padding: 13px 18px; border-bottom: 1px solid var(--border);
    background: #fafbfe; white-space: nowrap;
}
.table td { padding: 14px 18px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fafbff; }
.table tbody tr:last-child td { border-bottom: none; }
.table__row-link { cursor: pointer; }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .cell-actions .flex { justify-content: flex-end; }
.cell-primary { font-weight: 600; color: var(--text); }
.cell-user { display: flex; align-items: center; gap: 11px; }
.cell-muted { color: var(--text-soft); }

/* Filtre çubuğu */
.filters {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.filters__row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .form-group { margin: 0; }
.filters__search { flex: 1; min-width: 220px; }
.filters__field { min-width: 160px; }

/* Formlar */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 7px; color: var(--text); }
.form-label .req { color: var(--danger); }
.form-hint { font-size: 12px; color: var(--text-mute); margin-top: 5px; }
.form-error { font-size: 12.5px; color: var(--danger); margin-top: 5px; display: flex; align-items: center; gap: 4px; }

.form-control {
    width: 100%; height: 44px;
    border: 1px solid var(--border); border-radius: 12px;
    padding: 0 14px; background: #fff; outline: none;
    transition: border .15s, box-shadow .15s;
}
textarea.form-control { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
select.form-control { appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7090' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.form-control:focus { border-color: var(--indigo-500); box-shadow: 0 0 0 4px var(--indigo-50); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 4px #fee2e2; }
.form-control::placeholder { color: var(--text-mute); }
.form-control:disabled { background: #f4f5fa; color: var(--text-soft); cursor: not-allowed; }

.input-group { position: relative; }
.input-group__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-mute); }
.input-group__icon svg { width: 18px; height: 18px; }
.input-group__suffix svg { width: 18px; height: 18px; }
.avatar svg { width: 1em; height: 1em; }
.input-group .form-control { padding-left: 42px; }
.input-group__suffix { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-mute); padding: 8px; }
.input-group__suffix:hover { color: var(--text); }

.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 680px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }

.checkbox { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 14px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

.form-section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-mute); margin: 6px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border-2); }

/* Uyarılar / Flash */
.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 18px; border-radius: 14px; margin-bottom: 18px;
    font-size: 14px; font-weight: 500; border: 1px solid transparent;
}
.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.alert__close { margin-left: auto; background: none; border: none; cursor: pointer; opacity: .6; padding: 2px; }
.alert__close:hover { opacity: 1; }
.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* Boş durum */
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state__icon { width: 76px; height: 76px; border-radius: 24px; background: var(--indigo-50); color: var(--primary); display: grid; place-items: center; margin: 0 auto 18px; }
.empty-state__icon svg { width: 36px; height: 36px; }
.empty-state__title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.empty-state__text { color: var(--text-soft); margin-bottom: 20px; max-width: 380px; margin-inline: auto; }

/* Sayfalama */
.pagination { display: flex; align-items: center; gap: 6px; }
.pagination a, .pagination span {
    min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); background: #fff; color: var(--text-soft); font-weight: 600; font-size: 13.5px;
}
.pagination a:hover { border-color: var(--indigo-100); background: var(--indigo-50); color: var(--primary); }
.pagination .active { background: var(--primary-grad); color: #fff; border-color: transparent; }
.pagination .disabled { opacity: .45; pointer-events: none; }

/* Detay sayfası */
.profile-head {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.profile-head__info { flex: 1; min-width: 200px; }
.profile-head__name { font-size: 22px; font-weight: 800; }
.profile-head__meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-soft); font-size: 13.5px; margin-top: 6px; }
.profile-head__meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-head__meta svg { width: 15px; height: 15px; }
.profile-head__actions { display: flex; gap: 9px; flex-wrap: wrap; }

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 24px; }
@media (max-width: 620px) { .info-grid { grid-template-columns: 1fr; } }
.info-item { padding: 11px 0; border-bottom: 1px dashed var(--border-2); display: flex; justify-content: space-between; gap: 14px; }
.info-item__label { color: var(--text-soft); font-size: 13.5px; }
.info-item__value { font-weight: 600; text-align: right; }

/* Zaman çizelgesi */
.timeline { position: relative; padding-left: 8px; }
.timeline__item { position: relative; padding: 0 0 22px 34px; }
.timeline__item::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: -4px; width: 2px; background: var(--border); }
.timeline__item:last-child::before { display: none; }
.timeline__dot { position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.timeline__dot svg { width: 12px; height: 12px; }
.timeline__card { background: #fafbfe; border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 15px; }
.timeline__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 3px; }
.timeline__title { font-weight: 600; font-size: 13.5px; }
.timeline__time { font-size: 12px; color: var(--text-mute); white-space: nowrap; }
.timeline__body { color: var(--text-soft); font-size: 13.5px; }
.timeline__author { font-size: 12px; color: var(--text-mute); margin-top: 5px; }

/* Mini liste (dashboard hatırlatıcılar) */
.mini-list__item { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--border-2); }
.mini-list__item:last-child { border-bottom: none; }
.mini-list__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.mini-list__icon svg { width: 19px; height: 19px; }
.mini-list__body { flex: 1; min-width: 0; }
.mini-list__title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list__meta { font-size: 12.5px; color: var(--text-soft); margin-top: 1px; }
.mini-list__time { font-size: 12px; font-weight: 600; white-space: nowrap; }

/* Progress bar */
.progress { height: 8px; background: #eef0f7; border-radius: 20px; overflow: hidden; }
.progress__bar { height: 100%; border-radius: 20px; background: var(--primary-grad); transition: width .4s ease; }
.progress__bar.green { background: linear-gradient(90deg,#10b981,#059669); }
.progress__bar.amber { background: linear-gradient(90deg,#f59e0b,#d97706); }
.progress__bar.red { background: linear-gradient(90deg,#ef4444,#dc2626); }

/* Basit bar chart (raporlar) */
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding-top: 10px; }
.bar-chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-chart__bar { width: 100%; max-width: 46px; border-radius: 8px 8px 0 0; background: var(--primary-grad); min-height: 4px; transition: height .5s ease; position: relative; }
.bar-chart__val { font-size: 12px; font-weight: 700; }
.bar-chart__label { font-size: 11.5px; color: var(--text-soft); text-align: center; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(23,23,51,.5); backdrop-filter: blur(3px); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.open { display: flex; animation: fadeIn .15s; }
@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); max-height: 92vh; overflow-y: auto; animation: modalIn .2s ease; }
@keyframes modalIn { from { opacity:0; transform: translateY(14px) scale(.98);} to { opacity:1; transform: none;} }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border-2); }
.modal__title { font-size: 17px; font-weight: 700; }
.modal__body { padding: 24px; }
.modal__foot { padding: 16px 24px; border-top: 1px solid var(--border-2); display: flex; justify-content: flex-end; gap: 10px; }
.modal__close { background: none; border: none; cursor: pointer; color: var(--text-mute); padding: 4px; border-radius: 8px; }
.modal__close:hover { background: #f1f2f8; color: var(--text); }

/* KPI satırı (detay) */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .kpi-row { grid-template-columns: repeat(2,1fr);} }
.kpi { background: #fafbfe; border: 1px solid var(--border-2); border-radius: 14px; padding: 16px; }
.kpi__label { font-size: 12px; color: var(--text-soft); font-weight: 600; }
.kpi__value { font-size: 22px; font-weight: 800; margin-top: 4px; }

/* =========================================================================
   YARDIMCI SINIFLAR
   ========================================================================= */
.flex { display: flex; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; }
.grid-gap { gap: 18px; }

.mt-0{margin-top:0}.mt-1{margin-top:4px}.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-5{margin-top:20px}.mt-6{margin-top:24px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:4px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}.mb-5{margin-bottom:20px}.mb-6{margin-bottom:24px}
.ml-auto{margin-left:auto}

.text-soft { color: var(--text-soft); }
.text-mute { color: var(--text-mute); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowrap { white-space: nowrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border-2); margin: 18px 0; }

/* Mobil menü butonu (topbar) */
.topbar__menu-btn { display: none; }
.sidebar__scrim { display: none; }

/* =========================================================================
   DUYARLI (RESPONSIVE)
   ========================================================================= */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .main { margin-left: 0 !important; }
    body.sidebar-open .sidebar__scrim { display: block; position: fixed; inset: 0; background: rgba(23,23,51,.4); z-index: 35; }
    .topbar__menu-btn { display: grid; }
    .topbar__title { font-size: 18px; }
}
@media (max-width: 720px) {
    .content { padding: 16px; }
    .topbar { padding: 0 14px; gap: 10px; }
    .topbar__search { display: none; }
    .topbar__title { display: none; }
    .kpi-row { grid-template-columns: 1fr 1fr; }
    .hide-mobile { display: none !important; }
}
