:root {
  --ds-ink: #0b1f1a;
  --ds-ink-2: #173b32;
  --ds-muted: #6b7b74;
  --ds-soft: #879891;
  --ds-line: #e6ece9;
  --ds-line-strong: #d4dfdb;
  --ds-panel: #ffffff;
  --ds-bg: #f5f8f7;
  --ds-green: #083f32;
  --ds-green-2: #0d5a48;
  --ds-mint: #bff4dc;
  --ds-orange: #ff6b1a;
  --ds-orange-soft: #fff1e8;
  --ds-blue: #407bff;
  --ds-red: #de3651;
  --ds-yellow: #f6b800;
  --ds-shadow: 0 18px 48px rgba(8, 63, 50, 0.08);
  --ds-shadow-soft: 0 8px 26px rgba(8, 63, 50, 0.06);
  --ds-radius: 12px;
}

/* Recetas medicas */
.ds-rx-page {
  display: grid;
  gap: 1rem;
}

.ds-rx-head,
.ds-rx-card,
.ds-rx-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(134, 163, 184, 0.25);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.ds-rx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem;
}

.ds-rx-head h1 {
  margin: 0.15rem 0 0.25rem;
  color: #082f49;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0;
}

.ds-rx-head p {
  margin: 0;
  color: #52677a;
  font-weight: 700;
}

.ds-rx-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
  align-items: start;
}

.ds-rx-main {
  display: grid;
  gap: 1rem;
}

.ds-rx-filters {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.ds-rx-filters button {
  border: 0;
  border-radius: 999px;
  background: #e8eef4;
  color: #334155;
  padding: 0.6rem 0.95rem;
  font-weight: 800;
}

.ds-rx-filters button.active,
.ds-rx-filters button:hover {
  background: #0f7de8;
  color: #fff;
  box-shadow: 0 12px 26px rgba(15, 126, 232, 0.22);
}

.ds-rx-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ds-rx-card {
  overflow: hidden;
  display: grid;
  align-content: start;
}

.ds-rx-card[hidden] {
  display: none;
}

.ds-rx-card header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.ds-rx-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #0f7de8;
  background: #e0f2fe;
  font-size: 1.25rem;
  flex: 0 0 auto;
}

.ds-rx-card h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
}

.ds-rx-card p {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-weight: 700;
}

.ds-rx-tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
}

.ds-rx-tags span {
  border: 1px solid rgba(15, 126, 232, 0.22);
  border-radius: 999px;
  color: #0f7de8;
  background: #eff6ff;
  padding: 0.3rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 900;
}

.ds-rx-meds {
  display: grid;
  gap: 0.55rem;
  padding: 0 1rem 0.75rem;
}

.ds-rx-meds div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: #f6f8fb;
  padding: 0.8rem;
  color: #1f2937;
  font-weight: 800;
}

.ds-rx-meds i {
  color: #e11d48;
  font-size: 1.1rem;
}

.ds-rx-indications {
  margin: 0 1rem 0.75rem;
  border-radius: 12px;
  background: #f1f5f9;
  padding: 0.75rem 0.9rem;
  color: #475569;
}

.ds-rx-indications strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
}

.ds-rx-indications ul {
  margin: 0;
  padding-left: 1.05rem;
}

.ds-rx-alert {
  margin: 0 1rem 0.85rem;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  background: #fff7ed;
  color: #a45308;
  padding: 0.7rem 0.8rem;
  font-weight: 800;
}

.ds-rx-use {
  margin: 0 1rem 1rem;
  background: #f8fafc;
  border-color: rgba(15, 126, 232, 0.2);
  color: #0f7de8;
  box-shadow: none;
}

.ds-rx-use:hover,
.ds-rx-use:focus {
  background: #0f7de8;
  border-color: #0f7de8;
  color: #fff;
}

.ds-rx-panel {
  position: sticky;
  top: 1rem;
  padding: 1.15rem;
  display: grid;
  gap: 0.8rem;
}

.ds-rx-panel h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 900;
}

.ds-rx-panel p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}

.ds-rx-panel form {
  display: grid;
  gap: 0.8rem;
}

.ds-rx-panel label {
  display: grid;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ds-rx-panel textarea {
  min-height: 92px;
}

.ds-rx-recent {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.ds-rx-recent h3 {
  margin: 0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-rx-recent a {
  display: grid;
  gap: 0.15rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 0.7rem;
  color: #0f172a;
  background: #f8fafc;
}

.ds-rx-recent a span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 1199px) {
  .ds-rx-layout {
    grid-template-columns: 1fr;
  }

  .ds-rx-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  .ds-rx-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ds-rx-cards {
    grid-template-columns: 1fr;
  }

  .ds-rx-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .ds-rx-filters button {
    white-space: nowrap;
  }
}

/* Estadisticas */
.ds-analytics-page {
  display: grid;
  gap: 1rem;
}

.ds-analytics-hero,
.ds-analytics-kpi,
.ds-analytics-card,
.ds-analytics-summary article {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(134, 163, 184, 0.25);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.ds-analytics-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.45rem;
}

.ds-analytics-hero h1 {
  margin: 0.15rem 0 0.35rem;
  color: #082f49;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  font-weight: 900;
  letter-spacing: 0;
}

.ds-analytics-hero p {
  margin: 0;
  max-width: 720px;
  color: #52677a;
  font-weight: 700;
}

.ds-analytics-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ds-analytics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.ds-analytics-kpi {
  min-height: 150px;
  padding: 1.25rem;
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

.ds-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 14px 28px rgba(15, 126, 232, 0.2);
}

.ds-kpi-icon.blue { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.ds-kpi-icon.purple { background: linear-gradient(135deg, #8b5cf6, #2563eb); }
.ds-kpi-icon.teal { background: linear-gradient(135deg, #14b8a6, #0f7de8); }
.ds-kpi-icon.green { background: linear-gradient(135deg, #22c55e, #0f766e); }

.ds-analytics-kpi small,
.ds-analytics-summary small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-analytics-kpi strong {
  color: #0f172a;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1;
  font-weight: 900;
}

.ds-analytics-kpi em,
.ds-analytics-summary span {
  color: #64748b;
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 700;
}

.ds-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ds-analytics-card {
  min-height: 210px;
  padding: 1.2rem;
}

.ds-analytics-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  margin-bottom: 1rem;
}

.ds-analytics-title span {
  color: #475569;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ds-analytics-title i {
  color: #0f7de8;
  font-size: 1.1rem;
}

.ds-stat-bars {
  display: grid;
  gap: 0.85rem;
}

.ds-stat-bar-row {
  display: grid;
  gap: 0.45rem;
}

.ds-stat-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #0f172a;
  font-weight: 800;
}

.ds-stat-bar-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-stat-bar-label strong {
  color: #0f7de8;
  font-size: 0.92rem;
}

.ds-stat-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f1f7;
}

.ds-stat-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
}

.ds-stat-empty {
  min-height: 105px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #94a3b8;
  font-weight: 800;
}

.ds-analytics-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ds-analytics-summary article {
  padding: 1.15rem;
  display: grid;
  gap: 0.35rem;
}

.ds-analytics-summary strong {
  color: #082f49;
  font-size: 1.35rem;
  font-weight: 900;
}

@media (max-width: 1199px) {
  .ds-analytics-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .ds-analytics-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .ds-analytics-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .ds-analytics-actions .btn {
    flex: 1 1 130px;
  }

  .ds-analytics-kpis,
  .ds-analytics-grid,
  .ds-analytics-summary {
    grid-template-columns: 1fr;
  }

  .ds-analytics-kpi {
    min-height: auto;
  }
}

.ds-page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.ds-page-head h1 {
  color: var(--ds-green);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  margin: 3px 0 4px;
}

.ds-page-head p {
  color: var(--ds-muted);
  margin: 0;
}

.ds-section-title {
  color: var(--ds-green);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.ds-caja-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.ds-caja-form {
  display: grid;
  gap: 9px;
}

.ds-caja-form label,
.ds-caja-filters label {
  color: var(--ds-muted);
  font-size: .76rem;
  font-weight: 800;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.ds-caja-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.ds-wa-panel {
  background: var(--ds-panel);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius);
  box-shadow: var(--ds-shadow-soft);
  padding: 16px;
}

.ds-wa-list {
  display: grid;
  gap: 8px;
}

.ds-wa-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--ds-line);
  border-radius: 10px;
  padding: 10px 12px;
}

.ds-wa-item strong,
.ds-wa-item span {
  display: block;
}

.ds-wa-item span {
  color: var(--ds-muted);
  font-size: .82rem;
}

.ds-doc-selector {
  align-items: end;
  background: var(--ds-panel);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius);
  box-shadow: var(--ds-shadow-soft);
  display: grid;
  gap: 8px;
  grid-template-columns: 120px minmax(260px, 520px);
  margin-bottom: 14px;
  padding: 14px;
}

.ds-doc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ds-doc-tabs a {
  background: var(--ds-panel);
  border: 1px solid var(--ds-line);
  border-radius: 999px;
  color: var(--ds-muted);
  font-weight: 800;
  padding: 8px 14px;
}

.ds-doc-tabs a.active,
.ds-doc-tabs a:hover {
  background: var(--ds-orange-soft);
  color: var(--ds-orange);
}

.ds-doc-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  align-items: start;
}

.ds-print-doc {
  background: #fff;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius);
  box-shadow: var(--ds-shadow-soft);
  color: #111827;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.58;
  min-height: 760px;
  padding: 36px 42px;
}

.ds-print-doc h1 {
  color: #0f172a;
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-align: center;
  text-transform: uppercase;
}

.ds-print-doc h2 {
  color: #111827;
  font-size: 1.05rem;
  font-weight: 800;
  margin: 18px 0 8px;
}

.ds-print-doc p,
.ds-print-doc li {
  font-size: .98rem;
}

.ds-sign-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 64px;
}

.ds-sign-grid span {
  border-top: 1px solid #111827;
  color: #374151;
  display: block;
  font-family: Arial, sans-serif;
  font-size: .82rem;
  padding-top: 8px;
  text-align: center;
}

.ds-clinical-search {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr .7fr .7fr auto;
  gap: 10px;
  align-items: end;
}

.ds-clinical-search label {
  color: var(--ds-muted);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ds-perio-meta,
.ds-ortho-control-form {
  display: grid;
  grid-template-columns: 150px 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.ds-ortho-control-form {
  grid-template-columns: 140px 1fr 1fr 90px;
}

.ds-ortho-control-form textarea {
  grid-column: 1 / -1;
}

.ds-perio-table-wrap {
  max-height: 72vh;
  overflow: auto;
}

.ds-perio-table {
  min-width: 980px;
}

.ds-perio-table input[type="number"],
.ds-perio-table input[type="text"],
.ds-perio-table input:not([type]) {
  border: 1px solid var(--ds-line);
  border-radius: 6px;
  max-width: 84px;
  padding: 4px 6px;
}

/* Phase 5 polish */
body:not(.ds-login-body) {
  font-feature-settings: "tnum";
}

#main-content .section {
  max-width: 1480px;
  margin-inline: auto;
}

.sidebar-wrapper .menu .sidebar-link {
  min-height: 42px;
}

.sidebar-wrapper .menu .submenu .submenu-item a {
  font-size: .88rem;
  min-height: 34px;
}

.form-control,
.form-select,
textarea.form-control {
  border-color: var(--ds-line);
  border-radius: 10px;
  color: var(--ds-ink);
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: var(--ds-orange);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .14);
}

.btn {
  align-items: center;
  display: inline-flex;
  gap: .4rem;
  justify-content: center;
  white-space: nowrap;
}

.btn-sm {
  min-height: 32px;
}

.table-responsive {
  border-radius: var(--ds-radius);
}

.table thead th,
.dataTable-table thead th {
  white-space: nowrap;
}

.table td,
.dataTable-table td {
  vertical-align: middle;
}

.ds-daily-tools {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

.ds-daily-tools a,
.ds-daily-stat,
.ds-patient-stat,
.ds-stat-card,
.ds-record-card,
.ds-wa-panel,
.ds-print-doc {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.ds-daily-tools a:hover,
.ds-daily-stat:hover,
.ds-patient-stat:hover,
.ds-record-card:hover,
.ds-wa-panel:hover {
  border-color: var(--ds-line-strong);
  box-shadow: var(--ds-shadow);
  transform: translateY(-1px);
}

.ds-page-head,
.ds-patient-head,
.ds-record-header,
.ds-odont-header {
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.72));
  border: 1px solid var(--ds-line);
  border-radius: 16px;
  box-shadow: var(--ds-shadow-soft);
  padding: 18px;
}

.ds-page-head .btn,
.ds-patient-head .btn,
.ds-record-actions .btn,
.ds-odont-actions .btn {
  min-height: 38px;
}

.ds-caja-summary .ds-stat-card strong {
  letter-spacing: 0;
}

.ds-record-list div {
  border: 1px solid var(--ds-line);
  border-radius: 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
}

.ds-record-list div:hover {
  background: #f8fbfd;
}

.ds-record-list a {
  color: var(--ds-orange);
  font-weight: 800;
}

.ds-doc-tabs a,
.ds-risk-badge,
.badge {
  letter-spacing: 0;
}

.ds-print-doc {
  max-width: 920px;
}

.ds-perio-table th,
.ds-perio-table td {
  font-size: .82rem;
  padding: .42rem;
}

.ds-perio-table input[type="checkbox"] {
  height: 18px;
  width: 18px;
}

.ds-ortho-control-form .btn,
.ds-clinical-search .btn {
  min-height: 40px;
}

@media (max-width: 767.98px) {
  #main-content .page-content {
    padding: 1rem .75rem;
  }

  .ds-page-head,
  .ds-patient-head,
  .ds-record-header,
  .ds-odont-header {
    padding: 14px;
  }

  .ds-page-head h1,
  .ds-patient-head h1,
  .ds-record-person h1,
  .ds-odont-header h1 {
    font-size: 1.35rem;
  }

  .ds-record-actions,
  .ds-odont-actions,
  .ds-daily-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .ds-row-actions {
    flex-wrap: wrap;
  }

  .table {
    min-width: 760px;
  }
}

@media (max-width: 991px) {
  .ds-caja-summary,
  .ds-caja-filters {
    grid-template-columns: 1fr;
  }

  .ds-page-head {
    flex-direction: column;
  }

  .ds-wa-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .ds-doc-selector,
  .ds-doc-layout,
  .ds-clinical-search,
  .ds-perio-meta,
  .ds-ortho-control-form {
    grid-template-columns: 1fr;
  }
}

@media print {
  #sidebar,
  header,
  .no-print,
  .sidebar-wrapper,
  .navbar,
  .btn,
  .footer {
    display: none !important;
  }

  #main,
  #main-content,
  .page-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .ds-print-doc {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: auto;
    padding: 0;
  }

  body {
    background: #fff !important;
  }
}

/* Auditoria visual global */
body {
  color: #082f49;
  background:
    radial-gradient(circle at 18% 8%, rgba(14, 165, 233, 0.12), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.10), transparent 34%),
    linear-gradient(135deg, #f6fbff 0%, #eefaff 44%, #fffaf5 100%);
  letter-spacing: 0;
}

#app,
#main,
#main-content {
  min-height: 100vh;
}

#sidebar .sidebar-wrapper {
  background:
    linear-gradient(180deg, rgba(237, 253, 255, 0.98), rgba(245, 252, 255, 0.92)),
    #f8fdff;
  border-right: 1px solid rgba(14, 116, 144, 0.14);
  box-shadow: 18px 0 46px rgba(8, 47, 73, 0.05);
}

#sidebar .sidebar-header {
  padding: 1.35rem 1.15rem 1.05rem;
}

#sidebar .logo img.ds-logo {
  max-width: 150px;
  height: auto;
}

#sidebar .sidebar-menu {
  padding: 0.55rem 0.95rem 1rem;
}

#sidebar .sidebar-title {
  color: #7b93a7;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 1.1rem 0 0.45rem;
  text-transform: uppercase;
}

#sidebar .sidebar-item {
  margin: 0.16rem 0;
}

#sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  min-height: 44px;
  padding: 0.68rem 0.8rem;
  border-radius: 13px;
  color: #496477;
  font-weight: 900;
  line-height: 1.15;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

#sidebar .sidebar-link:hover {
  background: rgba(224, 247, 255, 0.78);
  color: #0369a1;
  transform: translateX(2px);
}

#sidebar .sidebar-item.active > .sidebar-link,
#sidebar .submenu-item.active > a {
  background: linear-gradient(135deg, #e0f7ff, #ecfeff);
  color: #0284c7;
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.13);
}

