:root {
  --rg-primary: #0f8f40;
  --rg-primary-deep: #0b5f2b;
  --rg-primary-forest: #0d7d35;
  --rg-primary-contrast: #fff;
  --rg-primary-deep-contrast: #fff;
  --rg-lime: #9acd23;
  --rg-lime-hover: #86b31f;
  --rg-lime-contrast: #111;
  --rg-lime-soft: #d8ea7f;
  --rg-lime-soft-contrast: #111;
  --rg-lime-surface: #eef7d3;
  --rg-lime-surface-text: #111;
  --rg-ink: #17171b;
  --rg-surface: rgba(255, 255, 255, 0.9);
  --rg-surface-strong: #ffffff;
  --rg-border: rgba(15, 110, 48, 0.14);
  --rg-text: #1e2a1f;
  --rg-muted: #637364;
  --rg-danger: #b04438;
  --rg-shadow: 0 24px 50px rgba(13, 74, 34, 0.12);
  --rg-shadow-strong: 0 34px 70px rgba(11, 95, 43, 0.18);
}

html {
  font-size: 15px;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--rg-text);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--rg-lime) 22%, transparent), transparent 26%),
    radial-gradient(circle at top right, color-mix(in srgb, var(--rg-primary) 12%, transparent), transparent 28%),
    linear-gradient(145deg, #f8fbf4, #f2f8eb 48%, #eef5ee 100%);
}

a {
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar-panel {
  width: 280px;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--rg-lime) 18%, transparent), transparent 28%),
    linear-gradient(180deg, var(--rg-primary-deep), var(--rg-primary-forest));
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  backdrop-filter: blur(14px);
}

.sidebar-backdrop {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--rg-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--rg-primary-deep);
  box-shadow: 0 10px 22px rgba(13, 74, 34, 0.1);
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

body.is-sidebar-open .mobile-menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.is-sidebar-open .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.is-sidebar-open .mobile-menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-lockup {
  width: 138px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.16);
}

.brand-initial-mark {
  width: 138px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--rg-lime) 38%, transparent), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(241, 249, 235, 0.88));
  color: var(--rg-primary-deep);
  border: 1px solid rgba(255, 255, 255, 0.44);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.16);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
}

.brand-initial-mark[hidden],
.current-logo-frame img[hidden],
.branding-preview-top img[hidden] {
  display: none !important;
}

.brand-copy {
  min-width: 0;
  text-align: center;
}

.brand-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
  margin-bottom: 0.2rem;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  line-height: 1.35;
}

.app-nav .nav-link {
  color: rgba(255, 255, 255, 0.84);
  padding: 0.9rem 1rem;
  border-radius: 16px;
  margin-bottom: 0.35rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.app-nav .nav-link:hover,
.app-nav .nav-link.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateX(2px);
}

.nav-section-label {
  margin: 1.1rem 0 0.45rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-link-with-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nav-notification-badge {
  min-width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--rg-lime);
  color: var(--rg-lime-contrast);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}


.content-panel {
  flex: 1;
  padding: 1.25rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--rg-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(241, 249, 235, 0.96));
  border-radius: 30px;
  color: var(--rg-text);
  box-shadow: var(--rg-shadow-strong);
}

.topbar-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.topbar-logo {
  width: 78px;
  max-width: 22vw;
  height: auto;
  flex: 0 0 auto;
  display: block;
}

.brand-initial-mark-sm {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  border-radius: 16px;
  font-size: 2rem;
}

.page-heading {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.page-subheading {
  margin: 0.2rem 0 0;
  color: var(--rg-muted);
  overflow-wrap: anywhere;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
}

.topbar-user {
  min-width: 0;
}

.topbar-user .fw-semibold,
.topbar-user small {
  display: block;
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-stage {
  padding: 1.5rem 0;
}

.app-toast-stack {
  position: fixed;
  z-index: 1080;
  top: 1.25rem;
  right: 1.25rem;
  width: min(420px, calc(100vw - 2rem));
  display: grid;
  gap: 0.75rem;
  pointer-events: none;
}

.app-toast {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--rg-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--rg-shadow-strong);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
  pointer-events: auto;
}

.app-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.app-toast-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(15, 143, 64, 0.14);
  position: relative;
}

.app-toast-icon::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-right: 3px solid var(--rg-primary-deep);
  border-bottom: 3px solid var(--rg-primary-deep);
  transform: rotate(45deg) translate(-1px, -2px);
}

.app-toast-error .app-toast-icon {
  background: rgba(176, 68, 56, 0.14);
}

.app-toast-error .app-toast-icon::after {
  content: "!";
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  transform: none;
  color: var(--rg-danger);
  font-weight: 900;
}

.app-toast-warning .app-toast-icon {
  background: rgba(255, 193, 7, 0.2);
}

.app-toast-warning .app-toast-icon::after {
  content: "!";
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  transform: none;
  color: #7a5a00;
  font-weight: 900;
}

.app-toast-content strong,
.app-toast-content p {
  display: block;
  margin: 0;
}

.app-toast-content strong {
  color: var(--rg-ink);
  font-size: 0.96rem;
}

.app-toast-content p {
  margin-top: 0.2rem;
  color: var(--rg-muted);
  line-height: 1.4;
}

.app-toast-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(23, 23, 27, 0.06);
  color: var(--rg-muted);
  font-size: 1.1rem;
  line-height: 1;
}

.glass-card,
.table-card {
  background: var(--rg-surface);
  border: 1px solid var(--rg-border);
  border-radius: 24px;
  box-shadow: var(--rg-shadow);
  backdrop-filter: blur(12px);
}

.glass-card {
  padding: 1.5rem;
}

.table-card {
  padding: 1rem;
}

.table-responsive {
  border-radius: 16px;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
  min-width: 760px;
}

.table-responsive > .table.table-compact,
.table-responsive > .table:last-child:first-child {
  margin-bottom: 0;
}

.stats-card {
  height: 100%;
  padding: 1.25rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(216, 234, 127, 0.38), transparent 36%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(245, 250, 239, 0.9));
  border: 1px solid var(--rg-border);
}

.stats-label {
  color: var(--rg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.stats-value {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 0.4rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--rg-primary-deep);
}

.form-control,
.form-select {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--rg-primary) 18%, transparent);
  padding: 0.8rem 0.95rem;
  min-height: 48px;
}

.form-control:focus,
.form-select:focus,
.btn:focus,
.btn:active:focus {
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--rg-lime) 28%, transparent);
  border-color: color-mix(in srgb, var(--rg-lime) 90%, #fff);
}

.tenant-combobox {
  position: relative;
}

.tenant-combobox-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid var(--rg-border);
  border-radius: 14px;
  background: var(--rg-surface-strong);
  box-shadow: var(--rg-shadow);
}

.tenant-combobox-option {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--rg-text);
  text-align: left;
}

.tenant-combobox-option:hover,
.tenant-combobox-option.is-active {
  background: color-mix(in srgb, var(--rg-primary) 10%, transparent);
}

.tenant-combobox-option span {
  font-weight: 800;
}

.tenant-combobox-option small,
.tenant-combobox-empty {
  color: var(--rg-muted);
}

.tenant-combobox-empty {
  padding: 0.75rem;
  font-size: 0.9rem;
}

.user-module-permissions {
  padding: 1rem;
  border: 1px solid var(--rg-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.user-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.user-module-card {
  min-height: 100%;
  padding: 1rem;
  border: 1px solid var(--rg-border);
  border-radius: 8px;
  background: #fff;
}

.user-module-card-disabled {
  opacity: 0.62;
  background: rgba(247, 249, 246, 0.92);
}

.user-module-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.user-module-options {
  display: grid;
  gap: 0.45rem;
}

.user-module-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(23, 23, 27, 0.08);
  border-radius: 8px;
  background: rgba(248, 251, 246, 0.8);
  cursor: pointer;
  font-weight: 700;
}

.user-module-option input {
  margin: 0;
}

.btn {
  border-radius: 14px;
  font-weight: 700;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.btn-primary {
  background: var(--rg-primary);
  border-color: var(--rg-primary);
  color: var(--rg-primary-contrast);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--rg-primary-deep);
  border-color: var(--rg-primary-deep);
  color: var(--rg-primary-deep-contrast);
}

.btn-accent {
  background: var(--rg-lime);
  border-color: var(--rg-lime);
  color: var(--rg-lime-contrast);
}

.btn-accent:hover {
  background: var(--rg-lime-hover);
  border-color: var(--rg-lime-hover);
  color: var(--rg-lime-contrast);
}

.btn-outline-secondary {
  color: var(--rg-primary-deep);
  border-color: color-mix(in srgb, var(--rg-primary-deep) 22%, transparent);
  background: rgba(255, 255, 255, 0.74);
}

.btn-outline-secondary:hover {
  background: color-mix(in srgb, var(--rg-primary) 8%, transparent);
  color: var(--rg-primary-deep);
  border-color: color-mix(in srgb, var(--rg-primary-deep) 35%, transparent);
}

.logout-btn {
  border-radius: 999px;
  border-color: color-mix(in srgb, var(--rg-primary) 22%, transparent);
  color: var(--rg-primary-deep);
  background: rgba(255, 255, 255, 0.64);
}

.logout-btn:hover {
  background: color-mix(in srgb, var(--rg-primary) 8%, transparent);
  color: var(--rg-primary-deep);
  border-color: color-mix(in srgb, var(--rg-primary-deep) 35%, transparent);
}

.table thead th {
  color: var(--rg-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom-width: 1px;
}

.table tbody td {
  vertical-align: middle;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-active {
  background: rgba(25, 135, 84, 0.14);
  color: #126b42;
}

.status-warning {
  background: rgba(255, 193, 7, 0.18);
  color: #7a5a00;
}

.status-cancelled {
  background: rgba(103, 115, 100, 0.13);
  color: var(--rg-muted);
}

.badge-soft {
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-weight: 700;
}

.badge-active {
  background: rgba(25, 135, 84, 0.14);
  color: #126b42;
}

.badge-completed {
  background: rgba(13, 110, 253, 0.12);
  color: #0b57c0;
}

.badge-cancelled {
  background: rgba(176, 68, 56, 0.12);
  color: var(--rg-danger);
}

.receipt-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 247, 0.92));
  border-radius: 28px;
  padding: 2rem;
  border: 1px solid var(--rg-border);
  box-shadow: var(--rg-shadow);
}

