/* ============================================
   EMC Kerala – KECSBC Compliance Portal
   Design language: Enelys (deep teal · soft pastels · big rounded cards)
   Layered on Bootstrap 5.3
   ============================================ */

:root {
  /* Bootstrap theme overrides */
  --bs-primary: #134e4a;
  --bs-primary-rgb: 19, 78, 74;
  --bs-link-color: #134e4a;
  --bs-link-color-rgb: 19, 78, 74;
  --bs-link-hover-color: #0f3d3a;
  --bs-link-hover-color-rgb: 15, 61, 58;
  --bs-body-bg: #e8eaf0;
  --bs-body-color: #0f172a;
  --bs-secondary-color: #64748b;
  --bs-tertiary-color: #94a3b8;
  --bs-border-color: #e5e7eb;
  --bs-border-color-translucent: #e5e7eb;

  /* App tokens */
  --teal-900: #134e4a;
  --teal-700: #0f766e;
  --teal-500: #14b8a6;
  --teal-50:  #ccfbf1;
  --mint-100: #d1fae5;
  --mint-300: #a7f3d0;
  --lilac-200: #ddd6fe;
  --lilac-300: #c4b5fd;
  --accent-rose: #e11d48;

  --card-radius: 18px;
  --pill-radius: 12px;
  --sidebar-width: 248px;
  --sidebar-width-compact: 76px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  background: #e8eaf0;
  color: var(--bs-body-color);
  -webkit-font-smoothing: antialiased;
}

/* Buttons */
.btn { font-weight: 500; border-radius: 10px; }

/* Button-styled links never carry the default underline */
a.btn,
a.btn-view,
a.btn-customize,
a.btn-locate,
a.btn-back-step,
a.btn-step-next,
a.btn-fullscreen,
a.icon-btn,
a.menu-toggle,
a.user-trigger,
a.form-action,
a.aside-link,
a.back-link,
a.wizard-back,
a.chat-fab,
a.btn-link,
a.dropdown-item { text-decoration: none; }
a.btn:hover,
a.btn-view:hover,
a.btn-customize:hover,
a.btn-locate:hover,
a.btn-back-step:hover,
a.btn-step-next:hover,
a.form-action:hover,
a.aside-link:hover,
a.back-link:hover,
a.wizard-back:hover,
a.chat-fab:hover,
a.btn-link:hover,
a.dropdown-item:hover { text-decoration: none; }
.btn-lg { border-radius: 12px; }
.btn-primary {
  --bs-btn-bg: var(--teal-900);
  --bs-btn-border-color: var(--teal-900);
  --bs-btn-hover-bg: #0f3d3a;
  --bs-btn-hover-border-color: #0f3d3a;
  --bs-btn-active-bg: #0a2e2c;
  --bs-btn-active-border-color: #0a2e2c;
}
.btn-outline-secondary {
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-border-color: var(--bs-border-color);
  --bs-btn-hover-bg: #f8fafc;
  --bs-btn-hover-border-color: var(--bs-border-color);
  --bs-btn-hover-color: var(--bs-body-color);
}
.btn-link { text-decoration: none; font-weight: 500; }
.btn-link:hover { text-decoration: none; color: var(--bs-link-hover-color); }

/* ============================================
   Brand
   ============================================ */
.brand-logo {
  width: 44px; height: 44px;
  display: grid; place-items: center; flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.kerala-emblem { display: block; width: 72px; height: auto; opacity: 0.95; }
.kerala-emblem img { width: 100%; height: auto; display: block; }
.gov-line {
  font-size: 11px; font-weight: 600; color: var(--bs-secondary-color);
  letter-spacing: 0.06em; text-transform: uppercase; text-align: center;
}
.brand-text { line-height: 1.15; }
.brand-text .title { font-size: 16px; font-weight: 700; color: var(--bs-body-color); }
.brand-text .subtitle { font-size: 11px; color: var(--bs-secondary-color); margin-top: 2px; }

/* ============================================
   Sidebar  (Enelys-style — white, rounded items, MAIN/OTHER groups, user card at bottom)
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--bs-border-color);
  position: fixed;
  inset: 0 auto 0 0;
  padding: 22px 16px 16px;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, width 0.25s ease, padding 0.25s ease;
  overflow: hidden;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 8px 18px;
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background 0.15s;
}
a.sidebar-brand:hover { text-decoration: none; background: #f8fafc; }

.nav-label {
  font-size: 11px; font-weight: 600; color: var(--bs-tertiary-color);
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0 12px; margin: 14px 0 8px;
}
.nav-label:first-of-type { margin-top: 4px; }

.sidebar .nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: #475569;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  transition: background 0.15s, color 0.15s;
}
.sidebar .nav-link i { font-size: 17px; flex-shrink: 0; opacity: 0.85; }
.sidebar .nav-link:hover { background: #f8fafc; color: var(--bs-body-color); }
.sidebar .nav-link.active {
  background: var(--teal-900);
  color: #fff;
}
.sidebar .nav-link.active i { opacity: 1; }

.sidebar-divider { border-top: 1px solid #f1f5f9; margin: 14px 4px; }

.sidebar-foot-note {
  text-align: center; font-size: 11px; color: var(--bs-tertiary-color);
  margin-top: auto;
  padding-top: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.sidebar-foot-note .kerala-emblem { width: 48px; opacity: 0.7; }

/* Mobile */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: 4px 0 24px rgba(15,23,42,0.12); }
  .sidebar.open { transform: translateX(0); }
}

/* Desktop compact (icon-only) */
@media (min-width: 992px) {
  html.sidebar-collapsed .sidebar {
    width: var(--sidebar-width-compact);
    padding: 22px 10px 16px;
  }
  html.sidebar-collapsed .main-wrap {
    margin-left: var(--sidebar-width-compact);
  }
  html.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding: 4px 0 18px;
  }
  html.sidebar-collapsed .brand-text { display: none; }
  html.sidebar-collapsed .nav-label { display: none; }
  html.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding: 11px 0;
    position: relative;
  }
  html.sidebar-collapsed .sidebar .nav-link .nav-text { display: none; }
  html.sidebar-collapsed .sidebar .nav-link i { font-size: 18px; margin: 0; }
  html.sidebar-collapsed .sidebar-foot-note { padding: 12px 0 0; }
  html.sidebar-collapsed .sidebar-foot-note .foot-text { display: none; }

  /* Tooltip on hover when collapsed */
  html.sidebar-collapsed .sidebar .nav-link[data-label]:hover::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    background: #0f172a;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1050;
    pointer-events: none;
    box-shadow: 0 4px 6px -1px rgb(15 23 42 / 0.15);
  }
  html.sidebar-collapsed .sidebar .nav-link[data-label]:hover::before {
    content: '';
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #0f172a;
    z-index: 1050;
    pointer-events: none;
  }
}

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1030;
}
.sidebar-backdrop.show { display: block; }

/* ============================================
   Main + topbar
   ============================================ */
.main-wrap {
  margin-left: var(--sidebar-width);
  display: flex; flex-direction: column; min-height: 100vh;
  transition: margin-left 0.25s ease;
}
@media (max-width: 991.98px) { .main-wrap { margin-left: 0; } }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--bs-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  gap: 24px;
  min-height: 72px;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.greeting { min-width: 0; }
.greeting h1 {
  font-size: 20px; font-weight: 700; line-height: 1.2; margin: 0;
  color: var(--bs-body-color);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.greeting p {
  font-size: 12.5px; color: var(--bs-secondary-color);
  margin: 2px 0 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 575.98px) {
  .topbar { padding: 12px 16px; gap: 12px; min-height: 64px; }
  .greeting h1 { font-size: 17px; }
  .greeting p { display: none; }
}

.menu-toggle {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--bs-border-color);
  display: grid; place-items: center;
  color: var(--bs-secondary-color); background: #fff;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.menu-toggle:hover { background: #fff; border-color: #cbd5e1; }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Topbar search */
.topbar-search {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  height: 40px;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  width: 320px;
  max-width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, width 0.2s;
}
.topbar-search:focus-within {
  border-color: var(--teal-700);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.10);
  width: 360px;
}
.topbar-search > i {
  color: var(--bs-tertiary-color);
  font-size: 15px;
}
.topbar-search input {
  flex: 1;
  border: none; outline: none; background: transparent;
  font-size: 13.5px;
  color: var(--bs-body-color);
  min-width: 0;
}
.topbar-search input::placeholder { color: var(--bs-tertiary-color); }
.topbar-search kbd {
  font-size: 10px; font-weight: 600;
  padding: 2px 7px;
  background: #f1f5f9;
  border: 1px solid var(--bs-border-color);
  border-radius: 5px;
  color: var(--bs-secondary-color);
  font-family: inherit;
  flex-shrink: 0;
}
@media (max-width: 991.98px) {
  .topbar-search { display: none; }
}

.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--bs-border-color); background: #fff;
  display: grid; place-items: center;
  color: var(--bs-secondary-color);
  position: relative;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--bs-body-color); border-color: #cbd5e1; }
.icon-btn .dot {
  position: absolute; top: 9px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-rose); border: 2px solid #fff;
}

/* Vertical separator */
.topbar-sep {
  width: 1px; height: 28px;
  background: var(--bs-border-color);
  margin: 0 6px;
  flex-shrink: 0;
}
@media (max-width: 575.98px) { .topbar-sep { display: none; } }

/* Topbar user dropdown */
.user-menu { position: relative; }
.user-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 14px 4px 4px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  color: var(--bs-body-color);
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.user-trigger:hover { border-color: #cbd5e1; box-shadow: 0 1px 2px rgba(15,23,42,0.04); }
.user-trigger[aria-expanded="true"] { border-color: var(--teal-700); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.10); }
.user-trigger .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 11px; flex-shrink: 0;
}
.user-trigger .meta { line-height: 1.15; text-align: left; min-width: 0; }
.user-trigger .meta .name { font-size: 13px; font-weight: 600; color: var(--bs-body-color); white-space: nowrap; }
.user-trigger .meta .role { font-size: 11px; color: var(--bs-secondary-color); white-space: nowrap; }
.user-trigger .chev { color: var(--bs-tertiary-color); font-size: 12px; }
@media (max-width: 575.98px) {
  .user-trigger .meta { display: none; }
  .user-trigger { padding: 4px; border-radius: 50%; }
  .user-trigger .chev { display: none; }
}

.user-dropdown.dropdown-menu {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 8px;
  min-width: 260px;
  box-shadow: 0 10px 25px -5px rgb(15 23 42 / 0.12);
  margin-top: 8px !important;
}
.user-dropdown .user-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 6px;
}
.user-dropdown .user-card .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
}
.user-dropdown .user-card .name { font-size: 14px; font-weight: 700; color: var(--bs-body-color); }
.user-dropdown .user-card .sub { font-size: 12px; color: var(--bs-secondary-color); }
.user-dropdown .dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--bs-body-color);
}
.user-dropdown .dropdown-item:hover { background: #f8fafc; }
.user-dropdown .dropdown-item i { font-size: 16px; color: var(--bs-secondary-color); width: 18px; text-align: center; }
.user-dropdown .dropdown-item.text-danger { color: #b91c1c; }
.user-dropdown .dropdown-item.text-danger i { color: #b91c1c; }
.user-dropdown .dropdown-divider { margin: 6px 4px; border-color: #f1f5f9; }

.content { padding: 22px 32px 32px; flex: 1; }
@media (max-width: 991.98px) { .content { padding: 22px 24px 28px; } }
@media (max-width: 575.98px) { .content { padding: 16px 14px 20px; } }

/* ============================================
   Filter chips row (Enelys style)
   ============================================ */
.filter-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.filter-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  color: var(--bs-body-color);
  font-size: 14px; font-weight: 500;
  min-width: 180px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* Group action buttons so they wrap together when the row breaks */
.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 991.98px) {
  .filter-pill { min-width: 160px; flex: 1 1 calc(50% - 5px); }
  .filter-spacer { display: none; }
  .filter-actions { flex: 1 1 100%; justify-content: flex-end; }
}
@media (max-width: 575.98px) {
  .filter-row { gap: 8px; }
  .filter-pill { min-width: 0; flex: 1 1 100%; padding: 9px 12px; font-size: 13px; }
  .filter-actions { gap: 8px; }
  .btn-customize, .btn-customize-secondary { flex: 1 1 100%; justify-content: center; }
}
.filter-pill:hover { border-color: #cbd5e1; }
.filter-pill[aria-expanded="true"] {
  border-color: var(--teal-700);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.10);
}
.filter-pill i.lead { color: var(--bs-secondary-color); font-size: 16px; }
.filter-pill i.chev {
  color: var(--bs-tertiary-color); margin-left: auto; font-size: 14px;
  transition: transform 0.2s;
}
.filter-pill[aria-expanded="true"] i.chev { transform: rotate(180deg); }
.filter-pill .label { color: var(--bs-secondary-color); }
.filter-pill.active .label { color: var(--bs-body-color); font-weight: 600; }
.filter-pill.active { border-color: var(--teal-700); background: var(--teal-50); }
.filter-pill.active i.lead { color: var(--teal-900); }

/* Filter dropdown menu */
.filter-dropdown.dropdown-menu {
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 6px;
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 10px 25px -5px rgb(15 23 42 / 0.12);
  margin-top: 8px !important;
}
.filter-dropdown .dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--bs-body-color);
  cursor: pointer;
}
.filter-dropdown .dropdown-item:hover { background: #f8fafc; }
.filter-dropdown .dropdown-item.is-selected {
  background: var(--teal-50);
  color: var(--teal-900);
  font-weight: 600;
}
.filter-dropdown .dropdown-item.is-selected::after {
  content: '\F26E';
  font-family: 'bootstrap-icons';
  margin-left: auto;
  color: var(--teal-900);
  font-weight: 400;
}
.filter-dropdown .dropdown-divider { margin: 4px 4px; border-color: #f1f5f9; }
.filter-dropdown .dropdown-header {
  font-size: 11px; font-weight: 600;
  color: var(--bs-tertiary-color);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px 4px;
}

.empty-row td {
  padding: 36px 24px !important;
  text-align: center;
  color: var(--bs-tertiary-color);
}
.empty-row .empty-inner { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
.empty-row .empty-inner i { font-size: 20px; opacity: 0.6; }

.filter-spacer { flex: 1; }

.btn-customize {
  background: var(--teal-900); color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
  cursor: pointer;
}
.btn-customize:hover { background: #0f3d3a; color: #fff; }

.btn-customize-secondary {
  background: #fff;
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-customize-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--bs-body-color);
}
.btn-customize-secondary i { font-size: 14px; }

/* ============================================
   Cards (Enelys – big radius, subtle border)
   ============================================ */
.card {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--card-radius);
  box-shadow: none;
  overflow: hidden;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bs-secondary-color);
  border-top-left-radius: var(--card-radius) !important;
  border-top-right-radius: var(--card-radius) !important;
  display: flex; align-items: center; justify-content: space-between;
}

/* ============================================
   Stat cards (top KPI tiles)
   ============================================ */
.stat-card {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--card-radius);
  padding: 22px 24px;
  height: 100%;
  display: flex; flex-direction: column; gap: 14px;
}
.stat-card .stat-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}
.stat-card .stat-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.stat-card .stat-value {
  font-size: 30px; font-weight: 700; line-height: 1;
  color: var(--bs-body-color);
}
.stat-card .stat-delta {
  font-size: 13px; font-weight: 600;
  color: var(--teal-700);
}
.stat-card .stat-delta.neg { color: var(--accent-rose); }
.stat-card .stat-delta.muted { color: var(--bs-tertiary-color); }
.stat-card .stat-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.stat-card .stat-sub {
  font-size: 12px; color: var(--bs-tertiary-color);
}
.stat-bar {
  height: 8px; border-radius: 4px;
  background: var(--mint-100);
  flex: 1; max-width: 130px; position: relative; overflow: hidden;
}
.stat-bar.neg { background: #fee2e2; }
.stat-bar.muted { background: #e2e8f0; }
.stat-bar::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0;
  width: 3px; background: var(--teal-900); border-radius: 2px;
}
.stat-bar.neg::after { background: var(--accent-rose); }
.stat-bar.muted::after { background: var(--bs-tertiary-color); }

/* Stat icon variant (when a card uses an icon block instead of bar) */
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px;
}
.stat-icon.bg-teal-soft   { background: var(--teal-50);  color: var(--teal-900); }
.stat-icon.bg-mint-soft   { background: var(--mint-100); color: #047857; }
.stat-icon.bg-lilac-soft  { background: var(--lilac-200); color: #5b21b6; }
.stat-icon.bg-rose-soft   { background: #fee2e2; color: #be123c; }
.stat-icon.bg-amber-soft  { background: #fef3c7; color: #92400e; }
.stat-icon.bg-blue-soft   { background: #dbeafe; color: #1e40af; }

/* Big stat card — dedicated card for primary metric (e.g. My Buildings) */
.big-stat-card {
  background:
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(20, 184, 166, 0.18) 0%, transparent 60%),
    linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
  color: var(--bs-body-color);
  border-radius: var(--card-radius);
  padding: 22px 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--teal-50);
}
.big-stat-card::before {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, transparent 70%);
  top: -80px; right: -60px;
  pointer-events: none;
}
.big-stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--teal-900);
  border: none;
  display: grid; place-items: center;
  font-size: 19px;
  color: #fff;
  flex-shrink: 0;
  margin-bottom: 14px;
  position: relative; z-index: 1;
}
.big-stat-content {
  flex: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; z-index: 1;
}
.big-stat-value {
  font-size: 42px; font-weight: 800; line-height: 1;
  letter-spacing: -0.02em;
  color: var(--teal-900);
}
.big-stat-label {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 10px;
  color: var(--bs-body-color);
}
.big-stat-sub {
  font-size: 12.5px;
  color: var(--bs-secondary-color);
  margin-top: 2px;
}
.big-stat-actions {
  display: flex; gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
  position: relative; z-index: 1;
}
.big-stat-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 12px;
  background: var(--teal-900);
  border: 1px solid var(--teal-900);
  border-radius: 9px;
  color: #fff;
  font-size: 12.5px; font-weight: 600;
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.big-stat-cta:hover {
  background: #0a2e2c;
  border-color: #0a2e2c;
  color: #fff;
}
.big-stat-cta:active { transform: translateY(1px); }
.big-stat-cta i { font-size: 13px; }
.big-stat-cta.secondary {
  background: #fff;
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
}
.big-stat-cta.secondary:hover {
  background: #f8fafc;
  border-color: var(--teal-700);
  color: var(--bs-body-color);
}