#sidebar .sidebar-link i,
#sidebar .sidebar-link svg {
  width: 20px;
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  color: #7e97aa;
  font-size: 1rem;
}

#sidebar .sidebar-item.active > .sidebar-link i,
#sidebar .sidebar-link:hover i {
  color: #0ea5e9;
}

#sidebar .submenu {
  border-left: 1px solid rgba(14, 116, 144, 0.14);
  margin: 0.15rem 0 0.35rem 1.25rem;
  padding-left: 0.5rem;
}

#sidebar .submenu .submenu-item a {
  border-radius: 12px;
  color: #5f7486;
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 0.55rem 0.7rem;
}

#main > header {
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(14, 116, 144, 0.12);
  backdrop-filter: blur(16px);
}

#main .navbar {
  min-height: 70px;
  padding: 0.7rem 1.2rem;
}

.burger-btn {
  color: #0369a1;
}

.user-menu {
  align-items: center;
  gap: 0.35rem;
}

.user-name h6 {
  color: #082f49 !important;
  font-weight: 900;
}

.avatar.avatar-md,
.avatar.avatar-md img {
  width: 46px;
  height: 46px;
}

.avatar.avatar-md {
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.22);
}

.avatar.avatar-md img {
  border-radius: 16px;
  object-fit: cover;
}

.dropdown-menu {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13);
}

.dropdown-item {
  color: #334155;
  font-weight: 800;
}

.dropdown-item:hover {
  background: #eff6ff;
  color: #0369a1;
}

.page-content {
  padding-top: 1.3rem;
}

.card,
.ds-daily-card,
.ds-daily-stat,
.ds-analytics-kpi,
.ds-analytics-panel,
.ds-page-head,
.ds-budget-card,
.ds-calendar-card,
.ds-confirm-card,
.ds-reminder-card,
.ds-report-card,
.ds-cash-card {
  border-color: rgba(14, 116, 144, 0.16) !important;
  box-shadow: 0 18px 44px rgba(8, 47, 73, 0.08);
}

.card-header,
.card-body {
  color: #0f2d44;
}

.btn {
  border-radius: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.20);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0284c7, #1d4ed8);
  border-color: transparent;
}

.btn-light {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #496477;
}

.form-control,
.form-select {
  border-color: rgba(100, 116, 139, 0.24);
  border-radius: 11px;
  color: #0f2d44;
  min-height: 42px;
}

.form-control:focus,
.form-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.18);
}

.table-responsive {
  border-radius: 14px;
}

.table {
  color: #17324a;
}

.table thead th {
  color: #0f5f7a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody td {
  vertical-align: middle;
}

.ds-daily-tools {
  align-items: stretch;
}

.ds-daily-tools a {
  min-height: 68px;
  align-items: center;
  gap: 0.85rem;
}

.ds-daily-tools a i {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #dff7ff, #eefaff);
  color: #0284c7;
  font-size: 1.08rem;
}

.ds-daily-tools a span {
  color: #082f49;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

footer .footer {
  padding: 0.8rem 0 1.15rem;
}

footer .footer p {
  margin: 0;
  color: #7890a2;
  font-size: 0.92rem;
  font-weight: 800;
}

footer .float-start {
  float: none !important;
}

.modal-acerca {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
}

.modal-contenido-acerca {
  position: relative;
  width: min(460px, 100%);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fdff);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  color: #17324a;
  padding: 1.65rem 1.8rem 1.45rem;
}

.modal-contenido-acerca h4 {
  margin: 0.85rem 0 0.75rem;
  color: #082f49;
  font-size: 1.55rem;
  font-weight: 900;
}

.modal-contenido-acerca p {
  margin: 0.55rem 0;
  color: #334155;
  font-weight: 700;
}

.cerrar-acerca {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #eef6fb;
  color: #64748b;
  display: inline-grid;
  place-items: center;
}

.cerrar-acerca:hover {
  background: #dff7ff;
  color: #0369a1;
}

.ds-about-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.ds-about-copy {
  padding-top: 0.65rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

@media (max-width: 991.98px) {
  #main .navbar {
    min-height: 62px;
    padding: 0.55rem 0.9rem;
  }

  .page-content {
    padding: 1rem 0.85rem;
  }

  .ds-daily-actions,
  .ds-analytics-actions {
    width: 100%;
  }

  .ds-daily-actions .btn,
  .ds-analytics-actions .btn {
    flex: 1 1 150px;
  }
}

@media (max-width: 575.98px) {
  #sidebar .sidebar-header {
    padding-top: 1rem;
  }

  .user-name {
    display: none;
  }

  .avatar.avatar-md,
  .avatar.avatar-md img {
    width: 40px;
    height: 40px;
  }

  .ds-daily-tools {
    grid-template-columns: 1fr;
  }

  .ds-daily-tools a {
    min-height: 58px;
  }

  .modal-contenido-acerca {
    padding: 1.35rem;
  }
}

/* Confirmaciones */
.ds-confirm-page {
  display: grid;
  gap: 1rem;
}

.ds-confirm-head,
.ds-confirm-filter,
.ds-confirm-list-card,
.ds-confirm-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(125, 170, 190, 0.22);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(22, 65, 88, 0.1);
}

.ds-confirm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.45rem;
}

.ds-confirm-head h1 {
  margin: 0.15rem 0 0.3rem;
  color: #082a42;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 900;
}

.ds-confirm-head p {
  max-width: 720px;
  margin: 0;
  color: #496477;
  font-weight: 700;
}

.ds-confirm-head-actions,
.ds-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ds-confirm-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 190px)) minmax(230px, 1fr) repeat(4, auto);
  align-items: end;
  gap: 0.7rem;
  padding: 1rem;
}

.ds-confirm-filter label {
  color: #4d6679;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.ds-confirm-filter .form-control {
  min-height: 42px;
  border-color: rgba(15, 125, 232, 0.2);
  border-radius: 10px;
  font-weight: 800;
}

.ds-confirm-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.ds-confirm-metrics article {
  display: grid;
  gap: 0.35rem;
  min-height: 142px;
  padding: 1.1rem;
  background: #fff;
  border: 1px solid rgba(125, 170, 190, 0.2);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(22, 65, 88, 0.09);
}

.ds-confirm-metrics small,
.ds-confirm-card .ds-panel-title span,
.ds-confirm-list-card .ds-panel-title span {
  color: #65788b;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ds-confirm-metrics strong {
  color: #061f33;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.ds-confirm-metrics em {
  color: #607488;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 800;
}

.ds-confirm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.ds-confirm-list-card {
  padding: 1rem;
}

.ds-confirm-list-card .ds-panel-title,
.ds-confirm-card .ds-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(125, 170, 190, 0.18);
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
}

.ds-confirm-list-card .ds-panel-title strong,
.ds-confirm-card .ds-panel-title strong {
  color: #082a42;
  font-size: 1rem;
  font-weight: 900;
}

.ds-confirm-list-card .ds-panel-title b {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 0.55rem;
  color: #0f7de8;
  background: rgba(15, 125, 232, 0.1);
  border-radius: 999px;
  font-size: 1rem;
}

.ds-confirm-list {
  display: grid;
  gap: 0.75rem;
}

.ds-confirm-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.85rem;
  background: linear-gradient(135deg, rgba(247, 252, 255, 0.98), #fff);
  border: 1px solid rgba(15, 125, 232, 0.14);
  border-radius: 16px;
}

.ds-confirm-date {
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 74px;
  background: #eef8ff;
  border: 1px solid rgba(15, 125, 232, 0.18);
  border-radius: 14px;
}

.ds-confirm-date strong {
  color: #0f7de8;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
}

.ds-confirm-date span {
  color: #607488;
  font-size: 0.72rem;
  font-weight: 900;
}

.ds-confirm-main {
  min-width: 0;
}

.ds-confirm-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ds-confirm-row h2 {
  margin: 0;
  color: #061f33;
  font-size: 1.03rem;
  font-weight: 900;
}

.ds-confirm-row p {
  margin: 0.18rem 0 0;
  color: #526a7e;
  font-weight: 800;
}

.ds-confirm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.ds-confirm-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  color: #34495e;
  background: #fff;
  border: 1px solid rgba(125, 170, 190, 0.2);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
}

.ds-confirm-meta .is-muted {
  color: #b42318;
  background: #fff4f3;
  border-color: rgba(244, 67, 54, 0.22);
}

.ds-confirm-note {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  color: #475d70;
  background: rgba(239, 248, 255, 0.8);
  border-radius: 12px;
  font-weight: 700;
}

.ds-confirm-actions .btn,
.ds-confirm-actions form {
  margin: 0;
}

.ds-confirm-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.ds-confirm-status.pending {
  color: #9a5b00;
  background: #fff5db;
}

.ds-confirm-status.confirmed {
  color: #087443;
  background: #dcfae6;
}

.ds-confirm-status.done {
  color: #155eef;
  background: #e7f0ff;
}

.ds-confirm-status.canceled {
  color: #b42318;
  background: #fee4e2;
}

.ds-confirm-side {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 1rem;
}

.ds-confirm-card {
  padding: 1rem;
}

.ds-confirm-card > strong {
  display: block;
  color: #061f33;
  font-size: 1.05rem;
  font-weight: 900;
}

.ds-confirm-card p {
  margin: 0.35rem 0 0.75rem;
  color: #526a7e;
  font-weight: 800;
}

.ds-confirm-card.accent {
  background: linear-gradient(135deg, #07324c, #0f7de8);
  color: #fff;
}

.ds-confirm-card.accent .ds-panel-title strong,
.ds-confirm-card.accent .ds-panel-title span,
.ds-confirm-card.accent p {
  color: #fff;
}

.ds-confirm-phone-risk {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.ds-confirm-phone-risk strong {
  display: inline-grid;
  place-items: center;
  min-width: 60px;
  min-height: 60px;
  color: #b42318;
  background: #fff4f3;
  border-radius: 16px;
  font-size: 1.6rem;
  font-weight: 900;
}

.ds-confirm-phone-risk span {
  color: #526a7e;
  font-weight: 800;
}

.ds-confirm-empty {
  display: grid;
  place-items: center;
  min-height: 310px;
  padding: 2rem;
  text-align: center;
}

.ds-confirm-empty span {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: #079455;
  background: #dcfae6;
  border-radius: 20px;
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.ds-confirm-empty strong {
  color: #082a42;
  font-size: 1.25rem;
  font-weight: 900;
}

.ds-confirm-empty p {
  max-width: 430px;
  color: #65788b;
  font-weight: 800;
}

@media (max-width: 1199.98px) {
  .ds-confirm-filter,
  .ds-confirm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-confirm-layout {
    grid-template-columns: 1fr;
  }

  .ds-confirm-side {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .ds-confirm-head,
  .ds-confirm-row {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-confirm-filter,
  .ds-confirm-metrics,
  .ds-confirm-side {
    grid-template-columns: 1fr;
  }

  .ds-confirm-filter .btn,
  .ds-confirm-head-actions .btn {
    width: 100%;
  }

  .ds-confirm-item {
    grid-template-columns: 1fr;
  }

  .ds-confirm-date {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    min-height: 54px;
  }

  .ds-confirm-actions,
  .ds-confirm-actions form,
  .ds-confirm-actions .btn {
    width: 100%;
  }
}

/* Recordatorios */
.ds-reminder-page {
  display: grid;
  gap: 1rem;
}

.ds-reminder-head,
.ds-reminder-filter,
.ds-reminder-list-card,
.ds-reminder-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(125, 170, 190, 0.22);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(22, 65, 88, 0.1);
}

.ds-reminder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.45rem;
}

.ds-reminder-head h1 {
  margin: 0.15rem 0 0.3rem;
  color: #082a42;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 900;
}

.ds-reminder-head p {
  max-width: 760px;
  margin: 0;
  color: #496477;
  font-weight: 700;
}

.ds-reminder-head-actions,
.ds-reminder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ds-reminder-filter {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(260px, 1fr) auto auto;
  align-items: end;
  gap: 0.75rem;
  padding: 1rem;
}

.ds-reminder-filter label {
  color: #4d6679;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.ds-reminder-filter .form-control,
.ds-reminder-filter .form-select {
  min-height: 42px;
  border-color: rgba(15, 125, 232, 0.2);
  border-radius: 10px;
  font-weight: 800;
}

.ds-reminder-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.ds-reminder-metrics article {
  display: grid;
  gap: 0.35rem;
  min-height: 142px;
  padding: 1.1rem;
  background: #fff;
  border: 1px solid rgba(125, 170, 190, 0.2);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(22, 65, 88, 0.09);
}

.ds-reminder-metrics small,
.ds-reminder-list-card .ds-panel-title span,
.ds-reminder-card .ds-panel-title span {
  color: #65788b;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ds-reminder-metrics strong {
  color: #061f33;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.ds-reminder-metrics em {
  color: #607488;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 800;
}

.ds-reminder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.ds-reminder-list-card,
.ds-reminder-card {
  padding: 1rem;
}

.ds-reminder-list-card .ds-panel-title,
.ds-reminder-card .ds-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(125, 170, 190, 0.18);
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
}

.ds-reminder-list-card .ds-panel-title strong,
.ds-reminder-card .ds-panel-title strong {
  color: #082a42;
  font-size: 1rem;
  font-weight: 900;
}

.ds-reminder-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.65rem;
  color: #0f7de8 !important;
  background: rgba(15, 125, 232, 0.1);
  border-radius: 999px;
}

.ds-reminder-list {
  display: grid;
  gap: 0.75rem;
}

.ds-reminder-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.9rem;
  background: linear-gradient(135deg, rgba(247, 252, 255, 0.98), #fff);
  border: 1px solid rgba(15, 125, 232, 0.14);
  border-radius: 16px;
}

.ds-reminder-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #fff;
  background: linear-gradient(135deg, #0f7de8, #12b76a);
  border-radius: 18px;
  font-weight: 900;
}

.ds-reminder-body {
  min-width: 0;
}

.ds-reminder-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ds-reminder-row h2 {
  margin: 0;
  color: #061f33;
  font-size: 1.04rem;
  font-weight: 900;
}

.ds-reminder-row p,
.ds-reminder-card p {
  margin: 0.25rem 0 0;
  color: #526a7e;
  font-weight: 800;
}

.ds-reminder-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  padding: 0.4rem 0.65rem;
  color: #0f7de8;
  background: #eaf5ff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.ds-reminder-score.high {
  color: #b42318;
  background: #fff4f3;
}

.ds-reminder-meta,
.ds-reminder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.72rem 0;
}

.ds-reminder-meta span,
.ds-reminder-tags span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  color: #34495e;
  background: #fff;
  border: 1px solid rgba(125, 170, 190, 0.2);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
}

.ds-reminder-tags {
  margin-top: 0;
}

.ds-reminder-tags span {
  color: #496477;
  background: rgba(239, 248, 255, 0.72);
}

.ds-reminder-meta .is-muted {
  color: #b42318;
  background: #fff4f3;
  border-color: rgba(244, 67, 54, 0.22);
}

.ds-reminder-side {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 1rem;
}

.ds-reminder-card.accent {
  background: linear-gradient(135deg, #07324c, #0f7de8);
}

.ds-reminder-card.accent .ds-panel-title strong,
.ds-reminder-card.accent .ds-panel-title span,
.ds-reminder-card.accent p {
  color: #fff;
}

.ds-reminder-progress {
  overflow: hidden;
  height: 12px;
  background: #e7f0ff;
  border-radius: 999px;
}

.ds-reminder-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f7de8, #12b76a);
  border-radius: inherit;
}

.ds-reminder-empty {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 2rem;
  text-align: center;
}