.ticket-preview-dialog {
  max-width: min(96vw, 520px);
}

.ticket-preview-modal {
  border-radius: 8px;
}

.ticket-paper-shell {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.ticket-preview-paper {
  width: var(--ticket-preview-width, 32ch);
  max-width: var(--ticket-preview-width, 32ch);
  margin: 0;
  padding: 1rem 0;
  background: #fff;
  color: #111;
  border: 1px solid #d7d7d7;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  font-family: "Courier New", Consolas, monospace;
  font-size: 13px;
  line-height: 1.22;
  letter-spacing: 0;
  white-space: pre;
  tab-size: 1;
}

.parking-settings-card {
  background:
    radial-gradient(circle at top right, rgba(216, 234, 127, 0.22), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 244, 0.92));
}

.settings-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.settings-eyebrow {
  display: inline-flex;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 143, 64, 0.12);
  color: var(--rg-primary-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.settings-hero-icon {
  width: 92px;
  height: 92px;
  padding: 1rem;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 232, 0.92));
  border: 1px solid var(--rg-border);
  box-shadow: var(--rg-shadow);
  flex: 0 0 auto;
}

.settings-hero-icon svg,
.settings-pane-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.settings-pane {
  height: 100%;
  padding: 1.4rem;
  border-radius: 24px;
  border: 1px solid var(--rg-border);
  background: rgba(255, 255, 255, 0.74);
}

.settings-pane-moto {
  background:
    radial-gradient(circle at top right, rgba(154, 205, 35, 0.14), transparent 30%),
    rgba(255, 255, 255, 0.78);
}

.settings-pane-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.settings-pane-icon {
  width: 68px;
  height: 68px;
  padding: 0.75rem;
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(11, 95, 43, 0.1), rgba(154, 205, 35, 0.16));
  flex: 0 0 auto;
}

.login-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--rg-lime) 20%, transparent), transparent 18%),
    radial-gradient(circle at 80% 15%, color-mix(in srgb, var(--rg-primary) 18%, transparent), transparent 25%),
    linear-gradient(145deg, #fbfdf8, #eff7ea 48%, #edf6ee 100%);
}

.login-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 430px);
  gap: 1.5rem;
  align-items: stretch;
}

.login-shell-compact {
  width: min(460px, 100%);
  display: block;
}

.login-shell-habita {
  width: min(1120px, 100%);
}

.login-brand-panel {
  padding: 2rem 2.25rem;
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--rg-lime) 34%, transparent), transparent 26%),
    linear-gradient(155deg, var(--rg-primary-deep), var(--rg-primary-forest));
  color: #fff;
  box-shadow: var(--rg-shadow-strong);
  overflow: hidden;
  position: relative;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.login-brand-badge {
  display: inline-flex;
  width: 104px;
  height: 104px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.login-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
  display: block;
}

.login-brand-kicker {
  display: block;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-brand-title {
  max-width: 16ch;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.04;
  font-weight: 800;
}

.login-brand-copy {
  max-width: 54ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.02rem;
}

.login-brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.login-brand-pills span {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.login-card {
  width: 100%;
  padding: 2rem;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--rg-border);
  box-shadow: var(--rg-shadow-strong);
  align-self: center;
}

.login-hero {
  margin-bottom: 1.75rem;
  text-align: center;
}

.login-card-logo {
  width: 170px;
  height: auto;
  display: block;
  margin-bottom: 1.2rem;
  border-radius: 9px;
  margin-left: auto;
  margin-right: auto;
}

.login-card-kicker {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  color: var(--rg-primary);
  font-weight: 800;
  margin-bottom: 0.4rem;
  text-align: center;
}

.login-card-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  color: var(--rg-ink);
  text-align: center;
}

.password-control {
  position: relative;
}

.password-control .form-control {
  padding-right: 4.7rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  min-width: 62px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--rg-primary) 10%, transparent);
  color: var(--rg-primary-deep);
  font-weight: 800;
}

.habitad-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 3vw, 3rem);
  font-family: "Manrope", sans-serif;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #07100b;
}

.habitad-login-page::before {
  content: "";
  position: absolute;
  inset: -7%;
  z-index: -5;
  background:
    linear-gradient(115deg, rgba(18, 19, 12, 0.46), rgba(98, 80, 39, 0.14) 44%, rgba(9, 11, 9, 0.5)),
    url("../images/habitad-login-residential-bg.jpg") center 56% / cover no-repeat,
    url("../images/habitad-login-bg.png") center / cover no-repeat;
  filter: saturate(1.22) contrast(1.07) brightness(1.03);
  transform: scale(1.12);
  transform-origin: 50% 50%;
  animation: habitad-cinematic-pan 22s ease-in-out infinite alternate;
  will-change: transform, filter;
}

.habitad-login-page::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -3;
  background:
    radial-gradient(circle at 23% 12%, rgba(255, 234, 173, 0.36), transparent 24%),
    radial-gradient(circle at 80% 72%, rgba(255, 177, 76, 0.23), transparent 29%),
    radial-gradient(circle at 50% 98%, rgba(20, 18, 9, 0.72), transparent 39%),
    linear-gradient(115deg, rgba(7, 8, 5, 0.38), transparent 42%, rgba(8, 8, 5, 0.38));
  mix-blend-mode: screen;
}

.habitad-login-cinema {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.habitad-login-cinema span {
  position: absolute;
  display: block;
  opacity: 0.8;
  will-change: transform, opacity;
}

.habitad-login-cinema span:nth-child(1) {
  inset: -12% -18% auto auto;
  width: 62vw;
  height: 42vh;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255, 225, 150, 0.42), rgba(255, 204, 112, 0.12) 38%, transparent 72%);
  filter: blur(20px);
  animation: habitad-light-drift 14s ease-in-out infinite alternate;
}

.habitad-login-cinema span:nth-child(2) {
  left: -18%;
  top: 10%;
  width: 78vw;
  height: 20vh;
  background: linear-gradient(100deg, transparent, rgba(255, 226, 143, 0.22), rgba(255, 255, 255, 0.12), transparent);
  filter: blur(18px);
  transform: rotate(-16deg);
  animation: habitad-light-sweep 18s ease-in-out infinite;
}

.habitad-login-cinema span:nth-child(3) {
  left: -8%;
  bottom: -16%;
  width: 72vw;
  height: 30vh;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255, 184, 83, 0.2), rgba(216, 228, 109, 0.1) 42%, transparent 72%);
  filter: blur(24px);
  animation: habitad-ground-breathe 12s ease-in-out infinite alternate;
}

.habitad-login-cinema span:nth-child(4) {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    repeating-radial-gradient(circle at 17% 31%, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 8px);
  background-size: 58px 58px, 58px 58px, 22px 22px;
  mask-image: linear-gradient(120deg, transparent, #000 28%, #000 68%, transparent);
  opacity: 0.16;
  animation: habitad-texture-drift 26s linear infinite;
}

.habitad-login-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.habitad-login-atmosphere span {
  position: absolute;
  width: 34rem;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.34;
  animation: habitad-float 13s ease-in-out infinite;
}

.habitad-login-atmosphere span:nth-child(1) {
  left: 9%;
  top: 12%;
  background: rgba(255, 211, 112, 0.42);
}

.habitad-login-atmosphere span:nth-child(2) {
  right: 8%;
  top: 18%;
  width: 28rem;
  background: rgba(116, 180, 72, 0.38);
  animation-delay: -4s;
}

.habitad-login-atmosphere span:nth-child(3) {
  left: 42%;
  bottom: -18%;
  width: 30rem;
  background: rgba(255, 255, 255, 0.18);
  animation-delay: -7s;
}

.habitad-login-stage {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  min-height: min(680px, calc(100vh - 4rem));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 460px);
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(12, 22, 13, 0.28);
  box-shadow: 0 34px 100px rgba(2, 7, 3, 0.38);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  overflow: hidden;
  animation: habitad-rise 680ms cubic-bezier(.2, .8, .2, 1) both;
}

.habitad-login-story {
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  color: #fff;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.22), transparent 24%),
    linear-gradient(145deg, rgba(14, 37, 18, 0.54), rgba(20, 45, 18, 0.2));
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.habitad-login-logo-picture {
  display: block;
  width: min(100%, 520px);
}

.habitad-login-full-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(60vh, 590px);
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.18));
}

