/* Dijifair çalışma alanı (firma paneli) */
.panel-body { background: var(--bg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pbar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 16px; height: 62px; padding: 0 20px; background: var(--ink); color: #c9d6e2; }
.pbar .brand-word { font-size: 26px; }
.pbar-tag { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); border-left: 1px solid rgba(255,255,255,.18); padding-left: 14px; }
.pswitch select { background: var(--ink-2); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: .88rem; max-width: 320px; }
.pbar-links { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: .88rem; font-weight: 600; }
.pbar-links a, .pbar-links button { padding: 7px 11px; border-radius: 8px; color: #c9d6e2; background: none; border: 0; font: inherit; cursor: pointer; }
.pbar-links a:hover, .pbar-links button:hover { background: rgba(255,255,255,.08); color: #fff; }

.pwrap { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 62px); }
.pwrap.has-side { grid-template-columns: 250px 1fr; }
.pside { background: #fff; border-right: 1px solid var(--line); padding: 16px 12px 30px; position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; }
.pside a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: .89rem; font-weight: 600; color: var(--text); }
.pside a:hover { background: var(--bg); color: var(--ink); }
.pside a.on { background: var(--brand-soft); color: var(--ink); }
.pside a i { font-style: normal; font-size: .66rem; font-weight: 800; color: var(--muted); background: var(--bg); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.pside a.on i { background: #fff; color: var(--brand-dark); }
.pside-group { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 10px 6px; }
.pside .pside-project { display: block; background: var(--ink); color: #fff; padding: 14px; border-radius: 12px; }
.pside .pside-project:hover { background: var(--ink-2); color: #fff; }
.pside-project b { display: block; font-size: .95rem; line-height: 1.25; }
.pside-project span { display: block; font-size: .78rem; color: #a9b8c8; margin-top: 3px; }
.pside-project em { display: inline-block; margin-top: 8px; font-style: normal; font-weight: 800; font-size: .8rem; background: var(--brand); color: var(--ink); padding: 2px 9px; border-radius: 999px; }
.pside-project em.past { background: #c7d2fe; }
.pside .pside-settings { margin-top: 18px; color: var(--muted); font-size: .82rem; }

.pmain { padding: 28px 32px 60px; min-width: 0; max-width: 1280px; width: 100%; }
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.phead h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.phead p { margin: 6px 0 0; color: var(--muted); max-width: 760px; }
.phead .src { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: 6px; }
.phead .src a:hover { text-decoration: underline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; }
.box + .box { margin-top: 18px; }
.box h2 { font-size: 1.1rem; margin-bottom: 12px; }
.box h3 { font-size: 1rem; }
.box-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.box-head h2 { margin: 0; }
.cols { display: grid; gap: 18px; grid-template-columns: repeat(12, 1fr); }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.cols > * { min-width: 0; }
.hint { font-size: .84rem; color: var(--muted); }
.quote-box { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 14px 18px; border-radius: 0 12px 12px 0; color: var(--ink); font-weight: 600; margin: 0 0 18px; }
.quote-box small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; margin-top: 4px; }

/* Formlar */
.pform .form-grid { gap: 14px; }
.pform .field small { color: var(--muted); font-size: .78rem; font-weight: 500; }
.pform fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.pform legend { font-weight: 800; color: var(--ink); font-size: 1.02rem; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.pform legend i { font-style: normal; font-size: .7rem; background: var(--brand-soft); color: var(--brand-dark); padding: 2px 8px; border-radius: 999px; }
.field textarea { min-height: 84px; resize: vertical; }
.choice { display: flex; flex-wrap: wrap; gap: 6px; }
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-block; padding: 8px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: .86rem; font-weight: 600; cursor: pointer; }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--brand); }
.savebar { position: sticky; bottom: 0; background: rgba(246, 248, 250, .94); backdrop-filter: blur(6px); padding: 12px 0; margin-top: 10px; display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); z-index: 5; }

/* Tablolar */
.ptable { width: 100%; border-collapse: collapse; font-size: .89rem; }
.ptable th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable input, .ptable select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: .88rem; }
.ptable .num { text-align: right; white-space: nowrap; }
.ptable tfoot td { font-weight: 800; color: var(--ink); border-top: 2px solid var(--ink); }
.scroll-x { overflow-x: auto; }

/* Görev listesi */
.task { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task-status { display: flex; gap: 3px; }
.task-status button { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: .85rem; color: var(--muted); }
.task-status button.on.s-todo { background: #e5e9ef; border-color: #b7c4d1; color: var(--ink); }
.task-status button.on.s-doing { background: #fff1c7; border-color: #e0a100; color: #7a5600; }
.task-status button.on.s-done { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.task-title { font-weight: 700; color: var(--ink); }
.task.is-done .task-title { text-decoration: line-through; color: var(--muted); }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--muted); margin-top: 3px; }
.task-meta .late { color: #dc2626; font-weight: 700; }
.task-meta .blocked { color: #b45309; font-weight: 700; }
details.edit > summary { cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--brand-dark); list-style: none; }
details.edit > summary::-webkit-details-marker { display: none; }
details.edit[open] { grid-column: 1 / -1; background: var(--bg); padding: 14px; border-radius: 12px; }

/* Kontrol listesi */
.qgroup { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.qgroup > summary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.qgroup > summary::-webkit-details-marker { display: none; }
.qgroup > summary b { color: var(--ink); flex: 1; }
.qgroup > summary .meter { width: 140px; height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.qgroup > summary .meter i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.qgroup > summary em { font-style: normal; font-weight: 800; font-size: .84rem; color: var(--brand-dark); min-width: 70px; text-align: right; }
.qlist { padding: 0 18px 14px; display: grid; gap: 2px; }
.qpage { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 4px; }
.qpage a:hover { color: var(--brand-dark); }
.qitem { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: .92rem; }
.qitem:hover { background: var(--bg); }
.qitem input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand-dark); flex: none; }
.qitem input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,143,137,.5); }

/* Kart listesi (çalışma kayıtları) */
.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.entry { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.entry h3 { margin: 0; font-size: 1rem; }
.entry dl { margin: 0; display: grid; gap: 6px; font-size: .85rem; }
.entry dt { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.entry dd { margin: 0; color: var(--text); white-space: pre-line; }
.entry-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.entry-foot form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: .82rem; font-weight: 700; color: var(--brand-dark); cursor: pointer; }
.linkbtn.danger { color: #b91c1c; }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #eef2f6; border-radius: 14px; padding: 10px; min-height: 260px; display: flex; flex-direction: column; gap: 8px; }
.kcol.drop { outline: 2px dashed var(--brand); background: var(--brand-soft); }
.kcol-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 6px; }
.kcol-head b { color: var(--ink); font-size: .88rem; }
.kcol-head span { font-size: .78rem; font-weight: 800; color: var(--muted); }
.kcol-head small { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; }
.kcard { background: #fff; border-radius: 10px; padding: 11px 12px; border: 1px solid var(--line); cursor: grab; font-size: .84rem; box-shadow: 0 1px 2px rgba(16,42,67,.06); }
.kcard:active { cursor: grabbing; }
.kcard b { display: block; color: var(--ink); font-size: .9rem; }
.kcard .meta { color: var(--muted); font-size: .78rem; display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; }
.kcard .late { color: #dc2626; font-weight: 700; }

/* Görüşme hızlı kayıt (telefon) */
.capture { max-width: 760px; }
.capture .field input, .capture .field select, .capture .field textarea { font-size: 1rem; padding: 13px 14px; }
.fitq { display: grid; gap: 10px; }
.fitq .field > label { display: flex; justify-content: space-between; gap: 10px; }
.fitq .field > label small { font-weight: 500; color: var(--muted); }
.suggest { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); font-size: .9rem; color: var(--ink); }
.suggest b { font-size: .95rem; }

/* Mesajlar */
.msg { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.msg + .msg { margin-top: 14px; }
.msg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.msg-head b { color: var(--ink); }
.msg-body { padding: 16px 18px; white-space: pre-wrap; font-size: .92rem; line-height: 1.65; }
.msg-body .subj { font-weight: 800; color: var(--ink); display: block; margin-bottom: 10px; }

/* Etkinlik akışı */
.feed { display: grid; gap: 10px; }
.feed-item { display: grid; grid-template-columns: 10px 1fr; gap: 12px; font-size: .86rem; }
.feed-item::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 6px; }
.feed-item.t-asama::before { background: var(--ink); }
.feed-item.t-mesaj::before { background: #2f6fbf; }
.feed-item small { color: var(--muted); display: block; font-size: .76rem; }

/* Panel içi küçük kartlar */
.pcard { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: .15s; }
a.pcard:hover { border-color: #c7cede; box-shadow: var(--shadow); transform: translateY(-2px); }
.pcard h3 { margin: 0 0 4px; }
.pcard .meta { font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 12px; }
.pcard .bars { display: grid; gap: 6px; margin-top: 10px; font-size: .76rem; color: var(--muted); }
.mini { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.mini i { display: block; height: 100%; background: var(--brand); }
.todo { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .88rem; align-items: baseline; }
.todo:last-child { border-bottom: 0; }
.todo b { color: var(--ink); }
.todo .when { margin-left: auto; white-space: nowrap; font-size: .78rem; font-weight: 700; color: var(--muted); }
.todo .when.late { color: #dc2626; }

/* Asistan */
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; border: 0; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(16,42,67,.35); }
.ai-fab i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--ink); display: grid; place-items: center; font-size: .8rem; }
.ai-panel { position: fixed; right: 20px; bottom: 80px; z-index: 81; width: min(400px, calc(100vw - 40px)); max-height: min(560px, calc(100vh - 120px)); display: none; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(16,42,67,.35); overflow: hidden; }
.ai-panel.open { display: flex; }
.ai-head { background: var(--ink); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.ai-head small { display: block; color: #a9b8c8; font-size: .74rem; }
.ai-head button { background: none; border: 0; color: #fff; font-size: 1.2rem; cursor: pointer; }
.ai-log { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 10px; align-content: start; background: var(--bg); }
.ai-log .bubble { max-width: 92%; font-size: .88rem; white-space: pre-wrap; }
.ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.ai-form textarea { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font: inherit; font-size: .9rem; resize: none; height: 44px; }
.ai-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: .78rem; cursor: pointer; }
.ai-soon { font-size: .72rem; font-weight: 800; background: #fff1c7; color: #7a5600; padding: 2px 8px; border-radius: 999px; }

@media (max-width: 1024px) {
  .pwrap.has-side { grid-template-columns: 1fr; }
  .pside { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; white-space: nowrap; }
  .pside .pside-project { display: none; }
  .pside-group { display: none; }
  .pside a { flex: none; }
  .pside a i { display: none; }
  .pside .pside-settings { margin-top: 0; }
  .c4, .c5, .c6, .c7, .c8 { grid-column: span 12; }
}
@media (max-width: 700px) {
  .pbar { gap: 10px; padding: 0 12px; }
  .pbar-tag, .pbar-links a:not(:last-child) { display: none; }
  .pswitch select { max-width: 150px; }
  .pmain { padding: 18px 16px 90px; }
  .box { padding: 16px; }
  .task { grid-template-columns: 1fr; }
  .qgroup > summary .meter { display: none; }
  .ai-fab span { display: none; }
}
@media print {
  .pbar, .pside, .ai-fab, .ai-panel, .actions, .savebar, .no-print { display: none !important; }
  .pwrap.has-side { grid-template-columns: 1fr; }
  .pmain { padding: 0; }
  .box { break-inside: avoid; border-color: #ccc; }
}
.savebar { flex-wrap: wrap; }
@media (max-width: 700px) { .savebar { padding-right: 60px; } .savebar .btn { flex: 1 1 auto; } .ai-fab { padding: 12px; bottom: 14px; right: 12px; } }
.demo-band { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 20px; background: #fff4d6; color: #5c3d00; font-size: .9rem; border-bottom: 1px solid #f1d78c; position: sticky; top: 62px; z-index: 55; }
.demo-band form { margin: 0; }
.alert-demo { background: #fff4d6; color: #5c3d00; }
.dj-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .9rem; max-width: min(520px, calc(100vw - 32px)); box-shadow: 0 12px 30px rgba(16,42,67,.35); z-index: 90; transition: transform .25s; }
.dj-toast.on { transform: translate(-50%, 0); }
.has-demo .pside { top: 104px; }
.has-demo .pside { top: 106px; height: calc(100vh - 106px); }
@media (max-width: 1024px) { .demo-band { position: static; } .has-demo .pside { top: auto; height: auto; } }