.ds-reminder-empty span {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: #079455;
  background: #dcfae6;
  border-radius: 20px;
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.ds-reminder-empty strong {
  color: #082a42;
  font-size: 1.25rem;
  font-weight: 900;
}

.ds-reminder-empty p {
  max-width: 430px;
  color: #65788b;
  font-weight: 800;
}

@media (max-width: 1199.98px) {
  .ds-reminder-filter,
  .ds-reminder-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-reminder-layout {
    grid-template-columns: 1fr;
  }

  .ds-reminder-side {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .ds-reminder-head,
  .ds-reminder-row {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-reminder-filter,
  .ds-reminder-metrics,
  .ds-reminder-side {
    grid-template-columns: 1fr;
  }

  .ds-reminder-filter .btn,
  .ds-reminder-head-actions .btn {
    width: 100%;
  }

  .ds-reminder-item {
    grid-template-columns: 1fr;
  }

  .ds-reminder-actions,
  .ds-reminder-actions .btn {
    width: 100%;
  }
}

/* Reportes */
.ds-report-page {
  display: grid;
  gap: 1rem;
}

.ds-report-head,
.ds-report-toolbar,
.ds-report-compare,
.ds-report-chart-card,
.ds-report-card,
.ds-report-kpis article {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(125, 170, 190, 0.22);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(22, 65, 88, 0.1);
}

.ds-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.45rem;
}

.ds-report-head h1 {
  margin: 0.15rem 0 0.3rem;
  color: #082a42;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 900;
}

.ds-report-head p {
  max-width: 760px;
  margin: 0;
  color: #496477;
  font-weight: 700;
}

.ds-report-actions,
.ds-report-toolbar,
.ds-report-toolbar nav,
.ds-report-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.ds-report-toolbar {
  padding: 0.85rem 1rem;
}

.ds-report-toolbar nav {
  padding: 0.25rem;
  background: #eef8ff;
  border-radius: 999px;
}

.ds-report-toolbar nav a {
  padding: 0.45rem 0.9rem;
  color: #526a7e;
  border-radius: 999px;
  font-weight: 900;
}

.ds-report-toolbar nav a.active {
  color: #0f7de8;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 125, 232, 0.15);
}

.ds-report-toolbar > strong {
  color: #082a42;
  font-weight: 900;
}

.ds-report-nav {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #0f7de8;
  background: #eef8ff;
  border-radius: 999px;
}

.ds-report-custom .form-control {
  min-height: 40px;
  width: 150px;
  border-radius: 10px;
  font-weight: 800;
}

.ds-report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.ds-report-kpis article {
  display: grid;
  gap: 0.35rem;
  min-height: 142px;
  padding: 1.1rem;
}

.ds-report-kpis small,
.ds-report-card .ds-panel-title span,
.ds-report-chart-card .ds-panel-title span,
.ds-report-compare small {
  color: #65788b;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ds-report-kpis strong {
  color: #061f33;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.08;
}

.ds-report-kpis strong.is-green,
.ds-report-compare .is-green {
  color: #087443;
}

.ds-report-kpis strong.is-red,
.ds-report-compare .is-red {
  color: #b42318;
}

.ds-report-kpis em {
  color: #607488;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 800;
}

.ds-report-compare {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
}

.ds-report-compare strong {
  display: block;
  color: #061f33;
  font-size: 1.15rem;
  font-weight: 900;
}

.ds-report-compare span {
  color: #526a7e;
  font-weight: 800;
}

.ds-report-chart-card,
.ds-report-card {
  padding: 1rem;
}

.ds-report-chart-card .ds-panel-title,
.ds-report-card .ds-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(125, 170, 190, 0.18);
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
}

.ds-report-chart-card .ds-panel-title strong,
.ds-report-card .ds-panel-title strong {
  color: #082a42;
  font-size: 1rem;
  font-weight: 900;
}

.ds-report-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  align-items: end;
  min-height: 260px;
  gap: 0.7rem;
  padding-top: 0.8rem;
}

.ds-report-day {
  display: grid;
  gap: 0.4rem;
  text-align: center;
}

.ds-report-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.22rem;
  height: 180px;
  padding: 0.65rem;
  background: linear-gradient(180deg, #f7fcff, #eef8ff);
  border: 1px solid rgba(125, 170, 190, 0.18);
  border-radius: 14px;
}

.ds-report-bars span {
  width: 18px;
  min-height: 4px;
  border-radius: 999px 999px 4px 4px;
}

.ds-report-bars .income {
  background: linear-gradient(180deg, #12b76a, #087443);
}

.ds-report-bars .expense {
  background: linear-gradient(180deg, #fb7185, #e11d48);
}

.ds-report-day strong {
  color: #082a42;
  font-size: 0.82rem;
  font-weight: 900;
}

.ds-report-day small {
  color: #526a7e;
  font-weight: 800;
}

.ds-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ds-report-list {
  display: grid;
  gap: 0.8rem;
}

.ds-report-list div {
  display: grid;
  gap: 0.35rem;
}

.ds-report-list span {
  color: #082a42;
  font-weight: 900;
}

.ds-report-list b {
  color: #087443;
  font-weight: 900;
}

.ds-report-list em {
  display: block;
  overflow: hidden;
  height: 8px;
  background: #e7f0ff;
  border-radius: 999px;
}

.ds-report-list em i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f7de8, #12b76a);
  border-radius: inherit;
}

.ds-report-muted,
.ds-report-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  margin: 0;
  color: #65788b;
  font-weight: 800;
  text-align: center;
}

.ds-report-table {
  margin-bottom: 0;
}

.ds-report-table th {
  color: #496477;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ds-report-table td {
  color: #34495e;
  font-weight: 800;
  vertical-align: middle;
}

.ds-report-type {
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
}

.ds-report-type.ingreso {
  color: #087443;
  background: #dcfae6;
}

.ds-report-type.egreso {
  color: #b42318;
  background: #fee4e2;
}

@media (max-width: 1199.98px) {
  .ds-report-kpis,
  .ds-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .ds-report-head,
  .ds-report-compare {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-report-kpis,
  .ds-report-grid {
    grid-template-columns: 1fr;
  }

  .ds-report-actions .btn,
  .ds-report-custom,
  .ds-report-custom .form-control,
  .ds-report-custom .btn {
    width: 100%;
  }
}

@media print {
  .ds-report-actions,
  .ds-report-toolbar,
  #sidebar,
  footer {
    display: none !important;
  }

  .ds-report-head,
  .ds-report-toolbar,
  .ds-report-compare,
  .ds-report-chart-card,
  .ds-report-card,
  .ds-report-kpis article {
    box-shadow: none !important;
  }
}

/* Caja */
.ds-cash-page {
  display: grid;
  gap: 1rem;
}

.ds-cash-head,
.ds-cash-register,
.ds-cash-filters,
.ds-cash-kpis article,
.ds-cash-movements,
.ds-cash-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(125, 170, 190, 0.22);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(22, 65, 88, 0.1);
}

.ds-cash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.45rem;
}

.ds-cash-head h1 {
  margin: 0.15rem 0 0.3rem;
  color: #082a42;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 900;
}

.ds-cash-head p {
  max-width: 720px;
  margin: 0;
  color: #496477;
  font-weight: 700;
}

.ds-cash-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ds-cash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 1rem;
  align-items: start;
}

.ds-cash-layout > main {
  display: grid;
  gap: 1rem;
}

.ds-cash-register,
.ds-cash-movements,
.ds-cash-card {
  padding: 1rem;
}

.ds-cash-register .ds-panel-title,
.ds-cash-movements .ds-panel-title,
.ds-cash-card .ds-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(125, 170, 190, 0.18);
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
}

.ds-cash-register .ds-panel-title strong,
.ds-cash-movements .ds-panel-title strong,
.ds-cash-card .ds-panel-title strong {
  color: #082a42;
  font-size: 1rem;
  font-weight: 900;
}

.ds-cash-register .ds-panel-title span,
.ds-cash-movements .ds-panel-title span,
.ds-cash-card .ds-panel-title span {
  color: #65788b;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ds-cash-form-grid {
  display: grid;
  grid-template-columns: 220px minmax(260px, 1fr) 160px repeat(3, minmax(150px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.ds-cash-form-grid label,
.ds-cash-type label {
  color: #4d6679;
  font-size: 0.78rem;
  font-weight: 900;
}

.ds-cash-form-grid .wide {
  grid-column: span 2;
}

.ds-cash-form-grid .form-control,
.ds-cash-form-grid .form-select,
.ds-cash-filters .form-control,
.ds-cash-filters .form-select {
  min-height: 42px;
  border-color: rgba(15, 125, 232, 0.2);
  border-radius: 10px;
  font-weight: 800;
}

.ds-cash-type > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.ds-cash-type button {
  min-height: 42px;
  color: #526a7e;
  background: #fff;
  border: 1px solid rgba(125, 170, 190, 0.26);
  border-radius: 10px;
  font-weight: 900;
}

.ds-cash-type button.active {
  color: #fff;
  background: linear-gradient(135deg, #0f7de8, #12b76a);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(15, 125, 232, 0.22);
}

.ds-cash-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) repeat(2, minmax(140px, 1fr)) minmax(190px, 1fr) auto auto auto;
  gap: 0.65rem;
  padding: 0.85rem;
}

.ds-cash-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.ds-cash-kpis article {
  min-height: 112px;
  padding: 1rem;
}

.ds-cash-kpis span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-cash-kpis strong {
  display: block;
  color: #061f33;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1;
}

.ds-cash-kpis small {
  display: block;
  margin-top: 0.55rem;
  color: #607488;
  font-weight: 800;
}

.ds-cash-kpis .income {
  background: #ecfdf3;
  border-color: #abefc6;
}

.ds-cash-kpis .income span,
.ds-cash-kpis .income strong,
.ds-cash-table .is-green,
.ds-cash-bars .is-green {
  color: #087443;
}

.ds-cash-kpis .expense {
  background: #fff4f3;
  border-color: #fecdca;
}

.ds-cash-kpis .expense span,
.ds-cash-kpis .expense strong,
.ds-cash-table .is-red,
.ds-cash-bars .is-red {
  color: #b42318;
}

.ds-cash-kpis .balance {
  background: #eef8ff;
}

.ds-cash-side {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 1rem;
}

.ds-cash-table {
  margin-bottom: 0;
}

.ds-cash-table th {
  color: #496477;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ds-cash-table td {
  color: #34495e;
  font-weight: 800;
  vertical-align: middle;
}

.ds-cash-table td small {
  display: block;
  color: #7a8da0;
}

.ds-cash-badge {
  display: inline-flex;
  margin-left: 0.35rem;
  padding: 0.22rem 0.45rem;
  color: #0f7de8;
  background: #eaf5ff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.ds-cash-empty {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 2rem;
  text-align: center;
}

.ds-cash-empty span {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 0.8rem;
  color: #0f7de8;
  background: #eaf5ff;
  border-radius: 20px;
  font-size: 2rem;
}

.ds-cash-empty strong {
  color: #082a42;
  font-size: 1.2rem;
  font-weight: 900;
}

.ds-cash-empty p,
.ds-cash-muted {
  color: #65788b;
  font-weight: 800;
}

.ds-cash-bars {
  display: grid;
  gap: 0.85rem;
}

.ds-cash-bars div {
  display: grid;
  gap: 0.35rem;
}

.ds-cash-bars span {
  color: #082a42;
  font-weight: 900;
}

.ds-cash-bars b {
  color: #087443;
  font-weight: 900;
}

.ds-cash-bars em {
  display: block;
  overflow: hidden;
  height: 8px;
  background: #e7f0ff;
  border-radius: 999px;
}

.ds-cash-bars em i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f7de8, #12b76a);
  border-radius: inherit;
}

@media (max-width: 1399.98px) {
  .ds-cash-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ds-cash-form-grid .wide {
    grid-column: span 2;
  }

  .ds-cash-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .ds-cash-layout {
    grid-template-columns: 1fr;
  }

  .ds-cash-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .ds-cash-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-cash-head-actions .btn,
  .ds-cash-form-grid .btn,
  .ds-cash-filters .btn {
    width: 100%;
  }

  .ds-cash-form-grid,
  .ds-cash-filters,
  .ds-cash-kpis,
  .ds-cash-side {
    grid-template-columns: 1fr;
  }

  .ds-cash-form-grid .wide {
    grid-column: auto;
  }
}

/* Indicaciones postoperatorias */
.ds-indications-page {
  max-width: 1540px;
  margin: 0 auto;
}

.ds-indications-head,
.ds-indication-card,
.ds-indications-panel,
.ds-indication-print {
  border: 1px solid rgba(14, 116, 144, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
}

.ds-indications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.25rem 1.35rem;
}

.ds-indications-head h1 {
  margin: 0.2rem 0 0.35rem;
  color: #092239;
  font-size: clamp(1.75rem, 3vw, 2.85rem);
  font-weight: 900;
  line-height: 1;
}

.ds-indications-head p,
.ds-indications-panel p,
.ds-indication-card p {
  margin: 0;
  color: #53677c;
  font-weight: 700;
}

.ds-indications-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 1rem;
  align-items: start;
}

.ds-indications-main {
  min-width: 0;
}

.ds-indications-filters {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.ds-indications-filters button {
  flex: 0 0 auto;
  border: 1px solid #d8e6f0;
  border-radius: 999px;
  background: #fff;
  color: #37536b;
  padding: 0.55rem 0.95rem;
  font-weight: 900;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.ds-indications-filters button.active,
.ds-indications-filters button:hover {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
  color: #fff;
  transform: translateY(-1px);
}

.ds-indications-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ds-indication-card {
  display: grid;
  align-content: start;
  gap: 0.95rem;
  overflow: hidden;
  padding: 1rem;
}

.ds-indication-card[hidden] {
  display: none;
}

.ds-indication-card header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.ds-indication-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 1.2rem;
}

.ds-indication-card h2 {
  margin: 0 0 0.15rem;
  color: #0f172a;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.15;
}

.ds-indication-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ds-indication-tags span {
  border: 1px solid #b8def8;
  border-radius: 999px;
  background: #eff8ff;
  color: #0369a1;
  padding: 0.25rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 900;
}

.ds-indication-alert {
  display: grid;
  gap: 0.25rem;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff5f5;
  padding: 0.8rem;
  color: #b91c1c;
}

.ds-indication-alert strong {
  color: #dc2626;
  font-weight: 900;
}

.ds-indication-alert span {
  font-weight: 800;
  line-height: 1.35;
}

.ds-indication-card section {
  border-top: 1px solid #e6eef5;
  padding-top: 0.75rem;
}

.ds-indication-card h3 {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0.35rem;
  align-items: start;
  margin: 0 0 0.45rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-indication-card h3 i {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #0f7de8;
  font-size: 0.95rem;
  line-height: 1;
}

.ds-indication-card h3 i::before {
  line-height: 1;
}

.ds-indication-card ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.05rem;
  color: #334155;
  font-weight: 700;
}

.ds-indication-card li {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 0.35rem;
}

.ds-indication-card li::marker {
  color: #0f7de8;
}

.ds-indication-use {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #111827;
  font-weight: 900;
}

.ds-indications-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.ds-indications-panel h2 {
  margin: 0;
  color: #092239;
  font-size: 1.15rem;
  font-weight: 900;
}

.ds-indications-panel label {
  display: grid;
  gap: 0.35rem;
  color: #42566b;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ds-indication-selected {
  display: grid;
  gap: 0.15rem;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
  padding: 0.85rem;
}

.ds-indication-selected small {
  color: #64748b;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ds-indication-selected strong {
  color: #0f172a;
  font-weight: 900;
}

.ds-indication-selected span {
  color: #64748b;
  font-weight: 700;
}

.ds-indication-print {
  display: none;
  margin-top: 1rem;
  padding: 1.1rem;
}

.ds-print-alert {
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff5f5;
  margin: 0.75rem 0;
  padding: 0.8rem;
}

.ds-print-alert strong {
  color: #b91c1c;
}

.ds-indication-signature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

.ds-indication-signature span {
  border-top: 1px solid #111827;
  padding-top: 0.35rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 1399.98px) {
  .ds-indications-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .ds-indications-layout {
    grid-template-columns: 1fr;
  }

  .ds-indications-panel {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .ds-indications-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-indications-head .btn {
    width: 100%;
  }

  .ds-indications-cards {
    grid-template-columns: 1fr;
  }
}

@media print {
  .ds-indication-print {
    display: block !important;
    background: #fff !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 12mm;
  }
}

/* DentiSoft Aurora redesign */
:root {
  --ds-ink: #0f172a;
  --ds-ink-2: #102a43;
  --ds-muted: #64748b;
  --ds-soft: #8aa4b8;
  --ds-line: #dbe7ef;
  --ds-line-strong: #bfd3df;
  --ds-panel: #ffffff;
  --ds-bg: #f4f9fc;
  --ds-green: #102a43;
  --ds-green-2: #0f5e7a;
  --ds-mint: #b9f3ff;
  --ds-orange: #0ea5e9;
  --ds-orange-soft: #e0f7ff;
  --ds-blue: #2563eb;
  --ds-red: #e11d48;
  --ds-yellow: #f59e0b;
  --ds-shadow: 0 22px 55px rgba(15, 42, 67, 0.12);
  --ds-shadow-soft: 0 12px 30px rgba(15, 42, 67, 0.08);
}

body:not(.ds-login-body) {
  background:
    radial-gradient(circle at 82% 8%, rgba(14, 165, 233, 0.12), transparent 34%),
    radial-gradient(circle at 12% 16%, rgba(45, 212, 191, 0.10), transparent 28%),
    linear-gradient(135deg, #f8fcff 0%, #eef8fb 54%, #fffaf6 100%) !important;
  color: var(--ds-ink);
}

#app,
#main,
.page-content {
  background: transparent !important;
}

#sidebar {
  background: rgba(255, 255, 255, 0.92) !important;
  border-right: 1px solid rgba(191, 211, 223, 0.7);
  box-shadow: 16px 0 45px rgba(15, 42, 67, 0.06);
  backdrop-filter: blur(16px);
}

#sidebar .sidebar-wrapper {
  background: transparent !important;
}

#sidebar .sidebar-header img {
  max-height: 42px;
  width: auto;
}