.habitad-login-card {
  width: 100%;
  min-height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 3.3rem);
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 253, 246, 0.88));
  color: #132016;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.42);
}

.habitad-login-title {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #111917;
}

.habitad-login-brand {
  display: inline-flex;
  margin-bottom: 0.7rem;
  color: #5f7a16;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.habitad-login-copy {
  max-width: 34ch;
  margin: 0 0 2rem;
  color: #66736a;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 500;
}

.habitad-input-group {
  margin-bottom: 0.95rem;
}

.habitad-input-group .small {
  display: block;
  margin-top: 0.35rem;
  color: #b04438 !important;
}

.habitad-input,
.habitad-input:focus {
  width: 100%;
  height: 62px;
  border-radius: 18px;
  border: 1px solid rgba(21, 49, 22, 0.1);
  background: rgba(255, 255, 255, 0.78);
  color: #111827;
  outline: none;
  box-shadow: 0 16px 30px rgba(23, 33, 22, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.habitad-input {
  padding: 0 4.1rem 0 1.05rem;
  font-size: 0.93rem;
  font-weight: 750;
}

.habitad-input:hover {
  background: #fff;
}

.habitad-input:focus {
  border-color: rgba(89, 126, 27, 0.5);
  background: #fff;
  box-shadow: 0 0 0 5px rgba(150, 183, 67, 0.18), 0 18px 34px rgba(23, 33, 22, 0.08);
  transform: translateY(-1px);
}

.habitad-input::placeholder {
  color: #687568;
  opacity: 1;
}

.habitad-input:-webkit-autofill,
.habitad-input:-webkit-autofill:hover,
.habitad-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111827;
  caret-color: #111827;
  border-color: rgba(89, 126, 27, 0.45);
  box-shadow: 0 0 0 1000px #eef4e4 inset, 0 0 0 5px rgba(150, 183, 67, 0.16);
}

.habitad-input:-webkit-autofill::first-line {
  color: #111827;
}

.habitad-input:-webkit-autofill ~ .habitad-input-icon,
.habitad-input:-webkit-autofill ~ .habitad-password-toggle {
  color: #111827;
}

.habitad-input-group {
  position: relative;
}

.habitad-input-icon,
.habitad-password-toggle {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  color: #182019;
  transition: color 0.18s ease, transform 0.18s ease;
}

.habitad-input:focus ~ .habitad-input-icon,
.habitad-password-control:focus-within .habitad-password-toggle {
  color: #4d7b16;
  transform: translateY(-50%) scale(1.04);
}

.habitad-input-icon svg,
.habitad-password-toggle svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.habitad-password-control {
  position: relative;
}

.habitad-password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
}

.habitad-password-toggle.is-visible svg path:first-child {
  display: none;
}

.habitad-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  margin: 0.1rem 0 1.75rem;
  color: #445045;
  font-size: 0.86rem;
  font-weight: 700;
  user-select: none;
  cursor: pointer;
}

.habitad-remember input[type="hidden"] {
  display: none;
}

.habitad-remember input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  appearance: none;
  border: 1px solid rgba(21, 49, 22, 0.26);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.habitad-remember input[type="checkbox"]::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.habitad-remember input[type="checkbox"]:checked {
  background: #d6e66d;
  border-color: #d6e66d;
}

.habitad-remember input[type="checkbox"]:checked::after {
  opacity: 1;
}

.habitad-login-button {
  width: 100%;
  height: 62px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, #1e4816, #5f970f 54%, #c8de66);
  box-shadow: 0 18px 38px rgba(46, 93, 12, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.habitad-login-button::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-110%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transition: transform 0.65s ease;
}

.habitad-login-button:hover,
.habitad-login-button:focus {
  filter: brightness(1.03);
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(46, 93, 12, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.habitad-login-button:hover::before,
.habitad-login-button:focus::before {
  transform: translateX(110%);
}

.habitad-signup {
  margin-top: 0.7rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 600;
}

@keyframes habitad-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes habitad-cinematic-pan {
  0% {
    transform: scale(1.14) translate3d(-3.2%, -2.4%, 0);
    filter: saturate(1.18) contrast(1.05) brightness(1);
  }
  45% {
    transform: scale(1.2) translate3d(2.6%, -3.8%, 0);
    filter: saturate(1.28) contrast(1.1) brightness(1.06);
  }
  100% {
    transform: scale(1.17) translate3d(3.8%, 2.6%, 0);
    filter: saturate(1.22) contrast(1.08) brightness(1.03);
  }
}

@keyframes habitad-light-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.48;
  }
  100% {
    transform: translate3d(-9vw, 7vh, 0) scale(1.18);
    opacity: 0.86;
  }
}

@keyframes habitad-light-sweep {
  0%,
  100% {
    transform: translate3d(-18vw, -2vh, 0) rotate(-16deg);
    opacity: 0;
  }
  36%,
  62% {
    opacity: 0.72;
  }
  50% {
    transform: translate3d(48vw, 10vh, 0) rotate(-16deg);
  }
}

@keyframes habitad-ground-breathe {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate3d(8vw, -3vh, 0) scale(1.12);
    opacity: 0.8;
  }
}

@keyframes habitad-texture-drift {
  from {
    background-position: 0 0, 0 0, 0 0;
  }
  to {
    background-position: 58px 0, 0 58px, 44px 22px;
  }
}

@keyframes habitad-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, -22px, 0) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .habitad-login-page::before,
  .habitad-login-stage,
  .habitad-login-atmosphere span,
  .habitad-login-cinema span,
  .habitad-login-button::before {
    animation: none !important;
    transition: none !important;
  }
}

.habitad-signup span {
  color: #fff;
  font-weight: 800;
}

.habitad-validation ul {
  margin-bottom: 0;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.action-icon-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}

.action-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1;
}

.action-icon-svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 420px);
  gap: 2rem;
  align-items: center;
  padding: 2.25rem;
  border-radius: 34px;
  border: 1px solid var(--rg-border);
  background:
    radial-gradient(circle at top right, rgba(216, 234, 127, 0.38), transparent 28%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(241, 249, 235, 0.96));
  box-shadow: var(--rg-shadow-strong);
}

.hero-badge {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 143, 64, 0.1);
  color: var(--rg-primary-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin: 1rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  max-width: 14ch;
  color: var(--rg-ink);
}

.hero-copy {
  max-width: 60ch;
  color: var(--rg-muted);
  font-size: 1.02rem;
}

.hero-visual img {
  width: 100%;
  max-width: 400px;
  display: block;
  margin-left: auto;
  filter: drop-shadow(0 18px 30px rgba(11, 95, 43, 0.12));
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1.7rem 1.9rem;
  border-radius: 34px;
  border: 1px solid var(--rg-border);
  background:
    radial-gradient(circle at top right, rgba(216, 234, 127, 0.32), transparent 26%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.97), rgba(241, 249, 235, 0.94));
  box-shadow: var(--rg-shadow-strong);
}

.dashboard-hero-main {
  display: grid;
  gap: 1rem;
}

.dashboard-hero-title {
  margin: 0.35rem 0 0.45rem;
  max-width: none;
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  line-height: 0.98;
  white-space: nowrap;
  color: var(--rg-ink);
}

.dashboard-hero-copy {
  max-width: none;
  margin: 0;
  color: var(--rg-muted);
  white-space: nowrap;
}

.dashboard-hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-kpi-callout {
  min-height: 100%;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--rg-border);
  box-shadow: var(--rg-shadow);
}

.dashboard-kpi-footnote {
  margin-top: 0.45rem;
  color: var(--rg-muted);
  font-size: 0.88rem;
}

.dashboard-progress-group + .dashboard-progress-group {
  margin-top: 1rem;
}

.dashboard-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
  font-size: 0.94rem;
}

.dashboard-progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 143, 64, 0.12);
  overflow: hidden;
}

.dashboard-progress-track-moto {
  background: rgba(154, 205, 35, 0.2);
}

.dashboard-progress-track-soft {
  background: rgba(103, 115, 100, 0.14);
}

.dashboard-progress-track-accent {
  background: rgba(202, 221, 0, 0.22);
}

.dashboard-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rg-primary-deep), var(--rg-primary));
}

.dashboard-progress-fill-moto {
  background: linear-gradient(90deg, #80b51f, var(--rg-lime));
}

.dashboard-progress-fill-soft {
  background: linear-gradient(90deg, #77927e, #97ad9d);
}

.dashboard-progress-fill-accent {
  background: linear-gradient(90deg, #afc819, #d3e93f);
}

.dashboard-progress-caption {
  margin-top: 0.4rem;
  color: var(--rg-muted);
  font-size: 0.85rem;
}

.dashboard-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: end;
  min-height: 210px;
  margin-top: 0.5rem;
}

.dashboard-bars-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.2rem;
}

.dashboard-bar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.dashboard-bar-columns {
  width: 100%;
  height: 170px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.35rem;
}

.dashboard-bar {
  width: 14px;
  min-height: 10px;
  border-radius: 999px 999px 6px 6px;
}

.dashboard-bar-entry {
  background: linear-gradient(180deg, var(--rg-primary), var(--rg-primary-deep));
}

.dashboard-bar-exit {
  background: linear-gradient(180deg, var(--rg-lime), #7dad1e);
}

.dashboard-bar-label {
  font-size: 0.78rem;
  color: var(--rg-muted);
}

.dashboard-bar-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  color: var(--rg-muted);
  font-size: 0.85rem;
}

.dashboard-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.35rem;
}

