/* ─────────────────────────── Plan Asistanı ─────────────────────────── */

/* plan durumu kartı */
.asst-card { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; padding: 14px; border-radius: var(--r-lg);
             border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.asst-card[hidden] { display: none; }
.asst-card b { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.asst-card small { display: block; font-size: var(--fs-xs); color: var(--text-2); margin-top: 3px; line-height: 1.45; }
.asst-card .btn { flex: none; }
.asst-card__icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
                   background: var(--accent); color: var(--on-accent); }
.asst-card__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.asst-card__chips .chip { height: auto; min-height: 26px; padding: 4px 10px; text-align: left; white-space: normal; line-height: 1.3; }

/* plan belgeleri penceresi */
.pd-top__acts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* pencere */
.asst-modal .modal__body { display: flex; flex-direction: column; min-height: 0; }
.asst { display: flex; flex-direction: column; gap: 10px; min-height: min(62vh, 560px); }
.asst-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 2px 2px 6px; max-height: 62vh; }
.asst-empty { margin: auto; max-width: 520px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px; }
.asst-empty__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); }
.asst-empty .asst-card__chips { justify-content: center; }

.asst-turn { display: flex; flex-direction: column; gap: 8px; }
.asst-q { align-self: flex-end; max-width: 82%; padding: 9px 13px; border-radius: 16px 16px 4px 16px;
          background: var(--accent); color: var(--on-accent); font-size: var(--fs-sm); line-height: 1.5; white-space: pre-wrap; }
.asst-a { align-self: flex-start; max-width: 100%; padding: 12px 14px; border-radius: 16px 16px 16px 4px;
          background: var(--surface-2); font-size: var(--fs-sm); line-height: 1.6; }
.asst-a p { margin: 0 0 8px; }
.asst-a p:last-child { margin-bottom: 0; }
.asst-a ul, .asst-a ol { margin: 4px 0 8px; padding-left: 20px; }
.asst-a li { margin: 3px 0; }
.asst-a .asst-h { font-weight: 700; }
.asst-table { overflow-x: auto; margin: 6px 0 10px; }
.asst-table table { border-collapse: collapse; font-size: var(--fs-xs); min-width: 60%; }
.asst-table th, .asst-table td { padding: 5px 9px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.asst-table th { background: var(--surface); font-weight: 700; }
.asst-a.is-error { background: var(--danger-soft); color: var(--danger); display: flex; align-items: center; gap: 6px; }
.cite { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin: 0 1px; border-radius: 6px; vertical-align: 1px;
        font: 700 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--accent-soft); color: var(--accent-text);
        border: 1px solid transparent; cursor: pointer; }
.cite:hover { border-color: var(--accent); }
.asst-meta { display: flex; align-items: center; gap: 4px; }
.asst-meta .btn.is-on { background: var(--accent-soft); }
.asst-cite { padding: 10px 12px; border-radius: var(--r-md); border: 1px dashed var(--line-2); background: var(--surface); }
.asst-cite[hidden] { display: none; }
.asst-cite__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.asst-cite__head .btn { margin-left: auto; }
.asst-cite__text { font-size: var(--fs-xs); line-height: 1.6; color: var(--text-2); white-space: pre-line; max-height: 260px; overflow-y: auto; }

.asst-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.asst-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: asst-dot 1.1s infinite ease-in-out; }
.asst-typing i:nth-child(2) { animation-delay: .15s; }
.asst-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes asst-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .asst-typing i { animation: none; opacity: .6; } }

.asst-form { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.asst-form textarea { resize: vertical; min-height: 52px; max-height: 180px; }
.asst-form__bar { display: flex; align-items: center; gap: 8px; }
.asst-form__bar > span { margin-right: auto; }

@media (max-width: 560px) {
  .asst-card { flex-wrap: wrap; }
  .asst-q { max-width: 92%; }
  .asst { min-height: 55vh; }
  .asst-log { max-height: 58vh; }
}
@media print { .asst-card { display: none !important; } }