#sidebar .menu .sidebar-link {
  border-radius: 14px;
  color: #516a7b;
  font-weight: 800;
  letter-spacing: 0;
}

#sidebar .menu .sidebar-link i,
#sidebar .menu .sidebar-link svg {
  color: #7b94a5;
}

#sidebar .menu .sidebar-item.active > .sidebar-link,
#sidebar .menu .sidebar-link:hover {
  background: linear-gradient(135deg, #dff7ff 0%, #eefcff 100%) !important;
  color: #075985 !important;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.14);
}

#sidebar .menu .sidebar-item.active > .sidebar-link i,
#sidebar .menu .sidebar-item.active > .sidebar-link svg {
  color: #0ea5e9 !important;
}

.navbar,
.header-navbar {
  background: rgba(255, 255, 255, 0.78) !important;
  border-bottom: 1px solid rgba(191, 211, 223, 0.64);
  backdrop-filter: blur(18px);
}

.burger-btn,
.navbar .nav-link,
.navbar a {
  color: #075985 !important;
}

.avatar,
.avatar img,
.dropdown .avatar {
  border-radius: 16px !important;
}

.card,
.table-responsive,
.dataTable-container,
.ds-card,
.ds-action-list,
.ds-module-card,
.modal-content {
  border: 1px solid rgba(191, 211, 223, 0.76) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: var(--ds-shadow-soft) !important;
}

h1,
h2,
h3,
h4,
h5,
.page-heading h3,
.card-title {
  color: #082f49 !important;
  letter-spacing: 0;
}

.btn {
  border-radius: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.btn-primary,
.btn-success,
.btn-warning,
.buttons-excel,
.ds-command,
.ds-action-list a:first-child {
  border: 0 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%) !important;
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.18) !important;
}

.btn-danger,
.buttons-pdf {
  border: 0 !important;
  background: linear-gradient(135deg, #e11d48 0%, #fb7185 100%) !important;
  box-shadow: 0 16px 28px rgba(225, 29, 72, 0.16) !important;
}

.btn-info {
  border: 0 !important;
  background: linear-gradient(135deg, #06b6d4 0%, #38bdf8 100%) !important;
  color: #082f49 !important;
}

.btn-secondary {
  border: 0 !important;
  background: linear-gradient(135deg, #64748b 0%, #334155 100%) !important;
}

.form-control,
.form-select,
.dataTable-selector,
.dataTable-input,
input,
select,
textarea {
  border-color: #cfe0ea !important;
  border-radius: 12px !important;
}

.form-control:focus,
.form-select:focus,
.dataTable-input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.15) !important;
}

.table,
.dataTable-table {
  color: var(--ds-ink);
}

.table thead th,
.dataTable-table thead th {
  background: #eff8fc !important;
  color: #075985 !important;
  border-color: #d8e9f2 !important;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table tbody tr,
.dataTable-table tbody tr {
  background: rgba(255, 255, 255, 0.88) !important;
}

.table tbody tr:nth-child(odd),
.dataTable-table tbody tr:nth-child(odd) {
  background: rgba(239, 248, 252, 0.72) !important;
}

.fc .fc-toolbar-title,
.fc-toolbar-title {
  color: #082f49 !important;
  font-weight: 900;
}

.fc .fc-button-primary {
  background: #102a43 !important;
  border-color: #102a43 !important;
  border-radius: 10px !important;
}

.fc-event,
.fc-daygrid-event {
  border: 0 !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%) !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.ds-hero {
  background:
    radial-gradient(circle at 86% 18%, rgba(56, 189, 248, 0.26), transparent 30%),
    radial-gradient(circle at 72% 78%, rgba(45, 212, 191, 0.18), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #102a43 54%, #075985 100%) !important;
}

.ds-hero h1 {
  color: #fff !important;
}

.ds-hero p,
.ds-hero .ds-eyebrow {
  color: rgba(236, 254, 255, 0.84) !important;
}

.ds-network {
  background:
    radial-gradient(circle at 50% 45%, rgba(14, 165, 233, 0.16), transparent 38%),
    linear-gradient(135deg, #ffffff 0%, #f4fbff 100%) !important;
}

.ds-network-center {
  background: #102a43 !important;
  box-shadow: 0 24px 50px rgba(15, 42, 67, 0.18) !important;
}

.ds-network-node {
  color: #102a43 !important;
}

.ds-network-node i {
  color: #0ea5e9 !important;
}

.ds-login-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(56, 189, 248, 0.30), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(45, 212, 191, 0.18), transparent 28%),
    linear-gradient(135deg, #071827 0%, #0f172a 42%, #082f49 100%) !important;
  color: #ecfeff;
}

.ds-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 520px) 1fr;
  gap: clamp(1.5rem, 4vw, 5rem);
  align-items: center;
  padding: clamp(1.25rem, 4vw, 4.5rem);
}

.ds-login-panel {
  width: 100%;
  max-width: 500px;
}

.ds-login-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 3rem;
}

.ds-login-brand img {
  width: 174px;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(14, 165, 233, 0.18));
}

.ds-login-brand span {
  color: #93c5fd;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ds-login-copy {
  margin-bottom: 1.5rem;
}

.ds-login-copy .ds-eyebrow {
  color: #67e8f9;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.ds-login-copy h1 {
  margin: 0.65rem 0;
  color: #fff !important;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 0.95;
  font-weight: 900;
}

.ds-login-copy p {
  max-width: 430px;
  color: #bdd7e8;
  font-size: 1.04rem;
  line-height: 1.7;
}

.ds-login-card {
  padding: 1.25rem;
  border: 1px solid rgba(148, 210, 230, 0.28);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.ds-login-card label {
  display: block;
  margin: 0.25rem 0 0.45rem;
  color: #dff7ff;
  font-weight: 900;
}

.ds-login-field {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding: 0 0.9rem;
  min-height: 54px;
  border: 1px solid rgba(207, 224, 234, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
}

.ds-login-field i {
  color: #0284c7;
  font-size: 1.2rem;
}

.ds-login-field input {
  width: 100%;
  height: 50px;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #0f172a;
  font-weight: 800;
}

.ds-login-card .btn {
  min-height: 54px;
  margin-top: 0.25rem;
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%) !important;
}

.ds-login-alert {
  margin: 0 0 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(251, 113, 133, 0.35);
  border-radius: 14px;
  background: rgba(225, 29, 72, 0.16);
  color: #ffe4e6;
  font-weight: 800;
}

.ds-login-link {
  display: inline-flex;
  margin-top: 1rem;
  color: #a5f3fc;
  font-weight: 900;
}

.ds-login-showcase {
  min-height: min(74vh, 720px);
  border: 1px solid rgba(148, 210, 230, 0.18);
  border-radius: 36px;
  background:
    radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.25), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 30px 90px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.ds-orbit {
  width: min(540px, 80vw);
  aspect-ratio: 1;
  border: 1px solid rgba(186, 230, 253, 0.28);
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
}

.ds-orbit::before,
.ds-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(186, 230, 253, 0.18);
  border-radius: 999px;
}

.ds-orbit::before {
  inset: 13%;
}

.ds-orbit::after {
  inset: 28%;
}

.ds-orbit img {
  width: 118px;
  height: 118px;
  z-index: 2;
  filter: drop-shadow(0 26px 44px rgba(14, 165, 233, 0.30));
}

.ds-orbit span {
  position: absolute;
  min-width: 122px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(186, 230, 253, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #e0f7ff;
  font-weight: 900;
  text-align: center;
  backdrop-filter: blur(14px);
}

.ds-orbit span:nth-of-type(1) {
  top: 3%;
  left: 50%;
  transform: translateX(-50%);
}

.ds-orbit span:nth-of-type(2) {
  left: -6%;
  top: 50%;
  transform: translateY(-50%);
}

.ds-orbit span:nth-of-type(3) {
  right: -4%;
  top: 50%;
  transform: translateY(-50%);
}

.ds-orbit span:nth-of-type(4) {
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 991.98px) {
  .ds-login {
    grid-template-columns: 1fr;
    padding: 1.1rem;
  }

  .ds-login-panel {
    max-width: 100%;
  }

  .ds-login-brand {
    margin-bottom: 1.5rem;
  }

  .ds-login-showcase {
    min-height: 360px;
    border-radius: 24px;
  }
}

@media (max-width: 575.98px) {
  .ds-login-copy h1 {
    font-size: 2.35rem;
  }

  .ds-login-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .ds-login-card {
    border-radius: 20px;
    padding: 1rem;
  }

  .ds-login-showcase {
    display: none;
  }
}

* {
  letter-spacing: 0 !important;
}

body {
  background:
    radial-gradient(circle at top right, rgba(255, 107, 26, 0.045), transparent 28rem),
    linear-gradient(180deg, #fbfdfc 0%, #f6faf8 100%);
  color: var(--ds-ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 15px;
}

a {
  color: var(--ds-green-2);
}

.btn {
  min-height: 38px;
  border-radius: 9px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  line-height: 1.1;
  box-shadow: none !important;
}

.btn-primary {
  background: var(--ds-orange) !important;
  border-color: var(--ds-orange) !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #eb5b0d !important;
  border-color: #eb5b0d !important;
}

.btn-light-primary {
  background: var(--ds-orange-soft) !important;
  color: var(--ds-orange) !important;
}

.btn-success {
  background: #159463 !important;
  border-color: #159463 !important;
}

.btn-warning {
  background: var(--ds-yellow) !important;
  border-color: var(--ds-yellow) !important;
  color: #3f2f00 !important;
}

.btn-danger {
  background: var(--ds-red) !important;
  border-color: var(--ds-red) !important;
}

.btn-secondary {
  background: #64748b !important;
  border-color: #64748b !important;
}

.card {
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius);
  box-shadow: var(--ds-shadow-soft);
  background: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.25rem;
}

.card .card-header {
  background: transparent;
}

.form-control,
.form-select,
.dataTable-input {
  min-height: 42px;
  border-radius: 9px;
  border-color: var(--ds-line);
  background-color: #fbfdfc;
}

.form-control:focus,
.form-select:focus,
.dataTable-input:focus {
  border-color: var(--ds-green-2);
  box-shadow: 0 0 0 4px rgba(13, 90, 72, 0.11);
}

.table {
  color: var(--ds-ink);
  margin-bottom: 0;
}

.table thead th,
.dataTable-table thead th {
  color: var(--ds-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  background: #f8fbfa;
  border-bottom-color: var(--ds-line-strong) !important;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  white-space: nowrap;
}

.table td,
.dataTable-table td {
  padding: 0.7rem 0.75rem;
  border-color: #eef3f1;
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.table tbody tr:hover {
  background: #f8fbfa;
}

#sidebar .sidebar-wrapper {
  width: 260px;
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid var(--ds-line);
  box-shadow: 14px 0 42px rgba(8, 63, 50, 0.04);
}

#main {
  margin-left: 260px;
}

.sidebar-wrapper .sidebar-header {
  padding: 1.3rem 1.35rem 0.65rem;
}

.sidebar-wrapper .sidebar-header .logo a {
  display: inline-flex;
  align-items: center;
}

.ds-logo {
  width: 150px;
  max-width: 100%;
  height: auto;
}

.sidebar-wrapper .menu {
  margin-top: 1rem;
  padding: 0 1rem 1.2rem;
}

.sidebar-wrapper .menu .sidebar-item {
  margin-top: 0.25rem;
}

.sidebar-wrapper .menu .sidebar-link {
  border-radius: 10px;
  color: var(--ds-muted);
  font-size: 0.88rem;
  font-weight: 750;
  padding: 0.68rem 0.8rem;
}

.sidebar-wrapper .menu .sidebar-link i,
.sidebar-wrapper .menu .sidebar-link svg {
  color: #8aa098;
}

.sidebar-wrapper .menu .sidebar-link span {
  margin-left: 0.75rem;
}

.sidebar-wrapper .menu .sidebar-link:hover {
  background: #f3f8f6;
  color: var(--ds-green);
}

.sidebar-wrapper .menu .sidebar-item.active > .sidebar-link,
.sidebar-wrapper .menu .sidebar-item.active > .sidebar-link.has-sub {
  background: var(--ds-orange-soft);
  color: var(--ds-orange);
  box-shadow: none;
}

.sidebar-wrapper .menu .sidebar-item.active .sidebar-link span,
.sidebar-wrapper .menu .sidebar-item.active .sidebar-link i,
.sidebar-wrapper .menu .sidebar-item.active .sidebar-link svg {
  color: var(--ds-orange);
  fill: var(--ds-orange);
}

.sidebar-wrapper .menu .submenu {
  padding-left: 0.6rem;
}

.sidebar-wrapper .menu .submenu .submenu-item a {
  border-left: 2px solid var(--ds-line);
  color: var(--ds-muted);
}

.navbar {
  height: 64px;
  padding: 0.8rem 1.45rem;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--ds-line);
  backdrop-filter: blur(16px);
}

.navbar .user-name h6 {
  color: var(--ds-green) !important;
  font-weight: 900;
}

.avatar img,
.avatar .avatar-content {
  background: var(--ds-orange);
  border: 2px solid #fff;
  box-shadow: 0 8px 20px rgba(255, 107, 26, 0.22);
}

#main #main-content {
  padding: 1.35rem;
}

.page-heading h3,
.section h3 {
  color: var(--ds-ink);
  font-weight: 850;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  margin-bottom: 0.7rem;
}

.badge {
  border-radius: 999px;
  font-weight: 800;
}

.bg-light-success {
  background: #e7fbf0 !important;
  color: #127044 !important;
}

.bg-light-warning {
  background: #fff4dc !important;
  color: #935a00 !important;
}

.bg-light-danger {
  background: #ffe8e6 !important;
  color: #aa2b20 !important;
}

.modal .modal-content {
  border-radius: 14px;
  border: 1px solid var(--ds-line);
  box-shadow: 0 24px 70px rgba(8, 31, 26, 0.22);
}

.modal .modal-header.bg-info,
.modal .modal-header.bg-danger {
  background: var(--ds-green) !important;
}

.footer {
  color: var(--ds-muted);
}

.ds-dashboard {
  display: grid;
  gap: 1.05rem;
}

.ds-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--ds-line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 107, 26, 0.08), transparent 16rem),
    #ffffff;
  box-shadow: var(--ds-shadow-soft);
}

.ds-command h1 {
  margin: 0.25rem 0 0.2rem;
  color: var(--ds-green);
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 850;
}

.ds-command p {
  margin: 0;
  color: var(--ds-muted);
  font-weight: 650;
}

.ds-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.ds-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
  align-items: stretch;
}

.ds-hero-main {
  min-height: 190px;
  border-radius: 16px;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 107, 26, 0.18), transparent 10rem),
    linear-gradient(135deg, #093c31 0%, #0b5748 100%);
  color: white;
  overflow: hidden;
  position: relative;
}

.ds-hero-main:after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -5rem;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.ds-eyebrow {
  color: #ffb37f;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ds-hero-main h1 {
  max-width: 720px;
  margin: 0.8rem 0 0.6rem;
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  font-weight: 850;
  line-height: 1.05;
}

.ds-hero-main p {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
}

.ds-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.ds-hero-actions .btn {
  min-height: 42px;
}

.ds-hero-side {
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid var(--ds-line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--ds-shadow);
}

.ds-system-map {
  min-height: 198px;
  position: relative;
  display: grid;
  place-items: center;
}

.ds-system-map:before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px solid var(--ds-line);
}

.ds-system-map img {
  width: 74px;
  height: 74px;
  z-index: 1;
}

.ds-node {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.55rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ds-line);
  color: var(--ds-muted);
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(8, 63, 50, 0.07);
}

.ds-node:nth-child(2) { top: 4px; left: 28%; }
.ds-node:nth-child(3) { top: 48%; right: 2px; }
.ds-node:nth-child(4) { bottom: 4px; left: 26%; }
.ds-node:nth-child(5) { top: 48%; left: 2px; }

.ds-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 1rem;
}

.ds-stat-card {
  border-radius: 13px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--ds-line);
  background: #fff;
  box-shadow: var(--ds-shadow-soft);
}

