:root {
    /* Marka — mavi */
    --brand-950: #0f1a45;
    --brand-900: #172a6b;
    --brand-800: #1e3a8a;
    --brand-700: #1d4ed8;
    --brand-600: #2563eb;
    --brand-500: #3b82f6;
    --brand-100: #dbeafe;
    --brand-50:  #eff6ff;

    --bg:      #f4f6f8;
    --surface: #ffffff;
    --border:  #e2e8ee;
    --text:    #0f1b2d;
    --text-2:  #475569;
    --muted:   #94a3b8;

    --red:    #e11d48;  --red-bg: #ffe9ee;

    --radius-sm: 12px;
    --radius:    18px;
    --radius-lg: 26px;
    --shadow:    0 6px 24px -10px rgba(15, 27, 45, .14);
    --ring:      0 0 0 4px rgba(37, 99, 235, .18);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
h1, h2 { margin: 0; letter-spacing: -.02em; }
.muted { color: var(--text-2); }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 20px;
    border: 0; border-radius: var(--radius-sm);
    font: inherit; font-size: 15px; font-weight: 600; line-height: 1;
    cursor: pointer; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .7; cursor: default; }
.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:hover { background: var(--brand-800); }
.btn-primary:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-ghost { height: 38px; padding: 0 14px; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-block { width: 100%; }

/* ---------- Form ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input {
    width: 100%; height: 50px; padding: 0 14px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font: inherit; font-size: 15px; font-weight: 500;
    transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--muted); font-weight: 400; }
.field input:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--ring); }

.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw-toggle {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    width: 38px; height: 38px; display: grid; place-items: center;
    border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--brand-700); background: var(--brand-50); }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.alert-error { background: var(--red-bg); color: #9f1239; }

/* ---------- Giriş ekranı ---------- */
body.auth { min-height: 100vh; min-height: 100dvh; }
.auth-wrap {
    min-height: 100vh; min-height: 100dvh;
    display: grid; grid-template-columns: 1fr;
}
.auth-brand { display: none; }
.auth-card {
    width: 100%; max-width: 420px; margin: auto;
    padding: 40px 20px calc(32px + env(safe-area-inset-bottom, 0px));
}
.auth-head { margin-bottom: 28px; }
.auth-logo-sm { width: 52px; height: 52px; display: block; margin-bottom: 22px; }
.auth-head h1 { font-size: 28px; font-weight: 800; }
.auth-head p { margin: 6px 0 0; color: var(--text-2); }
.auth-foot { margin: 22px 0 0; font-size: 13px; color: var(--text-2); text-align: center; }

@media (min-width: 900px) {
    .auth-wrap { grid-template-columns: minmax(380px, 46%) 1fr; }
    .auth-brand {
        display: flex; flex-direction: column; justify-content: flex-end;
        padding: 56px; color: #fff;
        background:
            radial-gradient(1200px 600px at 110% -10%, rgba(37, 99, 235, .45), transparent 60%),
            radial-gradient(800px 500px at -20% 120%, rgba(37, 99, 235, .25), transparent 60%),
            var(--brand-900);
    }
    .auth-logo { width: 64px; height: 64px; margin-bottom: auto; border-radius: 16px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
    .auth-brand h2 { font-size: 44px; font-weight: 800; }
    .auth-brand p { margin: 10px 0 0; max-width: 360px; font-size: 18px; color: rgba(255,255,255,.75); }
    .auth-card {
        padding: 48px 40px;
        background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    }
    .auth-logo-sm { display: none; }
}

/* ---------- Üst bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; min-height: 59px; }
.topbar form { margin: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand img { width: 32px; height: 32px; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.topbar-name { color: var(--text-2); font-size: 14px; font-weight: 500; display: none; }
@media (min-width: 720px) { .topbar-name { display: inline; } }
@media (max-width: 520px) { .hide-sm { display: none; } }

/* ---------- Sayfa ---------- */
.app-col { min-width: 0; }
.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; }
.page-head .muted { margin: 4px 0 0; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-600); }