.dashboard-legend-entry {
  background: var(--rg-primary);
}

.dashboard-legend-exit {
  background: var(--rg-lime);
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-detail-value {
  margin-top: 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--rg-ink);
}

.dashboard-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.module-hub,
.module-workspace {
  padding: 1.75rem;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 247, 0.92));
  border: 1px solid var(--rg-border);
  box-shadow: var(--rg-shadow);
}

.module-hub-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.35rem;
}

.module-eyebrow {
  display: inline-flex;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 143, 64, 0.1);
  color: var(--rg-primary-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-title {
  margin: 0.85rem 0 0.45rem;
  font-size: 2rem;
  line-height: 1.05;
  color: var(--rg-ink);
}

.module-copy {
  max-width: 68ch;
  margin: 0;
  color: var(--rg-muted);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.module-card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 27, 0.08);
  color: var(--rg-text);
  background: #fff;
  box-shadow: 0 20px 40px rgba(23, 23, 27, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.module-card:hover {
  color: var(--rg-text);
  transform: translateY(-3px);
  border-color: rgba(15, 143, 64, 0.26);
  box-shadow: 0 26px 54px rgba(23, 23, 27, 0.12);
}

.module-card-disabled {
  opacity: 0.52;
  pointer-events: none;
}

.module-card-media {
  display: block;
  height: 150px;
  overflow: hidden;
  background: #eef3ee;
}

.module-card-media img {
  width: 300%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.module-card-parking .module-card-media img {
  object-position: left center;
}

.module-card-common .module-card-media img {
  transform: translateX(-33.333%);
  object-position: center center;
}

.module-card-discipline .module-card-media img {
  transform: translateX(-66.666%);
  object-position: right center;
}

.module-card-communication .module-card-media img {
  width: 100%;
  object-position: center;
}

.module-card-body {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1.15rem;
}

.module-card-mark {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--rg-primary-deep-contrast);
  font-size: 1.35rem;
  font-weight: 900;
}

.module-card-parking .module-card-mark {
  background: var(--rg-primary-deep);
}

.module-card-common .module-card-mark {
  background: #345995;
}

.module-card-discipline .module-card-mark {
  background: #8a4f1d;
}

.module-card-kicker {
  color: var(--rg-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-card strong {
  font-size: 1.25rem;
  color: var(--rg-ink);
}

.module-card-body > span:not(.module-card-mark):not(.module-card-kicker):not(.module-card-action) {
  color: var(--rg-muted);
  line-height: 1.45;
}

.module-card-action {
  margin-top: auto;
  color: var(--rg-primary-deep);
  font-weight: 800;
}

.vehicle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.vehicle-badge-car {
  background: rgba(15, 143, 64, 0.12);
  color: var(--rg-primary-deep);
  border: 1px solid rgba(15, 143, 64, 0.18);
}

.vehicle-badge-moto {
  background: rgba(202, 221, 0, 0.2);
  color: #587d0c;
  border: 1px solid rgba(154, 205, 35, 0.28);
}

.complaint-admin-page {
  padding: 1.75rem;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 247, 0.92));
  border: 1px solid var(--rg-border);
  box-shadow: var(--rg-shadow);
}

.complaint-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.complaint-severity-low {
  background: rgba(25, 135, 84, 0.13);
  color: #126b42;
  border: 1px solid rgba(25, 135, 84, 0.18);
}

.complaint-severity-medium {
  background: rgba(202, 221, 0, 0.2);
  color: #637b0f;
  border: 1px solid rgba(154, 205, 35, 0.28);
}

.complaint-severity-high {
  background: rgba(255, 159, 67, 0.16);
  color: #935d0d;
  border: 1px solid rgba(255, 159, 67, 0.26);
}

.complaint-severity-critical {
  background: rgba(176, 68, 56, 0.14);
  color: var(--rg-danger);
  border: 1px solid rgba(176, 68, 56, 0.22);
}

.complaint-help-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.complaint-help-strip > div {
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--rg-border);
  background: rgba(255, 255, 255, 0.72);
}

.complaint-help-strip strong,
.complaint-help-strip span {
  display: block;
}

.complaint-help-strip span {
  margin-top: 0.25rem;
  color: var(--rg-muted);
}

.complaint-upload-summary {
  padding: 1rem;
  border: 1px solid var(--rg-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.complaint-evidence-preview,
.complaint-evidence-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}

.complaint-evidence-item,
.complaint-evidence-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--rg-border);
  border-radius: 8px;
  background: #fff;
}

.complaint-evidence-item img,
.complaint-evidence-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #eef3ee;
}

.complaint-evidence-item-body {
  min-width: 0;
}

.complaint-evidence-item-body strong,
.complaint-evidence-card span {
  display: block;
  overflow-wrap: anywhere;
}

.complaint-evidence-item-body span {
  color: var(--rg-muted);
  font-size: 0.85rem;
}

.complaint-evidence-item-error {
  border-color: rgba(176, 68, 56, 0.45);
}

.complaint-evidence-card {
  color: var(--rg-text);
}

.complaint-thread-card {
  padding: 0;
  overflow: hidden;
}

.complaint-thread-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.35rem 1rem;
  border-bottom: 1px solid var(--rg-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(243, 249, 246, 0.92));
}

.complaint-thread-subtitle {
  margin: 0;
  color: var(--rg-muted);
}

.complaint-thread-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--rg-primary-deep);
  background: rgba(15, 143, 64, 0.1);
  border: 1px solid rgba(15, 143, 64, 0.14);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.complaint-composer {
  margin: 1.25rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--rg-primary) 12%, transparent);
  box-shadow: 0 18px 46px rgba(28, 69, 45, 0.08);
}

.complaint-composer-input {
  min-height: 104px;
  border: 0;
  border-radius: 8px;
  background: rgba(244, 249, 244, 0.86);
  resize: vertical;
}

.complaint-composer-input:focus {
  background: #fff;
}

.complaint-composer-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.complaint-composer-actions .btn {
  margin-left: auto;
}

.complaint-internal-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.5rem 0.72rem 0.5rem 0.58rem;
  border-radius: 999px;
  background: rgba(246, 241, 226, 0.82);
  color: #6f5a25;
  border: 1px solid rgba(176, 143, 63, 0.2);
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.complaint-internal-toggle:hover {
  background: rgba(245, 234, 203, 0.9);
  border-color: rgba(176, 143, 63, 0.34);
}

.complaint-internal-toggle .form-check-input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  border-radius: 6px;
  border-color: rgba(111, 90, 37, 0.32);
  cursor: pointer;
}

.complaint-internal-toggle .form-check-input:checked {
  background-color: #8a6d24;
  border-color: #8a6d24;
}

.complaint-thread {
  display: grid;
  gap: 0.9rem;
  padding: 0 1.25rem 1.35rem;
}

.complaint-thread-empty {
  padding: 1.25rem;
  border-radius: 8px;
  color: var(--rg-muted);
  background: rgba(255, 255, 255, 0.74);
  border: 1px dashed var(--rg-border);
  text-align: center;
}

.complaint-thread-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: end;
  scroll-margin-top: 104px;
  outline: none;
}

.complaint-thread-own {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.complaint-thread-own .complaint-avatar {
  grid-column: 2;
  grid-row: 1;
  background: linear-gradient(145deg, var(--rg-primary), var(--rg-primary-deep));
  color: var(--rg-primary-contrast);
}

.complaint-thread-own .complaint-message {
  grid-column: 1;
  justify-self: end;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--rg-primary) 88%, #fff), var(--rg-primary-deep));
  color: var(--rg-primary-contrast);
  border-color: transparent;
}

.complaint-thread-own .complaint-message::before {
  left: auto;
  right: -7px;
  border-left: 8px solid var(--rg-primary-deep);
  border-right: 0;
}

.complaint-thread-own .complaint-message-meta span,
.complaint-thread-own .complaint-message-meta time {
  color: color-mix(in srgb, var(--rg-primary-contrast) 78%, transparent);
}

.complaint-thread-own .complaint-message p {
  color: var(--rg-primary-contrast);
}

.complaint-thread-internal .complaint-avatar {
  background: linear-gradient(145deg, #f7edcf, #ead9aa);
  color: #6f5a25;
}

.complaint-thread-internal .complaint-message {
  background:
    linear-gradient(145deg, #fffaf0, #f5ecd5);
  color: var(--rg-text);
  border: 1px solid rgba(176, 143, 63, 0.26);
  box-shadow: 0 14px 34px rgba(111, 90, 37, 0.1);
}

.complaint-thread-internal .complaint-message::before {
  border-right-color: #f5ecd5;
}

.complaint-thread-own.complaint-thread-internal .complaint-message::before {
  border-left-color: #f5ecd5;
}

.complaint-thread-internal .complaint-message-meta span,
.complaint-thread-internal .complaint-message-meta time {
  color: #7f704b;
}

.complaint-thread-internal .complaint-message p {
  color: var(--rg-text);
}

.complaint-avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #edf4ed, #dcebdd);
  color: var(--rg-primary-deep);
  font-weight: 900;
  font-size: 0.82rem;
  box-shadow: inset 0 0 0 1px rgba(15, 143, 64, 0.08);
}

.complaint-message {
  position: relative;
  width: min(100%, 660px);
  padding: 0.95rem 1rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--rg-border);
  box-shadow: 0 14px 36px rgba(28, 69, 45, 0.08);
}

