/* =====================================================================
   EMAP GÖREV · Web Uygulaması Tasarım Sistemi
   Işık/karanlık tema, kanban, slide-over panel, özel select & takvim.
   ===================================================================== */

/* ---------- Değişkenler ---------- */
:root {
    --brand: #6366F1;
    --brand-600: #4F46E5;
    --brand-700: #4338CA;
    --brand-soft: rgba(99, 102, 241, .10);
    --accent: #0EA5E9;

    --bg: #F4F5FB;
    --bg-2: #ECEEF6;
    --surface: #FFFFFF;
    --surface-2: #F8F9FE;
    --border: #E5E7F0;
    --border-2: #D6D9E6;

    --text: #101322;
    --text-2: #5A6072;
    --text-3: #9CA1B3;

    --ok: #10B981;   --ok-soft: rgba(16,185,129,.12);
    --warn: #F59E0B; --warn-soft: rgba(245,158,11,.14);
    --danger: #EF4444; --danger-soft: rgba(239,68,68,.12);

    --shadow-sm: 0 1px 2px rgba(16,19,34,.05);
    --shadow-md: 0 4px 16px rgba(16,19,34,.08);
    --shadow-lg: 0 16px 48px rgba(16,19,34,.16);
    --shadow-pop: 0 8px 30px rgba(16,19,34,.14), 0 2px 8px rgba(16,19,34,.08);

    --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
    --sidebar-w: 232px;
    --font: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-theme="dark"] {
    --brand: #818CF8;
    --brand-600: #6366F1;
    --brand-700: #A5B4FC;
    --brand-soft: rgba(129, 140, 248, .14);

    --bg: #0D0F1A;
    --bg-2: #12142A;
    --surface: #171A2E;
    --surface-2: #1D2138;
    --border: #262B45;
    --border-2: #333A5C;

    --text: #EEF0FA;
    --text-2: #A3A9C4;
    --text-3: #666D8C;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
    --shadow-pop: 0 8px 30px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.4);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5;
    background: var(--bg); color: var(--text);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
img { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
::selection { background: var(--brand-soft); }

/* İnce kaydırma çubukları */
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- Açılış ekranı ---------- */
.boot-splash {
    position: fixed; inset: 0; display: grid; place-content: center; gap: 20px;
    background: var(--bg); z-index: 999;
}
.boot-logo { font-size: 30px; font-weight: 800; letter-spacing: -1px; color: var(--brand-600); }
.boot-logo span { color: var(--accent); }
.boot-bar { width: 160px; height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; }
.boot-bar span { display: block; width: 40%; height: 100%; border-radius: 4px; background: var(--brand); animation: boot-slide 1.1s var(--ease) infinite; }
@keyframes boot-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

/* =====================================================================
   KİMLİK EKRANLARI
   ===================================================================== */
.auth-wrap {
    min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,.16), transparent 60%),
        radial-gradient(1000px 500px at 110% 110%, rgba(14,165,233,.14), transparent 60%),
        var(--bg);
}
.auth-card {
    width: 100%; max-width: 420px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-xl);
    padding: 36px 32px; box-shadow: var(--shadow-lg);
    animation: rise .45s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.auth-logo { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: -1px; color: var(--brand-600); margin-bottom: 6px; }
.auth-logo span { color: var(--accent); }
.auth-title { text-align: center; font-size: 19px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.3px; }
.auth-sub { text-align: center; color: var(--text-2); font-size: 13px; margin: 0 0 24px; }
.auth-alt { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-2); }
.auth-alt a, .link-btn { color: var(--brand-600); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* 6 haneli kod kutuları */
.code-boxes { display: flex; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.code-boxes input {
    width: 48px; height: 58px; text-align: center; font-size: 24px; font-weight: 700;
    border: 1.5px solid var(--border-2); border-radius: var(--r-md);
    background: var(--surface-2); color: var(--text); outline: none;
    transition: border-color .15s, box-shadow .15s, transform .1s;
    caret-color: var(--brand);
}
.code-boxes input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); transform: translateY(-2px); }
.code-boxes input.filled { border-color: var(--brand); background: var(--brand-soft); }
.code-timer { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 12px; }

/* =====================================================================
   FORM ELEMANLARI
   ===================================================================== */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.field .err { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; }
.field.has-error .err { display: block; }
.field.has-error .input, .field.has-error .g-select-btn { border-color: var(--danger); }

.input, textarea.input {
    width: 100%; padding: 10px 14px; border: 1.5px solid var(--border-2);
    border-radius: var(--r-md); background: var(--surface); color: var(--text);
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea.input { resize: vertical; min-height: 88px; line-height: 1.55; }

.input-icon-wrap { position: relative; }
.input-icon-wrap .input { padding-left: 38px; }
.input-icon-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); pointer-events: none; }

.checkbox-row { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--text-2); }
.checkbox-row input { display: none; }
.cbox {
    width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--border-2);
    display: inline-grid; place-items: center; flex: none; transition: all .15s; background: var(--surface);
}
.cbox svg { width: 11px; height: 11px; color: #fff; opacity: 0; transform: scale(.4); transition: all .18s var(--ease); }
.checkbox-row input:checked + .cbox { background: var(--brand-600); border-color: var(--brand-600); }
.checkbox-row input:checked + .cbox svg { opacity: 1; transform: scale(1); }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--r-md); font-weight: 600; font-size: 13.5px;
    border: 1.5px solid transparent; transition: all .16s var(--ease); white-space: nowrap;
    user-select: none;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,.35); }
