/* DentCell — Radyoloji ekranı ve röntgen görüntüleyici */

/* ---------- portal ---------- */
.rad-app { min-height: 100vh; display: flex; flex-direction: column; background:
  radial-gradient(circle at 15% 10%, rgba(14,165,233,.10) 0%, transparent 45%),
  radial-gradient(circle at 85% 90%, rgba(99,102,241,.08) 0%, transparent 45%), #f8fafc; }
.rad-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: rgba(255,255,255,.75); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(226,232,240,.8); position: sticky; top: 0; z-index: 50; }
.rad-brand { display: flex; align-items: center; gap: 12px; }
.rad-brand img { width: 40px; height: 40px; border-radius: 12px; }
.rad-brand b { display: block; font-size: 1.05rem; color: #0f172a; }
.rad-brand small { color: #64748b; font-size: .75rem; }
.rad-top-right { display: flex; align-items: center; gap: 12px; }
.rad-user { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: #0f172a; background: #f1f5f9; padding: 7px 12px; border-radius: 999px; }
.rad-user svg { color: #0284c7; }
.rad-logout { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #fecaca; color: #dc2626; background: #fff; padding: 7px 12px; border-radius: 10px; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.rad-main { flex: 1; padding: 24px 28px 120px; }
.rad-dock { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: flex; gap: 10px; padding: 10px 14px; border-radius: 999px;
  background: rgba(186, 230, 253, .55); backdrop-filter: blur(28px) saturate(200%); border: 1.5px solid rgba(255,255,255,.9); box-shadow: 0 18px 44px -10px rgba(15,23,42,.22); }
.rad-dock button { display: flex; align-items: center; gap: 9px; padding: 11px 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.6);
  color: #0f172a; font: inherit; font-size: .88rem; font-weight: 800; cursor: pointer; transition: all .2s ease; }
.rad-dock button:hover { background: #fff; transform: translateY(-2px); }
.rad-dock button.active { background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; border-color: #fff; box-shadow: 0 8px 22px rgba(37,99,235,.4); }

.rad-page { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.rad-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.rad-card h3 { margin: 0 0 14px; font-size: 1rem; font-weight: 800; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.rad-count { font-style: normal; background: #e0f2fe; color: #0369a1; border-radius: 999px; padding: 1px 9px; font-size: .75rem; }
.rad-empty { padding: 24px 12px; text-align: center; color: #94a3b8; font-size: .85rem; border: 1px dashed #e2e8f0; border-radius: 12px; }
.rad-muted { color: #94a3b8; font-size: .78rem; margin: 10px 0; }
.rad-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #e2e8f0; background: #fff; color: #0f172a; font: inherit; font-size: .82rem; font-weight: 700; padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.rad-btn:hover { border-color: #93c5fd; }
.rad-btn.sm { padding: 5px 10px; font-size: .74rem; }
.rad-btn.primary { background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; border-color: transparent; }
.rad-btn.wide { width: 100%; margin-top: 12px; padding: 12px; }
.rad-btn:disabled { opacity: .6; cursor: wait; }
.rad-x { border: none; background: #f1f5f9; color: #64748b; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }

.rad-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rad-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.rad-stat span { font-size: .78rem; color: #64748b; font-weight: 700; }
.rad-stat b { font-size: 1.7rem; color: #0f172a; }
.rad-stat.warn b { color: #d97706; }
.rad-home-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.rad-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.rad-table th { text-align: left; font-size: .7rem; text-transform: uppercase; color: #64748b; padding: 8px; border-bottom: 1px solid #e2e8f0; }
.rad-table td { padding: 10px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.rad-table td small { display: block; color: #94a3b8; font-size: .72rem; }

.rad-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.rad-thumb { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #0b1220; cursor: pointer; font: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.rad-thumb:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.18); }
.rad-thumb img { width: 100%; height: 100px; object-fit: contain; background: #000; }
.rad-thumb span { background: #fff; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.rad-thumb b { font-size: .78rem; color: #0f172a; }
.rad-thumb small { font-size: .68rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- hasta dosyası ---------- */
.rad-files { max-width: 1500px; margin: 0 auto; display: grid; grid-template-columns: 330px 1fr; gap: 20px; align-items: start; }
.rad-plist { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 16px; position: sticky; top: 90px; height: calc(100vh - 230px); display: flex; flex-direction: column; }
.rad-plist h3 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 800; }
.rad-search { display: flex; align-items: center; gap: 8px; border: 1px solid #e2e8f0; border-radius: 999px; padding: 8px 14px; color: #94a3b8; margin-bottom: 10px; }
.rad-search input { border: none; outline: none; font: inherit; font-size: .85rem; flex: 1; background: transparent; color: #0f172a; }
.rad-plist-body { flex: 1; min-height: 0; display: flex; gap: 6px; }
.rad-prows { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; }
.rad-prow { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; border: 1.5px solid transparent; background: transparent; cursor: pointer; font: inherit; text-align: left; position: relative; }
.rad-prow:hover { background: #f8fafc; }
.rad-prow.active { background: #e0f2fe; border-color: #7dd3fc; }
.rad-prow.drop { background: #dcfce7; border-color: #22c55e; border-style: dashed; }
.rad-pav { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, #38bdf8, #2563eb); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; }
.rad-pname { display: flex; flex-direction: column; min-width: 0; }
.rad-pname b { font-size: .84rem; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rad-pname small { font-size: .7rem; color: #64748b; }
.rad-pname i { font-style: normal; color: #d97706; font-weight: 700; }
.rad-pdot { position: absolute; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.rad-az { display: flex; flex-direction: column; overflow-y: auto; }
.rad-az button { border: none; background: transparent; font: inherit; font-size: .64rem; font-weight: 800; color: #0284c7; padding: 1px 5px; cursor: pointer; border-radius: 4px; line-height: 1.25; }
.rad-az button:hover, .rad-az button.active { background: #0284c7; color: #fff; }
.rad-detail { min-width: 0; }
.rad-detail-empty { background: #fff; border: 1px dashed #cbd5e1; border-radius: 18px; padding: 80px 20px; text-align: center; color: #64748b; }
.rad-detail-empty svg { width: 44px; height: 44px; color: #0284c7; }
.rad-detail-empty small { color: #94a3b8; }
.rad-phead { background: linear-gradient(135deg, #0f172a, #1e3a8a); color: #fff; border-radius: 18px; padding: 18px 22px; margin-bottom: 16px; }
.rad-phead h2 { margin: 0; font-size: 1.4rem; }
.rad-phead p { margin: 4px 0 0; color: #cbd5e1; font-size: .82rem; }
.rad-work { display: grid; grid-template-columns: minmax(280px, 1fr) 1.35fr; gap: 16px; align-items: start; }
.rad-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rad-tabs { display: inline-flex; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.rad-tabs button { border: none; background: #fff; padding: 9px 18px; font: inherit; font-size: .85rem; font-weight: 800; color: #475569; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.rad-tabs button + button { border-left: 1px solid #e2e8f0; }
.rad-tabs button.active { background: #0284c7; color: #fff; }
.rad-tabs i { font-style: normal; font-size: .7rem; background: rgba(15,23,42,.08); padding: 0 7px; border-radius: 999px; }
.rad-tabs button.active i { background: rgba(255,255,255,.25); }
.rad-req-list { display: flex; flex-direction: column; gap: 8px; }
.rad-req { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px; border-left: 4px solid #f59e0b; }
.rad-req.done { border-left-color: #10b981; }
.rad-req.cancelled { border-left-color: #cbd5e1; opacity: .75; }
.rad-req-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rad-req-main b { font-size: .9rem; color: #0f172a; }
.rad-req-main small { font-size: .72rem; color: #64748b; }
.rad-req-main small.note { color: #334155; }
.rad-req-main .ok { color: #059669; font-weight: 700; } .rad-req-main .no { color: #94a3b8; font-weight: 700; }
.rad-teeth { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 800; color: #0369a1; background: #e0f2fe; padding: 1px 7px; border-radius: 999px; }
.rad-req-act { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.rad-req-form { margin-top: 14px; border-top: 1px solid #f1f5f9; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.rad-row { display: flex; gap: 8px; }
.rad-row > * { flex: 1; min-width: 0; }
.rad-req-form select, .rad-req-form input, .rad-qfields select, .rad-qfields input, .rad-set select { font: inherit; font-size: .82rem; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #0f172a; }
.rad-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 28px 16px; border: 2px dashed #93c5fd; border-radius: 16px; background: #f0f9ff; color: #0284c7; cursor: pointer; transition: all .15s ease; }
.rad-drop b { color: #0f172a; font-size: .9rem; }
.rad-drop small { color: #64748b; font-size: .75rem; }
.rad-drop.over { background: #dcfce7; border-color: #22c55e; color: #16a34a; }
.rad-prefill { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: .8rem; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 8px 10px; border-radius: 10px; }
.rad-prefill .rad-x { margin-left: auto; }
.rad-queue { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.rad-qitem { display: flex; gap: 12px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 12px; }
.rad-qitem img { width: 110px; height: 80px; object-fit: contain; background: #000; border-radius: 8px; flex-shrink: 0; }
.rad-qfields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rad-qfields small { font-size: .7rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- ayarlar ---------- */
.rad-settings { max-width: 760px; }
.rad-kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: .85rem; }
.rad-kv span { color: #64748b; }
.rad-set { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: .85rem; color: #0f172a; }
.rad-set input[type=checkbox] { width: 18px; height: 18px; accent-color: #0284c7; }

/* ---------- görüntüleyici ---------- */
body.rv-open { overflow: hidden; }
.rv { position: fixed; inset: 0; z-index: 100001; background: #05070c; color: #cbd5e1; display: flex; flex-direction: column; font-family: inherit; }
.rv-bar { display: flex; align-items: center; gap: 2px; padding: 6px 10px; background: linear-gradient(180deg, #111827, #0b1220); border-bottom: 1px solid #1e3a5f; overflow-x: auto; }
.rv-logo { display: flex; align-items: center; gap: 8px; padding-right: 12px; margin-right: 6px; border-right: 1px solid #1f2937; color: #e2e8f0; font-weight: 800; font-size: .85rem; }
.rv-logo img { width: 28px; height: 28px; border-radius: 8px; }
.rv-tool { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 58px; padding: 6px 6px; border: none; background: transparent; color: #7dd3fc; font: inherit; font-size: .66rem; font-weight: 700; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.rv-tool:hover { background: #172033; color: #e0f2fe; }
.rv-tool.active { background: #0284c7; color: #fff; }
.rv-tool.on { color: #facc15; }
.rv-sliders { display: flex; gap: 14px; margin-left: auto; padding: 0 12px; border-left: 1px solid #1f2937; }
.rv-sliders label { display: flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; color: #94a3b8; }
.rv-sliders input { width: 110px; accent-color: #0ea5e9; }
.rv-sliders b { min-width: 28px; color: #e2e8f0; font-size: .72rem; }
.rv-close { border: none; background: #1f2937; color: #e5e7eb; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; margin-left: 6px; flex-shrink: 0; }
.rv-close:hover { background: #dc2626; }
.rv-body { flex: 1; min-height: 0; display: flex; }
.rv-series { width: 210px; flex-shrink: 0; overflow-y: auto; border-right: 1px solid #1e3a5f; padding: 10px; display: flex; flex-direction: column; gap: 10px; background: #0a0f1a; }
.rv-series[hidden] { display: none; }
.rv-series-head { font-size: .78rem; font-weight: 800; color: #e2e8f0; padding: 4px 2px 8px; border-bottom: 1px solid #1f2937; }
.rv-sthumb { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid #1e3a5f; border-radius: 10px; background: #0d1626; color: #94a3b8; font: inherit; font-size: .7rem; text-align: left; cursor: pointer; }
.rv-sthumb.active { border-color: #0ea5e9; box-shadow: 0 0 0 1px #0ea5e9; }
.rv-sthumb b { color: #e2e8f0; font-size: .74rem; }
.rv-sdate { color: #38bdf8; font-weight: 700; }
.rv-sthumb img { width: 100%; height: 90px; object-fit: contain; background: #000; border-radius: 6px; }
.rv-panes { flex: 1; min-width: 0; display: grid; gap: 2px; background: #1e3a5f; }
.rv-panes[data-mode="pan"] canvas { cursor: grab; }
.rv-panes[data-mode="zoom"] canvas { cursor: zoom-in; }
.rv-panes[data-mode="window"] canvas { cursor: ns-resize; }
.rv-panes[data-mode="length"] canvas, .rv-panes[data-mode="angle"] canvas, .rv-panes[data-mode="text"] canvas { cursor: crosshair; }
.rv-pane { position: relative; background: #000; min-width: 0; min-height: 0; overflow: hidden; }
.rv-pane.active { outline: 2px solid #0ea5e9; outline-offset: -2px; }
.rv-pane canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.rv-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: .85rem; }
.rv-loading[hidden] { display: none; }
.rv-info { position: absolute; inset: 0; pointer-events: none; font-size: .74rem; font-weight: 700; color: #38bdf8; text-shadow: 0 1px 2px #000; }
.rv-info[hidden] { display: none; }
.rv-info > div { position: absolute; line-height: 1.45; }
.rv-info .tl { top: 12px; left: 14px; } .rv-info .tl b { color: #7dd3fc; }
.rv-info .tr { top: 12px; right: 14px; text-align: right; }
.rv-info .bl { bottom: 12px; left: 14px; color: #93c5fd; }
.rv-info .br { bottom: 12px; right: 14px; text-align: right; color: #93c5fd; }

@media (max-width: 1100px) {
  .rad-files { grid-template-columns: 1fr; }
  .rad-plist { position: static; height: 420px; }
  .rad-work, .rad-home-grid { grid-template-columns: 1fr; }
  .rad-stats { grid-template-columns: repeat(2, 1fr); }
  .rv-series { width: 150px; }
  .rv-sliders input { width: 80px; }
}
@media (max-width: 640px) {
  .rad-main { padding: 16px 16px 120px; }
  .rad-top { padding: 12px 16px; }
  .rad-dock button span { display: none; }
  .rv-series { display: none; }
}
.rv-bar { scrollbar-width: none; }
.rv-bar::-webkit-scrollbar { display: none; }
.rad-thumb-wrap { position: relative; display: flex; }
.rad-thumb-wrap .rad-thumb { flex: 1; }
.rad-del { position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; border-radius: 8px; border: none; background: rgba(15,23,42,.75); color: #fca5a5; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .15s ease, background .15s ease; }
.rad-thumb-wrap:hover .rad-del, .rad-del:focus-visible { opacity: 1; }
.rad-del:hover { background: #dc2626; color: #fff; }
@media (hover: none) { .rad-del { opacity: 1; } }
.rv-tool[data-tool="delete"] { color: #fca5a5; }
.rv-tool[data-tool="delete"]:hover { background: #7f1d1d; color: #fff; }

/* Yapay zekâ ön değerlendirmesi paneli */
.rv-ai { width: 320px; flex-shrink: 0; overflow-y: auto; border-left: 1px solid #1e3a5f; padding: 14px; background: #0a0f1a; color: #dbe7f5; font-size: .8rem; }
.rv-ai-head b { display: block; font-size: .9rem; color: #fff; }
.rv-ai-head small { color: #7f93ad; }
.rv-ai-warn { margin: 10px 0; padding: 8px 10px; border-radius: 10px; background: rgba(245, 158, 11, .12); color: #fcd34d; font-size: .74rem; }
.rv-ai-q { color: #9fb3cc; margin-bottom: 6px; }
.rv-ai-sum { margin: 0 0 10px; line-height: 1.55; color: #dbe7f5; white-space: pre-wrap; }
.rv-ai-list, .rv-ai-rec { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.rv-ai-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: start; background: #101a2b; border: 1px solid #1e3a5f; border-radius: 10px; padding: 7px 8px; }
.rv-ai-t { font-weight: 800; color: #93c5fd; }
.rv-ai-c { font-style: normal; font-size: .64rem; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.rv-ai-c.hi { background: rgba(16, 185, 129, .18); color: #6ee7b7; }
.rv-ai-c.mid { background: rgba(59, 130, 246, .18); color: #93c5fd; }
.rv-ai-c.lo { background: rgba(148, 163, 184, .18); color: #cbd5e1; }
.rv-ai-rec li { padding-left: 14px; position: relative; color: #c3d2e6; }
.rv-ai-rec li::before { content: '•'; position: absolute; left: 2px; color: #60a5fa; }
.rv-ai-sub { margin: 14px 0 6px; font-weight: 700; color: #fff; font-size: .8rem; }
.rv-ai-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #7f93ad; font-size: .7rem; margin-top: 6px; }
.rv-ai-meta button, .rv-ai-btn { font: inherit; font-size: .76rem; font-weight: 700; color: #fff; background: #2563eb; border: 0; border-radius: 9px; padding: 7px 12px; cursor: pointer; }
.rv-ai-meta button[data-ai-run] { background: #1e293b; border: 1px solid #334155; }
.rv-ai-btn:disabled, .rv-ai-meta button:disabled { opacity: .6; cursor: default; }
.rv-ai-rev { width: 100%; box-sizing: border-box; background: #0f172a; color: #e2e8f0; border: 1px solid #334155; border-radius: 10px; padding: 8px; font: inherit; font-size: .8rem; resize: vertical; }
@media (max-width: 900px) { .rv-ai { position: absolute; right: 0; top: 0; bottom: 0; z-index: 5; width: min(320px, 90vw); } }
