/* Staff & Manager portal — senior-friendly, viewport-safe */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

@media (min-width: 640px) {
  html {
    font-size: 17px;
  }
}

body {
  font-family: "Sarabun", system-ui, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

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

img, video, svg {
  max-width: 100%;
  height: auto;
}

.portal-shell,
.admin-shell {
  max-width: 80rem; /* max-w-7xl */
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .portal-shell,
  .admin-shell {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.portal-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .portal-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .portal-list-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.portal-list-grid .col-span-full {
  grid-column: 1 / -1;
}

.portal-card {
  border-radius: 1rem;
  border-width: 2px;
  padding: 1.25rem;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  height: 100%;
}

@media (min-width: 768px) {
  .portal-card {
    padding: 1.5rem;
  }
}

.portal-stat {
  font-size: 1.875rem;
  line-height: 1.1;
  font-weight: 800;
}

@media (min-width: 640px) {
  .portal-stat {
    font-size: 2.25rem;
  }
}

.portal-btn {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 0.75rem;
  border-width: 2px;
  padding: 0.875rem 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (min-width: 640px) {
  .portal-btn {
    font-size: 1.25rem;
  }
}

.portal-btn:active {
  transform: scale(0.98);
}

.portal-alert {
  border-radius: 0.75rem;
  border-width: 2px;
  padding: 1rem 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.portal-data-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  .portal-data-row {
    font-size: 1.25rem;
  }
}

.portal-mini-stat {
  border-radius: 0.75rem;
  border-width: 2px;
  padding: 0.875rem 1rem;
  min-width: 0;
}

.portal-mini-stat-value {
  font-size: 1.5rem;
  line-height: 1.1;
  font-weight: 800;
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .portal-mini-stat-value {
    font-size: 1.875rem;
  }
}