/* Stage mini-grid (the 4-stage compliance overview card) */
.stage-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stage-mini {
  padding: 22px 18px;
  border-right: 1px solid #f1f5f9;
  display: flex; flex-direction: column;
  min-width: 0;
}
.stage-mini:last-child { border-right: none; }
.stage-mini-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 16px;
  margin-bottom: 12px;
}
.stage-mini-icon.bg-blue-soft  { background: #dbeafe; color: #1e40af; }
.stage-mini-icon.bg-amber-soft { background: #fef3c7; color: #92400e; }
.stage-mini-icon.bg-mint-soft  { background: var(--mint-100); color: #047857; }
.stage-mini-icon.bg-lilac-soft { background: var(--lilac-200); color: #5b21b6; }
.stage-mini-value {
  font-size: 26px; font-weight: 700; line-height: 1;
  color: var(--bs-body-color);
}
.stage-mini-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--bs-body-color);
  margin-top: 8px;
}
.stage-mini-sub {
  font-size: 12px;
  color: var(--bs-secondary-color);
  margin-top: 1px;
}
@media (max-width: 767.98px) {
  .stage-mini-grid { grid-template-columns: repeat(2, 1fr); }
  .stage-mini { border-bottom: 1px solid #f1f5f9; }
  .stage-mini:nth-child(2n) { border-right: none; }
  .stage-mini:nth-child(2n+1) { border-right: 1px solid #f1f5f9; }
  .stage-mini:nth-last-child(-n+2) { border-bottom: none; }
}

/* Compact stat-card variant (used when 5 cards share a row) */
.stat-card.compact { padding: 18px 20px; gap: 10px; }
.stat-card .stat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.stat-card .stat-icon-mini {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.stat-card .stat-icon-mini.bg-teal-soft  { background: var(--teal-50);  color: var(--teal-900); }
.stat-card .stat-icon-mini.bg-mint-soft  { background: var(--mint-100); color: #047857; }
.stat-card .stat-icon-mini.bg-blue-soft  { background: #dbeafe; color: #1e40af; }
.stat-card .stat-icon-mini.bg-amber-soft { background: #fef3c7; color: #92400e; }
.stat-card .stat-icon-mini.bg-lilac-soft { background: var(--lilac-200); color: #5b21b6; }
.stat-card.compact .stat-value { font-size: 26px; }
.stat-card.compact .stat-sub {
  font-size: 12px; color: var(--bs-secondary-color);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================
   Tables
   ============================================ */
.table-card { padding: 0; }
.table {
  margin-bottom: 0;
  --bs-table-bg: #ffffff;
  --bs-table-hover-bg: #fafbfc;
  background: #fff;
}
.table > :not(caption) > * > * { padding: 18px 24px; vertical-align: middle; background: #fff; }
.table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-tertiary-color);
  background: #ffffff !important;
  border-bottom: 1px solid var(--bs-border-color);
  padding: 14px 24px;
}
.table tbody tr { transition: background 0.15s; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody td { border-color: #f1f5f9; }
.table .building-name { font-weight: 600; color: var(--bs-body-color); }
.ref-no {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: var(--accent-rose);
  font-size: 13px;
}

/* Buildings table — rich cells */
.building-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.building-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-900);
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.building-icon.icon-hospital { background: #fef2f2; color: #b91c1c; }
.building-icon.icon-office   { background: var(--lilac-200); color: #5b21b6; }
.building-icon.icon-school   { background: #fef3c7; color: #92400e; }
.building-icon.icon-retail   { background: #fce7f3; color: #be185d; }
.building-icon.icon-mixed    { background: var(--mint-100); color: #047857; }
.building-text { min-width: 0; line-height: 1.25; }
.building-text .name {
  font-size: 14px; font-weight: 600;
  color: var(--bs-body-color);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.building-text .meta {
  font-size: 12px; color: var(--bs-tertiary-color);
  margin-top: 2px;
}

.owner-cell { display: flex; align-items: center; gap: 10px; }
.owner-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #475569, #64748b);
}
.owner-avatar.tone-1 { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.owner-avatar.tone-2 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.owner-avatar.tone-3 { background: linear-gradient(135deg, #be123c, #f43f5e); }
.owner-avatar.tone-4 { background: linear-gradient(135deg, #b45309, #f59e0b); }

.bua-value { font-size: 14px; font-weight: 600; color: var(--bs-body-color); }
.bua-unit  { font-size: 11px; color: var(--bs-tertiary-color); margin-left: 3px; font-weight: 500; }

/* Stage progress — 4 dots */
.stage-progress { display: flex; flex-direction: column; gap: 6px; min-width: 110px; }
.stage-dots { display: flex; align-items: center; gap: 5px; }
.stage-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #e2e8f0;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s;
}
.stage-dot.done { background: var(--teal-700); }
.stage-dot.active {
  background: var(--teal-900);
  box-shadow: 0 0 0 3px rgba(19, 78, 74, 0.15);
}
.stage-bar {
  height: 3px; background: #e2e8f0; border-radius: 2px;
  position: relative; overflow: hidden; flex: 1; margin: 0 2px;
}
.stage-bar.fill { background: var(--teal-700); }
.stage-label { font-size: 11px; color: var(--bs-secondary-color); font-weight: 500; }

.btn-view {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  color: var(--bs-body-color);
  font-size: 13px; font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-view:hover {
  background: var(--teal-900); color: #fff; border-color: var(--teal-900);
}
.btn-view i { font-size: 13px; }

.row-action { display: inline-flex; align-items: center; gap: 6px; }
.btn-kebab {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--bs-tertiary-color);
  display: grid; place-items: center;
}
.btn-kebab:hover { background: #f1f5f9; color: var(--bs-body-color); border-color: var(--bs-border-color); }

/* ============================================
   Pagination (themed)
   ============================================ */
.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  flex-wrap: wrap;
}
.table-foot .summary {
  font-size: 13px; color: var(--bs-secondary-color);
}
.table-foot .summary strong { color: var(--bs-body-color); font-weight: 700; }

.pager {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.page-size {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--bs-secondary-color);
}
.page-size select {
  padding: 6px 28px 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  font-size: 13px;
  color: var(--bs-body-color);
  cursor: pointer;
}

.pagination-list {
  display: flex; align-items: center; gap: 4px;
  list-style: none; padding: 0; margin: 0;
}
.pagination-list .page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  color: var(--bs-body-color);
  font-size: 13px; font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pagination-list .page-link:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.pagination-list .page-link.is-active {
  background: var(--teal-900);
  color: #fff;
  border-color: var(--teal-900);
}
.pagination-list .page-link.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}
.pagination-list .page-link i { font-size: 13px; }
.pagination-list .ellipsis {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 34px;
  color: var(--bs-tertiary-color);
  font-weight: 700;
}

@media (max-width: 575.98px) {
  .table-foot { padding: 12px 14px; gap: 10px; }
  .pager { gap: 10px; width: 100%; justify-content: space-between; }
  .page-size { font-size: 12px; }
  .page-size .label { display: none; }
  .pagination-list .page-link { min-width: 30px; height: 30px; padding: 0 8px; font-size: 12px; }
}

@media (max-width: 767.98px) {
  .table > :not(caption) > * > * { padding: 14px 16px; }
  .table thead th { padding: 12px 16px; font-size: 10px; }
  .building-cell { gap: 10px; }
  .building-icon { width: 38px; height: 38px; font-size: 16px; border-radius: 9px; }
  .building-text .name { font-size: 13px; }
  .building-text .meta { font-size: 11px; }
  .owner-cell .owner-avatar { width: 26px; height: 26px; font-size: 10px; }
  .stage-progress { min-width: 90px; }
  .btn-view { padding: 6px 10px; font-size: 12px; }
  .btn-view i { display: none; }
  .row-action { gap: 4px; }
  .ref-no { font-size: 12px; }
}

/* ============================================
   Status pills (Enelys-style soft pastels)
   ============================================ */
.pill {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.01em;
}
.pill-success { background: var(--mint-100); color: #065f46; }
.pill-warning { background: #fef3c7; color: #92400e; }
.pill-danger  { background: #fee2e2; color: #991b1b; }
.pill-neutral { background: #f1f5f9; color: var(--bs-secondary-color); }
.pill-info    { background: var(--lilac-200); color: #4c1d95; }
.pill-teal    { background: var(--teal-50); color: var(--teal-900); }

/* ============================================
   Page header & breadcrumbs
   ============================================ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-header h2 { font-size: 22px; font-weight: 700; margin: 0; }
.page-header p { font-size: 14px; color: var(--bs-secondary-color); margin: 4px 0 0; }

.breadcrumb { font-size: 13px; margin-bottom: 8px; }
.breadcrumb-item a { color: var(--teal-900); text-decoration: none; }
.breadcrumb-item a:hover { color: #0a2e2c; }
.breadcrumb-item.active { color: var(--bs-tertiary-color); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--bs-tertiary-color); }

/* ============================================
   Forms
   ============================================ */
.form-label { font-size: 13px; font-weight: 500; color: var(--bs-secondary-color); margin-bottom: 6px; }
.form-label .req { color: var(--bs-danger); }
.form-control, .form-select {
  font-size: 14px;
  padding: 11px 14px;
  border-color: var(--bs-border-color);
  border-radius: 10px;
  background: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--teal-700);
  box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.12);
}
.form-text { font-size: 12px; color: var(--bs-tertiary-color); }

.form-card-actions {
  display: flex; justify-content: flex-end; gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
  border-bottom-left-radius: var(--card-radius);
  border-bottom-right-radius: var(--card-radius);
}

/* ============================================
   Detail / Info
   ============================================ */
.info-item .label {
  font-size: 11px; font-weight: 600; color: var(--bs-tertiary-color);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px;
}
.info-item .value { font-size: 14px; color: var(--bs-body-color); font-weight: 500; }

.stages > .stage:first-child { padding-top: 8px; }
.stage {
  display: flex; gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
}
.stage:last-child { border-bottom: none; }
.stage-marker {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: #f1f5f9; color: var(--bs-tertiary-color);
  font-weight: 600; flex-shrink: 0;
  border: 2px solid var(--bs-border-color);
  font-size: 13px;
}
.stage.done .stage-marker { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }
.stage.active .stage-marker { background: var(--teal-900); color: #fff; border-color: var(--teal-900); }
.stage-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.stage-desc { font-size: 13px; color: var(--bs-secondary-color); margin: 0; }

/* ============================================
   Promo card (the soft mint card on Enelys dashboard)
   ============================================ */
.promo-card {
  background: linear-gradient(135deg, #ecfeff 0%, #f0fdfa 100%);
  border: 1px solid var(--teal-50);
  border-radius: var(--card-radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  height: 100%;
}
.promo-card h3 { font-size: 16px; font-weight: 700; line-height: 1.4; margin: 0 0 8px; max-width: 85%; }
.promo-card p { font-size: 13px; color: var(--bs-secondary-color); margin: 0 0 16px; max-width: 90%; }
@media (max-width: 575.98px) {
  .promo-card { padding: 18px; }
  .promo-card h3 { font-size: 15px; max-width: 100%; }
  .promo-card .leaf { font-size: 70px; right: -16px; bottom: -16px; }
}
.promo-card .leaf {
  position: absolute; right: -10px; bottom: -10px;
  font-size: 90px; color: var(--lilac-300); opacity: 0.55;
  transform: rotate(15deg);
}

/* ============================================
   Registration wizard (multi-step)
   ============================================ */
.wizard-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 991.98px) { .wizard-layout { grid-template-columns: 1fr; gap: 20px; } }

.wizard-aside { position: sticky; top: 92px; }
@media (max-width: 991.98px) { .wizard-aside { position: static; } }

.wizard-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--bs-secondary-color); font-weight: 500;
  text-decoration: none; margin-bottom: 18px;
}
.wizard-back:hover { color: var(--bs-body-color); }

.wizard-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.wizard-subtitle { font-size: 13px; color: var(--bs-secondary-color); margin: 0 0 24px; }

/* Stepper */
.stepper { display: flex; flex-direction: column; }
.step {
  display: flex; gap: 14px;
  padding-bottom: 26px;
  position: relative;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: '';
  position: absolute;
  left: 15px; top: 32px; bottom: 4px;
  width: 2px;
  background: var(--bs-border-color);
}
.step:last-child::before { display: none; }
.step.done::before { background: var(--teal-700); }
.step.active::before { background: linear-gradient(to bottom, var(--teal-900) 0%, var(--bs-border-color) 50%); }

.step .marker {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  background: #fff;
  border: 2px solid var(--bs-border-color);
  color: var(--bs-tertiary-color);
  flex-shrink: 0;
  z-index: 1;
}
.step.active .marker { background: var(--teal-900); color: #fff; border-color: var(--teal-900); }
.step.done   .marker { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }

.step .step-text { padding-top: 4px; line-height: 1.25; }
.step .step-text .label { font-size: 14px; font-weight: 700; color: var(--bs-tertiary-color); margin-bottom: 2px; }
.step .step-text .desc  { font-size: 12px; color: var(--bs-tertiary-color); }
.step.active .step-text .label { color: var(--teal-900); }
.step.done   .step-text .label { color: var(--teal-700); }
.step.active .step-text .desc, .step.done .step-text .desc { color: var(--bs-secondary-color); }

/* Aside info box */
.wizard-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 24px;
  padding: 14px 16px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  font-size: 12px;
  color: #1e40af;
  font-weight: 500;
  line-height: 1.45;
}
.wizard-note i { font-size: 16px; flex-shrink: 0; }

/* Form card */
.wizard-form-card {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--card-radius);
  padding: 32px 36px;
  overflow: hidden;
}
@media (max-width: 575.98px) { .wizard-form-card { padding: 24px 20px; } }

.form-icon-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-900);
  display: grid; place-items: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.wizard-form-card h2 {
  font-size: 22px; font-weight: 700; margin: 0 0 6px;
}
.wizard-form-card .lead-sub {
  font-size: 14px; color: var(--bs-secondary-color); margin: 0 0 24px;
}

.wizard-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.wizard-actions .left, .wizard-actions .right { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 575.98px) {
  .wizard-actions { flex-direction: column-reverse; align-items: stretch; }
  .wizard-actions .left, .wizard-actions .right { width: 100%; }
  .wizard-actions .btn-back-step,
  .wizard-actions .btn-step-next { flex: 1 1 auto; justify-content: center; }
}

.btn-back-step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  color: var(--bs-body-color);
  font-weight: 500;
  font-size: 14px;
}
.btn-back-step:hover { background: #f8fafc; }

.btn-step-next {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  background: var(--teal-900);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  border: none;
}
.btn-step-next:hover { background: #0f3d3a; color: #fff; }

/* Validation alert */
.alert-error {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}
.alert-error i { font-size: 18px; color: #b91c1c; flex-shrink: 0; margin-top: 1px; }

/* Phone input with prefix */
.phone-input { display: flex; }
.phone-prefix {
  display: grid; place-items: center;
  padding: 0 16px;
  background: #f8fafc;
  border: 1px solid var(--bs-border-color);
  border-right: none;
  border-radius: 10px 0 0 10px;
  font-weight: 600;
  color: var(--bs-body-color);
  font-size: 14px;
}
.phone-input .form-control { border-radius: 0 10px 10px 0; }

/* KECSBC applicability info card */
.applicability-card {
  display: flex; align-items: center; gap: 14px;
  background: #f8fafc;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 8px;
}
.applicability-card .ico {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.applicability-card.is-applicable { background: var(--mint-100); border-color: var(--mint-300); }
.applicability-card.is-applicable .ico { background: var(--teal-700); color: #fff; }
.applicability-card .title { font-size: 14px; font-weight: 700; color: var(--bs-body-color); }
.applicability-card .desc { font-size: 12px; color: var(--bs-secondary-color); margin-top: 2px; }

/* Location map placeholder */
.map-frame {
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, #f1f5f9 0 12px, #f8fafc 12px 24px);
  min-height: 320px;
  display: flex; flex-direction: column;
  position: relative;
}
.map-frame .map-empty {
  flex: 1; display: grid; place-items: center;
  color: var(--bs-tertiary-color); font-size: 13px;
}
.map-frame .map-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255,255,255,0.92);
  border-top: 1px solid var(--bs-border-color);
  font-size: 12px;
  color: var(--bs-secondary-color);
}
.map-frame .map-foot .latlng span { margin-right: 16px; }

.btn-locate {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  color: var(--bs-body-color);
  font-size: 12px; font-weight: 500;
}
.btn-locate:hover { background: #f8fafc; }

/* Undertaking section */
.undertaking-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: var(--bs-body-color);
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid #f1f5f9;
  margin-bottom: 14px;
}
.undertaking-head i { color: var(--teal-700); font-size: 18px; }

.undertaking-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  margin-bottom: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.undertaking-item:hover { border-color: #cbd5e1; }
.undertaking-item .form-check-input {
  margin-top: 2px;
  flex-shrink: 0;
  width: 18px; height: 18px;
  cursor: pointer;
}
.undertaking-item .form-check-input:checked {
  background-color: var(--teal-900);
  border-color: var(--teal-900);
}
.undertaking-item label {
  font-size: 13.5px; color: var(--bs-body-color); line-height: 1.5;
  cursor: pointer; margin: 0; flex: 1;
}
.undertaking-item:has(.form-check-input:checked) { background: #ecfdf5; border-color: #a7f3d0; }

/* OTP step */
.otp-row {
  display: flex; gap: 10px; justify-content: center;
  margin: 16px 0 8px;
  flex-wrap: wrap;
}
.otp-row input {
  width: 56px; height: 64px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: #fff;
  color: var(--bs-body-color);
}
@media (max-width: 575.98px) {
  .otp-row { gap: 6px; }
  .otp-row input { width: 44px; height: 54px; font-size: 18px; border-radius: 10px; }
}
.otp-row input:focus {
  outline: none;
  border-color: var(--teal-700);
  box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.12);
}
.otp-meta {
  text-align: center; font-size: 13px; color: var(--bs-secondary-color);
  margin-top: 8px;
}
.otp-meta a { color: var(--teal-900); font-weight: 600; }

/* Step panel show/hide */
.step-panel { display: none; }
.step-panel.is-active { display: block; }

/* ============================================
   Building detail (stages + forms viewer)
   ============================================ */
.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 991.98px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-aside {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--card-radius);
  padding: 24px 18px;
  position: sticky; top: 92px;
}
@media (max-width: 991.98px) { .detail-aside { position: static; } }

.detail-aside .back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--bs-secondary-color); text-decoration: none; font-weight: 500;
  margin-bottom: 14px;
}
.detail-aside .back-link:hover { color: var(--bs-body-color); }

.detail-aside h2 {
  font-size: 18px; font-weight: 700; margin: 0 0 6px;
  line-height: 1.25;
}
.detail-aside .perm-no {
  display: inline-block;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  color: var(--bs-secondary-color);
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
}

.aside-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }

/* Stage nav */
.stage-nav { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.stage-nav-item {
  position: relative;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.stage-nav-item:hover { background: #f8fafc; }
.stage-nav-item.active { background: #eff6ff; }
.stage-nav-item .marker {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  background: #fff;
  border: 2px solid var(--bs-border-color);
  color: var(--bs-tertiary-color);
  flex-shrink: 0;
  z-index: 1;
}
.stage-nav-item.active .marker {
  background: #2563eb; color: #fff; border-color: #2563eb;
}
.stage-nav-item .label {
  font-size: 13px; font-weight: 700; color: var(--bs-tertiary-color); line-height: 1.25;
}
.stage-nav-item.active .label { color: #1e40af; }
.stage-nav-item .desc {
  font-size: 11px; color: var(--bs-tertiary-color); margin-top: 2px;
}
.stage-nav-item.active .desc { color: var(--bs-secondary-color); }
.stage-nav-item::before {
  content: '';
  position: absolute;
  left: 25px; top: 38px; bottom: -2px;
  width: 2px;
  background: var(--bs-border-color);
}
.stage-nav-item:last-child::before { display: none; }

.aside-divider { border-top: 1px solid #f1f5f9; margin: 16px 0; }

.aside-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--bs-secondary-color);
  text-decoration: none;
  font-weight: 500;
}
.aside-link:hover { background: #f8fafc; color: var(--bs-body-color); }
.aside-link i { font-size: 14px; color: var(--bs-tertiary-color); }
.aside-link .ms-auto { margin-left: auto; font-weight: 700; color: var(--bs-body-color); font-size: 12px; }
.aside-link.has-ref .ms-auto {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: var(--accent-rose);
  font-weight: 500;
}

/* Summary strip — compact */
.summary-strip {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-bottom: 16px;
  overflow: hidden;
}
@media (max-width: 1199.98px) { .summary-strip { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (max-width: 575.98px)  { .summary-strip { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 12px 14px; } }
.summary-strip .meta-item {
  position: relative;
  padding-right: 10px;
  min-width: 0;
}
.summary-strip .meta-item:not(:last-child)::after {
  content: '';
  position: absolute; right: 0; top: 4px; bottom: 4px;
  width: 1px;
  background: var(--bs-border-color);
}
@media (max-width: 1199.98px) {
  .summary-strip .meta-item:nth-child(3n)::after { display: none; }
}
@media (max-width: 575.98px) {
  .summary-strip .meta-item::after { display: none !important; }
  .summary-strip .meta-item { padding-right: 0; }
}
.summary-strip .meta-item .label {
  font-size: 10px; font-weight: 600;
  color: var(--bs-tertiary-color);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.summary-strip .meta-item .value {
  font-size: 13px; font-weight: 700; color: var(--bs-body-color);
  line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Stage section header */
.stage-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 6px 4px;
  flex-wrap: wrap;
}
.stage-section-head h3 {
  font-size: 18px; font-weight: 700; margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.stage-section-head .head-right {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
@media (max-width: 575.98px) {
  .stage-section-head h3 { font-size: 16px; }
  .stage-section-head .head-right { gap: 10px; }
  .forms-progress { font-size: 11px; }
}
.forms-progress {
  font-size: 12px; color: var(--bs-secondary-color); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.forms-progress strong { color: var(--bs-body-color); font-weight: 700; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.status-pill::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.status-pill.in-progress { background: #dbeafe; color: #1e40af; }
.status-pill.not-started { background: #f1f5f9; color: var(--bs-secondary-color); }
.status-pill.completed   { background: var(--mint-100); color: #065f46; }

/* Form cards (cleaner, icon-led) */
.form-card {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow 0.2s, border-color 0.15s, transform 0.15s;
}
.form-card.is-issued:hover {
  box-shadow: 0 4px 12px -4px rgb(15 23 42 / 0.08);
  border-color: #cbd5e1;
}
.form-card.is-locked {
  background: #fafbfc;
  border-color: #eef2f7;
}
.form-card.is-if-needed {
  background: #fffbeb;
  border-color: #fde68a;
}
.form-card.is-ready {
  border-left: 4px solid var(--teal-900);
  padding-left: 18px;
  background:
    linear-gradient(to right, rgba(20, 184, 166, 0.05) 0%, transparent 50%),
    #fff;
  box-shadow: 0 1px 3px rgba(15, 78, 74, 0.06);
}
.form-card.is-ready .form-icon {
  background: var(--teal-900);
  color: #fff;
}

.form-card .form-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 19px;
  flex-shrink: 0;
  background: var(--mint-100);
  color: #047857;
}
.form-card.is-issued .form-icon { background: var(--mint-100); color: #047857; }
.form-card.is-locked .form-icon { background: #eef2f7; color: var(--bs-tertiary-color); }
.form-card.is-if-needed .form-icon { background: #fef3c7; color: #b45309; }

.form-card .form-body { flex: 1; min-width: 0; }

.form-card .form-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.form-card .form-head h4 {
  font-size: 15px; font-weight: 700; margin: 0;
  color: var(--bs-body-color);
}
.form-card.is-locked .form-head h4 { color: var(--bs-secondary-color); }

.form-card .form-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 8px;
  font-size: 12.5px; color: var(--bs-secondary-color);
}
.form-card .form-meta > span {
  display: inline-flex; align-items: center; gap: 5px;
}
.form-card .form-meta i { font-size: 13px; opacity: 0.85; }
.form-card .form-meta .ref {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: var(--accent-rose);
  font-size: 12px;
}
.form-card .form-meta .sep {
  color: var(--bs-tertiary-color);
  font-weight: 700;
  margin: 0 2px;
}
.form-card .form-meta .status-ok { color: #065f46; }
.form-card .form-meta .status-ok i { color: var(--teal-700); }

.form-card .form-actions {
  margin-top: 14px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.form-action {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  color: var(--bs-body-color);
  font-size: 12.5px; font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.form-action:hover {
  background: var(--teal-900); color: #fff; border-color: var(--teal-900);
}
.form-action i { font-size: 13px; }
.form-action.primary {
  background: var(--teal-50); border-color: transparent; color: var(--teal-900);
}
.form-action.primary:hover { background: var(--teal-900); color: #fff; }

.form-action.solid {
  background: var(--teal-900);
  border-color: var(--teal-900);
  color: #fff;
  padding: 9px 18px;
  font-size: 13px;
}
.form-action.solid:hover {
  background: #0a2e2c;
  border-color: #0a2e2c;
  color: #fff;
}
.form-action.solid i { font-size: 14px; }

.form-card .form-desc {
  font-size: 13px;
  color: var(--bs-secondary-color);
  line-height: 1.5;
  margin: 4px 0 0;
}

.form-card .locked-msg {
  font-size: 13px;
  color: var(--bs-tertiary-color);
  margin: 0;
  line-height: 1.5;
}
.form-card.is-if-needed .locked-msg { color: #92400e; opacity: 0.9; }

.pill-issued    { background: var(--mint-100); color: #065f46; }
.pill-locked    { background: #eef2f7; color: var(--bs-secondary-color); }
.pill-if-needed { background: #fef3c7; color: #92400e; }
.pill-ready     { background: var(--teal-50); color: var(--teal-900); }

@media (max-width: 575.98px) {
  .form-card { padding: 14px 16px; gap: 12px; }
  .form-card .form-icon { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; }
  .form-card .form-head { flex-wrap: wrap; gap: 6px; }
  .form-card .form-head h4 { font-size: 14px; }
  .form-card .form-meta { font-size: 11.5px; gap: 4px 6px; }
  .form-card .form-meta .ref { font-size: 11px; }
  .form-card .form-actions { gap: 6px; margin-top: 10px; }
  .form-action { padding: 6px 11px; font-size: 12px; }
}

/* Info banner */
.info-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
  color: #1e40af;
  font-weight: 500;
  font-size: 13.5px;
}
.info-banner .ico {
  width: 38px; height: 38px; border-radius: 12px;
  background: #fff; color: #2563eb;
  display: grid; place-items: center; font-size: 17px; flex-shrink: 0;
  border: 1px solid #dbeafe;
}
.info-banner strong { color: #1e3a8a; font-weight: 700; }

/* Stage panels */
.stage-panel { display: none; }
.stage-panel.is-active { display: block; }

/* Collapsible cards (Documents / Payments) */
.collapsible-card {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
.collapsible-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  user-select: none;
}
.collapsible-head h4 {
  font-size: 15px; font-weight: 600; margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.collapsible-head h4 i { color: var(--bs-secondary-color); }
.collapsible-head .chev {
  color: var(--bs-tertiary-color);
  transition: transform 0.2s;
  font-size: 14px;
}
.collapsible-card.open .collapsible-head .chev { transform: rotate(90deg); }
.collapsible-body { padding: 0 22px 18px; border-top: 1px solid #f1f5f9; padding-top: 14px; }
.collapsible-card:not(.open) .collapsible-body { display: none; }

.empty-mini {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  color: var(--bs-tertiary-color);
  font-size: 13px;
}
.empty-mini i { font-size: 16px; }

/* Documents — grouped by form */
.doc-group { margin-bottom: 18px; }
.doc-group:last-child { margin-bottom: 0; }
.doc-group-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700;
  color: var(--bs-tertiary-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  padding: 0 4px;
}
.doc-group-head .doc-count {
  background: #f1f5f9;
  color: var(--bs-secondary-color);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.doc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  background: #fff;
  margin-bottom: 6px;
  transition: border-color 0.15s, background 0.15s;
}
.doc-item:hover { border-color: var(--bs-border-color); background: #fafbfc; }
.doc-item:last-child { margin-bottom: 0; }
.doc-icon-mini {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}
.doc-icon-mini.pdf   { background: #fef2f2; color: #b91c1c; }
.doc-icon-mini.image { background: #eff6ff; color: #1e40af; }
.doc-icon-mini.sheet { background: var(--mint-100); color: #047857; }
.doc-icon-mini.dwg   { background: #fef3c7; color: #92400e; }
.doc-icon-mini.word  { background: #dbeafe; color: #1e3a8a; }
.doc-info { flex: 1; min-width: 0; }
.doc-name {
  font-size: 13.5px; font-weight: 600;
  color: var(--bs-body-color);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-meta {
  font-size: 11.5px;
  color: var(--bs-tertiary-color);
  margin-top: 2px;
}
.doc-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.doc-action {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--bs-tertiary-color);
  display: grid; place-items: center;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.doc-action:hover { background: #f1f5f9; color: var(--bs-body-color); }
.doc-action.text-danger:hover { background: #fef2f2; color: #b91c1c; }

@media (max-width: 575.98px) {
  .doc-item { padding: 10px; gap: 10px; }
  .doc-name { font-size: 13px; }
  .doc-meta { font-size: 11px; }
  .doc-action { width: 28px; height: 28px; }
}

.payment-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.payment-row:last-of-type { border-bottom: none; }
.payment-row .stage-tag {
  background: #dbeafe; color: #1e40af;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.payment-row .pay-desc {
  font-size: 13.5px; font-weight: 500;
  color: var(--bs-body-color);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.payment-row .amount {
  font-size: 14px; font-weight: 700;
  color: var(--bs-body-color);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.payment-row .date {
  font-size: 12px;
  color: var(--bs-secondary-color);
  flex-shrink: 0;
  min-width: 86px;
  text-align: right;
}
.payment-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 4px;
  border-top: 1px solid var(--bs-border-color);
  margin-top: 4px;
  font-weight: 700;
}
.payment-total .label { font-size: 13px; color: var(--bs-secondary-color); }
.payment-total .amount {
  font-size: 18px; color: var(--teal-900);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
  .payment-row { gap: 10px; }
  .payment-row .pay-desc { flex: 1 1 100%; order: 5; font-size: 12.5px; color: var(--bs-secondary-color); margin-top: -4px; }
  .payment-row .date { min-width: 0; }
}

/* ============================================
   Settings page
   ============================================ */
.settings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 991.98px) { .settings-layout { grid-template-columns: 1fr; gap: 14px; } }

.settings-tabs {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--card-radius);
  padding: 8px;
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
@media (max-width: 991.98px) {
  .settings-tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .settings-tabs::-webkit-scrollbar { height: 0; }
}

.settings-tab {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--bs-secondary-color);
  font-size: 14px; font-weight: 500;
  width: 100%;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.settings-tab:hover {
  background: #f8fafc;
  color: var(--bs-body-color);
}
.settings-tab.active {
  background: var(--teal-50);
  color: var(--teal-900);
  font-weight: 600;
}
.settings-tab i {
  font-size: 16px;
  color: var(--bs-tertiary-color);
  flex-shrink: 0;
}
.settings-tab.active i { color: var(--teal-900); }
@media (max-width: 991.98px) {
  .settings-tab { width: auto; flex-shrink: 0; padding: 9px 14px; }
}

.settings-panel { min-width: 0; max-width: 800px; }
.settings-pane { display: none; }
.settings-pane.is-active { display: block; }
.settings-pane > .settings-section:last-child { margin-bottom: 0; }

.settings-section {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--card-radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.settings-head {
  padding: 22px 24px;
  border-bottom: 1px solid #f1f5f9;
}
.settings-head h3 {
  font-size: 16px; font-weight: 700; margin: 0 0 4px;
  display: flex; align-items: center; gap: 12px;
}
.settings-head h3 .head-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-900);
  display: grid; place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.settings-head p {
  font-size: 13px; color: var(--bs-secondary-color);
  margin: 0;
  padding-left: 46px;
}
.settings-body { padding: 24px; }
.settings-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

/* Avatar block */
.avatar-block {
  display: flex; align-items: center; gap: 18px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid #f1f5f9;
}
.avatar-preview {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 26px;
  position: relative;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.avatar-upload-btn {
  position: absolute;
  bottom: 0; right: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  display: grid; place-items: center;
  font-size: 12px;
  color: var(--bs-body-color);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15,23,42,0.10);
}
.avatar-upload-btn:hover { background: #f8fafc; color: var(--teal-900); }

.avatar-info { min-width: 0; }
.avatar-info .name { font-size: 16px; font-weight: 700; }
.avatar-info .meta { font-size: 13px; color: var(--bs-secondary-color); margin-top: 2px; }
.avatar-info .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.pill-verified {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--mint-100);
  color: #065f46;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.pill-verified i { font-size: 12px; }

/* Mobile display row */
.mobile-display {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  background: #f8fafc;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 12px;
}
.mobile-display .num {
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.mobile-display .num > i {
  color: var(--teal-700); font-size: 18px;
}

/* Notification rows */
.notif-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}
.notif-row:first-child { padding-top: 0; }
.notif-row:last-child { border-bottom: none; padding-bottom: 0; }
.notif-row .notif-info { flex: 1; min-width: 0; }
.notif-row .notif-info .title {
  font-size: 14px; font-weight: 600; color: var(--bs-body-color);
}
.notif-row .notif-info .desc {
  font-size: 12.5px; color: var(--bs-secondary-color); margin-top: 3px; line-height: 1.5;
}
.form-switch .form-check-input {
  width: 42px; height: 22px;
  cursor: pointer;
}
.form-switch .form-check-input:checked {
  background-color: var(--teal-900);
  border-color: var(--teal-900);
}
.form-switch .form-check-input:focus {
  border-color: var(--teal-700);
  box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.12);
}

/* Session row */
.session-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}
.session-row:first-child { padding-top: 0; }
.session-row:last-child { border-bottom: none; padding-bottom: 0; }
.session-row .device-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--bs-secondary-color);
  display: grid; place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}
.session-row .session-info { flex: 1; min-width: 0; }
.session-row .device-name {
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.session-row .session-meta {
  font-size: 12px; color: var(--bs-secondary-color); margin-top: 2px;
}
.pill-current {
  background: var(--mint-100); color: #065f46;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
}

@media (max-width: 575.98px) {
  .settings-head, .settings-body, .settings-actions { padding-left: 18px; padding-right: 18px; }
  .settings-head p { padding-left: 0; }
  .avatar-block { gap: 14px; }
  .avatar-preview { width: 64px; height: 64px; font-size: 22px; }
}

/* ============================================
   Help Center
   ============================================ */
.help-wrap { max-width: 1080px; }

.help-hero {
  background:
    radial-gradient(ellipse 70% 80% at 100% 50%, rgba(20, 184, 166, 0.15) 0%, transparent 60%),
    linear-gradient(135deg, var(--teal-50) 0%, #ecfdf5 100%);
  border: 1px solid var(--teal-50);
  border-radius: var(--card-radius);
  padding: 56px 32px;
  text-align: center;
  margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.help-hero h2 {
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--teal-900);
  margin: 0 0 8px;
}
.help-hero .lead {
  font-size: 14.5px; color: var(--bs-secondary-color);
  margin: 0 0 26px;
}
.help-search {
  display: flex; align-items: center; gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 22px;
  height: 54px;
  background: #fff;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  box-shadow: 0 4px 14px rgba(15, 78, 74, 0.08);
}
.help-search:focus-within {
  border-color: var(--teal-700);
  box-shadow: 0 4px 18px rgba(15, 78, 74, 0.18);
}
.help-search > i { color: var(--bs-tertiary-color); font-size: 18px; }
.help-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; color: var(--bs-body-color);
  min-width: 0;
}
.help-search input::placeholder { color: var(--bs-tertiary-color); }

.help-suggestions {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 16px; flex-wrap: wrap;
}
.help-suggestions .label { font-size: 12px; color: var(--bs-secondary-color); }
.help-suggestions a {
  font-size: 12px; font-weight: 500;
  padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--teal-50);
  color: var(--teal-900);
  text-decoration: none;
}
.help-suggestions a:hover { background: #fff; border-color: var(--teal-700); color: var(--teal-900); }

/* Section heading */
.help-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 28px 0 14px;
  flex-wrap: wrap; gap: 8px;
}
.help-section-head h3 {
  font-size: 16px; font-weight: 700; margin: 0;
  display: flex; align-items: center; gap: 8px;
}

/* Category grid */
.help-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 991.98px) { .help-categories { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .help-categories { grid-template-columns: 1fr; } }

.help-category-card {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.help-category-card:hover {
  border-color: var(--teal-700);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -6px rgba(15, 78, 74, 0.18);
  color: inherit;
}
.help-category-card .cat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 18px;
  margin-bottom: 14px;
}
.help-category-card .cat-icon.bg-teal-soft  { background: var(--teal-50);  color: var(--teal-900); }
.help-category-card .cat-icon.bg-mint-soft  { background: var(--mint-100); color: #047857; }
.help-category-card .cat-icon.bg-blue-soft  { background: #dbeafe; color: #1e40af; }
.help-category-card .cat-icon.bg-amber-soft { background: #fef3c7; color: #92400e; }
.help-category-card .cat-icon.bg-lilac-soft { background: var(--lilac-200); color: #5b21b6; }
.help-category-card .cat-icon.bg-rose-soft  { background: #fee2e2; color: #be123c; }
.help-category-card h4 {
  font-size: 14.5px; font-weight: 700;
  margin: 0 0 4px;
  color: var(--bs-body-color);
}
.help-category-card p {
  font-size: 12.5px; color: var(--bs-secondary-color);
  margin: 0 0 8px;
  line-height: 1.5;
}
.help-category-card .count {
  font-size: 11px; color: var(--bs-tertiary-color);
  font-weight: 500;
}

/* Article list */
.help-article-list {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  overflow: hidden;
}
.help-article-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.help-article-item:last-child { border-bottom: none; }
.help-article-item:hover { background: #f8fafc; color: inherit; }
.help-article-item .art-icon {
  color: var(--teal-700); font-size: 14px; flex-shrink: 0;
}
.help-article-item .art-title {
  font-size: 14px; font-weight: 500;
  flex: 1; min-width: 0;
}
.help-article-item .art-meta {
  font-size: 11.5px; color: var(--bs-tertiary-color);
  white-space: nowrap;
}
.help-article-item .art-arrow { color: var(--bs-tertiary-color); font-size: 13px; }

/* FAQ accordion (themed Bootstrap) */
.help-faq.accordion .accordion-item {
  border: 1px solid var(--bs-border-color);
  background: #fff;
  border-radius: 12px !important;
  margin-bottom: 8px;
  overflow: hidden;
}
.help-faq.accordion .accordion-button {
  font-size: 14px; font-weight: 600;
  padding: 14px 18px;
  background: #fff;
  color: var(--bs-body-color);
  box-shadow: none !important;
  border-radius: 12px !important;
}
.help-faq.accordion .accordion-button:not(.collapsed) {
  background: var(--teal-50);
  color: var(--teal-900);
}
.help-faq.accordion .accordion-button:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.10) !important;
}
.help-faq.accordion .accordion-body {
  padding: 0 18px 16px;
  font-size: 13.5px;
  color: var(--bs-secondary-color);
  line-height: 1.6;
}

/* Contact card */
.help-contact-card {
  background:
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(20, 184, 166, 0.18) 0%, transparent 60%),
    linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
  border: 1px solid var(--teal-50);
  border-radius: var(--card-radius);
  padding: 28px;
  margin-top: 24px;
}
.help-contact-card h4 {
  font-size: 18px; font-weight: 700;
  color: var(--teal-900);
  margin: 0 0 6px;
}
.help-contact-card .lead {
  font-size: 13px; color: var(--bs-secondary-color);
  margin: 0 0 18px;
}
.help-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 767.98px) { .help-contact-grid { grid-template-columns: 1fr; } }
.help-contact-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--teal-50);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.help-contact-item:hover { border-color: var(--teal-700); color: inherit; transform: translateY(-1px); }
.help-contact-item .ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-900);
  display: grid; place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.help-contact-item .label {
  font-size: 10px; font-weight: 700;
  color: var(--bs-tertiary-color);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.help-contact-item .value {
  font-size: 13.5px; font-weight: 600;
  color: var(--bs-body-color);
}

/* Resources */
.help-resources {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 6px 18px;
}
.help-resource-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
}
.help-resource-row:last-child { border-bottom: none; }
.help-resource-row:hover { color: inherit; }
.help-resource-row:hover .res-title { color: var(--teal-900); }
.help-resource-row .res-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  display: grid; place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.help-resource-row .res-icon.doc { background: #dbeafe; color: #1e40af; }
.help-resource-row .res-icon.guide { background: var(--mint-100); color: #047857; }
.help-resource-row .res-info { flex: 1; min-width: 0; }
.help-resource-row .res-title {
  font-size: 14px; font-weight: 600; color: var(--bs-body-color);
  transition: color 0.15s;
}
.help-resource-row .res-meta {
  font-size: 12px; color: var(--bs-tertiary-color);
  margin-top: 2px;
}

/* ============================================
   Modals (themed)
   ============================================ */
.modal-content {
  border: none;
  border-radius: var(--card-radius);
  overflow: hidden;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--bs-border-color);
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  margin: 0;
}
.modal-title .modal-title-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-900);
  display: grid; place-items: center;
  font-size: 16px;
}
.modal-body { padding: 22px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--bs-border-color);
  background: #fafbfc;
}

/* Sub-step card inside modal */
.modal-step {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 22px;
}
.modal-step h5 {
  font-size: 15px; font-weight: 700;
  margin: 0 0 4px;
  display: flex; align-items: center; gap: 8px;
}
.modal-step h5 .step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal-900);
  color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
}
.modal-step .step-sub {
  font-size: 13px; color: var(--bs-secondary-color);
  margin: 0 0 16px;
}
.modal-step + .modal-step { margin-top: 16px; }

/* Takeover — building result preview */
.tk-building-card {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
}
.tk-building-head {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}
.tk-building-head .tk-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-900);
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.tk-building-head .tk-name {
  font-size: 16px; font-weight: 700; margin: 0 0 4px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tk-building-head .tk-ref { font-size: 12px; color: var(--bs-secondary-color); }

.tk-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 18px;
}
@media (max-width: 575.98px) { .tk-detail-grid { grid-template-columns: repeat(2, 1fr); } }
.tk-detail-grid .info-item { min-width: 0; }
.tk-detail-grid .label {
  font-size: 10px; font-weight: 600;
  color: var(--bs-tertiary-color);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.tk-detail-grid .value {
  font-size: 13px; font-weight: 600; color: var(--bs-body-color);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tk-current-beee {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  margin-top: 14px;
}
.tk-current-beee .ico {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fed7aa;
  color: #9a3412;
  display: grid; place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tk-current-beee .label {
  font-size: 10px; font-weight: 700;
  color: #9a3412;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.tk-current-beee .value { font-size: 13.5px; font-weight: 700; color: #7c2d12; }

.tk-step-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ============================================
   Chat FAB
   ============================================ */
.chat-fab {
  position: fixed; right: 24px; bottom: 24px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--teal-900);
  color: #fff;
  display: grid; place-items: center;
  border: none; font-size: 22px;
  box-shadow: 0 10px 25px -5px rgb(19 78 74 / 0.45);
  z-index: 1020;
  transition: transform 0.2s, background 0.2s;
}
.chat-fab:hover { background: #0f3d3a; color: #fff; transform: translateY(-2px); }

/* ============================================
   Auth — modern split layout
   ============================================ */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fff;
  font-family: 'Inter', system-ui, sans-serif;
}

/* Left hero */
.auth-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(20, 184, 166, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(167, 243, 208, 0.10) 0%, transparent 60%),
    linear-gradient(135deg, #0a2e2c 0%, #134e4a 55%, #0f766e 100%);
  color: #fff;
  padding: 48px 56px;
  display: flex; flex-direction: column;
}
.auth-hero::before {
  content: '';
  position: absolute;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  top: -120px; right: -150px;
  pointer-events: none;
}
.auth-hero .grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 0%, transparent 70%);
  pointer-events: none;
}

.hero-emblem {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 48px;
  position: relative; z-index: 1;
}
.hero-emblem .kerala-emblem { width: 56px; opacity: 1; }
.hero-emblem .kerala-emblem img { filter: brightness(0) invert(1); opacity: 0.95; }
.hero-emblem .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero-content {
  flex: 1;
  position: relative; z-index: 1;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
}
.hero-content h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero-content .hero-sub {
  font-size: 12px;
  opacity: 0.7;
  line-height: 1.5;
  margin: 0 0 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-content .hero-lead {
  font-size: 16px;
  opacity: 0.85;
  line-height: 1.6;
  margin: 0;
}

.hero-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.hero-features li {
  display: flex; align-items: center; gap: 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
}
.hero-features .check {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid; place-items: center;
  font-size: 13px;
  color: #6ee7b7;
  flex-shrink: 0;
}

.hero-foot {
  font-size: 12px;
  opacity: 0.55;
  position: relative; z-index: 1;
  letter-spacing: 0.02em;
}

/* Right form panel */
.auth-form-panel {
  display: grid;
  place-items: center;
  padding: 48px 32px;
  background: #fff;
  position: relative;
}
.auth-form-card { width: 100%; max-width: 380px; }

.form-emc-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid #f1f5f9;
}
.form-emc-brand .brand-logo { width: 44px; height: 44px; }
.form-emc-brand .meta { line-height: 1.2; }
.form-emc-brand .meta .title { font-size: 15px; font-weight: 700; color: var(--bs-body-color); }
.form-emc-brand .meta .subtitle { font-size: 11px; color: var(--bs-secondary-color); margin-top: 2px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }

.auth-form-card h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.auth-form-card .lead-sub {
  font-size: 14px;
  color: var(--bs-secondary-color);
  margin: 0 0 28px;
  line-height: 1.5;
}

.auth-form-card .form-control-lg {
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  height: auto;
}

.pwd-wrap { position: relative; }
.toggle-pwd {
  position: absolute;
  right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: transparent; border: none;
  color: var(--bs-tertiary-color);
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.toggle-pwd:hover { color: var(--bs-body-color); background: #f1f5f9; }

.auth-options {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 0 22px;
}
.auth-options .form-check { margin: 0; }
.auth-options .form-check-input {
  width: 16px; height: 16px;
  margin-top: 2px;
}
.auth-options .form-check-input:checked {
  background-color: var(--teal-900);
  border-color: var(--teal-900);
}
.auth-options .form-check-label {
  font-size: 13px;
  color: var(--bs-secondary-color);
  margin-left: 4px;
}
.auth-options a { font-size: 13px; font-weight: 600; color: var(--teal-900); }

.auth-form-card .btn-primary.btn-lg {
  padding: 13px;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 10px;
  letter-spacing: 0.01em;
}

.auth-divider {
  position: relative;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-tertiary-color);
  margin: 28px 0 24px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute; top: 50%;
  width: calc(50% - 32px); height: 1px;
  background: var(--bs-border-color);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-help {
  font-size: 13px;
  color: var(--bs-secondary-color);
  text-align: center;
}
.auth-help a { color: var(--teal-900); font-weight: 600; }

/* Login OTP flow */
.auth-form-card .phone-input { display: flex; }
.auth-form-card .phone-input .phone-prefix {
  padding: 0 16px;
  background: #f8fafc;
  border: 1px solid var(--bs-border-color);
  border-right: none;
  border-radius: 10px 0 0 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--bs-body-color);
  display: grid; place-items: center;
}
.auth-form-card .phone-input .form-control { border-radius: 0 10px 10px 0; }

.phone-display {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--teal-50);
  border: 1px solid #99f6e4;
  border-radius: 10px;
  margin-bottom: 22px;
}
.phone-display .num {
  font-size: 14px; font-weight: 700;
  color: var(--teal-900);
  display: flex; align-items: center; gap: 8px;
}
.phone-display .num i { font-size: 16px; }
.phone-display .change-link {
  font-size: 12.5px; font-weight: 600;
  color: var(--teal-900);
  text-decoration: none;
  background: transparent; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
  transition: background 0.15s;
}
.phone-display .change-link:hover { background: rgba(15, 78, 74, 0.08); }

.auth-form-card .otp-row {
  margin: 14px 0 22px;
  gap: 8px;
}
.auth-form-card .otp-row input {
  width: 48px; height: 56px;
  font-size: 20px;
}
@media (max-width: 575.98px) {
  .auth-form-card .otp-row input { width: 42px; height: 52px; font-size: 18px; }
}

.resend-info {
  text-align: center;
  font-size: 13px;
  color: var(--bs-secondary-color);
  margin-top: 16px;
}
.resend-info .resend-btn {
  background: transparent; border: none;
  color: var(--teal-900);
  font-weight: 600;
  font-size: 13px;
  padding: 0; cursor: pointer;
  text-decoration: none;
}
.resend-info .resend-btn:hover { color: #0a2e2c; }
.resend-info .resend-btn:disabled,
.resend-info .resend-btn.is-disabled {
  color: var(--bs-tertiary-color); cursor: not-allowed; pointer-events: none;
}
.resend-info .timer {
  color: var(--bs-tertiary-color);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 991.98px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-form-panel { padding: 40px 24px; min-height: 100vh; }
  .auth-form-card { max-width: 400px; }
}
@media (max-width: 575.98px) {
  .auth-form-panel { padding: 28px 18px; }
  .auth-form-card h2 { font-size: 22px; }
  .form-emc-brand { margin-bottom: 28px; padding-bottom: 18px; }
}

/* ============================================================
   ============================================================
   2026 REDESIGN — Auditor Portal
   Top-header layout, project list dashboard, tabbed project view
   ============================================================
   ============================================================ */

:root {
  --rd-green: #134e4a;
  --rd-green-700: #0f3d3a;
  --rd-green-50: #ecfdf5;
  --rd-green-100: #ccfbf1;
  --rd-green-200: #99f6e4;
  --rd-blue: #2563eb;
  --rd-blue-50: #eff6ff;
  --rd-blue-100: #dbeafe;
  --rd-blue-600: #1d4ed8;
  --rd-purple: #7c3aed;
  --rd-purple-50: #faf5ff;
  --rd-purple-100: #ede9fe;
  --rd-purple-200: #ddd6fe;
  --rd-amber: #f59e0b;
  --rd-amber-50: #fffbeb;
  --rd-amber-100: #fef3c7;
  --rd-amber-200: #fde68a;
  --rd-red: #ef4444;
  --rd-red-500: #dc2626;
  --rd-red-50: #fef2f2;
  --rd-red-100: #fee2e2;
  --rd-text: #0f172a;
  --rd-text-muted: #64748b;
  --rd-text-soft: #94a3b8;
  --rd-border: #e5e7eb;
  --rd-border-soft: #f1f5f9;
  --rd-surface: #ffffff;
  --rd-bg: #f9fafb;
}

body.rd-body {
  background: var(--rd-bg);
  color: var(--rd-text);
}

/* -------------------- Auditor top header -------------------- */
.rd-topbar {
  display: flex;
  align-items: center;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid var(--rd-border);
  gap: 16px;
  min-height: 72px;
}
.rd-topbar .rd-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rd-topbar .rd-brand-logo {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.rd-topbar .rd-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.rd-topbar .rd-brand-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--rd-text);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.rd-topbar .rd-brand-subtitle {
  font-size: 11.5px;
  color: var(--rd-text-muted);
  font-weight: 500;
  margin-top: 1px;
  line-height: 1.1;
}
.rd-topbar .rd-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.rd-user-info {
  text-align: right;
  line-height: 1.2;
}
.rd-user-info .rd-uid {
  font-size: 14px;
  font-weight: 700;
  color: var(--rd-text);
}
.rd-user-info .rd-urole {
  font-size: 12px;
  color: var(--rd-text-muted);
}
.rd-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e5e7eb;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #6b7280;
  flex-shrink: 0;
}
.rd-exit {
  color: var(--rd-red);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
}
.rd-exit:hover { color: var(--rd-red-500); }

/* User-menu dropdown on the topbar */
.rd-user-menu { position: relative; display: flex; align-items: center; }
.rd-user-trigger {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 1px solid transparent;
  padding: 4px 8px 4px 12px; border-radius: 999px;
  cursor: pointer; transition: all 0.15s ease;
}
.rd-user-trigger:hover { background: #f8fafc; border-color: #e2e8f0; }
.rd-user-trigger[aria-expanded="true"] { background: #f1f5f9; border-color: #cbd5e1; }
.rd-user-trigger .rd-user-caret { color: var(--rd-text-muted); font-size: 11px; margin-left: -2px; }
.rd-user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 240px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  padding: 6px; z-index: 100;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  visibility: hidden;
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.rd-user-dropdown.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; visibility: visible; }
.rd-user-dropdown .rd-user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
}
.rd-user-dropdown .rd-user-card .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--rd-green); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.rd-user-dropdown .rd-user-card .name { font-size: 13.5px; font-weight: 700; color: var(--rd-text); }
.rd-user-dropdown .rd-user-card .sub { font-size: 11.5px; color: var(--rd-text-muted); }
.rd-user-dropdown a,
.rd-user-dropdown button {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--rd-text);
  text-decoration: none;
}
.rd-user-dropdown a:hover,
.rd-user-dropdown button:hover { background: #f8fafc; }
.rd-user-dropdown a i,
.rd-user-dropdown button i { font-size: 15px; color: var(--rd-text-muted); width: 18px; text-align: center; }
.rd-user-dropdown a.signout,
.rd-user-dropdown button.signout { color: #b91c1c; }
.rd-user-dropdown a.signout i,
.rd-user-dropdown button.signout i { color: #b91c1c; }
.rd-user-dropdown .divider { height: 1px; background: #f1f5f9; margin: 4px 4px; }

/* -------------------- Page container -------------------- */
.rd-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 80px;
}

/* -------------------- Stats row -------------------- */
.rd-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.rd-stat-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  padding: 18px 20px 20px;
}
.rd-stat-label {
  font-size: 13px;
  color: var(--rd-text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}
.rd-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--rd-green);
  line-height: 1.1;
}
.rd-stat-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--rd-text-muted);
  margin-left: 6px;
}
.rd-stat-card.is-feature {
  background: var(--rd-green);
  border-color: var(--rd-green);
}
.rd-stat-card.is-feature .rd-stat-label { color: #ffffff; }
.rd-stat-card.is-feature .rd-stat-value { color: #ffffff; }

/* -------------------- All projects header -------------------- */
.rd-section-head {
  margin-bottom: 22px;
}
.rd-section-head h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--rd-text);
}

/* -------------------- Search + filter row -------------------- */
.rd-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}
.rd-search {
  flex: 1;
  position: relative;
}
.rd-search input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
}
.rd-search input:focus {
  outline: none;
  border-color: #c4b5fd;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08);
}
.rd-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rd-text-soft);
  font-size: 16px;
}
.rd-btn-outline {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--rd-border);
  background: #fff;
  border-radius: 10px;
  font-size: 14px;
  color: var(--rd-text);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
  box-sizing: border-box;
}
.rd-btn-outline:hover { background: #f8fafc; }

/* -------------------- Tabs -------------------- */
.rd-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--rd-border);
  margin: 22px 0 0;
}
.rd-tab {
  padding: 14px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--rd-text-muted);
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  background: transparent;
}
.rd-tab:hover { color: var(--rd-text); }
.rd-tab.is-active { color: var(--rd-blue); font-weight: 600; }
.rd-tab.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--rd-blue);
  border-radius: 2px;
}
.rd-tab-badge {
  background: var(--rd-blue);
  color: #fff;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}

/* -------------------- Projects table -------------------- */
.rd-table-wrap {
  background: #fff;
  border-radius: 0 0 12px 12px;
}
.rd-table {
  width: 100%;
  border-collapse: collapse;
}
.rd-table thead th {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  color: var(--rd-text-soft);
  letter-spacing: 0.06em;
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--rd-border);
}
.rd-table tbody td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--rd-border-soft);
  vertical-align: middle;
  font-size: 14px;
}
.rd-table tbody tr:last-child td { border-bottom: none; }
.rd-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--rd-border);
  background: #fff;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  flex-shrink: 0;
}
.rd-check[aria-checked="true"] {
  background: var(--rd-blue);
  border-color: var(--rd-blue);
}
.rd-check[aria-checked="true"]::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.rd-app-id {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
}
.rd-app-icon {
  width: 40px;
  height: 40px;
  background: var(--rd-green-50);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--rd-green);
  font-size: 18px;
  flex-shrink: 0;
}
.rd-project-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--rd-text);
  margin-bottom: 4px;
}
.rd-project-loc {
  font-size: 12px;
  color: var(--rd-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rd-type-pill {
  background: var(--rd-purple-100);
  color: var(--rd-purple);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}
.rd-btn-view {
  min-height: 42px;
  background: var(--rd-green);
  color: #fff;
  border: 1px solid var(--rd-green);
  padding: 0 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  box-sizing: border-box;
}
.rd-btn-view:hover { background: var(--rd-green-700); color: #fff; }

/* -------------------- Pagination -------------------- */
.rd-table-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--rd-text-muted);
}
.rd-pager {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rd-pager .pg {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--rd-text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-weight: 500;
  font-size: 13px;
}
.rd-pager .pg:hover { background: #f1f5f9; }
.rd-pager .pg.is-active {
  background: var(--rd-blue);
  color: #fff;
}
.rd-pager .pg.is-disabled { color: var(--rd-text-soft); cursor: not-allowed; }

/* -------------------- Project detail layout -------------------- */
.rd-project-topbar {
  display: flex;
  align-items: center;
  padding: 18px 32px;
  background: #fff;
  border-bottom: 1px solid var(--rd-border);
}
.rd-back {
  color: var(--rd-text);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.rd-back:hover { color: var(--rd-blue); }
.rd-project-topbar .rd-exit { margin-left: auto; }

.rd-project-head {
  padding: 28px 32px 0;
  background: #fff;
}
.rd-project-head h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}
.rd-project-meta {
  font-size: 14px;
  color: var(--rd-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.rd-project-meta .rd-dot {
  width: 4px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 50%;
}

.rd-project-tabs {
  display: flex;
  gap: 36px;
  background: #fff;
  padding: 18px 32px 0;
  border-bottom: 1px solid var(--rd-border);
}
.rd-project-tab {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--rd-text-muted);
  text-decoration: none;
  position: relative;
}
.rd-project-tab.is-active { color: var(--rd-text); font-weight: 700; }
.rd-project-tab.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rd-blue);
  border-radius: 2px 2px 0 0;
}

/* layout */
.rd-project-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 60px;
}

/* Sidebar — stage stepper */
.rd-stage-card {
  padding-right: 4px;
}
.rd-stage-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px 0;
}
.rd-stage-card-sub {
  font-size: 13px;
  color: var(--rd-text-muted);
  margin: 0 0 24px 0;
}
.rd-stage-card .rd-stage-group {
  font-size: 16px;
  font-weight: 700;
  color: var(--rd-green);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px 0;
}
.rd-stage-card .rd-stage-group i { font-size: 18px; }

.rd-steps { list-style: none; padding: 0; margin: 0; }
.rd-step {
  display: flex;
  gap: 14px;
  padding-bottom: 22px;
  position: relative;
  align-items: flex-start;
  cursor: pointer;
}
.rd-step .rd-step-info {
  border-radius: 8px;
  padding: 6px 12px;
  margin: -6px -12px;
  transition: background 0.15s ease, color 0.15s ease;
  padding-top: 6px;
}
.rd-step:not(.is-selected):hover .rd-step-info {
  background: rgba(15, 23, 42, 0.04);
}
.rd-step.is-selected .rd-step-info {
  background: var(--rd-blue-50);
}
.rd-step.is-selected .rd-step-title {
  font-weight: 700;
}
.rd-step.is-selected:not(:has(.rd-marker.is-done)) .rd-step-title {
  color: var(--rd-blue);
}
.rd-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 0;
  width: 2px;
  background: var(--rd-border);
}
.rd-step .rd-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: #cbd5e1;
  flex-shrink: 0;
  z-index: 1;
  position: relative;
  font-size: 13px;
}
.rd-step .rd-marker.is-done   { background: var(--rd-green); }
.rd-step .rd-marker.is-active { background: var(--rd-blue); }
.rd-step .rd-marker.is-locked {
  background: transparent;
  color: var(--rd-text-soft);
}
.rd-step .rd-marker.is-locked i { font-size: 16px; }
.rd-step-info { padding-top: 6px; }
.rd-step-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--rd-text);
  margin: 0 0 6px 0;
}
.rd-step.is-locked .rd-step-title { color: var(--rd-text-soft); font-weight: 500; }
.rd-step-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}
.rd-pill-completed { background: var(--rd-green-100); color: var(--rd-green); }
.rd-pill-in-process { background: var(--rd-blue-100); color: var(--rd-blue); }
.rd-pill-ready { background: var(--rd-blue-100); color: var(--rd-blue); }
.rd-pill-locked { background: #f1f5f9; color: var(--rd-text-muted); }
.rd-pill-in-progress { background: var(--rd-blue-100); color: var(--rd-blue); }

/* Stage groups (Construction / Completion lock placeholder rows) */
.rd-stage-lock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  color: var(--rd-text-soft);
  font-size: 14px;
  border-top: 1px solid var(--rd-border-soft);
}
.rd-stage-lock-row i { font-size: 16px; }

/* Stage section heading (for stepper inside the same stage) */
.rd-stage-section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

/* -------------------- Step content -------------------- */
.rd-step-detail {
  background: #f9fafb;
  border-radius: 12px;
  padding: 28px 28px 32px;
  min-height: 520px;
}
.rd-step-detail h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}
.rd-step-detail .rd-detail-sub {
  color: var(--rd-text-muted);
  margin-bottom: 22px;
  font-size: 14px;
}

/* Compliance reports card */
.rd-compliance-card {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  padding: 24px 24px 24px;
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
}
.rd-compliance-card .rd-cc-icon {
  width: 52px;
  height: 52px;
  background: var(--rd-blue);
  color: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.rd-compliance-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px 0;
}
.rd-compliance-card p {
  color: var(--rd-text-muted);
  margin-bottom: 16px;
}
.rd-compliance-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.rd-btn-blue-solid {
  background: var(--rd-blue);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rd-btn-blue-solid:hover { background: var(--rd-blue-600); color: #fff; }
.rd-btn-blue-outline {
  background: #fff;
  color: var(--rd-blue);
  border: 1px solid #c7d2fe;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rd-btn-blue-outline:hover { background: var(--rd-blue-50); color: var(--rd-blue); }

/* Outcome cards (Design Approved / Deviations) */
.rd-outcome-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}
.rd-outcome-card {
  border-radius: 14px;
  padding: 22px 22px 22px;
  border: 1px solid;
}
.rd-outcome-card.is-success {
  background: var(--rd-green-50);
  border-color: var(--rd-green-200);
}
.rd-outcome-card.is-danger {
  background: #fff7ed;
  border-color: #fed7aa;
}
.rd-outcome-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.rd-outcome-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}
.rd-outcome-icon.success { background: var(--rd-green); }
.rd-outcome-icon.danger { background: var(--rd-red-500); }
.rd-outcome-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}
.rd-outcome-subtitle {
  font-size: 13px;
  color: var(--rd-text-muted);
  margin-top: 2px;
}
.rd-outcome-card p {
  color: #475569;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.55;
}
.rd-outcome-card .rd-out-actions {
  display: flex;
  gap: 10px;
}
.rd-btn-green-outline {
  background: transparent;
  color: var(--rd-green);
  border: 1px solid var(--rd-green-200);
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rd-btn-green-outline:hover { background: var(--rd-green-50); color: var(--rd-green); }
.rd-btn-green-solid {
  background: var(--rd-green);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rd-btn-green-solid:hover { background: var(--rd-green-700); color: #fff; }
.rd-btn-red-outline {
  background: transparent;
  color: var(--rd-red-500);
  border: 1px solid #fed7aa;
  padding: 11px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.rd-btn-red-outline:hover { background: #fff7ed; }

/* Form 5 issued banner */
.rd-issued-banner {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  gap: 18px;
  align-items: center;
}
.rd-issued-banner .rd-ib-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--rd-blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.rd-issued-banner h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px 0;
}
.rd-issued-banner p {
  color: var(--rd-text-muted);
  margin: 0;
  font-size: 14px;
}

/* Pending action banner */
.rd-pending-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.rd-pending-banner .rd-pb-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fef3c7;
  color: var(--rd-amber);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.rd-pending-banner .rd-pb-body { flex: 1; }
.rd-pending-banner .rd-pb-title { font-weight: 700; font-size: 15px; }
.rd-pending-banner .rd-pb-desc { color: var(--rd-text-muted); font-size: 13px; margin-top: 2px; }
.rd-pending-pill {
  background: #fef3c7;
  color: #b45309;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rd-pending-pill::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--rd-amber);
  border-radius: 50%;
}

/* -------------------- Timeline -------------------- */
.rd-timeline-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 28px 32px 60px;
}
.rd-milestones h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px 0;
}
.rd-milestone {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 12px;
  border-radius: 10px;
  background: var(--rd-green-50);
  margin-bottom: 8px;
}
.rd-milestone .rd-mc {
  width: 22px;
  height: 22px;
  background: var(--rd-green);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
  margin-top: 2px;
}
.rd-milestone .rd-mi-name { font-weight: 700; font-size: 14px; }
.rd-milestone .rd-mi-date { font-size: 12px; color: var(--rd-text-muted); margin-top: 2px; }

.rd-tl-content { display: flex; flex-direction: column; gap: 14px; }
.rd-tl-filters {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px 18px;
  border: 1px solid var(--rd-border);
}
.rd-tl-filters .rd-tlf-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--rd-text);
}
.rd-tl-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rd-tl-chip {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  background: transparent;
  color: var(--rd-text);
  border: none;
  cursor: pointer;
  font-weight: 500;
}
.rd-tl-chip:hover { background: #f1f5f9; }
.rd-tl-chip.is-active {
  background: #0f172a;
  color: #fff;
}

.rd-tl-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 24px 28px;
  border: 1px solid var(--rd-border);
}
.rd-tl-month {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 18px 0;
  padding: 6px 0;
  border-bottom: 1px solid var(--rd-border-soft);
}
.rd-tl-list {
  position: relative;
  padding-left: 24px;
}
.rd-tl-list::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 12px;
  width: 2px;
  background: var(--rd-border);
}
.rd-tl-item { position: relative; margin-bottom: 26px; }
.rd-tl-item:last-child { margin-bottom: 0; }
.rd-tl-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rd-green);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--rd-green);
}
.rd-tl-dot.activity   { background: var(--rd-green); box-shadow: 0 0 0 2px var(--rd-green); }
.rd-tl-dot.approval   { background: #a855f7; box-shadow: 0 0 0 2px #a855f7; }
.rd-tl-dot.submission { background: var(--rd-green); box-shadow: 0 0 0 2px var(--rd-green); }
.rd-tl-dot.deviation  { background: #ef4444; box-shadow: 0 0 0 2px #ef4444; }

.rd-tl-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.rd-tl-tag {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rd-tl-tag.activity   { background: var(--rd-green-100); color: var(--rd-green); }
.rd-tl-tag.approval   { background: #f3e8ff; color: #9333ea; }
.rd-tl-tag.submission { background: var(--rd-green-100); color: var(--rd-green); }
.rd-tl-tag.deviation  { background: var(--rd-red-50); color: var(--rd-red-500); }
.rd-tl-time {
  font-size: 12px;
  color: var(--rd-text-soft);
}
.rd-tl-title {
  font-weight: 700;
  font-size: 15px;
  margin: 2px 0 4px;
}
.rd-tl-desc {
  color: var(--rd-text-muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.rd-tl-actor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--rd-text);
  font-weight: 500;
}
.rd-tl-actor .rd-actor-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  color: #fff;
  font-weight: 700;
}
.rd-actor-badge.green  { background: var(--rd-green); }
.rd-actor-badge.purple { background: #a855f7; }
.rd-actor-badge.dark   { background: #475569; }

/* -------------------- Modal redesign -------------------- */
.modal.rd-modal .modal-content {
  border-radius: 14px;
  border: none;
  padding: 8px;
}
.modal.rd-modal .modal-header {
  border-bottom: none;
  padding: 18px 18px 6px;
}
.modal.rd-modal .modal-body { padding: 8px 18px 8px; }
.modal.rd-modal .modal-footer {
  border-top: 1px solid var(--rd-border);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rd-modal-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 6px 0;
}
.rd-modal-sub {
  color: var(--rd-text-muted);
  font-size: 14px;
  margin: 0 0 16px 0;
}

/* Upload zone */
.rd-upload-zone {
  border: 2px dashed #c4b5fd;
  background: var(--rd-purple-50);
  border-radius: 14px;
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
}
.rd-upload-zone .rd-uz-icon {
  font-size: 44px;
  color: #8b5cf6;
  margin-bottom: 6px;
}
.rd-upload-zone .rd-uz-label {
  font-weight: 600;
  font-size: 15px;
  color: var(--rd-text);
  margin-bottom: 4px;
}
.rd-upload-zone .rd-uz-sub {
  font-size: 12px;
  color: var(--rd-text-soft);
}
.rd-section-label {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin: 14px 0 10px;
}

/* Confirm row */
.rd-confirm-row {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  margin-top: 16px;
  align-items: flex-start;
}
.rd-confirm-row input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--rd-blue);
}
.rd-confirm-row .rd-cr-title { font-weight: 700; font-size: 14px; }
.rd-confirm-row .rd-cr-sub   { color: var(--rd-text-muted); font-size: 13px; margin-top: 4px; }

/* Form inputs */
.rd-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rd-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.rd-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--rd-text);
}
.rd-field label .req { color: var(--rd-red-500); }
.rd-field input,
.rd-field select,
.rd-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}
.rd-field textarea { resize: vertical; min-height: 96px; }
.rd-field input:focus,
.rd-field select:focus,
.rd-field textarea:focus {
  outline: none;
  border-color: #c4b5fd;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08);
}

.rd-btn-cancel {
  background: transparent;
  color: var(--rd-text);
  border: 1px solid var(--rd-border);
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rd-btn-cancel:hover { background: #f8fafc; }

/* -------------------- Summary strip (top of Approvals tab) -------------------- */
.rd-summary-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  padding: 16px 22px;
  margin-bottom: 16px;
}
.rd-meta {
  min-width: 0;
}
.rd-meta .label {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rd-text-soft);
  font-weight: 600;
  margin-bottom: 6px;
}
.rd-meta .value {
  font-size: 14px;
  color: var(--rd-text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Permit & badge row inside the sidebar */
.rd-permit-no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f1f5f9;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--rd-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.rd-permit-no .value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--rd-text);
  font-size: 12px;
}
.rd-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.rd-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}
.rd-mini-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}
.rd-mini-pill.stage          { background: #dbeafe; color: var(--rd-blue); }
.rd-mini-pill.stage-cleared  { background: var(--rd-green-50); color: var(--rd-green); }
.rd-mini-pill.mandatory      { background: var(--rd-red-100); color: #991b1b; }
.rd-mini-pill.voluntary      { background: #ffedd5; color: #9a3412; }

/* Step substitle (when stepper uses 4 KECSBC stages) */
.rd-step-substitle {
  font-size: 12px;
  color: var(--rd-text-muted);
  margin-top: 2px;
}
.rd-step.is-active .rd-step-title    { color: var(--rd-blue); }
.rd-step.is-active .rd-step-substitle { color: var(--rd-blue); opacity: 0.85; }
.rd-step .rd-marker.is-done + .rd-step-info .rd-step-title { color: var(--rd-green); }
.rd-step.is-active .rd-marker.is-done + .rd-step-info .rd-step-title { color: var(--rd-blue); }
/* Connector line between steps tinted green when previous step is done */
.rd-step .rd-marker.is-done ~ * + ::after {}
.rd-step:has(.rd-marker.is-done):not(:last-child)::after { background: var(--rd-green); }

/* Aside links at the bottom of the sidebar */
.rd-aside-divider {
  border-top: 1px solid var(--rd-border-soft);
  margin: 18px 0 12px;
}
.rd-aside-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  color: var(--rd-text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.rd-aside-link.legacy    { color: #c2410c; }
.rd-aside-link:hover { color: var(--rd-text); }
.rd-aside-link i { font-size: 16px; }
.rd-aside-link .ref-no {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
}

/* Building Information card */
.rd-info-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  padding: 12px 18px 14px;
  margin-bottom: 16px;
}
.rd-info-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--rd-text);
}
.rd-info-card-head i { color: var(--rd-blue); font-size: 15px; }
.rd-info-toggle {
  margin-left: auto;
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--rd-blue);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rd-info-toggle:hover { background: var(--rd-blue-50); }
.rd-info-toggle i {
  font-size: 14px;
  color: var(--rd-blue);
  transition: transform 0.18s ease;
}
.rd-info-card.is-open .rd-info-toggle i { transform: rotate(180deg); }
.rd-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 22px;
}
.rd-info-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.rd-info-card:not(.is-open) .rd-info-grid > .rd-info-item:nth-child(n+5) {
  display: none;
}
/* When the card sits inside the project head */
.rd-project-head .rd-info-card {
  margin-top: 18px;
  margin-bottom: 0;
}
.rd-info-item { min-width: 0; }
.rd-info-label {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rd-text-soft);
  font-weight: 600;
  margin-bottom: 4px;
}
.rd-info-value {
  font-size: 14px;
  color: var(--rd-text);
  font-weight: 500;
  word-break: break-word;
}
.rd-info-value .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
}

/* Owners card */
.rd-owners-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 16px;
}
.rd-owners-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}
.rd-owners-head i { color: var(--rd-blue); }
.rd-owners-head .rd-count-pill {
  background: #f1f5f9;
  color: var(--rd-text-muted);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.rd-owner-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--rd-border-soft);
}
.rd-owner-item:first-of-type { border-top: none; }
.rd-owner-item .rd-oi-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  display: grid;
  place-items: center;
  color: var(--rd-text-soft);
  font-size: 18px;
  flex-shrink: 0;
}
.rd-owner-item .rd-oi-name {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rd-primary-pill {
  background: var(--rd-green-50);
  color: var(--rd-green);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.rd-owner-item .rd-oi-phone {
  font-size: 12.5px;
  color: var(--rd-text-muted);
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Stage section heading */
.rd-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 14px;
}
.rd-stage-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.rd-stage-head h3 i { color: var(--rd-blue); }
.rd-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}
.rd-status-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.rd-status-pill.in-progress      { background: var(--rd-blue-100); color: var(--rd-blue); }
.rd-status-pill.not-started      { background: #f1f5f9; color: var(--rd-text-muted); }
.rd-status-pill.deviation-issued { background: var(--rd-green-50); color: var(--rd-green); }
.rd-status-pill.epi-filed        { background: var(--rd-green-50); color: var(--rd-green); }

/* Form card */
.rd-form-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-left: 3px solid var(--rd-green);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  position: relative;
}
.rd-form-card.is-locked,
.rd-form-card.is-if-needed {
  background: #fafafa;
  border-style: dashed;
  border-left-color: var(--rd-border);
  color: var(--rd-text-muted);
}
.rd-form-card.is-draft {
  border-left-color: var(--rd-amber);
}
.rd-form-card.is-pending {
  border-left-color: var(--rd-border);
}
.rd-form-card.is-deviation {
  border-left-color: var(--rd-green);
}
.rd-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rd-form-head h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--rd-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rd-form-card.is-locked .rd-form-head h4,
.rd-form-card.is-if-needed .rd-form-head h4 {
  color: var(--rd-text-soft);
  font-weight: 600;
}
.rd-form-card.is-locked .rd-form-head h4 i,
.rd-form-card.is-if-needed .rd-form-head h4 i {
  color: var(--rd-text-soft);
}
.rd-form-pill {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.rd-form-pill.issued           { background: var(--rd-green-50); color: var(--rd-green); }
.rd-form-pill.locked           { background: #f1f5f9; color: var(--rd-text-muted); }
.rd-form-pill.pending          { background: #f1f5f9; color: var(--rd-text-muted); }
.rd-form-pill.if-needed        { background: #f1f5f9; color: var(--rd-text-muted); }
.rd-form-pill.draft            { background: #fef3c7; color: #b45309; }
.rd-form-pill.deviation-issued { background: var(--rd-red-100); color: #991b1b; }
.rd-form-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--rd-text-muted);
}
.rd-form-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rd-form-meta i { font-size: 14px; }
.rd-form-desc {
  font-size: 13.5px;
  color: var(--rd-text-muted);
  margin: 8px 0 0;
  line-height: 1.55;
}
.rd-form-card.is-locked .rd-form-desc,
.rd-form-card.is-if-needed .rd-form-desc {
  color: var(--rd-text-soft);
}
.rd-form-head-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.rd-locked-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #fde68a;
  white-space: nowrap;
}
.rd-locked-hint i { font-size: 12px; }

/* Handover — BEEE selector cards */
.ho-beee-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1.5px solid var(--rd-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: #fff;
}
.ho-beee-card:hover {
  border-color: #99f6e4;
  background: #f0fdfa;
}
.ho-beee-card.is-selected {
  border-color: var(--rd-green);
  background: var(--rd-green-50);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.10);
}
.ho-beee-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--rd-green);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.ho-beee-info { flex: 1; min-width: 0; }
.ho-beee-name { font-weight: 700; font-size: 13.5px; color: var(--rd-text); }
.ho-beee-meta { font-size: 11.5px; color: var(--rd-text-muted); margin-top: 1px; font-family: 'JetBrains Mono', monospace; }
.ho-beee-check { font-size: 18px; color: var(--rd-text-soft); flex-shrink: 0; }
.ho-beee-card.is-selected .ho-beee-check {
  color: var(--rd-green);
}
.ho-beee-card.is-selected .ho-beee-check::before {
  content: "\F26B"; /* bi-check-circle-fill */
}
.rd-form-actions {
  display: flex;
  gap: 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rd-border-soft);
}
.rd-form-card.is-locked .rd-form-actions,
.rd-form-card.is-if-needed .rd-form-actions { display: none; }
.rd-form-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rd-blue);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.rd-form-action:hover { color: var(--rd-blue-600); }
.rd-form-action.danger { color: var(--rd-red-500); }
.rd-form-action.danger:hover { color: #b91c1c; }

/* ============================================================
   ============================================================
   ADMIN MODULE — sidebar shell layout
   ============================================================
   ============================================================ */

.adm-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.adm-sidebar {
  background: #0f3d3a;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.adm-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.adm-sidebar-brand .adm-logo {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 4px;
  flex-shrink: 0;
}
.adm-sidebar-brand .adm-logo img { width: 100%; height: 100%; object-fit: contain; }
.adm-sidebar-brand .adm-title { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.1; }
.adm-sidebar-brand .adm-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.adm-nav-section { padding: 14px 12px 4px; }
.adm-nav-label {
  padding: 0 12px 6px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
}
.adm-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 1px;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}
.adm-nav-link i { font-size: 16px; opacity: 0.85; }
.adm-nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.adm-nav-link.is-active {
  background: #14b8a6;
  color: #fff;
}
.adm-nav-link.is-active i { opacity: 1; }
.adm-nav-link .adm-nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.adm-nav-link.is-active .adm-nav-badge { background: rgba(0,0,0,0.18); }

.adm-sidebar-foot {
  margin-top: auto;
  padding: 16px 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.adm-sidebar-foot .gok-emblem { width: 40px; opacity: 0.85; margin: 0 auto 6px; }
.adm-sidebar-foot .gok-emblem img { width: 100%; }
.adm-sidebar-foot .gok-text {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
}

/* Main */
.adm-main {
  background: #f7f8fa;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.adm-topbar {
  background: #fff;
  border-bottom: 1px solid var(--rd-border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.adm-topbar h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--rd-text);
}
.adm-topbar .adm-sub {
  font-size: 12.5px;
  color: var(--rd-text-muted);
  margin-top: 2px;
}
.adm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.adm-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-user-meta { text-align: right; }
.adm-user-meta .name { font-size: 13px; font-weight: 700; color: var(--rd-text); }
.adm-user-meta .role { font-size: 11px; color: var(--rd-text-muted); }
.adm-user-avatar {
  width: 38px; height: 38px;
  background: #134e4a;
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.adm-content { padding: 24px 28px 60px; flex: 1; }

/* Page header inside content */
.adm-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}
.adm-page-head h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}
.adm-page-head .adm-page-sub {
  font-size: 13px;
  color: var(--rd-text-muted);
  margin-top: 4px;
}
.adm-page-actions { display: flex; gap: 10px; }

/* Stat tile (admin variant — uses teal) */
.adm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.adm-stat {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.adm-stat .adm-stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #134e4a;
  display: grid; place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.adm-stat .adm-stat-icon.tint-blue   { background: #eff6ff; color: #2563eb; }
.adm-stat .adm-stat-icon.tint-purple { background: #f5f3ff; color: #7c3aed; }
.adm-stat .adm-stat-icon.tint-amber  { background: #fffbeb; color: #d97706; }
.adm-stat .adm-stat-icon.tint-rose   { background: #fff1f2; color: #be123c; }
.adm-stat .adm-stat-label { font-size: 12.5px; color: var(--rd-text-muted); font-weight: 500; }
.adm-stat .adm-stat-value { font-size: 22px; font-weight: 700; color: var(--rd-text); line-height: 1.1; margin-top: 2px; }

/* Card */
.adm-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  overflow: hidden;
}
/* A table sitting directly in a card (report/listing pages) needs its own
   scroll container — the card's overflow:hidden above clips it instead of
   scrolling, hiding whatever columns don't fit the viewport. */
.adm-card > .adm-table-scroll {
  overflow-x: auto;
}
.adm-card-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--rd-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.adm-card-head h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.adm-card-head .adm-card-sub {
  font-size: 12px;
  color: var(--rd-text-muted);
  margin-top: 2px;
}
.adm-card-body { padding: 18px 22px; }

/* Toolbar (search + filter row) */
.adm-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.adm-search {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.adm-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--rd-border);
  border-radius: 9px;
  font-size: 14px;
  background: #fff;
}
.adm-search input:focus { outline: none; border-color: #14b8a6; box-shadow: 0 0 0 4px rgba(20,184,166,0.12); }
.adm-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--rd-text-soft); }
.adm-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--rd-border);
  background: #fff;
  border-radius: 9px;
  font-size: 13px;
  color: var(--rd-text);
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  line-height: 1;
  box-sizing: border-box;
}
.adm-btn:hover { background: #f1f5f9; }
.adm-btn.primary {
  background: #134e4a;
  color: #fff;
  border-color: #134e4a;
}
.adm-btn.primary:hover { background: #0f3d3a; color: #fff; }
.adm-btn.danger {
  background: #fff;
  color: var(--rd-red-500);
  border-color: #fecaca;
}
.adm-btn.danger:hover { background: #fef2f2; }
.adm-btn-sm { padding: 0 11px; font-size: 12px; min-height: 30px; height: 30px; white-space: nowrap; }

/* Table */
.adm-table { width: 100%; border-collapse: collapse; }
.adm-table thead th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rd-text-soft);
  padding: 12px 18px;
  font-weight: 600;
  border-bottom: 1px solid var(--rd-border);
  background: #fafafa;
}
.adm-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rd-border-soft);
  font-size: 13.5px;
  vertical-align: middle;
}
.adm-table tbody tr:hover td { background: #fafafa; }
.adm-table tbody tr:last-child td { border-bottom: none; }

/* Status pill */
.adm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
}
.adm-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.adm-pill.active     { background: #ecfdf5; color: #134e4a; }
.adm-pill.disabled   { background: #f1f5f9; color: var(--rd-text-muted); }
.adm-pill.pending    { background: #fffbeb; color: #b45309; }
.adm-pill.archived   { background: #f5f5f4; color: #57534e; }
.adm-pill.sent       { background: #ecfdf5; color: #134e4a; }
.adm-pill.processing { background: #eff6ff; color: #1d4ed8; }
.adm-pill.failed     { background: #fef2f2; color: #b91c1c; }
.adm-pill.completed  { background: #ecfdf5; color: #134e4a; }
.adm-pill.initiated  { background: #fffbeb; color: #b45309; }

.adm-row-actions {
  display: inline-flex;
  align-items: center; /* keeps the New Revision button lined up with the history icon - Midhun */
  gap: 4px;
}
.adm-icon-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--rd-border);
  background: #fff;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--rd-text-muted);
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}
.adm-icon-btn:hover { background: #f1f5f9; color: var(--rd-text); }
.adm-icon-btn.danger { color: var(--rd-red-500); border-color: #fecaca; }
.adm-icon-btn.danger:hover { background: #fef2f2; color: var(--rd-red-500); }

/* Form */
.adm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.adm-field label { font-size: 13px; font-weight: 600; color: var(--rd-text); }
.adm-field label .req { color: var(--rd-red-500); }
.adm-field input,
.adm-field select,
.adm-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  font-size: 13.5px;
  background: #fff;
  font-family: inherit;
}
.adm-field input:focus,
.adm-field select:focus,
.adm-field textarea:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20,184,166,0.12);
}
.adm-form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }

/* Toggle switch */
.adm-switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.adm-switch input { opacity: 0; width: 0; height: 0; }
.adm-switch .slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: 0.2s;
}
.adm-switch .slider::before {
  position: absolute; content: '';
  height: 16px; width: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.adm-switch input:checked + .slider { background: #14b8a6; }
.adm-switch input:checked + .slider::before { transform: translateX(16px); }

/* Activity / timeline list */
.adm-activity {
  display: flex;
  flex-direction: column;
}
.adm-activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rd-border-soft);
}
.adm-activity-item:last-child { border-bottom: none; }
.adm-activity-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #134e4a;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 14px;
}
.adm-activity-body { flex: 1; min-width: 0; }
.adm-activity-title { font-weight: 600; font-size: 13.5px; }
.adm-activity-meta { font-size: 12px; color: var(--rd-text-muted); margin-top: 2px; }
.adm-activity-changes { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--rd-text-muted); }
.adm-activity-changes code { background: var(--rd-gray-50, #f1f5f9); color: var(--rd-text); border-radius: 4px; padding: 1px 5px; font-size: 12px; }

/* Tabs (inline) */
.adm-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--rd-border);
  margin-bottom: 20px;
}
.adm-tab {
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--rd-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}
.adm-tab.is-active { color: #134e4a; font-weight: 700; }
.adm-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: #134e4a;
}

/* Two-column page layout (forms, configs) */
.adm-twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.adm-twocol > * { min-width: 0; }

/* Auth (login) */
.adm-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f3d3a 0%, #134e4a 50%, #134e4a 100%);
  padding: 24px;
}
.adm-auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 32px 32px 28px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}
.adm-auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rd-border);
  margin-bottom: 22px;
}
.adm-auth-brand img { width: 44px; height: 44px; }
.adm-auth-brand .title { font-size: 17px; font-weight: 700; }
.adm-auth-brand .subtitle { font-size: 12px; color: var(--rd-text-muted); }
.adm-auth-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px 0;
}
.adm-auth-card .lead {
  color: var(--rd-text-muted);
  font-size: 13.5px;
  margin-bottom: 22px;
}
.adm-auth-foot {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-top: 18px;
}

/* Pagination */
.adm-pagi {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--rd-text-muted);
}
.adm-pagi-pages { display: flex; gap: 4px; }
.adm-pagi-pages .pg {
  width: 32px; height: 32px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--rd-text);
  cursor: pointer;
  display: grid; place-items: center;
  font-weight: 500;
  font-size: 12.5px;
}
.adm-pagi-pages .pg:hover { background: #f1f5f9; }
.adm-pagi-pages .pg.is-active { background: #134e4a; color: #fff; }

/* Admin mobile hamburger + overlay */
.adm-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  font-size: 19px; color: var(--rd-text);
  cursor: pointer;
  margin-right: 12px;
  flex-shrink: 0;
}
.adm-menu-toggle:hover { background: #f8fafc; }
.adm-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1030;
  opacity: 0;
  transition: opacity 0.18s;
}
.adm-sidebar-overlay.is-visible {
  display: block;
  opacity: 1;
}

/* Responsive */
@media (max-width: 991.98px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform 0.22s ease; z-index: 1040; box-shadow: 4px 0 24px rgba(0,0,0,0.18); }
  .adm-sidebar.is-open { transform: translateX(0); }
  .adm-menu-toggle { display: inline-flex; }
  .adm-stats { grid-template-columns: repeat(2, 1fr); }
  .adm-twocol { grid-template-columns: 1fr; }
  .adm-form-grid { grid-template-columns: 1fr; }
  .adm-topbar { padding: 12px 18px; gap: 8px; }
  .adm-topbar > div:first-of-type { min-width: 0; flex: 1; }
  .adm-topbar h1 { font-size: 19px; }
  .adm-user-meta { display: none; }
  .adm-content { padding: 18px; }
  .adm-toolbar { flex-wrap: wrap; gap: 8px; }
  .adm-toolbar .adm-search { min-width: 200px; flex: 1; }
  .adm-table-wrap, .adm-card { overflow-x: auto; }
  .adm-table { min-width: 600px; }
}
@media (max-width: 575.98px) {
  .adm-stats { grid-template-columns: 1fr; }
  .adm-topbar { padding: 10px 14px; }
  .adm-topbar h1 { font-size: 17px; }
  .adm-sub { font-size: 11.5px; }
  .adm-content { padding: 14px; }
  .adm-card { padding: 16px; }
  .adm-card-head { flex-wrap: wrap; gap: 10px; }
  .adm-btn { padding: 8px 12px; font-size: 12.5px; }
  .modal-body { padding: 20px 18px; }
}

/* ============================================================
   FORM-ENTRY shell (focused workspace, matches screenshots)
   ============================================================ */

.fe-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: calc(100vh - 70px);
}
.fe-topbar {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--rd-border);
  padding: 12px 24px;
  min-height: 70px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.fe-topbar .fe-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
  border-right: 1px solid var(--rd-border);
  margin-right: 8px;
}
.fe-topbar .fe-brand img { width: 36px; height: 36px; }
.fe-topbar .fe-brand .title { font-size: 14px; font-weight: 700; color: var(--rd-text); line-height: 1.1; }
.fe-topbar .fe-brand .subtitle { font-size: 11px; color: var(--rd-text-muted); }
.fe-topbar .fe-hamburger {
  border: 1px solid var(--rd-border);
  background: #fff;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--rd-text);
}
.fe-topbar .fe-page-title { font-size: 18px; font-weight: 700; color: var(--rd-text); }
.fe-topbar .fe-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.fe-topbar .fe-user { text-align: right; line-height: 1.2; }
.fe-topbar .fe-user .name { font-size: 13.5px; font-weight: 700; }
.fe-topbar .fe-user .meta { font-size: 11px; color: var(--rd-text-muted); }
.fe-topbar .fe-logout {
  color: var(--rd-red-500);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fe-sidebar {
  background: #fafafa;
  border-right: 1px solid var(--rd-border);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
}
.fe-sidebar-label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rd-text-soft);
  font-weight: 600;
  padding: 0 10px 8px;
}
.fe-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 2px;
  color: var(--rd-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
}
.fe-sidebar-link i { font-size: 18px; }
.fe-sidebar-link:hover { background: #f1f5f9; color: var(--rd-text); }
.fe-sidebar-link.is-active { background: var(--rd-green); color: #fff; }
.fe-sidebar-link.is-active i { color: #fff; }
.fe-sidebar-foot {
  margin-top: auto;
  font-size: 11px;
  color: var(--rd-text-soft);
  padding: 14px 10px 0;
}

.fe-main {
  background: #f7f8fa;
  padding: 32px 36px 100px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fe-form-head {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  padding: 22px 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.fe-form-head h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.fe-form-head .fe-rule {
  font-size: 13px;
  color: var(--rd-text-muted);
}
.fe-form-head .fe-rule strong { color: var(--rd-text); font-weight: 700; }
.fe-form-head .fe-rule .ref { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.fe-status-pill {
  flex-shrink: 0;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
}
.fe-status-pill.issued { background: var(--rd-green-100); color: var(--rd-green); }
.fe-status-pill.draft  { background: #fef3c7; color: #b45309; }

.fe-meta-bar {
  background: #f8fafc;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  padding: 18px 26px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px 24px;
}
.fe-meta-bar .fe-meta-item .label {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--rd-text-soft);
  font-weight: 600;
  margin-bottom: 4px;
}
.fe-meta-bar .fe-meta-item .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--rd-text);
}
.fe-meta-bar .fe-meta-item .value.mono { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: #be123c; }

.fe-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  padding: 22px 26px;
}
.fe-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rd-border-soft);
}
.fe-card-title i { color: var(--rd-green); font-size: 18px; }

.fe-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.fe-field.inline-row { flex-direction: row; gap: 18px; align-items: center; }
.fe-field label { font-size: 14px; font-weight: 600; color: var(--rd-text); }
.fe-field label .req { color: var(--rd-red-500); }
.fe-field .help { font-size: 12px; color: var(--rd-text-muted); }
.fe-field input[type="text"],
.fe-field input[type="number"],
.fe-field input[type="date"],
.fe-field input[type="email"],
.fe-field input[type="tel"],
.fe-field select,
.fe-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}
.fe-field input:focus,
.fe-field select:focus,
.fe-field textarea:focus {
  outline: none;
  border-color: var(--rd-green);
  box-shadow: 0 0 0 4px rgba(19,78,74,0.10);
}
.fe-field input[type="file"] {
  padding: 9px 12px;
  background: #fff;
}
.fe-field-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}
.fe-field-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.fe-field.full { grid-column: 1 / -1; }
.fe-field.has-error input,
.fe-field.has-error select,
.fe-field.has-error textarea {
  border-color: #fca5a5;
  background: #fff7f7;
}

.fe-checks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 18px;
}
.fe-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--rd-text);
  font-weight: 500;
}
.fe-checks input { width: 16px; height: 16px; accent-color: var(--rd-green); }