.btn-primary:hover { background: var(--brand-700); box-shadow: 0 4px 14px rgba(79,70,229,.42); }
[data-theme="dark"] .btn-primary { color: #0D0F1A; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-600); background: var(--brand-soft); }
.btn-soft { background: var(--brand-soft); color: var(--brand-600); }
.btn-soft:hover { background: rgba(99,102,241,.18); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn .spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-ghost .spinner, .btn-soft .spinner { border-color: var(--brand-soft); border-top-color: var(--brand-600); }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
    width: 32px; height: 32px; display: inline-grid; place-items: center;
    border-radius: var(--r-sm); color: var(--text-2); transition: all .15s; flex: none;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand-600); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn svg { width: 17px; height: 17px; }

/* =====================================================================
   UYGULAMA KABUĞU — kenar çubuğu + üst çubuk
   ===================================================================== */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
    width: var(--sidebar-w); flex: none; display: flex; flex-direction: column;
    background: var(--surface); border-right: 1px solid var(--border);
    position: sticky; top: 0; height: 100vh; height: 100dvh; z-index: 30;
}
.sidebar-logo { position: relative; height: 56px; font-size: 21px; font-weight: 800; letter-spacing: -.8px; color: var(--brand-600); }
.sidebar-logo i { font-style: normal; color: var(--accent); }
/* mini "eg" ve tam "emap görev" aynı noktadan başlar — geçişte hiçbir şey kaymaz */
.sidebar-logo .logo-mini, .sidebar-logo .logo-full { position: absolute; top: 17px; left: 24px; transition: opacity .16s var(--ease); white-space: nowrap; }
.sidebar-logo .logo-mini { opacity: 0; }
.sidebar-company {
    margin: 0 12px 14px; padding: 10px 12px; border-radius: var(--r-md);
    background: var(--surface-2); border: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px; overflow: hidden;
}
.sidebar-company .cname { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-company .cplan { font-size: 11px; color: var(--text-3); }
.company-badge {
    width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    color: #fff; font-weight: 800; font-size: 14px;
}
.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; flex: 1; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-md);
    color: var(--text-2); font-weight: 500; font-size: 13.5px; position: relative;
    transition: all .15s var(--ease); text-align: left; width: 100%;
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item .nav-label { white-space: nowrap; overflow: hidden; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-600); font-weight: 600; }
.nav-item.active::before {
    content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--brand-600);
}
.nav-badge {
    margin-left: auto; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px;
    background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700;
    display: grid; place-items: center;
}
.nav-section { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text-3); padding: 16px 12px 6px; }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.sidebar-footer .who { flex: 1; min-width: 0; }
.sidebar-footer .who .n { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .who .r { font-size: 11px; color: var(--text-3); }

/* ---------- Daraltılabilir kenar çubuğu (masaüstü) ----------
   Ray sayfada HEP 72px yer kaplar; genişleyince içeriğin ÜZERİNE açılır.
   Böylece ana içerik asla kaymaz. İkon/avatar/rozet konumları iki durumda
   da birebir aynıdır — yalnızca yazılar opaklıkla belirir. */
@media (min-width: 901px) {
    .shell { padding-left: 72px; }
    .sidebar {
        position: fixed; left: 0; top: 0; height: 100vh; height: 100dvh;
        width: 72px; z-index: 40; overflow: hidden;
        transition: width .24s var(--ease), box-shadow .24s var(--ease);
    }
    .sidebar:hover, .sidebar:focus-within {
        width: var(--sidebar-w);
        box-shadow: 14px 0 40px -18px rgba(16, 19, 34, .3);
    }

    /* Sabit geometri: ikonlar rayın ortasında, genişleyince YERİNDE kalır */
    .sidebar .nav-item { padding-left: 15px; padding-right: 10px; }
    .sidebar .nav-item.active::before { left: -8px; }
    .sidebar .nav { overflow-x: hidden; scrollbar-width: none; }
    .sidebar .nav::-webkit-scrollbar { display: none; }
    .sidebar .nav-section { height: 30px; padding: 16px 12px 6px; overflow: hidden; }
    .sidebar .sidebar-company { padding-left: 8px; }
    .sidebar .sidebar-footer { padding-left: 20px; }

    /* Yazılar: yer kaplamadan (grid 0fr hilesi yerine mutlak şeffaflık)
       yalnızca opaklıkla belirir; ray dar olduğundan zaten kırpılır */
    .sidebar .nav-label,
    .sidebar .logo-full,
    .sidebar .ctext,
    .sidebar .who,
    .sidebar #quickLogout,
    .sidebar .nav-section .nav-label {
        opacity: 0; transition: opacity .13s var(--ease); pointer-events: none;
    }
    .sidebar:hover .nav-label,
    .sidebar:focus-within .nav-label,
    .sidebar:hover .logo-full,
    .sidebar:focus-within .logo-full,
    .sidebar:hover .ctext,
    .sidebar:focus-within .ctext,
    .sidebar:hover .who,
    .sidebar:focus-within .who,
    .sidebar:hover #quickLogout,
    .sidebar:focus-within #quickLogout {
        opacity: 1; pointer-events: auto; transition: opacity .18s var(--ease) .1s;
    }
    .sidebar .logo-mini { opacity: 1; }
    .sidebar:hover .logo-mini, .sidebar:focus-within .logo-mini { opacity: 0; }

    /* Bildirim rozeti HER İKİ durumda da ikonun köşesinde sabit durur */
    .sidebar .nav-badge {
        position: absolute; top: 3px; left: 27px; margin: 0;
        min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px;
    }
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex; align-items: center; gap: 14px; padding: 14px 24px;
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 17px; font-weight: 700; letter-spacing: -.3px; margin: 0; }
.topbar .sub { font-size: 12px; color: var(--text-3); }
.topbar-spacer { flex: 1; }
.hamburger { display: none; }

