/* =====================================================
   Ofis İş Takip — Profesyonel Tasarım Sistemi
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700&display=swap');

:root {
    /* Yüzeyler */
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #fafbfc;
    --surface-hover: #f4f5f7;

    /* Kenarlıklar */
    --border: #e8eaed;
    --border-2: #dce0e5;

    /* Metin */
    --text: #1a1d21;
    --text-2: #545d6b;
    --muted: #8a93a2;

    /* Vurgu */
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-soft: #eef0fe;
    --accent-text: #4338ca;

    /* Anlamsal renkler (yumuşak) */
    --green: #15824b;   --green-soft: #e7f5ec;
    --amber: #b06f12;   --amber-soft: #fbf2e1;
    --red: #c93a2e;     --red-soft: #fceceb;
    --blue: #2563eb;    --blue-soft: #e8f0fe;
    --violet: #6d40d4;  --violet-soft: #f0eafb;
    --slate: #5a6473;   --slate-soft: #eef0f3;

    /* Yarıçap & gölge */
    --radius-sm: 7px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 2px 6px rgba(16, 24, 40, .06);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

    --sidebar-w: 248px;

    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
svg { display: block; flex: 0 0 auto; }

/* ===== Giriş / Kurulum ===== */
.auth-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg); padding: 24px;
}
.auth-card {
    background: var(--surface); width: 100%; max-width: 392px; padding: 40px 36px;
    border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    display: flex; flex-direction: column;
}
.auth-logo {
    width: 48px; height: 48px; border-radius: 12px; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.auth-title { text-align: center; margin: 0 0 4px; font-size: 21px; font-weight: 650; letter-spacing: -.01em; }
.auth-sub { text-align: center; color: var(--muted); margin: 0 0 26px; font-size: 14px; }
.install-list { color: var(--text-2); font-size: 13.5px; line-height: 2; padding-left: 18px; }

/* ===== Yerleşim ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 18px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 14px 12px 6px; }
.nav-link {
    display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text-2); font-weight: 500; font-size: 14px; transition: background .12s, color .12s;
}
.nav-link svg { color: var(--muted); transition: color .12s; }
.nav-link:hover { background: var(--surface-hover); color: var(--text); }
.nav-link:hover svg { color: var(--text-2); }
.nav-link.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-link.active svg { color: var(--accent); }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px; margin-bottom: 6px; }
.user-meta { overflow: hidden; }
.user-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: var(--muted); font-size: 12px; }

.content { flex: 1; min-width: 0; margin-left: var(--sidebar-w); padding: 30px 36px 60px; }
.menu-toggle { display: none; }

/* ===== Avatar ===== */
.avatar {
    width: 34px; height: 34px; border-radius: 8px; flex: 0 0 auto;
    background: var(--accent-soft); color: var(--accent-text);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12.5px;
}
.avatar-sm { width: 24px; height: 24px; border-radius: 6px; font-size: 10.5px; }

/* ===== Sayfa başlığı ===== */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-title { font-size: 22px; margin: 0; font-weight: 650; letter-spacing: -.02em; }
.page-sub { color: var(--muted); margin: 3px 0 0; font-size: 14px; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; margin-bottom: 8px; font-weight: 500; }
.back-link:hover { color: var(--text-2); }
.section-h { font-size: 14px; font-weight: 600; margin: 0 0 16px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.section-h svg { color: var(--muted); }

/* ===== Butonlar ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 15px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-weight: 550; font-size: 13.5px; cursor: pointer; transition: .12s; font-family: inherit; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-danger { background: var(--surface); color: var(--red); border-color: #f0c9c5; }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-block { width: 100%; margin-top: 8px; }

/* ===== Kartlar ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.card.no-pad { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.card-title { font-size: 15px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-title svg { color: var(--muted); }
.link { color: var(--accent-text); font-size: 13px; font-weight: 550; display: inline-flex; align-items: center; gap: 3px; }
.link:hover { color: var(--accent-hover); }

/* ===== İstatistik kartları ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: .15s; }
.stat-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat-ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.stat-ic.c-slate { background: var(--slate-soft); color: var(--slate); }
.stat-ic.c-blue { background: var(--blue-soft); color: var(--blue); }
.stat-ic.c-violet { background: var(--violet-soft); color: var(--violet); }
.stat-ic.c-green { background: var(--green-soft); color: var(--green); }
.stat-ic.c-red { background: var(--red-soft); color: var(--red); }
.stat-num { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 5px; }

/* ===== Rozetler ===== */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 550; white-space: nowrap; line-height: 1.4; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.prio-dusuk  { background: var(--slate-soft); color: var(--slate); }
.prio-normal { background: var(--blue-soft); color: var(--blue); }
.prio-yuksek { background: var(--amber-soft); color: var(--amber); }
.prio-acil   { background: var(--red-soft); color: var(--red); }
.status-bekliyor   { background: var(--slate-soft); color: var(--slate); }
.status-devam      { background: var(--violet-soft); color: var(--violet); }
.status-tamamlandi { background: var(--green-soft); color: var(--green); }
.status-iptal      { background: var(--red-soft); color: var(--red); }
.role-admin { background: var(--violet-soft); color: var(--violet); }
.role-emp   { background: var(--blue-soft); color: var(--blue); }
.role-admin::before, .role-emp::before { display: none; }

/* Kategori çipi */
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px;
    font-size: 12px; font-weight: 550; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border);
}
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--accent)); }
.chip-sm { font-size: 11px; padding: 2px 7px; }