.fe-list { display: flex; flex-direction: column; gap: 10px; }
.fe-list-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.fe-list-item .roman {
  flex-shrink: 0;
  width: 36px;
  padding-top: 12px;
  text-align: right;
  font-style: italic;
  color: var(--rd-text-muted);
  font-size: 13px;
}
.fe-list-item textarea {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}
.fe-list-remove {
  flex-shrink: 0;
  margin-top: 12px;
  background: transparent;
  border: none;
  color: var(--rd-red-500);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
}
.fe-list-add {
  background: transparent;
  border: none;
  color: var(--rd-blue);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.fe-list-add:hover { color: var(--rd-blue-600); }

.fe-component-row {
  display: grid;
  grid-template-columns: 1fr 1fr 32px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.fe-component-row input {
  padding: 11px 14px;
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  font-size: 14px;
}
.fe-component-remove {
  background: transparent;
  border: none;
  color: var(--rd-red-500);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.fe-radios {
  display: flex;
  gap: 18px;
  margin-top: 4px;
}
.fe-radios label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.fe-radios input { accent-color: var(--rd-green); }

.fe-foot {
  position: sticky;
  bottom: 0;
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.04);
}
.fe-foot-note {
  font-size: 12.5px;
  color: var(--rd-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fe-foot-actions { display: flex; gap: 10px; }
.fe-btn {
  padding: 10px 18px;
  border: 1px solid var(--rd-border);
  background: #fff;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--rd-text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  white-space: nowrap;
}
.fe-btn:hover { background: #f8fafc; }
.fe-btn.primary {
  background: var(--rd-blue);
  border-color: var(--rd-blue);
  color: #fff;
}
.fe-btn.primary:hover { background: var(--rd-blue-600); color: #fff; }
.fe-btn.danger {
  color: var(--rd-red-500);
  border-color: #fecaca;
}
.fe-btn.danger:hover { background: #fef2f2; }
.fe-btn.is-loading { pointer-events: none; opacity: 0.85; position: relative; padding-right: 38px; }
.fe-btn.is-loading::after {
  content: '';
  position: absolute; right: 14px; top: 50%;
  width: 14px; height: 14px; margin-top: -7px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: admSpin 0.7s linear infinite;
}

/* Responsive */
@media (max-width: 991.98px) {
  .fe-shell { grid-template-columns: 1fr; }
  .fe-sidebar { display: none; }
  .fe-meta-bar { grid-template-columns: repeat(2, 1fr); }
  .fe-field-grid, .fe-field-grid.cols-3 { grid-template-columns: 1fr; }
  .fe-checks { grid-template-columns: 1fr 1fr; }
  .fe-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .fe-foot-actions { flex-wrap: wrap; }
  .fe-foot-actions .fe-btn { flex: 1; justify-content: center; }
}

/* Assignment-request cards (BEEE dashboard) */
.req-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.req-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-left: 4px solid var(--rd-amber);
  border-radius: 12px;
  padding: 18px 22px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.req-icon {
  width: 50px; height: 50px;
  background: #fffbeb;
  color: var(--rd-amber);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.req-body { flex: 1; min-width: 0; }
.req-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--rd-text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.req-name .new-tag {
  background: #fef3c7;
  color: #b45309;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.req-meta {
  font-size: 12.5px;
  color: var(--rd-text-muted);
  margin-top: 6px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.req-meta span { display: inline-flex; align-items: center; gap: 5px; }
.req-meta i { font-size: 13px; }
.req-actions { display: flex; gap: 8px; flex-shrink: 0; }
.req-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid;
  text-decoration: none;
  line-height: 1;
  box-sizing: border-box;
}
.req-btn.accept {
  background: var(--rd-green);
  color: #fff;
  border-color: var(--rd-green);
}
.req-btn.accept:hover { background: var(--rd-green-700); color: #fff; }
.req-btn.reject {
  background: #fff;
  color: var(--rd-red-500);
  border-color: #fecaca;
}
.req-btn.reject:hover { background: #fef2f2; }
@media (max-width: 575.98px) {
  .req-card { flex-wrap: wrap; }
  .req-actions { width: 100%; }
  .req-btn { flex: 1; justify-content: center; }
}

/* Empanelment label-only display (BEEE profile) */
.emp-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}
.emp-detail-item { min-width: 0; }
.emp-detail-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rd-text-soft);
  font-weight: 600;
  margin-bottom: 4px;
}
.emp-detail-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--rd-text);
  word-break: break-word;
}
.emp-detail-value.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #134e4a;
}

/* ============================================================
   PAYMENT + PAYMENT SUCCESS pages
   ============================================================ */
body.pay-page {
  background:
    radial-gradient(1200px 600px at 0% -10%, rgba(19, 78, 74, 0.10), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(20, 184, 166, 0.10), transparent 60%),
    #f4f7f6;
  min-height: 100vh;
}
.pay-topbar {
  background: #fff;
  border-bottom: 1px solid var(--rd-border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pay-brand { display: flex; align-items: center; gap: 12px; }
.pay-brand img { width: 44px; height: 44px; }
.pay-brand .pay-brand-title { font-size: 16px; font-weight: 700; line-height: 1.1; }
.pay-brand .pay-brand-sub { font-size: 12px; color: var(--rd-text-muted); }
.pay-secure {
  color: var(--rd-green);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Breadcrumb */
.pay-breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--rd-text-muted);
}
.pay-breadcrumb a { color: var(--rd-text-muted); text-decoration: none; }
.pay-breadcrumb a:hover { color: var(--rd-green); }
.pay-breadcrumb .crumb-current { color: var(--rd-green); font-weight: 600; }
.pay-breadcrumb i { font-size: 14px; opacity: 0.6; }

.pay-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 22px;
}
.pay-card {
  background: #fff;
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(19, 78, 74, 0.06);
}
.pay-paying-for {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: linear-gradient(140deg, var(--rd-green-50) 0%, #ecfeff 100%);
  border: 1px solid var(--rd-green-200);
  border-radius: 12px;
  margin-bottom: 20px;
}
.pay-paying-for .ico {
  width: 40px; height: 40px;
  background: var(--rd-green);
  color: #fff;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 18px;
}
.pay-paying-for .pay-pf-label {
  font-size: 11px;
  color: var(--rd-green-700);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.pay-paying-for .pay-pf-body { flex: 1; min-width: 0; }
.pay-paying-for .pay-pf-title { font-weight: 700; color: var(--rd-text); font-size: 14.5px; }
.pay-paying-for .pay-pf-desc { font-size: 12.5px; color: var(--rd-text-muted); margin-top: 2px; }
.pay-paying-for .pay-pf-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 12px;
  background: #fff;
  color: var(--rd-green);
  border: 1px solid var(--rd-green-200);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.pay-paying-for .pay-pf-preview:hover {
  background: var(--rd-green-50);
  border-color: var(--rd-green);
}
.pay-paying-for .pay-pf-preview i { font-size: 13px; }
.pay-card h2 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.pay-card .pay-card-sub { font-size: 13.5px; color: var(--rd-text-muted); margin: 0; }

.pay-amount-block {
  position: relative;
  text-align: center;
  padding: 26px 18px 22px;
  border-radius: 14px;
  margin: 0 0 16px;
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(20, 184, 166, 0.10), transparent 70%),
    linear-gradient(180deg, #fafafa 0%, #fff 100%);
  border: 1px solid var(--rd-border-soft);
}
.pay-amount-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rd-text-soft);
  font-weight: 600;
  margin-bottom: 8px;
}
.pay-amount {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--rd-text);
}
.pay-amount .rupee { font-size: 24px; vertical-align: top; margin-right: 4px; font-weight: 600; }

.pay-secured-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 auto 22px;
}
.pay-center { text-align: center; }

.pay-btn-preview {
  background: #fff;
  color: var(--rd-text);
  border: 1.5px solid var(--rd-border);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.pay-btn-preview i { color: #dc2626; font-size: 16px; }
.pay-btn-preview:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.pay-btn-primary {
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.pay-btn-primary:hover { background: #d97706; }
.pay-btn-primary.is-loading { pointer-events: none; opacity: 0.85; position: relative; }
.pay-btn-primary.is-loading::after {
  content: '';
  position: absolute; right: 18px; top: 50%;
  width: 16px; height: 16px;
  margin-top: -8px;
  border: 2px solid #fff; border-right-color: transparent;
  border-radius: 50%;
  animation: admSpin 0.7s linear infinite;
}

.pay-btn-cancel {
  background: #fff;
  color: var(--rd-text);
  border: 1px solid var(--rd-border);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
}
.pay-btn-cancel:hover { background: #f8fafc; }

.pay-trust {
  margin-top: 18px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 12px;
  color: var(--rd-text-muted);
  display: flex;
  gap: 22px;
  justify-content: center;
  align-items: center;
}
.pay-trust span { display: inline-flex; align-items: center; gap: 6px; }
.pay-trust i { color: var(--rd-green); font-size: 14px; }

/* Support strip */
.pay-support {
  margin-top: 14px;
  padding: 12px 16px;
  background: #ecfdf5;
  border: 1px dashed var(--rd-green-200);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--rd-green-700);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pay-support i { font-size: 16px; }
.pay-support a { color: var(--rd-green); font-weight: 600; text-decoration: none; }

/* Methods row */
.pay-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px 0 4px;
  flex-wrap: wrap;
}
.pay-method-tag {
  padding: 4px 12px;
  border: 1px solid var(--rd-border);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--rd-text-muted);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
}
.pay-method-tag i { color: var(--rd-text-soft); }

/* Order summary card */
.pay-summary {
  background: #fff;
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(19, 78, 74, 0.06);
  position: sticky;
  top: 22px;
  align-self: start;
}
.pay-summary h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.pay-txn-line {
  font-size: 12.5px;
  color: var(--rd-text-muted);
  margin-bottom: 20px;
}
.pay-txn-line .mono {
  font-family: 'JetBrains Mono', monospace;
  color: #be123c;
  font-size: 11px;
  margin-left: 6px;
}
.pay-building-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: #f1f5f9;
  border-radius: 10px;
  margin-bottom: 18px;
}
.pay-building-icon {
  width: 38px;
  height: 38px;
  background: #e5e7eb;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #475569;
  font-size: 18px;
  flex-shrink: 0;
}
.pay-building-name { font-weight: 700; font-size: 15px; }
.pay-building-ref { font-size: 12px; color: var(--rd-text-muted); margin-top: 2px; font-family: 'JetBrains Mono', monospace; }

.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--rd-border-soft);
}
.pay-row:last-of-type { border-bottom: none; }
.pay-row .label { color: var(--rd-text-muted); }
.pay-row .value { color: var(--rd-text); font-weight: 600; }

.pay-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 0;
  margin-top: 4px;
  border-top: 2px solid var(--rd-text);
  font-size: 16px;
  font-weight: 700;
}
.pay-total .total-value { font-size: 22px; font-weight: 800; }

.pay-foot {
  text-align: center;
  padding: 22px 18px 40px;
  font-size: 12.5px;
  color: var(--rd-text-muted);
}

@media (max-width: 767.98px) {
  .pay-container { grid-template-columns: 1fr; padding: 20px 16px; }
}

/* ============================================================
   PAYMENT SUCCESS page
   ============================================================ */
body.psucc-page {
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(20, 184, 166, 0.12), transparent 65%),
    #f0fdf4;
  min-height: 100vh;
  padding: 40px 20px 60px;
}
.psucc-card {
  max-width: 620px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}