/* Avatarlar */
.avatar {
    width: 30px; height: 30px; border-radius: 50%; flex: none;
    display: inline-grid; place-items: center; color: #fff; font-size: 11.5px; font-weight: 700;
    border: 2px solid var(--surface); user-select: none;
}
.avatar.lg { width: 42px; height: 42px; font-size: 15px; }
.avatar.sm { width: 24px; height: 24px; font-size: 9.5px; border-width: 1.5px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar:not(:first-child) { margin-left: -8px; }
.avatar-more {
    background: var(--surface-2) !important; color: var(--text-2) !important;
    border: 2px solid var(--surface); font-size: 10px !important;
}

/* =====================================================================
   PANO ÜSTÜ — özet çipleri ve filtre çubuğu
   ===================================================================== */
.board-head { padding: 18px 24px 0; }
.stat-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.stat-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px;
    border-radius: 30px; background: var(--surface); border: 1px solid var(--border);
    font-size: 12.5px; font-weight: 600; color: var(--text-2);
    box-shadow: var(--shadow-sm); transition: all .18s var(--ease); cursor: default;
    animation: rise .4s var(--ease) backwards;
}
.stat-chip:nth-child(2) { animation-delay: .04s; }
.stat-chip:nth-child(3) { animation-delay: .08s; }
.stat-chip:nth-child(4) { animation-delay: .12s; }
.stat-chip b { color: var(--text); font-size: 13.5px; }
.stat-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.stat-chip.danger b { color: var(--danger); }
.stat-chip.warn b { color: var(--warn); }

/* Limit göstergesi */
.limit-meter { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; color: var(--text-3); }
.limit-meter .track { width: 90px; height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; }
.limit-meter .fill { height: 100%; border-radius: 6px; background: var(--brand); transition: width .5s var(--ease), background .3s; }
.limit-meter.hot .fill { background: var(--danger); }

.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 14px; }
.filter-bar .search-wrap { position: relative; width: 230px; }
.filter-bar .search-wrap input { padding: 8px 12px 8px 34px; border-radius: 30px; font-size: 13px; width: 100%; }
.filter-bar .search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); }
.filter-clear { font-size: 12px; color: var(--danger); font-weight: 600; padding: 6px 10px; border-radius: var(--r-sm); }
.filter-clear:hover { background: var(--danger-soft); }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 30px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 14px; border-radius: 30px; font-size: 12.5px; font-weight: 600; color: var(--text-2); transition: all .18s var(--ease); display: inline-flex; align-items: center; gap: 6px; }
.seg button svg { width: 14px; height: 14px; }
.seg button.active { background: var(--brand-600); color: #fff; box-shadow: 0 1px 6px rgba(79,70,229,.4); }
[data-theme="dark"] .seg button.active { color: #0D0F1A; }

/* =====================================================================
   KANBAN
   ===================================================================== */
.board-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; padding: 4px 24px 20px; }
.board { display: flex; gap: 16px; align-items: flex-start; height: 100%; min-height: 420px; }

.kcol {
    width: 296px; flex: none; display: flex; flex-direction: column; max-height: 100%;
    background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-lg);
    animation: rise .4s var(--ease) backwards;
}
.kcol:nth-child(2) { animation-delay: .05s; }
.kcol:nth-child(3) { animation-delay: .10s; }
.kcol:nth-child(4) { animation-delay: .15s; }
.kcol-head { display: flex; align-items: center; gap: 9px; padding: 13px 14px 9px; }
.kcol-head .cdot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.kcol-head .cname { font-weight: 700; font-size: 13.5px; letter-spacing: -.2px; }
.kcol-head .ccount { font-size: 11.5px; font-weight: 700; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); padding: 1px 8px; border-radius: 20px; }
.kcol-head .kcol-menu { margin-left: auto; opacity: 0; transition: opacity .15s; }
.kcol:hover .kcol-menu { opacity: 1; }

.kcol-body { padding: 4px 10px 6px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kcol-footer { padding: 6px 10px 12px; }
.kcol-add {
    width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    border-radius: var(--r-md); color: var(--text-3); font-size: 13px; font-weight: 500;
    border: 1.5px dashed transparent; transition: all .16s var(--ease);
}
.kcol-add svg { width: 15px; height: 15px; }
.kcol-add:hover { color: var(--brand-600); border-color: var(--border-2); background: var(--surface); }

/* Görev kartı */
.tcard {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
    padding: 12px 13px; cursor: pointer; position: relative;
    box-shadow: var(--shadow-sm); transition: all .18s var(--ease);
    animation: card-in .3s var(--ease) backwards;
}
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tcard:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tcard.dragging { opacity: .35; transform: rotate(2.5deg) scale(1.02); box-shadow: var(--shadow-lg); }
.tcard.done .tcard-title { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-2); }

