:root {
  color-scheme: dark;
  --bg: #0f0a08;
  --cream: #201613;
  --cream-dark: #2a1c18;
  --ink: #fff7ed;
  --muted: #bdaea6;
  --line: rgba(255, 247, 237, 0.13);
  --panel: rgba(28, 19, 16, 0.4);
  --field: rgba(18, 12, 10, 0.86);
  --terra: #df7f68;
  --terra-2: #f0aa96;
  --terra-light: rgba(223, 127, 104, 0.2);
  --green: #8bc7a9;
  --rose: #ff8e9d;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(15, 10, 8, 0.34), rgba(15, 10, 8, 0.48)),
    url("assets/anagami-bg.png") center / cover fixed;
  color: var(--ink);
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
  min-width: 320px;
}

body::before {
  background:
    linear-gradient(115deg, rgba(223, 127, 104, 0.2), transparent 32%),
    radial-gradient(circle at 82% 6%, rgba(139, 199, 169, 0.16), transparent 28%),
    radial-gradient(circle at 10% 70%, rgba(223, 127, 104, 0.12), transparent 28%);
  content: "";
  height: 360px;
  left: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: -1;
}

.login-screen {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(15, 10, 8, 0.22), rgba(32, 22, 19, 0.34)),
    radial-gradient(circle at 18% 18%, rgba(223, 127, 104, 0.12), transparent 30%);
  display: none;
  inset: 0;
  justify-content: center;
  min-height: 100vh;
  overflow-y: auto;
  padding: 24px;
  position: fixed;
  z-index: 50;
}

.logged-out .login-screen {
  display: flex;
}

.logged-out .topbar,
.logged-out .shell {
  display: none;
  pointer-events: none;
  user-select: none;
}

.logged-out {
  overflow: hidden;
}

.login-card {
  background: rgba(28, 19, 16, 0.24);
  backdrop-filter: blur(34px) saturate(1.18);
  border: 1px solid rgba(255, 247, 237, 0.24);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 237, 0.08),
    0 30px 90px rgba(26, 18, 15, 0.18);
  max-height: calc(100vh - 48px);
  max-width: 390px;
  overflow-y: auto;
  padding: 26px;
  width: 100%;
}

.login-card:has(.request-form:not([hidden])) {
  max-width: 430px;
}

.login-card input,
.login-card textarea {
  background: rgba(18, 12, 10, 0.58);
  border-color: rgba(255, 247, 237, 0.18);
}

.login-card .ghost {
  background: rgba(42, 28, 24, 0.56);
  border: 1px solid rgba(255, 247, 237, 0.12);
}

.login-brand {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 0 auto 16px;
  padding: 0 0 6px;
  text-align: center;
}

.login-brand img {
  filter: drop-shadow(0 18px 34px rgba(223, 127, 104, 0.2));
  height: 84px;
  object-fit: contain;
  width: min(170px, 68%);
}

.login-card > .eyebrow,
.login-card > h2 {
  text-align: center;
}

.login-card > h2 {
  margin-left: auto;
  margin-right: auto;
  max-width: 360px;
}

.login-card h2 {
  font-size: 34px;
  line-height: 0.98;
  margin-bottom: 16px;
}

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

.login-form button {
  margin-top: 4px;
}

.login-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

.request-form {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.request-form h3 {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 8px;
  text-align: center;
}

.request-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 0.9fr 1.1fr;
}

.login-error {
  color: var(--rose);
  font-size: 13px;
  font-weight: 700;
  min-height: 20px;
}

.login-hint {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 5px;
  margin-top: 12px;
  padding-top: 12px;
}

.logo-reveal {
  align-items: center;
  background:
    radial-gradient(circle, rgba(223, 127, 104, 0.18), transparent 38%),
    rgba(15, 10, 8, 0.96);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  visibility: hidden;
  z-index: 80;
}

.logo-revealing .logo-reveal {
  animation: revealFade 1.35s ease forwards;
  visibility: visible;
}

.logo-reveal-mark {
  align-items: center;
  display: grid;
  gap: 14px;
  justify-items: center;
  transform: translateY(10px) scale(0.96);
}

.logo-revealing .logo-reveal-mark {
  animation: revealMark 1.1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.logo-reveal-mark img {
  filter: drop-shadow(0 24px 44px rgba(223, 127, 104, 0.28));
  height: 112px;
  object-fit: contain;
  width: 112px;
}

.logo-reveal-mark span {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(34px, 6vw, 70px);
}

@keyframes revealFade {
  0% {
    opacity: 0;
  }
  18%,
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes revealMark {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }
  45%,
  80% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px) scale(1.02);
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(22px);
  background: rgba(15, 10, 8, 0.36);
  border-bottom: 1px solid rgba(255, 247, 237, 0.16);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 42px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 15px;
}