.psucc-header {
  background:
    radial-gradient(circle at 80% 10%, rgba(255,255,255,0.18), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(20, 184, 166, 0.3), transparent 40%),
    linear-gradient(140deg, #15803d 0%, #134e4a 100%);
  color: #fff;
  text-align: center;
  padding: 42px 24px 32px;
  position: relative;
}
.psucc-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 28px;
  background: linear-gradient(180deg, transparent 0%, #fff 100%);
  opacity: 0.06;
}
.psucc-check {
  width: 76px; height: 76px;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 38px;
  border: 1px solid rgba(255,255,255,0.3);
  position: relative;
  animation: psuccPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.psucc-check::before {
  content: '';
  position: absolute;
  inset: -14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  animation: psuccRing 1.2s ease-out;
}
@keyframes psuccPop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes psuccRing {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}
.psucc-header h1 { font-size: 24px; margin: 0 0 6px; font-weight: 700; }
.psucc-header p { margin: 0; opacity: 0.85; font-size: 13.5px; }
.psucc-amount {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 12px 28px;
  margin-top: 22px;
}
.psucc-amount-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.85;
  text-transform: uppercase;
  font-weight: 600;
}
.psucc-amount-value { font-size: 28px; font-weight: 800; margin-top: 4px; letter-spacing: -0.01em; }

.psucc-body-content { padding: 24px 26px 28px; }
.psucc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--rd-border-soft);
  font-size: 14px;
}
.psucc-row:last-of-type { border-bottom: none; }
.psucc-row .label { color: var(--rd-text-muted); }
.psucc-row .value { font-weight: 700; text-align: right; word-break: break-word; }
.psucc-row .value.mono { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; max-width: 60%; }

