/* Kisma Estate â€” native Android app shell (Capacitor + role dashboards) */

html.kisma-native-app {
  --kisma-app-nav-h: 64px;
}

html.kisma-native-app body {
  padding-bottom: calc(var(--kisma-app-nav-h) + env(safe-area-inset-bottom, 0px));
}

html.kisma-native-app .kisma-scroll-progress,
html.kisma-native-app .kisma-download-nav,
html.kisma-native-app .site-float-widgets,
html.kisma-native-app .kisma-float-stack,
html.kisma-native-app .kisma-chatbot-fab,
html.kisma-native-app .kisma-ai-help-btn,
html.kisma-native-app .kisma-whatsapp-fab,
html.kisma-native-app .kisma-whatsapp-float {
  display: none !important;
}

html.kisma-native-app .dashboard-sidebar,
html.kisma-native-app .sidebar-overlay,
html.kisma-native-app #sidebarToggle,
html.kisma-native-app #sidebarClose {
  display: none !important;
}

html.kisma-native-app .dashboard-main,
html.kisma-native-app #dashboardMain {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

html.kisma-native-app .dashboard-content {
  padding: 1rem !important;
  padding-bottom: calc(1rem + var(--kisma-app-nav-h) + env(safe-area-inset-bottom, 0px)) !important;
}

html.kisma-native-app .dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
}

html.kisma-native-app .dashboard-page-title {
  font-size: 1.25rem;
  margin-bottom: 1rem !important;
}

.kisma-mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
  justify-content: space-around;
  align-items: stretch;
}

html.kisma-native-app .kisma-mobile-bottom-nav {
  display: flex;
}

@media (max-width: 767.98px) {
  .kisma-mobile-bottom-nav {
    display: flex;
  }

  body:has(.kisma-mobile-bottom-nav) {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  body:has(.kisma-mobile-bottom-nav) .dashboard-content {
    padding-bottom: calc(1rem + 64px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

.kisma-mobile-bottom-nav__item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  text-decoration: none !important;
  color: #64748b !important;
  font-size: 0.68rem;
  font-weight: 600;
  min-width: 0;
  border-radius: 12px;
  padding: 0.25rem 0.15rem;
}

.kisma-mobile-bottom-nav__item i {
  font-size: 1.15rem;
  line-height: 1;
}

.kisma-mobile-bottom-nav__item.is-active {
  color: #0f172a !important;
  font-weight: 700;
}

.kisma-mobile-bottom-nav__item.is-active i {
  color: #c9a227;
  transform: translateY(-1px);
}

.kisma-mobile-bottom-nav__icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kisma-mobile-bottom-nav__item.is-active .kisma-mobile-bottom-nav__icon-wrap {
  background: rgba(201, 162, 39, 0.18);
  border-radius: 12px;
  padding: 0.2rem 0.55rem;
}

.kisma-mobile-bottom-nav__badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

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

html[data-theme="dark"] .kisma-mobile-bottom-nav {
  background: #0f172a;
  border-top-color: rgba(248, 250, 252, 0.08);
}

html[data-theme="dark"] .kisma-mobile-bottom-nav__item {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .kisma-mobile-bottom-nav__item.is-active {
  color: #f8fafc !important;
}

/* Auto update prompt (buyer / tenant / owner native app) */
.kisma-app-update-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.55);
}
.kisma-app-update-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  padding: 1.35rem 1.25rem 1.15rem;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  text-align: center;
}
.kisma-app-update-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  color: #fff;
  background: linear-gradient(145deg, #3ddc84, #0f172a);
}
.kisma-app-update-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #0f172a;
}
.kisma-app-update-version {
  margin: 0 0 0.65rem;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
}
.kisma-app-update-notes {
  margin: 0 0 1rem;
  color: #475569;
  font-size: 0.9rem;
  white-space: pre-wrap;
  text-align: left;
  max-height: 9rem;
  overflow: auto;
}
.kisma-app-update-actions {
  display: grid;
  gap: 0.5rem;
}
.kisma-app-update-btn {
  display: block;
  text-decoration: none;
  background: #c9a227;
  color: #0f172a !important;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.8rem 1rem;
}
.kisma-app-update-later {
  border: 0;
  background: transparent;
  color: #64748b;
  font-weight: 600;
  padding: 0.55rem;
}
html[data-theme="dark"] .kisma-app-update-card {
  background: #0f172a;
}
html[data-theme="dark"] .kisma-app-update-title {
  color: #f8fafc;
}
html[data-theme="dark"] .kisma-app-update-notes {
  color: #cbd5e1;
}

/* Notifications page — full list, not clipped by bottom nav / topbar */
.kisma-notif-page {
  max-width: 720px;
  margin: 0 auto;
}
.kisma-notif-page__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.kisma-notif-page__sub {
  color: #64748b;
  font-size: 0.9rem;
}
.kisma-notif-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #94a3b8;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}
.kisma-notif-empty i {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.65rem;
}
.kisma-notif-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.kisma-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 0.95rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none !important;
  color: inherit;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.kisma-notif-item.is-unread {
  border-color: rgba(201, 162, 39, 0.45);
  background: #fffbeb;
}
.kisma-notif-item__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.kisma-notif-item.is-unread .kisma-notif-item__icon {
  background: rgba(201, 162, 39, 0.2);
  color: #92400e;
}
.kisma-notif-item__body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.kisma-notif-item__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  word-break: break-word;
}
.kisma-notif-item__msg {
  font-size: 0.86rem;
  color: #475569;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: none;
  overflow: visible;
}
.kisma-notif-item__time {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}
.kisma-notif-item__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #c9a227;
  flex-shrink: 0;
  margin-top: 0.35rem;
}
html.kisma-native-app .dashboard-topbar,
html.kisma-native-app .dashboard-main {
  overflow: visible !important;
}
html.kisma-native-app .dashboard-content {
  overflow-x: hidden;
  padding-bottom: calc(1.25rem + var(--kisma-app-nav-h) + env(safe-area-inset-bottom, 0px)) !important;
}
html.kisma-native-app .kisma-notif-page {
  padding-bottom: 0.5rem;
}
html[data-theme="dark"] .kisma-notif-item,
html[data-theme="dark"] .kisma-notif-empty {
  background: #0f172a;
  border-color: #334155;
}
html[data-theme="dark"] .kisma-notif-item.is-unread {
  background: rgba(201, 162, 39, 0.12);
}
html[data-theme="dark"] .kisma-notif-item__title {
  color: #f8fafc;
}
html[data-theme="dark"] .kisma-notif-item__msg {
  color: #cbd5e1;
}