.complaint-message::before {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 14px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #fff;
}

.complaint-message-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.complaint-message-meta strong,
.complaint-message-meta span {
  display: block;
}

.complaint-message-meta strong {
  color: inherit;
  font-size: 0.96rem;
}

.complaint-message-meta span,
.complaint-message-meta time {
  color: var(--rg-muted);
  font-size: 0.78rem;
}

.complaint-message p {
  margin: 0.65rem 0 0;
  color: var(--rg-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.complaint-message-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  background: rgba(246, 241, 226, 0.96);
  color: #6f5a25;
  border: 1px solid rgba(176, 143, 63, 0.22);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(52, 49, 34, 0.08);
}

.complaint-message-tag::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #8a6d24;
}

.complaint-thread-system {
  display: flex;
  justify-content: center;
  scroll-margin-top: 104px;
}

.complaint-system-chip {
  display: grid;
  gap: 0.25rem;
  max-width: min(100%, 520px);
  padding: 0.72rem 0.95rem;
  border-radius: 8px;
  background: rgba(235, 241, 235, 0.86);
  border: 1px solid var(--rg-border);
  color: var(--rg-muted);
  text-align: center;
}

.complaint-system-chip span {
  color: var(--rg-primary-deep);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.complaint-system-chip strong {
  color: var(--rg-text);
  font-size: 0.9rem;
}

.complaint-system-chip small {
  color: var(--rg-muted);
}

.complaint-thread-item.is-focused .complaint-message,
.complaint-thread-item.is-focused .complaint-system-chip {
  animation: complaint-focus-pulse 2.8s ease-out;
  border-color: color-mix(in srgb, var(--rg-lime) 70%, var(--rg-primary));
}

@keyframes complaint-focus-pulse {
  0% {
    transform: translateY(-2px);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--rg-lime) 54%, transparent), 0 18px 48px rgba(28, 69, 45, 0.18);
  }
  35% {
    transform: translateY(0);
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--rg-lime) 20%, transparent), 0 18px 48px rgba(28, 69, 45, 0.14);
  }
  100% {
    box-shadow: 0 0 0 0 transparent, 0 14px 36px rgba(28, 69, 45, 0.08);
  }
}

.branding-page {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.25rem;
  align-items: start;
}

.branding-editor,
.branding-preview {
  background: var(--rg-surface);
  border: 1px solid var(--rg-border);
  border-radius: 24px;
  box-shadow: var(--rg-shadow);
}

.branding-editor {
  padding: 1.5rem;
}

.branding-form {
  margin-top: 1.5rem;
}

.color-control {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 0.65rem;
}

.color-control .form-control-color {
  width: 58px;
  min-height: 49px;
  padding: 0.35rem;
}

.branding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.current-logo-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--rg-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--rg-lime) 18%, transparent), transparent 30%),
    rgba(255, 255, 255, 0.72);
}

.current-logo-frame {
  width: 118px;
  height: 88px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0.55rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(23, 23, 27, 0.08);
  box-shadow: 0 14px 28px rgba(23, 23, 27, 0.08);
}

.current-logo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.current-logo-initial {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 14px;
  box-shadow: none;
  font-size: 2.2rem;
  min-width: 0;
}

.current-logo-preview span {
  display: block;
  color: var(--rg-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.current-logo-preview strong {
  display: block;
  color: var(--rg-ink);
  font-size: 1.05rem;
  margin-top: 0.2rem;
}

.current-logo-preview p {
  margin: 0.25rem 0 0;
  color: var(--rg-muted);
  font-size: 0.88rem;
}

.branding-preview {
  --preview-primary: var(--rg-primary);
  --preview-secondary: var(--rg-lime);
  --preview-primary-text: var(--rg-primary-contrast);
  --preview-secondary-text: var(--rg-lime-contrast);
  --preview-secondary-surface: var(--rg-lime-surface);
  --preview-secondary-surface-text: var(--rg-lime-surface-text);
  padding: 1rem;
  position: sticky;
  top: 1.25rem;
}

.branding-preview-panel {
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  color: var(--preview-primary-text);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--preview-secondary) 34%, transparent), transparent 30%),
    linear-gradient(160deg, var(--preview-primary), color-mix(in srgb, var(--preview-primary) 65%, #000));
}

.branding-preview-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem;
}

.branding-preview-top img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 14px;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.94);
}

.branding-preview-initial {
  width: 74px;
  height: 74px;
  aspect-ratio: auto;
  flex: 0 0 auto;
  border-radius: 14px;
  box-shadow: none;
  font-size: 2rem;
}

.branding-preview-top span,
.branding-preview-content span {
  display: block;
  color: color-mix(in srgb, var(--preview-primary-text) 72%, transparent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.branding-preview-top strong {
  display: block;
  font-size: 1.05rem;
}

.branding-preview-content {
  margin: 4.5rem 1.15rem 1.15rem;
  padding: 1.15rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--preview-secondary-surface) 84%, transparent);
  border: 1px solid color-mix(in srgb, var(--preview-secondary) 22%, transparent);
  color: var(--preview-secondary-surface-text);
}

.branding-preview-content h3 {
  margin: 0.6rem 0;
  font-size: 1.45rem;
  font-weight: 800;
}

.branding-preview-content p {
  color: color-mix(in srgb, var(--preview-secondary-surface-text) 76%, transparent);
}

.branding-preview-content button {
  border: 0;
  border-radius: 14px;
  padding: 0.8rem 1rem;
  background: var(--preview-secondary);
  color: var(--preview-secondary-text);
  font-weight: 800;
}

.list-group-item {
  background: transparent;
}

