/* Kütüphane sayfası, pencereleri ve yazışma ekranındaki kütüphane bağlantıları */
.dialog.doc-dialog { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; overflow-x: hidden; }
.dialog.doc-dialog.wide { width: min(1080px, 100%); }
.dialog.doc-dialog .dialog-title { margin-bottom: 16px; }
/* Genel ".dialog input" kuralı (tam genişlik, 39px) onay kutularını büyütmesin. */
.dialog.doc-dialog input[type=checkbox] { width: 15px; height: 15px; padding: 0; flex: none; }
.dialog.doc-dialog textarea { width: 100%; min-height: 64px; padding: 9px 10px; border: 1px solid #e7e8ef; border-radius: 7px; outline: 0; resize: vertical;
  color: #44485e; font: inherit; font-size: 13px; line-height: 1.45; }
.dialog.doc-dialog textarea:focus { border-color: #988ef0; box-shadow: 0 0 0 3px #7162df14; }
.dialog.doc-dialog textarea::placeholder, .dialog.doc-dialog input::placeholder { color: #a8adbd; }

/* Yükleme penceresi */
.doc-file-input { position: absolute; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.doc-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 18px; border: 1.5px dashed #cfd2e6; border-radius: 12px;
  background: #fafaff; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.doc-drop:hover, .doc-drop:focus-visible, .doc-drop.dragover { border-color: #7c6ff0; background: #f3f1ff; outline: 0; }
.doc-drop-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #ebe8ff; color: #6555d8; font-size: 19px; }
.doc-drop-title { color: #303449; font-size: 13px; font-weight: 600; }
.doc-drop-title u { color: #6555d8; text-decoration-color: #c9c2fb; text-underline-offset: 3px; }
.doc-drop-hint { color: #8a91a3; font-size: 11.5px; }
.doc-file-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #e4e7ef; border-radius: 12px; background: #fafbfd; }
.doc-file-text { flex: 1; min-width: 0; }
.doc-file-text b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #303449; font-size: 13px; }
.doc-file-text small { color: #8a91a3; font-size: 11.5px; }
.doc-field { margin-top: 16px; }
.dialog .doc-field label { margin: 0 0 6px; }
.doc-field > small { display: block; margin-top: 5px; color: #9aa0b1; font-size: 11.5px; }
.doc-optional { margin-left: 4px; padding: 1px 6px; border-radius: 8px; background: #f0f1f5; color: #8a91a3; font-size: 10.5px; font-weight: 500; }
.doc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-chip { padding: 6px 12px; border: 1px solid #e4e7ef; border-radius: 16px; background: #fff; color: #5b6074; font: inherit; font-size: 12.5px;
  cursor: pointer; transition: all .12s; }
.doc-chip:hover { border-color: #c9c2fb; color: #4b3fc4; }
.doc-chip.active { border-color: #6555d8; background: #6555d8; color: #fff; }
.dialog label.doc-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 16px 0 0; padding: 12px 14px;
  border: 1px solid #e9eaf1; border-radius: 10px; cursor: pointer; font-size: 13px; }
.doc-switch-row b { display: block; color: #303449; font-weight: 600; }
.doc-switch-row small { display: block; margin-top: 2px; color: #8a91a3; font-size: 11.5px; font-weight: 400; }
.dialog.doc-dialog input.doc-switch { appearance: none; -webkit-appearance: none; position: relative; width: 38px; height: 22px; margin: 0; border: 0;
  border-radius: 11px; background: #d5d8e3; cursor: pointer; transition: background .15s; box-shadow: none; }
.dialog.doc-dialog input.doc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px #0003; transition: transform .15s; }
.dialog.doc-dialog input.doc-switch:checked { background: #6555d8; }
.dialog.doc-dialog input.doc-switch:checked::after { transform: translateX(16px); }
.dialog.doc-dialog input.doc-switch:focus-visible { box-shadow: 0 0 0 3px #7162df33; }
#docUploadError:empty, #docEditError:empty { display: none; }
#docUploadError, #docEditError { margin-top: 12px; }
.setup-warning.doc-base-ok { color: #4a5368; background: #f6f7fb; border-color: #e4e7ef; }

.doc-table td { vertical-align: middle; }
.doc-name { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.doc-name b { display: block; }
.doc-name small, .doc-sub { display: block; color: #8a91a3; font-size: 12px; }
.doc-icon { flex: none; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 800;
  color: #4f46e5; background: #eef0ff; }
.doc-icon.video { color: #c2410c; background: #fff1e6; font-size: 15px; }
.doc-archived { opacity: .6; }
.doc-actions { white-space: nowrap; text-align: right; }
.doc-actions .icon-button { display: inline-grid; text-decoration: none; }
.doc-bar { display: inline-block; width: 54px; height: 6px; border-radius: 3px; background: #e9ebf2; vertical-align: middle; overflow: hidden; }
.doc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #22c55e); }
.doc-status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.doc-status.none { color: #7a8296; background: #f0f1f5; }
.doc-status.seen { color: #1d6b48; background: #e6f6ee; }
.doc-status.done { color: #fff; background: #22a06b; }
.doc-progress { position: relative; height: 22px; border-radius: 6px; background: #eef0f5; overflow: hidden; margin-top: 14px; }
.doc-progress > div { height: 100%; width: 0; background: #6366f1; transition: width .2s; }
.doc-progress span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: #1d2433; }
.doc-shares-summary { display: flex; gap: 18px; flex-wrap: wrap; color: #5b6478; font-size: 13px; margin-bottom: 8px; }
.doc-shares-wrap { max-height: 60vh; overflow: auto; }
.doc-views td { background: #fafbfd; }
.doc-view-list { display: grid; gap: 4px; font-size: 12px; color: #4a5368; }

/* Dosya seçici (yazışma ekranı) */
#docUploadDialog { z-index: 1200; } /* seçicinin üstünde açılabilsin */
#docPickerDialog .dialog.doc-dialog.wide { width: min(760px, 100%); }
#docPickerWarning { margin: 0 0 14px; padding: 10px 12px; font-size: 12.5px; }
#docPickerWarning .link-button, #docBaseWarning .link-button { font-weight: 600; }
.doc-picker-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-search { position: relative; flex: 1 1 260px; min-width: 0; }
.doc-search span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9aa0b1; font-size: 14px; pointer-events: none; }
.dialog .doc-search input { width: 100%; height: 38px; padding-left: 32px; }
.dialog select.doc-picker-select { flex: 0 0 180px; width: 180px; height: 38px; }
.doc-picker-bar .button { height: 38px; white-space: nowrap; }
.doc-picker-list { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; margin: 12px 0 4px; padding: 2px; }
.dialog label.doc-pick { position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 11px 14px; border: 1px solid #e6e8f0;
  border-radius: 12px; background: #fff; color: inherit; font-size: 13px; font-weight: 400; cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s; }
.dialog label.doc-pick:hover { border-color: #d3d0f5; background: #fbfbff; box-shadow: 0 2px 8px #3b2fb20d; }
.dialog label.doc-pick.selected { border-color: #6555d8; background: #f6f4ff; box-shadow: 0 0 0 1px #6555d8 inset; }
/* Yerel onay kutusu gizli (erişilebilir kalır); seçim sağdaki yuvarlak işaretle gösterilir. */
.dialog.doc-dialog input.doc-pick-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.doc-pick:has(.doc-pick-input:focus-visible) { box-shadow: 0 0 0 3px #7162df33; }
.doc-pick .doc-icon { width: 42px; height: 42px; border-radius: 10px; font-size: 11px; }
.doc-icon.t-pdf { color: #d93b3b; background: #fdecec; }
.doc-icon.t-ppt { color: #d4611c; background: #fdf0e6; }
.doc-icon.t-doc { color: #2563eb; background: #e9f0fe; }
.doc-icon.t-xls { color: #16803d; background: #e7f6ec; }
.doc-icon.t-img { color: #8b5cf6; background: #f1ecfe; }
.doc-pick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.doc-pick-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #262a3d; font-size: 13.5px; font-weight: 600; }
.doc-pick-text small { display: flex; align-items: center; gap: 0; min-width: 0; color: #8a91a3; font-size: 12px; }
.doc-pick-text small > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-pick-text small > span + span::before { content: "·"; margin: 0 6px; color: #c3c7d3; }
.doc-pick-text small > span:last-child { flex: none; }
.doc-pick-cat { flex: none; color: #6555d8; font-weight: 600; }
.doc-pick-stats { flex: none; padding: 3px 9px; border-radius: 10px; background: #eef7f2; color: #2f7a55; font-size: 11.5px; white-space: nowrap; }
.doc-pick-stats.new { background: #f1f2f6; color: #8a91a3; }
.doc-pick-check { flex: none; width: 20px; height: 20px; border: 1.5px solid #cdd0dc; border-radius: 50%; background: #fff;
  display: grid; place-items: center; transition: all .12s; }
.doc-pick.selected .doc-pick-check { border-color: #6555d8; background: #6555d8; }
.doc-pick.selected .doc-pick-check::after { content: ""; width: 5px; height: 9px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); }
@media (max-width: 560px) { .doc-pick-stats { display: none; } }
.doc-picker-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 16px; border: 1.5px dashed #e0e2ec;
  border-radius: 12px; text-align: center; }
.doc-picker-empty b { color: #303449; font-size: 14px; }
.doc-picker-empty small { color: #8a91a3; font-size: 12.5px; max-width: 380px; }
.doc-picker-empty .button { margin-top: 8px; }
.doc-picker-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 9px; background: #f6f7fb; color: #6d7186; font-size: 12px; line-height: 1.5; }
.doc-picker-actions { align-items: center; margin-top: 18px; }
.doc-picker-count { margin-right: auto; color: #6d7186; font-size: 12.5px; }
.doc-picker-count b { color: #6555d8; }

/* Yazışma ekranı: seçilen kütüphane dosyaları ve gönderilmiş bağlantıların etkileşimi */
.msg-doc-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.msg-doc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 8px; border: 1px solid #d9dcf7; border-radius: 16px; background: #f3f3ff;
  font-size: 12px; color: #3730a3; max-width: 100%; }
.msg-doc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.msg-doc-chip button { border: 0; background: none; cursor: pointer; color: #6366f1; font-size: 14px; line-height: 1; padding: 0 2px; }
.msg-doc-note { flex-basis: 100%; color: #8a91a3; font-size: 11px; }
.msg-doc-card { display: flex; align-items: center; gap: 8px; margin: 6px 0; padding: 7px 9px; border-radius: 9px; background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(0, 0, 0, .06); font-size: 12px; }
.msg-doc-card .doc-icon { width: 30px; height: 30px; font-size: 10px; }
.msg-doc-card .doc-icon.video { font-size: 12px; }
.msg-doc-info { flex: 1; min-width: 0; }
.msg-doc-info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-doc-info small { color: #7a8296; }