.ds-stat-card span {
  color: var(--ds-muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ds-stat-card strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--ds-green);
  font-size: 1.75rem;
  font-weight: 850;
}

.ds-stat-card small {
  display: block;
  margin-top: 0.2rem;
  color: var(--ds-soft);
  font-weight: 650;
}

.ds-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 1rem;
}

.ds-panel {
  border-radius: 13px;
  border: 1px solid var(--ds-line);
  background: #fff;
  box-shadow: var(--ds-shadow-soft);
  padding: 1rem;
}

.ds-panel h5 {
  color: var(--ds-green);
  font-weight: 850;
  margin-bottom: 1rem;
}

.ds-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.ds-panel-title h5 {
  margin: 0;
}

.ds-panel-title a {
  color: var(--ds-orange);
  font-size: 0.86rem;
  font-weight: 800;
}

.ds-quick-list {
  display: grid;
  gap: 0.65rem;
}

.ds-quick-list a,
.ds-timeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--ds-line);
  color: var(--ds-ink);
  background: #fbfdfc;
}

.ds-timeline-row small {
  color: var(--ds-muted);
  font-weight: 800;
}

.ds-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--ds-orange);
  flex: 0 0 auto;
}

.ds-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 1rem;
}

.ds-module {
  display: grid;
  gap: 0.35rem;
  min-height: 132px;
  padding: 1rem;
  border: 1px solid var(--ds-line);
  border-radius: 14px;
  background: #fff;
  color: var(--ds-ink);
  box-shadow: var(--ds-shadow-soft);
}

.ds-module:hover {
  border-color: rgba(255, 107, 26, 0.38);
  transform: translateY(-1px);
}

.ds-module i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--ds-orange-soft);
  color: var(--ds-orange);
}

.ds-module strong {
  color: var(--ds-green);
  font-size: 1.05rem;
  font-weight: 850;
}

.ds-module span {
  color: var(--ds-muted);
  font-size: 0.9rem;
  font-weight: 650;
}

#auth {
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 107, 26, 0.16), transparent 24rem),
    linear-gradient(135deg, #f7fbf9 0%, #edf5f2 100%);
}

#auth #auth-left {
  padding: 4rem min(7vw, 7rem);
}

#auth #auth-left h1 {
  color: var(--ds-green);
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 900;
  letter-spacing: 0;
}

#auth #auth-left h1:after {
  content: "Tu clinica completa en un solo sistema.";
  display: block;
  max-width: 420px;
  margin-top: 0.8rem;
  color: var(--ds-muted);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.5;
}

#auth #auth-left:before {
  content: "";
  display: block;
  width: 210px;
  height: 56px;
  margin-bottom: 3rem;
  background: url("../images/dentisoft-logo.svg") left center / contain no-repeat;
}

#auth #auth-left form {
  max-width: 430px;
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--ds-line);
  box-shadow: var(--ds-shadow);
}

#auth #auth-right {
  background:
    radial-gradient(circle at 58% 42%, rgba(255, 107, 26, 0.34), transparent 10rem),
    linear-gradient(145deg, #083f32 0%, #0a2f27 100%) !important;
  position: relative;
}

#auth #auth-right:before {
  content: "";
  position: absolute;
  inset: 10%;
  background: url("../images/dentisoft-mark.svg") center / 180px no-repeat;
  opacity: 0.96;
}

#auth #auth-right:after {
  content: "Agenda, pacientes, tratamientos y cobros conectados.";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 14%;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
}

@media screen and (max-width: 1199px) {
  #main {
    margin-left: 0;
  }
}

@media screen and (max-width: 991px) {
  .ds-hero,
  .ds-work-grid {
    grid-template-columns: 1fr;
  }

  .ds-stat-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .ds-command {
    align-items: flex-start;
    flex-direction: column;
  }

  .ds-command-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .ds-module-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media screen and (max-width: 767px) {
  #auth #auth-left {
    padding: 2rem;
  }

  .ds-stat-grid {
    grid-template-columns: 1fr;
  }

  .ds-command-actions .btn {
    flex: 1 1 100%;
  }

  .ds-module-grid {
    grid-template-columns: 1fr;
  }
}

/* Professional workspace layer */
.page-content {
  padding: 0;
}

.section {
  max-width: 1500px;
  margin: 0 auto;
}

.ds-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--ds-line);
}

.ds-page-header h3 {
  margin: 0.2rem 0 0.15rem;
}

.ds-page-header p {
  margin: 0;
  color: var(--ds-muted);
  font-weight: 650;
}

.ds-page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.ds-page-actions form {
  margin: 0;
}

.section > .btn,
.section > a.btn,
#main-content > .btn,
#main-content > form {
  margin: 0 0.55rem 0.75rem 0;
}

.section > .card:first-of-type:empty {
  display: none;
}

.card .card-body {
  padding: 1rem 1.15rem;
}

.dataTable-wrapper {
  display: grid;
  gap: 0.65rem;
}

.dataTable-top,
.dataTable-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0;
}

.dataTable-top label,
.dataTable-bottom,
.dataTable-info {
  color: var(--ds-muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.dataTable-dropdown,
.dataTable-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dataTable-selector {
  min-width: 86px;
}

.dataTable-input {
  min-width: min(100%, 250px);
}

.dataTable-container,
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: #f7faf9;
}

.table td:last-child,
.dataTable-table td:last-child {
  white-space: nowrap;
}

.table td .btn,
.dataTable-table td .btn {
  min-height: 34px;
  padding: 0.48rem 0.68rem;
  margin: 0.12rem;
  font-size: 0.86rem;
}

.table td .btn i,
.dataTable-table td .btn i {
  font-size: 0.9rem;
}

.modal-body .card {
  border: 0;
  box-shadow: none;
  margin-bottom: 0;
}

.modal-body .card-body {
  padding: 0;
}

.modal-body form label,
.modal-body .form-label {
  color: var(--ds-ink-2);
  font-weight: 750;
  margin-bottom: 0.35rem;
}

.modal-body form input:not([type="color"]),
.modal-body form select,
.modal-body form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--ds-line);
  border-radius: 9px;
  padding: 0.55rem 0.75rem;
  background: #fbfdfc;
}

.modal-body form button[type="submit"]:not(.btn) {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  padding: 0.55rem 0.95rem;
  background: var(--ds-orange);
  color: #fff;
  font-weight: 800;
}

.modal-header {
  border-bottom-color: var(--ds-line);
}

.modal-footer {
  border-top-color: var(--ds-line);
}

.modal-title {
  font-weight: 850;
  color: var(--ds-green);
}

.modal-header.bg-primary .modal-title,
.modal-header.bg-danger .modal-title,
.modal-header.bg-info .modal-title,
.modal-header.bg-primary,
.modal-header.bg-danger,
.modal-header.bg-info {
  color: #fff !important;
}

.close {
  border: 0;
  background: transparent;
}

.fc {
  --fc-border-color: var(--ds-line);
  --fc-today-bg-color: #fff8d9;
  --fc-page-bg-color: #fff;
  --fc-neutral-bg-color: #f8fbfa;
  color: var(--ds-ink);
}

.fc .fc-toolbar {
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem !important;
}

.fc .fc-toolbar-title {
  color: var(--ds-green);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 850;
}

.fc .fc-button {
  min-height: 36px;
  border-radius: 9px !important;
  border: 1px solid var(--ds-line-strong) !important;
  background: #fff !important;
  color: var(--ds-green) !important;
  font-weight: 800 !important;
  box-shadow: none !important;
  text-transform: none !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: var(--ds-green) !important;
  color: #fff !important;
}

.fc .fc-daygrid-day {
  min-height: 112px;
}

.fc .fc-daygrid-day-number {
  color: var(--ds-green);
  font-weight: 800;
  text-decoration: none;
}

.fc .fc-col-header-cell-cushion {
  color: var(--ds-muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  text-decoration: none;
}

.fc-event {
  border: 0 !important;
  border-radius: 8px !important;
  padding: 0.18rem 0.28rem;
  box-shadow: 0 8px 16px rgba(8, 63, 50, 0.08);
}

.fc-event-main {
  font-size: 0.78rem;
  line-height: 1.25;
}

#calendar {
  padding: 1rem;
  border: 1px solid var(--ds-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ds-shadow-soft);
}

.container.mt-5 {
  max-width: none;
  margin-top: 1rem !important;
  padding: 0;
}

.container.mt-5 > h1 {
  display: none;
}

.ds-calendar-page + * {
  clear: both;
}

.ds-calendar-page .container.mt-5 {
  margin-top: 0 !important;
}

#main-content > a.btn[href*="ExcelCitas"],
#main-content > form[action*="llama_citas_pdf"] {
  display: inline-flex;
  vertical-align: top;
}

#main-content > a.btn[href*="ExcelCitas"] {
  margin-top: 0;
}

.modal-acerca {
  backdrop-filter: blur(4px);
}

.modal-contenido-acerca {
  background: #fff !important;
  color: var(--ds-ink) !important;
  border: 1px solid var(--ds-line);
  border-radius: 16px !important;
  box-shadow: 0 26px 80px rgba(8, 31, 26, 0.22) !important;
}

.modal-contenido-acerca h4 {
  color: var(--ds-green);
  font-weight: 850;
}

.cerrar-acerca {
  color: var(--ds-muted) !important;
}

@media screen and (max-width: 1199px) {
  #sidebar .sidebar-wrapper {
    width: 280px;
  }
}

@media screen and (max-width: 767px) {
  body {
    font-size: 14px;
  }

  .navbar {
    height: 58px;
    padding: 0.65rem 0.9rem;
  }

  #main #main-content {
    padding: 0.9rem;
  }

  .section > .btn,
  .section > a.btn,
  #main-content > .btn,
  #main-content > form,
  #main-content > form .btn {
    width: 100%;
    margin-right: 0;
  }

  .card {
    border-radius: 12px;
  }

  .card .card-body {
    padding: 0.8rem;
  }

  .dataTable-top,
  .dataTable-bottom,
  .dataTable-dropdown,
  .dataTable-search {
    align-items: stretch;
    width: 100%;
  }

  .dataTable-selector,
  .dataTable-input {
    width: 100%;
  }

  table.table,
  .dataTable-table {
    border-collapse: separate;
    border-spacing: 0 0.75rem;
  }

  .table thead,
  .dataTable-table thead {
    display: none;
  }

  .table tbody,
  .table tr,
  .table td,
  .dataTable-table tbody,
  .dataTable-table tr,
  .dataTable-table td {
    display: block;
    width: 100%;
  }

  .table tbody tr,
  .dataTable-table tbody tr {
    border: 1px solid var(--ds-line);
    border-radius: 12px;
    background: #fff !important;
    box-shadow: var(--ds-shadow-soft);
    overflow: hidden;
  }

  .table td,
  .dataTable-table td {
    border: 0;
    padding: 0.55rem 0.75rem;
    white-space: normal !important;
  }

  .table td:last-child,
  .dataTable-table td:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .table td .btn,
  .dataTable-table td .btn {
    flex: 1 1 140px;
    margin: 0;
  }

  #calendar {
    padding: 0.65rem;
    overflow-x: auto;
  }

  .fc .fc-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
  }

  .fc .fc-daygrid-day {
    min-height: 86px;
  }

  .fc-event-main {
    font-size: 0.68rem;
  }

  .modal-dialog {
    margin: 0.75rem;
  }
}

/* Final visual authority: keep the Aurora identity above legacy rules. */
:root {
  --ds-ink: #0f172a;
  --ds-ink-2: #102a43;
  --ds-muted: #64748b;
  --ds-soft: #8aa4b8;
  --ds-line: #dbe7ef;
  --ds-line-strong: #bfd3df;
  --ds-panel: #ffffff;
  --ds-bg: #f4f9fc;
  --ds-green: #102a43;
  --ds-green-2: #0f5e7a;
  --ds-mint: #b9f3ff;
  --ds-orange: #0ea5e9;
  --ds-orange-soft: #e0f7ff;
  --ds-blue: #2563eb;
  --ds-red: #e11d48;
  --ds-yellow: #f59e0b;
  --ds-shadow: 0 22px 55px rgba(15, 42, 67, 0.12);
  --ds-shadow-soft: 0 12px 30px rgba(15, 42, 67, 0.08);
}

body:not(.ds-login-body) {
  background:
    radial-gradient(circle at 82% 8%, rgba(14, 165, 233, 0.12), transparent 34%),
    radial-gradient(circle at 12% 16%, rgba(45, 212, 191, 0.10), transparent 28%),
    linear-gradient(135deg, #f8fcff 0%, #eef8fb 54%, #fffaf6 100%) !important;
  color: var(--ds-ink);
}

#sidebar {
  background: rgba(255, 255, 255, 0.92) !important;
  border-right: 1px solid rgba(191, 211, 223, 0.75) !important;
  box-shadow: 16px 0 45px rgba(15, 42, 67, 0.06) !important;
}

#sidebar .menu .sidebar-link {
  border-radius: 14px !important;
  color: #516a7b !important;
}

#sidebar .menu .sidebar-item.active > .sidebar-link,
#sidebar .menu .sidebar-link:hover {
  background: linear-gradient(135deg, #dff7ff 0%, #eefcff 100%) !important;
  color: #075985 !important;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.14) !important;
}

.navbar,
.header-navbar {
  background: rgba(255, 255, 255, 0.78) !important;
  border-bottom: 1px solid rgba(191, 211, 223, 0.64) !important;
  backdrop-filter: blur(18px);
}

.card,
.table-responsive,
.dataTable-container,
.ds-card,
.ds-stat,
.ds-action-list,
.ds-module-card,
.modal-content {
  border: 1px solid rgba(191, 211, 223, 0.76) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: var(--ds-shadow-soft) !important;
}

.btn-primary,
.btn-success,
.btn-warning,
.buttons-excel,
.ds-command,
.ds-action-list a:first-child {
  border: 0 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%) !important;
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.18) !important;
}

.btn-danger,
.buttons-pdf {
  border: 0 !important;
  background: linear-gradient(135deg, #e11d48 0%, #fb7185 100%) !important;
  box-shadow: 0 16px 28px rgba(225, 29, 72, 0.16) !important;
}

.btn-info {
  border: 0 !important;
  background: linear-gradient(135deg, #06b6d4 0%, #38bdf8 100%) !important;
  color: #082f49 !important;
}

.btn-secondary {
  border: 0 !important;
  background: linear-gradient(135deg, #64748b 0%, #334155 100%) !important;
  color: #fff !important;
}

.ds-hero {
  background:
    radial-gradient(circle at 86% 18%, rgba(56, 189, 248, 0.26), transparent 30%),
    radial-gradient(circle at 72% 78%, rgba(45, 212, 191, 0.18), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #102a43 54%, #075985 100%) !important;
}

.ds-hero h1,
.ds-hero h2,
.ds-hero h3 {
  color: #ffffff !important;
}

.ds-hero p,
.ds-hero span,
.ds-hero .ds-eyebrow {
  color: rgba(236, 254, 255, 0.86) !important;
}

.ds-network {
  background:
    radial-gradient(circle at 50% 45%, rgba(14, 165, 233, 0.16), transparent 38%),
    linear-gradient(135deg, #ffffff 0%, #f4fbff 100%) !important;
}

.ds-network-center {
  background: #102a43 !important;
  box-shadow: 0 24px 50px rgba(15, 42, 67, 0.18) !important;
}

.ds-network-node i,
.ds-module-icon,
.ds-stat i {
  color: #0ea5e9 !important;
}

.ds-command {
  background:
    radial-gradient(circle at 86% 18%, rgba(56, 189, 248, 0.26), transparent 30%),
    radial-gradient(circle at 72% 78%, rgba(45, 212, 191, 0.18), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #102a43 54%, #075985 100%) !important;
}

.ds-command h1,
.ds-command h2,
.ds-command h3 {
  color: #ffffff !important;
}

.ds-command p,
.ds-command span,
.ds-command .ds-eyebrow {
  color: rgba(236, 254, 255, 0.86) !important;
}

.ds-command .btn-light,
.ds-command .btn-outline-light {
  border: 1px solid rgba(186, 230, 253, 0.42) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #102a43 !important;
  box-shadow: none !important;
}

.ds-stat-card,
.ds-panel,
.ds-module {
  border: 1px solid rgba(191, 211, 223, 0.76) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: var(--ds-shadow-soft) !important;
}

@media (max-width: 1199.98px) {
  #main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  #sidebar:not(.active) {
    visibility: hidden !important;
    pointer-events: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-right: 0 !important;
  }

  #sidebar:not(.active) .sidebar-wrapper {
    transform: translateX(-105%) !important;
  }

  #sidebar.active {
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

.sidebar-header .logo {
  min-width: 178px !important;
}

#sidebar .sidebar-header .ds-logo,
#sidebar .sidebar-header img.ds-logo {
  width: 176px !important;
  max-width: 176px !important;
  max-height: none !important;
  height: auto !important;
  display: block;
}

.ds-login-brand img {
  width: 216px !important;
  max-width: 58vw;
}

.avatar.avatar-md {
  width: 48px !important;
  height: 48px !important;
}

.avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 16px !important;
  background: #0f172a !important;
  border: 2px solid #fff !important;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.22) !important;
}

.ds-budget-page {
  display: grid;
  gap: 1.1rem;
}

.ds-budget-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 18%, rgba(56, 189, 248, 0.30), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #102a43 58%, #075985 100%);
  color: #fff;
  box-shadow: var(--ds-shadow);
}

.ds-budget-hero h1 {
  margin: 0.2rem 0;
  color: #fff !important;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
}

.ds-budget-hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(236, 254, 255, 0.86);
}

.ds-budget-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  align-items: start;
}

