/* YourMed UI v2 — camada visual sobre o Tabler, sem alterar regras do sistema. */
:root {
  --ym-navy: #071a2b;
  --ym-navy-soft: #0d2940;
  --ym-blue: #0877a9;
  --ym-cyan: #10a7c8;
  --ym-canvas: #f2f6f8;
  --ym-line: #dce7ec;
  --ym-shadow-sm: 0 8px 24px rgba(7, 26, 43, .07);
  --ym-shadow-lg: 0 28px 80px rgba(7, 26, 43, .18);
}

/* Login */
body.login-page-v2 {
  display: block;
  min-height: 100vh;
  padding: 0;
  background: var(--ym-canvas);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(380px, 1.08fr) minmax(460px, .92fr);
  min-height: 100vh;
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(38px, 5vw, 76px);
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(16, 167, 200, .42), transparent 27%),
    radial-gradient(circle at 8% 88%, rgba(8, 119, 169, .34), transparent 30%),
    linear-gradient(145deg, #061725 0%, #0a2a40 62%, #0b3a53 100%);
}

.login-visual::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -160px;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255,255,255,.035), 0 0 0 110px rgba(255,255,255,.025);
}

.login-visual .brand,
.login-card .brand { position: relative; z-index: 1; }
.login-visual .wordmark { color: #fff; font-size: 31px; }
.login-visual .brand span { color: #b8d2df; border-color: rgba(255,255,255,.22); }
.login-card .brand-mobile { display: none; }

.login-message {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.login-message .eyebrow { color: #61d4e9; }
.login-message h2 {
  max-width: 590px;
  margin: 14px 0 18px;
  color: #fff;
  font-size: clamp(38px, 4.2vw, 66px);
  line-height: 1.03;
  letter-spacing: -.045em;
}
.login-message p { max-width: 570px; margin: 0; color: #c5d9e3; font-size: 17px; }

.login-benefits {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}
.login-benefit {
  min-height: 112px;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: rgba(255,255,255,.065);
  backdrop-filter: blur(8px);
}
.login-benefit i { color: #62d8ed; font-size: 24px; }
.login-benefit strong { display: block; margin-top: 15px; color: #fff; font-size: 13px; }
.login-benefit span { display: block; margin-top: 4px; color: #a9c3d0; font-size: 11px; line-height: 1.4; }

.login-visual-footer { position: relative; z-index: 1; color: #91aebb; font-size: 11px; }
.login-panel { display: grid; place-items: center; padding: 42px clamp(24px, 5vw, 76px); }

body.login-page-v2 .login-card {
  width: min(480px, 100%);
  padding: 40px;
  border: 1px solid rgba(7, 26, 43, .07);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--ym-shadow-lg);
}

.login-card .eyebrow { display: flex; align-items: center; gap: 7px; }
.login-card h1 { margin-top: 10px; letter-spacing: -.025em; }
.login-card label { margin-top: 17px; }
.login-card input { min-height: 48px; border-radius: 10px; }
.login-card button { min-height: 48px; border-radius: 10px; }
.login-card .msg:not(:empty) { padding: 11px 13px; border-radius: 10px; background: #eef8fb; }
.login-security-note { display: flex; align-items: center; gap: 8px; margin-top: 17px; color: #7a8d98; font-size: 11px; }

/* Painel interno */
body.dashboard-shell-v2 {
  --ym-sidebar-width: 240px;
  min-height: 100vh;
  padding-left: var(--ym-sidebar-width);
  background: var(--ym-canvas);
  transition: padding-left .22s ease;
}

body.dashboard-shell-v2.sidebar-collapsed { --ym-sidebar-width: 82px; }

body.dashboard-shell-v2 .top {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--ym-sidebar-width);
  height: 100vh;
  padding: 25px 18px 18px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 22px;
  overflow-y: auto;
  border: 0;
  background:
    radial-gradient(circle at 15% 92%, rgba(16,167,200,.2), transparent 28%),
    linear-gradient(180deg, #061827 0%, #0a293e 100%);
  box-shadow: 10px 0 34px rgba(7,26,43,.1);
  transition: width .22s ease, padding .22s ease;
}

body.dashboard-shell-v2 .brand { position: relative; padding: 2px 5px 19px; border-bottom: 1px solid rgba(255,255,255,.1); }
body.dashboard-shell-v2 .brand-word { font-size: 26px; }
body.dashboard-shell-v2 .brand-monogram {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ym-blue), var(--ym-cyan));
  color: #fff;
  font-weight: 900;
  letter-spacing: -.04em;
}
body.dashboard-shell-v2 .sidebar-toggle {
  position: absolute;
  right: -20px;
  top: 1px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: #0b344c;
  color: #fff;
  box-shadow: 0 5px 14px rgba(2,18,29,.28);
  cursor: pointer;
}
body.dashboard-shell-v2 .sidebar-toggle:hover { background: var(--ym-blue); }
body.dashboard-shell-v2 .right {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  gap: 15px;
  flex-wrap: nowrap;
}
body.dashboard-shell-v2 .role {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  color: #d7e8ef;
  line-height: 1.35;
}
body.dashboard-shell-v2 .tabs {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  flex-wrap: nowrap;
}
body.dashboard-shell-v2 .tabbtn,
body.dashboard-shell-v2 .top > .right > .btn {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #c9dce4 !important;
  box-shadow: none;
  text-align: left;
}
body.dashboard-shell-v2 .tabbtn i,
body.dashboard-shell-v2 .top > .right > .btn i { width: 20px; color: #7fb1c3; font-size: 19px; text-align: center; }
body.dashboard-shell-v2 .tabbtn:hover,
body.dashboard-shell-v2 .top > .right > .btn:hover { transform: none; background: rgba(255,255,255,.07); color: #fff; }
body.dashboard-shell-v2 .tabbtn.active {
  border-color: rgba(94,213,235,.26);
  background: linear-gradient(135deg, rgba(8,119,169,.92), rgba(16,167,200,.78));
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(2,18,29,.22);
}
body.dashboard-shell-v2 .tabbtn.active i { color: #fff; }
body.dashboard-shell-v2 .top > .right > .btn { margin-top: auto; color: #ffcbc7; }

body.dashboard-shell-v2.sidebar-collapsed .top { padding-inline: 12px; }
body.dashboard-shell-v2.sidebar-collapsed .brand {
  justify-content: center;
  padding-inline: 0;
}
body.dashboard-shell-v2.sidebar-collapsed .brand-monogram { display: grid; }
body.dashboard-shell-v2.sidebar-collapsed .brand-word,
body.dashboard-shell-v2.sidebar-collapsed .brand-tag,
body.dashboard-shell-v2.sidebar-collapsed .role,
body.dashboard-shell-v2.sidebar-collapsed .nav-label,
body.dashboard-shell-v2.sidebar-collapsed .notification-badge { display: none !important; }
body.dashboard-shell-v2.sidebar-collapsed .tabbtn,
body.dashboard-shell-v2.sidebar-collapsed .top > .right > .btn {
  justify-content: center;
  gap: 0;
  padding-inline: 8px;
}
body.dashboard-shell-v2.sidebar-collapsed .tabbtn i,
body.dashboard-shell-v2.sidebar-collapsed .top > .right > .btn i {
  width: auto;
  font-size: 21px;
}

body.dashboard-shell-v2 .wrap {
  width: min(1540px, calc(100% - 44px));
  margin: 0 auto;
  padding: 30px 0 58px;
}
body.dashboard-shell-v2 .card {
  border: 1px solid rgba(7,26,43,.075);
  border-radius: 16px;
  box-shadow: var(--ym-shadow-sm);
}
body.dashboard-shell-v2 h2 { font-size: 25px; letter-spacing: -.025em; }
body.dashboard-shell-v2 h3 { letter-spacing: -.015em; }
body.dashboard-shell-v2 input,
body.dashboard-shell-v2 select,
body.dashboard-shell-v2 textarea { border-color: #cedde4; border-radius: 9px; }
body.dashboard-shell-v2 .btn { border-radius: 9px; }
body.dashboard-shell-v2 .primary,
body.dashboard-shell-v2 .tabbtn.active { background: linear-gradient(135deg, var(--ym-blue), var(--ym-cyan)); }

body.dashboard-shell-v2 #dashboard > .card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.dashboard-shell-v2 #dashboard > .card > h2 { margin: 0 0 18px; font-size: 28px; }
body.dashboard-shell-v2 .dashboard-filters,
body.dashboard-shell-v2 .referral-panel,
body.dashboard-shell-v2 .dashboard-section {
  border: 1px solid rgba(7,26,43,.075);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--ym-shadow-sm);
}
body.dashboard-shell-v2 .dashboard-filters { padding: 18px; }
body.dashboard-shell-v2 .dashboard-section { margin-top: 16px; padding: 21px; }
body.dashboard-shell-v2 .crm-stage-card,
body.dashboard-shell-v2 .kpi,
body.dashboard-shell-v2 .sales-kpi { border-radius: 13px; box-shadow: 0 4px 15px rgba(7,26,43,.035); }
body.dashboard-shell-v2 .crm-stage-card strong { font-size: 30px; }
body.dashboard-shell-v2 .notification-badge { margin-left: auto; }

body.dashboard-shell-v2 .dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
body.dashboard-shell-v2 .dashboard-chart-card {
  min-width: 0;
  padding: 19px;
  border: 1px solid #dbe6ea;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #f9fbfc);
  box-shadow: 0 6px 20px rgba(7,26,43,.045);
}
body.dashboard-shell-v2 .dashboard-chart-wide { grid-column: 1 / -1; }
body.dashboard-shell-v2 .dashboard-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
body.dashboard-shell-v2 .dashboard-chart-head h3 { margin: 0 0 4px; font-size: 16px; }
body.dashboard-shell-v2 .dashboard-chart-head span { color: #718590; font-size: 11px; }
body.dashboard-shell-v2 .dashboard-chart-head i {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 10px;
  background: #eaf7fa;
  color: var(--ym-blue);
  font-size: 19px;
}
body.dashboard-shell-v2 .dashboard-chart-canvas { position: relative; height: 270px; }
body.dashboard-shell-v2 .dashboard-chart-tall { height: 390px; }

/* Funil de leads */
body.dashboard-shell-v2 .lead-toolbar {
  align-items: center;
  margin-bottom: 14px;
}
body.dashboard-shell-v2 .lead-toolbar h2 { margin-bottom: 5px; }
body.dashboard-shell-v2 .add-lead-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
body.dashboard-shell-v2 .add-lead-btn i { font-size: 18px; }
body.dashboard-shell-v2 #leads .lead-view-tabs { margin-top: 0; }
body.dashboard-shell-v2 #leads .lead-filters { margin-top: 12px; }

body.ym-modal-open { overflow: hidden; }
.ym-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(3, 18, 29, .68);
  backdrop-filter: blur(5px);
}
.ym-modal-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  padding: 25px;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(2, 19, 31, .32);
}
.ym-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}
.ym-modal-header .eyebrow {
  margin-bottom: 6px;
  color: var(--ym-blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.ym-modal-header h2 { margin: 0; }
.ym-modal-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--ym-line);
  border-radius: 50%;
  background: #f3f7f9;
  color: var(--ym-navy);
  cursor: pointer;
}
.ym-modal-close:hover { border-color: #a8cbd8; background: #eaf5f8; }
.ym-modal-close i { font-size: 20px; }
.lead-modal-form { margin-top: 17px; }
.ym-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--ym-line);
}
.ym-modal-actions .btn { display: inline-flex; align-items: center; gap: 7px; }

/* Componentes compartilhados do painel */
body.dashboard-shell-v2 .view > .card,
body.dashboard-shell-v2 .view > .grid > .card,
body.dashboard-shell-v2 .view > .split > .card {
  background: #fff;
}
body.dashboard-shell-v2 .patient-toolbar,
body.dashboard-shell-v2 .notification-toolbar {
  align-items: center;
  margin-bottom: 20px;
}
body.dashboard-shell-v2 .patient-toolbar h2,
body.dashboard-shell-v2 .notification-toolbar h2 { margin-bottom: 5px; }
body.dashboard-shell-v2 .view h2 > i {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-right: 9px;
  border: 1px solid #cfe7ef;
  border-radius: 10px;
  background: #eef9fc;
  color: var(--ym-blue);
  font-size: 18px;
  vertical-align: -7px;
}
body.dashboard-shell-v2 .muted { color: #6c7f8b; }
/* Sistema de formulários: compacto, previsível e alinhado ao Tabler. */
body.dashboard-shell-v2 label {
  display: block;
  color: #243a48;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .005em;
}
body.dashboard-shell-v2 input,
body.dashboard-shell-v2 select,
body.dashboard-shell-v2 textarea {
  min-height: 38px;
  margin-top: 5px;
  padding: 8px 11px;
  border-color: #d4e0e6;
  border-radius: 8px;
  background: #fbfdfe;
  box-shadow: inset 0 1px 1px rgba(7,26,43,.02);
  font-size: 13px;
  line-height: 1.35;
}
body.dashboard-shell-v2 input,
body.dashboard-shell-v2 select { height: 38px; }
body.dashboard-shell-v2 textarea {
  min-height: 76px;
  height: auto;
  padding-block: 9px;
}
body.dashboard-shell-v2 input[type="checkbox"],
body.dashboard-shell-v2 input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
}
body.dashboard-shell-v2 input[type="file"] {
  height: auto;
  min-height: 38px;
  padding: 6px 8px;
}
body.dashboard-shell-v2 input::placeholder,
body.dashboard-shell-v2 textarea::placeholder { color: #8a9aa5; font-weight: 500; }
body.dashboard-shell-v2 .formgrid {
  gap: 11px 14px;
  align-items: start;
}
body.dashboard-shell-v2 .patient-file .formgrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.dashboard-shell-v2 .patient-section-body { padding: 16px 18px 18px; }
body.dashboard-shell-v2 .patient-section-body > .formgrid:first-child { margin-top: 0; }
body.dashboard-shell-v2 .patient-section-body .actions,
body.dashboard-shell-v2 .patient-save-bar { margin-top: 13px; }
body.dashboard-shell-v2 .split .formgrid,
body.dashboard-shell-v2 .lead-modal-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.dashboard-shell-v2 #security .card > label + label,
body.dashboard-shell-v2 #mfaEnrollment > label { margin-top: 11px; }
body.dashboard-shell-v2 #security .card > label input,
body.dashboard-shell-v2 #mfaEnrollment label input { max-width: 420px; }
body.dashboard-shell-v2 #security label + .btn,
body.dashboard-shell-v2 #mfaEnrollment label + .btn { margin-top: 13px; }
body.dashboard-shell-v2 input:hover,
body.dashboard-shell-v2 select:hover,
body.dashboard-shell-v2 textarea:hover { border-color: #abc6d1; background: #fff; }
body.dashboard-shell-v2 input:focus,
body.dashboard-shell-v2 select:focus,
body.dashboard-shell-v2 textarea:focus {
  border-color: var(--ym-cyan);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(16,167,200,.12);
}
body.dashboard-shell-v2 .btn {
  min-height: 39px;
  padding: 9px 13px;
  border-color: #d7e2e7;
  font-size: 12px;
  font-weight: 750;
}
body.dashboard-shell-v2 .secondary { color: #244153; }
body.dashboard-shell-v2 .secondary:hover { border-color: #9fc5d3; background: #f0f8fa; color: var(--ym-blue); }
body.dashboard-shell-v2 .primary { border-color: transparent; color: #fff; }
body.dashboard-shell-v2 .primary:hover { filter: brightness(1.04); box-shadow: 0 8px 18px rgba(8,119,169,.2); }
body.dashboard-shell-v2 .actions { gap: 9px; }
body.dashboard-shell-v2 .module-warning {
  border-color: #efd99e;
  border-left: 4px solid #d6a433;
  border-radius: 10px;
  background: #fff9e9;
}
body.dashboard-shell-v2 .status,
body.dashboard-shell-v2 .intake {
  border-color: #cce7ef;
  border-left: 4px solid var(--ym-cyan);
  border-radius: 11px;
  background: #f1fafc;
}

/* Barras de busca e filtros */
body.dashboard-shell-v2 .searchbar,
body.dashboard-shell-v2 .lead-filters,
body.dashboard-shell-v2 .calendar-toolbar {
  padding: 14px;
  border: 1px solid var(--ym-line);
  border-radius: 13px;
  background: #f7fafb;
}
body.dashboard-shell-v2 .searchbar { align-items: center; }
body.dashboard-shell-v2 .searchbar input,
body.dashboard-shell-v2 .searchbar select { background: #fff; }
body.dashboard-shell-v2 .view-switch {
  padding: 4px;
  border: 1px solid #d7e3e8;
  background: #eef3f6;
}
body.dashboard-shell-v2 .view-switch .btn { min-height: 34px; }
body.dashboard-shell-v2 .view-switch .btn.active { color: var(--ym-blue); }
body.dashboard-shell-v2 .lead-view-tabs .btn {
  min-height: 42px;
  border-radius: 11px;
  background: #fff;
}
body.dashboard-shell-v2 .lead-view-tabs .active { background: #eaf8fb; }
body.dashboard-shell-v2 .lead-view-tabs .lost.active { background: #fff1f0; }

/* Kanban de pacientes e leads */
body.dashboard-shell-v2 .kanban-wrap {
  margin: 0 -5px;
  padding: 5px 5px 17px;
}
body.dashboard-shell-v2 .kanban-column {
  min-height: 360px;
  padding: 10px;
  border-color: #d9e5ea;
  border-radius: 14px;
  background: #eef3f6;
}
body.dashboard-shell-v2 .kanban-column-head {
  min-height: 51px;
  padding: 7px 5px 13px;
}
body.dashboard-shell-v2 .kanban-title { color: #263f4e; font-size: 12px; }
body.dashboard-shell-v2 .kanban-count {
  border: 0;
  background: rgba(255,255,255,.86);
  box-shadow: 0 3px 10px rgba(7,26,43,.06);
}
body.dashboard-shell-v2 .kanban-card,
body.dashboard-shell-v2 .lead-card {
  border-color: #d8e3e8;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(7,26,43,.055);
}
body.dashboard-shell-v2 .kanban-card:hover,
body.dashboard-shell-v2 .lead-card:hover {
  border-color: #91c1d1;
  box-shadow: 0 10px 23px rgba(7,26,43,.1);
}
body.dashboard-shell-v2 .kanban-card > summary,
body.dashboard-shell-v2 .lead-card > summary { padding: 13px; }
body.dashboard-shell-v2 .kanban-record { color: var(--ym-blue); font-size: 10px; letter-spacing: .07em; }
body.dashboard-shell-v2 .kanban-arrow { background: #edf5f7; }
body.dashboard-shell-v2 .kanban-note { border-color: #e0e8ec; background: #f7fafb; }
body.dashboard-shell-v2 .kanban-empty {
  border-color: #cddbe1;
  background: rgba(255,255,255,.52);
}

/* Ficha do paciente, documentos e prontuário */
body.dashboard-shell-v2 .patient-file { max-width: 1280px; }
body.dashboard-shell-v2 .patient-section {
  border-color: #dbe5e9;
  border-radius: 13px;
  box-shadow: 0 4px 14px rgba(7,26,43,.035);
}
body.dashboard-shell-v2 .patient-section > summary {
  min-height: 67px;
  padding: 16px 18px;
  background: #f8fafb;
}
body.dashboard-shell-v2 .patient-section > summary:hover { background: #f0f7f9; }
body.dashboard-shell-v2 .patient-section[open] > summary {
  border-bottom-color: #dce8ed;
  box-shadow: inset 4px 0 0 var(--ym-cyan);
}
body.dashboard-shell-v2 .patient-section-body { padding: 21px; }
body.dashboard-shell-v2 .upload {
  border-color: #b8d0da;
  border-radius: 12px;
  background: #f8fbfc;
}
body.dashboard-shell-v2 .upload:hover { border-color: var(--ym-cyan); background: #f2fafc; }
body.dashboard-shell-v2 .transfer-panel,
body.dashboard-shell-v2 .document-editor,
body.dashboard-shell-v2 .clinical-intake {
  border-color: #cfe3ea;
  border-radius: 12px;
  background: #f4fafb;
}
body.dashboard-shell-v2 .variable-catalog { border-radius: 11px; }
body.dashboard-shell-v2 .document-row,
body.dashboard-shell-v2 .clinical-entry {
  border-color: #dce6ea;
  border-radius: 11px;
  background: #fafcfd;
}
body.dashboard-shell-v2 .clinical-layout > div:first-child {
  padding: 16px;
  border: 1px solid var(--ym-line);
  border-radius: 13px;
  background: #f8fafb;
}
body.dashboard-shell-v2 #clinicalWorkspace {
  min-height: 360px;
  padding: 19px;
  border: 1px solid var(--ym-line);
  border-radius: 13px;
  background: #fff;
}
body.dashboard-shell-v2 .clinical-intake-field { border-radius: 9px; }
body.dashboard-shell-v2 .signature-pending { border-radius: 999px; }

/* Listas, notificações e áreas administrativas */
body.dashboard-shell-v2 .list .item {
  padding: 14px;
  border-color: #dce6ea;
  border-radius: 11px;
  background: #fafcfd;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
body.dashboard-shell-v2 .list .item:hover {
  border-color: #a8cbd7;
  box-shadow: 0 7px 18px rgba(7,26,43,.06);
  transform: translateY(-1px);
}
body.dashboard-shell-v2 .notification-item {
  border-color: #dce6ea;
  border-radius: 12px;
  background: #fafcfd;
}
body.dashboard-shell-v2 .notification-item.unread {
  border-color: #9dd3e2;
  background: #edf9fc;
}
body.dashboard-shell-v2 #usuarios .split,
body.dashboard-shell-v2 #unidades .split,
body.dashboard-shell-v2 #security .grid { gap: 17px; }
body.dashboard-shell-v2 #usuarios .card,
body.dashboard-shell-v2 #unidades .card,
body.dashboard-shell-v2 #security .card { border-top: 3px solid #d9edf3; }

/* Tabelas e indicadores */
body.dashboard-shell-v2 .city-table-wrap,
body.dashboard-shell-v2 .variable-table { border-color: #dce6ea; border-radius: 11px; }
body.dashboard-shell-v2 .city-table th,
body.dashboard-shell-v2 .variable-table th {
  border-color: #dce6ea;
  background: #eef5f7;
  color: #435d6b;
}
body.dashboard-shell-v2 .city-table td,
body.dashboard-shell-v2 .variable-table td { border-color: #e5ecef; }
body.dashboard-shell-v2 .city-table tbody tr:hover td { background: #f5fafb; }
body.dashboard-shell-v2 .crm-stage-card { overflow: hidden; }
body.dashboard-shell-v2 .crm-stage-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -35px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--stage-color) 7%, transparent);
}

/* Calendário */
body.dashboard-shell-v2 .calendar-summary-card {
  border-color: #dce6ea;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(7,26,43,.04);
}
body.dashboard-shell-v2 .calendar-summary-card strong { font-size: 24px; }
body.dashboard-shell-v2 .calendar-unit-total { border-radius: 10px; }
body.dashboard-shell-v2 .calendar-grid-wrap {
  padding: 1px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #dbe5e9;
  border-radius: 13px;
  background: #fff;
}
body.dashboard-shell-v2 .calendar-weekdays { background: #edf4f6; }
body.dashboard-shell-v2 .calendar-day { border-color: #e1e9ed; transition: background .18s; }
body.dashboard-shell-v2 .calendar-day:hover { background: #f5fafb; }
body.dashboard-shell-v2 .calendar-day.today { box-shadow: inset 0 0 0 2px rgba(16,167,200,.28); }
body.dashboard-shell-v2 .surgery-event { box-shadow: 0 3px 9px rgba(7,26,43,.05); }

/* Rolagem e acessibilidade */
body.dashboard-shell-v2 * { scrollbar-width: thin; scrollbar-color: #a8c0cb transparent; }
body.dashboard-shell-v2 button:focus-visible,
body.dashboard-shell-v2 a:focus-visible,
body.dashboard-shell-v2 input:focus-visible,
body.dashboard-shell-v2 select:focus-visible,
body.dashboard-shell-v2 textarea:focus-visible {
  outline: 3px solid rgba(16,167,200,.25);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  body.dashboard-shell-v2,
  body.dashboard-shell-v2.sidebar-collapsed { --ym-sidebar-width: 100%; padding-left: 0; }
  body.dashboard-shell-v2 .top {
    position: sticky;
    inset: 0;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 14px 16px;
    gap: 10px;
    overflow: visible;
  }
  body.dashboard-shell-v2 .brand { padding: 0 0 10px; }
  body.dashboard-shell-v2 .sidebar-toggle { display: none; }
  body.dashboard-shell-v2.sidebar-collapsed .brand-word,
  body.dashboard-shell-v2.sidebar-collapsed .brand-tag,
  body.dashboard-shell-v2.sidebar-collapsed .role,
  body.dashboard-shell-v2.sidebar-collapsed .nav-label { display: initial !important; }
  body.dashboard-shell-v2.sidebar-collapsed .brand-monogram { display: none; }
  body.dashboard-shell-v2 .right { gap: 9px; }
  body.dashboard-shell-v2 .role { width: max-content; max-width: 100%; padding: 7px 10px; }
  body.dashboard-shell-v2 .tabs {
    width: 100%;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  body.dashboard-shell-v2 .tabbtn { width: auto; min-width: max-content; min-height: 38px; }
  body.dashboard-shell-v2.sidebar-collapsed .tabbtn,
  body.dashboard-shell-v2.sidebar-collapsed .top > .right > .btn { justify-content: flex-start; gap: 11px; padding-inline: 12px; }
  body.dashboard-shell-v2 .top > .right > .btn { width: auto; margin-top: 0; }
  body.dashboard-shell-v2 .dashboard-chart-grid { grid-template-columns: 1fr; }
  body.dashboard-shell-v2 .dashboard-chart-wide { grid-column: auto; }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; background: radial-gradient(circle at 85% 6%, rgba(16,167,200,.18), transparent 27%), var(--ym-canvas); }
  .login-card .brand-mobile { display: flex; }
  body.dashboard-shell-v2 .patient-file .formgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .login-panel { padding: 18px; }
  body.login-page-v2 .login-card { padding: 27px 22px; border-radius: 18px; }
  body.dashboard-shell-v2 .wrap { width: calc(100% - 20px); padding-top: 18px; }
  body.dashboard-shell-v2 .dashboard-section { padding: 16px; }
  body.dashboard-shell-v2 .crm-stage-grid { grid-template-columns: 1fr 1fr; }
  body.dashboard-shell-v2 .lead-toolbar { align-items: stretch; }
  body.dashboard-shell-v2 .add-lead-btn { justify-content: center; }
  body.dashboard-shell-v2 .patient-file .formgrid,
  body.dashboard-shell-v2 .split .formgrid,
  body.dashboard-shell-v2 .lead-modal-form { grid-template-columns: 1fr; }
  body.dashboard-shell-v2 .formgrid .full { grid-column: auto; }
  .ym-modal { padding: 10px; place-items: end center; }
  .ym-modal-dialog { max-height: calc(100vh - 20px); padding: 21px 17px; border-radius: 18px 18px 12px 12px; }
  .ym-modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