.psucc-info {
  background: #ecfdf5;
  border-left: 3px solid var(--rd-green);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 18px 0 22px;
  font-size: 13px;
  color: #065f46;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.psucc-info i { color: var(--rd-green); font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* Section heading inside success body */
.psucc-section-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rd-text-soft);
  font-weight: 700;
  margin: 22px 0 10px;
}

/* What happens next — timeline */
.psucc-steps { position: relative; padding-left: 26px; }
.psucc-steps::before {
  content: '';
  position: absolute;
  left: 9px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--rd-border);
}
.psucc-step {
  position: relative;
  padding: 0 0 14px 0;
}
.psucc-step:last-child { padding-bottom: 0; }
.psucc-step .ico {
  position: absolute;
  left: -26px;
  top: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--rd-border);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--rd-text-soft);
}
.psucc-step.is-done .ico { background: var(--rd-green); border-color: var(--rd-green); color: #fff; }
.psucc-step.is-active .ico {
  background: var(--rd-blue);
  border-color: var(--rd-blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}
.psucc-step .title { font-weight: 600; font-size: 13.5px; color: var(--rd-text); }
.psucc-step.is-done .title { color: var(--rd-green-700); }
.psucc-step .meta { font-size: 12px; color: var(--rd-text-muted); margin-top: 2px; }

/* Action grid */
.psucc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.psucc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rd-text);
  text-decoration: none;
  cursor: pointer;
}
.psucc-btn:hover { background: #f8fafc; color: var(--rd-text); }
.psucc-btn.primary {
  background: var(--rd-green);
  color: #fff;
  border-color: var(--rd-green);
}
.psucc-btn.primary:hover { background: var(--rd-green-700); color: #fff; }
.psucc-btn.full { grid-column: 1 / -1; }

/* Help footer */
.psucc-help {
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--rd-text-muted);
  text-align: center;
  border-top: 1px dashed var(--rd-border-soft);
}
.psucc-help a { color: var(--rd-green); font-weight: 600; text-decoration: none; }

/* Print receipt aside */
.psucc-print-aside {
  text-align: center;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--rd-text-soft);
}
.psucc-print-aside .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--rd-text-soft);
}
@media (max-width: 480px) {
  .psucc-actions { grid-template-columns: 1fr; }
}

