/* Rewaq Doctor Portal: login + app (brand tokens from rewaq_fonts.css) */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--rq-font); color: var(--rq-ink); -webkit-font-smoothing: antialiased; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--rq-blue-600); }
.mono { font-family: "DM Sans", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.muted { color: var(--rq-muted); font-weight: 500; }
[hidden] { display: none !important; }

/* ---------- buttons / inputs ---------- */
.dp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 11px; border: 1px solid transparent; font: 600 14px var(--rq-font); cursor: pointer;
  text-decoration: none !important; transition: transform .12s, box-shadow .15s, background .15s; white-space: nowrap;
}
.dp-btn svg { width: 18px; height: 18px; }
.dp-btn-primary { background: var(--rq-grad-btn); color: #fff !important; box-shadow: 0 8px 20px -10px rgba(15, 111, 209, .8); }
.dp-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(15, 111, 209, .9); }
.dp-btn-ghost { background: #fff; color: var(--rq-ink) !important; border-color: var(--rq-line); }
.dp-btn-ghost:hover { border-color: var(--rq-blue-500); color: var(--rq-blue-600) !important; }
.dp-btn-ghost.danger { color: #c0392b !important; }
.dp-btn-ghost.danger:hover { border-color: #e5a29a; }
.dp-btn-lg { height: 48px; padding: 0 28px; font-size: 15px; }
.dp-btn:disabled { opacity: .65; cursor: progress; transform: none; }
.is-busy { position: relative; }
.dp-input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--rq-line); background: #fff;
  font: 500 14px var(--rq-font); color: var(--rq-ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.dp-input { height: auto; padding: 10px 12px; resize: vertical; }
.dp-input:focus { border-color: var(--rq-blue-500); box-shadow: 0 0 0 4px rgba(22, 142, 232, .12); }
.dp-input:disabled { background: var(--rq-surface-2); color: var(--rq-ink-soft); }

/* =====================================================================  LOGIN  */
body.dp-login {
  min-height: 100vh; color: var(--rq-on-dark); display: flex; flex-direction: column;
  background:
    radial-gradient(900px 520px at 85% 0%, rgba(22, 142, 232, .30), transparent 60%),
    radial-gradient(700px 520px at 0% 100%, rgba(57, 217, 237, .14), transparent 60%),
    linear-gradient(180deg, var(--rq-navy-900) 0%, var(--rq-navy-950) 100%) fixed;
}
.dl-grid {
  position: fixed; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(143, 194, 237, .10) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 194, 237, .10) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%); -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%);
}
.dl-top { position: relative; z-index: 2; width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 32px) 0; display: flex; align-items: center; justify-content: space-between; }
.dp-brand { display: flex; align-items: center; gap: 12px; text-decoration: none !important; }
.dp-brand .mark { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(57, 217, 237, .12); }
.dp-brand .mark img { width: 36px; height: 36px; object-fit: contain; }
.dp-brand b { display: block; color: #fff; font-family: var(--rq-font-ar); font-size: 16px; line-height: 1.2; }
.dp-brand small { display: block; color: var(--rq-on-dark-soft); font-size: 12px; }
.dl-pill { color: var(--rq-on-dark) !important; text-decoration: none !important; font-size: 13px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 8px 16px; }
.dl-pill:hover { border-color: rgba(57, 217, 237, .5); }
.dl-stage {
  position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 32px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 6vw, 80px); align-items: center;
}
.dl-eyebrow { display: inline-flex; gap: 8px; align-items: center; color: var(--rq-cyan-300); font: 600 13px var(--rq-font-ar); letter-spacing: .02em; padding: 6px 14px; border: 1px solid rgba(57, 217, 237, .3); border-radius: 999px; background: rgba(57, 217, 237, .06); }
.dl-copy h1 { font: 800 clamp(34px, 4.6vw, 56px)/1.05 var(--rq-font-display); color: #fff; margin: 22px 0 16px; letter-spacing: -.02em; }
.dl-copy h1 em { font-style: normal; background: var(--rq-grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dl-ar { font: 500 17px/1.8 var(--rq-font-ar); color: var(--rq-on-dark-soft); direction: rtl; text-align: right; max-width: 520px; margin: 0 0 28px auto; }
.dl-feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 520px; }
.dl-feats li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); color: var(--rq-on-dark-soft); font-size: 14px; }
.dl-feats li b { color: #fff; margin-right: 4px; }
.dl-feats svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(57, 217, 237, .12); color: var(--rq-cyan-400); }
.dl-card { background: #fff; color: var(--rq-ink); border-radius: 24px; padding: 34px 32px 28px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06); }
.dl-card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; }
.dl-card-head img { width: 54px; height: 54px; object-fit: contain; }
.dl-card-head h2 { margin: 0; font: 800 24px var(--rq-font-display); letter-spacing: -.01em; }
.dl-card-head p { margin: 2px 0 0; color: var(--rq-muted); font: 500 14px var(--rq-font-ar); }
.dl-card label { display: block; font-size: 13px; font-weight: 600; color: var(--rq-ink-soft); margin-bottom: 16px; }
.dl-card input { display: block; width: 100%; height: 48px; margin-top: 7px; padding: 0 14px; border: 1px solid var(--rq-line); border-radius: 12px; font: 500 15px var(--rq-font); color: var(--rq-ink); background: var(--rq-surface-2); outline: none; transition: .15s; }
.dl-card input:focus { background: #fff; border-color: var(--rq-blue-500); box-shadow: 0 0 0 4px rgba(22, 142, 232, .12); }
.dl-pw { position: relative; display: block; }
.dl-pw input { padding-right: 46px; }
.dl-pw button { position: absolute; right: 6px; top: 7px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--rq-muted); cursor: pointer; border-radius: 8px; }
.dl-pw button:hover { color: var(--rq-blue-600); background: var(--rq-surface-3); }
.dl-submit { width: 100%; height: 50px; font-size: 15px; margin-top: 4px; }
.dl-err { min-height: 20px; color: #c0392b; font-size: 13px; margin: -4px 0 10px; }
.dl-err.ok { color: #12805c; }
.dl-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--rq-muted); }
.dl-links a { font-weight: 600; text-decoration: none; }
.dl-note { color: var(--rq-ink-soft); font-size: 14px; margin: 0 0 18px; }
.dl-foot { position: relative; z-index: 1; text-align: center; color: var(--rq-on-dark-soft); font-size: 12px; padding: 18px 16px 24px; opacity: .8; }
@media (max-width: 860px) {
  .dl-stage { grid-template-columns: 1fr; padding-top: 24px; }
  .dl-copy { order: 2; }
  .dl-copy h1 { font-size: 32px; }
  .dl-card { padding: 26px 20px; }
  .dl-pill { display: none; }
}

