/* Expanded operational workspace; all modules share the Núcleo green. */
.sidebar {
  width: 218px;
  padding: 23px 14px 16px;
}
.sidebar .brand {
  padding-bottom: 24px;
}
.sidebar .nav-label {
  margin-top: 0;
}
.sidebar .nav-item {
  min-height: 42px;
  margin: 3px 0;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 12px;
}
.sidebar .sidebar-bottom {
  padding: 20px 8px 0;
}
.sidebar .sidebar-bottom > .workspace-card {
  display: none;
}
.sidebar .workspace-card {
  flex-shrink: 0;
}
.main-shell {
  margin-left: 218px;
}
.topbar {
  padding: 18px 28px 14px;
  min-height: 77px;
}
.topbar .search-box input {
  width: 170px;
}
.demo-banner {
  margin: 0 28px;
}
.page {
  padding: 22px 28px 36px;
}
.module-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 26px;
  padding: 6px;
  background: #e5eee9;
  border-radius: 16px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}
.module-tabs a {
  padding: 10px 14px;
  border-radius: 11px;
  color: #4d6b5c;
  font-size: 12px;
  flex-shrink: 0;
}
.module-tabs a:hover {
  text-decoration: none;
  background: #f7fbf8;
}
.module-tabs a.active {
  color: #fff;
  background: var(--teal);
}
.page-title {
  font-size: clamp(28px, 2.5vw, 38px);
}
.page-header {
  margin-bottom: 24px;
}
.page-header .page-actions {
  max-width: 52%;
}
.table-wrap {
  max-width: 100%;
}
.data-table td .btn {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 11px;
}
.data-table th {
  font-size: 10px;
}
.data-table td {
  font-size: 12px;
}
.data-table td > .badge + .btn {
  margin-left: 8px;
}
.badge.tone-success {
  background: #e3f2e8;
  color: #286148;
}
.badge.tone-info {
  background: #e7f0f7;
  color: #355f80;
}
.badge.tone-warning {
  background: #fff2dc;
  color: #825d1c;
}
.badge.tone-danger {
  background: #fae9e4;
  color: #914635;
}
.badge.tone-neutral {
  background: #edf3ef;
  color: #526b5a;
}
.notice {
  padding: 14px 18px;
  border: 1px solid #dbe9e0;
  border-radius: 16px;
  background: #edf5f0;
  color: #41634e;
  font-size: 12px;
  line-height: 1.7;
  margin: 18px 0;
}
.notice:first-child {
  margin-top: 0;
}
.notice.warning {
  background: #fff7e9;
  border-color: #eddfbf;
  color: #795922;
}
.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.shortcut-grid .btn {
  justify-content: flex-start;
  white-space: normal;
  text-align: left;
}
.settings-card .btn + .btn {
  margin: 8px 0 0 8px;
}
.form-grid + .page-actions,
form + .page-actions {
  margin-top: 18px;
}
.form-field textarea {
  display: block;
  margin-top: 7px;
}
.document-paper {
  padding: 28px;
  background: #fff;
  border: 1px solid #dce5df;
  border-radius: 10px;
  margin: 20px 0;
  box-shadow: 0 5px 20px #244f3808;
  line-height: 1.9;
}
.document-paper > small {
  color: #647b6c;
  letter-spacing: 1px;
  font-size: 10px;
}
.document-paper h3 {
  margin-top: 20px;
}
.document-paper p {
  overflow-wrap: anywhere;
}
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}
.timeline-list li {
  padding: 12px 0 12px 15px;
  border-left: 2px solid #c8dfd0;
  font-size: 12px;
}
.timeline-list small {
  color: #657d6e;
  margin-left: 12px;
}
.message-preview {
  padding: 22px;
  background: #e6f1e9;
  border-radius: 20px 20px 20px 4px;
  line-height: 1.8;
  font-size: 14px;
  margin: 20px 0;
  overflow-wrap: anywhere;
}
.channel-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--teal);
  background: #e6f1e9;
  margin-bottom: 20px;
}
.marketing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.marketing-tile {
  border-radius: 24px;
  padding: 14px;
  background: white;
}
.marketing-art {
  min-height: 290px;
  border-radius: 18px;
  padding: 30px;
  background: var(--art-color);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}
.marketing-art small {
  letter-spacing: 2px;
  font-size: 10px;
}
.marketing-art h2 {
  color: white;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -1px;
  max-width: 360px;
  margin: 32px 0;
  font-weight: 500;
}
.marketing-art > span {
  font-size: 12px;
}
.marketing-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px 4px;
  gap: 10px;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}
.tag-list .badge .btn {
  min-height: 24px;
  padding: 3px;
  font-size: 0;
}
.setup-options {
  display: grid;
  gap: 10px;
  margin: 25px 0;
}
.setup-options .btn {
  min-height: 55px;
  white-space: normal;
  border-radius: 16px;
}
.setup-progress {
  height: 5px;
  border-radius: 10px;
  background: #e2eee6;
  overflow: hidden;
  margin-bottom: 20px;
}
.setup-progress span {
  display: block;
  height: 100%;
  background: var(--teal);
}
dialog.modal-wide {
  width: 960px;
}
.modal-footer {
  flex-wrap: wrap;
}
.modal-footer .btn {
  white-space: normal;
}
.modal-body > p:last-child {
  margin-bottom: 0;
}
@media (max-width: 1100px) {
  .topbar .search-box input {
    width: 130px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  .sidebar {
    width: 260px;
  }
  .main-shell {
    margin-left: 0;
  }
  .page {
    padding: 20px 15px 30px;
  }
  .topbar {
    padding: 15px;
  }
  .breadcrumb {
    gap: 4px;
    font-size: 10px;
  }
  .breadcrumb > span[data-clinic-name] {
    display: none;
  }
  .demo-banner {
    margin: 0 15px;
  }
  .module-tabs {
    margin-bottom: 22px;
    padding: 5px;
    border-radius: 13px;
  }
  .module-tabs a {
    min-height: 44px;
    padding: 12px;
    font-size: 11px;
  }
  .page-header .page-actions {
    max-width: 100%;
  }
  .page-actions .btn {
    white-space: normal;
  }
  .mobile-dock {
    padding: 7px;
  }
  .mobile-dock > .btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px 0;
    min-height: 58px;
    font-size: 9px;
    border-radius: 18px;
    white-space: normal;
  }
  .mobile-dock .icon {
    width: 19px;
    height: 19px;
  }
  .marketing-grid {
    grid-template-columns: 1fr;
  }
  .marketing-art {
    min-height: 270px;
    padding: 25px;
  }
  .marketing-art h2 {
    font-size: 34px;
  }
  .settings-card .btn + .btn {
    margin-left: 0;
  }
  .document-paper {
    padding: 19px;
  }
  .shortcut-grid {
    grid-template-columns: 1fr;
  }
  .toolbar .segmented {
    flex-wrap: nowrap;
    overflow: auto;
  }
  .toolbar .segmented .btn {
    flex-shrink: 0;
  }
  .stat-value {
    font-size: clamp(19px, 5.4vw, 29px);
  }
  .toast {
    left: 50%;
  }
}
@media print {
  .module-tabs,
  .mobile-dock,
  .sidebar,
  .topbar,
  .demo-banner {
    display: none !important;
  }
  .main-shell {
    margin: 0;
  }
  .page {
    padding: 0;
  }
}