@media (max-width: 991.98px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar-panel {
    width: min(340px, calc(100vw - 2rem));
    max-width: 100%;
    height: 100dvh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1060;
    padding: 1rem;
    border-radius: 0 28px 28px 0;
    box-shadow: 28px 0 70px rgba(3, 25, 11, 0.3);
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.24s cubic-bezier(.2, .8, .2, 1);
  }

  body.is-sidebar-open {
    overflow: hidden;
  }

  body.is-sidebar-open .sidebar-panel {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: block;
    background: rgba(8, 18, 11, 0.48);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  body.is-sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .brand-block {
    flex-direction: row;
    justify-content: flex-start;
    margin-bottom: 0.8rem;
    padding: 0.65rem;
    border-radius: 18px;
  }

  .brand-lockup,
  .brand-initial-mark {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 14px;
    font-size: 1.6rem;
    object-fit: contain;
  }

  .brand-copy {
    text-align: left;
  }

  .brand-kicker,
  .brand-subtitle {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .app-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.15rem;
    overflow: visible;
    padding-bottom: 1rem;
    margin-inline: 0;
  }

  .app-nav .nav-link {
    width: 100%;
    margin-bottom: 0;
    padding: 0.86rem 0.95rem;
    border-radius: 16px;
    white-space: normal;
    scroll-snap-align: none;
    font-size: 0.96rem;
  }

  .app-nav .nav-link:hover,
  .app-nav .nav-link.active {
    transform: none;
  }

  .nav-section-label {
    display: block;
    margin-top: 1rem;
  }

  .nav-link-with-badge {
    justify-content: space-between;
  }

  .content-panel {
    width: 100%;
    min-width: 0;
    padding: 1rem;
  }

  .topbar {
    align-items: flex-start;
    border-radius: 24px;
    padding: 1rem;
  }

  .topbar-actions {
    align-self: stretch;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .topbar-user {
    text-align: left !important;
  }

  .page-heading {
    font-size: 1.2rem;
  }

  .page-subheading {
    font-size: 0.9rem;
  }

  .main-stage {
    padding: 1rem 0;
  }

  .glass-card,
  .table-card,
  .module-hub,
  .module-workspace,
  .complaint-admin-page {
    border-radius: 20px;
    padding: 1.15rem;
  }

  .login-shell,
  .hero-card,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-detail-grid {
    grid-template-columns: 1fr;
  }

  .module-hub-header {
    display: block;
  }

  .user-module-grid {
    grid-template-columns: 1fr;
  }

  .complaint-help-strip {
    grid-template-columns: 1fr;
  }

  .complaint-thread-header,
  .complaint-composer-actions,
  .complaint-message-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .complaint-thread-count {
    min-width: 0;
  }

  .complaint-composer-actions .btn {
    width: 100%;
    margin-left: 0;
  }

  .complaint-thread-item,
  .complaint-thread-own {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .complaint-thread-own .complaint-avatar {
    grid-column: 1;
  }

  .complaint-thread-own .complaint-message {
    grid-column: 2;
    justify-self: stretch;
  }

  .complaint-thread-own .complaint-message::before {
    left: -7px;
    right: auto;
    border-left: 0;
    border-right: 8px solid var(--rg-primary-deep);
  }

  .complaint-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.72rem;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-card-media {
    height: 128px;
  }

  .module-card-body {
    min-height: 210px;
  }

  .branding-page {
    grid-template-columns: 1fr;
  }

  .branding-preview {
    position: static;
  }

  .settings-hero {
    align-items: flex-start;
  }

  .settings-pane-header {
    align-items: flex-start;
  }

  .table-responsive > .table {
    min-width: 820px;
  }

  .action-icon-group,
  td .d-inline-flex,
  td.text-end {
    white-space: nowrap;
  }

  .modal-dialog {
    margin: 0.75rem;
  }

  .login-brand-title,
  .hero-title,
  .dashboard-hero-title {
    max-width: none;
    white-space: normal;
  }

  .dashboard-hero-copy {
    white-space: normal;
  }

  .habitad-login-page {
    padding: 1.25rem;
    background-position: center;
  }

  .habitad-login-stage {
    grid-template-columns: 1fr;
    min-height: auto;
    width: min(620px, 100%);
  }

  .habitad-login-story {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .habitad-login-logo-picture { width: min(100%, 360px); }
  .habitad-login-full-logo { max-height: 42vh; }

  .habitad-login-card {
    min-height: auto;
  }
}

@media (max-width: 575.98px) {
  html {
    font-size: 14px;
  }

  body {
    background:
      radial-gradient(circle at top left, color-mix(in srgb, var(--rg-lime) 14%, transparent), transparent 22%),
      linear-gradient(145deg, #fbfdf8, #f1f8ec 100%);
  }

  .content-panel {
    padding: 0.7rem;
  }

  .sidebar-panel {
    width: min(320px, calc(100vw - 1rem));
    padding: 0.8rem;
    border-radius: 0 24px 24px 0;
  }

  .brand-block,
  .topbar-heading {
    display: flex;
  }

  .brand-block {
    gap: 0.65rem;
  }

  .topbar-logo,
  .login-card-logo {
    align-self: flex-start;
  }

  .topbar {
    gap: 0.85rem;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-heading {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .topbar-logo,
  .brand-initial-mark-sm {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    font-size: 1.45rem;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .topbar-actions form,
  .topbar-actions .logout-btn {
    width: 100%;
  }

  .topbar-user {
    width: 100%;
  }

  .app-toast-stack {
    top: auto;
    right: 0.7rem;
    bottom: 0.7rem;
    width: calc(100vw - 1.4rem);
  }

  .app-toast {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 0.85rem;
  }

  .app-toast-icon {
    width: 34px;
    height: 34px;
  }

  .module-hub,
  .module-workspace,
  .glass-card,
  .table-card,
  .complaint-admin-page,
  .receipt-panel {
    padding: 1rem;
    border-radius: 18px;
  }

  .module-title {
    font-size: 1.55rem;
  }

  .module-copy {
    font-size: 0.95rem;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-card-media {
    height: 116px;
  }

  .module-card-body {
    min-height: auto;
  }

  .stats-card {
    padding: 1rem;
    border-radius: 18px;
  }

  .stats-value {
    font-size: 1.55rem;
    overflow-wrap: anywhere;
  }

  .row > [class*="col-"] {
    min-width: 0;
  }

  .btn,
  .btn-lg {
    width: 100%;
    min-height: 46px;
    padding-inline: 0.85rem;
  }

  .mobile-menu-toggle {
    width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0;
  }

  .btn-sm {
    width: auto;
    min-height: 36px;
  }

  .d-flex.gap-2,
  .d-flex.flex-wrap.gap-2,
  .modal-footer {
    gap: 0.55rem !important;
  }

  .main-stage .d-flex.gap-2,
  .main-stage .d-flex.gap-3,
  .main-stage .d-flex.flex-wrap {
    flex-wrap: wrap;
  }

  .modal-footer .btn,
  .modal-footer form,
  .modal-footer form .btn {
    width: 100%;
  }

  .form-control,
  .form-select {
    min-height: 46px;
    padding: 0.72rem 0.85rem;
  }

  textarea.form-control {
    min-height: 96px;
  }

  dl.row dt,
  dl.row dd {
    width: 100%;
  }

  dl.row dd {
    margin-bottom: 0.7rem;
  }

  .table-responsive {
    margin-inline: -0.35rem;
    padding-inline: 0.35rem;
  }

  .table-responsive > .table {
    min-width: 920px;
  }

  .pagination {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }

  .brand-lockup {
    width: 58px;
    height: 58px;
  }

  .login-brand-logo {
    width: 220px;
  }

  .login-brand-panel,
  .login-card,
  .hero-card,
  .dashboard-hero {
    padding: 1.5rem;
    border-radius: 26px;
  }

  .habitad-login-card {
    padding: 2rem 1.35rem;
  }

  .habitad-login-title {
    font-size: 2rem;
  }

  .habitad-input,
  .habitad-login-button {
    height: 56px;
  }

  .habitad-login-story {
    min-height: 0;
    padding: 1.15rem;
  }

  .habitad-login-logo-picture { width: min(100%, 340px); }
  .habitad-login-full-logo { max-height: 36vh; }

  .settings-hero {
    flex-direction: column;
  }

  .settings-hero-icon {
    width: 78px;
    height: 78px;
  }

  .dashboard-bars {
    min-width: 520px;
    gap: 0.45rem;
  }

  .dashboard-bars-wrapper,
  .dashboard-bars-scroll {
    overflow-x: auto;
  }

  .dashboard-bar {
    width: 12px;
  }

  .current-logo-preview {
    align-items: flex-start;
  }

  .current-logo-frame {
    width: 88px;
    height: 72px;
  }

  .branding-preview-content {
    margin: 2rem 0.8rem 0.8rem;
  }

  .complaint-evidence-preview,
  .complaint-evidence-gallery {
    grid-template-columns: 1fr;
  }

  .complaint-evidence-item {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
  }

  .complaint-evidence-item img {
    aspect-ratio: 1;
  }

  .complaint-evidence-item .btn {
    grid-column: 1 / -1;
  }

  .complaint-thread-header {
    padding: 1rem;
  }

  .complaint-composer {
    margin: 1rem;
  }

  .complaint-thread {
    padding: 0 1rem 1rem;
  }

  .complaint-thread-item,
  .complaint-thread-own {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 0.55rem;
  }

  .complaint-avatar {
    width: 30px;
    height: 30px;
  }

  .complaint-message {
    padding: 0.8rem;
  }

  .complaint-message-meta time {
    margin-top: 0.2rem;
  }

  .complaint-system-chip {
    width: 100%;
  }

  .settings-pane {
    padding: 1rem;
    border-radius: 18px;
  }

  .settings-pane-header {
    gap: 0.75rem;
  }

  .settings-pane-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }
}

.communication-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 1rem;
  min-height: calc(100vh - 170px);
}

.communication-sidebar,
.communication-chat {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.16);
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(15, 64, 37, 0.08);
  overflow: hidden;
}

.communication-sidebar {
  display: flex;
  flex-direction: column;
}

.communication-panel-heading,
.communication-chat-header {
  padding: 1.35rem;
  border-bottom: 1px solid rgba(var(--brand-primary-rgb), 0.12);
}

.communication-panel-heading h2,
.communication-chat-header h2 {
  margin: 0.25rem 0;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.communication-panel-heading p,
.communication-chat-header p {
  margin: 0;
  color: var(--text-muted);
}

.communication-new-chat {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid rgba(var(--brand-primary-rgb), 0.1);
}

.communication-new-chat label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.communication-new-chat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.communication-new-chat input,
.communication-composer textarea {
  width: 100%;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.18);
  border-radius: 16px;
  background: #fbfdfb;
  color: var(--text-strong);
  padding: 0.8rem 0.95rem;
  outline: none;
}

.communication-new-chat input:focus,
.communication-composer textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb), 0.1);
}

.communication-stream-status {
  margin: 1rem 1.35rem 0;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  font-weight: 800;
  font-size: 0.78rem;
}

.communication-stream-status.connected {
  background: rgba(var(--brand-primary-rgb), 0.1);
  color: var(--brand-primary);
}

.communication-conversation-list {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem;
  overflow-y: auto;
}

.communication-conversation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  padding: 0.9rem;
  color: var(--text-strong);
}

.communication-conversation:hover,
.communication-conversation.active {
  border-color: rgba(var(--brand-primary-rgb), 0.18);
  background: rgba(var(--brand-primary-rgb), 0.08);
}

.communication-conversation strong,
.communication-conversation small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.communication-conversation small,
.communication-muted {
  color: var(--text-muted);
}

.communication-conversation-meta {
  text-align: right;
}

.communication-unread {
  display: inline-grid;
  min-width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-primary);
  color: var(--brand-primary-contrast);
  font-size: 0.75rem;
  font-weight: 800;
}

.communication-chat {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.communication-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.communication-provider-pill {
  border: 1px solid rgba(var(--brand-primary-rgb), 0.18);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  color: var(--brand-primary);
  font-weight: 800;
  white-space: nowrap;
}

.communication-alert {
  margin: 1rem 1.35rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 16px;
  background: #fff1f2;
  color: #9f1239;
  font-weight: 700;
}

.communication-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  min-height: 360px;
  color: var(--text-muted);
}

.communication-empty strong {
  color: var(--text-strong);
  font-size: 1.25rem;
}

.communication-message-list {
  min-height: 0;
  padding: 1.25rem;
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--brand-secondary-rgb), 0.08), transparent 32%),
    linear-gradient(180deg, rgba(var(--brand-primary-rgb), 0.03), transparent 45%);
}

.communication-message {
  display: flex;
  margin-bottom: 0.75rem;
}

.communication-message.outbound {
  justify-content: flex-end;
}

