:root {
  --ink: #172033;
  --muted: #68738a;
  --line: #dce3ef;
  --surface: #ffffff;
  --canvas: #f3f6fb;
  --navy: #102a56;
  --blue: #1967d2;
  --blue-2: #0f4da8;
  --cyan: #22b8cf;
  --green: #16855b;
  --amber: #b46a00;
  --red: #c93756;
  --shadow: 0 18px 50px rgba(34, 55, 91, .10);
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(25, 103, 210, .22);
  outline-offset: 2px;
}

.container { width: min(1440px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 227, 239, .9);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
}
.topbar-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 800; letter-spacing: -.02em; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-name { color: var(--muted); font-size: 13px; }

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 15px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); border-color: #b8c5da; box-shadow: 0 8px 22px rgba(23, 32, 51, .08); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { color: #fff; border-color: var(--blue); background: linear-gradient(135deg, var(--blue), var(--blue-2)); }
.btn-success { color: #fff; border-color: var(--green); background: var(--green); }
.btn-danger, .btn-red { color: #fff; border-color: var(--red); background: var(--red); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 34px; padding: 6px 11px; border-radius: 9px; font-size: 13px; }
.btn-block { width: 100%; }

.page { padding: 34px 0 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 5px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; color: var(--navy); line-height: 1.2; letter-spacing: -.025em; }
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: 23px; }
h3 { font-size: 17px; }
p { margin: 0; }
.subtitle { max-width: 720px; margin-top: 8px; color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.stat { position: relative; overflow: hidden; }
.stat::after { content: ''; position: absolute; width: 78px; height: 78px; right: -22px; top: -25px; border-radius: 50%; background: rgba(25, 103, 210, .08); }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { margin-top: 7px; color: var(--navy); font-size: 30px; font-weight: 850; }

.field { display: grid; gap: 7px; }
.field label { color: #34405a; font-size: 13px; font-weight: 750; }
.field[data-field-help] > label:first-child { display: flex; align-items: center; gap: 7px; width: fit-content; }
.field-help-trigger { width: 21px; height: 21px; display: inline-grid; place-items: center; flex: 0 0 21px; border: 1px solid #b9c8df; border-radius: 50%; padding: 0; color: #255ea8; background: #f3f7fd; font: 800 12px/1 "Segoe UI", Arial, sans-serif; cursor: pointer; transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease; }
.field-help-trigger:hover, .field-help-trigger:focus-visible, .field-help-trigger[aria-expanded="true"] { border-color: var(--blue); color: #fff; background: var(--blue); outline: none; transform: translateY(-1px); }
.field-help-trigger:focus-visible { box-shadow: 0 0 0 3px rgba(25, 103, 210, .18); }
.field-help-panel { position: relative; margin: 1px 0 2px; border: 1px solid #c9dbfa; border-radius: 11px; padding: 10px 12px 10px 35px; color: #24466f; background: #f3f7ff; font-size: 12px; font-weight: 500; line-height: 1.55; box-shadow: 0 8px 24px rgba(25, 68, 126, .08); }
.field-help-panel::before { content: "?"; position: absolute; top: 10px; left: 11px; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 10px; font-weight: 850; }
.field-help-panel[hidden] { display: none; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fbfcff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input, .select { min-height: 45px; }
.textarea { min-height: 150px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25, 103, 210, .11); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.help { color: var(--muted); font-size: 12px; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 20px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; }
.tab.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.tab-panel[hidden] { display: none; }

.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 14px; border-bottom: 1px solid #edf1f7; text-align: left; vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); background: #f8faff; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
.table-actions { display: flex; gap: 7px; }

.badge { display: inline-flex; align-items: center; min-height: 26px; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 800; background: #edf2fa; color: #43506a; }
.badge-blue { background: #e8f0fe; color: #1258b5; }
.badge-green { background: #e4f6ee; color: #0d754d; }
.badge-amber { background: #fff1d7; color: #925500; }
.badge-red { background: #fde9ed; color: #aa2944; }
.badge-dark { background: #e8ebf1; color: #263148; }

.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 6px; color: var(--navy); font-size: 17px; }
.divider { height: 1px; margin: 22px 0; background: var(--line); }
.stack { display: grid; gap: 14px; }
.inline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.queue-search { flex: 1 1 420px; justify-content: flex-end; }
.queue-search .input { flex: 1 1 240px; min-width: 220px; }
.queue-filter-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f8faff; }
.queue-filter-actions { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.queue-filter-actions .btn { flex: 1 1 120px; }
.queue-results-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.queue-results-summary span { display: inline-flex; align-items: baseline; gap: 5px; border-radius: 999px; padding: 7px 11px; background: #edf2fa; }
.queue-results-summary strong { color: var(--navy); font-size: 16px; }
.muted { color: var(--muted); }

.error-stats { margin-bottom: 16px; }
.error-stat { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #f8faff; }
.error-stat span { display: block; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.error-stat strong { display: block; margin-top: 3px; color: var(--navy); font-size: 23px; }
.error-filters { display: grid; grid-template-columns: 1fr 1fr 1fr minmax(280px, 2fr); gap: 12px; margin-bottom: 14px; }
.error-category-summary { margin-bottom: 14px; }
.error-table td { vertical-align: top; }
.error-message { width: min(420px, 32vw); min-width: 260px; white-space: normal; overflow-wrap: anywhere; }
.error-message summary { cursor: pointer; color: var(--red); font-weight: 700; }
.error-message p { margin-top: 7px; color: var(--muted); }
.error-meta { margin-top: 5px; color: var(--muted); font-size: 12px; white-space: normal; }
.doctor-memory-detail { min-width: 280px; max-width: 520px; }
.doctor-memory-detail summary { cursor: pointer; color: var(--blue); font-weight: 750; }
.doctor-memory-detail > div { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8faff; }
.doctor-memory-detail strong { display: block; margin-top: 8px; color: var(--navy); }
.doctor-memory-detail strong:first-child { margin-top: 0; }
.doctor-memory-detail ul { margin: 5px 0 0; padding-left: 20px; }
.doctor-memory-detail li + li { margin-top: 4px; }

@media (max-width: 980px) {
  .error-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .error-filters { grid-template-columns: 1fr; }
  .queue-filter-panel { grid-template-columns: 1fr; padding: 13px; }
  .error-message { width: 300px; }
}

.alert { display: flex; gap: 12px; border: 1px solid #c9dbfa; border-radius: 14px; padding: 13px 15px; color: #194c92; background: #eff5ff; }
.alert-warning { border-color: #f0d198; color: #825000; background: #fff8e9; }
.alert-danger { border-color: #efb6c2; color: #91223a; background: #fff0f3; }

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(12, 22, 42, .52); backdrop-filter: blur(5px); }
.modal[hidden] { display: none; }
.modal-card { width: min(980px, 100%); max-height: calc(100vh - 36px); overflow: auto; border-radius: 20px; padding: 24px; background: #fff; box-shadow: 0 30px 90px rgba(0, 0, 0, .25); }
.modal-card-wide { width: min(1180px, 100%); }

.toast-area { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 9px; width: min(380px, calc(100vw - 36px)); }
.toast { border-left: 4px solid var(--green); border-radius: 12px; padding: 12px 14px; color: #fff; background: #1d2a40; box-shadow: 0 16px 50px rgba(0,0,0,.22); animation: toast-in .22s ease both; }
.toast.error { border-left-color: #ff5575; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.loading-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(244, 247, 252, .82); backdrop-filter: blur(5px); }
.loading-overlay[hidden] { display: none; }
.loading-box { min-width: min(360px, 100%); border: 1px solid var(--line); border-radius: 18px; padding: 24px; text-align: center; background: #fff; box-shadow: var(--shadow); }
.loading-choice-text { max-width: 430px; margin: 10px auto 0; line-height: 1.55; }
.loading-choice-actions { justify-content: center; }
.loading-choice-actions .btn { min-width: 180px; }
.spinner { width: 42px; height: 42px; margin: 0 auto 14px; border: 4px solid #dbe6f8; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 54px; color: #fff; background: radial-gradient(circle at 20% 10%, #2886f2 0, transparent 35%), linear-gradient(145deg, #0a1f47, #103e7c); }
.auth-art::after { content: ''; position: absolute; width: 430px; height: 430px; right: -170px; bottom: -170px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.03), 0 0 0 140px rgba(255,255,255,.025); }
.auth-art h1 { max-width: 650px; color: #fff; font-size: clamp(38px, 6vw, 70px); }
.auth-art p { max-width: 620px; margin-top: 16px; color: #c9dbfa; font-size: 18px; }
.auth-main { position:relative; display: grid; place-items: center; padding: 36px; background: #fff; }
.auth-card { width: min(430px, 100%); }
.auth-card h2 { margin-top: 26px; font-size: 30px; }
.turnstile-shell { display: grid; justify-items: stretch; gap: 7px; width: 100%; }
.turnstile-widget { min-height: 65px; width: 100%; overflow: hidden; border-radius: 10px; }
.turnstile-message { color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }
.turnstile-message:empty { display: none; }
.turnstile-message.turnstile-error { color: var(--red); }
.turnstile-shell[hidden] { display: none; }

.hero { position: relative; overflow: hidden; padding: 100px 0 90px; color: #fff; background: radial-gradient(circle at 75% 20%, rgba(34,184,207,.35), transparent 30%), linear-gradient(145deg, #081a3d, #124a91); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 50px; }
.hero h1 { max-width: 820px; color: #fff; font-size: clamp(45px, 7vw, 82px); }
.hero p { max-width: 690px; margin-top: 20px; color: #cfe0fb; font-size: 19px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-panel { border: 1px solid rgba(255,255,255,.18); border-radius: 24px; padding: 24px; background: rgba(255,255,255,.08); backdrop-filter: blur(16px); box-shadow: 0 25px 80px rgba(0,0,0,.2); }
.hero-line { display: flex; justify-content: space-between; gap: 15px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.hero-line:last-child { border: 0; }
.section { padding: 78px 0; }
.section-white { background: #fff; }
.feature-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--cyan)); font-weight: 900; }
.about-intro { max-width: 820px; }
.benefit-grid { margin-top: 30px; align-items: stretch; }
.benefit-card { position: relative; overflow: hidden; }
.benefit-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -75px; top: -75px; border-radius: 50%; background: linear-gradient(135deg, rgba(22,119,255,.08), rgba(24,190,206,.12)); pointer-events: none; }
.benefit-list { display: grid; gap: 13px; margin: 22px 0 0; padding: 0; list-style: none; }
.benefit-list li { position: relative; padding-left: 29px; color: var(--muted); line-height: 1.6; }
.benefit-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 900; }
.catalog-document-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.template-editor { min-height: 300px; font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif; line-height: 1.65; }
.settings-group { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.settings-group:first-of-type { margin-top: 0; }
.pricing-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 34px 0 15px; }
.plan-grid { align-items: stretch; }
.plan-card { display: flex; flex-direction: column; gap: 20px; }
.plan-card h3 { margin-top: 12px; font-size: 1.32rem; }
.plan-card .btn { margin-top: auto; }
.plan-price { color: var(--navy); font-size: 1.45rem; font-weight: 850; }
.plan-price small { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; font-weight: 500; }
.plan-features { display: grid; gap: 9px; margin: 0; padding-left: 22px; color: var(--muted); }
.sales-modal-card { width: min(760px, 100%); }
.sales-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.consent input { margin-top: 4px; }
.setting-toggle { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #f8faff; cursor: pointer; }
.setting-toggle input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--blue); }
.setting-toggle span { display: grid; gap: 4px; }
.setting-toggle small { color: var(--muted); line-height: 1.45; }
.alert-error { border-color: #f5b5c1 !important; color: #8a1730 !important; background: #fff3f5 !important; }
body.modal-open { overflow: hidden; }

.recorder { display: flex; align-items: center; gap: 13px; border: 1px dashed #b8c7df; border-radius: 14px; padding: 13px; background: #f8faff; }
.recording-activity { position: relative; margin-top: 12px; overflow: hidden; border: 1px solid #ef9aac; border-radius: 16px; padding: 13px 15px 11px; background: linear-gradient(135deg, #fff5f7, #fff 58%, #f9fbff); box-shadow: 0 10px 26px rgba(150, 30, 60, .1); }
.recording-activity[hidden] { display: none; }
.recording-activity::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--red); }
.recording-activity-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.recording-live-label { display: inline-flex; align-items: center; gap: 9px; color: #9e1836; letter-spacing: .01em; }
.recording-live-icon { width: 12px; height: 12px; flex: 0 0 auto; border: 3px solid #fff; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 1px var(--red), 0 0 0 7px rgba(201, 55, 86, .12); animation: recordingBeacon 1.15s ease-in-out infinite; }
.recording-timer { min-width: 67px; border: 1px solid #f0c2cc; border-radius: 999px; padding: 5px 10px; color: #8f1731; background: rgba(255,255,255,.82); font: 750 .94rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: center; direction: ltr; }
.recording-waveform { display: block; width: 100%; height: 88px; margin-top: 8px; border-radius: 11px; background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,239,243,.62)); }
.recording-activity-compact .recording-waveform { height: 72px; }
.recording-activity-help { display: block; margin-top: 3px; color: #77505a; font-size: .78rem; line-height: 1.45; }
.recording-activity.paused { border-color: #e8c776; background: #fffaf0; box-shadow: none; }
.recording-activity.paused::before { background: #c48711; }
.recording-activity.paused .recording-live-label { color: #815b0b; }
.recording-activity.paused .recording-live-icon { border-radius: 2px; background: #c48711; box-shadow: none; animation: none; }
.recording-activity.paused .recording-waveform { opacity: .38; }
[dir="rtl"] .recording-activity::before { right: 0; left: auto; }
@keyframes recordingBeacon { 50% { transform: scale(.76); box-shadow: 0 0 0 1px var(--red), 0 0 0 12px rgba(201, 55, 86, 0); } }
.audio-preview { display: block; width: 100%; margin-top: 12px; }
.audio-preview[hidden] { display: none; }
.supporting-images-card[hidden] { display: none; }
.supporting-image-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.supporting-image-item { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #f8fafc; }
.supporting-image-item img { display: block; width: 100%; height: 116px; object-fit: contain; border-radius: 8px; background: #fff; }
.supporting-image-item span { display: block; margin-top: 6px; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.supporting-image-remove { width: 100%; margin-top: 7px; }
.dictaphone-controls { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.dictaphone-controls::after { content:"Keyboard: P play · O pause · U back 10s · I forward 10s"; flex-basis:100%; color:var(--muted); font-size:12px; }
.dictaphone-controls[hidden], .pacs-viewer-panel[hidden] { display:none; }
.report-workspace-shell.with-pacs { width:calc(100vw - 32px); margin-left:50%; transform:translateX(-50%); display:grid; grid-template-columns:minmax(0, 2fr) minmax(360px, 1fr); gap:16px; align-items:start; }
.report-workspace-shell.with-pacs #reportForm { grid-template-columns:1fr; }
.pacs-viewer-panel { position:sticky; top:84px; height:clamp(560px, calc(100vh - 100px), 1100px); min-height:0; padding:14px; background:#15161a; border-radius:18px; color:#fff; overflow:hidden; }
.pacs-viewer-panel iframe { width:100%; height:calc(100% - 64px); border:0; background:#000; border-radius:10px; }
.record-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.record-dot.live { animation: pulse 1s ease infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(201, 55, 86, .15); } }
.editor { min-height: 310px; line-height: 1.75; font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif; }
.reference-text { margin-top: 10px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.reference-sections, .normal-category-list { display: grid; gap: 12px; }
.reference-section, .normal-category, .normal-document { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.reference-section > summary, .normal-category > summary, .normal-document > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; background: #f8fafc; }
.reference-section > summary span:first-child, .normal-category > summary span:first-child { display: grid; gap: 3px; }
.reference-section > summary small, .normal-category > summary small { color: var(--muted); font-weight: 400; }
.reference-section[open] > summary, .normal-category[open] > summary { border-bottom: 1px solid var(--line); }
.reference-section-body { padding: 14px; }
.normal-category-list { gap: 10px; }
.normal-category-body { display: grid; gap: 8px; padding: 10px; }
.normal-document { border-radius: 11px; }
.normal-document > summary { padding: 11px 13px; background: #fff; }
.normal-document-body { padding: 0 13px 13px; border-top: 1px solid #eef2f7; }
.normal-document-body .form-actions { margin-top: 10px; }
.editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 8px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.editor-size-control { gap: 6px; margin-left: auto; font-size: .82rem; color: var(--muted); }
.editor-size-control .select { width: auto; min-height: 34px; padding: 5px 28px 5px 9px; }
.rich-editor { overflow: auto; white-space: pre-wrap; background: #fff; }
.rich-editor:empty::before { content: attr(data-placeholder); color: #97a3b6; pointer-events: none; }
.training-output { min-height: 220px; white-space: pre-wrap; overflow-wrap: anywhere; }
.focus-card { scroll-margin-top: 92px; }
.case-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; }
.case-card.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,103,210,.1); }
.tab-count { min-height: 20px; margin-left: 5px; padding: 1px 7px; }
.coaching-intro { border-color: #c9dbfa; background: linear-gradient(135deg, #fff, #f1f6ff); }
.coaching-card { border-left: 4px solid var(--blue); }
.coaching-message { white-space: pre-wrap; color: var(--ink); line-height: 1.75; }
.coaching-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.coaching-examples > div { border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: #f8fafc; }
.coaching-examples span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.coaching-examples p { white-space: pre-wrap; line-height: 1.55; }
.coaching-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 15px; color: var(--muted); font-size: 12px; }
.access-toolbar { display: grid; grid-template-columns: 1fr auto auto; gap: 9px; margin-top: 14px; }
.access-summary { display: flex; justify-content: space-between; gap: 12px; margin: 10px 2px; color: var(--muted); font-size: .88rem; }
.access-groups, #catalogList { display: grid; gap: 10px; }
.access-group, .catalog-group { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; }
.access-group summary, .catalog-group summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; cursor: pointer; background: #f8fafc; }
.access-documents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.access-document { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; background: #fff; cursor: pointer; }
.access-document:hover { background: #f8fbff; }
.access-document small { display: block; margin-top: 2px; color: var(--muted); }
.catalog-documents { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.catalog-document { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: #fff; }

.language-switcher { display:inline-flex; align-items:center; flex:0 0 auto; }
.language-switcher select { min-width:58px; height:36px; padding:0 8px; border:1px solid rgba(148,163,184,.55); border-radius:9px; background:#fff; color:#172033; font:700 12px/1 inherit; cursor:pointer; }
.language-switcher-auth { position:absolute; top:20px; right:24px; z-index:3; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
[dir="rtl"] body { text-align:right; }
[dir="rtl"] .auth-main, [dir="rtl"] .page, [dir="rtl"] .modal-card { direction:rtl; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[name="username"], [dir="rtl"] #username,
[dir="rtl"] code, [dir="rtl"] pre, [dir="rtl"] .mono, [dir="rtl"] .rich-editor, [dir="rtl"] .template-editor,
[dir="rtl"] #transcription, [dir="rtl"] [data-no-i18n] { direction:ltr; text-align:left; }
[dir="rtl"] .toast-area { right:auto; left:20px; }
[dir="rtl"] .editor-size-control { margin-left:0; margin-right:auto; }
[dir="rtl"] .language-switcher-auth { right:auto; left:24px; }
[dir="rtl"] .field-help-panel { padding: 10px 35px 10px 12px; }
[dir="rtl"] .field-help-panel::before { right: 11px; left: auto; }

.performance-jobs-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 18px; }
.performance-jobs-head h3 { margin: 0; }
.performance-center-filter { display: grid; min-width: min(280px, 100%); gap: 5px; color: var(--muted); font-size: .78rem; font-weight: 750; }
.performance-center-filter .select { min-height: 39px; }

.site-footer { position: relative; overflow: hidden; margin-top: 38px; color: #dce6f7; background: #07101f; }
.site-footer::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 8% 12%, rgba(63, 128, 224, .22), transparent 31%), radial-gradient(circle at 92% 82%, rgba(32, 179, 161, .12), transparent 28%); }
.landing-page .site-footer { margin-top: 0; }
.site-footer-shell { position: relative; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 46px 0 24px; display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.65fr); gap: 38px 56px; }
.site-footer-brand-block { align-self: start; }
.site-footer-brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; font-size: 1.1rem; font-weight: 850; text-decoration: none; }
.site-footer-brand img { width: 38px; height: 38px; object-fit: contain; }
.site-footer-brand-block p { max-width: 320px; margin: 15px 0 0; color: #9fb0c9; line-height: 1.65; }
.site-footer-trust { width: fit-content; max-width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 9px 13px 9px 9px; border: 1px solid rgba(159, 176, 201, .18); border-radius: 15px; background: rgba(255,255,255,.055); }
.site-footer-trust-badge { width: 70px; height: 70px; display: grid; place-items: center; flex: 0 0 70px; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.site-footer-trust-badge img { display: block; width: 62px; height: 62px; object-fit: contain; cursor: pointer; }
.site-footer-trust > span { display: grid; gap: 4px; }
.site-footer-trust strong { color: #fff; font-size: .8rem; }
.site-footer-trust small { max-width: 170px; color: #9fb0c9; font-size: .72rem; line-height: 1.45; }
.site-footer-contact h2 { margin: 0 0 17px; color: #fff; font-size: 1rem; letter-spacing: .01em; }
.site-footer-contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.site-footer-contact-item { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 14px; border: 1px solid rgba(159, 176, 201, .16); border-radius: 14px; background: rgba(255,255,255,.045); }
.site-footer-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 10px; color: #8cb8ff; background: rgba(77, 139, 232, .14); }
.site-footer-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.site-footer-contact-item > div { display: grid; min-width: 0; gap: 4px; }
.site-footer-contact-item strong { color: #fff; font-size: .77rem; }
.site-footer-contact-item span:not(.site-footer-icon), .site-footer-contact-item a { color: #b7c5d9; font-size: .84rem; line-height: 1.55; overflow-wrap: anywhere; }
.site-footer-contact-item a { text-decoration: none; }
.site-footer-contact-item a:hover, .site-footer-contact-item a:focus-visible { color: #fff; text-decoration: underline; }
.site-footer-phones { display: flex; flex-wrap: wrap; gap: 5px; }
.site-footer-bottom { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 21px; border-top: 1px solid rgba(159, 176, 201, .16); color: #8395af; font-size: .78rem; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 17px; }
.site-footer-links a { color: #c8d4e6; text-decoration: none; }
.site-footer-links a:hover, .site-footer-links a:focus-visible { color: #fff; text-decoration: underline; }
[dir="rtl"] .site-footer-contact-item, [dir="rtl"] .site-footer-brand-block { text-align: right; }

.page-help-section { padding: 0 0 54px; }
.page-help-card { overflow: hidden; border: 1px solid #d5dfed; border-radius: 17px; color: var(--ink); background: linear-gradient(135deg, #fff, #f7faff); box-shadow: 0 12px 36px rgba(18, 46, 88, .07); }
.page-help-card > summary { display: flex; align-items: center; gap: 12px; padding: 17px 19px; color: var(--navy); cursor: pointer; list-style: none; user-select: none; }
.page-help-card > summary::-webkit-details-marker { display: none; }
.page-help-card > summary::after { content: "+"; margin-left: auto; color: var(--blue); font-size: 23px; font-weight: 500; line-height: 1; transition: transform .18s ease; }
.page-help-card[open] > summary::after { transform: rotate(45deg); }
.page-help-card > summary:hover, .page-help-card > summary:focus-visible { background: rgba(232, 240, 254, .55); outline: none; }
.page-help-mark { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 32px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--blue), #5c8fd8); font-size: 16px; font-weight: 850; box-shadow: 0 6px 16px rgba(25, 103, 210, .22); }
.page-help-heading { display: grid; gap: 2px; }
.page-help-heading strong { font-size: 15px; }
.page-help-heading small { color: var(--muted); font-size: 12px; font-weight: 500; }
.page-help-body { border-top: 1px solid var(--line); padding: 18px 20px 20px 63px; }
.page-help-body p { color: var(--muted); line-height: 1.65; }
.page-help-body ul { display: grid; gap: 9px; margin: 14px 0 0; padding-left: 20px; color: #33415c; line-height: 1.55; }
[dir="rtl"] .page-help-card > summary::after { margin-right: auto; margin-left: 0; }
[dir="rtl"] .page-help-body { padding: 18px 63px 20px 20px; }
[dir="rtl"] .page-help-body ul { padding-right: 20px; padding-left: 0; }

@media (max-width: 920px) {
  .site-footer-shell { grid-template-columns: 1fr; }
  .report-workspace-shell.with-pacs { width:100%; margin-left:0; transform:none; grid-template-columns:1fr; }
  .pacs-viewer-panel { position:relative; top:auto; height:68vh; min-height:480px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-page, .hero-grid { grid-template-columns: 1fr; }
  .auth-art { min-height: 340px; padding: 38px; }
  .hero { padding-top: 72px; }
}

@media (max-width: 650px) {
  .supporting-image-preview { grid-template-columns: 1fr; }
  .container { width: min(100% - 22px, 1180px); }
  .topbar-inner { min-height: 64px; }
  .brand span, .nav-name { display: none; }
  .topbar .nav-actions .btn-ghost { display: none; }
  .topbar .nav-actions { gap: 6px; }
  .language-switcher select { min-width:52px; height:34px; padding:0 6px; }
  .topbar .nav-actions .btn { padding: 9px 10px; font-size: .78rem; }
  .mobile-sticky-tabs { position: sticky; top: 64px; z-index: 15; margin-inline: -11px; padding: 7px 11px; overflow-x: auto; flex-wrap: nowrap; background: rgba(244,247,252,.96); backdrop-filter: blur(8px); }
  .mobile-sticky-tabs .tab { flex: 1 0 auto; white-space: nowrap; }
  .doctor-stats, .secretary-stats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 5px; }
  .doctor-stats .stat, .secretary-stats .stat { min-width: 145px; scroll-snap-align: start; }
  .focus-card { scroll-margin-top: 132px; }
  .editor-toolbar { position: sticky; top: 119px; z-index: 10; }
  .rich-editor { min-height: 260px; }
  .page { padding-top: 24px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .queue-card-head { align-items: stretch; flex-direction: column; }
  .queue-search { flex-basis: auto; justify-content: stretch; }
  .queue-search .input { flex-basis: 100%; min-width: 0; }
  .queue-search .btn { flex: 1; }
  .grid-2, .grid-3, .grid-4, .form-row, .access-documents { grid-template-columns: 1fr; }
  .coaching-examples { grid-template-columns: 1fr; }
  .access-toolbar { grid-template-columns: 1fr 1fr; }
  .access-toolbar .input { grid-column: 1 / -1; }
  .card { padding: 17px; border-radius: 15px; }
  .recorder { align-items: stretch; flex-wrap: wrap; }
  .recorder .muted { flex-basis: 100%; }
  .recording-activity { padding: 12px 12px 10px; }
  .recording-waveform { height: 72px; }
  .auth-art { min-height: 290px; padding: 28px 24px; }
  .auth-main { padding: 30px 22px; }
  .hero { padding: 62px 0; }
  .section { padding: 55px 0; }
  .pricing-heading { align-items: flex-start; flex-direction: column; }
  th, td { padding: 10px 11px; }
  .page-help-section { padding-bottom: 34px; }
  .page-help-card > summary { padding: 14px; }
  .page-help-body, [dir="rtl"] .page-help-body { padding: 15px 17px 18px; }
  .performance-jobs-head { align-items: stretch; flex-direction: column; }
  .performance-center-filter { width: 100%; min-width: 0; }
  .site-footer-shell { width: min(100% - 26px, 1180px); padding-top: 34px; gap: 28px; }
  .site-footer-contact-grid { grid-template-columns: 1fr; }
  .site-footer-bottom { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
