/* Styling utama memakai Tailwind CSS (CDN) di partials/head.ejs.
   File ini hanya untuk kustom kecil di luar utility Tailwind. */

html,
body {
  height: 100%;
}

html {
  scroll-behavior: auto;
}

body {
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

::selection {
  background: #bae6fd;
  color: #0c4a6e;
}

/* Scrollbar tipis */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

@media (max-width: 767px) {
  body.app-mobile-layout main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }

  body.app-mobile-layout main h1 {
    font-size: 1.625rem;
    line-height: 1.25;
  }

  body.app-mobile-layout main img {
    max-width: 100%;
  }

  body.app-mobile-layout main table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.app-mobile-layout main .input {
    min-height: 2.75rem;
    font-size: 16px;
  }

  body.app-mobile-layout main .btn-primary,
  body.app-mobile-layout main .btn-secondary,
  body.app-mobile-layout main .btn-warn {
    min-height: 2.75rem;
  }
}

.mobile-bottom-nav {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid #e2e8f0;
  background: rgb(255 255 255 / 96%);
  padding: 0.25rem 0.5rem env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px rgb(15 23 42 / 8%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.mobile-bottom-nav__items {
  display: flex;
  min-height: 3.75rem;
  align-items: stretch;
  justify-content: space-around;
  gap: 0.125rem;
}

.mobile-bottom-nav__link {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border-radius: 0.5rem;
  color: #64748b;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav__link span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-bottom-nav__link.is-active {
  color: #0369a1;
}

.mobile-bottom-nav__more {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1 1 0;
}

.mobile-bottom-nav__more summary {
  flex: 1 1 0;
  cursor: pointer;
  list-style: none;
}

.mobile-bottom-nav__more summary::-webkit-details-marker {
  display: none;
}

.mobile-bottom-nav__popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  display: grid;
  width: max-content;
  min-width: 12rem;
  gap: 0.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.5rem;
  box-shadow: 0 12px 32px rgb(15 23 42 / 16%);
}

.mobile-bottom-nav__menu-link {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.mobile-bottom-nav__menu-link.is-active,
.mobile-bottom-nav__menu-link:hover {
  background: #f0f9ff;
  color: #0369a1;
}