/* ============================================================
   Form-view modal (read-only details of an issued form)
   ============================================================ */
.fv-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 22px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  margin-bottom: 16px;
}
.fv-section {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.fv-section h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rd-text-muted);
  font-weight: 700;
  margin: 0 0 12px;
}
.fv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
}
.fv-row { min-width: 0; }
.fv-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rd-text-soft);
  font-weight: 600;
  margin-bottom: 4px;
}
.fv-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--rd-text);
  word-break: break-word;
}
.fv-value.mono { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: #be123c; }
.fv-para {
  font-size: 13.5px;
  color: var(--rd-text);
  margin: 12px 0 0;
  line-height: 1.6;
}
.fv-deviations { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.fv-deviation {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 12px 14px;
}
.fv-dev-head { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.fv-dev-head .fv-clause { color: var(--rd-text-muted); font-weight: 500; font-size: 12.5px; }
.fv-dev-line { font-size: 13px; margin-top: 4px; line-height: 1.5; }
.fv-issuer { background: var(--rd-green-50); border-color: var(--rd-green-200); }
.fv-issuer h4 { color: var(--rd-green-700); }
@media (max-width: 575.98px) {
  .fv-strip, .fv-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ADMIN — Toasts, Alerts, Form feedback, Modals
   ============================================================ */

/* Toasts */
.adm-toast-host {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}
.adm-toast {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-left: 4px solid #134e4a;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 14px 34px rgba(15,23,42,0.12);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: admToastIn 0.22s ease;
  pointer-events: auto;
}
.adm-toast.success { border-left-color: #134e4a; }
.adm-toast.error   { border-left-color: #dc2626; }
.adm-toast.warning { border-left-color: #d97706; }
.adm-toast.info    { border-left-color: #2563eb; }
.adm-toast .adm-toast-ico {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.adm-toast.success .adm-toast-ico { background: #ecfdf5; color: #134e4a; }
.adm-toast.error   .adm-toast-ico { background: #fef2f2; color: #dc2626; }
.adm-toast.warning .adm-toast-ico { background: #fffbeb; color: #d97706; }
.adm-toast.info    .adm-toast-ico { background: #eff6ff; color: #2563eb; }
.adm-toast .adm-toast-body { flex: 1; min-width: 0; }
.adm-toast .adm-toast-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--rd-text);
}
.adm-toast .adm-toast-desc {
  font-size: 12.5px;
  color: var(--rd-text-muted);
  margin-top: 2px;
  line-height: 1.45;
}
.adm-toast .adm-toast-x {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--rd-text-soft);
  padding: 2px;
  font-size: 14px;
}
.adm-toast .adm-toast-x:hover { color: var(--rd-text); }
.adm-toast.is-leaving { animation: admToastOut 0.18s ease forwards; }
@keyframes admToastIn  { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes admToastOut { to   { transform: translateX(24px); opacity: 0; } }

/* Alerts (inline page banners) */
.adm-alert {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid;
  margin-bottom: 14px;
  align-items: flex-start;
}
.adm-alert .adm-alert-ico { font-size: 18px; line-height: 1; margin-top: 1px; flex-shrink: 0; }
.adm-alert .adm-alert-body { flex: 1; min-width: 0; }
.adm-alert .adm-alert-title { font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.adm-alert .adm-alert-msg { font-size: 12.5px; margin-top: 2px; line-height: 1.5; }
.adm-alert .adm-alert-x {
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.55;
  padding: 0;
  font-size: 14px;
}
.adm-alert .adm-alert-x:hover { opacity: 1; }
.adm-alert.success { background: #ecfdf5; border-color: #a7f3d0; color: #0f3d3a; }
.adm-alert.info    { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.adm-alert.warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.adm-alert.error   { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.adm-alert .adm-alert-actions { margin-top: 8px; display: flex; gap: 8px; }
.adm-alert .adm-alert-actions a {
  font-weight: 600;
  text-decoration: underline;
  font-size: 12.5px;
  color: inherit;
}

/* Field-level feedback */
.adm-field .adm-help {
  font-size: 12px;
  color: var(--rd-text-muted);
  margin-top: 2px;
}
.adm-field.has-error input,
.adm-field.has-error select,
.adm-field.has-error textarea {
  border-color: #fca5a5;
  background: #fff7f7;
}
.adm-field.has-error input:focus,
.adm-field.has-error select:focus,
.adm-field.has-error textarea:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.10);
}
.adm-field .adm-error {
  font-size: 12px;
  color: #b91c1c;
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.adm-field.has-error .adm-error { display: inline-flex; }
.adm-field.has-success input,
.adm-field.has-success select { border-color: #a7f3d0; }
.adm-field .adm-success {
  font-size: 12px;
  color: #065f46;
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.adm-field.has-success .adm-success { display: inline-flex; }

/* Button states */
.adm-btn.is-loading {
  pointer-events: none;
  opacity: 0.85;
  position: relative;
  padding-right: 36px;
}
.adm-btn.is-loading::after {
  content: '';
  position: absolute; right: 14px; top: 50%;
  width: 14px; height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: admSpin 0.7s linear infinite;
}
@keyframes admSpin { to { transform: rotate(360deg); } }

/* Modal (admin-themed) */
.modal.adm-modal .modal-content {
  border-radius: 14px;
  border: none;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
}
.modal.adm-modal .modal-header {
  padding: 18px 22px 10px;
  border-bottom: none;
}
.modal.adm-modal .modal-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal.adm-modal .modal-title .adm-modal-ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #134e4a;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.modal.adm-modal .modal-subtitle {
  font-size: 12.5px;
  color: var(--rd-text-muted);
  padding: 0 22px 12px;
  margin: -4px 0 0;
}
.modal.adm-modal .modal-body {
  padding: 8px 22px 18px;
}
.modal.adm-modal .modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--rd-border);
  background: #fafafa;
  border-radius: 0 0 14px 14px;
}
.modal.adm-modal .btn-close { font-size: 12px; }

/* ============================================================
   BUILDING OWNER — sub-navigation strip + owner-specific helpers
   (Reuses .rd-* layout from the auditor module)
   ============================================================ */

.own-nav {
  background: #fff;
  border-bottom: 1px solid var(--rd-border);
  padding: 0 32px;
  display: flex;
  gap: 30px;
  overflow-x: auto;
}
.own-nav-link {
  padding: 14px 0 13px;
  font-size: 14px;
  color: var(--rd-text-muted);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  white-space: nowrap;
}
.own-nav-link i { font-size: 16px; }
.own-nav-link:hover { color: var(--rd-text); }
.own-nav-link.is-active {
  color: var(--rd-green);
  font-weight: 700;
}
.own-nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--rd-green);
  border-radius: 2px 2px 0 0;
}

/* Owner welcome strip */
.own-welcome {
  background: linear-gradient(120deg, var(--rd-green) 0%, var(--rd-green-700) 100%);
  color: #fff;
  border-radius: 14px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.own-welcome::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 40%);
}
.own-welcome .own-welcome-body { flex: 1; position: relative; z-index: 1; }
.own-welcome h2 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.own-welcome p { margin: 0; color: rgba(255,255,255,0.85); font-size: 14px; }
.own-welcome .own-welcome-cta {
  position: relative; z-index: 1;
  background: #fff;
  color: var(--rd-green);
  border: none;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.own-welcome .own-welcome-cta:hover { background: #f1f5f9; color: var(--rd-green); }

/* Building card (grid view for owner dashboard) */
.own-building-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}
.own-building-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.own-bc-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.own-bc-icon {
  width: 44px; height: 44px;
  background: var(--rd-green-50);
  color: var(--rd-green);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.own-bc-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}
.own-bc-ref {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--rd-text-muted);
  margin-top: 4px;
}
.own-bc-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--rd-border);
}
.own-bc-meta .label {
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rd-text-soft);
  font-weight: 600;
}
.own-bc-meta .value {
  font-size: 13px;
  color: var(--rd-text);
  font-weight: 500;
  margin-top: 2px;
}
.own-bc-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}
.own-bc-progress .stage-dot {
  flex: 1;
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.own-bc-progress .stage-dot.completed { background: var(--rd-green); }
.own-bc-progress .stage-dot.current { background: var(--rd-green); }
.own-bc-progress .stage-dot.current::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.5);
  width: 50%;
}
.own-bc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.own-bc-foot .own-bc-beee {
  flex: 1;
  font-size: 12px;
  color: var(--rd-text-muted);
}
.own-bc-foot .own-bc-beee strong {
  display: block;
  color: var(--rd-text);
  font-size: 13px;
  font-weight: 600;
}
.own-bc-pill-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.own-bc-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 3px 9px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 999px;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  cursor: default;
}
.own-bc-action-pill i {
  font-size: 12px;
  color: #d97706;
}

/* Owner wizard steps */
.own-wizard {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  padding: 28px 32px 60px;
}
.own-wizard-aside h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
}
.own-wizard-aside p {
  color: var(--rd-text-muted);
  font-size: 13px;
  margin: 0 0 22px;
}
.own-wsteps { list-style: none; padding: 0; margin: 0; }
.own-wstep {
  display: flex;
  gap: 14px;
  padding-bottom: 22px;
  position: relative;
  align-items: flex-start;
}
.own-wstep:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px; top: 40px; bottom: 0;
  width: 2px;
  background: var(--rd-border);
}
.own-wstep .marker {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: #cbd5e1;
  flex-shrink: 0;
  z-index: 1;
  position: relative;
  font-size: 13px;
}
.own-wstep.is-done .marker { background: var(--rd-green); }
.own-wstep.is-active .marker { background: var(--rd-blue); }
.own-wstep .label { font-weight: 600; font-size: 14px; color: var(--rd-text); }
.own-wstep .sub { font-size: 12px; color: var(--rd-text-muted); margin-top: 2px; }
.own-wstep.is-locked .label { color: var(--rd-text-soft); font-weight: 500; }

.own-wizard-panel {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  padding: 28px 32px 32px;
}
.own-wizard-panel h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
}
.own-wizard-panel .panel-sub {
  color: var(--rd-text-muted);
  font-size: 13.5px;
  margin: 0 0 22px;
}
.own-wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rd-border-soft);
}