.brand-lockup img {
  height: 58px;
  object-fit: contain;
  width: 58px;
}

.eyebrow {
  color: var(--terra);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 3px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1;
}

h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
}

h3 {
  font-size: 16px;
}

.top-actions,
.form-actions,
.section-title {
  align-items: center;
  display: flex;
  gap: 10px;
}

.top-actions,
.form-actions {
  flex-wrap: wrap;
}

.date-export {
  align-items: end;
  display: flex;
  gap: 8px;
}

.date-export label {
  font-size: 11px;
  gap: 4px;
  min-width: 128px;
}

.date-export input {
  min-height: 36px;
  padding: 7px 9px;
}

.clinic-contact {
  border-right: 1px solid var(--line);
  margin-right: 2px;
  padding-right: 14px;
  text-align: right;
}

.clinic-contact span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.clinic-contact strong {
  color: var(--terra);
  display: block;
  font-size: 15px;
}

.clinic-number-edit {
  background: transparent;
  color: var(--terra-2);
  display: none;
  font-size: 11px;
  min-height: 0;
  padding: 3px 0 0;
  text-decoration: underline;
}

.admin-mode .clinic-number-edit {
  display: inline-block;
}

.account-badge {
  background: rgba(42, 28, 24, 0.5);
  border: 1px solid rgba(255, 247, 237, 0.16);
  border-radius: 8px;
  padding: 7px 12px;
}

.account-badge span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.account-badge strong {
  color: var(--ink);
  display: block;
  font-size: 14px;
}

.section-title {
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title.small {
  margin-bottom: 12px;
}

.section-title span {
  background: var(--terra-light);
  border-radius: 999px;
  color: var(--terra);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  padding: 22px clamp(14px, 4vw, 42px) 36px;
}

.hero-strip {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(223, 127, 104, 0.16), rgba(139, 199, 169, 0.08)),
    rgba(22, 15, 13, 0.34);
  backdrop-filter: blur(26px) saturate(1.1);
  border: 1px solid rgba(255, 247, 237, 0.18);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 24px;
  grid-column: 1 / -1;
  justify-content: space-between;
  overflow: hidden;
  padding: 26px;
  position: relative;
}

.hero-strip::after {
  background: linear-gradient(120deg, transparent, rgba(255, 252, 247, 0.08), transparent);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(36%);
}

.hero-strip > * {
  position: relative;
  z-index: 1;
}

.notification-panel {
  background: rgba(139, 199, 169, 0.12);
  border: 1px solid rgba(139, 199, 169, 0.28);
  border-radius: 8px;
  color: var(--green);
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  padding: 14px 16px;
}

.notification-panel p {
  font-size: 14px;
  font-weight: 700;
}

.hero-strip .eyebrow {
  color: var(--terra-light);
}

.hero-strip h2 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.95;
  max-width: 660px;
}

.hero-copy {
  color: rgba(255, 252, 247, 0.74);
  font-size: 15px;
  margin-top: 14px;
  max-width: 560px;
}

.stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  min-width: min(100%, 640px);
}

.stats div,
.metric-filter {
  background: rgba(255, 247, 237, 0.075);
  border: 1px solid rgba(255, 247, 237, 0.18);
  border-radius: 8px;
  padding: 14px;
}

.metric-filter {
  color: rgba(255, 247, 237, 0.68);
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
}

.metric-filter input,
.metric-filter select {
  min-height: 34px;
  padding: 7px 9px;
}

.stats span {
  color: rgba(255, 247, 237, 0.68);
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}

.stats strong {
  color: var(--ink);
  font-size: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 247, 237, 0.17);
  border-radius: 8px;
  backdrop-filter: blur(30px) saturate(1.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 237, 0.08),
    var(--shadow);
  padding: 20px;
}

.table-panel,
.settings-panel {
  grid-column: 1 / -1;
}

.settings-panel {
  display: none;
}

.admin-mode .settings-panel {
  display: block;
}

form,
.service-rows,
.password-form {
  display: grid;
  gap: 16px;
}

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

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

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

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

input,
select,
textarea {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(146, 55, 38, 0.12);
  outline: 0;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 10px 14px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--terra);
  box-shadow: 0 12px 24px rgba(223, 127, 104, 0.18);
  color: #1b100d;
}