/* ---------- Sol şerit ---------- */
:root { --rail-w: 84px; --rail-h: 64px; }
.rail {
    position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: var(--rail-w);
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 6px; overflow-y: auto; scrollbar-width: none;
    background: linear-gradient(180deg, var(--brand-900), var(--brand-950));
}
.rail::-webkit-scrollbar { display: none; }
.rail-logo { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 12px; color: #fff; text-decoration: none; font-weight: 800; font-size: 12px; letter-spacing: .01em; }
.rail-logo img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-item {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    width: 100%; padding: 7px 2px; border: 0; border-radius: 12px; background: transparent;
    color: rgba(255, 255, 255, .72); text-decoration: none; font: inherit; font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center;
    cursor: pointer; transition: color .15s, background .15s;
}
.rail-item .ic { width: 40px; height: 32px; display: grid; place-items: center; border-radius: 10px; font-size: 16px; transition: background .15s; }
.rail-item:hover { color: #fff; }
.rail-item:hover .ic { background: rgba(255, 255, 255, .08); }
.rail-item.active, .rail-item.is-open { color: #fff; }
.rail-item.active .ic, .rail-item.is-open .ic { background: var(--brand-500); box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .8); }
.rail-item:focus-visible { outline: 2px solid var(--brand-100); outline-offset: -2px; }
.rail-item.soon { opacity: .45; cursor: default; }
.rail-tools .ic { background: #fff; color: var(--brand-900); }
.rail-tools:hover .ic { background: var(--brand-50); }
.rail-tools.is-open .ic { background: var(--brand-100); color: var(--brand-900); box-shadow: none; }
.rail-sep { display: block; height: 1px; margin: 8px 14px; background: rgba(255, 255, 255, .12); flex-shrink: 0; }
.rail-sep-bottom { margin-top: auto; }

body.has-rail .app-col { margin-left: var(--rail-w); }

/* Mobil: şerit alta yatay bar olur */
@media (max-width: 719px) {
    .rail {
        top: auto; right: 0; width: auto; height: calc(var(--rail-h) + env(safe-area-inset-bottom, 0px));
        flex-direction: row; align-items: center; gap: 0; padding: 4px 4px env(safe-area-inset-bottom, 0px);
        overflow-x: auto; overflow-y: hidden; border-top: 1px solid rgba(255, 255, 255, .08);
    }
    .rail-logo, .rail-sep { display: none; }
    .rail-nav { flex-direction: row; gap: 0; }
    .rail-item { width: 68px; flex-shrink: 0; padding: 4px 2px; font-size: 10.5px; gap: 3px; }
    .rail-item .ic { height: 30px; }
    body.has-rail .app-col { margin-left: 0; padding-bottom: calc(var(--rail-h) + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Tüm araçlar paneli ---------- */
body.tools-open { overflow: hidden; }
.tools-backdrop { position: fixed; z-index: 39; inset: 0 0 0 var(--rail-w); background: rgba(15, 26, 69, .32); }
.tools {
    position: fixed; z-index: 40; top: 0; bottom: 0; left: var(--rail-w);
    width: min(820px, calc(100vw - var(--rail-w))); overflow-y: auto; overscroll-behavior: contain;
    padding: 20px 16px 32px;
    background: linear-gradient(180deg, #f6f8fb, #eef3fb);
    border-right: 1px solid var(--border); box-shadow: 24px 0 48px -24px rgba(15, 27, 45, .3);
    animation: tools-in .18s ease-out;
}
@keyframes tools-in { from { opacity: 0; transform: translateX(-12px); } }
@media (prefers-reduced-motion: reduce) { .tools { animation: none; } }
.tools[hidden], .tools-backdrop[hidden] { display: none; }
.tools-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tools-head h2 { font-size: 20px; font-weight: 700; }
.tools-head p { margin: 2px 0 0; font-size: 12px; font-weight: 500; color: var(--text-2); }
.tools-close { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; }
.tools-close:hover { background: rgba(15, 27, 45, .06); }

.tools-search { position: relative; display: block; margin-bottom: 16px; }
.tools-search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-2); font-size: 14px; }
.tools-search input {
    width: 100%; height: 46px; padding: 0 14px 0 42px;
    border: 1.5px solid var(--brand-500); border-radius: 12px; background: var(--surface);
    font: inherit; font-size: 14px; color: var(--text); box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}
.tools-search input:focus { outline: none; box-shadow: var(--ring); }

.tools-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 14px 12px; }
.tools-card h3 { margin: 0 0 10px 2px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.tools-card[hidden] { display: none; }

.tools-fav { margin-bottom: 16px; }
.fav-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; }
.fav-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 4px 8px; border-radius: 10px;
    color: var(--text-2); text-decoration: none; font-size: 12.5px; font-weight: 500; text-align: center; line-height: 1.25;
}
.fav-item .ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--bg); color: var(--text); font-size: 18px; transition: background .15s; }
a.fav-item:hover .ic { background: var(--brand-50); color: var(--brand-700); }
.fav-item.active { color: var(--brand-700); font-weight: 700; }
.fav-item.active .ic { background: var(--brand-100); color: var(--brand-700); }
.fav-item.soon { opacity: .55; cursor: default; }
.fav-item em { display: none; }
.fav-item[hidden] { display: none; }

.tools-grid { columns: 2 280px; column-gap: 16px; }
.tools.is-single .tools-grid { columns: 1; max-width: 420px; }
.tools-group { break-inside: avoid; margin-bottom: 16px; }
.tools-list { display: grid; gap: 1px; }
.tool-item {
    display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px;
    color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500;
}
.tool-item .ic { width: 18px; text-align: center; color: var(--text-2); font-size: 14px; flex-shrink: 0; }
a.tool-item:hover { background: var(--bg); }
a.tool-item:focus-visible, a.fav-item:focus-visible { outline: none; box-shadow: var(--ring); }
.tool-item.active { background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.tool-item.active .ic { color: var(--brand-700); }
.tool-item.soon { color: var(--text-2); cursor: default; }
.tool-item.soon .ic { color: var(--muted); }
.tool-item em { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 11px; font-style: normal; font-weight: 600; }
.tool-item[hidden] { display: none; }
.tools-none { column-span: all; margin: 24px 0; text-align: center; color: var(--text-2); }

@media (max-width: 719px) {
    .tools-backdrop { inset: 0; bottom: calc(var(--rail-h) + env(safe-area-inset-bottom, 0px)); }
    .tools { left: 0; width: 100%; bottom: calc(var(--rail-h) + env(safe-area-inset-bottom, 0px)); border-right: 0; box-shadow: none; animation-name: tools-up; }
    @keyframes tools-up { from { opacity: 0; transform: translateY(12px); } }
    .fav-row { grid-template-columns: repeat(3, 1fr); }
}


/* ---------- Arama ---------- */
.search { position: relative; width: 100%; max-width: 320px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input {
    width: 100%; height: 44px; padding: 0 14px 0 40px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
    font: inherit; font-size: 15px; color: var(--text);
}
.search input:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--ring); }

.badge { padding: 4px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-lg { padding: 6px 12px; font-size: 13px; }

/* ---------- Kart / bilgi listesi ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.info { margin: 0; display: grid; gap: 16px 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.info .wide { grid-column: 1 / -1; }
.info dt { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.info dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
code { font: 500 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--bg); padding: 2px 6px; border-radius: 6px; }

.empty { padding: 40px 16px; text-align: center; color: var(--text-2); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty h1 { font-size: 20px; color: var(--text); }
.empty .btn { margin-top: 16px; }

/* ---------- Şerit: proje seçici + kullanıcı ---------- */
.scope-form { margin: 0; display: contents; }
.rail-scope { position: relative; margin-bottom: 6px; padding-bottom: 8px; }
.rail-scope .ic {
    width: 44px; height: 38px; border-radius: 11px; font-size: 14px; font-weight: 800; letter-spacing: .02em;
    background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28);
}
.rail-scope:not(.is-all) .ic { background: var(--brand-500); box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .8); }
.rail-scope .tx {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    max-width: 76px; color: #fff; font-size: 10.5px; overflow-wrap: anywhere;
}
.rail-scope-caret { position: absolute; top: 2px; right: 6px; font-size: 8px; color: rgba(255, 255, 255, .55); }
.rail-scope:hover .ic { background: rgba(255, 255, 255, .18); }
.rail-scope:not(.is-all):hover .ic { background: var(--brand-600); }
.rail-scope.is-open .ic { box-shadow: 0 0 0 2px #fff; }
.rail-scope:disabled { cursor: default; opacity: 1; }
.rail-user .ic { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 12px; font-weight: 800; }
.rail-user:hover .ic, .rail-user.is-open .ic { background: rgba(255, 255, 255, .24); box-shadow: none; }

/* Proje seçici açılır listesi */
.flyout-scope { width: 330px; display: flex; flex-direction: column; max-height: calc(100vh - 16px); }
.flyout-scope .scope-q {
    width: 100%; height: 38px; margin: 2px 0 6px; padding: 0 12px; flex-shrink: 0;
    border: 1.5px solid var(--border); border-radius: 9px; font: inherit; font-size: 13.5px; color: var(--text);
}
.flyout-scope .scope-q:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--ring); }
.scope-list { overflow-y: auto; max-height: min(56vh, 440px); overscroll-behavior: contain; margin: 0 -2px; padding: 0 2px; }
.scope-opt { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.scope-opt .tx { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.scope-opt .tx, .scope-opt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-opt small { font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.scope-opt > i { color: var(--brand-600); font-size: 12px; flex-shrink: 0; }
.fly-item.scope-opt .ic-txt {
    width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px;
    background: var(--bg); color: var(--text-2); font-size: 11px; font-weight: 800;
}
.fly-item.scope-opt.active .ic-txt { background: var(--brand-600); color: #fff; }
.scope-all { margin-bottom: 4px; }
.fly-item.scope-all .ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--brand-50); color: var(--brand-700); }
.flyout-scope .scope-form + .scope-list { border-top: 1px solid var(--border); padding-top: 4px; }
.scope-list > form[hidden] { display: none; }
.scope-none { margin: 10px; font-size: 13px; color: var(--text-2); }
.fly-item:focus-visible { outline: none; background: var(--bg); box-shadow: inset 0 0 0 2px var(--brand-500); }

/* Kullanıcı menüsü */
.flyout-user { width: 250px; }
.flyout-user-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.flyout-user-head .avatar { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--brand-900); color: #fff; font-size: 13px; font-weight: 800; }
.flyout-user-head div { display: grid; min-width: 0; }
.flyout-user-head strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flyout-user-head small { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flyout-user .fly-item { width: 100%; border: 0; background: transparent; font: inherit; cursor: pointer; text-align: left; color: #b91c1c; }
.flyout-user .fly-item .ic { color: #b91c1c; }
.flyout-user .fly-item:hover { background: #fef2f2; }

/* Tablo içinden projeye geçiş butonu */
.link-btn { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--brand-700); text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 719px) {
    .rail-scope { margin: 0; padding-bottom: 4px; order: -1; }
    .rail-scope .tx { max-width: 64px; -webkit-line-clamp: 1; }
    .rail-scope-caret { display: none; }
    .flyout-scope { max-height: calc(100vh - var(--rail-h) - 24px); }
}

/* ---------- Özet kutuları ---------- */
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; min-width: 0; }
.stat span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.stat strong { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat strong.stat-text { font-size: 15px; font-weight: 700; letter-spacing: 0; }

/* ---------- Tablo ---------- */
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head .card-title { margin: 0; }
.search-sm { max-width: 240px; }
.search-sm input { height: 38px; font-size: 14px; padding-left: 36px; }
.search-sm svg { left: 12px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 10px 20px; background: var(--bg); white-space: nowrap; }
.table td { padding: 12px 20px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--brand-50); }
.table tr[hidden] { display: none; }
.nowrap { white-space: nowrap; }
.strong-link { color: var(--text); font-weight: 600; text-decoration: none; }
.strong-link:hover { color: var(--brand-700); text-decoration: underline; }
.table-none { margin: 0; padding: 24px 20px; text-align: center; color: var(--text-2); }
@media (max-width: 720px) {
    .table th:nth-child(3), .table td:nth-child(3),
    .table th:nth-child(4), .table td:nth-child(4) { display: none; }
    .table th, .table td { padding-left: 14px; padding-right: 14px; }
}

/* ---------- Şerit açılır listesi ---------- */
.flyout {
    position: fixed; z-index: 60; width: 270px; padding: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 18px 44px -14px rgba(15, 27, 45, .32);
    animation: fly-in .14s ease-out;
}
.flyout[hidden] { display: none; }
@keyframes fly-in { from { opacity: 0; transform: translateX(-6px); } }
@media (prefers-reduced-motion: reduce) { .flyout { animation: none; } }
.flyout-head {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 4px;
    border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 700; color: var(--text);
}
.flyout-head i { color: var(--brand-600); font-size: 14px; }
.fly-item {
    display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px;
    color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 500;
}
.fly-item .ic { width: 18px; text-align: center; color: var(--text-2); font-size: 14px; flex-shrink: 0; }
a.fly-item:hover, a.fly-item:focus-visible { outline: none; background: var(--bg); }
.fly-item.active { background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.fly-item.active .ic { color: var(--brand-700); }
.fly-item.soon { color: var(--text-2); cursor: default; }
.fly-item.soon .ic { color: var(--muted); }
.fly-item em { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 11px; font-style: normal; font-weight: 600; }
.rail-item.is-open { color: #fff; }
.rail-item.is-open .ic { background: rgba(255, 255, 255, .14); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55); }
.rail-item.active.is-open .ic { background: var(--brand-500); }
@media (max-width: 719px) {
    .flyout { width: min(280px, calc(100vw - 16px)); animation-name: fly-up; }
    @keyframes fly-up { from { opacity: 0; transform: translateY(6px); } }
}

/* =====================================================================
   v2 tasarım dili — yonetimport manage2 (yonetimport-v2.css + sidebar_tools.php) uyarlaması
   ===================================================================== */
:root {
    --v2-frame: #f9fbff;
    --v2-tab: #eef2fa;
    --v2-panel: #ffffff;
    --v2-bg: #f6f6f8;
    --v2-ink: #111827;
    --v2-text: #374151;
    --v2-muted: #6b7280;
    --v2-line: #e5e7eb;
    --v2-line-soft: #f0f1f3;
    --v2-brand: #1b2b61;
    --v2-accent: #2563eb;
    --v2-grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --v2-grad-shadow: 0 10px 22px -10px rgba(79, 70, 229, .65);
    --v2-grad-shadow-hover: 0 14px 28px -10px rgba(79, 70, 229, .75);
}
body.has-rail { background: var(--v2-frame); color: var(--v2-text); }

/* ---------- Sol şerit (manage2 tools-rail) ---------- */
.rail { background: var(--v2-brand); border-right: 1px solid #32437d; padding: 14px 7px 12px; gap: 0; }
.rail-top { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
.rail-sep { width: 36px; height: 1px; margin: 6px auto; background: rgba(255, 255, 255, .12); border: 0; flex-shrink: 0; }
.rail-item { width: 70px; color: #c7d2e8; padding: 6px 2px; gap: 4px; border-radius: 12px; }
.rail-item .ic { width: 38px; height: 30px; border-radius: 10px; font-size: 16px; }
.rail-item .tx { font-size: 10.5px; font-weight: 600; max-width: 68px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rail-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.rail-item:hover .ic { background: transparent; }
.rail-item.active { color: #fff; }
.rail-item.active .ic { background: var(--v2-accent); box-shadow: none; }
.rail-item.is-open .ic { background: #fff; color: #142445; box-shadow: none; }
.rail-item.soon { opacity: .55; }
.rail-item.soon.active { opacity: 1; }
.rail-tools .ic { background: rgba(255, 255, 255, .1); color: #fff; }
.rail-tools:hover .ic { background: rgba(255, 255, 255, .16); }
.rail-tools.is-open .ic { background: #fff; color: #142445; }

/* Profil + proje seçimi düğmesi */
.rail-profile {
    width: 44px; height: 44px; flex-shrink: 0; margin-bottom: 10px; padding: 0;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); background: #fff; color: var(--v2-brand);
    font: inherit; cursor: pointer; text-align: left;
}
.rail-profile:hover, .rail-profile.is-open { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .18); }
.rail-av { font-size: 15px; font-weight: 800; }
.rail-profile-txt, .rail-profile-caret { display: none; }

@media (min-width: 1101px) {
    :root { --rail-w: 208px; }
    .rail { padding: 14px 12px 12px; }
    .rail-top { align-items: stretch; }
    .rail-sep { width: 100%; }
    .rail-item { width: 100%; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 10px; }
    .rail-item .ic { width: 32px; height: 30px; font-size: 15px; flex-shrink: 0; }
    .rail-item .tx { flex: 1; max-width: none; font-size: 13.5px; text-align: left; }
    .rail-item.active { background: rgba(255, 255, 255, .1); }
    .rail-profile {
        width: 100%; height: auto; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff;
        justify-content: flex-start; padding: 8px 10px 8px 8px; margin-bottom: 12px;
    }
    .rail-profile:hover, .rail-profile.is-open { box-shadow: none; background: rgba(255, 255, 255, .14); }
    .rail-av { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--v2-brand); font-size: 13px; }
    .rail-profile-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
    .rail-profile-txt b { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rail-profile-txt small { font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rail-profile-caret { display: block; font-size: 10px; color: rgba(255, 255, 255, .6); }
}
@media (max-height: 760px) and (min-width: 720px) {
    .rail-item { padding-top: 3px; padding-bottom: 3px; }
    .rail-item .ic { height: 26px; }
    .rail-sep { margin: 3px auto; }
}
@media (max-width: 719px) {
    .rail { padding: 4px 4px env(safe-area-inset-bottom, 0px); border-right: 0; }
    .rail-top { flex-direction: row; align-items: center; width: auto; gap: 0; }
    .rail-sep { display: none; }
    .rail-profile { width: 36px; height: 36px; margin: 0 8px 0 6px; }
    .rail-av { font-size: 13px; }
    .rail-item { width: 66px; }
}

/* Açılır listeler (manage2 tools-flyout) */
.flyout { width: 280px; border-radius: 14px; border: 0; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); padding: 10px 8px 8px; }
.flyout-head { padding: 4px 10px 8px; font-size: 13px; font-weight: 800; color: #0f172a; border-bottom: 1px solid #f1f5f9; }
.flyout-head i { color: var(--v2-accent); }
.fly-item { padding: 8px 10px; border-radius: 8px; font-size: 14px; color: #1e293b; }
.fly-item .ic { color: #334155; }
a.fly-item:hover { background: #eef2f8; }
.fly-item.active { background: #e3edfa; color: #1d6fd8; font-weight: 700; }
.fly-item.active .ic { color: #1d6fd8; }
.fly-item.soon { color: #94a3b8; }
.fly-item.soon .ic { color: #cbd5e1; }
.fly-item em { font-size: 10.5px; font-weight: 700; color: #94a3b8; background: #f1f5f9; border-radius: 6px; padding: 1px 6px; }
.flyout-profile { width: 320px; display: flex; flex-direction: column; max-height: calc(100vh - 16px); }
.flyout-profile .flyout-user-head .avatar { background: var(--v2-brand); }
.flyout-sub { display: flex; align-items: center; gap: 8px; padding: 8px 10px 6px; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #64748b; }
.flyout-sub i { color: var(--v2-accent); }
.flyout-profile .scope-q { width: 100%; height: 38px; margin: 0 0 6px; padding: 0 12px; flex-shrink: 0; border: 1px solid #cfd8e6; border-radius: 10px; font: inherit; font-size: 13.5px; color: var(--v2-ink); }
.flyout-profile .scope-q:focus { outline: none; border-color: var(--v2-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.flyout-profile .scope-list { max-height: min(46vh, 380px); }
.flyout-sep { height: 1px; background: #f1f5f9; margin: 6px 0; flex-shrink: 0; }
.fly-danger, .fly-danger .ic { color: #dc2626 !important; }
.fly-danger:hover { background: #fef2f2 !important; }
.flyout-profile .fly-item.fly-danger { width: 100%; border: 0; background: transparent; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }

/* Tüm araçlar paneli (manage2 tools-panel) */
.tools { background: linear-gradient(160deg, #f8faff 0%, #f1f5fb 55%, #eef3fb 100%); border-radius: 0 20px 20px 0; box-shadow: 18px 0 50px rgba(15, 23, 42, .18); width: min(800px, calc(100vw - var(--rail-w))); }
.tools-backdrop { background: rgba(15, 23, 42, .28); }
.tools-head h2 { font-size: 18px; font-weight: 800; color: #0f172a; }
.tools-search input { border: 1px solid #cfd8e6; border-radius: 10px; box-shadow: none; height: 44px; }
.tools-search input:focus { border-color: var(--v2-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.tools-card { background: rgba(255, 255, 255, .85); border: 1px solid #e6ebf3; border-radius: 12px; box-shadow: 0 1px 3px rgba(15, 23, 42, .04); }
.tools-card h3 { font-size: 14.5px; font-weight: 800; color: #0f172a; }
.fav-item .ic { border-radius: 10px; background: #edf1f7; color: #0f172a; }
.fav-item.active .ic { background: #dbe8fb; color: #1d6fd8; }
.fav-item.active { color: #1d6fd8; }
.tool-item.active { background: #e3edfa; color: #1d6fd8; }
.tool-item.active .ic { color: #1d6fd8; }

/* ---------- Sayfa iskeleti ---------- */
.page.page-v2 { max-width: none; padding: 0 20px; display: flex; flex-direction: column; min-height: 100vh; }

/* Başlık: 1. satır konum, 2. satır başlık | özet sayılar | düğmeler */
.pageheader { padding: 0 0 12px; background: transparent; color: var(--v2-ink); }
.flexiheader { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 24px; row-gap: 8px; align-items: center; }
.v2-trail { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; gap: 8px; height: 52px; margin-bottom: 6px; border-bottom: 1px solid var(--v2-line); font-size: 12.5px; color: var(--v2-muted); white-space: nowrap; overflow: hidden; }
.v2-trail i.fa-chevron-right { font-size: 9px; opacity: .6; }
.v2-trail span { color: var(--v2-ink); }
.v2-trail-link { border: 0; background: none; padding: 0; font: inherit; color: var(--v2-muted); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.v2-trail-link:hover { color: var(--v2-accent); }
.v2-trail-home { display: inline-flex; align-items: center; gap: 6px; color: var(--v2-text); font-weight: 500; }
.v2-trail-home i { font-size: 11px; }
.page-heading-area { grid-column: 1; grid-row: 2; min-width: 0; }
.page-title { display: block; margin: 0; font-size: 22px; font-weight: 600; color: var(--v2-ink); letter-spacing: -.5px; line-height: 1.2; }
.page-subtitle { margin: 2px 0 0; font-size: 13.5px; color: var(--v2-muted); font-weight: 400; }
.v2-head-stats { grid-column: 2; grid-row: 2; justify-self: end; display: flex; align-items: flex-end; gap: 8px 28px; flex-wrap: wrap; }
.v2-head-stat small { display: block; font-size: 12px; color: var(--v2-muted); margin-bottom: 2px; }
.v2-head-stat b { font-size: 18px; font-weight: 600; color: var(--v2-ink); letter-spacing: -.2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v2-head-stat.main b { font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.v2-head-stat b.neg { color: #dc2626; }
.v2-head-actions { grid-column: 3; grid-row: 2; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.flexiheader:not(:has(.v2-head-actions)) > .v2-head-stats { grid-column: 2 / -1; }
@media (max-width: 1100px) {
    .v2-head-stats { grid-column: 1 / -1 !important; grid-row: 3; justify-self: start; margin-top: 4px; }
    .v2-head-actions { grid-column: 2 / -1; }
}
@media (max-width: 719px) {
    .page.page-v2 { padding: 0 12px; }
    .v2-trail { height: 44px; }
    .page-title { font-size: 20px; }
    .page-subtitle { display: none; }
    .v2-head-stats { gap: 8px 20px; }
}

/* Sekmeler: metin + alt çizgi */
.detay-tab-bar { position: sticky; top: 0; z-index: 3; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; background: var(--v2-frame); border-top: 1px solid var(--v2-line); border-bottom: 1px solid var(--v2-line); margin: 0 0 0 -14px; padding: 0; }
.detay-tab-bar::-webkit-scrollbar { display: none; }
.detay-tab-link { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 12px 14px; margin: 0 0 -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--v2-muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.detay-tab-link:hover { color: var(--v2-ink); }
.detay-tab-link.active { color: var(--v2-accent); border-bottom-color: var(--v2-accent); font-weight: 600; }
.detay-tab-link.active i { color: var(--v2-accent); }
.detay-tab-link.is-soon { opacity: .5; cursor: default; }
.detay-tab-link.is-soon:hover { color: var(--v2-muted); }
.detay-tab-link:focus { outline: none; }
.detay-tab-link:focus-visible { outline: 2px solid #c7d2fe; outline-offset: -2px; }

/* ---------- Düz tablo kartı ---------- */
.table-card { background: var(--v2-panel); border: 1px solid var(--v2-line); border-radius: 18px; overflow: hidden; }
.table-card[data-v2-flat] { border: 0; border-radius: 0; margin: 0 -20px; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.detay-tab-bar + .table-card[data-v2-flat] { border-top: 0; }
@media (max-width: 719px) { .table-card[data-v2-flat] { margin: 0 -12px; } }

/* Üst şerit: hızlı filtre | + Yeni · indir */
.v2-card-bar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--v2-line); }
.v2-quick { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.v2-quick::-webkit-scrollbar { display: none; }
.v2-quick button { flex-shrink: 0; border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--v2-muted); cursor: pointer; }
.v2-quick button:hover { color: var(--v2-ink); background: #f1f5f9; }
.v2-quick button.active { background: #eef2ff; color: var(--v2-accent); font-weight: 600; }
.v2-card-bar-tools { display: flex; gap: 8px; flex-shrink: 0; }
.v2-card-tool { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--v2-line); background: var(--v2-panel); color: var(--v2-text); font-size: 14px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.v2-card-tool:hover, .v2-card-tool.open { background: #eef2ff; border-color: #c7d2fe; color: var(--v2-accent); }
.v2-card-new { height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 15px 0 13px; border: 0; border-radius: 999px; background: var(--v2-grad); color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: var(--v2-grad-shadow); transition: filter .15s, box-shadow .15s; }
.v2-card-new i { font-size: 12px; }
.v2-card-new:hover { filter: brightness(1.08); box-shadow: var(--v2-grad-shadow-hover); }
.v2-card-new:focus-visible, .v2-card-tool:focus-visible, .v2-quick button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
.v2-q-hide { display: none !important; }

/* Tablo */
.table-scroll-container { overflow: auto; overscroll-behavior: contain; min-height: 240px; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }
.data-table thead th { position: sticky; top: 0; z-index: 2; background: var(--v2-panel); color: var(--v2-muted); font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; padding: 11px 12px; border-bottom: 1px solid var(--v2-line); white-space: nowrap; height: auto; }
.data-table .filter-row th { padding: 8px 6px; }
.data-table td { padding: 11px 12px; border-top: 1px solid var(--v2-line-soft); color: var(--v2-ink); font-size: 13.5px; vertical-align: middle; }
.data-table tbody tr:first-child td { border-top: 0; }
.table-card[data-v2-flat] .data-table th:first-child, .table-card[data-v2-flat] .data-table td:first-child { padding-left: 20px; }
.table-card[data-v2-flat] .data-table th:last-child, .table-card[data-v2-flat] .data-table td:last-child { padding-right: 20px; }
.filter-row select, .filter-row input { width: 100%; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font: inherit; font-size: 12.5px; color: var(--v2-ink); transition: box-shadow .2s; }
.filter-row select:hover, .filter-row input:hover { box-shadow: 0 2px var(--v2-accent); }
.filter-row select:focus, .filter-row input:focus { outline: none; box-shadow: 0 2px var(--v2-accent); }
.main-row { cursor: pointer; transition: background .15s; }
.main-row:hover td { background: #f9fafb; }
.main-row.is-open td { background: #eff6ff; }
.main-row:focus-visible { outline: 2px solid var(--v2-accent); outline-offset: -2px; }
.main-row[hidden] { display: none; }
.dl-r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl-none { color: #cbd5e1; }
.t-ellipsis { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-empty td { text-align: center; padding: 48px 16px !important; color: #64748b; cursor: default; }
.v2-empty i { display: block; font-size: 26px; color: #cbd5e1; margin-bottom: 10px; }

/* Proje listesi hücreleri */
#projectTable .c-logo { width: 52px; }
#projectTable .c-sm { width: 13%; }
#projectTable .c-num { width: 96px; }
#projectTable .c-status { width: 90px; }
.row-logo { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; border: 1px solid var(--v2-line); display: inline-grid; place-items: center; vertical-align: middle; }
.row-logo.is-empty { background: #eff6ff; color: var(--v2-accent); border-color: transparent; font-size: 13px; }
.pl-name b { display: block; font-weight: 700; color: #0f172a; }
.pl-name small { display: block; font-size: 12px; color: #64748b; margin-top: 2px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-type { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #e0f2fe; color: #0369a1; white-space: nowrap; }
.pl-pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; color: #64748b; }
.pl-pill.on { background: #dcfce7; color: #15803d; }
tr.is-passive td { color: #94a3b8; }
tr.is-passive .pl-name b { color: #94a3b8; }

/* Dip satırı */
.v2-table-foot { display: flex; align-items: center; gap: 10px; padding: 9px 20px; border-top: 1px solid var(--v2-line); background: #fafbff; font-size: 13px; color: var(--v2-muted); flex-shrink: 0; }
.v2-table-foot b { color: var(--v2-ink); font-weight: 600; }
.v2-table-foot-info { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }

/* Açılır işlem menüsü (indir / yazdır) */
.v2-foot-menu { position: fixed; z-index: 1003; min-width: 230px; padding: 8px; background: var(--v2-panel); border: 1px solid var(--v2-line); border-radius: 16px; box-shadow: 0 18px 44px -12px rgba(17, 24, 39, .28); display: none; }
.v2-foot-menu.open { display: block; }
.v2-foot-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--v2-ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.v2-foot-item i { width: 18px; text-align: center; color: var(--v2-muted); }
.v2-foot-item:hover, .v2-foot-item:focus-visible { background: #eef2ff; outline: none; }
.v2-foot-item:hover i { color: var(--v2-accent); }
@media (max-width: 719px) { .v2-foot-menu { left: 12px !important; right: 12px; min-width: 0; } }

/* ---------- Sağdan gelen panel (v2-modal) ---------- */
body.no-scroll { overflow: hidden; }
.v2-modal-overlay { position: fixed; inset: 0; z-index: 1006; background: rgba(15, 23, 42, .28); opacity: 0; pointer-events: none; transition: opacity .2s; }
.v2-modal-overlay.open { opacity: 1; pointer-events: auto; }
.v2-modal { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); display: flex; flex-direction: column; background: var(--v2-panel); border-radius: 20px 0 0 20px; box-shadow: -24px 0 60px -20px rgba(17, 24, 39, .35); overflow: hidden; transform: translateX(105%); transition: transform .25s ease; }
.v2-modal-overlay.open .v2-modal { transform: none; }
@media (prefers-reduced-motion: reduce) { .v2-modal, .v2-modal-overlay { transition: none; } }
.v2-modal-head { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid #eef1f6; flex-shrink: 0; }
.v2-modal-head i { color: var(--v2-accent); font-size: 14px; }
.v2-modal-head b { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-modal-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--v2-frame); padding: 16px 20px 20px; }
.v2-modal-foot { flex-shrink: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid #eef1f6; background: #fff; }
.v2-modal-foot [data-v2-foot] { display: flex; gap: 8px; }
.v2-modal-foot button { margin: 0; height: 36px; padding: 0 16px; font-size: 13px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 719px) {
    .v2-modal { width: 100vw; border-radius: 0; }
    .v2-modal-foot button { flex: 1; justify-content: center; }
    .v2-modal-foot [data-v2-foot] { flex: 1; }
}
.panel-loading { padding: 48px 0; text-align: center; color: #94a3b8; font-size: 18px; }
.panel-message { display: flex; align-items: center; gap: 10px; color: var(--v2-text); font-size: 14px; }

/* Panel gövde blokları */
.v2-dtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.v2-dtiles > div { background: #fff; border: 1px solid #e6eaf3; border-radius: 14px; padding: 10px 12px; min-width: 0; }
.v2-dtiles small { display: block; font-size: 11.5px; color: #64748b; font-weight: 600; }
.v2-dtiles b { display: block; margin-top: 3px; font-size: 15px; font-weight: 800; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-dtiles b.pos { color: #15803d; }
.v2-dtiles b.mut { color: #64748b; }
.v2-dcard { background: #fff; border: 1px solid #e6eaf3; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.v2-dcard-title { font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.v2-dnote { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding: 10px 14px; background: #fff; border: 1px solid #e6eaf3; border-radius: 12px; font-size: 12.5px; color: #475569; }

/* Panel formu */
.pf-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; }
.pf-field { grid-column: span 3; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pf-field.full { grid-column: 1 / -1; }
.pf-field.third { grid-column: span 2; }
.pf-split { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 10px; }
.pf-split > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
@media (max-width: 560px) { .pf-field, .pf-field.third { grid-column: 1 / -1; } }
.form-label-custom { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #1e293b; }
.form-label-custom i { color: var(--v2-brand); font-size: 12px; }
.form-label-custom .required { color: #dc2626; }
.form-hint-text { font-size: 12px; color: #64748b; }
.form-control-styled { width: 100%; height: 38px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: #0f172a; outline: none; transition: border-color .2s, box-shadow .2s; }
textarea.form-control-styled { height: auto; min-height: 84px; padding: 8px 12px; resize: vertical; }
input[type=file].form-control-styled { height: auto; padding: 6px 8px; font-size: 12px; }
.form-control-styled:hover { box-shadow: 0 2px var(--v2-brand); }
.form-control-styled:focus { border-color: var(--v2-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.form-control-styled:disabled { background: #f8fafc; color: #475569; box-shadow: none; cursor: default; }
.form-control-styled.is-invalid { border-color: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.phone-row { display: flex; align-items: center; gap: 6px; }
.phone-prefix { height: 38px; padding: 0 10px; display: grid; place-items: center; background: #f1f5f9; border-radius: 8px; font-size: 12px; font-weight: 600; color: #475569; }
.ac-wrap { position: relative; }
.search-results-dropdown { display: none; position: absolute; z-index: 1100; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; overflow-y: auto; padding: 6px; background: #fff; border: 1px solid var(--v2-line); border-radius: 10px; box-shadow: 0 12px 28px rgba(15, 23, 42, .16); }
.search-results-dropdown.active { display: block; }
.search-result-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #1e293b; }
.search-result-item i { width: 16px; text-align: center; color: var(--v2-accent); font-size: 12px; }
.search-result-item:hover { background: #f1f5f9; }
.mini-map-picker { height: 220px; margin-top: 4px; border-radius: 10px; border: 1px solid #e2e8f0; z-index: 0; }
.mini-map-picker.is-empty { opacity: .6; }
.image-current { display: flex; align-items: center; gap: 10px; }
.image-current img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 1px solid var(--v2-line); }
.image-remove { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b91c1c; cursor: pointer; }

/* Düğmeler */
.btn-cancel-custom { height: 36px; padding: 0 16px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #475569; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: box-shadow .2s; }
.btn-cancel-custom:hover { box-shadow: 0 0 10px #e2e2e2; }
.btn-submit-custom { height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--v2-grad); box-shadow: var(--v2-grad-shadow); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: filter .15s, box-shadow .15s; }
.btn-submit-custom i { font-size: 10px; }
.btn-submit-custom:hover { filter: brightness(1.08); box-shadow: var(--v2-grad-shadow-hover); }
.btn-submit-custom:disabled { opacity: .65; cursor: not-allowed; }
.btn-cancel-custom:focus-visible, .btn-submit-custom:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .3); }

/* ---------- Toast ---------- */
#toastContainer { position: fixed; z-index: 9999; top: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; }
.app-toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 360px; padding: 12px 16px; border-radius: 10px; background: #fff; box-shadow: 0 6px 20px -6px rgba(0, 0, 0, .25); border-left: 4px solid transparent; font-size: 13px; font-weight: 600; color: #203153; opacity: 0; transform: translateX(20px); transition: .3s; }
.app-toast.show { opacity: 1; transform: none; }
.app-toast-success { border-left-color: #16a34a; }
.app-toast-success i { color: #16a34a; }
.app-toast-error { border-left-color: #dc2626; }
.app-toast-error i { color: #dc2626; }
@media (max-width: 600px) { #toastContainer { left: 16px; right: 16px; top: 12px; } .app-toast { min-width: 0; max-width: none; } }


.v2-card-bar-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: var(--v2-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 6px 0; }
.overview-body { padding: 16px 0 24px; max-width: 960px; }
.link-btn b { font-weight: 700; color: #0f172a; }
.link-btn:hover b { color: var(--v2-accent); }
#projectTable { min-width: 980px; }
#overviewTable { min-width: 820px; }
.filter-row select { min-width: 84px; }

/* ---------- Abonelik ve Anlaşmalar (manage2 ag-*) ---------- */
#agTable { min-width: 980px; }
#agTable .c-proj { width: 16%; }
.ag-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ag-name > span:last-child { min-width: 0; }
.ag-ico { width: 36px; height: 36px; border-radius: 10px; background: #f1f5f9; color: #475569; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.ag-t-abonelik .ag-ico { background: #e0f2fe; color: #0369a1; }
.ag-t-bakim .ag-ico { background: #fef3c7; color: #b45309; }
.ag-t-hizmet .ag-ico { background: #ede9fe; color: #6d28d9; }
.ag-t-sigorta .ag-ico { background: #dcfce7; color: #15803d; }
.ag-name b { display: block; font-weight: 700; color: #0f172a; }
.ag-name small { display: block; font-size: 12px; color: #64748b; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-end, .ag-amount { white-space: nowrap; }
.ag-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px; background: #f1f5f9; color: #64748b; }
.ag-pill.warn { background: #fef3c7; color: #b45309; }
.ag-pill.late { background: #fee2e2; color: #b91c1c; }
.ag-passive td { color: #94a3b8; }
.ag-passive .ag-name b { color: #94a3b8; }
.ag-passive .ag-ico { opacity: .55; }
.ag-docs { color: #64748b; font-size: 12.5px; white-space: nowrap; }
.v2-dtiles b.neg { color: #dc2626; }

/* Panel */
.ag-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ag-types label { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; line-height: 1.25; border: 1px solid #e2e8f0; border-radius: 12px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: #334155; text-align: center; background: #fff; transition: border-color .15s, background .15s; }
.ag-types label i { font-size: 16px; color: #64748b; }
.ag-types input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ag-types label:has(input:checked) { border-color: var(--v2-accent); background: #eff6ff; color: #0f172a; }
.ag-types label:has(input:checked) i { color: var(--v2-accent); }
.ag-types label:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
.ag-types label:has(input:disabled) { cursor: default; }
.ag-files { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ag-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #eef1f6; border-radius: 10px; font-size: 13px; }
.ag-file > i { color: #94a3b8; }
.ag-file a { flex: 1; min-width: 0; color: #0f172a; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-file a:hover { color: var(--v2-accent); }
.ag-file small { color: #94a3b8; white-space: nowrap; }
.ag-file button { border: 0; background: transparent; color: #94a3b8; cursor: pointer; width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.ag-file button:hover { background: #fee2e2; color: #dc2626; }
.ag-danger { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: #64748b; }
.ag-danger button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 10px; border: 1px solid #fecaca; background: #fff; color: #dc2626; cursor: pointer; white-space: nowrap; }
.ag-danger button:hover { background: #fef2f2; }
@media (max-width: 560px) { .ag-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------- Kurallar ve Talimatlar (kurallar.php, modules/rule) ---------------- */
#rlTable .c-proj { width: 16%; }
#rlTable .c-type { width: 150px; }
#rlTable .c-num { width: 80px; text-align: center; }
#rlTable .c-date { width: 104px; }
.ab-ic.rl-ic-rule { color: #2563eb; background: #eff6ff; }
.ab-ic.rl-ic-instruction { color: #0d9488; background: #f0fdfa; }
.rl-has-img { color: #94a3b8; font-size: 12px; margin-left: 4px; }
.v2-quick button i { font-size: 11px; margin-right: 3px; opacity: .8; }
.rl-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rl-types label small { font-weight: 500; font-size: 11.5px; color: #94a3b8; }
.rl-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.rl-list:empty { display: none; }
.rl-item, .rl-warn { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid #eef1f6; border-radius: 12px; background: #fbfcfe; }
.rl-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rl-num { flex-shrink: 0; width: 26px; height: 26px; margin-top: 6px; border-radius: 50%; background: var(--v2-accent); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rl-del { flex-shrink: 0; width: 30px; height: 30px; margin-top: 4px; border: 0; border-radius: 8px; background: transparent; color: #94a3b8; cursor: pointer; }
.rl-del:hover { background: #fef2f2; color: #dc2626; }
.rl-warn { border-left-width: 4px; }
.rl-warn-head { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px; }
.rl-tone-info { border-left-color: #3b82f6; background: #f5f9ff; }
.rl-tone-success { border-left-color: #16a34a; background: #f3fbf5; }
.rl-tone-warning { border-left-color: #f59e0b; background: #fffbf0; }
.rl-tone-danger { border-left-color: #dc2626; background: #fff6f6; }
.rl-add { display: flex; width: fit-content; align-items: center; gap: 6px; margin-bottom: 6px; padding: 7px 12px; border: 1px dashed #c7d2fe; border-radius: 10px; background: #f8faff; color: var(--v2-accent); font: 600 12.5px/1.2 Inter, sans-serif; cursor: pointer; }
.rl-add:hover { background: #eff6ff; border-color: var(--v2-accent); }
.rl-img { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rl-img img { width: 140px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid #e2e8f0; }
.rl-img-rm { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #b91c1c; cursor: pointer; }
@media (max-width: 560px) { .rl-warn-head { grid-template-columns: 1fr; } }
.v2-foot-head { padding: 6px 12px 8px; font-size: 11px; font-weight: 700; color: var(--v2-muted); text-transform: uppercase; letter-spacing: .04em; }
