/* DentCell — Laboratuvar ekranı (radyoloji ekranının iskeletini kullanır) ve klinik tarafı laboratuvar panelleri */

.lab-dock { gap: 8px; max-width: calc(100vw - 24px); }
.lab-dock button { position: relative; padding: 11px 18px; }
.lab-dot { position: absolute; top: -4px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-style: normal; font-size: .66rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.lab-dot[hidden] { display: none; }

.lab-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lab-title h2 { margin: 0; font-size: 1.35rem; font-weight: 800; color: #0f172a; }
.lab-title span { color: #64748b; font-size: .84rem; }
.lab-muted { color: #94a3b8; }

/* Ana menü: kliniğin adı ve logosu */
.lab-home { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 34px; padding-top: 4vh; }
.lab-clinic { text-align: center; }
.lab-clinic-logo { width: 150px; height: 150px; margin: 0 auto 18px; border-radius: 36px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 18px 40px -16px rgba(37,99,235,.35); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lab-clinic-logo img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.lab-clinic-logo span { font-size: 3rem; font-weight: 800; color: #1d6fe0; }
.lab-clinic h1 { margin: 0; font-size: 2.1rem; font-weight: 800; color: #0f172a; letter-spacing: -.5px; }
.lab-clinic p { margin: 6px 0 0; color: #64748b; font-weight: 600; }
.lab-home-stats { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lab-home-stats button { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 18px 20px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: transform .15s ease, border-color .15s ease; }
.lab-home-stats button:hover { transform: translateY(-2px); border-color: #93c5fd; }
.lab-home-stats b { font-size: 1.6rem; color: #0f172a; }
.lab-home-stats span { color: #64748b; font-size: .8rem; font-weight: 700; }
.lab-home-stats button.warn b { color: #dc2626; }

/* İş kartı */
.lab-phead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.lab-phead h2 { margin: 0; font-size: 1.3rem; font-weight: 800; color: #0f172a; }
.lab-phead span { color: #64748b; font-size: .82rem; font-weight: 700; }
.lab-orders { display: flex; flex-direction: column; gap: 14px; }
.lab-order { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.lab-order.cancelled { opacity: .6; }
.lab-order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lab-order-head b { font-size: 1rem; color: #0f172a; margin-right: 8px; }
.lab-pname { display: block; color: #475569; font-weight: 700; font-size: .8rem; margin-top: 3px; }
.lab-teeth, .lab-shade { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-right: 6px; vertical-align: 2px; }
.lab-teeth { background: #e0f2fe; color: #0369a1; }
.lab-shade { background: #fef3c7; color: #92400e; }
.lab-order-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lab-st { font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.lab-st.st-req { background: #fef3c7; color: #92400e; }
.lab-st.st-prod { background: #ede9fe; color: #5b21b6; }
.lab-st.st-ship { background: #dbeafe; color: #1d4ed8; }
.lab-st.st-done { background: #dcfce7; color: #166534; }
.lab-st.st-cancel { background: #f1f5f9; color: #64748b; }
.lab-due { font-size: .74rem; font-weight: 700; color: #64748b; }
.lab-due.soon { color: #d97706; }
.lab-due.late { color: #dc2626; }
.lab-table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 12px; }
.lab-table { width: 100%; border-collapse: collapse; font-size: .8rem; min-width: 760px; }
.lab-table th { background: #f8fafc; text-align: left; font-size: .68rem; font-weight: 800; color: #64748b; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; border-right: 1px solid #eef2f7; white-space: nowrap; }
.lab-table td { padding: 10px; border-right: 1px solid #f1f5f9; color: #0f172a; font-weight: 600; white-space: nowrap; }
.lab-table th:last-child, .lab-table td:last-child { border-right: none; }
.lab-paid { color: #16a34a; font-weight: 800; }
.lab-unpaid { color: #d97706; font-weight: 800; }
.lab-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.lab-box { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; background: #fcfdff; }
.lab-box span { display: inline-block; font-size: .7rem; font-weight: 800; color: #0369a1; background: #e0f2fe; padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; }
.lab-box.done span { color: #166534; background: #dcfce7; }
.lab-box p { margin: 0; font-size: .84rem; color: #0f172a; line-height: 1.45; }
.lab-box p.lab-note { margin-top: 6px; color: #475569; font-size: .8rem; }
.lab-order-act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 12px; }
.rad-btn.ghost { background: transparent; }
.rad-btn.danger { color: #dc2626; border-color: #fecaca; }

/* Mesajlaşma: bildirimler, talepler, sohbet */
.lab-msgs { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "notices requests" "chat chat"; gap: 18px; }
.lab-notices { grid-area: notices; } .lab-requests { grid-area: requests; } .lab-chat { grid-area: chat; }
.lab-msgs .rad-card h3 svg { color: #1d6fe0; }
.lab-scroll { max-height: 290px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.lab-notice { border-left: 3px solid #93c5fd; background: #f8fafc; border-radius: 0; padding: 8px 10px; }
.lab-notice.mine { border-left-color: #cbd5e1; }
.lab-notice p, .lab-request p { margin: 0; font-size: .83rem; color: #0f172a; }
.lab-notice small, .lab-request small { color: #94a3b8; font-size: .72rem; }
.lab-request { display: flex; gap: 10px; align-items: center; justify-content: space-between; border: 1px solid #fde68a; background: #fffbeb; border-radius: 12px; padding: 9px 11px; }
.lab-request.mine { border-color: #e2e8f0; background: #f8fafc; }
.lab-request.resolved { opacity: .55; }
.lab-request.resolved p { text-decoration: line-through; }
.lab-compose { display: flex; gap: 8px; margin-top: 12px; }
.lab-compose input { flex: 1; min-width: 0; font: inherit; font-size: .86rem; padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 999px; outline: none; }
.lab-compose input:focus { border-color: #60a5fa; }
.lab-chat-list { height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: #efeae2; }
.lab-chat-list .rad-empty { background: #fff; }
.lab-bubble { max-width: 70%; padding: 7px 11px 5px; border-radius: 12px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.lab-bubble.in { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.lab-bubble.out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 4px; }
.lab-bubble p { margin: 0; font-size: .86rem; color: #111b21; }
.lab-bubble small { display: block; text-align: right; font-size: .66rem; color: #667781; margin-top: 2px; }

/* Ayarlar */
.lab-set-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.lab-form, .lab-modal form { display: flex; flex-direction: column; gap: 10px; }
.lab-form label, .lab-modal label { display: flex; flex-direction: column; gap: 5px; font-size: .78rem; font-weight: 700; color: #334155; flex: 1; min-width: 0; }
.lab-form input, .lab-form select, .lab-form textarea, .lab-modal input, .lab-modal select, .lab-modal textarea { font: inherit; font-size: .88rem; font-weight: 500; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #0f172a; }
.lab-modal input:disabled, .lab-modal textarea:disabled { background: #f1f5f9; color: #64748b; }
.lab-form .rad-btn { align-self: flex-start; }
.lab-kv { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 10px; font-size: .86rem; }
.lab-kv span { color: #64748b; }

/* Pencere */
.lab-modal { position: fixed; inset: 0; z-index: 10050; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lab-modal-card { width: 100%; max-width: 640px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 20px; padding: 22px 24px; box-shadow: 0 30px 70px -20px rgba(15,23,42,.45); }
.lab-modal h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.lab-modal-sub { margin: 0 0 12px; color: #64748b; font-size: .85rem; }
.lab-row { display: flex; gap: 10px; }
.lab-row label.sm { flex: 0 0 120px; }
.lab-modal-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* Klinik tarafı panel (Mesajlar › Laboratuvar, hasta dosyası) */
.lab-clinic-panel, .lab-ppanel { display: flex; flex-direction: column; gap: 14px; }
.lab-ctop { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lab-ctop h3 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.lab-ctop small { color: #64748b; }
.lab-ctabs { display: inline-flex; gap: 6px; padding: 4px; background: #f1f5f9; border-radius: 12px; }
.lab-ctabs button { border: 0; background: transparent; font: inherit; font-size: .84rem; font-weight: 700; color: #475569; padding: 8px 14px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.lab-ctabs button.active { background: #fff; color: #0f172a; box-shadow: 0 1px 4px rgba(15,23,42,.1); }
.lab-ctabs i { font-style: normal; background: #ef4444; color: #fff; border-radius: 999px; padding: 0 7px; font-size: .7rem; }
.lab-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lab-filters button { border: 1px solid #e2e8f0; background: #fff; font: inherit; font-size: .8rem; font-weight: 700; color: #475569; padding: 6px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.lab-filters button i { font-style: normal; color: #94a3b8; font-size: .74rem; }
.lab-filters button.active { background: #0f172a; border-color: #0f172a; color: #fff; }
.lab-filters button.active i { color: #cbd5e1; }
.lab-unpaid-chip { margin-left: auto; font-size: .76rem; font-weight: 800; color: #92400e; background: #fef3c7; padding: 5px 10px; border-radius: 999px; }
.lab-hint { font-size: .82rem; color: #1e3a8a; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 10px 12px; }

/* Diş penceresi: Laba Gönder */
.tx-pop-labbox { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.tx-pop-labbox .tx-pop-row { display: flex; gap: 6px; }
.tx-pop-labbox input, .tx-pop-labbox select { font: inherit; font-size: .78rem; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 8px; min-width: 0; flex: 1; }
.tx-pop-labbox .tx-pop-labsend { border: 0; border-radius: 9px; padding: 8px; font: inherit; font-size: .8rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #8b5cf6, #6d28d9); cursor: pointer; }
.tx-pop-lab { background: #f5f3ff !important; color: #6d28d9 !important; }

@media (max-width: 1100px) {
  .lab-home-stats { grid-template-columns: repeat(2, 1fr); }
  .lab-msgs { grid-template-columns: 1fr; grid-template-areas: "chat" "requests" "notices"; }
  .lab-set-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .lab-dock { gap: 4px; padding: 8px; overflow-x: auto; justify-content: flex-start; }
  .lab-dock button { padding: 10px 12px; }
  .lab-dock button span { display: none; }
  .lab-boxes { grid-template-columns: 1fr; }
  .lab-row { flex-direction: column; }
  .lab-row label.sm { flex: 1; }
  .lab-clinic h1 { font-size: 1.6rem; }
  .lab-clinic-logo { width: 110px; height: 110px; border-radius: 28px; }
  .lab-bubble { max-width: 86%; }
  .lab-order-act .rad-btn { flex: 1; }
}
@media (max-width: 1280px) and (min-width: 761px) { .lab-dock button span { font-size: .78rem; } .lab-dock button { padding: 10px 13px; } }
.lab-dock button span { white-space: nowrap; font-size: .84rem; }

/* Fotoğraflar */
.lab-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lab-photo { width: 64px; height: 64px; padding: 0; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: #f1f5f9; display: block; }
.lab-photo img, .lab-bubble-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lab-request .lab-photo { margin: 6px 0 2px; }
.lab-order-photos { margin-top: 12px; }
.lab-order-photos > span { font-size: .7rem; font-weight: 800; color: #6d28d9; background: #f5f3ff; padding: 2px 8px; border-radius: 6px; }
.lab-order-act .rad-btn svg { vertical-align: -2px; }
.lab-bubble-img { display: block; width: 240px; max-width: 100%; height: 180px; padding: 0; border: 0; border-radius: 9px; overflow: hidden; cursor: zoom-in; margin-bottom: 4px; background: #e2e8f0; }
.lab-bubble.has-photo { padding: 4px 4px 4px; }
.lab-bubble.has-photo p, .lab-bubble.has-photo small { padding: 0 6px; }
.lab-attach { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #cbd5e1; background: #fff; color: #475569; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lab-attach:hover { color: #1d6fe0; border-color: #93c5fd; }
.lab-chat.drop { outline: 2px dashed #22c55e; outline-offset: 4px; }
.lab-lightbox { position: fixed; inset: 0; z-index: 10060; background: rgba(2,6,23,.92); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lab-lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lab-lightbox img { max-width: min(1200px, 100%); max-height: calc(100vh - 120px); object-fit: contain; border-radius: 10px; }
.lab-lightbox figcaption { color: #e2e8f0; font-size: .86rem; text-align: center; }
.lab-lightbox figcaption small { display: block; color: #94a3b8; margin-top: 3px; }
.lab-lightbox figcaption a { color: #93c5fd; }
.lab-lb-x, .lab-lb-nav { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 50%; cursor: pointer; font-size: 1.4rem; width: 46px; height: 46px; }
.lab-lb-x { top: 16px; right: 16px; font-size: 1.1rem; }
.lab-lb-nav { top: 50%; transform: translateY(-50%); font-size: 2rem; }
.lab-lb-nav.prev { left: 16px; } .lab-lb-nav.next { right: 16px; }

/* Sohbet alanı: SağlıkCell'e özel görünüm (mavi tonlar + silik artı deseni) */
.lab-chat-list { background-color: #f3f7ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M26 18h4v8h8v4h-8v8h-4v-8h-8v-4h8z' fill='%231d6fe0' fill-opacity='.05'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #f5f9ff 0%, #eef4ff 100%);
  border: 1px solid #dbe7fb; }
.lab-bubble { box-shadow: 0 2px 6px rgba(15,23,42,.06); border-radius: 16px; }
.lab-bubble.in { background: #fff; border: 1px solid #e2e8f0; border-top-left-radius: 6px; }
.lab-bubble.out { background: linear-gradient(135deg, #2f80ed, #1d6fe0); border-top-right-radius: 6px; }
.lab-bubble.out p { color: #fff; }
.lab-bubble.out small { color: rgba(255,255,255,.78); }
.lab-bubble.in p { color: #0f172a; }
.lab-bubble.in small { color: #94a3b8; }

/* Dosya ekleri */
.lab-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lab-file { display: inline-flex; align-items: center; gap: 10px; max-width: 280px; padding: 7px 12px 7px 7px; border-radius: 12px; background: #fff; border: 1px solid #e2e8f0; text-decoration: none; color: #0f172a; margin: 4px 0; }
.lab-file:hover { border-color: #93c5fd; }
.lab-file-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: .62rem; font-weight: 800; color: #fff; background: #64748b; }
.lab-file.pdf .lab-file-ic { background: #dc2626; } .lab-file.cad .lab-file-ic { background: #7c3aed; } .lab-file.zip .lab-file-ic { background: #a16207; }
.lab-file.doc .lab-file-ic { background: #2563eb; } .lab-file.xls .lab-file-ic { background: #16a34a; } .lab-file.vid .lab-file-ic { background: #db2777; } .lab-file.img .lab-file-ic { background: #0891b2; }
.lab-file-txt { min-width: 0; display: flex; flex-direction: column; }
.lab-file-txt b { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-file-txt small { font-size: .7rem; color: #64748b; }
.lab-bubble.out .lab-file { background: rgba(255,255,255,.95); }
.lab-bubble.has-photo .lab-file { margin: 0 0 4px; }
.lab-bubble .lab-file small { color: #64748b; text-align: left; padding: 0; margin: 0; }
.lab-bubble .lab-file b { color: #0f172a; }