.ds-budget-builder,
.ds-budget-summary,
.ds-history-card {
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ds-shadow-soft);
}

.ds-budget-summary {
  position: sticky;
  top: 92px;
}

.ds-budget-summary h2 {
  margin: 0.35rem 0 0.1rem;
  color: #082f49 !important;
  font-size: 2.6rem;
  font-weight: 900;
}

.ds-budget-summary p {
  color: var(--ds-muted);
  font-weight: 800;
}

.ds-budget-lines {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.ds-budget-line {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 88px 120px 126px 48px;
  gap: 0.7rem;
  align-items: end;
  padding: 0.8rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 248, 252, 0.92), rgba(255, 255, 255, 0.96));
}

.ds-budget-line label {
  margin-bottom: 0.35rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.line-main {
  display: grid;
  gap: 0.45rem;
}

.line-subtotal strong {
  display: flex;
  align-items: center;
  min-height: 42px;
  color: #082f49;
  font-size: 1.05rem;
  font-weight: 900;
}

.line-remove {
  width: 42px;
  height: 42px;
  padding: 0 !important;
}

.ds-switch-line {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 1.2rem 0;
  padding: 0.9rem;
  border: 1px solid #dbe7ef;
  border-radius: 14px;
  background: #f4fbff;
  color: #102a43;
  font-weight: 800;
}

.ds-switch-line input {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
}

.ds-empty-state {
  display: grid;
  place-items: center;
  gap: 0.4rem;
  min-height: 160px;
  color: var(--ds-muted);
  text-align: center;
}

.ds-empty-state i {
  color: #0ea5e9;
  font-size: 2rem;
}

@media (max-width: 991.98px) {
  .ds-budget-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .ds-budget-grid {
    grid-template-columns: 1fr;
  }

  .ds-budget-summary {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .ds-budget-line {
    grid-template-columns: 1fr;
  }

  .line-remove {
    width: 100%;
  }
}

.ds-daily-dashboard {
  display: grid;
  gap: 1rem;
}

.ds-daily-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ds-daily-head h1 {
  margin: 0.25rem 0 0.1rem;
  color: #0f172a !important;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 900;
}

.ds-daily-head p {
  margin: 0;
  color: #64748b;
  font-weight: 800;
}

.ds-dashboard-welcome {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ds-dashboard-welcome img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(191, 211, 223, 0.78);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.ds-clinic-config-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--ds-shadow-soft);
}

.ds-clinic-config-card strong,
.ds-clinic-config-card span,
.ds-clinic-config-card label {
  display: block;
}

.ds-clinic-config-card strong {
  color: #0f172a;
  font-weight: 900;
}

.ds-clinic-config-card span,
.ds-clinic-config-card label {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
}

.ds-clinic-config-card .form-control {
  margin-top: 0.35rem;
}

.ds-wa-template-form {
  display: grid;
  gap: 0.75rem;
}

.ds-wa-template-form label {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 900;
}

.ds-wa-template-form textarea.form-control {
  min-height: 96px;
  margin-top: 0.35rem;
  resize: vertical;
}

.ds-daily-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ds-daily-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 1rem;
}

.ds-daily-stat {
  min-height: 122px;
  padding: 1rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ds-shadow-soft);
  color: #0f172a;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.ds-daily-stat:hover {
  border-color: rgba(14, 165, 233, 0.44);
  color: #0f172a;
  transform: translateY(-1px);
}

.ds-stat-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 0.85rem;
  border-radius: 9px;
  font-size: 1rem;
}

.ds-stat-icon.purple {
  color: #7c3aed;
  background: #f3e8ff;
}

.ds-stat-icon.indigo {
  color: #4338ca;
  background: #e0e7ff;
}

.ds-stat-icon.blue {
  color: #0284c7;
  background: #e0f2fe;
}

.ds-stat-icon.green {
  color: #16a34a;
  background: #dcfce7;
}

.ds-daily-stat small {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ds-daily-stat strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
}

.ds-daily-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.ds-daily-card {
  min-height: 230px;
  padding: 1rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ds-shadow-soft);
}

.ds-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e7eef4;
}

.ds-card-title span {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ds-card-title a {
  color: #0ea5e9;
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

.ds-empty-today {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 170px;
  color: #94a3b8;
  text-align: center;
}

.ds-empty-today span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 0.75rem;
  border-radius: 14px;
  background: #e0f2fe;
  color: #38bdf8;
  font-size: 1.7rem;
}

.ds-empty-today span.is-green {
  background: #dcfce7;
  color: #22c55e;
}

.ds-empty-today strong {
  color: #64748b;
  font-weight: 900;
}

.ds-empty-today p {
  margin: 0.25rem 0 0;
  color: #94a3b8;
}

.ds-appointment-list,
.ds-balance-list {
  display: grid;
  gap: 0.7rem;
  padding-top: 0.85rem;
}

.ds-appointment,
.ds-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem;
  border: 1px solid #e1edf4;
  border-radius: 14px;
  background: #fbfdff;
}

.ds-appointment-time {
  display: grid;
  min-width: 78px;
  color: #0284c7;
}

.ds-appointment-time small,
.ds-appointment span,
.ds-balance-row span {
  color: #64748b;
  font-weight: 800;
}

.ds-appointment strong,
.ds-balance-row strong {
  color: #0f172a;
  font-weight: 900;
}

.ds-balance-row > strong {
  color: #e11d48;
  white-space: nowrap;
}

.ds-daily-tools {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 0.75rem;
}

.ds-daily-tools a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 58px;
  padding: 0.8rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: #102a43;
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--ds-shadow-soft);
}

.ds-daily-tools i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e0f7ff;
  color: #0ea5e9;
}

@media (max-width: 1199.98px) {
  .ds-daily-stats {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .ds-daily-grid {
    grid-template-columns: 1fr;
  }

  .ds-daily-tools {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 767.98px) {
  .ds-daily-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ds-daily-actions,
  .ds-daily-actions .btn {
    width: 100%;
  }

  .ds-daily-stats,
  .ds-daily-tools {
    grid-template-columns: 1fr;
  }

  .ds-appointment,
  .ds-balance-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.ds-patient-page,
.ds-record-page {
  display: grid;
  gap: 1rem;
}

.ds-patient-head,
.ds-record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ds-shadow-soft);
}

.ds-patient-head h1,
.ds-record-header h1 {
  margin: 0.2rem 0;
  color: #0f172a !important;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
}

.ds-patient-head p,
.ds-record-header p {
  margin: 0;
  color: #64748b;
  font-weight: 800;
}

.ds-patient-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 1rem;
}

.ds-patient-stat {
  min-height: 130px;
  padding: 1.2rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ds-shadow-soft);
}

.ds-patient-stat i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 0.9rem;
  border-radius: 10px;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 1.1rem;
}

.ds-patient-stat span {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-patient-stat strong {
  color: #0f172a;
  font-size: 2rem;
  font-weight: 900;
}

.ds-patient-stat.danger strong,
.ds-patient-stat.danger i {
  color: #ef4444;
}

.ds-patient-stat.warning strong,
.ds-patient-stat.warning i {
  color: #f59e0b;
}

.ds-patient-stat.blue strong,
.ds-patient-stat.blue i {
  color: #2563eb;
}

.ds-patient-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 220px 170px;
  gap: 0.75rem;
}

.ds-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 46px;
  padding: 0 1rem;
  border: 1px solid #dbe7ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
}

.ds-search i {
  color: #0ea5e9;
}

.ds-search input {
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ds-patient-table {
  overflow: hidden;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ds-shadow-soft);
}

.ds-patient-table table {
  margin-bottom: 0;
}

.ds-patient-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ds-patient-name > span,
.ds-record-person > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-weight: 900;
}

.ds-patient-name strong {
  display: block;
  color: #0f172a;
  font-weight: 900;
}

.ds-patient-name small {
  color: #64748b;
  font-weight: 800;
}

.ds-risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.78rem;
  font-weight: 900;
}

.ds-risk-badge.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.ds-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ds-patient-modal .modal-header,
.ds-patient-modal .modal-footer {
  flex: 0 0 auto;
  border-color: #e7eef4;
}

.ds-patient-modal > form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3.5rem);
  min-height: 0;
}

.ds-patient-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 190px);
  padding-bottom: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ds-patient-modal-actions {
  z-index: 5;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 22px rgba(15, 23, 42, 0.06);
}

.ds-patient-modal-actions .btn {
  min-height: 44px;
}

.ds-patient-modal-actions .btn-primary {
  min-width: 180px;
}

.ds-form-section {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #dbe7ef;
  border-radius: 18px;
  background: #fff;
}

.ds-form-section h6,
.ds-record-card h2 {
  margin-bottom: 0.9rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e7eef4;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 0.8rem;
}

.ds-form-grid .ds-field-wide {
  grid-column: span 2;
}

.ds-form-section label {
  display: grid;
  gap: 0.35rem;
  color: #64748b;
  font-weight: 900;
}

.ds-patient-modal .form-control,
.ds-patient-modal .form-select {
  min-height: 44px;
}

.ds-patient-modal .form-select {
  padding-right: 2.4rem;
  background-position: right 0.85rem center;
}

.ds-patient-edit-form {
  display: grid;
  gap: 1rem;
}

.ds-patient-edit-form .ds-form-section {
  background: rgba(255, 255, 255, 0.9);
  border-color: #dbe7ef;
  box-shadow: var(--ds-shadow-soft);
  margin-bottom: 0;
  padding: 1.25rem;
}

.ds-sticky-actions {
  position: sticky;
  bottom: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dbe7ef;
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

.ds-agenda-page {
  display: grid;
  gap: 1rem;
}

.ds-agenda-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dbe7ef;
  border-radius: 18px;
  box-shadow: var(--ds-shadow-soft);
}

.ds-agenda-head h1 {
  margin: 0.15rem 0;
  color: #0f172a !important;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  font-weight: 900;
}

.ds-agenda-head p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}

.ds-agenda-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ds-agenda-actions form {
  margin: 0;
}

.ds-agenda-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 1rem;
  align-items: start;
}

.ds-agenda-calendar-card,
.ds-agenda-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dbe7ef;
  border-radius: 18px;
  box-shadow: var(--ds-shadow-soft);
}

.ds-agenda-calendar-card {
  min-width: 0;
  overflow: hidden;
}

.ds-agenda-calendar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e6eef5;
}

.ds-agenda-calendar-top strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 900;
}

.ds-agenda-calendar-top span,
.ds-panel-title.compact span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.ds-doctor-filter {
  display: grid;
  gap: 0.25rem;
  min-width: 210px;
}

.ds-doctor-filter label,
.ds-agenda-form label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
}

.ds-agenda-side {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.ds-agenda-panel {
  padding: 1rem;
}

.ds-panel-title.compact {
  margin-bottom: 0.85rem;
}

.ds-agenda-form {
  display: grid;
  gap: 0.75rem;
}

.ds-agenda-form label {
  display: grid;
  gap: 0.35rem;
}

.ds-agenda-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.ds-time-12h {
  display: grid;
  grid-template-columns: minmax(68px, 1fr) minmax(74px, 1fr) 82px;
  gap: 0.45rem;
}

.ds-time-12h .form-select {
  min-width: 0;
  padding-right: 1.8rem;
}

.ds-agenda-form-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
}

.ds-agenda-message {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #e9fbe9;
  color: #166534;
  font-weight: 800;
}

.ds-agenda-message.danger {
  background: #fee2e2;
  color: #991b1b;
}

.ds-agenda-list {
  display: grid;
  gap: 0.55rem;
}

.ds-agenda-item {
  display: grid;
  gap: 0.16rem;
  width: 100%;
  padding: 0.75rem;
  background: #f8fbfd;
  border: 1px solid #e3edf5;
  border-radius: 12px;
  color: #0f172a;
  text-align: left;
  text-decoration: none;
}

.ds-agenda-item strong {
  font-size: 0.88rem;
  font-weight: 900;
}

