/* =========================================================
   BlephoManager — افزونه‌های طراحی مخصوص پنل بلفاروپلاستی
   پایه طراحی: assets/css/app.css (مشترک با پروژه drabbasi)
   ========================================================= */

/* ---------- پایه ---------- */
html{ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body{ min-height: 100vh; overflow-x: hidden; }
img{ max-width: 100%; }
:focus-visible{ outline: 3px solid rgba(154, 85, 255, .45); outline-offset: 2px; border-radius: 6px; }
.skip-link{ position: absolute; right: 12px; top: -60px; z-index: 3000; background: #fff; color: #7a3fe4; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 700; transition: top .2s; }
.skip-link:focus{ top: 12px; }
.ltr{ direction: ltr; unicode-bidi: isolate; }
b.ltr, span.ltr, a.ltr{ display: inline-block; }
.w-100{ width: 100%; }
 .mb-0{ margin-bottom: 0 !important; }
.mt-1{ margin-top: 8px; } .mt-2{ margin-top: 16px; } .mt-3{ margin-top: 24px; }
.mb-1{ margin-bottom: 8px; } .mb-2{ margin-bottom: 16px; } .mb-3{ margin-bottom: 24px; }
.gap-sm{ gap: 6px !important; }

.fw-700{ font-weight: 700; }
.nowrap-ellipsis{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kbd{ font-family: inherit; font-size: 11px; color: #a39cb0; border: 1px solid #e9e1f1; border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; line-height: 18px; }
.sr-only{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- قالب پنل: تکمیل منو ---------- */
.a-brand{ color: inherit; text-decoration: none; }
.a-brand:hover{ text-decoration: none; }
.a-side{ overscroll-behavior: contain; }
.a-side-foot{ padding: 10px 12px calc(14px + var(--safe-bottom)); border-top: 1px solid #f3eef7; }

.a-content{ width: 100%; margin: 0 auto; }
.a-top{ gap: 10px; }
.a-top .tool{ flex-shrink: 0; }
.a-me{ flex-shrink: 0; }

.page-title{ flex-wrap: wrap; }
.page-title .pt-sub{ margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.page-title h1{ line-height: 1.5; }
body.is-panel.menu-open{ overflow: hidden; }
@media (max-width: 980px) {
  .a-side{ width: min(300px, 86vw); }
  .page-title{ margin-bottom: 16px; }
  .page-title .pt-act{ width: 100%; }
  .page-title .pt-act .btn{ flex: 1; }
}

/* ---------- جستجوی سراسری با پیشنهاد زنده ---------- */

.ac-box{ position: absolute; top: calc(100% + 8px); right: 0; left: 0; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 400; max-height: min(420px, 70vh); overflow-y: auto; animation: fadeUp .2s var(--ease); }
.ac-item{ display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: #343a40; }
.ac-item:hover, .ac-item.on{ background: #f6efff; text-decoration: none; }
.ac-item .av{ width: 36px; height: 36px; border-radius: 50%; background: #efe3ff; color: #8a47f0; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.ac-item b{ display: block; font-size: 14px; }
.ac-item small{ color: var(--muted); font-size: 12px; direction: ltr; unicode-bidi: isolate; }
.ac-empty{ padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
.ac-all{ display: block; text-align: center; padding: 10px; font-size: 13px; font-weight: 700; border-top: 1px solid #f3eef7; margin-top: 4px; }
@media (max-width: 640px) {
  
  
  .ac-box{ position: fixed; top: 66px; right: 10px; left: 10px; }
}

/* ---------- کارت‌های آماری کوچک ---------- */
.kpi-grid{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi{ position: relative; background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 0 0 1px rgba(120, 80, 170, .05), var(--shadow-sm); display: flex; gap: 14px; align-items: center; transition: transform .25s var(--ease), box-shadow .25s; color: inherit; }
a.kpi:hover{ transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.kpi .ic{ width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi .ic svg{ width: 22px; height: 22px; }
.kpi .lbl{ font-size: 12px; color: var(--muted); font-weight: 700; }
.kpi .val{ font-size: 24px; font-weight: 700; color: #343a40; line-height: 1.35; }
.kpi .sub{ font-size: 12px; color: var(--muted); }
.kpi.violet .ic{ background: #f3eaff; color: #9a55ff; }
.kpi.pink .ic{ background: #ffeef2; color: #e0436d; }
.kpi.teal .ic{ background: #e2f8f4; color: #07a68d; }
.kpi.blue .ic{ background: #e3f1fd; color: #047edf; }
.kpi.amber .ic{ background: #fff4d6; color: #b7791f; }
@media (max-width: 1100px) { .kpi-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .kpi-grid{ gap: 10px; } .kpi{ padding: 12px; gap: 10px; } .kpi .ic{ width: 38px; height: 38px; } .kpi .val{ font-size: 20px; } }
.gstat-row.four{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .gstat-row.four{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gstat-row.four{ grid-template-columns: 1fr; } }
a.gstat{ display: block; color: #fff; }
a.gstat:hover{ text-decoration: none; }

/* ---------- بنر خوش‌آمد ---------- */

/* ---------- نمودار ستونی ساده ---------- */
.vchart{ display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 10px; align-items: end; height: 190px; padding-top: 10px; }
.vchart .col{ display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; min-width: 0; }
.vchart .bars{ display: flex; gap: 4px; align-items: flex-end; height: 140px; width: 100%; justify-content: center; }
.vchart .bar{ width: min(18px, 40%); border-radius: 6px 6px 3px 3px; min-height: 4px; transform-origin: bottom; animation: growY .7s var(--ease) both; position: relative; }
.vchart .bar.a{ background: var(--grad-primary); }
.vchart .bar.b{ background: var(--grad-danger); }
.vchart .bar.c{ background: var(--grad-success); }
.vchart .bar:hover::after{ content: attr(data-v); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: #2c2e3e; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.vchart .lbl{ font-size: 11px; color: var(--muted); text-align: center; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vchart .lbl b{ display: block; color: #6c7293; font-size: 12px; }
.chart-legend{ display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.chart-legend i{ display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }
.chart-legend .a{ background: var(--grad-primary); } .chart-legend .b{ background: var(--grad-danger); } .chart-legend .c{ background: var(--grad-success); }
@media (max-width: 560px) { .vchart{ gap: 4px; height: 170px; } .vchart .bars{ height: 120px; } .vchart .lbl b{ font-size: 11px; } }

/* ---------- ردیف بیمار در فهرست‌ها ---------- */
.prow{ display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px #f0e9f5; margin-bottom: 8px; transition: transform .2s var(--ease), box-shadow .2s; color: inherit; }
.prow:hover{ transform: translateY(-2px); box-shadow: 0 0 0 1px #e6d7f7, var(--shadow); text-decoration: none; }
.prow .av{ width: 44px; height: 44px; border-radius: 50%; background: #efe3ff; color: #8a47f0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; flex-shrink: 0; }
.prow .grow b{ display: block; font-size: 15px; color: #343a40; }
.prow .meta{ display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.prow .meta span{ display: inline-flex; align-items: center; gap: 4px; }
.prow .meta svg{ width: 14px; height: 14px; color: #c4b5d6; }
.prow .acts{ display: flex; gap: 6px; flex-shrink: 0; }

@media (max-width: 640px) {
  .prow{ flex-wrap: wrap; padding: 12px; }
  .prow .acts{ width: 100%; }
  .prow .acts .btn{ flex: 1; }
  
}

/* ---------- لیست یادآوری ---------- */

.sec-label{ font-size: 12px; font-weight: 700; color: #a39cb0; margin: 14px 0 4px; display: flex; align-items: center; gap: 6px; }
.sec-label:first-child{ margin-top: 0; }
.sec-label svg{ width: 15px; height: 15px; }

/* ---------- دسترسی سریع ---------- */
.quick-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick{ display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 14px; background: #faf7fd; color: #6c7293; font-size: 13px; font-weight: 700; text-align: center; transition: all .2s var(--ease); }
.quick svg{ width: 22px; height: 22px; color: #9a55ff; transition: transform .2s var(--ease); }
.quick:hover{ background: #f3eaff; color: #8a47f0; text-decoration: none; }
.quick:hover svg{ transform: scale(1.12); }

/* ---------- سربرگ پرونده بیمار ---------- */

.ph-av{ width: 58px; height: 58px; border-radius: 16px; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; box-shadow: 0 8px 18px rgba(154, 85, 255, .3); flex-shrink: 0; }
.ph-name{ font-size: 19px; color: #2c2e3e; margin-bottom: 4px; }
.ph-meta{ display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: #6c7293; }
.ph-meta span{ display: inline-flex; align-items: center; gap: 6px; }
.ph-meta svg{ width: 15px; height: 15px; color: #b9a5d0; }
.ph-meta a{ color: inherit; }
.ph-actions{ display: flex; gap: 8px; flex-wrap: wrap; }
.ph-tabs{ display: flex; gap: 4px; padding: 0 12px; border-top: 1px solid #f3eef7; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ph-tabs::-webkit-scrollbar{ display: none; }
.ph-tabs a{ display: inline-flex; align-items: center; gap: 7px; padding: 13px 14px; font-size: 14px; font-weight: 700; color: #8e8aa0; border-bottom: 3px solid transparent; white-space: nowrap; transition: color .2s, border-color .2s; }
.ph-tabs a svg{ width: 17px; height: 17px; }
.ph-tabs a:hover{ color: #9a55ff; text-decoration: none; }
.ph-tabs a.on{ color: #9a55ff; border-bottom-color: #9a55ff; }
@media (max-width: 640px) {
  
  .ph-av{ width: 48px; height: 48px; font-size: 20px; border-radius: 14px; }
  .ph-name{ font-size: 17px; }
  .ph-meta{ gap: 4px 12px; font-size: 12px; }
  .ph-actions{ width: 100%; }
  .ph-actions .btn{ flex: 1; }
  .ph-tabs{ padding: 0 6px; }
  .ph-tabs a{ padding: 12px 10px; font-size: 13px; }
}

/* ---------- جدول‌های واکنش‌گرا (کارت در موبایل) ---------- */

@media (max-width: 720px) {
  .table.stack-mobile thead{ display: none; }
  .table.stack-mobile, .table.stack-mobile tbody, .table.stack-mobile tr, .table.stack-mobile td{ display: block; width: 100%; }
  .table.stack-mobile tr{ background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px #f0e9f5; margin-bottom: 10px; padding: 8px 12px; }
  .table.stack-mobile td{ border: 0; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; text-align: left; }
  .table.stack-mobile td::before{ content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; text-align: right; flex-shrink: 0; }
  
  
  
  
  
}

/* ---------- خط زمان ---------- */
.tl{ position: relative; padding-right: 26px; }
.tl::before{ content: ''; position: absolute; right: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(#e6d7f7, #f6f0fb); border-radius: 2px; }
.tl-item{ position: relative; margin-bottom: 14px; animation: fadeUp .4s var(--ease) both; }
.tl-dot{ position: absolute; right: -26px; top: 14px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid #b66dff; box-shadow: 0 0 0 4px #f6f0fb; }
.tl-card{ background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px #f0e9f5; padding: 12px 16px; }
.tl-card .row{ gap: 8px; }
.tl-card h4{ font-size: 15px; color: #343a40; margin: 0; display: flex; align-items: center; gap: 8px; }
.tl-card h4 svg{ width: 18px; height: 18px; }
.tl-card time{ font-size: 12px; color: var(--muted); white-space: nowrap; }
.tl-card p{ margin: 6px 0 0; font-size: 13px; color: #6c7293; }
.tl-card img{ margin-top: 10px; width: 120px; height: 90px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.tl-item.registration .tl-dot{ border-color: #07cdae; } .tl-item.registration h4 svg{ color: #07a68d; }
.tl-item.examination .tl-dot{ border-color: #9a55ff; } .tl-item.examination h4 svg{ color: #9a55ff; }
.tl-item.surgery .tl-dot{ border-color: #fe7096; } .tl-item.surgery h4 svg{ color: #e0436d; }
.tl-item.follow_up .tl-dot{ border-color: #047edf; } .tl-item.follow_up h4 svg{ color: #047edf; }
.tl-item.followup_task .tl-dot{ border-color: #ffb300; } .tl-item.followup_task h4 svg{ color: #b7791f; }
.tl-item.photo .tl-dot{ border-color: #a96bff; } .tl-item.photo h4 svg{ color: #a96bff; }
.tl-year{ position: relative; margin: 18px -26px 12px 0; font-size: 12px; font-weight: 700; color: #a39cb0; }
.tl-year span{ background: #f2edf3; padding: 2px 10px; border-radius: 99px; }

/* ---------- گالری عکس ---------- */
.gallery{ display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ph-tile{ position: relative; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px #f0e9f5; transition: transform .2s var(--ease), box-shadow .2s; animation: fadeUp .4s var(--ease) both; }
.ph-tile:hover{ transform: translateY(-3px); box-shadow: var(--shadow); }
.ph-tile .img{ position: relative; aspect-ratio: 4 / 3; background: #f6f0fb; cursor: zoom-in; display: block; width: 100%; border: 0; padding: 0; }
.ph-tile .img img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.ph-tile .badge-vis{ position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.92); color: #8e8aa0; }
.ph-tile .badge-vis.on{ background: #07cdae; color: #fff; }
.ph-tile .badge-vis svg{ width: 16px; height: 16px; }
.ph-tile .body{ padding: 10px 12px; }
.ph-tile .body b{ font-size: 13px; color: #343a40; display: block; }
.ph-tile .body small{ color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-tile .tools{ display: flex; gap: 4px; padding: 0 8px 10px; }
.ph-tile .tools .btn{ flex: 1; padding: 0 6px; }
@media (max-width: 480px) { .gallery{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .ph-tile .tools .btn span{ display: none; } }

/* ---------- نمایشگر تصویر ---------- */
.lightbox{ position: fixed; inset: 0; z-index: 1500; background: rgba(20, 10, 40, .92); display: flex; align-items: center; justify-content: center; padding: 50px 12px 70px; animation: fadeIn .2s; }
.lightbox img{ max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.4); object-fit: contain; animation: pop .25s var(--ease); }
.lightbox .lb-close, .lightbox .lb-nav{ position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox .lb-close{ top: 12px; left: 12px; }
.lightbox .lb-nav.prev{ right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-nav.next{ left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-cap{ position: absolute; bottom: 16px; right: 16px; left: 16px; text-align: center; color: rgba(255,255,255,.85); font-size: 13px; }
.lightbox button:hover{ background: rgba(255,255,255,.22); }

/* ---------- معاینه (یافته‌های OD / OS) ---------- */
.exam-layout{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 900px) { .exam-layout{ grid-template-columns: 1fr; } }
.eye-card{ background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px rgba(120, 80, 170, .05), var(--shadow-sm); overflow: hidden; }
.eye-head{ display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; color: #fff; }
.eye-head.od{ background: var(--grad-primary); } .eye-head.os{ background: var(--grad-info); }
.eye-head b{ font-size: 16px; } .eye-head small{ opacity: .9; }
.eye-head .cnt{ background: rgba(255,255,255,.2); border-radius: 99px; padding: 0 10px; font-size: 12px; font-weight: 700; line-height: 24px; }
.eye-body{ padding: 6px 14px 14px; }
.f-group{ font-size: 12px; font-weight: 700; color: #a39cb0; margin: 14px 4px 6px; }
.f-row{ display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; transition: background .15s; flex-wrap: wrap; }
.f-row:hover{ background: #faf7fd; }
.f-row.on{ background: #f8f2ff; }
.f-check{ display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; min-width: 150px; padding: 4px 2px; user-select: none; border: 0; background: none; text-align: right; font-weight: 400; }
.f-box{ width: 22px; height: 22px; border-radius: 7px; border: 2px solid #d9cfe5; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s var(--ease); color: #fff; }
.f-box svg{ width: 14px; height: 14px; opacity: 0; transform: scale(.5); transition: all .15s var(--ease); }
.f-row.on .f-box{ background: var(--grad-primary); border-color: transparent; }
.f-row.on .f-box svg{ opacity: 1; transform: none; }
.f-label{ direction: ltr; font-size: 14px; color: #343a40; }
.f-row.on .f-label{ font-weight: 700; color: #7a3fe4; }
.f-extra{ flex: 1 1 160px; display: none; }
.f-row.on .f-extra{ display: block; animation: fadeIn .2s; }
.f-extra input, .f-extra select{ width: 100%; min-height: 38px; border: 1.5px solid #ebe4f1; border-radius: 10px; padding: 4px 10px; background: #fff; outline: none; }
.f-extra input:focus, .f-extra select:focus{ border-color: #b66dff; box-shadow: 0 0 0 3px rgba(182, 109, 255, .14); }
.grade{ display: inline-flex; gap: 4px; }
.grade button{ border: 1.5px solid #e6dcef; background: #fff; border-radius: 8px; min-width: 40px; height: 34px; font-weight: 700; cursor: pointer; direction: ltr; color: #6c7293; transition: all .15s; }
.grade button.on{ background: var(--grad-primary); color: #fff; border-color: transparent; }
.plan-grid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .plan-grid{ grid-template-columns: 1fr; } }
.plan-g h4{ font-size: 13px; color: #6c7293; margin: 0 0 8px; }
.opt{ display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid #ece6f2; background: #fff; cursor: pointer; margin-bottom: 6px; text-align: right; transition: all .15s var(--ease); font-weight: 400; color: #343a40; }
.opt:hover{ border-color: #d6c2ef; }
.opt .f-box{ width: 20px; height: 20px; }
.opt.on{ border-color: #b66dff; background: #f8f2ff; font-weight: 700; color: #7a3fe4; }
.opt.on .f-box{ background: var(--grad-primary); border-color: transparent; }
.opt.on .f-box svg{ opacity: 1; transform: none; }
.opt span{ direction: ltr; text-align: left; flex: 1; }
.save-pill{ position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 120px); z-index: 1200; background: #2c2e3e; color: #fff; padding: 8px 18px; border-radius: 99px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-lg); transition: transform .3s var(--ease); }
.save-pill{ visibility: hidden; opacity: 0; transition: transform .3s var(--ease), opacity .3s, visibility .3s; }
.save-pill.show{ transform: translate(-50%, 0); visibility: visible; opacity: 1; }
.save-pill.ok{ background: linear-gradient(to left, #1bcfb4, #07a68d); }
.save-pill.err{ background: linear-gradient(to left, #fe7096, #e0436d); }
.save-pill .sp{ width: 14px; height: 14px; border: 2px solid currentColor; border-left-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

/* ---------- امتیاز ستاره‌ای ---------- */
.stars{ display: inline-flex; gap: 4px; direction: ltr; }
.stars button{ border: 0; background: none; padding: 2px; cursor: pointer; color: #e3dbea; transition: transform .15s; }
.stars button svg{ width: 28px; height: 28px; }
.stars button.on{ color: #ffb300; }
.stars button.on svg{ fill: currentColor; }
.stars button:hover{ transform: scale(1.12); }
.stars-ro{ color: #ffb300; display: inline-flex; gap: 1px; direction: ltr; }
.stars-ro svg{ width: 15px; height: 15px; }
.stars-ro svg.f{ fill: currentColor; }
.stars-ro svg.e{ color: #e3dbea; }

/* ---------- انتخاب‌های دکمه‌ای (chips) ---------- */
.choice{ display: flex; flex-wrap: wrap; gap: 8px; }
.choice label{ position: relative; cursor: pointer; }
.choice input{ position: absolute; opacity: 0; pointer-events: none; }
.choice span{ display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1.5px solid #ece6f2; background: #fff; font-size: 14px; font-weight: 700; color: #6c7293; transition: all .15s var(--ease); }
.choice span svg{ width: 16px; height: 16px; }
.choice input:checked + span{ border-color: transparent; background: var(--grad-primary); color: #fff; box-shadow: 0 6px 14px rgba(154, 85, 255, .28); }
.choice input:focus-visible + span{ outline: 3px solid rgba(154, 85, 255, .45); }
.choice.danger input:checked + span{ background: var(--grad-danger); box-shadow: 0 6px 14px rgba(254, 112, 150, .28); }

/* ---------- فرم‌ها ---------- */
.form-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full{ grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid{ grid-template-columns: 1fr; } }
.field .req{ color: #e0436d; margin-right: 2px; }
.field.has-error input, .field.has-error select, .field.has-error textarea{ border-color: #fe7096 !important; box-shadow: 0 0 0 4px rgba(254, 112, 150, .12) !important; }
.field .err{ display: block; color: #e0436d; font-size: 12px; margin-top: 4px; }
.field input[dir=ltr], .input[dir=ltr]{ text-align: left; }
.field input[dir=ltr]::placeholder{ text-align: right; }
.form-actions{ display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) { .form-actions .btn{ flex: 1; } }
.sticky-foot{ position: sticky; bottom: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); margin: 18px -18px -18px; padding: 12px 18px calc(12px + var(--safe-bottom)); border-top: 1px solid #f3eef7; border-radius: 0 0 var(--radius) var(--radius); }
.dp-input[readonly]{ background-color: #fff; }

.toggle-row{ display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #efe8f4; }
.toggle-row:last-child{ border-bottom: 0; }
.toggle-row b{ display: block; font-size: 14px; color: #343a40; }
.toggle-row small{ color: var(--muted); font-size: 12px; }

/* ---------- مودال: تکمیل ---------- */
.modal-body .field:last-child{ margin-bottom: 0; }
.modal.lg{ max-width: 680px; }
body.modal-open{ overflow: hidden; }

/* ---------- دکمه‌ها: تکمیل ---------- */
.btn-icon.btn-sm{ width: 34px; min-height: 34px; }
.btn[aria-busy=true]{ opacity: .6; pointer-events: none; }
a.btn:hover{ text-decoration: none; }

/* ---------- بخش‌های کارت ---------- */
.card-head .sub{ font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.card-head h2 svg, .card-head h3 svg{ width: 18px; height: 18px; color: #9a55ff; vertical-align: -3px; margin-left: 6px; }
.count-chip{ background: #f3eaff; color: #8a47f0; border-radius: 99px; padding: 0 10px; font-size: 12px; font-weight: 700; line-height: 24px; white-space: nowrap; }
.dash-cols{ display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .dash-cols{ grid-template-columns: 1fr; } }
.two-cols{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 900px) { .two-cols{ grid-template-columns: 1fr; } }
.info-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.info-item{ background: #faf7fd; border-radius: 12px; padding: 10px 14px; }
.info-item small{ display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.info-item b{ font-size: 15px; color: #343a40; word-break: break-word; }
.tag-list{ display: flex; flex-wrap: wrap; gap: 6px; }
.note-box{ background: #faf7fd; border-radius: 12px; padding: 12px 14px; font-size: 14px; color: #4a4560; white-space: pre-line; }
.empty.sm{ padding: 20px 10px; font-size: 13px; }
.empty.sm svg{ width: 40px; height: 40px; }
.empty .btn{ margin-top: 12px; }

/* ---------- آیتم‌های قابل ویرایش در لیست (تنظیمات، شکایت‌ها) ---------- */
.li-row{ display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f5f1f8; }
.li-row:last-child{ border-bottom: 0; }
.li-row .ic{ width: 40px; height: 40px; border-radius: 12px; background: #f3eaff; color: #9a55ff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.li-row .ic svg{ width: 19px; height: 19px; }
.li-row b{ display: block; font-size: 14px; color: #343a40; }
.li-row small{ color: var(--muted); font-size: 12px; }
.li-row .acts{ display: flex; gap: 6px; flex-shrink: 0; }
.li-row.off{ opacity: .6; }

/* ---------- وضعیت پیگیری ---------- */
.task{ display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px #f0e9f5; margin-bottom: 10px; animation: fadeIn .3s var(--ease) both; }
.task.late{ box-shadow: 0 0 0 1.5px #ffc2d1; }
.task .due{ min-width: 64px; text-align: center; border-radius: 12px; padding: 8px 4px; background: #f3eaff; color: #8a47f0; font-weight: 700; line-height: 1.4; font-size: 12px; }
.task .due b{ display: block; font-size: 18px; }
.task.late .due{ background: #ffeef2; color: #e0436d; }
.task.done .due{ background: #e2f8f4; color: #07a68d; }
.task .acts{ display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 560px) { .task{ padding: 12px; gap: 10px; } .task .acts .btn{ flex: 1; } }

/* ---------- صفحه خطا ---------- */
.err-page{ min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #f8f2ff 0, transparent 40%), radial-gradient(circle at 90% 90%, #fff1f4 0, transparent 35%), #fff; }
.err-card{ text-align: center; max-width: 420px; animation: fadeUp .5s var(--ease) both; }
.err-code{ font-size: 84px; font-weight: 700; line-height: 1.1; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.err-card h1{ margin-bottom: 8px; }
.err-card .btn{ margin-top: 18px; }

/* ---------- صفحه ورود: تکمیل ---------- */
.auth-box .alert{ margin-bottom: 16px; }
.auth-alt{ display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.auth-alt a{ font-size: 12px; color: #8e8aa0; padding: 4px 10px; border-radius: 8px; background: #faf7fd; }
.auth-alt a:hover{ color: #9a55ff; text-decoration: none; }
.auth-resend button{ border: 0; background: none; color: #9a55ff; font-weight: 700; cursor: pointer; padding: 0 4px; }
.auth-resend button:disabled{ color: #b7b0c4; cursor: default; }
.auth-edit{ border: 0; background: none; color: #9a55ff; font-weight: 700; cursor: pointer; font-size: 13px; padding: 0; }
.caps-warn{ font-size: 12px; color: #b7791f; display: none; margin-top: -6px; }
.caps-warn.show{ display: block; }

/* ---------- پنل بیمار ---------- */
.p-logo{ width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; }
.p-logo svg{ width: 22px; height: 22px; }
.p-brand{ font-weight: 700; font-size: 14px; }
.p-out{ width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.18); color: #fff; display: flex; align-items: center; justify-content: center; }
.p-out svg{ width: 20px; height: 20px; }
.p-hello{ color: #fff; font-size: 22px; margin-top: 22px; }
.p-top .muted{ margin: 0; }
.p-app .bottom-nav a span{ font-size: 11px; }
.p-tile{ display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm); color: inherit; }
.p-tile:hover{ text-decoration: none; box-shadow: var(--shadow); }
.p-tile .ic{ width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: #f3eaff; color: #9a55ff; flex-shrink: 0; }
.p-tile .ic svg{ width: 22px; height: 22px; }
.p-tile b{ display: block; color: #343a40; }
.p-tile small{ color: var(--muted); }
.survey-q{ padding: 14px 0; border-bottom: 1px dashed #efe8f4; }
.survey-q:last-child{ border-bottom: 0; }
.survey-q > b{ display: block; margin-bottom: 10px; color: #343a40; }
.scale{ display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.scale label{ position: relative; }
.scale input{ position: absolute; opacity: 0; }
.scale span{ display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 12px; border: 1.5px solid #ece6f2; font-weight: 700; color: #6c7293; cursor: pointer; transition: all .15s var(--ease); }
.scale input:checked + span{ background: var(--grad-primary); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(154, 85, 255, .3); }
.scale-legend{ display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------- چاپ ---------- */
@media print {
  .a-side, .a-top, .a-scrim, .ph-tabs, .pt-act, .bottom-nav, .btn, .toast, #toasts{ display: none !important; }
  .a-main{ margin: 0 !important; }
  .a-content{ padding: 0 !important; max-width: none; }
  body{ background: #fff; }
  .card, .kpi, .gstat{ box-shadow: none !important; border: 1px solid #ddd; break-inside: avoid; }
  .gstat{ color: #000 !important; background: #fff !important; }
  .gstat::before, .gstat::after{ display: none; }
}
.li-ic-danger{ width: 42px; height: 42px; border-radius: 12px; background: #ffeef2; color: #e0436d; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.li-ic-danger svg{ width: 22px; height: 22px; }
.dp .cal-head .title select{ font-weight: 700; }
.dp .cal-day{ aspect-ratio: auto; min-height: 42px; }
.afield.has-error input{ border-color: #fe7096 !important; box-shadow: 0 0 0 4px rgba(254, 112, 150, .12) !important; }
.auth-form > .err{ color: #e0436d; font-size: 12px; margin-top: -8px; }
.block{ display: block; }
.tabs button svg{ width: 16px; height: 16px; vertical-align: -3px; margin-left: 4px; } .tabs .count-chip{ margin-right: 4px; }
.task .meta svg{ width: 14px; height: 14px; vertical-align: -2px; } .task .meta a{ color: inherit; }

/* =========================================================
   صفحه بیماران — فیلتر پیشرفته
   ========================================================= */

.pf-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.pf-scrim{ display: none; }

.pf-chip{ display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 99px; background: #f3eaff; color: #7a3fe4; font-size: 12px; font-weight: 700; }
.pf-chip svg{ width: 13px; height: 13px; opacity: .7; }
.pf-chip:hover{ background: #ffeef2; color: #e0436d; text-decoration: none; }
.pf-chip.clear{ background: transparent; color: #8e8aa0; text-decoration: underline; }

.show-mobile-inline{ display: none; }
.pager{ display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 18px 0 4px; }
.pager .btn{ min-width: 38px; }
.pager .gap{ align-self: center; color: var(--muted); }
.btn.disabled{ opacity: .4; pointer-events: none; }

@media (max-width: 1100px) {
  
  
  
  
  
  
  .pf-scrim.open{ display: block; position: fixed; inset: 0; background: rgba(46, 26, 87, .35); z-index: 940; animation: fadeIn .2s; }
  
}
@media (max-width: 720px) {
  
  
  
  
  .show-mobile-inline{ display: inline; }
}

/* =========================================================
   قالب جدید پنل: منو، نوار بالا، اعلان‌ها، جستجوی سریع
   ========================================================= */
.a-brand{ justify-content: space-between; gap: 8px; }
.a-brand .brand-txt{ min-width: 0; }
.a-brand .brand-txt b{ font-size: 16px; white-space: nowrap; }
.rail-btn{ border: 0; background: transparent; color: #b9aecb; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rail-btn:hover{ background: #f6efff; color: #9a55ff; }
.rail-btn svg{ width: 18px; height: 18px; }
.side-cta{ padding: 4px 16px 10px; }
.side-cta .btn{ justify-content: flex-start; gap: 10px; min-height: 44px; }
.side-cta .btn span{ flex: 1; text-align: right; }
.kbd-w{ font-size: 10px; background: rgba(255,255,255,.22); border-radius: 6px; padding: 0 6px; line-height: 18px; font-family: inherit; }
.a-nav{ padding-bottom: 8px; }
.a-nav a .lbl{ flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-nav a svg{ order: 0; margin-right: 0; }
.a-nav a .badge{ order: 3; }
.a-nav a.recent{ padding-top: 8px; padding-bottom: 8px; font-size: 13px; color: #6c7293; }
.mini-av{ width: 24px; height: 24px; border-radius: 50%; background: #f3eaff; color: #8a47f0; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.me-card{ display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 12px; }
.me-card .av{ width: 36px; height: 36px; border-radius: 50%; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.me-card b{ display: block; font-size: 13px; color: #343a40; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card small{ color: #a39cb0; font-size: 11px; }
.me-card .tool{ width: 36px; height: 36px; border-radius: 10px; color: #a39cb0; display: inline-flex; align-items: center; justify-content: center; }
.me-card .tool:hover{ background: #ffeef2; color: #e0436d; }
.me-card .tool svg{ width: 18px; height: 18px; }

/* منوی جمع‌شده (فقط آیکون) */
@media (min-width: 981px) {
  body.rail .a-side{ width: 78px; }
  body.rail .a-main{ margin-right: 78px; }
  body.rail .a-brand{ flex-direction: column; height: auto; padding: 14px 0 8px; }
  body.rail .a-brand .brand-txt, body.rail .a-nav .lbl, body.rail .a-nav .sep, body.rail .side-cta span, body.rail .side-cta .kbd-w, body.rail .me-card .lbl{ display: none; }
  body.rail .a-nav a{ justify-content: center; padding: 12px 0; position: relative; }
  body.rail .a-nav a:hover{ padding-right: 0; }
  body.rail .a-nav a .badge{ position: absolute; top: 4px; left: 8px; min-width: 18px; text-align: center; padding: 0 4px; }
  body.rail .side-cta{ padding: 4px 12px 10px; }
  body.rail .side-cta .btn{ justify-content: center; padding: 0; }
  body.rail .me-card{ flex-direction: column; }
  body.rail .rail-btn svg{ transform: scaleX(-1); }
  .a-side, .a-main{ transition: width .2s var(--ease), margin .2s var(--ease); }
}

/* نوار بالا */
.a-top{ gap: 8px; }
.crumbs{ display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; font-size: 13px; color: #8e8aa0; overflow: hidden; white-space: nowrap; }
.crumbs a{ color: #8e8aa0; display: inline-flex; align-items: center; }
.crumbs a:hover{ color: #9a55ff; text-decoration: none; }
.crumbs svg{ width: 16px; height: 16px; }
.crumbs .sep-c svg{ width: 13px; height: 13px; color: #cfc4dc; }
.crumbs .cur{ color: #343a40; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.top-search{ display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 12px; border: 0; background: #f8f5fb; color: #9c9fa6; cursor: pointer; font-size: 13px; min-width: 300px; transition: background .2s, box-shadow .2s; }
.top-search:hover{ background: #fff; box-shadow: 0 0 0 2px #e3d2ff; }
.top-search svg{ width: 18px; height: 18px; }
.top-search .kbd{ margin-right: auto; }
.a-me{ border: 0; background: transparent; cursor: pointer; border-radius: 12px; padding: 4px 8px; font-family: inherit; }
.a-me:hover{ background: #f8f5fb; }
.a-me svg{ width: 16px; height: 16px; color: #a39cb0; }
.dot-n{ position: absolute; top: 4px; left: 4px; min-width: 17px; height: 17px; border-radius: 99px; background: var(--grad-danger); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff; }
@media (max-width: 1200px) { .top-search{ min-width: 0; } .top-search span{ display: none !important; } .top-search .kbd{ display: none; } }
@media (max-width: 980px) {
  .crumbs{ font-size: 14px; }
  .crumbs > a, .crumbs .sep-c, .crumbs a:not(:last-of-type){ display: none; }
  .crumbs .cur{ font-size: 15px; }
  .top-search{ width: 42px; padding: 0; justify-content: center; background: transparent; }
  .a-me{ padding: 2px; }
}

/* منوی کشویی */
.dd{ position: relative; }
.dd-menu{ position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 600; display: none; animation: fadeUp .18s var(--ease); }
.dd.open .dd-menu{ display: block; }
.dd-menu.notif{ width: 340px; max-width: calc(100vw - 20px); }
.dd-head{ padding: 10px 12px 8px; font-weight: 700; font-size: 14px; color: #343a40; border-bottom: 1px solid #f3eef7; margin-bottom: 4px; }
.dd-head small{ display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.dd-item{ display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; color: #4a4560; font-size: 14px; border: 0; background: none; cursor: pointer; text-align: right; font-family: inherit; }
.dd-item:hover{ background: #f6efff; color: #7a3fe4; text-decoration: none; }
.dd-item.danger:hover{ background: #ffeef2; color: #e0436d; }
.dd-item .ic{ width: 32px; height: 32px; border-radius: 10px; background: #f3eaff; color: #9a55ff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dd-item .ic svg{ width: 16px; height: 16px; }
.dd-item .ic.surgery{ background: #ffeef2; color: #e0436d; }
.dd-item .ic.task{ background: #fff4d6; color: #b7791f; }
.dd-item b{ display: block; font-size: 13px; font-weight: 700; }
.dd-item small{ color: var(--muted); font-size: 12px; }
.dd-empty{ padding: 22px 12px; text-align: center; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dd-empty svg{ width: 30px; height: 30px; color: #d6c2ef; }
.dd-foot{ display: flex; justify-content: space-between; border-top: 1px solid #f3eef7; margin-top: 4px; padding: 8px 10px 4px; font-size: 12px; font-weight: 700; }

/* جستجوی سریع (Ctrl+K) */
.palette-ov{ position: fixed; inset: 0; z-index: 1300; background: rgba(46, 26, 87, .35); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 12px 12px; animation: fadeIn .15s; }
.palette{ width: 100%; max-width: 620px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s var(--ease); display: flex; flex-direction: column; max-height: 76vh; }
.palette-in{ display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #f3eef7; }
.palette-in svg{ width: 20px; height: 20px; color: #9a55ff; flex-shrink: 0; }
.palette-in input{ flex: 1; border: 0; outline: 0; font-size: 16px; font-family: inherit; background: transparent; min-width: 0; }
.palette-list{ overflow-y: auto; padding: 6px; }
.pl-sec{ font-size: 11px; font-weight: 700; color: #a39cb0; padding: 10px 12px 4px; }
.pl-item{ display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #343a40; cursor: pointer; }
.pl-item.on, .pl-item:hover{ background: #f6efff; text-decoration: none; }
.pl-item .ic{ width: 34px; height: 34px; border-radius: 10px; background: #f8f5fb; color: #9a55ff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; }
.pl-item .ic svg{ width: 17px; height: 17px; }
.pl-item b{ display: block; font-size: 14px; }
.pl-item small{ color: var(--muted); font-size: 12px; direction: ltr; unicode-bidi: isolate; }
.pl-item .go{ margin-right: auto; color: #cfc4dc; }
.pl-item .go svg{ width: 16px; height: 16px; }
.palette-foot{ display: flex; gap: 14px; padding: 8px 16px; border-top: 1px solid #f3eef7; font-size: 11px; color: #a39cb0; }
@media (max-width: 640px) { .palette-ov{ padding: 0; align-items: stretch; } .palette{ max-height: none; border-radius: 0; } .palette-foot{ display: none; } }

/* منوی پایین موبایل (کادر مطب) */
.m-nav{ display: none; }
@media (max-width: 980px) {
  .menu-btn{ display: none !important; }
  .m-nav{ display: flex; position: fixed; bottom: 0; right: 0; left: 0; z-index: 260; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border-top: 1px solid #efe8f4; padding: 6px 4px calc(6px + var(--safe-bottom)); box-shadow: 0 -6px 20px rgba(80, 40, 140, .06); }
  .m-nav a, .m-nav button{ flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: #a39cb0; border: 0; background: none; font-family: inherit; padding: 4px 0; cursor: pointer; }
  .m-nav .ic{ position: relative; display: flex; }
  .m-nav .ic svg{ width: 23px; height: 23px; }
  .m-nav .ic .b{ position: absolute; top: -5px; left: -9px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--grad-danger); color: #fff; font-size: 10px; font-style: normal; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
  .m-nav a.on{ color: #9a55ff; }
  .m-nav a:hover{ text-decoration: none; }
  .m-nav a.m-cta{ flex: 0 0 64px; }
  .m-nav a.m-cta .ic{ width: 50px; height: 50px; border-radius: 16px; background: var(--grad-primary); color: #fff; align-items: center; justify-content: center; margin-top: -24px; border: 4px solid #fff; box-shadow: 0 8px 20px rgba(154, 85, 255, .4); }
  .a-content{ padding-bottom: calc(96px + var(--safe-bottom)); }
  
  .save-pill{ bottom: calc(80px + var(--safe-bottom)); }
}

/* مرحله درمان */
.stage-pill{ display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: #f3eaff; color: #8a47f0; }
.stage-pill i{ width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stage-pill.s1{ background: #f1f5f9; color: #64748b; }
.stage-pill.s3{ background: #fff4d6; color: #b7791f; }
.stage-pill.s4{ background: #e3f1fd; color: #047edf; }
.stage-pill.s5{ background: #e2f8f4; color: #07a68d; }

.js{ flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; min-width: 0; }
.js::before{ content: ''; position: absolute; top: 15px; right: 50%; width: 100%; height: 3px; background: #efe8f4; z-index: 0; }
.js:first-child::before{ display: none; }
.js.done::before, .js.cur::before{ background: var(--grad-primary); }
.js .dot{ position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 3px solid #e6dcef; color: #a39cb0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.js .dot svg{ width: 15px; height: 15px; }
.js.done .dot{ background: var(--grad-primary); border-color: transparent; color: #fff; }
.js.cur .dot{ border-color: #9a55ff; color: #9a55ff; box-shadow: 0 0 0 5px #f3eaff; animation: pulse 2.4s infinite; }
.js .t{ font-size: 12px; color: #8e8aa0; font-weight: 700; line-height: 1.4; }
.js.cur .t{ color: #7a3fe4; }

@media (max-width: 640px) {
  .js .t{ font-size: 10px; }
  .js .dot{ width: 28px; height: 28px; }
  .js::before{ top: 13px; }
  
  
}

/* خلاصه پرونده */
.pv-layout{ display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.pv-side{ position: sticky; top: 86px; }
@media (max-width: 1100px) { .pv-layout{ grid-template-columns: 1fr; } .pv-side{ position: static; } }

/* تقویم جراحی‌ها */
.ag-bar{ display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ag-range{ display: flex; align-items: center; gap: 6px; }
.ag-range b{ min-width: 170px; text-align: center; font-size: 14px; }
.ag-day{ margin-bottom: 18px; animation: fadeUp .35s var(--ease) both; }
.ag-dh{ display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ag-dh .d{ width: 46px; height: 50px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #efe8f4; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; color: #7a3fe4; flex-shrink: 0; }
.ag-dh .d b{ font-size: 18px; } .ag-dh .d small{ font-size: 10px; color: var(--muted); }
.ag-dh.today .d{ background: var(--grad-primary); color: #fff; box-shadow: 0 8px 18px rgba(154, 85, 255, .3); }
.ag-dh.today .d small{ color: rgba(255,255,255,.85); }
.ag-dh h3{ font-size: 15px; } .ag-dh .muted{ font-size: 12px; }
.ag-item{ display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px #f0e9f5; padding: 12px 14px; margin-bottom: 8px; margin-right: 56px; }
.ag-item .bar{ width: 4px; align-self: stretch; border-radius: 4px; background: #b66dff; flex-shrink: 0; }
.ag-item.completed .bar{ background: #07cdae; } .ag-item.cancelled .bar{ background: #fe7096; } .ag-item.cancelled{ opacity: .7; }
.ag-item b{ display: block; font-size: 14px; color: #343a40; }
.ag-item small{ color: var(--muted); font-size: 12px; }
.ag-item .acts{ display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .ag-item{ margin-right: 0; flex-wrap: wrap; } .ag-item .acts{ width: 100%; } .ag-item .acts .btn{ flex: 1; } }
.loc-sum{ display: flex; flex-wrap: wrap; gap: 6px; }

/* داشبورد آرام */
.dash-head{ display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-head h1{ font-size: 22px; }
.dash-head p{ margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.dash-head .acts{ display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .dash-head .acts{ width: 100%; } .dash-head .acts .btn{ flex: 1; } .dash-head h1{ font-size: 19px; } }
.agenda-list .ai{ display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f5f1f8; color: inherit; }
.agenda-list .ai:last-child{ border-bottom: 0; }
.agenda-list .ai:hover{ text-decoration: none; }
.agenda-list .ai:hover b{ color: #9a55ff; }
.agenda-list .ai .ic{ width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.agenda-list .ai .ic svg{ width: 19px; height: 19px; }
.agenda-list .ai .ic.s{ background: #ffeef2; color: #e0436d; }
.agenda-list .ai .ic.t{ background: #fff4d6; color: #b7791f; }
.agenda-list .ai .ic.n{ background: #e2f8f4; color: #07a68d; }
.agenda-list .ai b{ display: block; font-size: 14px; color: #343a40; }
.agenda-list .ai small{ color: var(--muted); font-size: 12px; }
.agenda-list .ai .when{ font-size: 12px; font-weight: 700; color: #8e8aa0; white-space: nowrap; }
.agenda-list .ai .when.late{ color: #e0436d; }
details.card > summary{ list-style: none; }
details.card > summary::-webkit-details-marker{ display: none; }
.text-red.btn{ color: #e0436d; }
.agenda-list .ai > svg{ width: 16px; height: 16px; color: #cfc4dc; }

/* =========================================================
   نسخه ۳ — ساده‌سازی رابط (اولویت با این بخش است)
   ========================================================= */
@media (min-width: 981px) { .a-top .menu-btn{ display: none !important; } }
.a-content{ padding-top: 24px; }
.card{ box-shadow: 0 0 0 1px #efe9f5; }
.link-btn{ border: 0; background: none; padding: 0; color: #9a55ff; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover{ text-decoration: underline; }
.link-btn svg{ width: 15px; height: 15px; }
.link-btn.danger{ color: #c4b5d6; font-weight: 400; margin: 0 auto; }
.link-btn.danger:hover{ color: #e0436d; }

/* ---------- سربرگ بیمار ---------- */
.ph{ background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px #efe9f5; margin-bottom: 20px; animation: fadeUp .35s var(--ease) both; }
.ph-top{ display: flex; align-items: center; gap: 16px; padding: 18px 20px 14px; }
.ph-av{ width: 52px; height: 52px; border-radius: 16px; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; flex-shrink: 0; }
.ph-id{ flex: 1; min-width: 0; }
.ph-name{ font-size: 20px; color: #2c2e3e; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-meta{ display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: #8e8aa0; }
.ph-meta a{ color: inherit; }
.ph-meta a:hover{ color: #9a55ff; }
.ph-sg{ display: inline-flex; align-items: center; gap: 4px; color: #e0436d; font-weight: 700; }
.ph-sg svg{ width: 14px; height: 14px; }
.ph-actions{ display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.ph-prog{ display: flex; gap: 6px; padding: 0 20px 14px; }
.pp{ flex: 1; min-width: 0; }
.pp i{ display: block; height: 5px; border-radius: 99px; background: #f0eaf6; }
.pp.done i{ background: #d6bdfc; }
.pp.cur i{ background: var(--grad-primary); }
.pp span{ display: block; font-size: 11px; color: #b3abc2; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp.done span{ color: #8e8aa0; }
.pp.cur span{ color: #7a3fe4; font-weight: 700; }
.ph-tabs{ display: flex; gap: 2px; padding: 0 12px; border-top: 1px solid #f3eef7; overflow-x: auto; scrollbar-width: none; }
.ph-tabs::-webkit-scrollbar{ display: none; }
.ph-tabs a{ display: inline-flex; align-items: center; gap: 7px; padding: 13px 12px 11px; font-size: 14px; font-weight: 700; color: #8e8aa0; border-bottom: 2px solid transparent; white-space: nowrap; }
.ph-tabs a svg{ width: 17px; height: 17px; }
.ph-tabs a em{ font-style: normal; font-size: 11px; background: #f3eef7; color: #8e8aa0; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.ph-tabs a:hover{ color: #9a55ff; text-decoration: none; }
.ph-tabs a.on{ color: #7a3fe4; border-bottom-color: #9a55ff; }
.ph-tabs a.on em{ background: #f3eaff; color: #7a3fe4; }
@media (max-width: 760px) {
  .ph-top{ flex-wrap: wrap; padding: 14px 14px 12px; gap: 12px; }
  .ph-av{ width: 44px; height: 44px; font-size: 18px; border-radius: 13px; }
  .ph-name{ font-size: 17px; }
  .ph-actions{ width: 100%; }
  .ph-actions .btn{ flex: 1; }
  .ph-prog{ padding: 0 14px 12px; gap: 4px; }
  .pp span{ display: none; }
  .pp.cur span{ display: block; position: absolute; }
  .ph-prog{ position: relative; padding-bottom: 28px; }
  .ph-tabs{ padding: 0 4px; }
  .ph-tabs a{ padding: 12px 10px 10px; font-size: 13px; }
  .ph-tabs a svg{ display: none; }
}

/* ---------- خلاصه پرونده ---------- */
.ov-title{ font-size: 15px; color: #343a40; margin: 0 0 6px; }
.ov{ padding: 18px 20px 6px; }
.ov-row{ display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-top: 1px solid #f5f1f8; }
.ov-title + .ov-row{ border-top: 0; }
.ov-row.off{ opacity: .55; }
.ov-ic{ width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ov-ic svg{ width: 19px; height: 19px; }
.ov-ic.violet{ background: #f3eaff; color: #9a55ff; } .ov-ic.pink{ background: #ffeef2; color: #e0436d; }
.ov-ic.blue{ background: #e3f1fd; color: #047edf; } .ov-ic.teal{ background: #e2f8f4; color: #07a68d; } .ov-ic.amber{ background: #fff4d6; color: #b7791f; }
.ov-body{ flex: 1; min-width: 0; }
.ov-h{ display: inline-block; font-weight: 700; font-size: 15px; color: #343a40; margin-bottom: 2px; }
a.ov-h:hover{ color: #9a55ff; }
.ov-body p{ margin: 0; font-size: 13px; color: #8e8aa0; }
.ov-act{ display: flex; align-items: center; gap: 8px; flex-shrink: 0; align-self: center; }
.ov-go{ width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #c4b5d6; }
.ov-go:hover{ background: #f6efff; color: #9a55ff; }
.ov-go svg{ width: 18px; height: 18px; }
.ov-thumbs{ display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ov-thumbs button{ width: 56px; height: 56px; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: #f6f0fb; }
.ov-thumbs img{ width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 560px) { .ov{ padding: 14px 14px 4px; } .ov-row{ gap: 10px; } .ov-ic{ width: 36px; height: 36px; } .ov-act .btn span, .ov-act .btn{ font-size: 12px; } }
.note-form{ display: flex; gap: 8px; margin: 8px 0 6px; }
.note-form .input{ min-height: 42px; }
.note{ padding: 12px 0; border-top: 1px solid #f5f1f8; }
.note p{ margin: 0 0 4px; font-size: 14px; color: #4a4560; }
.note small{ color: #b3abc2; font-size: 12px; }
.side-h{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.side-h h3{ font-size: 15px; }
.dl{ display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.dl dt{ color: #8e8aa0; }
.dl dd{ margin: 0; text-align: left; color: #343a40; font-weight: 700; }
.dl dd a{ color: inherit; }
.side-sub{ font-size: 12px; font-weight: 700; color: #a39cb0; margin: 14px 0 6px; }
.side-p{ font-size: 13px; color: #4a4560; margin: 0; }
details.more{ margin-top: 6px; border-top: 1px solid #f5f1f8; }
details.more summary{ cursor: pointer; font-size: 13px; color: #9a55ff; font-weight: 700; padding: 10px 0 2px; list-style: none; }
details.more summary::-webkit-details-marker{ display: none; }

/* ---------- فهرست بیماران ---------- */
.pl-wrap{ max-width: 1180px; }
.pl-search{ display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px #efe9f5; padding: 6px 6px 6px 6px; margin-bottom: 14px; transition: box-shadow .2s; }
.pl-search:focus-within{ box-shadow: 0 0 0 2px #d6bdfc; }
.pl-search-ic{ display: flex; color: #b9aecb; padding-right: 10px; }
.pl-search-ic svg{ width: 20px; height: 20px; }
.pl-search input{ flex: 1; min-width: 0; border: 0; outline: 0; font-size: 15px; height: 44px; background: transparent; font-family: inherit; }
.pl-search input::-webkit-search-cancel-button{ display: none; }
.pl-clear{ color: #b9aecb; display: flex; padding: 6px; }
.pl-clear svg{ width: 18px; height: 18px; }
.pl-filter-btn{ display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 12px; border: 0; background: #f6efff; color: #7a3fe4; font-weight: 700; font-family: inherit; cursor: pointer; flex-shrink: 0; }
.pl-filter-btn svg{ width: 18px; height: 18px; }
.pl-filter-btn b{ background: #9a55ff; color: #fff; border-radius: 99px; font-size: 11px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.pl-filter-btn.on{ background: var(--grad-primary); color: #fff; }
.pl-filter-btn.on b{ background: #fff; color: #7a3fe4; }
.pl-stages{ display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid #ece6f1; margin-bottom: 12px; }
.pl-stages::-webkit-scrollbar{ display: none; }
.pl-stages a{ display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; color: #8e8aa0; font-weight: 700; font-size: 14px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pl-stages a i{ width: 8px; height: 8px; border-radius: 50%; background: #c9bfd6; }
.pl-stages a.st2 i{ background: #9a55ff; } .pl-stages a.st3 i{ background: #ffb300; } .pl-stages a.st4 i{ background: #047edf; } .pl-stages a.st5 i{ background: #07cdae; }
.pl-stages a small{ font-size: 11px; background: #f3eef7; color: #a39cb0; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.pl-stages a:hover{ color: #7a3fe4; text-decoration: none; }
.pl-stages a.on{ color: #7a3fe4; border-bottom-color: #9a55ff; }
.pl-stages a.on small{ background: #f3eaff; color: #7a3fe4; }
.pl-bar{ display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; min-height: 34px; }
.pl-chips{ display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.pl-sort select{ border: 0; background: transparent; font-family: inherit; font-size: 13px; color: #6c7293; font-weight: 700; cursor: pointer; padding: 6px 4px; outline: none; }
.plist{ background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px #efe9f5; overflow: hidden; }
.plist-head, .pi{ display: grid; grid-template-columns: minmax(200px, 1.4fr) 150px minmax(160px, 1.2fr) minmax(120px, 1fr) 28px; gap: 14px; align-items: center; padding: 0 18px; }
.plist-head{ height: 40px; font-size: 12px; font-weight: 700; color: #a39cb0; border-bottom: 1px solid #f3eef7; background: #fcfbfe; }
.pi{ min-height: 66px; border-bottom: 1px solid #f5f1f8; color: inherit; transition: background .15s; }
.pi:last-child{ border-bottom: 0; }
.pi:hover{ background: #faf7fd; text-decoration: none; }
.pi:hover .pi-go{ color: #9a55ff; transform: translateX(-3px); }
.pi-who{ display: flex; align-items: center; gap: 12px; min-width: 0; }
.pi-av{ width: 38px; height: 38px; border-radius: 50%; background: #f3eaff; color: #8a47f0; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.pi-name{ min-width: 0; }
.pi-name b, .pi-sg b{ display: block; font-size: 14px; color: #343a40; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-name small, .pi-sg small{ display: block; font-size: 12px; color: #a39cb0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-name small.ltr{ text-align: right; }
.pi-sg b{ font-weight: 400; font-size: 13px; }
.pi-flags{ display: flex; flex-wrap: wrap; gap: 4px; }
.pi-flags .chip{ font-size: 11px; line-height: 20px; padding: 0 8px; }
.pi-go{ color: #d6cce2; display: flex; transition: all .2s var(--ease); }
.pi-go svg{ width: 18px; height: 18px; }
.pl-foot{ display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pl-foot .pager{ margin: 0; align-items: center; }
@media (max-width: 860px) {
  .plist-head{ display: none; }
  .pi{ grid-template-columns: 1fr auto; grid-template-areas: "who go" "stage go" "sg go" "flags go"; gap: 4px 10px; padding: 12px 14px; }
  .pi-who{ grid-area: who; } .pi-stage{ grid-area: stage; padding-right: 50px; } .pi-sg{ grid-area: sg; padding-right: 50px; } .pi-flags{ grid-area: flags; padding-right: 50px; } .pi-go{ grid-area: go; }
  .pi-sg:has(small.muted:only-child){ display: none; }
  .pi-flags:empty{ display: none; }
  .pl-filter-btn span{ display: none; }
  .pl-filter-btn{ padding: 0 12px; }
}

/* ---------- کشوی فیلتر ---------- */
.pf-drawer{ position: fixed; top: 0; bottom: 0; left: 0; width: min(440px, 100vw); background: #fff; z-index: 960; transform: translateX(-105%); transition: transform .28s var(--ease); box-shadow: var(--shadow-lg); visibility: hidden; }
.pf-drawer.open{ transform: none; visibility: visible; }
.pf-drawer form{ height: 100%; display: flex; flex-direction: column; }
.pf-dh{ display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #f3eef7; }
.pf-dh h3{ font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pf-dh h3 svg{ width: 18px; height: 18px; color: #9a55ff; }
.pf-db{ flex: 1; overflow-y: auto; padding: 4px 20px 10px; }
.pf-df{ display: flex; gap: 8px; padding: 12px 20px calc(12px + var(--safe-bottom)); border-top: 1px solid #f3eef7; }
.pf-sec{ padding: 14px 0 6px; border-bottom: 1px solid #f5f1f8; }
.pf-sec:last-child{ border-bottom: 0; }
.pf-sec h4{ font-size: 13px; color: #6c7293; margin: 0 0 10px; display: flex; align-items: center; gap: 6px; }
.pf-sec h4 svg{ width: 16px; height: 16px; color: #b66dff; }
.pf-sec .field{ margin-bottom: 10px; }
.pf-sec .field > span{ font-size: 12px; }
.pf-sec .field input, .pf-sec .field select{ min-height: 40px; padding: 6px 10px; font-size: 14px; }
.pf-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.pf-quick{ display: flex; flex-wrap: wrap; gap: 6px; }
.pf-quick a{ font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: #f6efff; color: #7a3fe4; }
.pf-quick a:hover{ background: #ecdcff; text-decoration: none; }
.choice.pf-sm span{ padding: 5px 10px; font-size: 12px; }
.pf-scrim{ display: none; }
.pf-scrim.open{ display: block; position: fixed; inset: 0; background: rgba(46, 26, 87, .3); z-index: 950; animation: fadeIn .2s; }

/* ============================================================
   صندوق کارها و قوانین خودکار
   ============================================================ */
.chip-violet{ background: #f3eaff; color: #7a3fe4; }
.chip svg{ width: 13px; height: 13px; }
@media (min-width: 981px) { .hide-desktop{ display: none !important; } }
.tk-bar{ display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.tk-search{ flex: 1; min-width: 220px; max-width: 420px; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 0 12px; box-shadow: 0 0 0 1px #ece3f4; }
.tk-search svg{ width: 18px; height: 18px; color: #a59bb8; flex-shrink: 0; }
.tk-search input{ border: 0; outline: 0; background: transparent; padding: 10px 0; width: 100%; font: inherit; font-size: 14px; }
.tk-search:focus-within{ box-shadow: 0 0 0 2px #c9a6ff; }
.tk-group{ margin-bottom: 20px; }
.tk-gh{ display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #6c7293; margin: 0 4px 10px; }
.tk-gh svg{ width: 17px; height: 17px; }
.tk-gh.late{ color: #e0436d; }
.tk-gh.today{ color: #7a3fe4; }
.tk{ display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 0 0 1px #f0e9f5; border-right: 4px solid transparent; transition: opacity .28s, transform .28s; animation: fadeIn .3s var(--ease) both; }
.tk.late{ border-right-color: #ff8fab; }
.tk.hot{ border-right-color: #e0436d; }
.tk.out{ opacity: 0; transform: translateX(-24px); }
.tk-due{ min-width: 56px; text-align: center; border-radius: 12px; padding: 7px 4px; background: #f3eaff; color: #8a47f0; font-weight: 700; font-size: 11px; line-height: 1.4; }
.tk-due b{ display: block; font-size: 18px; }
.tk.late .tk-due{ background: #ffeef2; color: #e0436d; }
.tk-body{ flex: 1; min-width: 0; }
.tk-title{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-title b{ font-size: 15px; color: #343a40; }
.tk-who{ display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-top: 6px; font-size: 13px; }
.tk-who svg{ width: 14px; height: 14px; vertical-align: -2px; }
.tk-who a.muted{ color: #6c7293; }
.tk-name{ display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #4a3f6b; }
.tk-name .av{ width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #da8cff, #9a55ff); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.tk-ins{ margin: 8px 0 0; font-size: 13px; color: #6c7293; background: #faf7fd; border-radius: 10px; padding: 8px 10px; line-height: 1.8; }
.tk-res{ margin-top: 8px; font-size: 13px; background: #f0fbf8; color: #2b6f62; border-radius: 10px; padding: 8px 10px; }
.tk-foot{ display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tk-acts{ display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .tk{ padding: 12px; gap: 10px; }
  .tk-due{ min-width: 46px; }
  .tk-foot{ flex-direction: column-reverse; align-items: stretch; }
  .tk-src{ align-self: flex-start; }
  .tk-acts .btn:not(.btn-icon){ flex: 1; }
  .tk-search{ max-width: none; }
}

/* قوانین */
.rule{ display: flex; gap: 14px; align-items: flex-start; padding: 14px 4px; border-bottom: 1px solid #f3eef8; }
.rule:last-child{ border-bottom: 0; }
.rule .ic{ width: 42px; height: 42px; border-radius: 12px; background: #f3eaff; color: #8a47f0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rule .ic svg{ width: 20px; height: 20px; }
.rule.off{ opacity: .55; }
.rule .grow b{ font-size: 15px; }
.rule .when{ font-size: 13px; color: #6c7293; margin-top: 3px; }
.rule .stat{ font-size: 12px; color: #a59bb8; margin-top: 4px; }
.rule .acts{ display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.presets{ display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.preset{ text-align: right; border: 1.5px dashed #e3d4f5; background: #fdfbff; border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; transition: border-color .2s, background .2s; }
.preset:hover{ border-color: #b88af5; background: #f8f2ff; }
.preset b{ display: flex; align-items: center; gap: 6px; font-size: 14px; color: #4a3f6b; }
.preset b svg{ width: 16px; height: 16px; color: #9a55ff; }
.preset small{ display: block; color: #8c84a3; margin-top: 4px; font-size: 12px; }
.preset.used{ opacity: .5; cursor: default; }
.rule-sentence{ background: #f8f2ff; border-radius: 12px; padding: 12px 14px; font-size: 14px; color: #5b3fa0; line-height: 1.9; margin-bottom: 14px; }
.rule-sentence b{ color: #7a3fe4; }
.inline-fields{ display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
@media (max-width: 560px) { .rule{ flex-wrap: wrap; } .rule .acts{ width: 100%; justify-content: flex-end; } }
.ph-open-tasks{ background: #faf7fd; border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; font-size: 13px; }
.ph-open-tasks small{ display: block; font-weight: 700; color: #8c84a3; margin-bottom: 4px; }
.ph-open-tasks svg{ width: 14px; height: 14px; vertical-align: -2px; color: #9a55ff; }
/* هر عنصری با ویژگی hidden واقعاً پنهان شود (حتی اگر کلاسش display داشته باشد) */
[hidden]{ display: none !important; }

/* ============================================================
   عکس‌ها (گالری)
   ============================================================ */
.ga-wrap { max-width: 1280px; }
.ga-view { padding: 3px; }
.ga-view a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; color: #8e8aa0; }
.ga-view a svg { width: 17px; height: 17px; }
.ga-view a:hover { text-decoration: none; color: #7a3fe4; }
.ga-view a.on { background: #fff; color: #7a3fe4; box-shadow: 0 1px 4px rgba(80, 40, 140, .12); }
.ga-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ga-dot.pre_op { background: #ffb300 !important; }
.ga-dot.post_op { background: #07cdae !important; }
.ga-when { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; }
.ga-when::-webkit-scrollbar { display: none; }
.ga-when .lbl { display: inline-flex; align-items: center; gap: 5px; color: #a39cb0; font-size: 12px; font-weight: 700; white-space: nowrap; margin-left: 4px; }
.ga-when .lbl svg { width: 14px; height: 14px; }
.ga-when a { white-space: nowrap; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; color: #6c7293; background: #fff; box-shadow: 0 0 0 1px #ece3f4; transition: all .15s; }
.ga-when a:hover { text-decoration: none; color: #7a3fe4; box-shadow: 0 0 0 1px #c9a6ff; }
.ga-when a.on { background: linear-gradient(to left, #da8cff, #9a55ff); color: #fff; box-shadow: 0 4px 12px rgba(154, 85, 255, .3); }

.ga-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ga-tile { position: relative; margin: 0; border-radius: 16px; overflow: hidden; background: #f3eef8; box-shadow: 0 1px 3px rgba(60, 30, 110, .08); aspect-ratio: 4 / 5; animation: fadeIn .35s var(--ease) both; }
.ga-img { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.ga-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.ga-tile:hover .ga-img img { transform: scale(1.05); }
.ga-badge { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; color: #fff; backdrop-filter: blur(6px); pointer-events: none; }
.ga-badge.pre { background: rgba(255, 159, 0, .9); }
.ga-badge.post { background: rgba(7, 175, 150, .9); }
.ga-hid { position: absolute; top: 10px; left: 10px; width: 26px; height: 26px; border-radius: 50%; background: rgba(30, 20, 50, .55); color: #fff; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ga-hid svg { width: 14px; height: 14px; }
.ga-tile figcaption { position: absolute; inset: auto 0 0 0; padding: 30px 12px 10px; background: linear-gradient(to top, rgba(25, 15, 45, .82), rgba(25, 15, 45, 0)); color: #fff; pointer-events: none; }
.ga-name { display: block; color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; }
.ga-name:hover { color: #fff; text-decoration: underline; }
.ga-tile figcaption small { display: block; font-size: 11px; opacity: .85; margin-top: 2px; }

.ga-pts { display: grid; gap: 14px; }
.ga-pt { padding: 16px; margin: 0; }
.ga-pt header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ga-who { display: flex; align-items: center; gap: 10px; color: inherit; min-width: 0; }
.ga-who:hover { text-decoration: none; }
.ga-who b { display: block; font-size: 15px; color: #343a40; }
.ga-who small { display: flex; align-items: center; gap: 4px; color: #8c84a3; font-size: 12px; }
.ga-who small svg { width: 13px; height: 13px; }
.ga-acts { display: flex; gap: 6px; }
.ga-rows { display: grid; gap: 10px; }
.ga-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; }
.ga-rl { font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 10px; text-align: center; }
.ga-rl.pre { background: #fff4e0; color: #c77700; }
.ga-rl.post { background: #e3faf5; color: #058a74; }
.ga-rl small { opacity: .7; }
.ga-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.ga-th { position: relative; flex: 0 0 auto; width: 104px; height: 104px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #f3eef8; }
.ga-th img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ga-th:hover img { transform: scale(1.06); }
.ga-th span { position: absolute; inset: auto 0 0 0; font-size: 10px; color: #fff; padding: 12px 6px 4px; background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ga-none { padding: 8px 0; }
.ga-pager { justify-content: center; margin-top: 18px; display: flex; align-items: center; gap: 10px; }

/* مقایسه قبل و بعد */
.modal.cmp-modal { max-width: 1100px; width: calc(100vw - 32px); }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cmp-pane { min-width: 0; }
.cmp-h { font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 10px; display: inline-block; margin-bottom: 8px; }
.cmp-h.pre { background: #fff4e0; color: #c77700; }
.cmp-h.post { background: #e3faf5; color: #058a74; }
.cmp-img { background: #1d1530; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; }
.cmp-img img { width: 100%; height: 100%; object-fit: contain; }
.cmp-meta { font-size: 13px; margin: 8px 2px; color: #4a3f6b; min-height: 20px; }
.cmp-meta small { display: block; color: #8c84a3; }
.cmp-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.cmp-strip button { flex: 0 0 auto; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; opacity: .6; background: none; }
.cmp-strip button.on { border-color: #9a55ff; opacity: 1; }
.cmp-strip img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
  .ga-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ga-tile { border-radius: 12px; }
  .ga-row { grid-template-columns: 1fr; gap: 6px; }
  .ga-rl { justify-self: start; }
  .ga-th { width: 88px; height: 88px; }
  .cmp { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cmp-strip button { width: 44px; height: 44px; }
}
.tk-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tk-who-chip { background: #eef3ff; color: #3f5bd8; }
.tk-who-chip.doc { background: #fdeef6; color: #c2367a; }
.tk-whos { margin-bottom: 8px; }
.tk-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-right: 4px; border-radius: 99px; background: #ffe1e9; color: #e0436d; font-size: 11px; line-height: 18px; text-align: center; }
.ga-when a.on .tk-n { background: rgba(255,255,255,.3); color: #fff; }

/* ============================================================
   ارزیابی عملکرد منشی
   ============================================================ */
.ev-wrap { max-width: 1180px; }
.txt-danger { color: #e0436d; font-weight: 700; }
.ev-hero { display: flex; align-items: center; gap: 22px; padding: 22px; }
.ev-ring { --p: 0; --c: #9a55ff; width: 118px; height: 118px; flex-shrink: 0; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), #f1ebf7 0); display: flex; align-items: center; justify-content: center; }
.ev-ring > div { width: 92px; height: 92px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ev-ring b { font-size: 30px; line-height: 1.1; color: #343a40; }
.ev-ring small { font-size: 11px; color: #a39cb0; }
.ev-hero-txt h2 { margin: 4px 0 6px; font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-hero-txt p { margin: 0; line-height: 1.9; }
.ev-grade { display: inline-block; font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 99px; background: #f3eef8; color: #8c84a3; }
.ev-grade.good { background: #e3faf5; color: #058a74; }
.ev-grade.ok { background: #e6f2ff; color: #0464b5; }
.ev-grade.mid { background: #fff4e0; color: #c77700; }
.ev-grade.bad { background: #ffe9ef; color: #d12c5c; }
.ev-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-bottom: 18px; }
.ev-cols > .card { margin: 0; }
.ev-bars { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding: 8px 2px 0; border-bottom: 1px solid #f0e9f5; }
.ev-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; position: relative; }
.ev-bar i { display: block; width: 100%; max-width: 22px; border-radius: 6px 6px 2px 2px; background: linear-gradient(to top, #9a55ff, #da8cff); transition: opacity .2s; }
.ev-bar i.zero { background: #ece4f4; }
.ev-bar:hover i { opacity: .75; }
.ev-bar small { position: absolute; bottom: -20px; font-size: 10px; color: #b2abc1; }
.ev-bars.dense { gap: 2px; }
.ev-mini { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 30px; font-size: 13px; color: #6c7293; }
.ev-mini svg { width: 15px; height: 15px; vertical-align: -3px; color: #9a55ff; }
.ev-rule { margin-bottom: 14px; }
.ev-rule-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.ev-rule-h span { color: #8c84a3; font-size: 12px; }
.ev-track { height: 8px; border-radius: 99px; background: #f1ebf7; overflow: hidden; }
.ev-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(to left, #1bcfb4, #07a68d); }
.ev-recent { display: grid; gap: 2px; }
.ev-rc { display: flex; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #f5f0f9; font-size: 13px; }
.ev-rc:last-child { border-bottom: 0; }
.ev-rc .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.ev-rc .dot.ok { background: #07cdae; } .ev-rc .dot.late { background: #ffb300; } .ev-rc .dot.bad { background: #e0436d; }
.ev-rc small { display: block; margin-top: 2px; }
.ev-note { margin: 5px 0 0; background: #faf7fd; border-radius: 8px; padding: 6px 9px; color: #5b5470; font-size: 12px; }
.ev-table { display: grid; }
.ev-tr { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 8px; align-items: center; padding: 11px 10px; border-radius: 10px; color: inherit; font-size: 13px; }
.ev-tr.head { color: #a39cb0; font-size: 12px; font-weight: 700; }
a.ev-tr:hover { background: #faf7fd; text-decoration: none; }
.ev-tr.on { background: #f3eaff; }
@media (max-width: 900px) { .ev-cols { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .ev-hero { flex-direction: column; text-align: center; padding: 18px; }
  .ev-hero-txt h2 { justify-content: center; }
  .ev-tr { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .ev-tr > span:nth-child(5), .ev-tr > span:nth-child(6) { display: none; }
  .ev-bars { height: 130px; }
}
.ev-wrap > .card, .ev-wrap > .kpi-grid, .ev-wrap > .ev-cols { margin-bottom: 18px; }
.ev-wrap .kpi-grid { margin-top: 0; }
.ev-mini.flat { margin-top: 8px; }
.ev-pick-h { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 6px 0 14px; color: #4a3f6b; }
.ev-pick-h svg { width: 20px; height: 20px; color: #9a55ff; }
.ev-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ev-card { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 18px; color: inherit; box-shadow: 0 0 0 1px #f0e9f5; transition: box-shadow .2s, transform .2s; }
.ev-card:hover { text-decoration: none; box-shadow: 0 0 0 2px #c9a6ff, 0 10px 24px rgba(120, 60, 200, .1); transform: translateY(-2px); }
.ev-card.former { opacity: .7; }
.ev-av { width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0; background: linear-gradient(135deg, #da8cff, #9a55ff); color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ev-card.former .ev-av { background: #c9bfd6; }
.ev-card-b { flex: 1; min-width: 0; }
.ev-card-b > b { display: block; font-size: 16px; color: #343a40; }
.ev-card-b > small { display: block; color: #a39cb0; font-size: 12px; margin-top: 2px; }
.ev-card-s { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: #8c84a3; }
.ev-card-s b { color: #4a3f6b; font-size: 14px; }
.ev-card-s .txt-danger b { color: #e0436d; }
.ev-card-score { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; color: #c9bfd6; }
.ev-card-score svg { width: 18px; height: 18px; }
@media (max-width: 480px) { .ev-pick { grid-template-columns: 1fr; } .ev-card { padding: 14px; } }
.auth-tabs { margin-bottom: 18px; background: #f4eef8; }
.auth-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.auth-tabs button svg { width: 16px; height: 16px; }
.auth-tabs button.on { color: #7a3fe4; }
.auth-hint { display: block; font-size: 12px; margin: -4px 2px 12px; line-height: 1.8; }
.bottom-nav.has-file a { font-size: 10px; }

/* ============================================================
   سامانه یکپارچه: نوبت‌دهی درون پنل + کارت حساب بیمار
   ============================================================ */
.bk-root { min-height: 60vh; }
.bk-root .page-title { margin-bottom: 18px; }
.acc-card .side-sub svg { width: 15px; height: 15px; vertical-align: -3px; color: #9a55ff; }
.acc-who { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.acc-who b { display: block; font-size: 14px; }
.acc-who small { color: #8c84a3; font-size: 12px; }
.acc-av { width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, #7fd3ff, #047edf); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.acc-apps { display: grid; gap: 4px; margin-bottom: 4px; }
.acc-app { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 6px 8px; background: #faf7fd; border-radius: 8px; }
.acc-link { display: flex; gap: 6px; margin: 8px 0 4px; }
.acc-link .input { flex: 1; min-width: 0; }
.file-card svg { width: 22px; height: 22px; color: #9a55ff; }

/* ============================================================
   صف بارگذاری با نوار پیشرفت
   ============================================================ */
.upq { display: grid; gap: 8px; margin-top: 12px; }
.upq:empty { display: none; }
.upq-row { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 14px; padding: 10px; box-shadow: 0 0 0 1px #f0e9f5; animation: fadeIn .25s var(--ease) both; }
.upq-th { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #f3eef8; }
.upq-main { flex: 1; min-width: 0; }
.upq-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.upq-pct { font-weight: 700; color: #7a3fe4; font-size: 13px; }
.upq-bar { height: 8px; border-radius: 99px; background: #f1ebf7; overflow: hidden; margin: 6px 0 4px; }
.upq-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(to left, #da8cff, #9a55ff); transition: width .25s ease; }
.upq-row.busy .upq-bar i { background-size: 28px 28px; background-image: linear-gradient(45deg, rgba(255,255,255,.25) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.25) 50%, rgba(255,255,255,.25) 75%, transparent 75%), linear-gradient(to left, #da8cff, #9a55ff); animation: upqStripe .8s linear infinite; }
@keyframes upqStripe { from { background-position: 28px 0, 0 0; } to { background-position: 0 0, 0 0; } }
.upq-row.ok .upq-bar i { background: linear-gradient(to left, #1bcfb4, #07a68d); }
.upq-row.ok .upq-st, .upq-row.ok .upq-pct { color: #058a74; }
.upq-row.err .upq-bar i { background: #ff8fab; }
.upq-row.err .upq-st { color: #d12c5c; font-weight: 600; }
.upq-retry { margin-top: 4px; }
.upq-size { font-size: 11px; }

/* ============================================================
   عکس‌برداری
   ============================================================ */
.cam-wrap { max-width: 720px; margin: 0 auto; display: grid; gap: 14px; }
.cam-wrap .card { margin: 0; }
.cam-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 15px; }
.cam-n { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #da8cff, #9a55ff); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cam-picked { display: flex; align-items: center; gap: 12px; background: #f8f2ff; border-radius: 14px; padding: 10px 12px; }
.cam-picked b { display: block; font-size: 15px; }
.cam-av { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #da8cff, #9a55ff); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cam-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 0 12px; box-shadow: 0 0 0 1px #e8def3; }
.cam-search:focus-within { box-shadow: 0 0 0 2px #c9a6ff; }
.cam-search svg { width: 18px; height: 18px; color: #a59bb8; }
.cam-search input { border: 0; outline: 0; background: transparent; padding: 12px 0; width: 100%; font: inherit; font-size: 15px; }
.cam-results { display: grid; gap: 4px; margin-top: 8px; }
.cam-res { display: flex; align-items: center; gap: 10px; text-align: right; background: #fff; border: 0; border-radius: 12px; padding: 8px; cursor: pointer; font: inherit; color: inherit; }
.cam-res:hover, .cam-res:focus-visible { background: #f8f2ff; outline: 0; }
.cam-res b { display: block; font-size: 14px; }
.cam-res small { color: #8c84a3; font-size: 12px; }
.cam-res .cam-av { width: 34px; height: 34px; font-size: 14px; }
.cam-none { padding: 10px; }
.cam-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.cam-recent .chip { cursor: pointer; border: 0; font: inherit; font-size: 12px; }
.cam-cat button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; font-size: 15px; }
.cam-meta { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 12px; }
.cam-shoot { text-align: center; }
.cam-shoot .cam-h { justify-content: flex-start; }
.cam-hint { margin: 0 0 14px; }
.cam-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cam-shutter { width: 150px; height: 150px; border-radius: 50%; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; font: inherit; font-weight: 700; font-size: 14px;
  background: radial-gradient(circle at 30% 30%, #e6a8ff, #9a55ff 70%); box-shadow: 0 0 0 8px #f1e6ff, 0 14px 30px rgba(154, 85, 255, .35); transition: transform .15s, box-shadow .2s; }
.cam-shutter svg { width: 46px; height: 46px; }
.cam-shutter:active { transform: scale(.95); }
.cam-shutter:disabled { background: #d9cfe6; box-shadow: 0 0 0 8px #f3eef8; cursor: not-allowed; }
.cam-sum { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 18px; padding: 10px 12px; background: #f8f2ff; border-radius: 12px; font-size: 13px; text-align: right; }
.cam-shoot .upq { text-align: right; }
.cam-live { position: fixed; inset: 0; z-index: 2000; background: #000; display: flex; align-items: center; justify-content: center; }
.cam-live video { width: 100%; height: 100%; object-fit: contain; }
.cam-live-top { position: absolute; top: 0; inset-inline: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; color: #fff; background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent); font-size: 14px; }
.cam-x, .cam-ic { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cam-x svg, .cam-ic svg { width: 22px; height: 22px; }
.cam-live-bar { position: absolute; bottom: 0; inset-inline: 0; display: flex; justify-content: space-around; align-items: center; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(0,0,0,.65), transparent); }
.cam-big { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; transition: transform .1s; }
.cam-big:active { transform: scale(.9); background: #fff; }
.cam-count { min-width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.18); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: camFlash .35s ease-out; }
@keyframes camFlash { from { opacity: .8; } to { opacity: 0; } }
@media (max-width: 560px) { .cam-meta { grid-template-columns: 1fr; } .cam-shutter { width: 132px; height: 132px; } }
.cam-more { margin-top: 12px; }
.cam-more summary { cursor: pointer; list-style: none; font-size: 13px; color: #6c7293; padding: 8px 2px; display: flex; align-items: center; gap: 6px; }
.cam-more summary::-webkit-details-marker { display: none; }
.cam-more summary svg { width: 15px; height: 15px; color: #9a55ff; }
.cam-more[open] summary { color: #7a3fe4; }
.cam-more .cam-meta { margin-top: 4px; }
@media (max-width: 560px) { .cam-wrap { gap: 10px; } .cam-wrap .card { padding: 14px; } .cam-h { margin-bottom: 10px; } .cam-shutter { width: 120px; height: 120px; } .cam-shutter svg { width: 38px; height: 38px; } }
