.sm-stack { display: grid; gap: 18px; align-content: start; min-width: 0; }
.sm-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 42px 16px; color: var(--muted); font-size: 13px; }
.sm-loading span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent-hi); animation: sm-spin .8s linear infinite; }
@keyframes sm-spin { to { transform: rotate(360deg); } }
.sm-empty { display: grid; justify-items: center; gap: 6px; padding: 36px 18px; text-align: center; color: var(--muted); font-size: 12.5px; }
.sm-empty svg.lucide { width: 24px; height: 24px; color: var(--dim); }
.sm-empty b { color: var(--text); font-weight: 600; font-size: 13.5px; }

.sm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 13px 17px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; transition: background .16s; }
.sm-row:last-child { border-bottom: 0; }
a.sm-row:hover { background: var(--accent-bg); }
.sm-id { min-width: 46px; color: var(--accent-hi); font-size: 12px; }
.sm-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sm-main .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-main .s, .sm-side .s, .sm-annonce .s { font-size: 12px; color: var(--muted); }
.sm-main .s svg.lucide { width: 12px; height: 12px; vertical-align: -2px; color: var(--dim); }
.sm-main .x { font-size: 12px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sm-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; white-space: nowrap; }
.sm-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sm-row > .av { width: 36px; height: 36px; }
.sm-row:not(:has(.sm-tags)) { grid-template-columns: auto minmax(0, 1fr) auto; }

.sm-filters { align-items: stretch; }
.sm-search { flex: 1 1 260px; min-width: 0; }
.sm-select { height: 36px; min-width: 180px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }
.sm-summary { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.sm-summary b { color: var(--text); }
.sm-more { display: flex; justify-content: center; margin-top: 14px; }
.sm-more:empty { display: none; }

.sm-rich { font-size: 13.5px; line-height: 1.7; overflow-wrap: anywhere; }
.sm-rich > * + * { margin-top: 8px; }
.sm-rich h3, .sm-rich h4, .sm-rich h5, .sm-rich h6 { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .5px; color: var(--text); }
.sm-rich h3 { font-size: 20px; } .sm-rich h4 { font-size: 17px; } .sm-rich h5, .sm-rich h6 { font-size: 15px; }
.sm-rich ul, .sm-rich ol { padding-left: 20px; }
.sm-rich blockquote { padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--accent-bg); border-radius: 4px; }
.sm-rich pre, .sm-rich code { font-family: 'IBM Plex Mono', monospace; font-size: 12px; background: rgba(255,255,255,.04); border-radius: 4px; padding: 1px 4px; }
.sm-rich hr { border: 0; border-top: 1px solid var(--line); }
.sm-rich-img { max-width: 100%; border-radius: 8px; }
.sm-notes { white-space: pre-wrap; font-size: 13.5px; line-height: 1.65; overflow-wrap: anywhere; }
.sm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.sm-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.sm-patient { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 18px; align-items: start; }
.sm-photo { width: 112px; height: 136px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); }
.sm-patient .kv { grid-template-columns: 130px minmax(0, 1fr); }
.sm-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-bg); color: var(--accent-hi); flex-shrink: 0; }
.sm-ico svg.lucide { width: 15px; height: 15px; }
.sm-total { background: rgba(255,255,255,.02); }
.sm-rank { width: 22px; text-align: center; color: var(--muted); }
.sm-link { color: inherit; text-decoration: none; }