.ds-agenda-item span,
.ds-agenda-item a {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.ds-agenda-item a {
  color: #15803d;
  text-decoration: none;
}

.ds-agenda-item.as-button {
  cursor: pointer;
}

.ds-agenda-item.as-button:hover {
  border-color: #9bd7f5;
  box-shadow: 0 12px 26px rgba(14, 165, 233, 0.12);
}

.ds-empty-mini {
  margin: 0;
  padding: 1.25rem 0.5rem;
  color: #94a3b8;
  font-weight: 800;
  text-align: center;
}

.ds-agenda-page #calendar {
  padding: 1rem;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.ds-agenda-page .fc {
  --fc-border-color: #e2ebf3;
  --fc-today-bg-color: #e8f2ff;
  --fc-neutral-bg-color: #f8fafc;
}

.ds-agenda-page .fc .fc-toolbar {
  margin-bottom: 1rem;
}

.ds-agenda-page .fc .fc-toolbar-title {
  color: #0f172a !important;
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: capitalize;
}

.ds-agenda-page .fc .fc-button {
  min-height: 34px;
  padding: 0.38rem 0.7rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #eef4fb !important;
  color: #475569 !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

.ds-agenda-page .fc .fc-button-primary:not(:disabled).fc-button-active,
.ds-agenda-page .fc .fc-button-primary:not(:disabled):active,
.ds-agenda-page .fc .fc-button:hover {
  background: #0f7de8 !important;
  color: #fff !important;
}

.ds-agenda-page .fc .fc-daygrid-day {
  min-height: 122px;
}

.ds-agenda-page .fc .fc-daygrid-day-number {
  color: #0f172a;
  font-weight: 900;
}

.ds-agenda-page .fc .fc-col-header-cell-cushion {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ds-agenda-page .fc-event {
  border: 0 !important;
  border-radius: 8px !important;
  padding: 0.12rem 0.22rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.ds-cal-event {
  display: grid;
  gap: 0.08rem;
  color: #fff;
  line-height: 1.15;
  white-space: normal;
}

.ds-cal-event strong,
.ds-cal-event span,
.ds-cal-event small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-cal-event strong {
  font-size: 0.72rem;
  font-weight: 900;
}

.ds-cal-event span,
.ds-cal-event small {
  font-size: 0.66rem;
  font-weight: 800;
  opacity: 0.95;
}

@media (max-width: 1199.98px) {
  .ds-agenda-layout {
    grid-template-columns: 1fr;
  }

  .ds-agenda-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-agenda-side .ds-agenda-panel:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .ds-agenda-head,
  .ds-agenda-calendar-top {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-agenda-actions,
  .ds-agenda-actions .btn,
  .ds-agenda-actions form,
  .ds-agenda-actions button,
  .ds-doctor-filter {
    width: 100%;
  }

  .ds-agenda-side,
  .ds-agenda-two,
  .ds-agenda-form-actions {
    grid-template-columns: 1fr;
  }

  .ds-agenda-page .fc .fc-toolbar {
    display: grid;
    gap: 0.6rem;
  }

  .ds-agenda-page .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }

  .ds-agenda-page .fc .fc-daygrid-day {
    min-height: 92px;
  }

  .ds-agenda-page #calendar {
    padding: 0.55rem;
  }

  .ds-agenda-page .fc .fc-toolbar-title {
    font-size: 1.08rem;
    line-height: 1.2;
    text-align: center;
  }

  .ds-agenda-page .fc .fc-button {
    min-height: 32px;
    padding: 0.32rem 0.58rem !important;
    font-size: 0.78rem !important;
  }

  .ds-agenda-page .fc .fc-col-header-cell-cushion {
    font-size: 0.68rem;
  }

  .ds-agenda-page .fc .fc-daygrid-day-frame {
    min-height: 86px;
    padding: 0.12rem;
  }

  .ds-agenda-page .fc .fc-daygrid-day-number {
    padding: 0.2rem 0.25rem;
    font-size: 0.82rem;
  }

  .ds-agenda-page .fc .fc-daygrid-day-events {
    margin: 0 0.12rem;
  }

  .ds-agenda-page .fc .fc-daygrid-event {
    margin-top: 0.16rem;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .ds-agenda-page .fc-event-main {
    min-width: 0;
  }

  .ds-cal-event-mobile {
    display: flex;
    align-items: center;
    gap: 0.18rem;
    min-width: 0;
    max-width: 100%;
    padding: 0.13rem 0.2rem;
    border-radius: 999px;
    background: #f8fbff;
    color: #0f172a;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px #dbeafe;
  }

  .ds-cal-event-mobile span {
    flex: 0 0 auto;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    opacity: 1;
  }

  .ds-cal-event-mobile strong {
    min-width: 0;
    overflow: hidden;
    font-size: 0.58rem;
    font-weight: 900;
    text-overflow: clip;
  }

  .ds-agenda-page .fc .fc-daygrid-more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    min-height: 1.1rem;
    margin-top: 0.16rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.62rem;
    font-weight: 900;
  }
}

.ds-record-person,
.ds-record-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ds-record-actions .ds-action-budget {
  border-color: #dbe7ef !important;
  background: #fff !important;
  color: #334155 !important;
}

.ds-record-actions .ds-action-whatsapp {
  border-color: #16a34a !important;
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #fff !important;
}

.ds-record-actions .ds-action-edit {
  border-color: #f59e0b !important;
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #422006 !important;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.22) !important;
}

.ds-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ds-record-card {
  padding: 1rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ds-shadow-soft);
}

.ds-record-card dl {
  display: grid;
  grid-template-columns: 170px 1fr;
  margin: 0;
}

.ds-record-card dt,
.ds-record-card dd {
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid #edf3f7;
}

.ds-record-card dt {
  color: #64748b;
  font-weight: 800;
}

.ds-record-card dd {
  color: #0f172a;
  font-weight: 800;
}

.ds-record-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ds-note-form,
.ds-mini-form,
.ds-record-list {
  display: grid;
  gap: 0.65rem;
}

.ds-mini-form {
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  margin-bottom: 0.9rem;
}

.ds-mini-form textarea,
.ds-mini-form.wide textarea {
  grid-column: 1 / -1;
}

.ds-mini-form.wide {
  grid-template-columns: 180px 1fr auto;
}

.ds-record-list > div {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem;
  border: 1px solid #e1edf4;
  border-radius: 14px;
  background: #fbfdff;
}

.ds-record-list strong {
  color: #0f172a;
  font-weight: 900;
}

.ds-record-list span,
.ds-record-list small,
.ds-muted-text {
  color: #64748b;
  font-weight: 800;
}

@media (max-width: 1199.98px) {
  .ds-patient-stats,
  .ds-form-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .ds-form-grid .ds-field-wide {
    grid-column: span 2;
  }

  .ds-record-grid,
  .ds-patient-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  #newPatientModal .modal-dialog {
    margin: 0.45rem;
    max-width: none;
  }

  #newPatientModal .modal-content,
  #newPatientModal .ds-patient-modal {
    max-height: calc(100dvh - 0.9rem);
  }

  #newPatientModal .ds-patient-modal > form {
    max-height: calc(100dvh - 0.9rem);
  }

  #newPatientModal .modal-header {
    padding: 0.85rem 1rem;
  }

  #newPatientModal .modal-body {
    max-height: calc(100dvh - 185px);
    padding: 0.85rem;
  }

  #newPatientModal .modal-footer {
    padding: 0.85rem;
  }

  .ds-patient-head,
  .ds-record-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .ds-patient-stats,
  .ds-form-grid {
    grid-template-columns: 1fr;
  }

  .ds-form-grid .ds-field-wide {
    grid-column: auto;
  }

  .ds-patient-modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .ds-patient-modal-actions .btn,
  .ds-patient-modal-actions .btn-primary {
    width: 100%;
  }

  .ds-record-card dl,
  .ds-mini-form,
  .ds-mini-form.wide {
    grid-template-columns: 1fr;
  }
}

.ds-odont-page {
  display: grid;
  place-items: start center;
  min-width: 0;
  overflow-x: hidden;
}

.ds-odont-shell {
  width: min(1180px, 100%);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--ds-shadow);
}

.ds-odont-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e7eef4;
}

.ds-odont-header h1 {
  margin: 0.15rem 0;
  color: #0f172a !important;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 900;
}

.ds-odont-header p {
  margin: 0;
  color: #64748b;
  font-weight: 800;
}

.ds-odont-actions,
.ds-odont-tools,
.ds-odont-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.ds-odont-tools {
  padding: 1rem 0 0.75rem;
}

.ds-odont-tools > span {
  color: #64748b;
  font-weight: 900;
}

.ds-odont-tools button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  border: 1px solid #dbe7ef;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-weight: 900;
}

.ds-odont-tools button.active {
  border-color: transparent;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  color: #fff;
}

.ds-odont-tools i,
.ds-odont-legend i,
.ds-history-row i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.ds-odont-meta {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px;
  gap: 0.75rem;
  align-items: end;
  padding: 0.85rem;
  border: 1px solid #dbe7ef;
  border-radius: 18px;
  background: #f8fcff;
}

.ds-odont-meta label,
.ds-selected-tooth span {
  display: grid;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ds-selected-tooth strong {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 12px;
  background: #e0f7ff;
  color: #075985;
  font-size: 1.35rem;
  font-weight: 900;
}

.ds-odont-board {
  margin-top: 1rem;
  padding: 1.3rem 1rem;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #dbe7ef;
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  overflow-x: auto;
}

.ds-arch-row {
  display: flex;
  justify-content: center;
  gap: 0.95rem;
  min-width: 920px;
  padding: 0.75rem 0;
}

.ds-teeth-group {
  display: grid;
  grid-template-columns: repeat(8, 48px);
  gap: 0.45rem;
}

.ds-tooth {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 900;
}

.ds-tooth b {
  position: relative;
  display: block;
  width: 38px;
  height: 42px;
  border: 2px solid #93c5fd;
  border-radius: 10px;
  background: #eff6ff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.ds-tooth b::before,
.ds-tooth b::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: rgba(59, 130, 246, 0.32);
}

.ds-tooth b::before {
  left: 12px;
}

.ds-tooth b::after {
  right: 12px;
}

.ds-tooth b .s-all {
  display: none;
}

.ds-tooth b em {
  position: absolute;
  display: block;
  opacity: 1;
  border: 1px solid rgba(59, 130, 246, 0.38);
  background-color: rgba(219, 234, 254, 0.42);
  transition: background-color 0.16s ease, opacity 0.16s ease;
}

.ds-tooth b .s-o {
  top: 14px;
  right: 12px;
  bottom: 14px;
  left: 12px;
  z-index: 3;
  border-color: rgba(37, 99, 235, 0.46);
  border-radius: 4px;
  background-color: var(--surf-o, rgba(255, 255, 255, 0.82));
}

.ds-tooth b .s-v {
  top: 3px;
  right: 7px;
  left: 7px;
  height: 10px;
  border-radius: 7px 7px 2px 2px;
  background-color: var(--surf-v, rgba(219, 234, 254, 0.42));
}

.ds-tooth b .s-l {
  right: 7px;
  bottom: 3px;
  left: 7px;
  height: 10px;
  border-radius: 2px 2px 7px 7px;
  background-color: var(--surf-l, rgba(219, 234, 254, 0.42));
}

.ds-tooth b .s-m {
  top: 8px;
  bottom: 8px;
  left: 3px;
  width: 9px;
  border-radius: 7px 2px 2px 7px;
  background-color: var(--surf-m, rgba(219, 234, 254, 0.42));
}

.ds-tooth b .s-d {
  top: 8px;
  right: 3px;
  bottom: 8px;
  width: 9px;
  border-radius: 2px 7px 7px 2px;
  background-color: var(--surf-d, rgba(219, 234, 254, 0.42));
}

.ds-tooth[data-condition="sano"] b .s-all {
  opacity: 0.28;
}

.ds-tooth[data-condition="extraccion"] b::after {
  top: 3px;
  left: 14px;
  width: 3px;
  height: 28px;
  background: #18181b;
  transform: rotate(45deg);
}

.ds-tooth[data-condition="extraccion"] b::before {
  top: 3px;
  left: 14px;
  width: 3px;
  height: 28px;
  background: #18181b;
  transform: rotate(-45deg);
}

.ds-tooth.is-selected b {
  outline: 3px solid rgba(14, 165, 233, 0.22);
  border-color: #0ea5e9;
}

.ds-midline {
  width: min(860px, 90%);
  height: 1px;
  margin: 0.2rem auto;
  background: #cbd5e1;
}

.ds-surface-popover {
  position: fixed;
  z-index: 1100;
  display: none;
  padding: 0.9rem;
  border: 1px solid #dbe7ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.ds-surface-popover.is-open {
  display: block;
}

.ds-surface-popover strong {
  display: block;
  margin-bottom: 0.65rem;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

.ds-surface-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.ds-surface-grid button,
.ds-surface-all,
.ds-surface-close {
  border: 1px solid #dbe7ef;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 900;
}

.ds-surface-grid button {
  display: grid;
  gap: 0.1rem;
  min-height: 44px;
  padding: 0.35rem 0.25rem;
  text-align: center;
}

.ds-surface-grid button:hover,
.ds-surface-grid button:focus {
  border-color: #0ea5e9;
  background: #e0f7ff;
  color: #075985;
}

.ds-surface-grid b {
  font-size: 0.85rem;
  line-height: 1;
}

.ds-surface-grid span {
  font-size: 0.62rem;
  line-height: 1.1;
}

.ds-surface-all {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.45rem 0.6rem;
  border-color: #f59e0b;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  color: #fff;
  text-transform: uppercase;
}

.ds-surface-close {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-color: transparent;
  background: transparent;
  color: #94a3b8;
}

.ds-odont-legend {
  padding: 0.9rem 0;
  border-bottom: 1px solid #e7eef4;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 800;
}

.ds-odont-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ds-odont-history {
  padding-top: 1rem;
}

.ds-history-row {
  display: grid;
  grid-template-columns: 56px 1fr minmax(120px, auto) 34px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #edf3f7;
}

.ds-history-row strong {
  color: #0284c7;
  font-weight: 900;
}

.ds-history-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #334155;
  font-weight: 800;
}

.ds-history-row small {
  color: #94a3b8;
  font-weight: 800;
}

.ds-history-row button {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.35rem;
}

.ds-odont-empty {
  padding: 1rem 0;
  color: #64748b;
  font-weight: 800;
}

@media (max-width: 767.98px) {
  .ds-odont-header,
  .ds-odont-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ds-odont-meta {
    grid-template-columns: 1fr;
  }

  .ds-history-row {
    grid-template-columns: 48px 1fr 30px;
  }

  .ds-history-row small {
    grid-column: 2 / 3;
  }
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  #sidebar,
  .navbar,
  .header-navbar,
  .ds-odont-actions,
  .ds-odont-meta,
  .ds-surface-popover,
  .footer {
    display: none !important;
  }

  #main,
  #main-content {
    margin: 0 !important;
    padding: 0 !important;
  }

  body {
    background: #fff !important;
  }

  .ds-odont-shell {
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
    border: 0;
    box-shadow: none;
  }

  .ds-odont-board {
    overflow: visible !important;
    padding: 0.7rem 0.5rem !important;
    border-color: #cbd5e1 !important;
    background: #fff !important;
    page-break-inside: avoid;
  }

  .ds-arch-row {
    min-width: 0 !important;
    gap: 0.45rem !important;
    padding: 0.45rem 0 !important;
  }

  .ds-teeth-group {
    grid-template-columns: repeat(8, 31px) !important;
    gap: 0.25rem !important;
  }

  .ds-tooth {
    font-size: 0.56rem !important;
    gap: 0.12rem !important;
  }

  .ds-tooth b {
    width: 25px !important;
    height: 28px !important;
    border-color: #60a5fa !important;
    background: #eff6ff !important;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85) !important;
  }

  .ds-tooth b::before {
    left: 7px !important;
  }

  .ds-tooth b::after {
    right: 7px !important;
  }

  .ds-tooth b em {
    opacity: 1 !important;
  }

  .ds-tooth b .s-o {
    inset: 9px 7px !important;
    border-radius: 3px !important;
  }

  .ds-tooth b .s-v,
  .ds-tooth b .s-l {
    right: 5px !important;
    left: 5px !important;
    height: 8px !important;
  }

  .ds-tooth b .s-m,
  .ds-tooth b .s-d {
    top: 6px !important;
    bottom: 6px !important;
    width: 6px !important;
  }

  .ds-tooth b .s-all {
    display: none !important;
  }

  .ds-odont-legend,
  .ds-history-row {
    page-break-inside: avoid;
  }
}

/* Global visual repair pass: responsive shell and overflow safety */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  width: 100%;
}

#main {
  min-width: 0;
}

#main #main-content,
#main-content {
  min-width: 0;
}

.page-content,
.section,
.card,
.card-body,
.ds-daily-dashboard,
.ds-record-page,
.ds-patient-page,
.ds-docs-page,
.ds-caja-page {
  min-width: 0;
}

.table-responsive,
.dataTable-container,
.ds-patient-table,
.ds-perio-table-wrap,
.ds-odont-board {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ds-ortho-page {
  display: grid;
  gap: 1rem;
}

.ds-ortho-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--ds-shadow-soft);
}

.ds-ortho-head h1 {
  margin: 0.2rem 0;
  color: #0f172a !important;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 900;
}

.ds-ortho-head p {
  margin: 0;
  color: #64748b;
  font-weight: 800;
}

.ds-ortho-actions,
.ds-ortho-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ds-ortho-actions .btn {
  min-height: 38px;
}

.ds-ortho-tabs {
  padding: 0.35rem 0;
  border-bottom: 1px solid #dbe7ef;
}

.ds-ortho-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #64748b;
  font-weight: 900;
}

.ds-ortho-tabs button.active {
  border-color: #0ea5e9;
  color: #0284c7;
}

.ds-ortho-panel {
  display: none;
  gap: 1rem;
}

.ds-ortho-panel.is-active {
  display: grid;
}

.ds-ortho-card {
  padding: 1rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--ds-shadow-soft);
}

.ds-ortho-card h2 {
  margin-bottom: 0.9rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e7eef4;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-angle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ds-angle-grid > div > span {
  display: block;
  margin-bottom: 0.55rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ds-angle-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.ds-angle-options label {
  display: grid;
  place-items: center;
  min-height: 86px;
  padding: 0.8rem;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
}

.ds-angle-options label.is-selected {
  border-color: #0ea5e9;
  background: #e0f7ff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.14);
}

.ds-angle-options input {
  position: absolute;
  opacity: 0;
}

.ds-angle-options strong {
  color: #0f172a;
  font-size: 1.3rem;
  font-weight: 900;
}

.ds-angle-options small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
}

.ds-ortho-form-grid,
.ds-ceph-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.ds-ceph-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ds-ceph-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5edf3;
  border-radius: 14px;
}

.ds-ceph-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  background: #fff;
}

.ds-ceph-table th,
.ds-ceph-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e5edf3;
  border-right: 1px solid #edf3f7;
  vertical-align: middle;
}

