:root {
  --ink: #0b1110;
  --ink-2: #14201c;
  --brand: #0b6b4f;
  --brand-2: #12a06f;
  --brand-soft: #e1f7eb;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --amber: #b56b12;
  --amber-soft: #fff4df;
  --rose: #d12d4d;
  --rose-soft: #fff0f3;
  --slate: #536173;
  --slate-soft: #eef2f6;
  --page: #f5f7f5;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --surface-3: #eef3ef;
  --line: #dfe7e2;
  --line-strong: #c8d5ce;
  --text: #101918;
  --text-2: #465652;
  --muted: #83918d;
  --inverse: #ffffff;
  --radius: 8px;
  --shadow: 0 18px 46px rgba(13, 27, 23, 0.10);
  --shadow-sm: 0 8px 24px rgba(13, 27, 23, 0.08);
  --sidebar: 278px;
  --bottom-nav: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(18, 160, 111, 0.06), transparent 36rem),
    linear-gradient(180deg, #f8faf8 0%, var(--page) 100%);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: 0;
}

.icon {
  flex: 0 0 auto;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-card {
  min-width: min(360px, 100%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.boot-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: var(--radius);
  background: #050706;
}

.boot-card strong {
  display: block;
  font-weight: 800;
}

.boot-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(115deg, rgba(8, 20, 17, 0.88), rgba(11, 107, 79, 0.80)),
    url("../img/logo.png") center 16% / 220px no-repeat,
    #0d1715;
}

.login-shell {
  width: min(430px, 100%);
}

.login-brand {
  color: white;
  text-align: center;
  margin-bottom: 22px;
}

.login-logo {
  width: 88px;
  height: 88px;
  display: block;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  object-fit: contain;
  background: #050706;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

.login-brand h1 {
  color: white;
  font-size: 27px;
  font-weight: 800;
}

.login-brand p {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.login-card {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  padding: 28px;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: var(--sidebar);
  min-height: 100vh;
  position: sticky;
  top: 0;
  flex: 0 0 var(--sidebar);
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(20, 32, 28, 0.96), rgba(9, 17, 15, 0.98)),
    var(--ink);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 16px 0 50px rgba(10, 18, 16, 0.16);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 22px 18px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  object-fit: contain;
  background: #050706;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.brand-title {
  color: white;
  font-size: 15px;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active {
  color: white;
  background: linear-gradient(135deg, rgba(18, 160, 111, 0.34), rgba(37, 99, 235, 0.12));
  border-color: rgba(255, 255, 255, 0.10);
}

.sidebar-user {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.user-name,
.user-role {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-name {
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.user-role {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11.5px;
}

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 32px 36px 20px;
}

.page-title {
  font-size: 27px;
  font-weight: 800;
}

.page-subtitle {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 14px;
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.page-body {
  width: 100%;
  flex: 1;
  padding: 0 36px 42px;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.cage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.card,
.stat-card,
.cage-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 28px rgba(13, 27, 23, 0.06);
}

.card-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(248, 250, 249, 0.96), rgba(255, 255, 255, 0.86));
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.stat-card {
  min-height: 132px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.stat-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}

.stat-value {
  margin-top: 14px;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
}

.stat-label {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 800;
}

.stat-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.cage-card {
  padding: 17px;
}

.cage-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.metric-large {
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}

.pill-metric {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand);
  background: white;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.code-pill,
.badge {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.code-pill {
  color: white;
  background: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.status-done { color: var(--brand); background: var(--brand-soft); }
.status-late { color: var(--amber); background: var(--amber-soft); }
.status-pending { color: var(--slate); background: var(--slate-soft); }
.status-missed { color: var(--rose); background: var(--rose-soft); }
.status-approved { color: var(--blue); background: var(--blue-soft); }
.cat-feeding { color: #92400e; background: #fff2cc; }
.cat-sanitation { color: #0e7490; background: #dff8ff; }
.cat-inspection { color: #1d4ed8; background: #e8f0ff; }
.cat-medication { color: #7c3aed; background: #f1eaff; }
.cat-other { color: #475569; background: #eef2f6; }

.progress-bar {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e9e5;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-2), var(--blue));
  transition: width 0.35s ease;
}

.mini-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.notice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid #f2d39c;
  border-radius: var(--radius);
  color: #784709;
  background: #fff8e8;
  font-weight: 800;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checklist-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checklist-summary,
.task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.task-row {
  border-top: 1px solid var(--line);
}

.task-row:first-child {
  border-top: 0;
}

.task-button {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.task-button:hover {
  background: rgba(248, 250, 249, 0.72);
}

.task-main {
  min-width: 0;
}

.task-title {
  font-size: 14px;
  font-weight: 800;
}

.task-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.task-time,
.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.task-time {
  color: var(--muted);
  font-size: 12px;
}

.task-detail {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  padding: 0 18px 16px 50px;
  color: var(--text-2);
  font-size: 12.5px;
}

.task-detail[hidden] {
  display: none;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand);
  font-weight: 800;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead {
  background: var(--surface-2);
}

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

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:hover {
  background: rgba(248, 250, 249, 0.78);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 800;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  background: white;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(18, 160, 111, 0.14);
}

.form-textarea {
  min-height: 88px;
  resize: vertical;
}

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

.form-two-columns {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.btn,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 13.5px;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.btn:active:not(:disabled),
.icon-button:active {
  transform: translateY(1px);
}

.btn-primary {
  color: white;
  background: var(--ink-2);
  border-color: var(--ink-2);
  box-shadow: 0 10px 22px rgba(11, 17, 16, 0.14);
}

.btn-primary:hover:not(:disabled) {
  background: #24352f;
}

.btn-secondary {
  color: var(--text);
  background: white;
  border-color: var(--line-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: #aebcb5;
}

.btn-success {
  color: white;
  background: var(--brand);
  border-color: var(--brand);
}

.btn-danger {
  color: white;
  background: var(--rose);
  border-color: var(--rose);
}

.btn-sm {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 12.5px;
}

.btn-xs {
  min-height: 31px;
  padding: 5px 9px;
  font-size: 12px;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--text-2);
  background: white;
  border-color: var(--line);
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--surface-3);
}

.segmented .btn {
  min-height: 36px;
  box-shadow: none;
}

.file-upload {
  min-height: 126px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
}

.file-upload:hover {
  border-color: var(--brand-2);
  background: var(--brand-soft);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 17, 15, 0.46);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(540px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.modal-sm {
  width: min(410px, 100%);
}

.modal-lg {
  width: min(760px, 100%);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
}

.modal-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
}

.modal-body {
  padding: 18px;
}

.modal-footer {
  justify-content: flex-end;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  max-width: min(380px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: white;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.toast-success {
  background: #0b7d57;
}

.toast-error {
  background: #bf2948;
}

.loading-state,
.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
}

.loading-state {
  display: flex;
  justify-content: center;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #d9e4de;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty-state strong {
  color: var(--text-2);
  font-size: 15px;
}

.empty-state span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.empty-icon {
  color: #b0beb7;
}

.error-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--rose);
  background: var(--rose-soft);
  font-size: 13px;
  font-weight: 800;
}

.field-with-icon {
  position: relative;
}

.field-with-icon .field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.field-with-icon .form-input {
  padding-left: 38px;
}

.field-action {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.link-action {
  color: var(--brand);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.profile-panel {
  max-width: 640px;
  margin: 0 auto;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--brand);
  font-size: 24px;
  font-weight: 800;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 1120px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  html {
    font-size: 14px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    width: 100%;
    height: calc(var(--bottom-nav) + env(safe-area-inset-bottom));
    min-height: 0;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(12, 23, 20, 0.96);
  }

  .sidebar-brand,
  .sidebar-user {
    display: none;
  }

  .nav {
    min-width: 100%;
    height: var(--bottom-nav);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(74px, 1fr);
    gap: 4px;
    padding: 8px;
  }

  .nav-item {
    min-height: 56px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 5px;
    font-size: 10.5px;
    text-align: center;
  }

  .nav-item span {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-content {
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom));
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 14px 12px;
  }

  .page-title {
    font-size: 21px;
  }

  .page-subtitle {
    font-size: 12.5px;
  }

  .page-actions {
    width: 100%;
    justify-content: stretch;
  }

  .page-actions > * {
    flex: 1 1 auto;
    min-width: 0;
  }

  .page-actions .form-input,
  .page-actions .form-select {
    width: 100%;
  }

  .page-body {
    padding: 0 14px 22px;
  }

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

  .stat-card {
    min-height: 116px;
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

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

  .card-header {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 14px;
  }

  .checklist-summary {
    width: 100%;
    justify-content: space-between;
  }

  .task-button {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    padding: 14px;
  }

  .task-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
    padding-left: 30px;
  }

  .task-actions .btn {
    flex: 1;
  }

  .task-detail {
    padding: 0 14px 14px 44px;
  }

  .form-grid,
  .form-two-columns {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: calc(var(--bottom-nav) + 14px + env(safe-area-inset-bottom));
    max-width: none;
  }

  .login-page {
    align-items: stretch;
    padding: 16px;
  }

  .login-shell {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .login-card {
    padding: 22px;
  }

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

  .table-container thead {
    display: none;
  }

  .table-container tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow-sm);
  }

  .table-container td {
    border-bottom: 0;
    padding: 7px 0;
  }

  .table-container td[data-label] {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .table-container td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
  }
}

@media (max-width: 430px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-height: 108px;
  }

  .btn {
    min-height: 41px;
  }

  .table-container td[data-label] {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}