.tcard-labels { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.label-pill { height: 7px; width: 34px; border-radius: 4px; transition: all .2s var(--ease); }
.tcard:hover .label-pill { width: auto; height: auto; padding: 1px 8px; font-size: 10px; font-weight: 700; color: #fff; }
.label-pill i { font-style: normal; display: none; }
.tcard:hover .label-pill i { display: inline; }
.label-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600; border: 1px solid transparent;
}
.label-chip .ldot { width: 7px; height: 7px; border-radius: 50%; }

.tcard-title { font-weight: 600; font-size: 13.5px; line-height: 1.4; letter-spacing: -.15px; word-break: break-word; }
.tcard-desc { font-size: 12px; color: var(--text-3); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.meta-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--text-3); padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
.meta-chip svg { width: 12px; height: 12px; }
.meta-chip.due-today { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.meta-chip.overdue { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.meta-chip.done-chip { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.tcard-meta .avatar-stack { margin-left: auto; }

.prio-flag { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; flex: none; }
.prio-flag svg { width: 12px; height: 12px; }
.prio-low    { color: #94A3B8; background: rgba(148,163,184,.14); }
.prio-normal { color: var(--accent); background: rgba(14,165,233,.12); }
.prio-high   { color: var(--warn); background: var(--warn-soft); }
.prio-urgent { color: var(--danger); background: var(--danger-soft); }

/* Sürükle-bırak yer tutucu */
.drop-slot {
    height: 0; border-radius: var(--r-md); border: 2px dashed var(--brand);
    background: var(--brand-soft); opacity: 0; transition: height .18s var(--ease), opacity .18s, margin .18s;
    pointer-events: none; margin: 0;
}
.drop-slot.show { height: 58px; opacity: 1; margin: 2px 0; }
.kcol.drag-over { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Hızlı ekleme kutusu */
.quick-add { background: var(--surface); border: 1.5px solid var(--brand); border-radius: var(--r-md); padding: 10px; box-shadow: var(--shadow-md); animation: card-in .2s var(--ease); }
.quick-add textarea { width: 100%; border: none; outline: none; background: transparent; resize: none; font-size: 13.5px; font-weight: 500; min-height: 40px; color: var(--text); }
.quick-add .qa-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }

/* =====================================================================
   TAKVİM GÖRÜNÜMÜ (Pano ↔ Takvim)
   ===================================================================== */
.board-scroll.cal-mode { overflow-x: hidden; overflow-y: auto; }
.board-scroll.cal-mode .board { display: block; height: auto; }
.bcal { max-width: 1100px; animation: rise .35s var(--ease); }
.bcal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.bcal-title { font-size: 16px; font-weight: 800; letter-spacing: -.3px; min-width: 130px; text-align: center; text-transform: capitalize; }
.bcal-hint { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.bcal-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
    background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    /* Büyüyen önizleme kartları taşabilsin diye overflow açık; köşeler tek tek yuvarlanır */
    overflow: visible;
}
.bcal-grid > :nth-child(1) { border-top-left-radius: var(--r-lg); }
.bcal-grid > :nth-child(7) { border-top-right-radius: var(--r-lg); }
.bcal-grid > :nth-child(43) { border-bottom-left-radius: var(--r-lg); }
.bcal-grid > :last-child { border-bottom-right-radius: var(--r-lg); }
.bcal-dow {
    background: var(--surface-2); padding: 8px 0; text-align: center;
    font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--text-3);
}
.bcal-cell {
    background: var(--surface); min-height: 108px; padding: 5px;
    display: flex; flex-direction: column; gap: 2px; position: relative;
    cursor: pointer; transition: background .14s;
}
.bcal-cell:hover { background: var(--brand-soft); }
.bcal-cell.weekend { background: var(--surface-2); }
.bcal-cell.weekend:hover { background: var(--brand-soft); }
.bcal-cell.other { opacity: .45; }
.bcal-cell.today { box-shadow: inset 0 0 0 2px var(--brand); z-index: 1; }
.bcal-cell.today .bcal-daynum {
    background: var(--brand-600); color: #fff; border-radius: 50%;
    width: 21px; height: 21px; display: inline-grid; place-items: center;
}
[data-theme="dark"] .bcal-cell.today .bcal-daynum { color: #0D0F1A; }
.bcal-daynum { font-size: 11.5px; font-weight: 700; color: var(--text-2); margin: 1px 0 2px 2px; align-self: flex-start; }

/* Güne görev ekleme "+" — hücreye gelince belirir */
.bcal-add {
    position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
    display: grid; place-items: center; border-radius: 7px;
    background: var(--brand-600); color: #fff; opacity: 0; transform: scale(.7);
    transition: all .15s var(--ease); z-index: 2;
}
.bcal-add svg { width: 12px; height: 12px; }
.bcal-cell:hover .bcal-add { opacity: 1; transform: none; }
.bcal-add:hover { background: var(--brand-700); transform: scale(1.1); }
[data-theme="dark"] .bcal-add { color: #0D0F1A; }

/* Mini görev şeridi — ince sıra; üzerine gelince önizleme kartı büyür */
.bcal-pill {
    position: relative; display: flex; align-items: center; gap: 5px; width: 100%;
    padding: 2px 5px; border-radius: 6px; background: var(--surface-2);
    border: 1px solid var(--border); font-size: 10.5px; font-weight: 600;
    color: var(--text); text-align: left; line-height: 1.5;
}
.bcal-pill:hover { border-color: var(--brand); z-index: 12; }
.bcal-pill .bp-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.bcal-pill .bp-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcal-pill.done .bp-title { text-decoration: line-through; color: var(--text-3); }
.bcal-pill.overdue { border-left: 3px solid var(--danger); }
/* Yerleşim tipi: başlangıç tarihine göre = noktalı sol kenar,
   tarihsiz (oluşturmaya göre) = kesikli çerçeve + hafif soluk */
.bcal-pill.by-start { border-left: 3px dotted var(--accent); }
.bcal-pill.by-created { border-style: dashed; opacity: .82; }
.bcal-pill.by-created:hover { opacity: 1; }
.bp-grow-date { font-size: 10px; font-weight: 700; color: var(--text-3); }

/* Büyüyen önizleme kartı (hover) */
.bcal-pill .bp-grow {
    display: none; position: absolute; left: -8px; top: -8px; min-width: 210px; max-width: 250px;
    flex-direction: column; gap: 7px; padding: 10px 12px; text-align: left;
    background: var(--surface); border: 1.5px solid var(--brand);
    border-radius: 12px; box-shadow: var(--shadow-pop); cursor: pointer;
}
.bcal-pill:hover .bp-grow, .bcal-pill:focus-visible .bp-grow { display: flex; animation: pop-in .16s var(--ease); }
.bp-grow-title { font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.4; white-space: normal; }
.bp-grow-meta { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.bp-grow-meta .bp-late { font-style: normal; color: var(--danger); font-weight: 700; }
/* Son sütunlarda kart sağdan taşmasın */
.bcal-cell:nth-child(7n) .bp-grow, .bcal-cell:nth-child(7n-1) .bp-grow { left: auto; right: -8px; }
/* Son satırlarda kart alta değil üste açılsın */
.bcal-grid > :nth-child(n+36) .bp-grow { top: auto; bottom: -8px; }

.bcal-more { font-size: 10.5px; font-weight: 700; color: var(--brand-600); text-align: left; padding: 2px 6px; border-radius: 6px; }
.bcal-more:hover { background: var(--brand-soft); }
@media (max-width: 900px) {
    .bcal-cell { min-height: 76px; }
    .bcal-pill .bp-title { display: none; }
    .bcal-pill { width: auto; padding: 4px; }
    .bcal-pill .bp-grow { display: none !important; } /* dokunmatikte gün paneli kullanılır */
    .bcal-add { display: none; }
    .bcal-cell { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
    .bcal-daynum { width: 100%; }
    .bcal-hint { display: none; }
}

/* =====================================================================
   LİSTE GÖRÜNÜMÜ
   ===================================================================== */
.list-wrap { padding: 4px 24px 24px; }
.task-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.task-table thead th {
    text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    color: var(--text-3); padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2);
    white-space: nowrap;
}
.task-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.task-table tbody tr { cursor: pointer; transition: background .12s; animation: rise .3s var(--ease) backwards; }
.task-table tbody tr:hover { background: var(--surface-2); }
.task-table tbody tr:last-child td { border-bottom: none; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.status-badge .sdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.row-title { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }

.group-head { padding: 18px 4px 8px; display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 13.5px; }
.group-head .gdot { width: 9px; height: 9px; border-radius: 50%; }
.group-head .gcount { color: var(--text-3); font-weight: 600; font-size: 12px; }

/* =====================================================================
   SLIDE-OVER GÖREV PANELİ
   ===================================================================== */
.panel-backdrop {
    position: fixed; inset: 0; background: rgba(10, 12, 24, .42); z-index: 60;
    opacity: 0; transition: opacity .25s var(--ease);
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.panel-backdrop.open { opacity: 1; }
.task-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 61;
    background: var(--surface); border-left: 1px solid var(--border);
    display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .32s var(--ease);
}
.task-panel.open { transform: none; }
.panel-top { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.panel-top .pid { font-size: 12px; color: var(--text-3); font-weight: 600; }
.panel-body { flex: 1; overflow-y: auto; }
.panel-section { padding: 18px 22px; }

.ptitle {
    width: 100%; border: none; outline: none; background: transparent; color: var(--text);
    font-size: 19px; font-weight: 700; letter-spacing: -.4px; line-height: 1.35; resize: none;
    border-radius: var(--r-sm); padding: 4px 8px; margin: -4px -8px 4px;
    transition: background .15s;
}
.ptitle:hover { background: var(--surface-2); }
.ptitle:focus { background: var(--surface-2); box-shadow: 0 0 0 2px var(--brand-soft); }

.prop-grid { display: grid; grid-template-columns: 118px 1fr; gap: 8px 14px; align-items: center; margin-top: 10px; }
.prop-label { font-size: 12.5px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.prop-label svg { width: 14px; height: 14px; }

.pdesc {
    width: 100%; border: 1.5px solid transparent; outline: none; background: transparent; color: var(--text-2);
    font-size: 13.5px; line-height: 1.6; resize: vertical; min-height: 60px;
    border-radius: var(--r-md); padding: 8px 10px; margin: 2px -10px 0; transition: all .15s;
}
.pdesc:hover { background: var(--surface-2); }
.pdesc:focus { background: var(--surface); border-color: var(--brand); color: var(--text); }

/* Panel sekmeleri */
.ptabs { display: flex; gap: 2px; padding: 0 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 3; }
.ptab {
    padding: 11px 13px; font-size: 13px; font-weight: 600; color: var(--text-3);
    border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .16s;
    display: inline-flex; align-items: center; gap: 6px;
}
.ptab .cnt { font-size: 10.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0 6px; font-weight: 700; }
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--brand-600); border-bottom-color: var(--brand-600); }
.ptab.active .cnt { background: var(--brand-soft); border-color: transparent; color: var(--brand-600); }

/* Checklist */
.clist { display: flex; flex-direction: column; gap: 2px; }
.clist-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.clist-progress .track { flex: 1; height: 7px; border-radius: 7px; background: var(--border); overflow: hidden; }
.clist-progress .fill { height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--brand), var(--ok)); transition: width .4s var(--ease); }
.citem { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); transition: background .13s; }
.citem:hover { background: var(--surface-2); }
.citem .ct { flex: 1; font-size: 13.5px; }
.citem.done .ct { color: var(--text-3); text-decoration: line-through; }
.citem .icon-btn { opacity: 0; width: 26px; height: 26px; }
.citem:hover .icon-btn { opacity: 1; }
.citem-add { display: flex; gap: 8px; margin-top: 10px; }
.citem-add input { flex: 1; }

/* Notlar */
.note-card {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
    padding: 12px 14px; margin-bottom: 10px; animation: rise .25s var(--ease) backwards;
}
.note-card.pinned { border-color: var(--warn); background: var(--warn-soft); }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.note-head .nname { font-size: 12.5px; font-weight: 700; }
.note-head .ntime { font-size: 11px; color: var(--text-3); }
.note-head .nactions { margin-left: auto; display: flex; opacity: 0; transition: opacity .15s; }
.note-card:hover .nactions { opacity: 1; }
.note-body { font-size: 13.5px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.pin-ico { color: var(--warn); width: 13px; height: 13px; }

/* Not ekleri (fotoğraf/dosya) */
.compose-files { display: flex; flex-wrap: wrap; gap: 7px; }
.file-chiplet {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px;
    border-radius: 20px; background: var(--brand-soft); border: 1px solid var(--border);
    font-size: 12px; font-weight: 600; color: var(--text-2); max-width: 100%;
}
.file-chiplet i { font-style: normal; color: var(--text-3); font-size: 10.5px; }
.file-chiplet button { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: var(--text-3); }
.file-chiplet button:hover { background: var(--danger-soft); color: var(--danger); }
.file-chiplet button svg { width: 10px; height: 10px; }

.att-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att-thumb {
    position: relative; width: 92px; height: 92px; border-radius: var(--r-md); overflow: hidden;
    border: 1px solid var(--border); background: var(--surface-2); display: block;
    transition: all .18s var(--ease);
}
.att-thumb:hover { transform: scale(1.04); box-shadow: var(--shadow-md); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-del {
    position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
    background: rgba(10,12,24,.6); color: #fff; display: grid; place-items: center;
    opacity: 0; transition: opacity .15s;
}
.att-thumb:hover .att-del, .att-file:hover .att-del { opacity: 1; }
.att-del svg { width: 10px; height: 10px; }
.att-files { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.att-file {
    position: relative; display: flex; align-items: center; gap: 9px; padding: 8px 34px 8px 12px;
    border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border);
    font-size: 12.5px; font-weight: 600; color: var(--text); transition: all .15s;
}
.att-file:hover { border-color: var(--brand); }
.att-file .fname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-file i { font-style: normal; color: var(--text-3); font-size: 11px; font-weight: 500; }
.att-file .att-del { top: 50%; transform: translateY(-50%); right: 8px; background: var(--danger-soft); color: var(--danger); }

/* Mesajlaşma */
.chat-wrap { display: flex; flex-direction: column; height: 100%; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 9px; max-width: 86%; animation: rise .22s var(--ease) backwards; }
.msg .bubble {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px;
    padding: 8px 13px; font-size: 13.5px; line-height: 1.55; word-break: break-word; white-space: pre-wrap;
}
.msg .m-meta { font-size: 10.5px; color: var(--text-3); margin-top: 3px; display: flex; gap: 8px; align-items: center; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .bubble { background: var(--brand-600); color: #fff; border-color: transparent; border-radius: 14px 4px 14px 14px; }
[data-theme="dark"] .msg.mine .bubble { color: #0D0F1A; }
.msg.mine .m-meta { justify-content: flex-end; }
.msg .del-msg { opacity: 0; font-size: 10.5px; color: var(--danger); cursor: pointer; }
.msg:hover .del-msg { opacity: 1; }
.chat-day { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-3); margin: 6px 0; position: relative; }
.chat-input-row { display: flex; gap: 9px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-input-row textarea {
    flex: 1; resize: none; max-height: 120px; padding: 10px 14px; border-radius: 20px;
    border: 1.5px solid var(--border-2); outline: none; background: var(--surface-2);
    font-size: 13.5px; line-height: 1.45; transition: border-color .15s;
}
.chat-input-row textarea:focus { border-color: var(--brand); }
.send-btn {
    width: 40px; height: 40px; border-radius: 50%; background: var(--brand-600); color: #fff;
    display: grid; place-items: center; flex: none; transition: all .16s var(--ease);
    box-shadow: 0 2px 8px rgba(79,70,229,.4);
}
.send-btn:hover { background: var(--brand-700); transform: scale(1.06); }
.send-btn:active { transform: scale(.94); }
.send-btn svg { width: 17px; height: 17px; margin-left: 2px; }
.send-btn:disabled { opacity: .5; }

/* Aktivite zaman tüneli */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 16px; animation: rise .25s var(--ease) backwards; }
.tl-item::before {
    content: ''; position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--surface); border: 3px solid var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.tl-item .tl-text { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.tl-item .tl-text b { color: var(--text); font-weight: 600; }
.tl-item .tl-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* =====================================================================
   ÖZEL SELECT / POPOVER / TAKVİM
   ===================================================================== */
.g-select-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; max-width: 100%;
    border: 1.5px solid var(--border-2); border-radius: var(--r-md); background: var(--surface);
    font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer;
    transition: all .15s var(--ease); text-align: left; min-height: 36px;
}
.g-select-btn:hover { border-color: var(--brand); }
.g-select-btn.open { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.g-select-btn .caret { margin-left: auto; width: 14px; height: 14px; color: var(--text-3); transition: transform .2s var(--ease); flex: none; }
.g-select-btn.open .caret { transform: rotate(180deg); }
.g-select-btn .placeholder { color: var(--text-3); }
.g-select-btn.slim { border-color: transparent; background: transparent; padding: 5px 8px; margin-left: -8px; }
.g-select-btn.slim:hover { background: var(--surface-2); }
.g-select-value { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }

.popover {
    position: fixed; z-index: 90; min-width: 230px; max-width: 320px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-pop); overflow: hidden;
    animation: pop-in .18s var(--ease);
    display: flex; flex-direction: column; max-height: 380px;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.popover .pop-search { padding: 9px; border-bottom: 1px solid var(--border); }
.popover .pop-search input {
    width: 100%; padding: 8px 12px; border-radius: var(--r-sm); font-size: 13px;
    border: 1.5px solid var(--border-2); outline: none; background: var(--surface-2);
}
.popover .pop-search input:focus { border-color: var(--brand); }
.pop-list { overflow-y: auto; padding: 6px; flex: 1; }
.pop-opt {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
    border-radius: var(--r-sm); font-size: 13.5px; text-align: left; color: var(--text);
    transition: background .12s;
}
.pop-opt:hover, .pop-opt.hl { background: var(--surface-2); }
.pop-opt.selected { background: var(--brand-soft); color: var(--brand-600); font-weight: 600; }
.pop-opt .odot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pop-opt .otick { margin-left: auto; width: 15px; height: 15px; color: var(--brand-600); opacity: 0; flex: none; }
.pop-opt.selected .otick { opacity: 1; }
.pop-opt .osub { font-size: 11px; color: var(--text-3); font-weight: 400; }
.pop-empty { text-align: center; padding: 18px; color: var(--text-3); font-size: 12.5px; }
.pop-footer { border-top: 1px solid var(--border); padding: 8px; }

/* Takvim */
.cal { padding: 12px; width: 262px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head .cal-title { font-weight: 700; font-size: 13.5px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text-3); padding: 4px 0; }
.cal-day {
    aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px;
    font-size: 12.5px; font-weight: 500; transition: all .12s;
}
.cal-day:hover { background: var(--brand-soft); }
.cal-day.other { color: var(--text-3); opacity: .45; }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--brand); font-weight: 700; }
.cal-day.selected { background: var(--brand-600); color: #fff; font-weight: 700; }
[data-theme="dark"] .cal-day.selected { color: #0D0F1A; }

/* Renk paleti seçici */
.color-swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; padding: 4px 2px; }
.swatch { aspect-ratio: 1; border-radius: 8px; cursor: pointer; transition: transform .13s var(--ease); position: relative; border: none; }
.swatch:hover { transform: scale(1.15); }
.swatch.selected::after {
    content: ''; position: absolute; inset: -4px; border-radius: 11px;
    border: 2px solid var(--text); opacity: .7;
}

/* =====================================================================
   MODAL / TOAST / MENÜ
   ===================================================================== */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px;
    background: rgba(10,12,24,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    animation: fade-in .2s;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
    width: 100%; max-width: 460px; max-height: calc(100vh - 60px); overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg); padding: 26px; animation: rise .3s var(--ease);
}
.modal.wide { max-width: 620px; }
.modal-title { font-size: 17px; font-weight: 700; letter-spacing: -.3px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.modal-sub { color: var(--text-2); font-size: 13px; margin: 0 0 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

.toast-zone { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
    display: flex; align-items: flex-start; gap: 11px; min-width: 260px; max-width: 380px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
    box-shadow: var(--shadow-pop); padding: 13px 15px; pointer-events: auto;
    animation: toast-in .3s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } }
.toast.hide { animation: toast-out .25s var(--ease) forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
.toast .t-ico { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.toast .t-ico svg { width: 13px; height: 13px; }
.toast.ok .t-ico { background: var(--ok-soft); color: var(--ok); }
.toast.err .t-ico { background: var(--danger-soft); color: var(--danger); }
.toast.info .t-ico { background: var(--brand-soft); color: var(--brand-600); }
.toast .t-msg { font-size: 13px; font-weight: 500; line-height: 1.45; }

.menu { position: fixed; z-index: 95; min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 5px; animation: pop-in .15s var(--ease); }
.menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 11px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; text-align: left; color: var(--text); transition: background .12s; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }
.menu button.danger:hover { background: var(--danger-soft); }
.menu button svg { width: 15px; height: 15px; color: var(--text-3); }
.menu button.danger svg { color: var(--danger); }
.menu hr { border: none; border-top: 1px solid var(--border); margin: 5px 4px; }

/* =====================================================================
   SAYFALAR — etiketler, ekip, bildirimler, ayarlar, admin
   ===================================================================== */
.page-wrap { padding: 22px 24px 40px; max-width: 980px; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.4px; margin: 0; }
.page-head .desc { color: var(--text-3); font-size: 13px; width: 100%; margin-top: -8px; }
.page-head .btn { margin-left: auto; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gcard {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 18px; box-shadow: var(--shadow-sm); transition: all .18s var(--ease);
    animation: rise .35s var(--ease) backwards;
}
.gcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Etiket satırı */
.label-row { display: flex; align-items: center; gap: 13px; padding: 13px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 9px; transition: all .15s; animation: rise .3s var(--ease) backwards; }
.label-row:hover { box-shadow: var(--shadow-md); }
.label-row .lbig { width: 15px; height: 15px; border-radius: 5px; flex: none; }
.label-row .lname { font-weight: 600; flex: 1; }
.label-row .lcount { font-size: 12px; color: var(--text-3); cursor: pointer; }
.label-row .lcount:hover { color: var(--brand-600); text-decoration: underline; }

/* Ekip üyesi kartı */
.member-card { display: flex; align-items: center; gap: 14px; padding: 15px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 10px; animation: rise .3s var(--ease) backwards; transition: box-shadow .18s; }
.member-card:hover { box-shadow: var(--shadow-md); }
.member-card .m-info { flex: 1; min-width: 0; }
.member-card .m-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.member-card .m-mail { font-size: 12.5px; color: var(--text-3); }
.member-card .m-stats { font-size: 12px; color: var(--text-2); text-align: right; }
.role-tag { font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.role-owner { background: var(--warn-soft); color: var(--warn); }
.role-admin { background: var(--brand-soft); color: var(--brand-600); }
.role-member { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }
.role-super_admin { background: var(--danger-soft); color: var(--danger); }
.state-passive { opacity: .55; }

/* Bildirim satırı */
.notif-row { display: flex; gap: 13px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; cursor: pointer; transition: all .15s; animation: rise .3s var(--ease) backwards; }
.notif-row:hover { box-shadow: var(--shadow-md); }
.notif-row.unread { border-left: 3px solid var(--brand-600); background: var(--brand-soft); }
.notif-row .n-body { flex: 1; min-width: 0; }
.notif-row .n-title { font-weight: 600; font-size: 13.5px; }
.notif-row .n-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.notif-row .n-time { font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* İstatistik kartları (admin + genel) */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); animation: rise .35s var(--ease) backwards; }
.stat-card .s-label { font-size: 12px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat-card .s-label svg { width: 15px; height: 15px; }
.stat-card .s-value { font-size: 26px; font-weight: 800; letter-spacing: -1px; margin-top: 6px; }
.stat-card .s-foot { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

/* Admin tablo */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.admin-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background .12s; cursor: pointer; }
.admin-table tbody tr:hover { background: var(--surface-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }

/* Boş durum */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-3); animation: rise .4s var(--ease); }
.empty-state .e-emoji { font-size: 44px; margin-bottom: 12px; filter: grayscale(.2); }
.empty-state .e-title { font-size: 15px; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
.empty-state .e-sub { font-size: 13px; max-width: 340px; margin: 0 auto 18px; }

/* Ayarlar */
.settings-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.settings-block h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; letter-spacing: -.2px; display: flex; align-items: center; gap: 9px; }
.settings-block h3 svg { width: 17px; height: 17px; color: var(--brand-600); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Tema anahtarı */
.theme-toggle {
    display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 30px; padding: 3px; gap: 2px;
}
.theme-toggle button { padding: 5px 13px; border-radius: 30px; font-size: 12px; font-weight: 600; color: var(--text-3); display: inline-flex; gap: 6px; align-items: center; transition: all .18s; }
.theme-toggle button svg { width: 13px; height: 13px; }
.theme-toggle button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Skeleton yükleme */
.skeleton { position: relative; overflow: hidden; background: var(--border); border-radius: var(--r-sm); }
.skeleton::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent);
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* =====================================================================
   DUYARLILIK
   ===================================================================== */
@media (max-width: 900px) {
    .sidebar {
        position: fixed; left: 0; transform: translateX(-100%); transition: transform .28s var(--ease);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open { transform: none; }
    .sidebar-backdrop { position: fixed; inset: 0; background: rgba(10,12,24,.4); z-index: 29; animation: fade-in .2s; }
    .hamburger { display: inline-grid; }
    .task-panel { width: 100vw; }
    .board-head, .board-scroll { padding-left: 16px; padding-right: 16px; }
    .page-wrap, .list-wrap { padding-left: 16px; padding-right: 16px; }
    .topbar { padding: 12px 16px; }
    .kcol { width: 272px; }
    .form-row-2 { grid-template-columns: 1fr; }
    .task-table .hide-sm { display: none; }
    .filter-bar .search-wrap { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