/* =====================================================================  APP  */
body.dp-app { background: #f4f7fb; min-height: 100vh; display: flex; }
.dp-rail {
  position: sticky; top: 0; height: 100vh; width: 92px; flex: none; background: var(--rq-navy-900); color: var(--rq-on-dark-soft);
  display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 10px; z-index: 5;
  background-image: linear-gradient(180deg, var(--rq-navy-900), var(--rq-navy-950));
}
.dp-rail-logo { width: 56px; height: 56px; border-radius: 16px; background: #fff; display: grid; place-items: center; margin-bottom: 14px; box-shadow: 0 0 0 4px rgba(57, 217, 237, .14); }
.dp-rail-logo img { width: 44px; height: 44px; object-fit: contain; }
.dp-rail nav { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 0 10px; }
.dp-rail nav a, .dp-rail-help {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 4px; border-radius: 14px;
  color: var(--rq-on-dark-soft); text-decoration: none; font-size: 11.5px; font-weight: 600; transition: .15s;
}
.dp-rail nav a svg, .dp-rail-help svg { width: 22px; height: 22px; }
.dp-rail nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.dp-rail nav a.active { color: #fff; background: rgba(22, 142, 232, .22); box-shadow: inset 3px 0 0 var(--rq-cyan-400); }
.dp-rail nav a.active svg { color: var(--rq-cyan-400); }
.dp-rail-help { margin-top: auto; width: calc(100% - 20px); }
.dp-rail-help:hover { color: #fff; }
.dp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dp-top {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 3vw, 32px); background: rgba(244, 247, 251, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rq-line);
}
.dp-top-title { font: 800 20px var(--rq-font-display); letter-spacing: -.01em; }
.dp-top-right { display: flex; align-items: center; gap: 10px; }
.dp-admin-pill { font-size: 12px; font-weight: 700; color: #8a5a00; background: #fff4d6; border: 1px solid #f3d58b; padding: 6px 12px; border-radius: 999px; }
.dp-user { position: relative; }
.dp-user-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--rq-line); background: #fff; border-radius: 999px; padding: 4px 14px 4px 4px; cursor: pointer; font: 600 13px var(--rq-font); color: var(--rq-ink); }
.dp-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--rq-grad-btn); color: #fff; display: grid; place-items: center; font: 800 22px var(--rq-font-display); text-transform: uppercase; flex: none; }
.dp-avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.dp-user-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--rq-line); border-radius: 14px; box-shadow: var(--rq-shadow); padding: 6px; min-width: 190px; }
.dp-user.open .dp-user-menu { display: block; }
.dp-user-menu a, .dp-user-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; border: 0; background: none; font: 500 14px var(--rq-font); color: var(--rq-ink); text-decoration: none; cursor: pointer; }
.dp-user-menu a:hover, .dp-user-menu button:hover { background: var(--rq-surface-2); }
.dp-view { padding: 24px clamp(16px, 3vw, 32px) 120px; max-width: 1360px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.dp-loading { padding: 80px 0; text-align: center; color: var(--rq-muted); }

/* hero / stats */
.dp-hero {
  border-radius: 22px; padding: 28px clamp(20px, 3vw, 34px); color: #fff; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center;
  background: radial-gradient(600px 300px at 90% 0%, rgba(57, 217, 237, .28), transparent 60%), linear-gradient(135deg, var(--rq-navy-800), var(--rq-navy-900));
  box-shadow: var(--rq-shadow); position: relative; overflow: hidden;
}
.dp-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(143, 194, 237, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 194, 237, .08) 1px, transparent 1px); background-size: 40px 40px; }
.dp-hero > * { position: relative; z-index: 1; }
.dp-eyebrow { color: var(--rq-cyan-300); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dp-hero h1 { font: 800 clamp(24px, 3vw, 32px) var(--rq-font-display); margin: 6px 0 6px; letter-spacing: -.01em; }
.dp-hero p { margin: 0; color: var(--rq-on-dark-soft); max-width: 520px; }
.dp-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.dp-hero-btn { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff; text-decoration: none; min-width: 230px; transition: .15s; }
.dp-hero-btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(57, 217, 237, .5); transform: translateY(-1px); }
.dp-hero-btn svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: rgba(57, 217, 237, .16); color: var(--rq-cyan-400); }
.dp-hero-btn b { display: block; font-size: 15px; }
.dp-hero-btn small { color: var(--rq-on-dark-soft); }
.dp-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.dp-stat { background: #fff; border: 1px solid var(--rq-line); border-radius: 16px; padding: 16px 18px; position: relative; overflow: hidden; }
.dp-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.dp-stat span { color: var(--rq-muted); font-size: 13px; font-weight: 600; }
.dp-stat b { display: block; font: 800 30px var(--rq-font-display); margin-top: 4px; }
.dp-stat.blue { --c: #168ee8; } .dp-stat.amber { --c: #f59e0b; } .dp-stat.violet { --c: #7c3aed; } .dp-stat.green { --c: #16a34a; } .dp-stat.gray { --c: #94a3b8; }

/* cards / tables */
.dp-card { background: #fff; border: 1px solid var(--rq-line); border-radius: 20px; padding: 20px clamp(16px, 2vw, 24px); box-shadow: 0 1px 2px rgba(7, 26, 53, .04); }
.dp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dp-card-head h3 { margin: 0; font: 800 16px var(--rq-font-display); }
.dp-card-head a, .dp-card-head span { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--rq-muted); }
.dp-card-head a { color: var(--rq-blue-600); }
.dp-table-wrap { overflow-x: auto; margin: 0 -4px; }
.dp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dp-table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--rq-muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--rq-line); white-space: nowrap; }
.dp-table td { padding: 13px 12px; border-bottom: 1px solid #edf2f8; vertical-align: middle; }
.dp-table td small { display: block; color: var(--rq-muted); font-size: 12px; }
.dp-table tbody tr[data-go] { cursor: pointer; transition: background .12s; }
.dp-table tbody tr[data-go]:hover, .dp-table tbody tr[data-go]:focus { background: #f6faff; outline: none; }
.dp-table.compact td { padding: 10px 12px; }
.dp-work { max-width: 260px; color: var(--rq-ink-soft); }
.dp-imp { display: inline-flex; align-items: center; gap: 6px; color: var(--rq-ink-soft); font-weight: 600; font-size: 13px; }
.dp-imp svg { width: 16px; height: 16px; color: var(--rq-blue-500); }
.dp-flag { font-size: 11px; font-weight: 700; color: #b42318; background: #fde8e6; border-radius: 6px; padding: 2px 6px; margin-left: 4px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.dp-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; color: var(--pc); background: var(--pb); }
.dp-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dp-pill.blue { --pc: #0f6fd1; --pb: #e3f0fd; } .dp-pill.amber { --pc: #b45309; --pb: #fef3c7; } .dp-pill.teal { --pc: #0f766e; --pb: #d5f5ef; }
.dp-pill.violet { --pc: #6d28d9; --pb: #ede9fe; } .dp-pill.orange { --pc: #c2410c; --pb: #ffedd5; } .dp-pill.cyan { --pc: #0e7490; --pb: #d6f6fb; }
.dp-pill.green { --pc: #15803d; --pb: #dcfce7; } .dp-pill.gray { --pc: #475569; --pb: #eef2f6; } .dp-pill.red { --pc: #b42318; --pb: #fde8e6; }
.dp-empty { text-align: center; padding: 50px 20px; color: var(--rq-muted); }
.dp-empty b { display: block; color: var(--rq-ink); font-size: 17px; margin: 12px 0 6px; }
.dp-empty p { margin: 0 0 18px; }
.dp-empty-art svg { width: 56px; height: 56px; padding: 14px; border-radius: 18px; background: var(--rq-surface-3); color: var(--rq-blue-500); }
.dp-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dp-chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rq-line); background: #fff; font: 600 13px var(--rq-font); color: var(--rq-ink-soft); cursor: pointer; }
.dp-chip:hover { border-color: var(--rq-blue-500); color: var(--rq-blue-600); }
.dp-chip.on { background: var(--rq-navy-800); border-color: var(--rq-navy-800); color: #fff; }
.dp-search { max-width: 320px; height: 38px; }

/* new case */
.dp-newhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dp-newhead h2 { margin: 0; font: 800 22px var(--rq-font-display); letter-spacing: -.01em; }
.dp-newhead p { margin: 2px 0 0; color: var(--rq-muted); font-size: 14px; }
.dp-head-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.dp-icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--rq-line); background: #fff; display: grid; place-items: center; color: var(--rq-ink); cursor: pointer; text-decoration: none; flex: none; }
.dp-icon-btn:hover { border-color: var(--rq-blue-500); color: var(--rq-blue-600); }
.dp-icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.dp-icon-btn.sm svg { width: 16px; height: 16px; }
.dp-steps { margin: 0 0 0 auto; padding: 0; list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
.dp-steps li { font-size: 12.5px; font-weight: 700; color: var(--rq-muted); background: #fff; border: 1px solid var(--rq-line); padding: 7px 12px; border-radius: 999px; }
.dp-steps li.done { color: #15803d; background: #ecfdf3; border-color: #b7ebc9; }
.dp-steps li.done::before { content: "✓ "; }
.dp-builder { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 24px; padding: 0; overflow: hidden; }
.dp-chart-col { background: #eef3f9; padding: 18px 18px 12px; display: flex; flex-direction: column; align-items: center; border-right: 1px solid var(--rq-line); }
.dp-chart-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dp-chart { width: 100%; max-width: 380px; height: auto; margin: 6px 0; }
.dp-chart .tooth { cursor: pointer; outline: none; }
.dp-chart .tooth path { fill: #fff; stroke: #8aa0bb; stroke-width: 1.4; vector-effect: non-scaling-stroke; transition: fill .12s, stroke .12s; }
.dp-chart text { stroke: none !important; }
.dp-chart .tooth text { font: 600 11.5px "DM Sans", var(--rq-font); fill: #2c3e57; text-anchor: middle; pointer-events: none; }
.dp-chart .tooth:hover path, .dp-chart .tooth:focus path { stroke: var(--rq-blue-500); stroke-width: 2.2; }
.dp-chart .tooth.sel path { fill: var(--rq-blue-500) !important; stroke: var(--rq-navy-800); stroke-width: 2.2; }
.dp-chart .tooth.sel text, .dp-chart .tooth.used text { fill: #fff; }
.dp-chart .tooth.used path { stroke: rgba(0, 0, 0, .25); }
.dp-chart .arch-l { font: 700 10.5px var(--rq-font); fill: #9fb2c8; text-anchor: middle; letter-spacing: .2em; }
.dp-chart .side-l { font: 700 12px var(--rq-font); fill: #b8c7d8; text-anchor: middle; }
.dp-chart .mid { stroke: #cbd8e6; stroke-dasharray: 3 4; }
.dp-hint { margin: 0; font-size: 12px; color: var(--rq-muted); }
.dp-spec-col { padding: 18px 22px 22px 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.dp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rq-line); }
.dp-tabs button { border: 0; background: none; font: 700 14px var(--rq-font); color: var(--rq-muted); padding: 10px 16px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.dp-tabs button.on { color: var(--rq-blue-600); border-bottom-color: var(--rq-blue-500); }
.dp-tabpane { max-height: 248px; overflow: auto; padding-right: 4px; }
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.dp-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 11px; border: 1px solid var(--rq-line); background: var(--rq-surface-2); font: 600 13.5px var(--rq-font); color: var(--rq-ink); cursor: pointer; text-align: left; transition: .12s; }
.dp-opt i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dp-opt:hover { border-color: var(--rq-blue-500); background: #fff; }
.dp-opt.on { background: #fff; border-color: var(--rq-blue-500); box-shadow: 0 0 0 3px rgba(22, 142, 232, .15); color: var(--rq-blue-600); }
.dp-shades small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rq-muted); margin: 4px 0 6px; }
.dp-shades > div { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dp-shade { min-width: 50px; height: 36px; border-radius: 9px; border: 1px solid var(--rq-line); background: #fffdf7; font: 700 13px var(--rq-font); cursor: pointer; color: var(--rq-ink); }
.dp-shade:hover { border-color: var(--rq-blue-500); }
.dp-shade.on { background: var(--rq-blue-500); color: #fff; border-color: var(--rq-blue-500); }
.dp-selbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 14px; background: var(--rq-surface-2); border: 1px solid var(--rq-line); flex-wrap: wrap; }
.dp-selpills { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-sp { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--rq-line); font-size: 13px; font-weight: 600; cursor: pointer; }
.dp-sp small { color: var(--rq-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.dp-sp i { width: 9px; height: 9px; border-radius: 50%; }
.dp-sp.empty { color: var(--rq-muted); }
.dp-order { border: 1px solid var(--rq-line); border-radius: 14px; padding: 14px 14px 6px; }
.dp-order-empty { color: var(--rq-muted); font-size: 14px; padding: 18px 4px 22px; }
.dp-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; }
.dp-form label { font-size: 13px; font-weight: 600; color: var(--rq-ink-soft); display: flex; flex-direction: column; gap: 6px; }
.dp-form .span2 { grid-column: span 2; } .dp-form .span3 { grid-column: 1 / -1; }
.dp-form small.warn { color: #b45309; font-weight: 600; }
.dp-imptoggle { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.dp-imptoggle button { display: flex; gap: 14px; align-items: center; text-align: left; padding: 16px; border-radius: 16px; border: 1.5px solid var(--rq-line); background: #fff; cursor: pointer; font: inherit; color: var(--rq-ink); transition: .15s; }
.dp-imptoggle button svg { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--rq-surface-3); color: var(--rq-blue-600); }
.dp-imptoggle button b { display: block; font-size: 15px; }
.dp-imptoggle button small { color: var(--rq-muted); }
.dp-imptoggle button.on { border-color: var(--rq-blue-500); background: #f3f9ff; box-shadow: 0 0 0 4px rgba(22, 142, 232, .1); }
.dp-imptoggle button.on svg { background: var(--rq-blue-500); color: #fff; }
.dp-drop { margin-top: 16px; border: 2px dashed #b9cde3; border-radius: 16px; padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--rq-ink-soft); cursor: pointer; background: #f8fbff; transition: .15s; }
.dp-drop svg { width: 38px; height: 38px; color: var(--rq-blue-500); }
.dp-drop small { color: var(--rq-muted); font-size: 12px; max-width: 560px; }
.dp-drop:hover, .dp-drop.over { border-color: var(--rq-blue-500); background: #eef6ff; }
.dp-drop.small { padding: 16px; flex-direction: row; justify-content: center; gap: 10px; flex-wrap: wrap; }
.dp-drop.small svg { width: 24px; height: 24px; }
.dp-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 12px; }
.dp-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--rq-line); background: #fff; text-decoration: none; color: var(--rq-ink); min-width: 0; }
.dp-file svg { color: var(--rq-blue-500); }
.dp-file span { flex: 1; min-width: 0; }
.dp-file b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-file small { color: var(--rq-muted); font-size: 12px; }
a.dp-file:hover { border-color: var(--rq-blue-500); }
.dp-callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: #eef6ff; border: 1px solid #cfe3fa; margin-bottom: 16px; }
.dp-callout svg { color: var(--rq-blue-600); margin-top: 2px; }
.dp-callout b { display: block; }
.dp-callout p { margin: 2px 0 0; color: var(--rq-ink-soft); font-size: 14px; }
.dp-callout.amber { background: #fffaeb; border-color: #f7dc9a; } .dp-callout.amber svg { color: #b45309; }
.dp-callout.red { background: #fff1f0; border-color: #f6c5bf; display: block; }
.dp-checks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dp-checks > span { width: 100%; font-size: 13px; font-weight: 600; color: var(--rq-ink-soft); }
.dp-check { flex-direction: row !important; align-items: center; gap: 8px !important; padding: 8px 12px; border: 1px solid var(--rq-line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600 !important; color: var(--rq-ink) !important; }
.dp-check input { accent-color: var(--rq-blue-500); width: 16px; height: 16px; }
.dp-submitbar { position: sticky; bottom: 16px; z-index: 3; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border: 1px solid var(--rq-line); box-shadow: var(--rq-shadow); }
.dp-submitbar span { margin-right: auto; color: var(--rq-ink-soft); font-weight: 600; font-size: 14px; padding-left: 6px; }

/* case detail */
.dp-track { display: flex; gap: 0; overflow-x: auto; padding: 6px 2px 4px; }
.dp-tstep { flex: 1; min-width: 104px; position: relative; text-align: center; padding-top: 26px; }
.dp-tstep i { position: absolute; top: 4px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: #fff; border: 2px solid #c9d6e5; z-index: 1; }
.dp-tstep::before { content: ""; position: absolute; top: 12px; left: -50%; right: 50%; height: 2px; background: #dbe5f0; }
.dp-tstep:first-child::before { display: none; }
.dp-tstep b { display: block; font-size: 12.5px; color: var(--rq-muted); }
.dp-tstep small { color: var(--rq-muted); font-size: 11.5px; }
.dp-tstep.done i { background: var(--rq-blue-500); border-color: var(--rq-blue-500); }
.dp-tstep.done::before, .dp-tstep.now::before { background: var(--rq-blue-500); }
.dp-tstep.done b { color: var(--rq-ink); }
.dp-tstep.now i { background: #fff; border: 5px solid var(--rq-blue-500); box-shadow: 0 0 0 5px rgba(22, 142, 232, .18); }
.dp-tstep.now b { color: var(--rq-blue-600); }
.dp-track.closed { opacity: .55; filter: grayscale(.6); }
.dp-kv { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid #edf2f8; }
.dp-kv span { color: var(--rq-muted); font-size: 12.5px; font-weight: 600; }
.dp-kv b { display: block; color: var(--rq-ink); font-size: 15px; margin-top: 2px; }
.dp-two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.dp-mini-chart { display: flex; justify-content: center; background: #eef3f9; border-radius: 14px; margin-bottom: 14px; padding: 6px; }
.dp-mini-chart .dp-chart { max-width: 260px; }
.dp-mini-chart .tooth { pointer-events: none; }
.dp-dl { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; margin: 0 0 18px; font-size: 14px; }
.dp-dl dt { color: var(--rq-muted); font-weight: 600; }
.dp-dl dd { margin: 0; }
.dp-dl dd.pre { white-space: pre-wrap; }
.dp-profile { display: flex; flex-direction: column; gap: 20px; max-width: 820px; }
.dp-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* toast */
.dp-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--rq-navy-900); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--rq-shadow); transition: .25s; z-index: 50; max-width: calc(100% - 32px); }
.dp-toast.show { opacity: 1; transform: translate(-50%, 0); }
.dp-toast.ok { background: #12805c; } .dp-toast.warn { background: #b45309; } .dp-toast.err { background: #b42318; }

/* responsive */
@media (max-width: 1100px) {
  .dp-stats { grid-template-columns: repeat(3, 1fr); }
  .dp-builder { grid-template-columns: 1fr; }
  .dp-chart-col { border-right: 0; border-bottom: 1px solid var(--rq-line); }
  .dp-spec-col { padding: 0 18px 18px; }
  .dp-two { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body.dp-app { flex-direction: column; }
  .dp-rail { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: 66px; width: 100%; flex-direction: row; padding: 6px 8px; }
  .dp-rail-logo, .dp-rail-help { display: none; }
  .dp-rail nav { flex-direction: row; padding: 0; justify-content: space-around; }
  .dp-rail nav a { flex: 1; padding: 6px 2px; font-size: 10.5px; }
  .dp-rail nav a.active { box-shadow: inset 0 3px 0 var(--rq-cyan-400); }
  .dp-top .dp-btn-primary, .dp-admin-pill, #dp-desk, .dp-user-btn .nm { display: none; }
  .dp-view { padding: 16px 16px 150px; }
  .dp-stats { grid-template-columns: repeat(2, 1fr); }
  .dp-form { grid-template-columns: 1fr; }
  .dp-form .span2 { grid-column: auto; }
  .dp-imptoggle { grid-template-columns: 1fr; }
  .dp-steps { margin-left: 0; }
  .dp-submitbar { bottom: 78px; }
  .dp-hero-btn { min-width: 0; flex: 1; }
  .dp-dl { grid-template-columns: 1fr; gap: 2px; }
  .dp-dl dd { margin-bottom: 8px; }
}

/* anatomical chart: grooves + numbers, notes box */
.dp-chart .tooth path.groove { fill: none !important; stroke: #b4c3d6; stroke-width: 1.1; stroke-linecap: round; }
.dp-chart .tooth.sel path.groove, .dp-chart .tooth.used path.groove { stroke: rgba(255, 255, 255, .6); }
.dp-chart .tooth text { font-size: 10.5px; }
.dp-note-box { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 380px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--rq-ink-soft); }
.dp-note-box small { font-weight: 500; color: var(--rq-muted); }
.dp-note-box textarea { background: #fff; }
.dp-notes-cell { max-width: 220px; color: var(--rq-ink-soft); font-size: 13px; white-space: normal; }

/* implant system per tooth */
.dp-implant { border: 1px solid #bdeff6; background: #ecfbfd; border-radius: 14px; padding: 12px 14px; }
.dp-implant-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dp-implant-head b { font-size: 14px; color: #0e7490; }
.dp-implant-head small { color: var(--rq-muted); font-family: var(--rq-font-ar); }
.dp-implant-head label { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--rq-ink-soft); }
.dp-implant-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.dp-implant-row { display: flex; align-items: center; gap: 8px; }
.dp-tooth-tag { flex: none; width: 38px; height: 34px; border-radius: 9px; background: #0e7490; color: #fff; font: 700 13px var(--rq-font); display: grid; place-items: center; }
.dp-input.sm { height: 34px; font-size: 13px; padding: 0 8px; }
.dp-imp-sys { display: block; color: #0e7490; font-size: 12px; font-weight: 600; margin-top: 2px; }

/* realistic occlusal chart */
.dp-chart .tooth path.crown { fill: url(#dpEnamel); stroke: #a8977a; stroke-width: 1.1; filter: url(#dpToothShadow); }
.dp-chart .tooth path.groove { fill: none !important; stroke: #bba887; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; filter: none; }
.dp-chart .tooth:hover path.crown, .dp-chart .tooth:focus path.crown { stroke: var(--rq-blue-500); stroke-width: 2; }
.dp-chart .tooth.sel path.crown { fill: #168ee8 !important; stroke: #0b2650; }
.dp-chart .tooth.sel path.groove, .dp-chart .tooth.used path.groove { stroke: rgba(255, 255, 255, .55); }
.dp-chart .tooth.used path.crown { stroke: rgba(0, 0, 0, .3); }
.dp-chart .tooth text { fill: #5b6f88 !important; font: 700 10px var(--rq-font); }
.dp-chart .tooth.sel text { fill: var(--rq-blue-600) !important; font-weight: 800; }

/* picture tooth chart */
.dp-chart-img { position: relative; width: 100%; max-width: 340px; margin: 6px auto; }
.dp-chart-img img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; user-select: none; }
.dp-chart-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dp-chart-img .tooth { cursor: pointer; outline: none; }
.dp-chart-img .tooth path.crown { fill: transparent; stroke: transparent; stroke-width: 1.4; filter: none; mix-blend-mode: multiply; }
.dp-chart-img .tooth:hover path.crown, .dp-chart-img .tooth:focus path.crown { stroke: #168ee8; }
.dp-chart-img .tooth.sel path.crown { fill: rgba(22, 142, 232, .62) !important; stroke: #0b2650; }
.dp-chart-img .tooth.used path.crown { fill-opacity: .6; stroke: rgba(0, 0, 0, .25); }
.dp-mini-chart .dp-chart-img { max-width: 230px; }

/* primary (children) inner arch */
.dp-chart-img .ppics image { pointer-events: none; }
.dp-chart-img .ppics { mix-blend-mode: multiply; }
.dp-chart-img text.ptn { font: 700 7.5px var(--rq-font); fill: #5b6f88; text-anchor: middle; pointer-events: none; }
.dp-chart-img text.legend { font: 800 7px var(--rq-font); fill: #9fb2c8; text-anchor: middle; letter-spacing: .08em; pointer-events: none; }
.dp-chart-img text.legend.sub { font-weight: 600; letter-spacing: 0; fill: #b4c3d6; }

/* implant details grid: tooth | system | size | parts */
.dp-implant-grid { display: grid; grid-template-columns: 42px 1.3fr 1fr 1.2fr; gap: 8px 10px; align-items: start; }
.dp-implant-grid .dp-ih { font-size: 11.5px; font-weight: 700; color: var(--rq-muted); text-transform: uppercase; letter-spacing: .04em; }
.dp-icell { display: flex; flex-direction: column; gap: 6px; }
.dp-tooth-tag.all { background: #e3f1ff; color: var(--rq-navy-800); font-size: 11.5px; }
@media (max-width: 760px) {
  .dp-implant-grid { grid-template-columns: 38px 1fr 1fr; grid-auto-flow: row dense; }
  .dp-implant-grid .dp-ih { display: none; }
  .dp-implant-grid .dp-tooth-tag { grid-row: span 2; align-self: center; }
  .dp-implant-grid .ib { grid-column: 2 / 4; }
  .dp-implant-grid .is { grid-column: 2; } .dp-implant-grid .ip { grid-column: 3; }
}

/* implant system picker with logos */
.dp-bsel { position: relative; min-width: 0; }
.dp-bsel-btn { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; background: #fff; }
.dp-bsel-btn > span:not(.dp-blogo) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-bsel-btn > span.ph { color: var(--rq-muted); }
.dp-bsel-btn i { font-style: normal; font-size: 11px; color: var(--rq-muted); }
.dp-bsel-menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow: auto; background: #fff;
  border: 1px solid #d6e2ef; border-radius: 12px; box-shadow: 0 14px 34px rgba(11, 38, 80, .16); padding: 6px; }
.dp-bsel-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; background: none; border-radius: 8px;
  font: 600 13px var(--rq-font); color: var(--rq-navy-800); text-align: left; cursor: pointer; }
.dp-bsel-menu button:hover, .dp-bsel-menu button.on { background: #eef6ff; }
.dp-blogo { position: relative; flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--bc); display: inline-grid; place-items: center; overflow: hidden; vertical-align: middle; }
.dp-blogo b { color: #fff; font: 800 10px var(--rq-font); letter-spacing: -.02em; }
.dp-blogo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 2px; }
.dp-imp-sys { display: flex; align-items: center; gap: 6px; }
.dp-imp-sys .dp-blogo { width: 20px; height: 20px; border-radius: 5px; }
.dp-imp-sys .dp-blogo b { font-size: 8px; }
.dp-blogo.has-img { width: 78px; height: 24px; border-radius: 0; background: none; }
.dp-blogo.has-img img { position: static; width: 100%; height: 100%; object-fit: contain; object-position: left center; padding: 0; background: none; }
.dp-blogo.has-img img[src*="-white."] { filter: invert(1) hue-rotate(180deg); } /* logo published in white only */
.dp-imp-sys .dp-blogo.has-img { width: 58px; height: 18px; }
.dp-tooth-tag small { display: block; font-size: 9px; font-weight: 600; opacity: .8; line-height: 1; }
.dp-tooth-tag:has(small) { display: flex; flex-direction: column; justify-content: center; line-height: 1.05; }

/* implant parts pickup */
.dp-prio { display: grid; gap: 6px; }
.dp-rush-note { display: block; padding: 7px 10px; border-radius: 10px; background: #fff4e5; border: 1px solid #ffd59a; color: #8a4b00; font-size: 12.5px; line-height: 1.35; }
.dp-parts { margin-top: 14px; border: 1px dashed #9cc9ee; background: #f5faff; border-radius: 14px; padding: 12px 14px; }
.dp-parts-toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.dp-parts-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: #168ee8; }
.dp-parts-toggle b { display: block; color: var(--rq-navy-800); }
.dp-parts-toggle small { color: var(--rq-muted); }
#dp-parts-list { margin-top: 12px; display: grid; gap: 10px; }
.dp-parts-note { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--rq-muted); }
#dp-pickup { margin-top: 12px; }

/* clinic location card + courier */
.dp-loc-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dp-loc-tools .dp-btn svg { width: 16px; height: 16px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 2; }
.dp-loc-tools .dp-input { flex: 1; min-width: 220px; }
.dp-loc-map { height: 280px; border-radius: 12px; border: 1px solid #d6e2ef; position: relative; z-index: 0; isolation: isolate; }
.dp-loc-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--rq-muted); }
.dp-loc-foot b { color: var(--rq-navy-800); }
.dp-loc-save { display: inline-flex; gap: 6px; align-items: center; }
.dp-courier { display: grid; gap: 8px; }
.dp-trip { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 10px 12px; border: 1px solid #e3ebf5; border-radius: 12px; }
.dp-trip small { flex-basis: 100%; color: var(--rq-muted); }
