/* GetUcare admin — only what the admin adds on top of /app/app.css
   (tokens, buttons, cards, tables, status badges come from the portal). */

.mt { margin-top: 20px; } .mt-s { margin-top: 12px; }
.s { font-size: 13px; } .d { display: block; } .num { text-align: right; white-space: nowrap; } .pad { padding-top: 20px; }
body.no-scroll { overflow: hidden; }
.link-btn { color: var(--blue); font-size: 13.5px; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
.btn:disabled, .inp:disabled, .seg button:disabled { opacity: .5; cursor: not-allowed; }
.btn-xs { height: 30px; padding: 0 12px; font-size: 13px; gap: 6px; }
.inp.sm { height: 38px; font-size: 14px; padding: 0 12px; }
select.inp.sm { padding-right: 32px; background-position: right 12px center; }
.avatar.sm { width: 32px; height: 32px; font-size: 11.5px; }
.toast.bad { background: #8E2B25; } .toast.bad svg { color: #fff; }

/* ===== Shell ===== */
.shell { grid-template-columns: 260px minmax(0, 1fr); }
.side-foot { margin-top: auto; padding: 0 4px; }
.side-reset { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; font-size: 13px; color: var(--muted); border-radius: 10px; width: 100%; }
.side-reset:hover { background: var(--bg); color: var(--ink); }
.side-nav .cnt-urgent { background: #FDECEC; color: #B23A33; }
.side-label { margin-top: 10px; }
.role-chip { height: 26px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--tint); color: var(--blue); }
.role-chip[data-role="operations"] { background: #FFF2D9; color: #8A5300; }
.mnav { display: none; }

/* ===== Login ===== */
.alogin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1000px 500px at 80% -10%, var(--tint), transparent 60%), var(--bg); }
.alogin-card { width: min(460px, 100%); padding: 32px; display: grid; gap: 14px; }
.alogin-card h1 { font-size: 26px; font-weight: 500; letter-spacing: -.03em; margin-top: 12px; }
.roles { display: grid; gap: 10px; margin-top: 6px; }
.roles .opt { grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; }
.opt-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--blue); }
.roles .btn { margin-top: 8px; }
.demo-line { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }

/* ===== Overview ===== */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 18px 20px; transition: box-shadow .15s; }
.kpi:hover { box-shadow: 0 0 0 1px rgba(12,36,60,.14), 0 1px 2px rgba(12,36,60,.03); }
.kpi b { grid-column: 1; grid-row: 1; font-size: 34px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.kpi-ic { grid-column: 2; grid-row: 1; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--blue); }
.kpi > span:not(.kpi-ic) { grid-column: 1 / -1; font-weight: 500; font-size: 14.5px; }
.kpi small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.kpi.hot { box-shadow: 0 0 0 1.5px #E7A9A4; }
.kpi.hot .kpi-ic { background: #FDECEC; color: #B23A33; }
.kpi.hot b { color: #B23A33; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ov-col { display: grid; gap: 20px; min-width: 0; }
.card-h h2 { display: flex; align-items: center; gap: 8px; }
.rows { padding: 0 8px 8px; }
.row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; transition: background .15s; }
.row:hover { background: var(--bg); }
.row.is-urgent { background: #FFF6F5; }
.row-m b { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-m small, .row-r small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-r { display: grid; justify-items: end; gap: 2px; font-size: 13.5px; }
.row-r b { font-weight: 500; }

/* ===== Filters ===== */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; padding: 14px 16px; margin-bottom: 16px; }
.filters .sbox { width: 240px; height: 38px; }
.fsel { display: grid; gap: 4px; min-width: 130px; }
.fsel span { font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.filters .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filters .pill { height: 38px; }
.pill-urgent[aria-pressed="true"] { background: #FDECEC; color: #B23A33; box-shadow: 0 0 0 1px #E7A9A4; }
.filters .link-btn { margin-left: auto; height: 38px; }

/* ===== Board (5 columns: every status incl. File closed) ===== */
.aboard { grid-template-columns: repeat(5, minmax(196px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
.col-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 4px; }
.kc-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.kc-meta svg { color: var(--muted); }
.kc-meta span:not(.lim-tag) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard.is-archived { opacity: .6; }
.lim-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--bg); font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; margin-left: auto; }

/* Pregnancy / stent flags: Yes = warning, No = calm, Not answered = dashed, clearly different from No */
.flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.flag b { font-weight: 600; }
.flag-yes { background: #FDECEC; color: #B23A33; box-shadow: inset 0 0 0 1px #F0B9B4; font-size: 12px; padding: 0 9px; }
.flag-no { background: #EEF6F1; color: #2B6A45; }
.flag-missing { background: #FFF8E8; color: #8A5300; border: 1px dashed #D69A28; }
p.flag-missing { height: auto; padding: 8px 12px; border-radius: 10px; white-space: normal; }

/* ===== Tables ===== */
.tbl-scroll { overflow-x: auto; }
.atbl { min-width: 760px; }
.atbl td { vertical-align: middle; }
.atbl tr.is-urgent td:first-child { box-shadow: inset 3px 0 0 #D9534F; }
.atbl tr.is-hidden td { color: var(--muted); }
.atbl tfoot td { padding: 14px 16px; border-top: 1px solid var(--line); font-weight: 500; }
.atbl .acts { text-align: right; white-space: nowrap; }
.atbl .acts .btn + .btn { margin-left: 6px; }
.tbl .pt { display: flex; align-items: center; gap: 12px; }
.cst { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; }
.cst::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cst-active { background: #E3F6EA; color: #1B7A43; }
.cst-inactive { background: #EEF1F4; color: #5B6A77; }

/* ===== Drawer (case detail) ===== */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-veil { position: absolute; inset: 0; background: rgba(12,36,60,.32); opacity: 0; transition: opacity .2s; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: #fff; overflow-y: auto; overscroll-behavior: contain; box-shadow: -12px 0 40px -12px rgba(12,36,60,.25); transform: translateX(24px); opacity: 0; transition: transform .22s cubic-bezier(.2,.7,.2,1), opacity .2s; }
.drawer.on .drawer-veil { opacity: 1; }
.drawer.on .drawer-panel { transform: none; opacity: 1; }
.dw-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px 12px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.dw-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dw-who .av { width: 44px; height: 44px; font-size: 14px; }
.dw-who h2 { font-size: 21px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.dw-who small { color: var(--muted); }
.dw-tags, .dw-flags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 24px 10px; }
.dw-tags .lim-tag { margin-left: 0; }
.dw-flags .flag { height: 28px; font-size: 13px; padding: 0 12px; }
.ro-note { display: flex; gap: 8px; align-items: flex-start; margin: 4px 24px 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 13px; color: var(--ink-2); }
.ro-note svg { margin-top: 2px; color: var(--muted); }
.wrap > .view > .ro-note { margin: 0 0 16px; }
.dw-body { padding: 0 24px 32px; }
.dsec { padding: 20px 0; border-top: 1px solid var(--line-2); }
.dsec h3 { font-size: 15px; font-weight: 500; margin-bottom: 12px; }
.dsec h3 + .muted { margin: -8px 0 12px; }
.dsec-danger { display: grid; gap: 10px; justify-items: start; }
.hint-s { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); }
.seg button { height: 38px; border-radius: 10px; font-size: 13.5px; color: var(--ink-2); }
.seg button:hover:not(:disabled) { background: #fff; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(12,36,60,.1), 0 0 0 1px var(--blue); }
.soon-t { color: #B23A33 !important; font-weight: 600; }
.fields.three { grid-template-columns: 1fr 1fr 1.4fr; }
.fields.four { grid-template-columns: 1.2fr 1.2fr 1fr auto; align-items: end; }
.fields.five { grid-template-columns: 1.2fr 1.2fr 1fr .9fr auto; align-items: end; }
.f-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.f-end { align-self: end; }
.ac { display: grid; gap: 12px; }
.check-warn span { color: var(--ink); }
.fee-box { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border-radius: 12px; background: var(--tint); }
.fee-box span { font-size: 13.5px; color: var(--ink-2); }
.fee-box b { grid-row: span 2; align-self: center; font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.fee-box small { font-size: 12.5px; color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.thumbs:empty { display: none; }
.thumb { display: grid; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #111; }
.thumb-none { aspect-ratio: 4 / 3; display: grid; place-items: center; align-content: center; gap: 6px; padding: 10px; background: var(--bg); color: var(--muted); text-align: center; font-size: 11.5px; }
.thumb-m { padding: 8px 10px; min-width: 0; }
.thumb-m b { display: block; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb-m small { font-size: 11.5px; color: var(--muted); }
.file-btn { cursor: pointer; }
.notes { display: grid; gap: 8px; margin-bottom: 12px; }
.notes li { padding: 12px 14px; border-radius: 12px; background: #FFF8E8; }
.notes p { font-size: 14px; white-space: pre-wrap; }
.notes small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.note-form { display: grid; gap: 8px; justify-items: start; }
.note-form textarea.inp { min-height: 72px; }
.feed.tl { padding: 0; }

/* ===== Calendar ===== */
.cal-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 16px; }
.cal-bar h2 { font-size: 16px; font-weight: 500; margin: 0 auto 0 8px; }
.acal { display: grid; gap: 10px; }
.acal-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.acal-day { padding: 12px; display: grid; gap: 8px; align-content: start; min-height: 180px; min-width: 0; }
.acal-day header { display: flex; align-items: baseline; gap: 6px; }
.acal-day header small { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.acal-day header b { font-size: 18px; font-weight: 500; }
.acal-day.today header b { color: #fff; background: var(--blue); border-radius: 999px; padding: 0 8px; }
.cev { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--tint); border-left: 3px solid var(--brand); font-size: 12.5px; min-width: 0; }
.cev:hover { filter: brightness(.97); }
.cev b { font-weight: 600; }
.cev span { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cev small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cev-aftercare { background: #F1F0FB; border-left-color: #7466D8; }
.cev.is-urgent { background: #FDECEC; border-left-color: #D9534F; }
.cev.is-done { opacity: .55; }
.acal-day .muted { color: #A3AEB8; }
.acal-day:not(.today) header b { color: var(--ink); }

/* ===== Clinics / Network ===== */
.cl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tabs { margin: 0 0 16px; }
.tabs button { height: 34px; }
.net-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.net-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.net-form .inp { flex: 1 1 160px; width: auto; }
.net-form.add { padding: 14px 16px; border-top: 1px solid var(--line-2); }
#hours-form { display: grid; gap: 10px; }

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acal-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .ov-grid, .cl-grid, .net-grid { grid-template-columns: 1fr; }
  .fields.four, .fields.five { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .mnav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; position: sticky; top: 60px; z-index: 39; padding: 8px 16px; background: rgba(255,255,255,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  .mnav::-webkit-scrollbar { display: none; }
  .mnav a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; flex-shrink: 0; }
  .mnav a svg { width: 16px; height: 16px; }
  .mnav a[aria-current="page"] { background: var(--tint); color: var(--ink); font-weight: 500; }
  .mnav .cnt { min-width: 20px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--bg); }
  .mnav .cnt-urgent { background: #FDECEC; color: #B23A33; }
  .main { padding-bottom: 40px; }
  .mainbar { display: none; }
  .toast { bottom: 24px; }
}
@media (max-width: 760px) {
  .filters .sbox { width: 100%; flex-basis: 100%; }
  .fsel { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .filters .link-btn { margin-left: 0; }
  .aboard { grid-template-columns: repeat(5, 82%); scroll-snap-type: x mandatory; }
  .aboard .col { scroll-snap-align: start; }
  .acal-week { grid-template-columns: 1fr; }
  .acal-day { min-height: 0; }
  .fields.three, .fields.four, .fields.five { grid-template-columns: 1fr; }
  .dw-head, .dw-tags, .dw-flags { padding-left: 16px; padding-right: 16px; }
  .ro-note { margin-left: 16px; margin-right: 16px; }
  .dw-body { padding: 0 16px 32px; }
  .seg { grid-template-columns: 1fr 1fr; }
  .alogin-card { padding: 24px 20px; }
  .page-head .vt { margin-left: 0; }
  /* keep admin tables as tables (scroll), not the portal's card layout */
  .atbl thead { display: table-header-group; }
  .atbl { display: table; }
  .atbl tbody { display: table-row-group; }
  .atbl tbody tr { display: table-row; padding: 0; }
  .atbl td { display: table-cell; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 600px) {
  .kpi { padding: 14px 16px; }
  .kpi b { font-size: 28px; }
  .kpi small { display: none; }
}

/* long scan tags wrap inside board cards */
.aboard .kc-svc { flex-wrap: wrap; }
.aboard .kc-svc .tag { flex-shrink: 1; max-width: 100%; white-space: normal; height: auto; min-height: 24px; padding-top: 3px; padding-bottom: 3px; line-height: 1.3; }

/* ---------- Real login: one-time links, fees editor ---------- */
.link-box { margin-bottom: 16px; border-color: var(--y, #2BC0DA); }
.link-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.link-row .inp { flex: 1 1 260px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.link-row select.inp { flex: 0 0 auto; font-family: inherit; font-size: 14px; }
.link-box b .ic, .link-box b svg { vertical-align: -2px; color: var(--ok, #2fbf71); }
.fee-in { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.fee-in .inp { width: 96px; text-align: right; }
.fields.one { grid-template-columns: 1fr; }
.link-btn { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; margin-top: 12px; font: inherit; opacity: .7; }

/* "i" tooltip */
.info-tip { position: relative; display: inline-flex; align-items: center; vertical-align: middle; color: var(--muted); cursor: help; border-radius: 50%; }
.info-tip:hover, .info-tip:focus-visible { color: var(--ink); }
.info-tip:hover::after, .info-tip:focus::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 20; width: max-content; max-width: min(300px, 80vw); padding: 10px 12px; border-radius: 10px; background: var(--ink); color: var(--bg, #000); font-size: 12px; font-weight: 400; line-height: 1.45; text-transform: none; letter-spacing: 0; white-space: normal; text-align: left; box-shadow: 0 8px 24px rgba(0,0,0,.35); pointer-events: none; }
th .info-tip:hover::after, th .info-tip:focus::after { left: auto; right: -8px; transform: none; }
.lang-line { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; }
.lang-line select { margin-left: auto; }

/* New case form */
.ph-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fields.two { grid-template-columns: 1fr 1fr; }
.fields .full { grid-column: 1 / -1; }
.nc .lbl { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.nc-checks { display: flex; gap: 16px; flex-wrap: wrap; min-height: 44px; align-items: center; }
.seg.seg-2 { grid-template-columns: 1fr 1fr; }
.seg-r { position: relative; display: block; }
.seg-r input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-r span { display: grid; place-items: center; height: 38px; border-radius: 10px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.seg-r input:checked + span { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--blue); }
.seg-r input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.nc textarea.inp { height: auto; padding-top: 10px; padding-bottom: 10px; resize: vertical; }
.card-h .btn-xs { margin-left: auto; }
@media (max-width: 700px) { .fields.two { grid-template-columns: 1fr; } .ph-act { width: 100%; } }

/* Demo access */
.demo-made { border: 1px solid rgba(12,162,192,.35); }
.demo-made code { font-size: 14px; padding: 3px 8px; border-radius: 8px; color: var(--ink); background: rgba(43,192,218,.12); box-shadow: inset 0 0 0 1px rgba(43,192,218,.3); user-select: all; }
.demo-made .demo-pw { font-size: 16px; font-weight: 600; letter-spacing: .04em; }
.tag.tag-ok { background: rgba(189,245,218,.12); color: var(--mint); }
.nowrap { white-space: nowrap; }

/* Language switch (EN / TR) */
.alang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.alang button { border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.alang button[aria-pressed="true"] { background: var(--y); color: #000; }
.alogin-card .alang { margin-top: 18px; align-self: center; width: max-content; }
.mainbar .alang, .topbar .alang { margin-right: 6px; }

.demo-val { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.demo-val code { white-space: nowrap; }
.demo-val code { font-size: 13.5px; padding: 3px 8px; border-radius: 8px; color: var(--ink); background: rgba(43,192,218,.12); box-shadow: inset 0 0 0 1px rgba(43,192,218,.3); }
.demo-mask { letter-spacing: .04em; font-variant-numeric: tabular-nums; min-width: 172px; }
.demo-ic { width: 28px; height: 28px; border-radius: 8px; color: var(--ink-2); }
.demo-ic:hover, .demo-ic[aria-pressed="true"] { color: var(--y); background: rgba(43,192,218,.1); }