/* ===== Tablolar ===== */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 12px 18px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.t-title { font-weight: 550; color: var(--text); }
.t-title:hover { color: var(--accent-text); }
.assignee { display: inline-flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); }
.ta-right { text-align: right; }
.nowrap { white-space: nowrap; }
.row-late { background: #fef6f5 !important; }
.row-muted { opacity: .5; }
.due-late { color: var(--red); font-weight: 550; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot-on { background: var(--green); }
.dot-off { background: #cbd2db; }

/* ===== Liste (panel) ===== */
.task-list { display: flex; flex-direction: column; margin: -6px 0; }
.task-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; border-radius: 8px; transition: background .1s; }
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: var(--surface-2); }
.task-row-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-row-title { font-weight: 550; }
.task-row-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.due { display: inline-flex; align-items: center; gap: 5px; }
.due svg { width: 14px; height: 14px; }

/* ===== Filtreler ===== */
.filters { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 18px; }
.filters .input { width: auto; min-width: 150px; }
.search-field { position: relative; flex: 1; min-width: 220px; }
.search-field svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }
.search-field .input { width: 100%; padding-left: 36px; }

/* ===== Form ===== */
.field { display: block; margin-bottom: 17px; }
.field-label { display: block; font-size: 13px; font-weight: 550; margin-bottom: 7px; color: var(--text-2); }
.input {
    width: 100%; padding: 9px 12px; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text); transition: .12s;
}
.input::placeholder { color: var(--muted); }
.input:hover { border-color: #c4cad2; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; line-height: 1.6; }
.input-color { height: 42px; padding: 4px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 18px; }
.form-card { max-width: 720px; }
.form-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

/* ===== Detay ===== */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.task-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.desc { color: var(--text-2); line-height: 1.75; font-size: 14px; }
.info-card .info-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.info-card .info-row:last-child { border-bottom: none; }
.info-k { color: var(--muted); }
.info-v { font-weight: 550; text-align: right; }

/* ===== Yorumlar ===== */
.comments { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.comment { display: flex; gap: 11px; }
.comment-body { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; flex: 1; }
.comment-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 5px; flex-wrap: wrap; }
.tag-role { font-size: 11px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); padding: 1px 7px; border-radius: 5px; }
.comment-time { color: var(--muted); font-size: 12px; margin-left: auto; }
.comment-text { color: var(--text-2); line-height: 1.65; }
.comment-form { display: flex; flex-direction: column; gap: 10px; }
.comment-form .btn { align-self: flex-end; }
.status-form .input { width: 100%; }

