/* =========================================================
   DropPoint Native Android App Shell (<= 768px)
   75% Matte Black · 15% Crisp White · 10% Functional Accents
   ========================================================= */

html, body {
  background: #070709;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
  font-size: 15px;
}

body {
  padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
}

/* Disable webpage-like text selection on app chrome */
.topbar, .btn, .badge, .mobile-bottom-nav, .card-header {
  user-select: none;
  -webkit-user-select: none;
}

/* Native Android Top App Bar */
.topbar {
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid #1e1e24;
  padding: env(safe-area-inset-top, 0px) 1rem 0;
  min-height: 56px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
}

.nav-right {
  gap: 0.45rem;
}

.nav-user,
.desktop-only-nav,
.site-footer {
  display: none !important;
}

.container {
  padding: 0.95rem 0.95rem 1.5rem;
}

/* Native App Room Header Card (Resident Screen) */
.app-hero-header {
  background: #111114;
  border: 1px solid #23232a;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-hero-room {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8e8e98;
}

.app-hero-name {
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

.app-hero-sub {
  font-size: 0.78rem;
  color: #8e8e98;
  margin-top: 2px;
}

.page-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.grid-2,
.grid-equal {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Native Rounded App Cards */
.card {
  background: #111114;
  border: 1px solid #222229;
  border-radius: 18px;
  padding: 1.1rem;
  margin-bottom: 0.95rem;
}

.card-header {
  border-bottom: 1px solid #1e1e25;
  padding-bottom: 0.65rem;
  margin-bottom: 0.9rem;
}

.card-title {
  font-size: 0.96rem;
  font-weight: 700;
}

/* Touch-Friendly Controls */
input, select, textarea {
  background: #18181d;
  border: 1px solid #2c2c35;
  border-radius: 12px;
  font-size: 16px;
  padding: 0.78rem 0.9rem;
}

.btn {
  min-height: 46px;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-sm {
  min-height: 38px;
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
}

/* APK-Style Parcel Ticket Cards */
.parcel-item {
  flex-direction: column;
  align-items: stretch;
  background: #151519;
  border: 1px solid #26262f;
  border-radius: 16px;
  padding: 0.9rem;
  gap: 0.75rem;
}

.parcel-photo {
  width: 100%;
  height: 175px;
  border-radius: 12px;
}

.parcel-courier {
  font-size: 1.05rem;
}

.pin-box {
  display: inline-block;
  margin-top: 4px;
  font-size: 1.45rem;
  letter-spacing: 6px;
  padding: 0.3rem 0.8rem;
  border-radius: 10px;
  background: #09090b;
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #ffffff;
}

.parcel-item form,
.parcel-item .btn {
  width: 100%;
}

/* Convert Tables to Native List Cards */
table, thead, tbody, th, td, tr {
  display: block;
  width: 100%;
}

thead {
  display: none;
}

tbody tr {
  background: #151519;
  border: 1px solid #24242c;
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.65rem;
}

tbody tr:hover {
  background: #151519;
}

tbody td {
  border: none;
  padding: 0.22rem 0;
  font-size: 0.88rem;
}

.thumb {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  margin-bottom: 0.4rem;
}

/* Mobile Tab Panels (APK View Switcher) */
.mobile-tab-panel {
  display: none;
}

.mobile-tab-panel.active {
  display: block;
  animation: fade-in 0.16s var(--ease);
}

/* Material 3 Native Bottom Navigation Bar */
.mobile-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(13, 13, 16, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid #222229;
  padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: center;
}

.m-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: #8e8e98;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  padding: 0.2rem 0;
}

.m-nav-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 28px;
  border-radius: 999px;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.m-nav-item.active {
  color: #ffffff;
}

.m-nav-item.active .m-nav-pill {
  background: #ffffff;
  color: #09090b;
}

.m-nav-badge {
  position: absolute;
  top: -3px;
  right: 4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Native Bottom-Sheet Modals */
.modal-backdrop {
  align-items: flex-end;
  padding: 0;
}

.modal-card {
  max-width: 100%;
  border-radius: 22px 22px 0 0;
  padding: 1rem 1.25rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
}

.modal-card::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: #3a3a45;
  margin: 0 auto 0.9rem;
}

.toast-alert {
  left: 0.95rem;
  right: 0.95rem;
  max-width: none;
  border-radius: 14px;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #09090b;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.app-splash img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}