.communication-bubble {
  max-width: min(620px, 78%);
  padding: 0.85rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.14);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.communication-message.outbound .communication-bubble {
  background: var(--brand-primary);
  color: var(--brand-primary-contrast);
  border-color: transparent;
}

.communication-bubble p {
  margin: 0 0 0.35rem;
  white-space: pre-wrap;
}

.communication-bubble span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.communication-message.outbound .communication-bubble span {
  color: rgba(255, 255, 255, 0.78);
}

.communication-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(var(--brand-primary-rgb), 0.12);
}

@media (max-width: 900px) {
  .communication-shell {
    grid-template-columns: 1fr;
  }

  .communication-sidebar,
  .communication-chat {
    min-height: auto;
  }

  .communication-message-list {
    min-height: 460px;
  }
}

@media (max-width: 640px) {
  .communication-chat-header,
  .communication-composer {
    grid-template-columns: 1fr;
  }

  .communication-chat-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .communication-composer {
    display: flex;
    flex-direction: column;
  }

  .communication-composer .btn {
    width: 100%;
  }

  .communication-bubble {
    max-width: 92%;
  }
}

@media print {
  .sidebar-panel,
  .topbar,
  .btn,
  form {
    display: none !important;
  }

  body,
  .content-panel,
  .main-stage {
    background: #fff;
    padding: 0;
  }

  .receipt-panel {
    box-shadow: none;
    border: none;
  }
}

.app-confirmation-dialog {
  width: min(100% - 1rem, 28rem);
  margin-inline: auto;
}

.app-confirmation-content {
  overflow: hidden;
  border: 0;
  border-top: 5px solid var(--rg-primary);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(13, 47, 28, .24);
}

.app-confirmation-body {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.6rem 1.5rem 1.25rem;
}

.app-confirmation-mark {
  display: grid;
  width: 3.25rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(15, 143, 64, .16);
  border-radius: 50%;
  background: #edf7e9;
  color: var(--rg-primary-deep);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
}

.app-confirmation-copy {
  min-width: 0;
  padding-right: 1.4rem;
}

.app-confirmation-eyebrow {
  display: block;
  margin-bottom: .3rem;
  color: var(--rg-primary);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-confirmation-title {
  margin: 0;
  color: #17231b;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.app-confirmation-message {
  margin: .55rem 0 0;
  color: #526258;
  font-size: .94rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.app-confirmation-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.app-confirmation-footer {
  display: flex;
  gap: .65rem;
  padding: 0 1.5rem 1.5rem;
  border: 0;
}

.app-confirmation-footer .btn {
  min-height: 2.75rem;
  min-width: 7rem;
  border-radius: 8px;
  font-weight: 700;
}

.app-confirmation-content.is-danger {
  border-top-color: var(--rg-danger);
}

.app-confirmation-content.is-danger .app-confirmation-mark {
  border-color: rgba(176, 68, 56, .18);
  background: #fff0ee;
  color: var(--rg-danger);
}

.app-contextual-confirmation {
  border: 0;
  border-top: 5px solid var(--rg-primary);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(13, 47, 28, .24);
}

@media (max-width: 480px) {
  .app-confirmation-dialog {
    width: calc(100% - 1rem);
    margin: .5rem auto;
  }

  .app-confirmation-body {
    grid-template-columns: 2.7rem minmax(0, 1fr);
    gap: .8rem;
    padding: 1.4rem 1rem 1rem;
  }

  .app-confirmation-mark {
    width: 2.7rem;
    font-size: 1.4rem;
  }

  .app-confirmation-footer {
    flex-direction: column;
    padding: 0 1rem 1rem;
  }

  .app-confirmation-footer .btn {
    width: 100%;
  }
}

.bulk-import-page {
  display: grid;
  gap: 1.25rem;
}

.bulk-import-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.65rem 1.8rem;
  overflow: hidden;
  border: 1px solid var(--rg-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 20%, rgba(154, 205, 35, 0.2), transparent 28%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 233, 0.95));
  box-shadow: var(--rg-shadow);
}

.bulk-import-hero h2 {
  max-width: 21ch;
  margin: 0.75rem 0 0.5rem;
  color: var(--rg-ink);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.02;
}

.bulk-import-hero p {
  max-width: 74ch;
  margin: 0;
  color: var(--rg-muted);
}

.bulk-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1.25rem;
  align-items: stretch;
}

.bulk-import-upload-card,
.bulk-import-rules-card,
.bulk-import-progress-card,
.bulk-import-history,
.bulk-import-empty {
  border: 1px solid var(--rg-border);
  border-radius: 22px;
  background: var(--rg-surface);
  box-shadow: var(--rg-shadow);
}

.bulk-import-upload-card {
  padding: 1.45rem;
}

.bulk-import-card-heading,
.bulk-import-progress-heading,
.bulk-import-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bulk-import-card-heading {
  justify-content: flex-start;
}

.bulk-import-step-mark {
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--rg-primary-deep-contrast);
  background: linear-gradient(145deg, var(--rg-primary), var(--rg-primary-deep));
  font-weight: 900;
}

.bulk-import-kicker {
  color: var(--rg-primary-deep);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bulk-import-card-heading h3,
.bulk-import-rules-card h3,
.bulk-import-progress-heading h3,
.bulk-import-detail-heading h3,
.bulk-import-empty h3 {
  margin: 0.12rem 0 0;
  color: var(--rg-ink);
  font-size: 1.2rem;
}

.bulk-import-form {
  margin-top: 1.35rem;
}

.bulk-import-dropzone {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.1rem 0 0.7rem;
  padding: 1.25rem;
  border: 1.5px dashed color-mix(in srgb, var(--rg-primary) 46%, transparent);
  border-radius: 18px;
  background: rgba(244, 250, 241, 0.76);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.bulk-import-dropzone:hover {
  border-color: var(--rg-primary);
  background: rgba(238, 247, 231, 0.95);
  transform: translateY(-2px);
}

.bulk-import-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.bulk-import-drop-icon {
  min-width: 58px;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  color: var(--rg-primary-deep);
  background: rgba(15, 143, 64, 0.12);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.bulk-import-dropzone > span:last-of-type,
.bulk-import-file-note {
  color: var(--rg-muted);
  font-size: 0.84rem;
}

.bulk-import-file-note {
  overflow-wrap: anywhere;
}

.bulk-import-module-copy {
  margin: 0.85rem 0;
  color: var(--rg-muted);
  font-size: 0.86rem;
}

.bulk-import-modules {
  position: relative;
}

.bulk-import-module-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.bulk-import-module-panel[hidden],
.bulk-import-module-placeholder[hidden] {
  display: none;
}

.bulk-import-module-option {
  position: relative;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid var(--rg-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.bulk-import-module-option:has(input:checked) {
  border-color: rgba(15, 143, 64, 0.38);
  background: rgba(238, 247, 231, 0.95);
  box-shadow: 0 10px 24px rgba(13, 74, 34, 0.08);
}

.bulk-import-module-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.bulk-import-module-option input {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
}

.bulk-import-module-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--rg-primary-deep);
  background: rgba(15, 143, 64, 0.1);
  font-weight: 900;
}

.bulk-import-module-option strong,
.bulk-import-module-option small {
  display: block;
}

.bulk-import-module-option small,
.bulk-import-module-placeholder {
  color: var(--rg-muted);
  font-size: 0.75rem;
}

.bulk-import-module-placeholder {
  padding: 1.25rem;
  border: 1px dashed var(--rg-border);
  border-radius: 14px;
  text-align: center;
}

.bulk-import-rules-card {
  padding: 1.45rem;
  background:
    radial-gradient(circle at bottom right, rgba(154, 205, 35, 0.2), transparent 32%),
    linear-gradient(150deg, var(--rg-primary-deep), #0b6f31);
  color: #fff;
}

.bulk-import-rules-card .bulk-import-kicker,
.bulk-import-rules-card h3 {
  color: #fff;
}

.bulk-import-rules {
  display: grid;
  gap: 1rem;
  margin: 1.35rem 0;
  padding: 0;
  list-style: none;
}

.bulk-import-rules li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.bulk-import-rules li > span {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--rg-lime-soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.bulk-import-rules strong,
.bulk-import-rules small {
  display: block;
}

.bulk-import-rules small {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.bulk-import-warning {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.84rem;
  line-height: 1.45;
}

.bulk-import-warning strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #fff;
}

.bulk-import-progress-card,
.bulk-import-history {
  padding: 1.45rem;
}

.bulk-import-progress-heading p {
  margin: 0.2rem 0 0;
  color: var(--rg-muted);
  font-size: 0.84rem;
}

.bulk-status,
.bulk-item-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}

.bulk-status {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--rg-border);
  background: rgba(99, 115, 100, 0.09);
  color: var(--rg-muted);
  font-size: 0.76rem;
}

.bulk-status-queued,
.bulk-item-status-pending {
  background: rgba(99, 115, 100, 0.1);
  color: #5c6b5e;
}

.bulk-status-processing,
.bulk-item-status-processing {
  background: rgba(52, 89, 149, 0.1);
  color: #345995;
  border-color: rgba(52, 89, 149, 0.18);
}

.bulk-status-succeeded,
.bulk-item-status-succeeded {
  background: rgba(15, 143, 64, 0.12);
  color: var(--rg-primary-deep);
  border-color: rgba(15, 143, 64, 0.2);
}

.bulk-status-completedwitherrors,
.bulk-item-status-failed,
.bulk-status-failed {
  background: rgba(176, 68, 56, 0.12);
  color: var(--rg-danger);
  border-color: rgba(176, 68, 56, 0.2);
}

.bulk-import-overall {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin: 1.35rem 0;
}

.bulk-import-overall > div:first-child {
  display: grid;
}

.bulk-import-overall > div:first-child span {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--rg-primary-deep);
}

.bulk-import-overall small {
  margin-top: 0.3rem;
  color: var(--rg-muted);
}

.bulk-import-overall .progress,
.bulk-item-progress .progress {
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 143, 64, 0.1);
}

.bulk-import-overall .progress {
  height: 14px;
}

.bulk-import-overall .progress-bar,
.bulk-item-progress .progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rg-primary-deep), var(--rg-lime));
  transition: width 0.35s ease;
}