.ds-ceph-table th {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-ceph-table td {
  color: #475569;
  font-weight: 800;
}

.ds-ceph-table td:first-child {
  color: #0f172a;
}

.ds-ceph-table input {
  min-width: 94px;
  text-align: center;
}

.ds-ceph-table [data-ceph-interpret] {
  display: inline-flex;
  min-width: 78px;
  justify-content: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 900;
}

.ds-ceph-table [data-ceph-interpret].is-low {
  background: #e0f2fe;
  color: #0369a1;
}

.ds-ceph-table [data-ceph-interpret].is-normal {
  background: #dcfce7;
  color: #15803d;
}

.ds-ceph-table [data-ceph-interpret].is-high {
  background: #fee2e2;
  color: #b91c1c;
}

.ds-ortho-form-grid label,
.ds-ceph-grid label {
  display: grid;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
}

.ds-ortho-form-grid .wide {
  grid-column: 1 / -1;
}

.ds-progress-hero {
  display: grid;
  gap: 0.8rem;
  place-items: center;
  padding: 1rem;
}

.ds-progress-hero strong {
  color: #0284c7;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  line-height: 1;
}

.ds-progress-hero span {
  color: #64748b;
  font-weight: 900;
}

.ds-ortho-control-form label {
  display: grid;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
}

.ds-ortho-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.ds-ortho-summary-grid > div {
  display: grid;
  gap: 0.35rem;
  min-height: 118px;
  padding: 1rem;
  border: 1px solid rgba(191, 211, 223, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--ds-shadow-soft);
}

.ds-ortho-summary-grid i {
  color: #0ea5e9;
  font-size: 1.15rem;
}

.ds-ortho-summary-grid span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-ortho-summary-grid strong {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 900;
}

.ds-empty-state {
  place-items: center;
  min-height: 120px;
  color: #64748b;
  text-align: center;
}

.ds-empty-state i {
  color: #93c5fd;
  font-size: 2rem;
}

@media (max-width: 991.98px) {
  .ds-ortho-head {
    flex-direction: column;
  }

  .ds-angle-grid,
  .ds-ortho-form-grid,
  .ds-ceph-grid {
    grid-template-columns: 1fr;
  }

  .ds-angle-options,
  .ds-ortho-summary-grid {
    grid-template-columns: 1fr;
  }
}

.table,
.dataTable-table {
  width: 100%;
}

.ds-page-head,
.ds-patient-head,
.ds-record-header,
.ds-odont-header,
.ds-daily-head {
  overflow: hidden;
}

.ds-page-head h1,
.ds-patient-head h1,
.ds-record-person h1,
.ds-odont-header h1,
.ds-daily-head h1 {
  overflow-wrap: anywhere;
  line-height: 1.08;
}

@media (min-width: 1200px) {
  #sidebar {
    visibility: visible !important;
    pointer-events: auto !important;
  }

  #sidebar .sidebar-wrapper {
    transform: none !important;
  }

  #main {
    margin-left: 260px !important;
    width: calc(100% - 260px) !important;
  }
}

@media (max-width: 1199.98px) {
  #main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  #sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: 100vw !important;
    z-index: 3000 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    background: rgba(15, 23, 42, .26) !important;
  }

  #sidebar .sidebar-wrapper {
    background: rgba(255, 255, 255, .98) !important;
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(84vw, 286px) !important;
    max-width: 286px !important;
    height: 100vh !important;
    transform: translateX(-110%) !important;
    transition: transform .22s ease !important;
    overflow-y: auto !important;
    box-shadow: 18px 0 48px rgba(15, 23, 42, .18) !important;
  }

  #sidebar.active {
    visibility: visible !important;
    pointer-events: auto !important;
  }

  #sidebar.active .sidebar-wrapper {
    transform: translateX(0) !important;
  }

  .navbar,
  #main header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
  }

  #main-content {
    padding-inline: 1rem !important;
  }
}

@media (max-width: 767.98px) {
  body:not(.ds-login-body) {
    font-size: 14px;
  }

  #main-content {
    padding-inline: .75rem !important;
  }

  .page-content {
    padding: .75rem 0 !important;
  }

  .ds-daily-stats,
  .ds-patient-stats,
  .ds-caja-summary,
  .ds-daily-grid,
  .ds-record-grid {
    grid-template-columns: 1fr !important;
  }

  .ds-page-head,
  .ds-patient-head,
  .ds-record-header,
  .ds-odont-header,
  .ds-daily-head {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 14px !important;
  }

  .ds-dashboard-welcome {
    align-items: flex-start;
  }

  .ds-clinic-config-card {
    grid-template-columns: 1fr;
  }

  .ds-daily-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ds-daily-tools a {
    min-height: 78px;
    padding: 12px 8px;
    text-align: center;
  }

  .ds-record-actions,
  .ds-odont-actions,
  .ds-daily-actions,
  .ds-row-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100%;
  }

  .ds-record-actions .btn,
  .ds-odont-actions .btn,
  .ds-daily-actions .btn,
  .ds-row-actions .btn,
  .ds-row-actions a {
    width: 100%;
  }

  .table,
  .dataTable-table {
    min-width: 720px;
  }

  .ds-patient-table {
    overflow: visible;
  }

  .ds-patient-table .table {
    min-width: 0 !important;
  }

  .ds-patient-table thead {
    display: none;
  }

  .ds-patient-table table,
  .ds-patient-table tbody,
  .ds-patient-table tr,
  .ds-patient-table td {
    display: block;
    width: 100%;
  }

  .ds-patient-table tr {
    padding: 1rem;
    border-bottom: 1px solid #e7eef4;
  }

  .ds-patient-table td {
    padding: 0.45rem 0 !important;
    border: 0 !important;
  }

  .ds-patient-table .ds-row-actions {
    display: grid !important;
    grid-template-columns: repeat(5, 44px) !important;
    justify-content: start;
    gap: 0.5rem !important;
    width: auto !important;
  }

  .ds-patient-table .ds-row-actions span {
    display: contents;
  }

  .ds-patient-table .ds-row-actions .btn,
  .ds-patient-table .ds-row-actions a {
    display: inline-grid !important;
    place-items: center;
    width: 44px !important;
    min-width: 44px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 420px) {
  .ds-daily-tools {
    grid-template-columns: 1fr !important;
  }

  .ds-page-head h1,
  .ds-patient-head h1,
  .ds-record-person h1,
  .ds-odont-header h1,
  .ds-daily-head h1 {
    font-size: 1.45rem !important;
  }
}

.ds-budget-v2 {
  display: grid;
  gap: 1rem;
}

.ds-budget-topbar,
.ds-budget-patient-card,
.ds-budget-catalog,
.ds-budget-cart {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dbe7ef;
  border-radius: 18px;
  box-shadow: var(--ds-shadow-soft);
}

.ds-budget-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem;
}

.ds-budget-topbar h1 {
  margin: 0.15rem 0;
  color: #0f172a !important;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  font-weight: 900;
}

.ds-budget-topbar p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}

.ds-budget-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ds-budget-patient-card {
  padding: 1rem 1.15rem;
}

.ds-budget-patient-card .form-select {
  max-width: 540px;
}

.ds-budget-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 1rem;
  align-items: start;
}

.ds-budget-catalog,
.ds-budget-cart {
  padding: 1rem;
}

.ds-budget-cart {
  position: sticky;
  top: 92px;
}

.ds-budget-catalog-head,
.ds-budget-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e6eef5;
}

.ds-budget-catalog-head h2,
.ds-budget-cart-head h2 {
  margin: 0;
  color: #0f172a !important;
  font-size: 1.05rem;
  font-weight: 900;
}

.ds-budget-catalog-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: min(100%, 420px);
}

.ds-budget-category-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.ds-budget-category h3 {
  margin: 0 0 0.6rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ds-budget-treatment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.ds-budget-treatment {
  display: grid;
  gap: 0.18rem;
  min-height: 92px;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid #dfe8f0;
  border-radius: 14px;
  color: #0f172a;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.ds-budget-treatment:hover,
.ds-budget-treatment:focus {
  border-color: #0f7de8;
  box-shadow: 0 14px 30px rgba(15, 125, 232, 0.14);
  transform: translateY(-1px);
}

.ds-budget-treatment strong {
  font-size: 0.95rem;
  font-weight: 900;
}

.ds-budget-treatment span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.ds-budget-treatment em {
  color: #0f7de8;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
}

.ds-budget-cart-items {
  display: grid;
  gap: 0.55rem;
  min-height: 78px;
  padding: 0.9rem 0;
}

.ds-budget-cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e6eef5;
}

.ds-budget-cart-item strong {
  color: #0f172a;
  font-weight: 900;
}

.ds-budget-cart-item span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.ds-budget-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ds-budget-qty button,
.cart-remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #eef4fb;
  color: #475569;
  font-weight: 900;
}

.cart-remove {
  color: #ef4444;
}

.ds-budget-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #0f172a;
}

.ds-budget-total-row span {
  color: #64748b;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-budget-total-row strong {
  color: #0f172a;
  font-size: 1.75rem;
  font-weight: 900;
}

.ds-budget-notes {
  display: grid;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 900;
}

.ds-budget-history-mini {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e6eef5;
}

.ds-budget-history-mini p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}

.ds-budget-history-mini div {
  display: grid;
  gap: 0.12rem;
  padding: 0.65rem;
  background: #f8fbfd;
  border: 1px solid #e3edf5;
  border-radius: 12px;
}

.ds-budget-history-mini strong {
  color: #0f172a;
  font-weight: 900;
}

.ds-budget-history-mini span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 1199.98px) {
  .ds-budget-workspace {
    grid-template-columns: 1fr;
  }

  .ds-budget-cart {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .ds-budget-topbar,
  .ds-budget-catalog-head,
  .ds-budget-cart-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-budget-top-actions,
  .ds-budget-top-actions .btn,
  .ds-budget-catalog-actions,
  .ds-budget-catalog-actions .btn {
    width: 100%;
  }

  .ds-budget-treatment-list,
  .ds-budget-cart-item {
    grid-template-columns: 1fr;
  }
}

/* Consentimientos informados */
.ds-consent-page {
  max-width: 1540px;
  margin: 0 auto;
}

.ds-consent-head,
.ds-consent-legal,
.ds-consent-card,
.ds-consent-panel,
.ds-consent-print {
  border: 1px solid rgba(14, 116, 144, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
}

.ds-consent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.25rem 1.35rem;
}

.ds-consent-head h1 {
  margin: 0.2rem 0 0.35rem;
  color: #092239;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 900;
  line-height: 1;
}

.ds-consent-head p,
.ds-consent-panel p,
.ds-consent-card p {
  margin: 0;
  color: #53677c;
  font-weight: 700;
}

.ds-consent-legal {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: #eefaff;
  color: #164e63;
}

.ds-consent-legal strong {
  color: #075985;
  white-space: nowrap;
}

.ds-consent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 1rem;
  align-items: start;
}

.ds-consent-main {
  min-width: 0;
}

.ds-consent-filters {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.ds-consent-filters button {
  flex: 0 0 auto;
  border: 1px solid #d8e6f0;
  border-radius: 999px;
  background: #fff;
  color: #37536b;
  padding: 0.55rem 0.95rem;
  font-weight: 900;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.ds-consent-filters button.active,
.ds-consent-filters button:hover {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
  color: #fff;
  transform: translateY(-1px);
}

.ds-consent-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ds-consent-card {
  display: grid;
  gap: 0.95rem;
  padding: 1rem;
}

.ds-consent-card[hidden] {
  display: none;
}

.ds-consent-card header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.ds-consent-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 1.2rem;
}

.ds-consent-card h2 {
  margin: 0 0 0.15rem;
  color: #0f172a;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.15;
}

.ds-consent-card h3 {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin: 0 0 0.4rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-consent-card section {
  border-top: 1px solid #e6eef5;
  padding-top: 0.75rem;
}

.ds-consent-card ul {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding-left: 1.05rem;
  color: #334155;
  font-weight: 700;
}

.ds-consent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ds-consent-tags span {
  border: 1px solid #b8def8;
  border-radius: 999px;
  background: #eff8ff;
  color: #0369a1;
  padding: 0.25rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 900;
}

.ds-consent-use {
  width: 100%;
  margin-top: 0.2rem;
  border: 0;
  border-radius: 12px;
  background: #111827;
  font-weight: 900;
}

.ds-consent-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.ds-consent-panel h2 {
  margin: 0;
  color: #092239;
  font-size: 1.15rem;
  font-weight: 900;
}

.ds-consent-panel label {
  display: grid;
  gap: 0.35rem;
  color: #42566b;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ds-consent-selected {
  display: grid;
  gap: 0.15rem;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
  padding: 0.85rem;
}

.ds-consent-selected small {
  color: #64748b;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ds-consent-selected strong {
  color: #0f172a;
  font-weight: 900;
}

.ds-consent-selected span {
  color: #64748b;
  font-weight: 700;
}

.ds-consent-print {
  display: none;
  margin-top: 1rem;
  padding: 1.1rem;
}

.ds-consent-print header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 2px solid #111827;
  padding: 0.7rem 0.9rem;
}

.ds-consent-print header div {
  display: grid;
  gap: 0.15rem;
}

.ds-consent-print h1 {
  margin: 1rem 0 0.1rem;
  color: #111827;
  font-size: 1.45rem;
  font-weight: 900;
  text-align: center;
}

.ds-print-subtitle {
  margin: 0 0 0.8rem;
  text-align: center;
}

.ds-consent-print section {
  margin-top: 0.75rem;
  break-inside: avoid;
}

.ds-consent-print h2 {
  border-bottom: 1px solid #111827;
  margin: 0 0 0.4rem;
  padding-bottom: 0.25rem;
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ds-print-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem 1rem;
}

.ds-consent-print p,
.ds-consent-print li {
  color: #111827;
  font-size: 0.86rem;
  line-height: 1.38;
}

.ds-consent-signatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.ds-consent-signatures span {
  border-top: 1px solid #111827;
  padding-top: 0.35rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 1399.98px) {
  .ds-consent-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .ds-consent-layout {
    grid-template-columns: 1fr;
  }

  .ds-consent-panel {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .ds-consent-head,
  .ds-consent-legal {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-consent-head .btn {
    width: 100%;
  }

  .ds-consent-cards {
    grid-template-columns: 1fr;
  }
}

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    box-shadow: none !important;
  }

  body {
    background: #fff !important;
    color: #111827 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #sidebar,
  .sidebar-wrapper,
  #main > header,
  #main-content > header,
  .ds-consent-head,
  .ds-consent-legal,
  .ds-consent-layout,
  .no-print,
  footer {
    display: none !important;
  }

  #app,
  #main,
  #main-content,
  .page-content,
  .section,
  .ds-consent-page {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .ds-consent-print {
    display: block !important;
    background: #fff !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 12mm;
  }

  .ds-consent-print > header {
    display: flex !important;
    border: 2px solid #111827 !important;
    background: #fff !important;
  }

  @page {
    size: letter;
    margin: 0;
  }
}

/* Capa final de consistencia visual */
#sidebar .sidebar-wrapper {
  background:
    linear-gradient(180deg, rgba(237, 253, 255, 0.98), rgba(245, 252, 255, 0.92)),
    #f8fdff !important;
  border-right: 1px solid rgba(14, 116, 144, 0.14) !important;
}

#sidebar .sidebar-link {
  gap: 0.72rem !important;
  min-height: 44px !important;
  border-radius: 13px !important;
  color: #496477 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

#sidebar .sidebar-link i,
#sidebar .sidebar-link svg {
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  display: inline-grid !important;
  place-items: center !important;
  color: #7e97aa !important;
}

#sidebar .sidebar-item.active > .sidebar-link,
#sidebar .sidebar-link:hover {
  background: linear-gradient(135deg, #e0f7ff, #ecfeff) !important;
  color: #0284c7 !important;
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.13) !important;
}

#sidebar .sidebar-item.active > .sidebar-link i,
#sidebar .sidebar-item.active > .sidebar-link svg,
#sidebar .sidebar-link:hover i,
#sidebar .sidebar-link:hover svg {
  color: #0ea5e9 !important;
}

.ds-daily-tools a {
  min-height: 68px !important;
  align-items: center !important;
  gap: 0.85rem !important;
}

.ds-daily-tools a i,
.ds-daily-tools i {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, #dff7ff, #eefaff) !important;
  color: #0284c7 !important;
  font-size: 1.08rem !important;
}

footer .footer {
  padding: 0.8rem 0 1.15rem !important;
}

footer .footer p {
  margin: 0 !important;
  color: #7890a2 !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
}

footer .float-start {
  float: none !important;
}

.modal-acerca {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  background: rgba(15, 23, 42, 0.48) !important;
  backdrop-filter: blur(6px);
}

.modal-contenido-acerca {
  width: min(460px, 100%) !important;
  border: 1px solid rgba(14, 165, 233, 0.18) !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, #ffffff, #f8fdff) !important;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22) !important;
  color: #17324a !important;
}

@media (max-width: 575.98px) {
  .ds-daily-tools {
    grid-template-columns: 1fr !important;
  }
}

/* Final action color guard: WhatsApp buttons must stay green. */
a.ds-action-whatsapp,
.ds-record-actions a.ds-action-whatsapp,
a.btn-success.ds-action-whatsapp,
a.btn-success[href*="wa.me"],
a.btn-success[href*="api.whatsapp.com"] {
  border-color: #16a34a !important;
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.24) !important;
}

a.ds-action-whatsapp:hover,
a.ds-action-whatsapp:focus,
a.btn-success[href*="wa.me"]:hover,
a.btn-success[href*="wa.me"]:focus,
a.btn-success[href*="api.whatsapp.com"]:hover,
a.btn-success[href*="api.whatsapp.com"]:focus {
  border-color: #15803d !important;
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  color: #fff !important;
}
