:root {
  color-scheme: light;
  --bg: #eef3f8;
  --text: #172033;
  --muted: #607086;
  --line: #d8e2ec;
  --panel: #ffffff;
  --primary: #4057ff;
  --primary-dark: #2738c8;
  --accent: #0f9b8e;
  --soft: #eef2ff;
  --success: #0f9b5f;
  --warning: #c77800;
  --danger: #b42318;
  --shadow: 0 16px 42px rgba(20, 35, 60, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(180deg, #f8fbff 0, var(--bg) 260px),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

[hidden] {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    linear-gradient(135deg, rgba(64, 87, 255, 0.09), rgba(15, 155, 142, 0.11)),
    var(--bg);
}

.login-card {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(20, 35, 60, 0.16);
  padding: 28px;
}

.login-logo {
  display: block;
  width: 240px;
  height: auto;
  margin: 0 auto 18px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 2px;
}

.auth-status {
  min-height: 18px;
  color: #b42318;
  font-size: 13px;
  text-align: center;
}

.create-account {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.create-account summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 700;
  text-align: center;
}

.auth-link-button {
  width: 100%;
  box-shadow: none;
}

.compact-auth {
  margin-top: 14px;
}

.terms-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.terms-check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
}

.legal-links {
  display: grid;
  gap: 6px;
  text-align: center;
  font-size: 13px;
}

.legal-links a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.legal-links a:hover {
  text-decoration: underline;
}

.reset-confirm-form {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.reset-code-box {
  display: block;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
  text-align: center;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 14px clamp(16px, 4vw, 48px) 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  position: relative;
  z-index: 50;
  box-shadow: 0 12px 32px rgba(20, 35, 60, 0.1);
}

.account-box {
  position: absolute;
  top: 12px;
  right: clamp(16px, 3vw, 36px);
  display: grid;
  grid-template-columns: auto auto;
  justify-items: center;
  align-items: center;
  gap: 4px 8px;
}

.user-first-name {
  grid-column: 2;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 240px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(24px, 3vw, 36px);
}

h2 {
  font-size: 18px;
}

main {
  padding: 22px clamp(16px, 4vw, 48px) 56px;
  max-width: 1240px;
  margin: 0 auto;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  justify-content: center;
  width: min(100%, 760px);
}

.admin-medico-picker {
  width: min(100%, 520px);
}

.admin-medico-picker label {
  grid-template-columns: auto minmax(220px, 1fr);
  align-items: center;
  color: var(--primary-dark);
}

.admin-medico-picker select {
  min-height: 40px;
  border-radius: 10px;
}

.logout-button {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.support-button {
  grid-row: 1 / span 2;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.tab,
button {
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  min-height: 44px;
  padding: 11px 16px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(64, 87, 255, 0.2);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

button:hover {
  box-shadow: 0 12px 26px rgba(64, 87, 255, 0.26);
}

button:active {
  transform: translateY(1px);
}

.tab {
  background: #f5f7ff;
  color: #26324a;
  border: 1px solid #dfe5ff;
  box-shadow: none;
}

.tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 10px 22px rgba(64, 87, 255, 0.22);
}

button.secondary {
  background: #eaf0f7;
  color: var(--text);
  box-shadow: none;
}

button.secondary:hover {
  background: #dfe7f0;
  box-shadow: none;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.medico-screen {
  max-width: 820px;
  margin: 0 auto;
}

.medico-form {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
}

.medico-form .section-title {
  margin-bottom: 22px;
}

.context-fields {
  margin-bottom: 18px;
}

.compact {
  margin-bottom: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.one {
  grid-template-columns: 1fr;
  gap: 4px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.hospitals-plans-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-cadastro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.inline-cadastro button {
  min-height: 48px;
  white-space: nowrap;
}

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

.report-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 18px;
  margin-bottom: 20px;
}

.admin-upload-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr);
  justify-content: stretch;
  justify-items: stretch;
  margin-bottom: 20px;
}

.csv-panel {
  width: 100%;
  border: 1px solid #dbe6f2;
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #fbfdff, #f4f8fc);
  display: grid;
  gap: 14px;
  align-content: start;
}

.admin-report-filters {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.edit-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-status-select {
  min-height: 36px;
  border-radius: 8px;
  padding: 6px 8px;
  min-width: 180px;
}

.csv-preview-box {
  margin-bottom: 20px;
}

.csv-error-row td {
  background: #fff1f1;
  color: #9f1239;
  border-color: #fecdd3;
}

.filter-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  margin-bottom: 18px;
  box-shadow: 0 8px 22px rgba(20, 35, 60, 0.05);
}

.filter-panel summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 14px;
}

.filter-panel .report-filters {
  padding: 0 14px 14px;
  margin-bottom: 0;
}

.filter-actions {
  display: flex;
  align-items: end;
}

.filter-actions button {
  width: 100%;
}

.report-card {
  border: 1px solid #dbe6f2;
  border-radius: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  box-shadow: 0 8px 18px rgba(20, 35, 60, 0.06);
}

.report-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.report-card strong {
  font-size: 20px;
  color: var(--primary-dark);
}

.total-card strong {
  color: var(--success);
}

label {
  display: grid;
  gap: 7px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #fbfdff;
  font: inherit;
  min-height: 48px;
  padding: 12px 14px;
  outline-color: var(--primary);
}

input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
}

input[type="date"]::-webkit-date-and-time-value {
  display: block;
  min-height: 22px;
  text-align: left;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(64, 87, 255, 0.14);
}

input::placeholder,
textarea::placeholder {
  color: #607086;
}

textarea {
  resize: vertical;
}

small {
  color: var(--muted);
  text-align: left;
  font-size: 12px;
}

.procedure-box {
  margin: 0 0 18px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.procedure-picker {
  display: flex;
  align-items: center;
  min-height: 50px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 6px 40px 6px 10px;
  position: relative;
}

.procedure-picker input {
  min-width: 220px;
  flex: 1;
  border: 0;
  border-radius: 0;
  padding: 6px 4px;
}

.selected-procedures {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.procedure-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  background: #edf1ff;
  color: #1f2a60;
  border: 1px solid #d7ddff;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.2;
}

.procedure-chip button,
.clear-procedures {
  border: 0;
  background: transparent;
  color: #666;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.procedure-chip button {
  font-size: 16px;
}

.clear-procedures {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.results {
  display: grid;
  gap: 0;
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(20, 35, 60, 0.08);
}

.results:empty {
  display: none;
}

.result-item {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 12px 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
  font-weight: 400;
  line-height: 1.35;
}

.result-item:hover,
.result-item.selected {
  background: #e4edff;
  color: #000;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.form-actions-left {
  justify-content: flex-start;
  margin-top: 4px;
}

.form-actions-left button {
  background: var(--primary);
  border-radius: 12px;
  min-height: 48px;
  padding: 12px 18px;
  box-shadow: 0 10px 22px rgba(64, 87, 255, 0.22);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pagination-bar button {
  min-height: 34px;
  padding: 7px 12px;
}

.pagination-bar button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.report-table {
  min-width: 980px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: #41516a;
  font-size: 12px;
  text-transform: uppercase;
  background: #f6f9fc;
}

.report-table th {
  color: #172033;
  font-size: 14px;
  text-transform: none;
  font-weight: 700;
  border-bottom: 2px solid #cfd9e6;
  background: #f2f6fb;
}

.report-table tfoot td {
  font-weight: 700;
  border-top: 2px solid #cfd9e6;
  background: #f8fbff;
}

.report-table tfoot td:first-child {
  text-align: right;
}

.report-table tfoot td:last-child {
  color: var(--success);
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  background: #fff7e6;
  color: #935a00;
  font-weight: 700;
  font-size: 12px;
}

.simple-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.simple-list li {
  background: #f6f9ff;
  border: 1px solid #dfe7ff;
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.icon-action {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 12px;
}

.icon-action.danger {
  color: #b42318;
}

#formStatus {
  color: var(--primary);
  font-weight: 700;
}

#editarProcedimentoStatus {
  color: var(--primary);
  font-weight: 700;
}

.floating-notice {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 200;
  width: min(420px, calc(100vw - 28px));
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #7c2d12;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.floating-notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.floating-notice strong {
  font-size: 14px;
}

.floating-notice span {
  font-size: 13px;
  line-height: 1.35;
}

.edit-procedure-form {
  display: grid;
  gap: 16px;
  margin-top: 0;
}

.edit-results {
  margin-bottom: 16px;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
}

.modal-panel {
  width: min(980px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  padding: 20px;
}

.confirm-modal {
  width: min(320px, 100%);
  max-height: none;
  align-self: center;
  justify-self: center;
  padding: 16px;
  overflow: visible;
}

.confirm-modal p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.confirm-modal .modal-header {
  margin-bottom: 10px;
}

.confirm-modal h2 {
  font-size: 18px;
}

.support-modal {
  width: min(360px, 100%);
  max-height: none;
  align-self: center;
  justify-self: center;
  padding: 16px;
  overflow: visible;
}

.support-modal-content {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.support-modal-content p {
  margin: 0;
}

.support-modal-content a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.support-modal-content a:hover {
  text-decoration: underline;
}

.auth-modal {
  width: min(460px, 100%);
  max-height: none;
  align-self: center;
  justify-self: center;
  overflow: visible;
}

.confirm-modal .form-actions-left {
  position: static;
  margin: 0;
}

.confirm-modal .form-actions-left button {
  width: auto;
  min-width: 92px;
  min-height: 42px;
  padding: 9px 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-close {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.modal-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.attendance-table {
  min-width: 1180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.attendance-table th {
  background: #f8fafc;
  color: #40516d;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.attendance-table td {
  font-size: 13px;
  color: #0f172a;
}

.attendance-table td strong {
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}

.attendance-table td small {
  display: block;
  color: #40516d;
  font-size: 12px;
}

.procedure-line {
  margin-bottom: 4px;
  line-height: 1.35;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.pending {
  background: #fff3d8;
  color: #935a00;
  border: 1px solid #ffd99b;
}

.status-pill.paid {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-pill.canceled {
  background: #eef2f7;
  color: #374151;
  border: 1px solid #d8e2ec;
}

.money-cell {
  color: var(--success);
  white-space: nowrap;
  font-weight: 700;
}

.edit-row-button {
  background: #fff;
  color: #007bff;
  border: 1px solid #9db6ff;
  border-radius: 8px;
  padding: 7px 10px;
  font-weight: 700;
  box-shadow: none;
}

.edit-row-button.danger {
  color: #b42318;
  border-color: #fda4af;
  background: #fff1f2;
}

@media (max-width: 860px) {
  .topbar {
    align-items: center;
    padding: 7px 10px 8px;
    gap: 5px;
    position: relative;
    box-shadow: 0 8px 20px rgba(20, 35, 60, 0.08);
  }

  .brand {
    align-items: center;
    justify-content: center;
  }

  .brand-logo {
    width: 112px;
    height: auto;
  }

  .account-box {
    top: 7px;
    right: 14px;
    gap: 2px 6px;
  }

  .user-first-name {
    max-width: 56px;
    font-size: 10px;
  }

  .login-card {
    padding: 20px;
    border-radius: 14px;
  }

  .login-logo {
    width: 210px;
  }

  main {
    padding: 10px 12px 32px;
    width: 100%;
  }

  h2 {
    font-size: 17px;
  }

  .panel,
  .medico-form {
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
  }

  .modal-backdrop {
    padding: 8px;
    align-items: stretch;
  }

  .modal-panel {
    max-height: calc(100vh - 16px);
    border-radius: 14px;
    padding: 14px;
  }

  .modal-backdrop:has(.confirm-modal) {
    align-items: center;
  }

  .modal-backdrop:has(.auth-modal) {
    align-items: center;
  }

  .confirm-modal {
    width: min(300px, calc(100vw - 32px));
    max-height: none;
    padding: 14px;
  }

  .auth-modal {
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
  }

  .confirm-modal .form-actions-left {
    position: static;
    margin: 0;
  }

  .confirm-modal .form-actions-left button {
    width: auto;
    min-height: 42px;
    font-size: 14px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .grid.two,
  .admin-grid,
  .admin-control-grid,
  .admin-upload-grid,
  .report-filters {
    grid-template-columns: 1fr;
  }

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

  .report-card {
    padding: 9px 10px;
  }

  .report-card strong {
    font-size: 18px;
  }

  .admin-report-filters,
  .edit-filters,
  .admin-summary-grid {
    grid-template-columns: 1fr;
  }

  .tabs,
  .actions {
    width: 100%;
  }

  .logout-button {
    width: auto;
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
  }

  .support-button {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    overflow: visible;
  }

  .admin-medico-picker,
  .admin-medico-picker label {
    width: 100%;
  }

  .admin-medico-picker label {
    grid-template-columns: 1fr;
    gap: 4px;
    font-size: 12px;
  }

  .admin-medico-picker select {
    min-height: 38px;
    padding: 8px 10px;
  }

  .tab {
    width: 100%;
    min-height: 36px;
    padding: 5px 8px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
    scroll-snap-align: start;
  }

  .actions button {
    flex: 1;
  }

  input,
  select,
  textarea,
  .procedure-picker {
    font-size: 16px;
  }

  .procedure-picker {
    align-items: stretch;
    flex-direction: column;
    padding: 8px 40px 8px 10px;
  }

  .procedure-picker input {
    min-width: 0;
    width: 100%;
  }

  .procedure-chip {
    width: 100%;
    justify-content: space-between;
  }

  .form-actions-left {
    position: sticky;
    bottom: 10px;
    z-index: 20;
    margin-left: -4px;
    margin-right: -4px;
  }

  .form-actions-left button {
    width: 100%;
    min-height: 54px;
    font-size: 16px;
  }

  .table-wrap {
    margin-left: -4px;
    margin-right: -4px;
  }

  .pagination-bar {
    display: grid;
    grid-template-columns: minmax(82px, auto) 1fr minmax(82px, auto);
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  .pagination-bar span {
    font-size: 13px;
    line-height: 1.25;
  }

  .pagination-bar button {
    min-width: 0;
    padding: 8px 10px;
  }

  #lancamentosMedico,
  #editarLancamentosLista,
  #lancamentosRelatorios,
  #adminLancamentosLista {
    display: grid;
    gap: 10px;
  }

  #lancamentosMedico tr,
  #editarLancamentosLista tr,
  #lancamentosRelatorios tr,
  #adminLancamentosLista tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 10px 24px rgba(20, 35, 60, 0.08);
  }

  #lancamentosMedico td,
  #editarLancamentosLista td,
  #lancamentosRelatorios td,
  #adminLancamentosLista td {
    display: grid;
    grid-template-columns: minmax(90px, 36%) minmax(0, 1fr);
    gap: 8px;
    border-bottom: 0;
    padding: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
  }

  #lancamentosMedico td::before,
  #editarLancamentosLista td::before,
  #lancamentosRelatorios td::before,
  #adminLancamentosLista td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
  }

  #lancamentosMedico:empty,
  #editarLancamentosLista:empty,
  #lancamentosRelatorios:empty,
  #adminLancamentosLista:empty {
    display: table-row-group;
  }

  .table-wrap table:has(#lancamentosMedico),
  .table-wrap table:has(#editarLancamentosLista),
  .table-wrap table:has(#lancamentosRelatorios),
  .table-wrap table:has(#adminLancamentosLista),
  .attendance-table,
  .report-table {
    min-width: 0;
  }

  .table-wrap table:has(#lancamentosMedico) thead,
  .table-wrap table:has(#editarLancamentosLista) thead,
  .table-wrap table:has(#lancamentosRelatorios) thead,
  .table-wrap table:has(#adminLancamentosLista) thead,
  .report-table tfoot {
    display: none;
  }

  th,
  td {
    padding: 10px 8px;
    font-size: 13px;
  }

  .simple-list li {
    align-items: stretch;
    flex-direction: column;
  }

  .list-actions {
    width: 100%;
  }

  .icon-action,
  .edit-row-button {
    flex: 1;
    min-height: 42px;
  }
}