.ghost {
  background: var(--cream-dark);
  color: var(--ink);
}

.danger {
  color: var(--rose);
}

.whatsapp {
  background: #1f9d62;
  box-shadow: 0 12px 24px rgba(31, 157, 98, 0.18);
  color: #fff;
}

.service-box {
  background: rgba(255, 247, 237, 0.035);
  border: 1px dashed rgba(255, 247, 237, 0.24);
  border-radius: 8px;
  padding: 14px;
}

.service-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1.4fr) 86px 120px 110px 42px;
}

.share-note {
  background: rgba(240, 213, 206, 0.32);
  border: 1px solid rgba(146, 55, 38, 0.14);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  padding: 11px 13px;
}

.service-row .line-total {
  background: var(--cream);
  border-radius: 8px;
  color: var(--green);
  font-weight: 800;
  min-height: 42px;
  padding: 11px 12px;
}

.balance-due {
  background: var(--cream);
  border-radius: 8px;
  color: var(--rose);
  font-weight: 800;
  min-height: 42px;
  padding: 11px 12px;
}

.icon-btn {
  align-items: center;
  background: rgba(255, 142, 157, 0.16);
  color: var(--rose);
  display: inline-flex;
  justify-content: center;
  padding: 10px;
}

.receipt {
  background: rgba(20, 13, 11, 0.48);
  border: 1px solid rgba(255, 247, 237, 0.16);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  min-height: 410px;
  padding: 18px;
  position: sticky;
  top: 116px;
}

.receipt-head {
  align-items: center;
  border-bottom: 2px solid var(--terra);
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
}

.receipt-head img {
  height: 52px;
  object-fit: contain;
  width: 52px;
}

.receipt-head strong {
  display: block;
  font-size: 22px;
}

.receipt-meta,
.receipt-total-row {
  display: flex;
  justify-content: space-between;
}

.receipt-meta {
  color: var(--muted);
  font-size: 13px;
  gap: 12px;
}

.receipt-lines {
  border-collapse: collapse;
  width: 100%;
}

.receipt-lines th,
.receipt-lines td {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  padding: 9px 0;
  text-align: left;
}

.receipt-lines th:last-child,
.receipt-lines td:last-child {
  text-align: right;
}

.receipt-totals {
  display: grid;
  gap: 8px;
  margin-left: auto;
  max-width: 260px;
  width: 100%;
}