/* ===== Kanban ===== */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.kanban-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.kanban-col-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; margin-bottom: 12px; padding: 2px 4px; color: var(--text-2); }
.kanban-col-head .kh-left { display: inline-flex; align-items: center; gap: 7px; }
.kanban-col-head .kh-left svg { width: 16px; height: 16px; }
.kanban-col-head .count { background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; }
.kanban-drop { display: flex; flex-direction: column; gap: 9px; min-height: 50px; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; box-shadow: var(--shadow-sm); cursor: grab; transition: box-shadow .12s, border-color .12s; }
.kanban-card:hover { box-shadow: var(--shadow); border-color: var(--border-2); }
.kanban-card.dragging { opacity: .4; }
.kc-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.kc-title { display: block; font-weight: 550; font-size: 13.5px; margin-bottom: 11px; color: var(--text); line-height: 1.45; }
.kc-title:hover { color: var(--accent-text); }
.kc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kanban-drop.drag-over { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.hint { color: var(--muted); font-size: 13px; margin-top: 14px; display: flex; align-items: center; gap: 6px; }
.hint svg { width: 15px; height: 15px; }

/* ===== Alert / boş durum ===== */
.alert { padding: 11px 15px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 13.5px; border: 1px solid transparent; }
.alert-error   { background: var(--red-soft); color: #a3271d; border-color: #f3cdc9; }
.alert-success { background: var(--green-soft); color: #0f6038; border-color: #c5e8d3; }
.alert-warning { background: var(--amber-soft); color: #8a560c; border-color: #f0dcb4; }
.empty { text-align: center; color: var(--muted); padding: 46px 20px; font-size: 14px; }
.empty.sm { padding: 22px; }

/* ===== Görünüm geçişi ===== */
.view-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; font-size: 13px; font-weight: 550; color: var(--text-2); }
.view-toggle a svg { width: 15px; height: 15px; }
.view-toggle a:not(.active):hover { background: var(--surface-hover); }
.view-toggle a.active { background: var(--accent); color: #fff; }

/* ===== Bildirim rozeti (nav) ===== */
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.user-chip { border-radius: var(--radius-sm); transition: background .12s; }
a.user-chip:hover { background: var(--surface-hover); }
a.user-chip.active { background: var(--accent-soft); }

/* ===== Bildirim listesi ===== */
.notif-list { display: flex; flex-direction: column; }
.notif-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); transition: background .1s; }
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--surface-2); }
.notif-row.unread { background: var(--accent-soft); }
.notif-row.unread:hover { background: #e6e9fd; }
.notif-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.notif-row.unread .notif-ic { background: var(--surface); border-color: var(--accent-soft); color: var(--accent); }
.notif-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.notif-msg { color: var(--text); font-size: 13.5px; }
.notif-time { color: var(--muted); font-size: 12px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: 0 0 auto; }

/* ===== Alt görevler / checklist ===== */
.sub-counter { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; margin-left: 4px; }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 16px; border: 1px solid var(--border); }
.progress-bar { height: 100%; background: var(--green); border-radius: 999px; transition: width .25s ease; }
.subtask-list { display: flex; flex-direction: column; margin-bottom: 12px; }
.subtask-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.subtask-item:last-child { border-bottom: none; }
.subtask-check { background: none; border: none; padding: 0; cursor: pointer; color: var(--muted); display: flex; }
.subtask-check:hover { color: var(--accent); }
.subtask-item.done .subtask-check { color: var(--green); }
.subtask-title { flex: 1; font-size: 13.5px; }
.subtask-item.done .subtask-title { text-decoration: line-through; color: var(--muted); }
.subtask-del { display: flex; opacity: 0; transition: opacity .12s; }
.subtask-item:hover .subtask-del { opacity: 1; }
.subtask-add { display: flex; gap: 8px; margin-top: 6px; }
.subtask-add .input { flex: 1; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; display: inline-flex; align-items: center; }
.icon-btn:hover { color: var(--text); background: var(--surface-hover); }

/* ===== Dosyalar ===== */
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.attach-item { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.attach-item:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.attach-thumb { display: flex; align-items: center; justify-content: center; height: 110px; background: var(--surface-2); overflow: hidden; }
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach-file { color: var(--muted); }
.attach-meta { padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.attach-name { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-size { font-size: 11px; color: var(--muted); }
.attach-actions { display: flex; justify-content: flex-end; gap: 2px; padding: 0 6px 6px; }
.upload-form { display: flex; flex-direction: column; gap: 10px; }
.file-drop { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1.5px dashed var(--border-2); border-radius: var(--radius-sm); cursor: pointer; color: var(--text-2); font-size: 13.5px; transition: .12s; }
.file-drop:hover { border-color: var(--accent); background: var(--surface-2); }
.file-drop svg { color: var(--muted); }
.file-drop input[type=file] { display: none; }
.upload-form .btn { align-self: flex-start; }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
    .detail-grid { grid-template-columns: 1fr; }
    .kanban { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .content { margin-left: 0; padding: 18px; }
    .menu-toggle { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border-2); padding: 9px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; cursor: pointer; font-weight: 550; font-size: 14px; font-family: inherit; color: var(--text); }
    .kanban { grid-template-columns: 1fr; }
}
