
/* HATORI V11.25 SHARED UI KIT */

:root {
  --hui-bg: #071f3e;
  --hui-panel: #0c315b;
  --hui-border: #1d638e;
  --hui-cyan: #27caff;
  --hui-text: #f3f9ff;
  --hui-muted: #a5c5dd;
}

/* Avoid global heading overrides */
.main-content {
  min-width: 0;
  max-width: 100%;
}

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

/* Shared typography: preserve component sizes */
.main-content button,
.main-content input,
.main-content select,
.main-content textarea {
  font-family: 'Poppins', sans-serif;
}

/* Focus visibility */
.main-content :is(
  button, a, input, select, textarea
):focus-visible {
  outline: 2px solid var(--hui-cyan);
  outline-offset: 3px;
}

/* Mobile content containment */
@media (max-width: 650px) {
  .main-content {
    min-width: 0;
    max-width: 100%;
  }

  .main-content img,
  .main-content video {
    max-width: 100%;
    height: auto;
  }

  .main-content .table-scroll,
  .main-content .table-responsive,
  .main-content .daily-sheet-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Shared modal surface: opt-in */
.hui-modal {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid var(--hui-border);
  border-radius: 20px;
  background: linear-gradient(
    145deg, #123d6c, #071f3e
  );
  color: var(--hui-text);
  box-shadow: 0 25px 70px rgba(0,0,0,.45);
}

/* Toast system */
.hui-toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200000;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
  pointer-events: none;
}

.hui-toast {
  padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid #238b91;
  background: #0b4051;
  color: #8ff5d5;
  font: 600 13px/1.6 'Poppins', sans-serif;
  overflow-wrap: anywhere;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  pointer-events: auto;
}

.hui-toast.error {
  border-color: #b44d75;
  background: #46243c;
  color: #ffc0d0;
}

.hui-toast.info {
  border-color: #287eae;
  background: #123a65;
  color: #c4eaff;
}

/* Reusable skeleton components */
.hui-skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 9px;
  background: #17466f;
  min-height: 16px;
}

.hui-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(125,211,255,.16),
    transparent
  );
  animation: hui-shimmer 1.5s infinite;
}

@keyframes hui-shimmer {
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .hui-skeleton::after {
    animation: none;
  }
}