.receipt-total-row.grand {
  border-top: 2px solid var(--terra);
  color: var(--terra);
  font-size: 20px;
  font-weight: 800;
  padding-top: 10px;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: clamp(260px, 45vh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-lock {
  align-items: center;
  background: rgba(240, 213, 206, 0.18);
  border: 1px solid rgba(255, 247, 237, 0.16);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 14px;
}

.admin-lock strong {
  color: var(--terra);
}

.admin-lock p {
  text-align: right;
}

.admin-mode .admin-lock {
  display: none;
}

.reception-mode #exportExcelBtn,
.reception-mode #clearBillsBtn,
.reception-mode #dateExportControls {
  display: none;
}

.settings-message {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  min-height: 20px;
}

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

.account-tool {
  background: rgba(255, 247, 237, 0.045);
  border: 1px solid rgba(255, 247, 237, 0.16);
  border-radius: 8px;
  padding: 16px;
}

.service-manager-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.service-options-list {
  display: grid;
  gap: 8px;
}

.service-option-item {
  align-items: center;
  background: rgba(255, 247, 237, 0.05);
  border: 1px solid rgba(255, 247, 237, 0.15);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.service-option-item strong {
  color: var(--ink);
  font-size: 14px;
}

option {
  background: #201613;
  color: var(--ink);
}

.request-list {
  display: grid;
  gap: 10px;
}

.request-card {
  background: rgba(255, 247, 237, 0.05);
  border: 1px solid rgba(255, 247, 237, 0.15);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.request-card header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.request-card strong {
  color: var(--ink);
}

.request-card p {
  color: var(--muted);
  font-size: 13px;
}

.request-card .pill {
  background: var(--terra-light);
  border-radius: 999px;
  color: var(--terra-2);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  text-transform: uppercase;
}

.records-table {
  border-collapse: collapse;
  min-width: 1040px;
  width: 100%;
}

.records-table th,
.records-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

.records-table th {
  background: #201613;
  color: var(--muted);
  font-size: 12px;
  position: sticky;
  top: 0;
  text-transform: uppercase;
  z-index: 1;
}

.records-table td {
  font-size: 14px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions button {
  min-height: 34px;
  padding: 7px 10px;
}

.pagination {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.pagination span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.empty {
  color: var(--muted);
  padding: 30px 10px;
  text-align: center;
}

@media (max-width: 1120px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    position: static;
  }

  .top-actions {
    width: 100%;
  }

  .date-export {
    flex: 1 1 320px;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    order: 3;
  }

  .receipt {
    position: static;
  }
}

@media (max-width: 920px) {
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .hero-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 100%;
  }

  .service-row {
    grid-template-columns: minmax(0, 1.4fr) 88px 116px;
  }

  .service-row label:first-child {
    grid-column: 1 / -1;
  }

  .service-row label:nth-child(4) {
    grid-column: span 2;
  }

  .service-manager-row {
    grid-template-columns: 1fr;
  }

  .service-option-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }

  .login-screen {
    align-items: flex-start;
    padding: 12px;
  }

  .login-card {
    max-height: none;
    padding: 22px;
  }

  .login-card h2 {
    font-size: 30px;
  }

  .login-actions {
    grid-template-columns: 1fr;
  }

  .request-actions {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 8px;
    padding: 8px 10px;
  }

  .brand-lockup {
    align-items: center;
    gap: 8px;
  }

  .brand-lockup img {
    height: 34px;
    width: 34px;
  }

  h1 {
    font-size: 24px;
  }

  .topbar .eyebrow {
    font-size: 11px;
    margin-bottom: 1px;
  }

  h2 {
    font-size: 24px;
  }

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

  .top-actions,
  .date-export {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  .clinic-contact {
    display: none;
  }

  .account-badge {
    grid-column: 1 / -1;
    padding: 6px 10px;
    width: 100%;
  }

  .account-badge span {
    font-size: 10px;
  }

  .account-badge strong {
    font-size: 13px;
  }

  .date-export {
    grid-column: 1 / -1;
  }

  .date-export label {
    font-size: 10px;
    min-width: 0;
  }

  .date-export input {
    min-height: 36px;
    padding: 7px 9px;
  }

  .top-actions button {
    min-height: 38px;
    padding: 8px 10px;
  }

  #clearBillsBtn {
    grid-column: 1 / -1;
  }

  .shell {
    gap: 12px;
    padding: 10px 8px 24px;
  }

  .hero-strip {
    display: none;
  }

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

  .section-title.small {
    align-items: center;
    flex-direction: row;
  }

  .admin-lock {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-lock p {
    text-align: left;
  }

  .panel {
    padding: 14px;
  }

  .form-panel {
    order: 1;
  }

  .preview-panel {
    order: 2;
  }

  .table-panel {
    order: 3;
  }

  .settings-panel {
    order: 4;
  }

  .service-row {
    background: rgba(255, 247, 237, 0.035);
    border: 1px solid rgba(255, 247, 237, 0.1);
    border-radius: 8px;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .service-row label:nth-child(4) {
    grid-column: auto;
  }

  .service-row .icon-btn {
    justify-self: stretch;
    width: 100%;
  }

  .receipt {
    min-height: 0;
    overflow: hidden;
    padding: 14px;
  }

  .receipt-head {
    align-items: flex-start;
  }

  .receipt-meta,
  .receipt-total-row {
    gap: 10px;
  }

  .receipt-lines {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .receipt-lines th,
  .receipt-lines td {
    font-size: 12px;
    min-width: 62px;
    padding: 8px 6px 8px 0;
  }

  .receipt-lines th:first-child,
  .receipt-lines td:first-child {
    min-width: 150px;
  }

  .table-wrap {
    border: 0;
    max-height: none;
    overflow: visible;
  }

  .records-table {
    min-width: 0;
  }

  .records-table thead {
    display: none;
  }

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

  .records-table tr {
    background: rgba(255, 247, 237, 0.04);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    padding: 8px 10px;
  }

  .records-table td {
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 247, 237, 0.08);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 9px 0;
    text-align: right;
  }

  .records-table td::before {
    color: var(--muted);
    content: attr(data-label);
    flex: 0 0 82px;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
  }

  .records-table td:last-child {
    border-bottom: 0;
    display: block;
    text-align: left;
  }

  .records-table td:last-child::before {
    display: block;
    margin-bottom: 8px;
  }

  .records-table td.empty {
    display: block;
    text-align: center;
  }

  .records-table td.empty::before {
    display: none;
  }

  .table-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .form-actions button:first-child,
  .form-actions button:last-child {
    grid-column: 1 / -1;
  }

  .top-actions button,
  .pagination button,
  .table-actions button {
    width: 100%;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
  }
}