/* Owner wizard location map */
.ob-map-wrap { border:1px solid var(--rd-border); border-radius:14px; overflow:hidden; margin-bottom:8px; }
.ob-map { height:280px; width:100%; }
.ob-map-coords { display:flex; align-items:center; gap:14px; padding:10px 14px; background:#f8fafc; border-top:1px solid var(--rd-border); font-size:12px; color:var(--rd-text-muted); }
.ob-map-coords code { background:#fff; padding:3px 8px; border-radius:4px; font-size:11.5px; color:var(--rd-text); border:1px solid var(--rd-border); }
.ob-map-hint { font-size:11.5px; color:var(--rd-text-muted); margin-bottom:8px; display:flex; align-items:center; gap:5px; }
.ob-map-hint i { color:var(--rd-blue); }

.ob-leaflet-pin { background:transparent !important; border:0 !important; display:flex !important; align-items:center; justify-content:center; }
.ob-leaflet-pin i { font-size:32px; color:#dc2626; line-height:1; filter:drop-shadow(0 2px 3px rgba(0,0,0,0.35)); }

.ob-geocode-status { display:none; align-items:center; gap:8px; padding:10px 12px; margin-top:10px; border-radius:10px; font-size:13px; font-weight:500; line-height:1.4; border:1px solid transparent; }
.ob-geocode-status.is-loading { display:inline-flex; background:#eff6ff; border-color:#bfdbfe; color:#1d4ed8; }
.ob-geocode-status.is-success { display:inline-flex; background:#ecfdf5; border-color:#a7f3d0; color:#047857; }
.ob-geocode-status.is-error   { display:inline-flex; background:#fffbeb; border-color:#fcd34d; color:#b45309; }
.ob-geocode-status i { font-size:16px; flex-shrink:0; }
.ob-geocode-status.is-loading i { animation: ob-spin 0.8s linear infinite; }
@keyframes ob-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Owner field grid */
.own-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.own-field-grid > .own-fieldgroup {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.own-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.own-field.full { grid-column: 1 / -1; }
.own-field label { font-size: 13px; font-weight: 600; color: var(--rd-text); }
.own-field label .req { color: var(--rd-red-500); }
.own-field input,
.own-field select,
.own-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}
.own-field input:focus,
.own-field select:focus,
.own-field textarea:focus {
  outline: none;
  border-color: var(--rd-green);
  box-shadow: 0 0 0 4px rgba(19, 78, 74, 0.10);
}
.own-field .own-help { font-size: 12px; color: var(--rd-text-muted); margin-top: 2px; }
.own-field.has-error input,
.own-field.has-error select,
.own-field.has-error textarea {
  border-color: #fca5a5;
  background: #fff7f7;
}
.own-field .own-error {
  font-size: 12px;
  color: #b91c1c;
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.own-field.has-error .own-error { display: inline-flex; }

/* Password requirements panel (registration) */
.own-password-panel {
  background: #f8fafc;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  padding: 12px 14px;
}
.own-password-panel-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--rd-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.own-password-rules {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  font-size: 13px;
  color: #64748b;
}
.own-password-rules li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  transition: color 0.15s;
}
.own-password-rules .rule-ico {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: #dc2626;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.own-password-rules .rule-ico i {
  font-size: 11px;
  line-height: 1;
}
.own-password-rules li.is-ok {
  color: var(--rd-green);
  font-weight: 500;
}
.own-password-rules li.is-ok .rule-ico {
  background: #d1fae5;
  color: var(--rd-green);
}

/* Owner buttons */
.own-btn {
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid var(--rd-border);
  background: #fff;
  border-radius: 10px;
  font-size: 14px;
  color: var(--rd-text);
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
  box-sizing: border-box;
}
.own-btn:hover { background: #f8fafc; }
.own-btn.primary {
  background: var(--rd-green);
  color: #fff;
  border-color: var(--rd-green);
}
.own-btn.primary:hover { background: var(--rd-green-700); color: #fff; }
.own-btn:disabled,
.own-btn.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #94a3b8;
  border-color: #94a3b8;
  color: #fff;
}
.own-btn:disabled:hover,
.own-btn.primary:disabled:hover {
  background: #94a3b8;
}
.own-btn.is-loading {
  pointer-events: none; opacity: 0.85; position: relative; padding-right: 38px;
}
.own-btn.is-loading::after {
  content: ''; position: absolute; right: 14px; top: 50%;
  width: 14px; height: 14px; margin-top: -7px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: admSpin 0.7s linear infinite;
}

/* Owner auth shell */
.own-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #f7f8fa;
}
.own-auth-hero {
  background: linear-gradient(135deg, #134e4a 0%, #0f3d3a 100%);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.own-auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06), transparent 50%);
}
.own-auth-hero .hero-top {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
}
.own-auth-hero .hero-emblem {
  width: 60px;
  height: auto;
  flex-shrink: 0;
  display: block;
  line-height: 0;
  margin: 0;
  padding: 0;
  gap: 0;
}
.own-auth-hero .hero-emblem img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.own-auth-hero .hero-emblem-text {
  display: flex; flex-direction: column; justify-content: center;
  line-height: 1.15;
}
.own-auth-hero .hero-emblem-text .emc-line {
  font-size: 16px; font-weight: 700; color: #ffffff;
  letter-spacing: 0.005em;
  line-height: 1.2;
}
.own-auth-hero .hero-emblem-text .gok-line {
  font-size: 13px; font-weight: 400; color: rgba(255,255,255,0.72);
  margin-top: 3px;
  line-height: 1.2;
}
.own-auth-hero .hero-content { position: relative; z-index: 1; }
.own-auth-hero h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.own-auth-hero .hero-sub {
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  margin: 0 0 22px;
  font-weight: 400;
  letter-spacing: 0;
  opacity: 1;
  text-transform: none;
}
.own-auth-hero .hero-bullets {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 13.5px;
}
.own-auth-hero .hero-bullets li {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.92);
}
.own-auth-hero .hero-bullets i { color: #14b8a6; }
.own-auth-hero .hero-foot {
  position: relative; z-index: 1;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.own-auth-panel {
  display: grid;
  place-items: center;
  padding: 48px;
}
.own-auth-card {
  width: 100%;
  max-width: 420px;
}
.own-auth-card .brand-row {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rd-border);
  margin-bottom: 22px;
}
.own-auth-card .brand-row img { width: 44px; height: 44px; }
.own-auth-card .brand-row .title { font-size: 16px; font-weight: 700; color: var(--rd-text); }
.own-auth-card .brand-row .subtitle { font-size: 11.5px; color: var(--rd-text-muted); }
.own-auth-card h2 { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.own-auth-card .lead { color: var(--rd-text-muted); font-size: 13.5px; margin-bottom: 20px; }
.own-auth-foot {
  text-align: center;
  font-size: 13px;
  color: var(--rd-text-muted);
  margin-top: 18px;
}
.own-auth-foot a { color: var(--rd-green); font-weight: 600; text-decoration: none; }

/* Phone input */
.own-phone {
  display: flex;
}
.own-phone .pfx {
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid var(--rd-border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-weight: 600;
  font-size: 14px;
  display: grid;
  place-items: center;
  color: var(--rd-text);
}
.own-phone input {
  border-radius: 0 8px 8px 0;
}

/* OTP boxes */
.own-otp-row {
  display: flex;
  gap: 8px;
  margin: 14px 0 16px;
}
.own-otp-row input {
  width: 48px; height: 56px;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  background: #fff;
}
.own-otp-row input:focus {
  outline: none;
  border-color: var(--rd-green);
  box-shadow: 0 0 0 4px rgba(19,78,74,0.10);
}

/* Owner building wizard — OTP confirmation block */
.otp-block {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  padding: 18px 20px;
}
.otp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--rd-text);
  margin-bottom: 4px;
}
.otp-head:first-child {
  margin-top: 0;
}
.otp-target i {
  color: var(--rd-green);
  margin-right: 4px;
}
.otp-status-msg {
  font-size: 12.5px;
  margin-top: 8px;
}
.otp-status-msg.is-error {
  color: #b91c1c;
}
.otp-status-msg.is-success {
  color: var(--rd-green);
}

/* Owner stats row (reuses rd-stats-row styling but with owner accent) */

/* Empty state */
.own-empty {
  background: #fff;
  border: 1px dashed var(--rd-border);
  border-radius: 14px;
  padding: 60px 24px;
  text-align: center;
}
.own-empty .own-empty-ico {
  width: 64px; height: 64px;
  background: var(--rd-green-50);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--rd-green);
  font-size: 28px;
  margin: 0 auto 14px;
}
.own-empty h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}
.own-empty p { color: var(--rd-text-muted); margin: 0 0 16px; font-size: 13.5px; }

/* Responsive */
@media (max-width: 991.98px) {
  .own-wizard { grid-template-columns: 1fr; }
  .own-auth {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .own-auth-hero {
    padding: 32px 28px 36px;
    min-height: auto;
  }
  .own-auth-hero h1 {
    font-size: 26px;
    margin-bottom: 10px;
  }
  .own-auth-hero .hero-sub {
    font-size: 13.5px;
    margin-bottom: 16px;
  }
  .own-auth-hero .hero-bullets { display: none; }
  .own-auth-hero .hero-foot { display: none; }
  .own-auth-hero .hero-top { margin-bottom: 22px; }
  .own-auth-panel { padding: 28px 22px 40px; }
  .own-auth-card { padding: 0; max-width: 100%; }
  .own-field-grid { grid-template-columns: 1fr; }
  .own-field-grid > .own-fieldgroup { grid-template-columns: 1fr; }
  .pp-auth-back { margin-bottom: 16px; }
}
@media (max-width: 575.98px) {
  .own-auth-hero { padding: 24px 20px 28px; }
  .own-auth-hero h1 { font-size: 22px; }
  .own-auth-hero .hero-emblem { width: 48px; }
  .own-auth-panel { padding: 22px 18px 32px; }
  .own-auth-card h2 { font-size: 20px; }
  .own-auth-card .brand-row { margin-bottom: 18px; }
  .own-auth-card .brand-row img { width: 36px; height: 36px; }
  .own-auth-card .brand-row .title { font-size: 14px; }
  .own-auth-card .brand-row .subtitle { font-size: 11px; }
}

/* Government of Kerala footer */
.rd-gov-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px 32px;
  border-top: 1px solid var(--rd-border);
  background: #fff;
  margin-top: 40px;
}
.rd-gov-footer .rd-gov-emblem {
  width: 56px;
  height: auto;
  opacity: 0.85;
}
.rd-gov-footer .rd-gov-emblem img {
  width: 100%;
  height: auto;
  display: block;
}
.rd-gov-footer .rd-gov-text {
  font-size: 12px;
  color: var(--rd-text-muted);
  letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 991.98px) {
  .rd-stats-row { grid-template-columns: repeat(2, 1fr); }
  .rd-project-layout, .rd-timeline-layout { grid-template-columns: 1fr; }
  .rd-outcome-row { grid-template-columns: 1fr; }
  .rd-form-grid { grid-template-columns: 1fr; }
  .rd-info-grid,
  .rd-info-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-summary-strip { grid-template-columns: repeat(3, 1fr); }
  .rd-container { padding: 18px; }
  .rd-project-head, .rd-project-tabs, .rd-project-topbar { padding-left: 18px; padding-right: 18px; }
  .rd-topbar { padding: 12px 18px; }
  .rd-topbar .rd-topbar-right { gap: 8px; }
  .rd-user-menu .rd-user-info { display: none; }
  .rd-user-menu .rd-user-caret { display: none; }
  .rd-user-trigger { padding: 4px; border-radius: 50%; }
  .rd-user-dropdown { min-width: 220px; right: 0; }
  .own-nav { padding: 0 18px; overflow-x: auto; flex-wrap: nowrap; }
  .own-nav-link { white-space: nowrap; flex-shrink: 0; }
  .rd-form-head { flex-wrap: wrap; }
  .rd-form-head-end { flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
  .rd-locked-hint { font-size: 11px; padding: 3px 7px; }
  .own-field-grid { grid-template-columns: 1fr; }
  .own-field-grid > .own-fieldgroup { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .rd-stats-row { grid-template-columns: 1fr; }
  .rd-tabs { gap: 18px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .rd-tab { flex-shrink: 0; white-space: nowrap; }
  .rd-toolbar { flex-wrap: wrap; }
  .rd-project-head h1 { font-size: 22px; }
  .rd-info-grid,
  .rd-info-grid-4 { grid-template-columns: 1fr; }
  .rd-summary-strip { grid-template-columns: repeat(2, 1fr); }
  .rd-topbar { padding: 10px 16px; }
  .rd-topbar .rd-brand-title { font-size: 14px; }
  .rd-topbar .rd-brand-subtitle { font-size: 11px; }
  .rd-topbar .rd-brand-logo { width: 36px; height: 36px; }
  .rd-section-head h2 { font-size: 20px; }
  .rd-table-wrap { overflow-x: auto; }
  .rd-table { min-width: 600px; }
  .rd-gov-footer { padding: 18px 16px; font-size: 11px; }
  .rd-step-detail { padding: 22px 18px; }
  .rd-form-card { padding: 18px; }
  .rd-form-head h4 { font-size: 14px; }
  .own-wizard-aside { padding: 24px 20px; }
  .own-wizard-panel { padding: 24px 20px; }
}

/* ===============================================================
   PUBLIC PORTAL HOME (root /index.html)
   =============================================================== */
.pp-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Topbar */
.pp-topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.pp-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.pp-brand { display: flex; align-items: center; gap: 12px; }
.pp-brand-emblem {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pp-brand-emblem img { width: 100%; height: 100%; object-fit: contain; }
.pp-brand-line1 { font-size: 14px; font-weight: 800; color: #0f3d3a; letter-spacing: -0.005em; line-height: 1.15; }
.pp-brand-line2 { font-size: 11.5px; font-weight: 500; color: #64748b; line-height: 1.2; margin-top: 1px; }
.pp-topbar-actions { display: flex; align-items: center; gap: 18px; }
.pp-link {
  font-size: 13.5px; font-weight: 600; color: #134e4a;
  text-decoration: none;
  padding: 7px 12px; border-radius: 8px;
  transition: background 0.15s;
}
.pp-link:hover { background: rgba(20, 184, 166, 0.08); color: #0f3d3a; }

/* Hero */
.pp-hero {
  position: relative;
  background: linear-gradient(135deg, #0f3d3a 0%, #134e4a 45%, #115e59 100%);
  color: #fff;
  padding: 88px 32px 100px;
  overflow: hidden;
}
.pp-hero-inner {
  max-width: 1100px; margin: 0 auto;
  text-align: center;
  position: relative; z-index: 1;
}
.pp-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(20, 184, 166, 0.16);
  border: 1px solid rgba(94, 234, 212, 0.3);
  color: #5eead4;
  font-size: 12.5px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.pp-hero-eyebrow i { font-size: 13px; }
.pp-hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: #fff;
}
.pp-hero-sub {
  font-size: clamp(15px, 1.6vw, 17.5px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 720px;
  margin: 0 auto 30px;
}
.pp-hero-meta {
  display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center;
  gap: 14px;
  font-size: 13px; font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}
.pp-hero-meta i { color: #5eead4; margin-right: 5px; }
.pp-hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.3); }
.pp-hero-glow {
  position: absolute;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(20, 184, 166, 0.25) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Main / Portal cards */
.pp-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 32px 80px;
  position: relative;
  z-index: 5;
}
.pp-section-head {
  text-align: center;
  margin: 0 0 40px;
}
.pp-section-head h2 {
  font-size: 28px; font-weight: 800; color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.pp-section-head p {
  font-size: 15px; color: #64748b;
  max-width: 580px; margin: 0 auto;
  line-height: 1.55;
}

.pp-portals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 72px;
  align-items: stretch;
}
.pp-portal {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.pp-portal:hover {
  transform: translateY(-4px);
  border-color: #5eead4;
  box-shadow: 0 18px 36px -16px rgba(15, 61, 58, 0.18), 0 4px 12px -4px rgba(15, 61, 58, 0.08);
}
.pp-portal-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 26px;
  margin-bottom: 20px;
  background: #ccfbf1;
  color: #0f766e;
  position: relative; z-index: 1;
}
.pp-portal-tag {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 6px;
  position: relative; z-index: 1;
}
.pp-portal h3 {
  font-size: 19px; font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  position: relative; z-index: 1;
}
.pp-portal p {
  font-size: 13.5px; color: #475569;
  line-height: 1.55;
  margin: 0 0 18px;
  position: relative; z-index: 1;
}
.pp-portal-points {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative; z-index: 1;
}
.pp-portal-points li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: #334155;
  line-height: 1.45;
}
.pp-portal-points i {
  color: #14b8a6; font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}
.pp-portal-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700;
  color: #134e4a;
  padding: 11px 16px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 10px;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  position: relative; z-index: 1;
}
.pp-portal:hover .pp-portal-cta {
  background: #134e4a;
  border-color: #134e4a;
  color: #fff;
}
.pp-portal-cta i { transition: transform 0.2s ease; }
.pp-portal:hover .pp-portal-cta i { transform: translateX(3px); }

/* About */
.pp-about {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 30px 32px;
  display: flex; gap: 22px;
  align-items: flex-start;
  margin-top: 16px;
}
.pp-about-icon {
  width: 44px; height: 44px;
  background: #ccfbf1;
  color: #0f766e;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.pp-about h2 {
  font-size: 20px; font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
}
.pp-about p {
  font-size: 13.5px; color: #475569;
  line-height: 1.65;
  margin: 0 0 10px;
}
.pp-about p:last-child { margin-bottom: 0; }
.pp-about strong { color: #0f3d3a; font-weight: 700; }

/* Footer */
.pp-footer {
  background: #0f3d3a;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 40px;
}
.pp-footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}
.pp-footer-brand { display: flex; align-items: center; gap: 12px; }
.pp-footer-emblem {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pp-footer-emblem img {
  width: 100%; height: 100%; object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.pp-footer-line1 { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.2; }
.pp-footer-line2 { font-size: 11.5px; color: rgba(255,255,255,0.6); margin-top: 2px; }
.pp-footer-links {
  display: flex; gap: 22px;
  justify-content: center;
}
.pp-footer-links a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: color 0.15s;
}
.pp-footer-links a:hover { color: #5eead4; }
.pp-footer-copy {
  font-size: 11.5px;
  color: rgba(255,255,255,0.55);
  text-align: right;
  line-height: 1.5;
}

/* Auth back-link (used inside login pages) */
.pp-auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.15s;
  position: relative;
  z-index: 2;
  align-self: flex-start;
}
.pp-auth-back:hover { color: #5eead4; }
.pp-auth-back-light {
  color: #134e4a;
}
.pp-auth-back-light:hover { color: #0f3d3a; }

/* Responsive — tablets */
@media (max-width: 991.98px) {
  .pp-portals { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .pp-portal { padding: 26px 22px; }
  .pp-portal:last-child { grid-column: span 2; max-width: 520px; margin: 0 auto; width: 100%; }
  .pp-hero { padding: 64px 24px 80px; }
  .pp-hero-title { font-size: clamp(28px, 4.5vw, 42px); }
  .pp-about { padding: 26px; gap: 18px; }
  .pp-main { padding: 48px 24px 64px; }
}

/* Responsive — phones */
@media (max-width: 700px) {
  .pp-topbar-inner { padding: 11px 16px; gap: 10px; }
  .pp-topbar-actions { gap: 2px; }
  .pp-topbar-actions .pp-link { padding: 6px 9px; font-size: 12.5px; }
  .pp-topbar-actions .pp-link:nth-child(2),
  .pp-topbar-actions .pp-link:nth-child(3) { display: none; }
  .pp-brand-emblem { width: 36px; height: 36px; }
  .pp-brand-line1 { font-size: 13px; }
  .pp-brand-line2 { font-size: 10.5px; }

  .pp-hero { padding: 52px 18px 64px; }
  .pp-hero-eyebrow { font-size: 11.5px; padding: 5px 12px; margin-bottom: 18px; }
  .pp-hero-title { font-size: clamp(24px, 7vw, 32px); line-height: 1.15; margin-bottom: 14px; }
  .pp-hero-title br { display: none; }
  .pp-hero-sub { font-size: 14px; margin-bottom: 22px; padding: 0 4px; }
  .pp-hero-meta { gap: 8px 14px; font-size: 12px; flex-direction: column; }
  .pp-hero-meta .dot { display: none; }
  .pp-hero-meta span:not(.dot) { display: inline-flex; align-items: center; gap: 5px; }

  .pp-main { padding: 40px 16px 56px; }
  .pp-section-head { margin-bottom: 28px; }
  .pp-section-head h2 { font-size: 22px; }
  .pp-section-head p { font-size: 14px; }

  .pp-portals {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 48px;
  }
  .pp-portal {
    padding: 24px 22px;
    border-radius: 16px;
  }
  .pp-portal:last-child {
    grid-column: span 1;
    max-width: none;
    margin: 0;
  }
  .pp-portal-icon { width: 48px; height: 48px; font-size: 22px; margin-bottom: 16px; border-radius: 12px; }
  .pp-portal h3 { font-size: 17px; }
  .pp-portal p { font-size: 13px; margin-bottom: 14px; }
  .pp-portal-points { margin-bottom: 18px; }
  .pp-portal-points li { font-size: 12.5px; }
  .pp-portal-cta { padding: 10px 14px; font-size: 13px; }

  .pp-about {
    flex-direction: column;
    padding: 22px 20px;
    gap: 14px;
    border-radius: 14px;
  }
  .pp-about-icon { width: 40px; height: 40px; font-size: 18px; }
  .pp-about h2 { font-size: 18px; }
  .pp-about p { font-size: 13px; line-height: 1.6; }

  .pp-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 18px;
    padding: 28px 20px;
  }
  .pp-footer-brand { justify-content: center; }
  .pp-footer-emblem { width: 38px; height: 38px; }
  .pp-footer-links { flex-wrap: wrap; gap: 14px 18px; }
  .pp-footer-copy { text-align: center; font-size: 11px; }
}

/* Tiny phones */
@media (max-width: 380px) {
  .pp-topbar-inner { gap: 8px; }
  .pp-brand-line1 { font-size: 12px; }
  .pp-brand-line2 { font-size: 10px; }
  .pp-hero-title { font-size: 22px; }
  .pp-hero-sub { font-size: 13.5px; }
  .pp-section-head h2 { font-size: 20px; }
  .pp-portal { padding: 22px 18px; }
  .pp-portal h3 { font-size: 16px; }
}

/* ============================================================
   ECP.confirm() modal (public/assets/js/common.js)
   Styled with the --rd-* tokens used by layouts.auditor/builder/admin
   ============================================================ */

@keyframes rd-modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rd-modal-scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.ecp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: rd-modal-fade-in 0.2s ease;
}

.ecp-modal {
  background: var(--rd-surface);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  animation: rd-modal-scale-in 0.2s ease;
}

.ecp-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 48px);
}

.ecp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.ecp-btn:active {
  transform: scale(0.97);
}

.ecp-btn-primary {
  background: var(--rd-blue);
  color: #fff;
  border-color: var(--rd-blue);
}
.ecp-btn-primary:hover {
  background: var(--rd-blue-600);
  border-color: var(--rd-blue-600);
  color: #fff;
}

.ecp-btn-secondary {
  background: var(--rd-border-soft);
  color: var(--rd-text);
  border-color: var(--rd-border);
}
.ecp-btn-secondary:hover {
  background: var(--rd-border);
  color: var(--rd-text);
}