.sm-annonce { display: grid; gap: 8px; padding: 16px; color: inherit; text-decoration: none; }
.sm-annonce-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sm-annonce p { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.sm-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.sm-member { display: grid; gap: 14px; padding: 16px; }
.sm-member-h { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sm-member-h .grow { flex: 1; min-width: 0; }
.sm-member-h .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-member-h .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-member-h .s svg.lucide { width: 12px; height: 12px; vertical-align: -2px; }
.sm-member-f { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.sm-member-f span { display: block; font: 600 10px 'Barlow Condensed', sans-serif; letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim); }
.sm-member-f b { font-size: 13px; font-weight: 500; }
.sm-member .btn { justify-self: start; }

.sm-time .grow { display: grid; gap: 4px; }
.sm-time .bar { height: 5px; border-radius: 4px; background: rgba(255,255,255,.05); overflow: hidden; }
.sm-time .bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }


@media (max-width: 860px) {
  .sm-row, .sm-row:not(:has(.sm-tags)) { grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 12px 14px; }
  .sm-row > .sm-id, .sm-row > .av { grid-row: span 2; align-self: start; }
  .sm-side { flex-direction: row; align-items: center; gap: 10px; grid-column: 2; justify-content: flex-start; }
  .sm-tags { grid-column: 2; justify-content: flex-start; }
  .sm-main .t { white-space: normal; }
  .sm-search { flex: none; width: 100%; }
  .sm-select { flex: none; width: 100%; }
}
@media (max-width: 560px) {
  .sm-patient { grid-template-columns: 1fr; justify-items: center; }
  .sm-patient .kv { width: 100%; grid-template-columns: 120px minmax(0, 1fr); }
  .sm-staff { grid-template-columns: 1fr; }
  .sm-member-f { grid-template-columns: 1fr 1fr; }
  .sm-filters .chips { width: 100%; }
}

.in-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.in-prices { display: grid; }
.in-price { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.in-price:first-child { padding-top: 0; }
.in-price:last-child { border-bottom: 0; padding-bottom: 0; }
.in-price b { display: block; font-weight: 600; font-size: 13.5px; }
.in-price div span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.in-price > .mono { color: var(--accent-hi); font-weight: 600; white-space: nowrap; }
.in-lead { font-size: 13.5px; line-height: 1.65; color: var(--muted); margin-bottom: 14px; }
.in-lead b { color: var(--text); }
.in-durations { display: grid; gap: 10px; }
.in-duration { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.015); }
.in-duration b { display: block; font-size: 13.5px; }
.in-duration span { display: block; font-size: 12px; color: var(--muted); }
.in-time { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.in-time svg.lucide { width: 15px; height: 15px; color: var(--accent-hi); flex-shrink: 0; }
.in-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.in-item { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.in-item b { font-size: 14px; }
.in-item p { margin-top: 4px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.in-item p b { font-size: inherit; color: var(--text); }
.in-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-bg); color: var(--accent-hi); flex-shrink: 0; }
.in-ico svg.lucide { width: 18px; height: 18px; }
.in-note { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.in-note svg.lucide { width: 15px; height: 15px; flex-shrink: 0; }
.in-flow { display: grid; gap: 16px; }
.in-list, .in-steps { display: grid; gap: 9px; padding-left: 20px; font-size: 13.5px; line-height: 1.6; }
.in-list li::marker { color: var(--accent-hi); }
.in-steps li::marker { color: var(--accent-hi); font-family: 'IBM Plex Mono', monospace; font-weight: 600; }
.in-sub { font: 600 11px 'Barlow Condensed', sans-serif; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.in-sub:first-child { margin-top: 0; }
.in-answer { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 5px; background: rgba(70,176,122,.1); color: var(--ok); font-size: 12px; }
.in-role { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--accent-bg); color: var(--accent-hi); font-weight: 500; white-space: nowrap; }
.in-preamble { margin-bottom: 16px; border-left: 3px solid var(--accent); }
.in-preamble p:not(.in-sub) { font-size: 13.5px; line-height: 1.65; }
@media (max-width: 560px) {
  .in-grid, .in-cards { grid-template-columns: 1fr; }
  .in-duration { grid-template-columns: 1fr; gap: 6px; }
  .in-list, .in-steps { padding-left: 16px; }
}

.sm-mailbox{display:grid;grid-template-columns:170px 320px minmax(0,1fr);height:calc(100vh - 230px);min-height:460px}
.sm-mb-folders{border-right:1px solid var(--line);padding:10px;display:grid;align-content:start;gap:4px}
.sm-mb-f{display:flex;align-items:center;gap:9px;width:100%;padding:9px 10px;border:0;border-radius:8px;background:none;color:var(--muted);cursor:pointer;font:inherit;font-size:13px;text-align:left}
.sm-mb-f.on{background:var(--accent-bg);color:var(--text)}
.sm-mb-f svg.lucide{width:15px;height:15px}
.sm-mb-list{border-right:1px solid var(--line);overflow:auto}
.sm-mb-item{display:flex;align-items:center;gap:10px;width:100%;padding:11px 13px;border:0;border-bottom:1px solid var(--line);background:none;color:inherit;cursor:pointer;font:inherit;text-align:left}
.sm-mb-item.on{background:var(--accent-bg)}
.sm-mb-item .grow{flex:1;min-width:0;display:flex;flex-direction:column}
.sm-mb-item .t{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sm-mb-item .s{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sm-mb-item .d{font-size:10.5px;color:var(--dim);white-space:nowrap}
.sm-mb-item.unread .t:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--accent-hi);margin-right:6px;vertical-align:1px}
.sm-mb-read{padding:18px 22px;overflow:auto}
.sm-mb-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.sm-mb-head h2{font-size:18px;margin-bottom:4px}
.sm-mb-head .s{font-size:12.5px;color:var(--muted)}
.sm-mb-actions{display:flex;gap:8px}
.sm-weeknav{align-items:center}
.sm-weeknav b{flex:1;text-align:center;font-size:13.5px;min-width:180px}
.sm-plan-wrap{overflow-x:auto}
.sm-plan{min-width:760px}
.sm-plan th span{display:block;font-weight:400;color:var(--dim);font-size:10.5px}
.sm-plan th.today{color:var(--accent-hi)}
.sm-plan tr.me td{background:var(--accent-bg)}
.sm-plan-cell{text-align:center;white-space:nowrap}
.sm-plan-cell.edit{cursor:pointer}
.sm-plan-cell.edit:hover{background:rgba(255,255,255,.04)}
.sm-shift{display:inline-grid;place-items:center;width:22px;height:22px;margin:1px;border-radius:6px;font:700 11px 'IBM Plex Mono',monospace}
.sm-shift.s-M{background:rgba(217,162,58,.18);color:#e8b85c}
.sm-shift.s-A{background:rgba(91,143,230,.18);color:#8db1f0}
.sm-shift.s-S{background:rgba(220,140,75,.18);color:#e8ab78}
.sm-shift.s-N{background:rgba(140,110,230,.2);color:#b6a1f2}
.sm-plus{color:var(--dim);font-size:15px}
.sm-legend{margin-top:10px;font-size:12px;color:var(--muted)}
.sm-shift-pick{display:grid;gap:10px}
.sm-shift-pick label{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line-2);border-radius:9px;cursor:pointer}
.sm-abs{grid-template-columns:minmax(0,1fr) auto}
.sm-abs .sm-tags{gap:6px}
.sm-perm-page{padding:12px 17px;border-bottom:1px solid var(--line)}
.sm-perm-page:last-child{border-bottom:0}
.sm-perm-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 0}
.sm-perm-row.sub{padding-left:14px;font-size:12.5px;color:var(--muted)}
.sm-perm-row.sub svg.lucide{width:13px;height:13px;vertical-align:-2px}
.sm-perm-sel{min-width:190px;height:32px}
button.sm-row{width:100%;border:0;border-bottom:1px solid var(--line);background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}
button.sm-row:hover{background:var(--accent-bg)}
.sm-picks{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.sm-pick{padding:5px 10px;border:1px solid var(--line-2);border-radius:999px;background:rgba(255,255,255,.03);color:var(--text);cursor:pointer;font:inherit;font-size:12px}
.sm-pick:hover{border-color:var(--accent)}
.sm-result{display:flex;gap:10px;height:38px;align-items:center}
.sm-result label{display:flex;align-items:center;gap:6px;cursor:pointer;font-size:13px}
.sm-result .ok{color:var(--ok);font-weight:600}
.sm-result .ko{color:var(--danger);font-weight:600}
.sm-checklist{display:grid;gap:8px;max-height:300px;overflow:auto;padding:10px;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.015)}
.sm-q{display:grid;gap:4px;font-size:12.5px}
.sm-q.check{display:flex;align-items:center;gap:8px;cursor:pointer}
.sm-q input:not([type]){height:32px;padding:0 10px;border:1px solid var(--line-2);border-radius:7px;background:var(--panel);color:var(--text);font:inherit}
.sm-report{display:grid;grid-template-columns:300px minmax(0,1fr);gap:18px;min-height:60vh}
.sm-report-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.sm-report-meta{display:flex;gap:6px;flex-wrap:wrap}
.sm-report-side .s{font-size:12.5px;color:var(--muted);line-height:1.6}
.sm-report-actions{display:grid;gap:8px}
.sm-answers{display:grid;gap:6px;max-height:40vh;overflow:auto}
.sm-ans{display:grid;gap:2px;padding:7px 9px;border:1px solid var(--line);border-radius:7px;font-size:12px}
.sm-ans span{color:var(--muted)}
.sm-report-doc{min-height:60vh;border-radius:10px;overflow:hidden;background:#e9ecef}
.att-preview{width:100%;height:100%;min-height:70vh;border:0;display:block;background:#e9ecef}
@media (max-width:1100px){.sm-mailbox{grid-template-columns:150px 260px minmax(0,1fr)}}
@media (max-width:860px){
  .sm-mailbox{grid-template-columns:1fr;height:auto;min-height:0}
  .sm-mb-folders{display:flex;border-right:0;border-bottom:1px solid var(--line)}
  .sm-mb-list{border-right:0;max-height:300px;border-bottom:1px solid var(--line)}
  .sm-report{grid-template-columns:1fr}
  .sm-report-doc,.att-preview{min-height:60vh}
  .sm-perm-row{flex-direction:column;align-items:stretch}
  .sm-perm-sel{min-width:0;width:100%}
  .sm-abs{grid-template-columns:1fr}
  .sm-abs .sm-tags{justify-content:flex-start}
}
.modal.wide:has(.sm-report){width:min(1180px,96vw);max-width:96vw}
.field .sm-q,.field .sm-q span,.field .sm-result label,.field .sm-shift-pick label{text-transform:none;letter-spacing:0;font-family:inherit;font-size:13px;font-weight:400;color:var(--text)}
.field .sm-result .ok,.field .sm-result .ko{font-weight:600}
.field .sm-q span{color:var(--muted);font-size:12.5px}

.sm-orga-stats{margin-bottom:18px}
.sm-orga{display:flex;flex-direction:column;gap:14px}
.sm-orga-corps{border:1px solid var(--line);border-left:3px solid var(--c);border-radius:10px;background:var(--panel);overflow:hidden}
.sm-orga-h{padding:10px 16px;font:600 14px 'Barlow Condensed',sans-serif;text-transform:uppercase;letter-spacing:2.5px;color:var(--c);background:color-mix(in srgb,var(--c) 9%,transparent);border-bottom:1px solid var(--line)}
.sm-orga-row{display:grid;grid-template-columns:230px minmax(0,1fr);border-bottom:1px solid var(--line)}
.sm-orga-row:last-child{border-bottom:0}
.sm-orga-g{display:flex;align-items:center;gap:12px;padding:12px 16px;font-weight:500;border-right:1px solid var(--line)}
.sm-orga-a{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px 12px}
.sm-orga-ag{display:inline-flex;align-items:center;gap:7px;padding:3px 10px 3px 3px;border:1px solid var(--line-2);border-radius:20px;background:var(--bg-2);color:var(--text);cursor:pointer;font:inherit;font-size:12.5px}
.sm-orga-ag:hover{border-color:var(--c)}
.sm-orga-ag img{width:24px;height:24px;border-radius:50%;object-fit:cover;background:var(--panel-2)}
.sm-orga-ag i,.sm-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--dim)}
.sm-orga-ag i.on,.sm-dot.on{background:var(--ok);box-shadow:0 0 0 3px rgba(70,176,122,.18)}
.sm-mcard{display:grid;gap:16px}
.sm-mcard-h{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.sm-mcard-h .av{width:56px;height:56px}
.sm-mcard-h div{flex:1;min-width:0}
.sm-mcard-h h3{font-size:19px}
.sm-mcard-h span{font-size:12.5px;color:var(--muted)}
.sm-mcard .btn{justify-self:start}
@media (max-width:860px){.sm-orga-row{grid-template-columns:1fr}.sm-orga-g{border-right:0;border-bottom:1px solid var(--line)}.sm-mcard .grid{grid-template-columns:1fr 1fr}}
.sm-mcard .stat .val{font-size:22px;white-space:nowrap}
.sm-mcard .stat{min-height:0}
@media (max-width:560px){.sm-mcard .stat .val{font-size:17px}.sm-mcard .stat{padding:14px}}