.bulk-import-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.bulk-import-stats > div {
  display: grid;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rg-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.bulk-import-stats strong {
  font-size: 1.4rem;
  color: var(--rg-ink);
}

.bulk-import-stats span {
  color: var(--rg-muted);
  font-size: 0.78rem;
}

.bulk-import-stats .bulk-stat-success strong {
  color: var(--rg-primary-deep);
}

.bulk-import-stats .bulk-stat-danger strong {
  color: var(--rg-danger);
}

.bulk-import-detail-heading {
  align-items: end;
  margin-top: 1.6rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--rg-border);
}

.bulk-import-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.bulk-import-filters button {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--rg-border);
  border-radius: 999px;
  background: #fff;
  color: var(--rg-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.bulk-import-filters button.active {
  border-color: rgba(15, 143, 64, 0.25);
  background: rgba(15, 143, 64, 0.1);
  color: var(--rg-primary-deep);
}

.bulk-import-table-wrap {
  margin-top: 1rem;
  border: 1px solid var(--rg-border);
  border-radius: 14px;
}

.bulk-import-retry-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(176, 143, 63, 0.24);
  border-radius: 14px;
  background: rgba(255, 248, 229, 0.9);
}

.bulk-import-retry-form div {
  display: grid;
  gap: 0.2rem;
}

.bulk-import-retry-form span {
  color: var(--rg-muted);
  font-size: 0.82rem;
}

.bulk-import-table {
  min-width: 880px;
  margin: 0;
}

.bulk-import-table thead th {
  color: var(--rg-muted);
  background: rgba(241, 247, 239, 0.92);
  border-bottom: 1px solid var(--rg-border);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bulk-import-table tbody td {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
}

.bulk-row-number,
.bulk-apartment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  background: rgba(15, 143, 64, 0.08);
  color: var(--rg-primary-deep);
  font-weight: 900;
}

.bulk-user-copy {
  display: grid;
  max-width: 290px;
}

.bulk-user-copy strong {
  color: var(--rg-ink);
}

.bulk-user-copy span,
.bulk-user-copy small,
.bulk-item-checks {
  color: var(--rg-muted);
  overflow-wrap: anywhere;
}

.bulk-user-copy small,
.bulk-item-checks {
  font-size: 0.74rem;
}

.bulk-item-progress {
  min-width: 190px;
}

.bulk-item-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  color: var(--rg-muted);
  font-size: 0.75rem;
}

.bulk-item-progress strong {
  color: var(--rg-primary-deep);
}

.bulk-item-progress .progress {
  height: 7px;
}

.bulk-item-status {
  padding: 0.32rem 0.58rem;
  font-size: 0.7rem;
}

.bulk-item-error {
  max-width: 320px;
  margin: 0.45rem 0 0;
  color: var(--rg-danger);
  font-size: 0.78rem;
  line-height: 1.35;
}

.bulk-item-checks {
  display: block;
  margin-top: 0.45rem;
}

.bulk-import-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 2rem;
  text-align: center;
}

.bulk-import-empty > span {
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: rgba(15, 143, 64, 0.1);
  color: var(--rg-primary-deep);
  font-weight: 900;
}

.bulk-import-empty p {
  max-width: 54ch;
  margin: 0.4rem 0 0;
  color: var(--rg-muted);
}

.bulk-import-history-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.bulk-import-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rg-border);
  border-radius: 14px;
  color: var(--rg-text);
  background: rgba(255, 255, 255, 0.72);
}

.bulk-import-history-item:hover,
.bulk-import-history-item.active {
  border-color: rgba(15, 143, 64, 0.28);
  background: #fff;
}

.bulk-import-history-item > div {
  display: grid;
  gap: 0.22rem;
}

.bulk-import-history-item > div:last-child {
  justify-items: end;
}

.bulk-import-history-item span,
.bulk-import-history-item small {
  color: var(--rg-muted);
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .bulk-import-hero,
  .bulk-import-progress-heading,
  .bulk-import-detail-heading {
    align-items: flex-start;
  }

  .bulk-import-grid {
    grid-template-columns: 1fr;
  }

  .bulk-import-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .bulk-import-hero,
  .bulk-import-progress-heading,
  .bulk-import-detail-heading,
  .bulk-import-history-item {
    flex-direction: column;
  }

  .bulk-import-hero .btn {
    width: 100%;
  }

  .bulk-import-overall {
    grid-template-columns: 1fr;
  }

  .bulk-import-history-item > div:last-child {
    justify-items: start;
  }

  .bulk-import-module-panel {
    grid-template-columns: 1fr;
  }

  .bulk-import-retry-form {
    align-items: stretch;
    flex-direction: column;
  }
}

.users-admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.users-admin-eyebrow {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--rg-primary);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.users-create-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.users-create-button span {
  font-size: 1.3rem;
  line-height: 1;
}

.users-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.users-stat-card,
.users-filter-card {
  border: 1px solid var(--rg-border);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(13, 74, 34, 0.08);
}

.users-stat-card {
  display: grid;
  gap: 0.25rem;
  padding: 1.15rem 1.25rem;
  border-radius: 20px;
}

.users-stat-card strong {
  color: var(--rg-primary-deep);
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1;
}

.users-stat-label {
  color: var(--rg-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.users-stat-card small {
  color: var(--rg-muted);
}

.users-filter-card {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border-radius: 22px;
}

.users-filter-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.users-filter-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.users-filter-heading p {
  margin: 0.25rem 0 0;
  color: var(--rg-muted);
  font-size: 0.9rem;
}

.users-filter-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) minmax(190px, 1fr) minmax(150px, 0.7fr) 110px 150px;
  gap: 0.85rem;
  align-items: end;
}

.users-filter-action {
  align-self: end;
}

.users-table-card {
  overflow: hidden;
  border-radius: 22px;
}

.users-table thead th {
  padding-top: 1rem;
  padding-bottom: 1rem;
  color: #526157;
  background: #f5f9f3;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.users-table tbody td {
  padding-top: 1rem;
  padding-bottom: 1rem;
  vertical-align: middle;
}

.users-table tbody tr {
  transition: background 0.16s ease;
}

.users-table tbody tr:hover {
  background: rgba(216, 234, 127, 0.11);
}

.users-person-cell {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 220px;
}

.users-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--rg-primary-contrast);
  background: linear-gradient(145deg, var(--rg-primary), var(--rg-primary-deep));
  font-weight: 900;
  box-shadow: 0 9px 18px rgba(11, 95, 43, 0.18);
}

.users-person-cell strong,
.users-person-cell small,
.users-location-cell strong,
.users-location-cell small {
  display: block;
}

.users-person-cell small,
.users-location-cell small {
  margin-top: 0.2rem;
  color: var(--rg-muted);
}

.users-location-cell {
  min-width: 190px;
}

.users-id {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.users-role {
  display: inline-flex;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(15, 110, 48, 0.13);
  border-radius: 999px;
  background: rgba(15, 143, 64, 0.07);
  color: var(--rg-primary-deep);
  font-size: 0.8rem;
  font-weight: 750;
}

.users-pending-invite {
  color: #8a5a12;
  font-size: 0.76rem;
}

.users-edit-button {
  min-width: 74px;
}

.users-empty-state {
  display: grid;
  justify-items: center;
  padding: 4rem 1.5rem;
  text-align: center;
}

.users-empty-state h2 {
  margin: 1rem 0 0.4rem;
  font-size: 1.25rem;
}

.users-empty-state p {
  margin: 0;
  color: var(--rg-muted);
}

.users-empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(15, 143, 64, 0.1);
  color: var(--rg-primary-deep);
  font-size: 1.7rem;
}

.users-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 0.5rem;
  color: var(--rg-muted);
}

.users-invitation-note,
.users-invitation-action {
  border: 1px solid rgba(15, 143, 64, 0.18);
  border-radius: 16px;
  background: rgba(216, 234, 127, 0.18);
}

.users-invitation-note {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
}

.users-invitation-note span {
  color: var(--rg-muted);
}

.users-invitation-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.users-invitation-action p {
  margin: 0.2rem 0 0;
  color: var(--rg-muted);
}

@media (max-width: 1100px) {
  .users-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .users-filter-action {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .users-admin-header,
  .users-filter-heading,
  .users-pagination-bar,
  .users-invitation-action {
    align-items: stretch;
    flex-direction: column;
  }

  .users-stats-grid,
  .users-filter-grid {
    grid-template-columns: 1fr;
  }

  .users-filter-action {
    grid-column: auto;
  }

  .users-create-button,
  .users-invitation-action .btn {
    width: 100%;
  }
}
