:root {
  --condo-bg: #f3f6fb;
  --condo-surface: #ffffff;
  --condo-text: #1f2937;
  --condo-muted: #6b7280;
  --condo-primary: #1f5fbf;
  --condo-primary-dark: #174987;
  --condo-accent: #0e9f8f;
  --condo-border: #e5e7eb;
  --condo-danger: #d92d20;
  --condo-warning: #f59e0b;
  --condo-success: #0f8f62;
  --condo-info: #2563eb;
  --condo-radius: 8px;
  --condo-shadow: 0 18px 45px rgba(15, 23, 42, .08);
  --condo-shadow-soft: 0 8px 24px rgba(15, 23, 42, .06);
}

/* Premium SaaS visual system refresh */
:root {
  --condo-bg: #f6f8fc;
  --condo-bg-soft: #eef3f8;
  --condo-surface: #ffffff;
  --condo-surface-2: #f9fbfd;
  --condo-text: #172033;
  --condo-muted: #667085;
  --condo-primary: #2563eb;
  --condo-primary-dark: #1d4ed8;
  --condo-accent: #0f766e;
  --condo-border: #dfe7f1;
  --condo-danger: #dc2626;
  --condo-warning: #d97706;
  --condo-success: #059669;
  --condo-info: #0284c7;
  --condo-shadow-sm: 0 8px 22px rgba(15, 23, 42, .06);
  --condo-shadow: 0 18px 44px rgba(15, 23, 42, .09);
  --condo-radius: 14px;
  --condo-radius-sm: 10px;
}

html,
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--condo-text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .08), transparent 30rem),
    linear-gradient(180deg, #fbfdff 0%, var(--condo-bg) 42%, #f8fafc 100%);
}

.app-shell .navbar {
  min-height: 64px;
  background: rgba(15, 23, 42, .94) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 2050;
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: 0;
}

.topbar-actions {
  gap: .35rem;
}

.language-switcher .btn {
  border-radius: 999px !important;
  min-width: 38px;
  font-weight: 700;
}

.shell-preferences {
  align-items: center;
  display: inline-flex;
  gap: .5rem;
  padding: .2rem .24rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(15, 23, 42, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.preference-group {
  align-items: center;
  display: inline-flex;
  gap: .24rem;
  padding: .14rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.preference-group + .preference-group {
  position: relative;
}

.preference-group + .preference-group::before {
  background: rgba(255, 255, 255, .18);
  border-radius: 999px;
  content: "";
  height: 24px;
  left: -.3rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
}

.preference-icon {
  align-items: center;
  color: rgba(255, 255, 255, .72);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  min-width: 26px;
  pointer-events: none;
}

.preference-option {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: rgba(255, 255, 255, .82) !important;
  display: inline-flex;
  font-weight: 800 !important;
  height: 32px;
  justify-content: center;
  min-width: 33px;
  padding: .2rem .48rem !important;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.preference-group > .btn:not(:first-child) {
  margin-left: 0;
}

.preference-option:hover {
  background: rgba(255, 255, 255, .14) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.preference-option.active {
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .18);
}

.text-size-small-option {
  font-size: .72rem !important;
}

.text-size-large-option {
  font-size: 1rem !important;
}

@media (max-width: 575.98px) {
  .app-shell .navbar {
    align-items: center;
    min-height: 64px;
  }

  .app-shell .navbar-brand {
    align-items: center;
    display: inline-flex;
    font-size: 0;
    max-width: none;
    overflow: visible;
    white-space: nowrap;
  }

  .app-shell .navbar-brand .mr-2 {
    margin-right: 0 !important;
  }

  .app-shell .navbar-brand {
    color: #fff !important;
  }

  .app-shell .navbar-brand i {
    color: #fff !important;
    font-size: 1rem;
  }

  .topbar-actions {
    flex-wrap: wrap;
    gap: .25rem;
    justify-content: flex-end;
  }

  .shell-preferences {
    gap: .25rem;
    padding: .12rem;
  }

  .preference-icon {
    display: none;
  }

  .preference-option {
    min-width: 29px;
    padding-left: .36rem !important;
    padding-right: .36rem !important;
  }
}

#wrapper {
  min-height: calc(100vh - 64px);
}

.sidebar {
  background: #111827 !important;
  border-right: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 16px 0 34px rgba(15, 23, 42, .08);
  padding-top: .65rem;
  overflow-x: hidden;
}

.sidebar .nav-item {
  margin: .12rem .45rem;
}

.sidebar .nav-item .nav-link {
  border-radius: 12px;
  box-sizing: border-box;
  color: rgba(226, 232, 240, .78) !important;
  font-weight: 600;
  max-width: 100%;
  transition: background .18s ease, color .18s ease;
}

.sidebar .nav-item .nav-link i {
  color: rgba(148, 163, 184, .95);
  width: 22px;
  text-align: center;
}

.sidebar .nav-item.active .nav-link,
.sidebar .nav-item .nav-link:hover {
  background: rgba(37, 99, 235, .16);
  color: #fff !important;
}

.sidebar .nav-item.active .nav-link i,
.sidebar .nav-item .nav-link:hover i {
  color: #bfdbfe;
}

#content-wrapper {
  padding: 1.5rem 1.65rem 6rem;
}

#content-wrapper > .container.card,
.container.card {
  max-width: none;
  width: 100%;
  border: 0;
  border-radius: var(--condo-radius);
  box-shadow: var(--condo-shadow-sm);
}

.module-header,
.admin-hero,
.card,
.modal-content,
.login-panel {
  border: 1px solid rgba(223, 231, 241, .95);
  border-radius: var(--condo-radius);
  box-shadow: var(--condo-shadow-sm);
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.92)),
    radial-gradient(circle at top right, rgba(37, 99, 235, .1), transparent 18rem);
}

.module-header h1,
.admin-hero h1,
.card h1,
.card h2,
.card h3 {
  letter-spacing: 0;
}

.module-header h1 {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: .2rem;
}

.module-header p {
  color: var(--condo-muted);
  margin: 0;
}

.module-actions,
.admin-hero-actions,
.card-body > .float-right,
.card-body > .float-left {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .35rem;
  color: var(--condo-primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.card {
  border: 1px solid var(--condo-border);
  border-radius: var(--condo-radius);
  background: rgba(255, 255, 255, .96);
  overflow: hidden;
}

.card-header {
  border-bottom: 1px solid var(--condo-border);
  background: linear-gradient(180deg, #fff, #f8fafc);
  color: #1f2937;
  font-weight: 800;
  letter-spacing: 0;
}

.card-footer {
  border-top: 1px solid var(--condo-border);
  background: #f8fafc;
}

.btn {
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none !important;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  border-color: var(--condo-primary);
  background: linear-gradient(180deg, #3b82f6, var(--condo-primary));
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--condo-primary-dark);
  background: linear-gradient(180deg, #2563eb, var(--condo-primary-dark));
}

.btn-danger {
  border-color: var(--condo-danger);
  background: linear-gradient(180deg, #ef4444, var(--condo-danger));
}

.btn-warning {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  color: #422006;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-success,
.btn-outline-light {
  background: rgba(255, 255, 255, .85);
}

.form-control,
.custom-select,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  min-height: 42px;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  color: var(--condo-text);
  background-color: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.form-control:focus,
.custom-select:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default .select2-selection--single:focus {
  border-color: rgba(37, 99, 235, .72);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
}

label {
  color: #344054;
  font-size: .88rem;
  font-weight: 750;
}

.form-text,
.text-muted {
  color: var(--condo-muted) !important;
}

.modal-content {
  border: 0;
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid var(--condo-border);
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.modal-title {
  font-weight: 800;
}

.modal-footer {
  border-top: 1px solid var(--condo-border);
  background: #f8fafc;
}

.alert {
  border: 0;
  border-radius: 12px;
  font-weight: 600;
}

.alert-info {
  background: #e0f2fe;
  color: #075985;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
}

.smart-table {
  border-radius: var(--condo-radius);
  border: 1px solid var(--condo-border);
  background: #fff;
  overflow: hidden;
}

.table {
  color: var(--condo-text);
}

.table thead th {
  border-top: 0;
  border-bottom: 1px solid var(--condo-border);
  background: #f8fafc;
  color: #475467;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.table td,
.table th {
  vertical-align: middle;
  border-color: #edf2f7;
}

.table tbody tr {
  transition: background .16s ease;
}

.table tbody tr:hover {
  background: #f9fbff;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}

.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: .25rem .62rem;
  font-size: .73rem;
  font-weight: 800;
  line-height: 1;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-approved,
.status-active,
.status-paid,
.status-received,
.status-resolved,
.status-completed { background: #dcfce7; color: #166534; }
.status-notified,
.status-info,
.status-in_process { background: #dbeafe; color: #1d4ed8; }
.status-rejected,
.status-refused,
.status-cancelled,
.status-overdue,
.status-danger { background: #fee2e2; color: #991b1b; }
.status-finished,
.status-inactive,
.status-logged_out { background: #e5e7eb; color: #374151; }

.empty-state {
  border: 1px dashed #cfd8e6;
  border-radius: var(--condo-radius);
  background: #f8fafc;
  color: var(--condo-muted);
  padding: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.page-link {
  border-color: var(--condo-border);
  color: var(--condo-primary);
  font-weight: 700;
}

.page-item.active .page-link {
  border-color: var(--condo-primary);
  background: var(--condo-primary);
}

.dropdown-menu {
  border: 1px solid var(--condo-border);
  border-radius: 12px;
  box-shadow: var(--condo-shadow);
  z-index: 2100;
}

.dropdown-item {
  font-weight: 650;
}

.admin-hero {
  background:
    linear-gradient(135deg, #0f172a, #1d4ed8 58%, #0f766e);
  color: #fff;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--condo-shadow);
}

.admin-hero p,
.admin-hero .eyebrow {
  color: rgba(255, 255, 255, .78);
}

.metric-card,
.quick-action,
.activity-item,
.summary-item,
.dashboard-card {
  border-radius: var(--condo-radius);
  box-shadow: var(--condo-shadow-sm);
}

.metric-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(223, 231, 241, .8);
  background: #fff;
}

.metric-card:hover,
.quick-action:hover,
.activity-item:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--condo-shadow);
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 16%, rgba(37, 99, 235, .18), transparent 24rem),
    radial-gradient(circle at 90% 14%, rgba(15, 118, 110, .18), transparent 22rem),
    linear-gradient(135deg, #eef4ff, #f8fafc 48%, #ecfdf5);
}

.login-shell {
  width: 100%;
  padding: 2rem 0;
}

.login-panel {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 32px 80px rgba(15, 23, 42, .18);
}

.login-brand {
  background:
    linear-gradient(160deg, rgba(15, 23, 42, .96), rgba(37, 99, 235, .88)),
    url("../images/signup-image.png") center/cover;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 1.25rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.Swal2-container {
  z-index: 3000;
}

.swal2-popup {
  border-radius: 18px !important;
  padding: 1.5rem !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24) !important;
}

.swal2-title {
  color: var(--condo-text) !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
}

.swal2-html-container {
  color: var(--condo-muted) !important;
  font-weight: 500 !important;
}

.swal2-confirm,
.swal2-cancel {
  border-radius: 10px !important;
  font-weight: 800 !important;
}

.module-footer {
  color: var(--condo-muted);
  font-weight: 700;
}

.finance-page {
  max-width: none;
  width: 100%;
}

.finance-page-shell {
  background: var(--condo-surface);
  border: 1px solid var(--condo-border);
  border-radius: var(--condo-radius);
  box-shadow: var(--condo-shadow-soft);
  padding: 1.25rem;
}

.finance-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.finance-title h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 850;
  line-height: 1.15;
}

.finance-title p {
  max-width: 42rem;
  margin: .35rem 0 0;
  color: var(--condo-muted);
}

.finance-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: .55rem;
  justify-content: end;
}

.finance-actions .btn {
  min-height: 40px;
  white-space: nowrap;
}

.finance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
}

.finance-kpi {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--condo-border);
  border-radius: var(--condo-radius);
  background: #fff;
  padding: 1rem 1.1rem;
  box-shadow: var(--condo-shadow-sm);
}

.finance-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--condo-primary);
}

.finance-kpi span,
.finance-kpi small {
  display: block;
  color: var(--condo-muted);
  font-weight: 750;
}

.finance-kpi span {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.finance-kpi strong {
  display: block;
  margin-top: .35rem;
  color: var(--condo-text);
  font-size: 1.45rem;
  line-height: 1.15;
}

.finance-kpi small {
  margin-top: .25rem;
  font-size: .82rem;
}

.finance-kpi.is-danger::before { background: var(--condo-danger); }
.finance-kpi.is-warning::before { background: var(--condo-warning); }
.finance-kpi.is-info::before { background: var(--condo-info); }
.finance-kpi.is-success::before { background: var(--condo-success); }

.finance-filter-card {
  border: 1px solid var(--condo-border);
  border-radius: var(--condo-radius);
  background: rgba(255, 255, 255, .92);
  padding: 1rem;
  box-shadow: var(--condo-shadow-sm);
}

.finance-filter-card .list-toolbar {
  margin-bottom: 0 !important;
}

.finance-filter-card .list-filter-form {
  align-items: end;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(135px, 1fr)) repeat(2, minmax(145px, .9fr)) auto;
  gap: .8rem;
}

.finance-filter-card .filter-field label {
  margin-bottom: .35rem;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.finance-filter-card .filter-actions,
.finance-filter-card .export-actions {
  display: flex;
  gap: .45rem;
}

.finance-filter-card .export-actions {
  justify-content: flex-end;
  margin-top: .85rem;
}

.finance-card .card-header {
  min-height: 48px;
}

.finance-collapse-toggle {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: 0;
  color: var(--condo-text);
  font: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.finance-collapse-toggle:hover,
.finance-collapse-toggle:focus {
  color: var(--condo-primary);
  outline: 0;
}

.finance-collapse-toggle i {
  color: var(--condo-muted);
  font-size: .78rem;
  transition: transform .18s ease, color .18s ease;
}

.finance-collapse-toggle[aria-expanded="true"] i {
  color: var(--condo-primary);
  transform: rotate(180deg);
}

.unit-balance-row {
  display: flex;
  justify-content: space-between;
  gap: .9rem;
  width: 100%;
  padding: .8rem .75rem;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.unit-balance-row:first-child {
  margin-top: -.35rem;
}

.unit-balance-row:last-child {
  border-bottom: 0;
  margin-bottom: -.35rem;
}

.unit-balance-row:hover,
.unit-balance-row:focus {
  background: #f8fbff;
  outline: 0;
}

.unit-balance-row:focus {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .18);
}

.unit-balance-row strong {
  font-size: .98rem;
}

.unit-balance-row .text-right strong {
  color: var(--condo-danger);
}

.unit-balance-modal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e5edf6;
  border-radius: 8px;
}

#modal_unit_balance .modal-dialog {
  width: calc(100% - 1.5rem);
  max-width: 980px;
}

.unit-balance-modal-summary span {
  color: var(--condo-muted);
  font-weight: 700;
}

.unit-balance-modal-summary strong {
  color: var(--condo-danger);
  font-size: 1.1rem;
}

.unit-balance-detail-table {
  min-width: 860px;
}

.unit-balance-detail-table th,
.unit-balance-detail-table td {
  overflow-wrap: normal;
  white-space: nowrap;
}

.unit-balance-detail-table th:first-child,
.unit-balance-detail-table td:first-child {
  min-width: 170px;
  white-space: normal;
}

.finance-table {
  margin-bottom: 0;
}

.finance-table td,
.finance-table th {
  padding: .75rem .8rem;
}

.finance-debt-table tbody tr:has(.status-overdue) {
  background: #fff7f7;
}

.finance-debt-table tbody tr:has(.status-partial) {
  background: #fffaf0;
}

.finance-debt-table tbody tr.pending-debt-detail {
  cursor: pointer;
}

.finance-debt-table tbody tr.pending-debt-detail:hover {
  background: #f8fbff;
}

.pending-debt-summary,
.pending-debt-meta {
  display: grid;
  gap: .75rem;
}

.pending-debt-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pending-debt-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pending-debt-summary div,
.pending-debt-meta div,
.observation-box {
  padding: .85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e5edf6;
  border-radius: 8px;
}

.pending-debt-summary span,
.pending-debt-meta span,
.detail-label {
  display: block;
  margin-bottom: .25rem;
  color: var(--condo-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pending-debt-summary strong,
.pending-debt-meta strong {
  color: var(--condo-text);
}

.pending-debt-summary strong.is-danger {
  color: var(--condo-danger);
}

.observation-box {
  min-height: 92px;
  white-space: pre-wrap;
}

.payment-check {
  width: 18px;
  height: 18px;
  accent-color: var(--condo-primary);
}

@media (max-width: 991.98px) {
  #content-wrapper {
    padding: 1rem .9rem 5rem;
  }

  .module-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-actions,
  .module-actions .btn {
    width: 100%;
  }

  .finance-header {
    grid-template-columns: 1fr;
  }

  .finance-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .finance-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-filter-card .list-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    width: min(218px, 82vw) !important;
    min-width: min(218px, 82vw) !important;
    z-index: 1020;
    overflow-y: auto;
    transform: translateX(0);
    transition: transform .22s ease, opacity .18s ease, visibility .18s ease;
  }

  .sidebar.toggled {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    opacity: 0;
    overflow: hidden !important;
    pointer-events: none;
    transform: translateX(-100%);
    visibility: hidden;
  }

  .sidebar.toggled .nav-item,
  .sidebar.toggled .nav-link,
  .sidebar.toggled span,
  .sidebar.toggled i {
    display: none !important;
  }

  .smart-table {
    border: 0;
    background: transparent;
  }

  .smart-table tr {
    box-shadow: var(--condo-shadow-sm);
  }

  .smart-table td {
    align-items: flex-start;
    padding: .85rem 1rem;
  }

  .smart-table td::before {
    flex: 0 0 42%;
    max-width: 42%;
  }

  .table-actions {
    justify-content: flex-end;
  }

  .table-actions .btn {
    width: 100%;
  }

  .finance-actions,
  .finance-kpi-grid,
  .finance-filter-card .list-filter-form {
    grid-template-columns: 1fr;
  }

  .pending-debt-summary,
  .pending-debt-meta {
    grid-template-columns: 1fr;
  }

  .finance-filter-card .filter-actions,
  .finance-filter-card .export-actions {
    flex-direction: column;
  }

  .login-shell {
    padding: 1rem 0;
  }
}

body {
  background: var(--condo-bg);
  color: var(--condo-text);
  font-size: .95rem;
  -webkit-font-smoothing: antialiased;
}

.navbar.bg-dark,
.sidebar {
  background: #111d31 !important;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: .01em;
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, .78) !important;
  border-left: 3px solid transparent;
  padding-top: .9rem;
  padding-bottom: .9rem;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.sidebar .nav-link i {
  width: 1.35rem;
  margin-right: .35rem;
  text-align: center;
}

.sidebar .nav-item.active .nav-link,
.sidebar .nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .08);
  border-left-color: var(--condo-accent);
}

#content-wrapper {
  width: 100%;
  padding-bottom: 2rem;
  min-height: calc(100vh - 56px);
}

.container-fluid {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

#content-wrapper > .container.card,
#content-wrapper > .container-fluid > .container.card,
.container.card {
  max-width: none;
  width: calc(100% - 2.5rem);
  margin: 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.container.card > .card-body {
  background: var(--condo-surface);
  border: 1px solid var(--condo-border);
  border-radius: var(--condo-radius);
  box-shadow: var(--condo-shadow-soft);
}

.card-body > .float-right,
.card-body > .float-left {
  float: none !important;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  margin: 0 0 1.25rem 0 !important;
}

.card-body > .float-left {
  justify-content: flex-start;
}

.card-body > div > h1,
.card-body > div > h2,
.card-body > div > h3,
.card-body > h1,
.card-body > h2,
.card-body > h3 {
  margin-bottom: 1rem;
  font-weight: 700;
  color: #111827;
}

.breadcrumb {
  background: transparent;
  padding-left: 0;
  margin-bottom: 1rem;
}

.card {
  border: 1px solid var(--condo-border);
  border-radius: var(--condo-radius);
  box-shadow: var(--condo-shadow-soft);
  overflow: hidden;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid var(--condo-border);
  font-weight: 700;
  color: #111827;
}

.dashboard-card {
  color: #fff;
  border: 0;
  overflow: hidden;
}

.dashboard-card .card-body {
  min-height: 128px;
}

.dashboard-card .metric {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.dashboard-card .label {
  display: block;
  margin-top: .45rem;
  color: rgba(255, 255, 255, .88);
}

.dashboard-card .card-footer {
  background: rgba(0, 0, 0, .12);
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.bg-condo-primary { background: linear-gradient(135deg, #2454a6, #193d7a); }
.bg-condo-teal { background: linear-gradient(135deg, #0f9f8f, #08756c); }
.bg-condo-gold { background: linear-gradient(135deg, #f59e0b, #b86d00); }
.bg-condo-slate { background: linear-gradient(135deg, #334155, #111827); }

.table-responsive {
  border-radius: var(--condo-radius);
  border: 1px solid var(--condo-border);
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
  overflow-x: visible;
}

.table {
  background: #fff;
  margin-bottom: 0;
}

.table td,
.table th {
  vertical-align: middle;
  border-color: #eef2f7;
  white-space: normal;
  overflow-wrap: anywhere;
}

.table thead th {
  border-top: 0;
  background: #f8fafc;
  color: #475569;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: normal;
  border-bottom: 1px solid var(--condo-border);
}

.crud-table {
  table-layout: fixed;
  width: 100%;
}

.crud-table td .btn,
.crud-table th .btn {
  white-space: normal;
}

.crud-table-wrapper {
  max-width: 100%;
}

.crud-table-wrapper .form-control[type="checkbox"],
.crud-table input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.form-row {
  row-gap: .75rem;
}

.modal .select2-container,
.card-body .select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  border-color: var(--condo-border);
  border-radius: 6px;
  min-height: 42px;
  display: flex;
  align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px;
}

.table tbody tr {
  transition: background-color .14s ease;
}

.table tbody tr:hover {
  background: #f8fbff;
}

.table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--condo-primary);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--condo-border);
  border-radius: 6px;
  padding: .35rem .55rem;
  background: #fff;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
  margin: .75rem 0 1rem;
  color: var(--condo-muted);
}

.dataTables_wrapper .dataTables_filter {
  text-align: right;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 0;
  white-space: nowrap;
}

.dataTables_wrapper .dataTables_length select {
  width: auto;
  min-width: 78px;
  display: inline-block;
}

.dataTables_wrapper .dataTables_filter input {
  width: min(260px, 52vw);
  display: inline-block;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  border: 1px solid transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--condo-primary) !important;
  color: #fff !important;
  border-color: var(--condo-primary) !important;
}

.btn {
  border-radius: 6px;
  font-weight: 600;
  box-shadow: none !important;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--condo-primary);
  border-color: var(--condo-primary);
}

.btn-primary:hover {
  background: var(--condo-primary-dark);
  border-color: var(--condo-primary-dark);
}

.btn-danger {
  background: var(--condo-danger);
  border-color: var(--condo-danger);
}

.btn-warning {
  background: var(--condo-warning);
  border-color: var(--condo-warning);
  color: #111827;
}

.btn-success {
  background: var(--condo-success);
  border-color: var(--condo-success);
}

.btn-outline-primary {
  color: var(--condo-primary);
  border-color: var(--condo-primary);
}

.btn-outline-primary:hover {
  background: var(--condo-primary);
  border-color: var(--condo-primary);
}

.form-control,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="time"] {
  border: 1px solid var(--condo-border);
  border-radius: 6px;
  min-height: 42px;
  color: var(--condo-text);
}

select:not(.custom-select) {
  display: block;
  width: 100% !important;
  max-width: 100%;
  padding: .375rem .75rem;
  background: #fff;
}

textarea.form-control,
textarea {
  min-height: 120px;
  resize: vertical;
}

.form-control:focus,
select:focus,
textarea:focus,
input:focus {
  border-color: rgba(31, 95, 191, .55);
  box-shadow: 0 0 0 .2rem rgba(31, 95, 191, .12);
  outline: 0;
}

label {
  font-weight: 600;
  color: #374151;
}

.input-group-text {
  background: #f8fafc;
  border-color: var(--condo-border);
}

.modal {
  background: rgba(17, 29, 49, .22);
}

body.app-shell .modal-backdrop {
  z-index: 2140;
}

body.app-shell .modal {
  z-index: 2150;
}

body.app-shell .tooltip {
  z-index: 2200;
}

.modal-dialog {
  margin: 4.75rem auto 1.5rem;
  max-width: 640px;
}

.modal-content {
  border: 0;
  border-radius: 10px;
  box-shadow: var(--condo-shadow);
  max-height: calc(100vh - 6.25rem);
  overflow: hidden;
}

.modal-header {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid var(--condo-border);
  padding: 1rem 1.25rem;
}

.modal-title {
  font-weight: 700;
  color: #111827;
}

.modal-body {
  padding: 1.25rem;
  max-height: calc(100vh - 275px);
  overflow-y: auto;
}

#modal_reset_password .modal-dialog {
  margin-top: 4.25rem;
}

#modal_reset_password .modal-content {
  max-height: calc(100vh - 5.75rem);
}

.modal-footer {
  border-top: 1px solid var(--condo-border);
  background: #fff;
  padding: 1rem 1.25rem;
  gap: .5rem;
}

.modal-footer .btn {
  min-width: 96px;
}

.close {
  color: #64748b;
  opacity: 1;
}

.alert {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}

.alert-danger {
  background: #fef2f2;
  color: #991b1b;
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
}

.alert-success {
  background: #ecfdf5;
  color: #047857;
}

.badge {
  border-radius: 999px;
  padding: .35rem .55rem;
}

.list-group {
  gap: .6rem;
}

.list-group-item {
  border: 1px solid var(--condo-border);
  border-radius: 8px !important;
  margin-bottom: .6rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.list-group-item-primary {
  background: #eff6ff;
  color: #1e3a8a;
}

.pagination {
  margin-top: 1rem;
  gap: .25rem;
}

.page-link {
  color: var(--condo-primary);
  border-color: var(--condo-border);
  border-radius: 6px;
}

.page-item.active .page-link {
  background: var(--condo-primary);
  border-color: var(--condo-primary);
}

.nounderline,
.nounderline:hover {
  text-decoration: none;
}

.rounded.btn-primary,
.rounded.btn-warning,
.rounded.btn-danger,
td .btn-primary.rounded,
td .btn-warning.rounded,
td .btn-danger.rounded {
  display: inline-flex;
  align-items: center;
  border-radius: 999px !important;
  padding: .25rem .65rem;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
}

td .btn-warning.rounded,
.rounded.btn-warning {
  color: #111827;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .25rem .65rem;
  font-size: .78rem;
  font-weight: 700;
}

.status-pending { background: #fff7ed; color: #9a3412; }
.status-paid,
.status-active,
.status-approved,
.status-resolved,
.status-received,
.status-completed,
.status-delivered,
.status-available,
.status-found,
.status-confirmed { background: #ecfdf5; color: #047857; }
.status-cancelled,
.status-rejected,
.status-overdue,
.status-finished,
.status-refused,
.status-unpaid,
.status-inactive,
.status-lost { background: #fef2f2; color: #b91c1c; }
.status-in_process,
.status-notified,
.status-sent,
.status-read,
.status-occupied { background: #eff6ff; color: #1d4ed8; }

.status-unconfirmed { background: #fff7ed; color: #9a3412; }
.status-unknown,
.status-unread { background: #f8fafc; color: #475569; }

.admin-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #16325c, #1f5fbf 58%, #0e9f8f);
  box-shadow: var(--condo-shadow-soft);
}

.admin-hero h1 {
  margin: .25rem 0 .4rem;
  font-weight: 800;
}

.admin-hero p {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 255, 255, .86);
}

.eyebrow {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .74);
}

.admin-hero-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metric-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 180px;
  padding: 1.2rem;
  border-radius: 10px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--condo-shadow-soft);
  transition: transform .16s ease, box-shadow .16s ease;
}

.metric-card:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--condo-shadow);
}

.metric-primary { background: linear-gradient(135deg, #2454a6, #193d7a); }
.metric-teal { background: linear-gradient(135deg, #0f9f8f, #08756c); }
.metric-gold { background: linear-gradient(135deg, #f59e0b, #b86d00); }
.metric-slate { background: linear-gradient(135deg, #334155, #111827); }
.metric-danger { background: linear-gradient(135deg, #d92d20, #8f1d16); }

.metric-icon {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .16);
}

.metric-value {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  margin-top: 1.7rem;
}

.metric-label,
.metric-note {
  display: block;
}

.metric-label {
  margin-top: .5rem;
  font-weight: 800;
}

.metric-note {
  margin-top: .25rem;
  color: rgba(255, 255, 255, .78);
  font-size: .85rem;
  display: -webkit-box;
  height: 2.55em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quick-action-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.quick-action,
.summary-item,
.activity-item {
  border: 1px solid var(--condo-border);
  border-radius: 8px;
  background: #fff;
}

.quick-action {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .5rem;
  padding: 1rem;
  color: var(--condo-text);
  text-decoration: none;
}

.quick-action:hover {
  color: var(--condo-primary);
  text-decoration: none;
  background: #f8fbff;
}

.quick-action i {
  color: var(--condo-primary);
  font-size: 1.15rem;
}

.summary-item {
  padding: 1rem;
}

.summary-item span,
.summary-item small {
  display: block;
  color: var(--condo-muted);
}

.summary-item strong {
  display: block;
  margin: .25rem 0;
  font-size: 1.55rem;
  color: #111827;
}

.financial-snapshot-card .card-header {
  min-height: 56px;
}

.financial-unit-panel {
  border: 1px solid var(--condo-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.financial-unit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--condo-border);
}

.financial-unit-panel-header h2 {
  margin: .15rem 0 0;
  font-size: 1rem;
  font-weight: 800;
}

.eyebrow-dark {
  color: var(--condo-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.financial-unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  color: var(--condo-text);
  text-decoration: none;
  border-bottom: 1px solid #edf2f7;
}

.financial-unit-row:last-child {
  border-bottom: 0;
}

.financial-unit-row:hover {
  color: var(--condo-text);
  text-decoration: none;
  background: #f8fbff;
}

.financial-unit-row strong,
.financial-unit-row small {
  display: block;
}

.financial-unit-row small {
  color: var(--condo-muted);
}

.financial-unit-row .text-right strong {
  color: var(--condo-danger);
}

.activity-list {
  display: grid;
  gap: .75rem;
}

.activity-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .85rem;
  color: var(--condo-text);
  text-decoration: none;
}

.activity-item:hover {
  background: #f8fbff;
  color: var(--condo-text);
  text-decoration: none;
}

.activity-item i {
  color: var(--condo-primary);
}

.activity-item strong,
.activity-item small {
  display: block;
}

.activity-item strong,
.clamp-3 {
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item small {
  color: var(--condo-muted);
}

.activity-item em {
  font-style: normal;
  white-space: nowrap;
}

.module-filter {
  padding: 1rem;
  border: 1px solid var(--condo-border);
  border-radius: var(--condo-radius);
  background: #f8fafc;
}

.lost-found-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.lost-found-card {
  background: #fff;
  border: 1px solid var(--condo-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--condo-shadow-soft);
}

.lost-found-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem;
  background: #f8fafc;
  padding: .35rem;
}

.detail-gallery {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.lost-found-thumb,
.lost-found-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  overflow: hidden;
  background: #e5e7eb;
}

.lost-found-thumb img,
.table-thumb-list img,
.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lost-found-placeholder {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  color: #94a3b8;
  font-size: 2rem;
}

.lost-found-body {
  padding: 1rem;
}

.lost-found-meta,
.lost-found-actions,
.image-admin-list {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
}

.lost-found-meta {
  color: var(--condo-muted);
  font-size: .85rem;
}

.lost-found-actions {
  margin-top: 1rem;
}

.image-admin-list {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--condo-border);
}

.table-thumb-list {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}

.table-thumb-list a {
  width: 44px;
  height: 44px;
  display: block;
  border-radius: 6px;
  overflow: hidden;
}

.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: .5rem;
  margin-top: .75rem;
}

.upload-preview img {
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  border: 1px solid var(--condo-border);
}

.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.language-switcher .btn {
  min-width: 42px;
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(22, 34, 56, .94), rgba(36, 84, 166, .82)),
    url("../images/bg-head-01.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
}

.login-shell {
  width: 100%;
}

.login-panel {
  overflow: hidden;
  border: 0;
}

.welcome-panel {
  max-width: 560px;
}

.login-brand {
  background: linear-gradient(160deg, #162238, #2454a6);
  color: #fff;
}

.login-brand .brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .14);
  margin-bottom: 1rem;
}

.brand-mark-soft {
  background: #eff6ff;
  color: var(--condo-primary);
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--condo-muted);
  background: #fff;
  border: 1px dashed var(--condo-border);
  border-radius: var(--condo-radius);
}

.profile-card {
  max-width: 980px;
  margin: 1.25rem auto;
}

.profile-photo {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--condo-shadow-soft);
}

.module-footer {
  padding: 1rem 1.25rem;
  color: var(--condo-muted);
  font-size: .85rem;
}

.legacy-note {
  color: var(--condo-muted);
  font-size: .9rem;
}

.visitor-hero {
  min-height: 420px;
  overflow: hidden;
}

.visitor-hero img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
}

.table-col-md {
  min-width: 200px;
}

.table-col-lg {
  min-width: 300px;
}

.admin-lost-found-table {
  overflow-x: visible;
}

.admin-lost-found-table table {
  table-layout: fixed;
  width: 100%;
}

.admin-lost-found-table th,
.admin-lost-found-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-lost-found-table .lf-col-subject { width: 18%; }
.admin-lost-found-table .lf-col-category { width: 12%; }
.admin-lost-found-table .lf-col-photos { width: 15%; }
.admin-lost-found-table .lf-col-message { width: 25%; }
.admin-lost-found-table .lf-col-date { width: 13%; }
.admin-lost-found-table .lf-col-replies { width: 8%; }
.admin-lost-found-table .lf-col-action { width: 9%; }

.admin-lost-found-table .table-thumb-list {
  max-width: 100%;
}

.admin-lost-found-table .btn {
  white-space: normal;
}

.package-table {
  overflow-x: visible;
}

.package-table table {
  table-layout: fixed;
  width: 100%;
}

.package-table th,
.package-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.package-table .pkg-col-room { width: 11%; }
.package-table .pkg-col-date { width: 17%; }
.package-table .pkg-col-name { width: 25%; }
.package-table .pkg-col-locker { width: 9%; }
.package-table .pkg-col-pin { width: 10%; }
.package-table .pkg-col-status { width: 14%; }
.package-table .pkg-col-action { width: 14%; }

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}

.gap-sm {
  gap: .5rem;
}

@media (max-width: 767.98px) {
  .container-fluid {
    padding-left: .85rem;
    padding-right: .85rem;
  }

  .navbar-brand {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-body {
    padding: 1rem;
  }

  #content-wrapper > .container.card,
  .container.card {
    width: calc(100% - 1rem);
    margin: .75rem .5rem;
  }

  .card-body > .float-right,
  .card-body > .float-left {
    justify-content: stretch;
  }

  .card-body > .float-right .btn,
  .card-body > .float-left .btn {
    flex: 1 1 auto;
  }

  .modal-dialog {
    margin: 4.25rem .75rem .75rem;
  }

  .modal-body {
    max-height: calc(100vh - 255px);
  }

  .modal-content {
    max-height: calc(100vh - 5rem);
  }

  .table td,
  .table th {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .smart-table {
    border: 0;
    box-shadow: none;
    overflow-x: visible;
  }

  .smart-table table,
  .package-table table,
  .admin-lost-found-table table,
  .smart-table thead,
  .package-table colgroup,
  .admin-lost-found-table colgroup,
  .smart-table tbody,
  .smart-table th,
  .smart-table td,
  .smart-table tr {
    display: block;
    width: 100%;
  }

  .smart-table thead {
    display: none;
  }

  .smart-table tr {
    margin-bottom: .75rem;
    border: 1px solid var(--condo-border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .smart-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 0;
    border-bottom: 1px solid #eef2f7;
  }

  .smart-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #475569;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-hero-actions,
  .admin-hero-actions .btn {
    width: 100%;
  }

  .quick-action-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .activity-item {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .activity-item em {
    grid-column: 2;
  }

  .dashboard-card .metric {
    font-size: 1.65rem;
  }

  .login-page {
    align-items: stretch;
  }
}

/* Final polish layer: keep this at the end so legacy Bootstrap/SB Admin rules cannot win. */
body.app-shell,
body.login-page,
body.manual-public-page {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  color: var(--condo-text) !important;
  background:
    radial-gradient(circle at 0 0, rgba(37, 99, 235, .09), transparent 26rem),
    radial-gradient(circle at 100% 10%, rgba(15, 118, 110, .08), transparent 24rem),
    #f6f8fc !important;
}

body.app-shell .navbar {
  min-height: 64px;
  background: rgba(15, 23, 42, .96) !important;
  position: relative;
  z-index: 2050;
}

body.app-shell .navbar .dropdown-menu {
  z-index: 2100;
}

body.manual-public-page .manual-public-nav {
  min-height: 64px;
  background: rgba(15, 23, 42, .96) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
}

body.manual-public-page #content-wrapper {
  padding: 1.5rem 1.65rem 6rem !important;
}

body.manual-public-page .manual-shell {
  max-width: 1440px;
  margin: 0 auto;
}

body.manual-public-page .module-footer {
  margin-top: 0;
}

body.app-shell .sidebar {
  background: #111827 !important;
  flex: 0 0 225px !important;
  overflow-x: hidden !important;
  padding-left: .2rem !important;
  padding-right: .2rem !important;
  scrollbar-color: rgba(148, 163, 184, .42) transparent;
  scrollbar-width: thin;
}

body.app-shell .sidebar.toggled {
  flex-basis: 90px !important;
}

body.app-shell .shell-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: calc(100vh - 64px);
  min-width: 0;
}

body.app-shell .shell-content > #content-wrapper {
  flex: 1 1 auto;
  width: 100%;
}

body.app-shell .shell-content > .module-footer {
  flex: 0 0 auto;
  margin-top: auto;
}

body.app-shell .sidebar .nav-item {
  margin: .08rem .35rem !important;
}

body.app-shell .sidebar .nav-item .nav-link {
  align-items: center !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  color: rgba(226, 232, 240, .82) !important;
  display: flex !important;
  gap: .15rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  max-width: 100% !important;
  min-height: 40px !important;
  padding-bottom: .55rem !important;
  padding-top: .55rem !important;
  transform: none !important;
}

body.app-shell .sidebar .nav-item .nav-link i {
  flex: 0 0 24px;
  margin-right: .35rem;
  text-align: center;
}

body.app-shell .sidebar .nav-item .nav-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.app-shell #li_visitorLogIn,
body.app-shell #li_payments,
body.app-shell #li_announcement,
body.app-shell #li_documents,
body.app-shell #ui_lostfound,
body.app-shell #ui_events {
  border-top: 1px solid rgba(148, 163, 184, .16);
  margin-top: .55rem !important;
  padding-top: .45rem;
}

body.app-shell .sidebar .nav-item.active .nav-link,
body.app-shell .sidebar .nav-item .nav-link:hover {
  background: rgba(37, 99, 235, .18) !important;
  color: #fff !important;
}

body.app-shell #content-wrapper {
  padding: 1.5rem 1.65rem 6rem !important;
}

body.app-shell .card,
body.app-shell .modal-content,
body.login-page .login-panel {
  border: 1px solid #dfe7f1 !important;
  border-radius: 14px !important;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .08) !important;
}

body.app-shell .card-header,
body.app-shell .modal-header,
body.app-shell .modal-footer,
body.app-shell .card-footer {
  border-color: #dfe7f1 !important;
  background: linear-gradient(180deg, #fff, #f8fafc) !important;
}

body.app-shell .btn,
body.login-page .btn {
  border-radius: 10px !important;
  font-weight: 800 !important;
}

body.app-shell .form-control,
body.app-shell .custom-select,
body.login-page .form-control,
body.app-shell .select2-container--default .select2-selection--single,
body.app-shell .select2-container--default .select2-selection--multiple {
  min-height: 42px !important;
  border-color: #cfd8e6 !important;
  border-radius: 10px !important;
}

body.app-shell .form-control:focus,
body.login-page .form-control:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .13) !important;
}

body.app-shell .table thead th {
  background: #f8fafc !important;
  color: #475467 !important;
  font-size: .74rem !important;
  font-weight: 800 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

body.app-shell .table td,
body.app-shell .table th {
  border-color: #edf2f7 !important;
}

body.app-shell .status-badge,
body.app-shell .badge {
  border-radius: 999px !important;
  padding: .28rem .65rem !important;
  font-size: .73rem !important;
  font-weight: 800 !important;
}

body.app-shell .empty-state {
  border: 1px dashed #cfd8e6 !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
}

html.density-comfortable body.app-shell #content-wrapper,
body.density-comfortable.app-shell #content-wrapper {
  padding: 2rem 2.1rem 6rem !important;
}

html.density-compact body.app-shell #content-wrapper,
body.density-compact.app-shell #content-wrapper {
  padding: .9rem 1rem 5rem !important;
}

html.density-compact body.app-shell #wrapper > .container.card,
html.density-compact body.app-shell #wrapper > .container-fluid,
body.density-compact.app-shell #wrapper > .container.card,
body.density-compact.app-shell #wrapper > .container-fluid {
  margin-bottom: .75rem !important;
}

html.density-comfortable body.app-shell #wrapper > .container.card,
html.density-comfortable body.app-shell #wrapper > .container-fluid,
body.density-comfortable.app-shell #wrapper > .container.card,
body.density-comfortable.app-shell #wrapper > .container-fluid {
  margin-bottom: 1.4rem !important;
}

html.density-comfortable body.app-shell .sidebar .nav-item .nav-link,
body.density-comfortable.app-shell .sidebar .nav-item .nav-link {
  min-height: 46px !important;
  padding-bottom: .7rem !important;
  padding-top: .7rem !important;
}

html.density-compact body.app-shell .sidebar,
body.density-compact.app-shell .sidebar {
  flex-basis: 190px !important;
  width: 190px;
}

html.density-compact body.app-shell .sidebar.toggled,
body.density-compact.app-shell .sidebar.toggled {
  flex-basis: 90px !important;
}

html.density-compact body.app-shell .sidebar .nav-item,
body.density-compact.app-shell .sidebar .nav-item {
  margin: .04rem .22rem !important;
}

html.density-compact body.app-shell .sidebar .nav-item .nav-link,
body.density-compact.app-shell .sidebar .nav-item .nav-link {
  border-radius: 8px !important;
  font-size: .84rem !important;
  min-height: 34px !important;
  padding: .42rem .55rem !important;
}

html.density-compact body.app-shell .sidebar .nav-item .nav-link i,
body.density-compact.app-shell .sidebar .nav-item .nav-link i {
  flex-basis: 20px;
  margin-right: .22rem;
}

html.density-compact body.app-shell .card,
html.density-compact body.app-shell .modal-content,
body.density-compact.app-shell .card,
body.density-compact.app-shell .modal-content {
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .07) !important;
}

html.density-compact body.app-shell .card-body,
body.density-compact.app-shell .card-body {
  padding: .85rem !important;
}

html.density-comfortable body.app-shell .card-body,
body.density-comfortable.app-shell .card-body {
  padding: 1.55rem !important;
}

html.density-compact body.app-shell .card-header,
html.density-compact body.app-shell .card-footer,
html.density-compact body.app-shell .modal-header,
html.density-compact body.app-shell .modal-footer,
body.density-compact.app-shell .card-header,
body.density-compact.app-shell .card-footer,
body.density-compact.app-shell .modal-header,
body.density-compact.app-shell .modal-footer {
  padding: .65rem .85rem !important;
}

html.density-compact body.app-shell .table td,
html.density-compact body.app-shell .table th,
body.density-compact.app-shell .table td,
body.density-compact.app-shell .table th {
  font-size: .82rem !important;
  padding: .42rem .5rem !important;
}

html.density-comfortable body.app-shell .table td,
html.density-comfortable body.app-shell .table th,
body.density-comfortable.app-shell .table td,
body.density-comfortable.app-shell .table th {
  padding: .9rem .95rem !important;
}

html.density-compact body.app-shell .btn,
body.density-compact.app-shell .btn {
  font-size: .82rem !important;
  padding: .34rem .58rem !important;
}

html.density-compact body.app-shell .form-control,
html.density-compact body.app-shell .custom-select,
html.density-compact body.app-shell .select2-container--default .select2-selection--single,
html.density-compact body.app-shell .select2-container--default .select2-selection--multiple,
body.density-compact.app-shell .form-control,
body.density-compact.app-shell .custom-select,
body.density-compact.app-shell .select2-container--default .select2-selection--single,
body.density-compact.app-shell .select2-container--default .select2-selection--multiple {
  font-size: .86rem !important;
  min-height: 34px !important;
}

html.density-compact body.app-shell .module-header,
html.density-compact body.app-shell .admin-hero,
body.density-compact.app-shell .module-header,
body.density-compact.app-shell .admin-hero {
  padding: 1rem !important;
}

html.density-compact body.app-shell .module-header h1,
html.density-compact body.app-shell .admin-hero h1,
body.density-compact.app-shell .module-header h1,
body.density-compact.app-shell .admin-hero h1 {
  font-size: 1.45rem !important;
}

html.text-size-small body.app-shell,
body.text-size-small.app-shell {
  font-size: .9rem;
}

html.text-size-large body.app-shell,
body.text-size-large.app-shell {
  font-size: 1.05rem;
}

html.text-size-small body.app-shell .sidebar .nav-item .nav-link,
html.text-size-small body.app-shell .sidebar .nav-item .nav-link span,
body.text-size-small.app-shell .sidebar .nav-item .nav-link,
body.text-size-small.app-shell .sidebar .nav-item .nav-link span {
  font-size: .78rem !important;
}

html.text-size-large body.app-shell .sidebar .nav-item .nav-link,
html.text-size-large body.app-shell .sidebar .nav-item .nav-link span,
body.text-size-large.app-shell .sidebar .nav-item .nav-link,
body.text-size-large.app-shell .sidebar .nav-item .nav-link span {
  font-size: .96rem !important;
}

html.text-size-small body.app-shell .table td,
html.text-size-small body.app-shell .table th,
body.text-size-small.app-shell .table td,
body.text-size-small.app-shell .table th {
  font-size: .75rem !important;
}

html.text-size-large body.app-shell .table td,
html.text-size-large body.app-shell .table th,
body.text-size-large.app-shell .table td,
body.text-size-large.app-shell .table th {
  font-size: .94rem !important;
}

html.text-size-small body.app-shell .btn,
body.text-size-small.app-shell .btn {
  font-size: .78rem !important;
}

html.text-size-large body.app-shell .btn,
body.text-size-large.app-shell .btn {
  font-size: .94rem !important;
}

html.text-size-small body.app-shell .form-control,
html.text-size-small body.app-shell .custom-select,
html.text-size-small body.app-shell .select2-container--default .select2-selection--single,
html.text-size-small body.app-shell .select2-container--default .select2-selection--multiple,
body.text-size-small.app-shell .form-control,
body.text-size-small.app-shell .custom-select,
body.text-size-small.app-shell .select2-container--default .select2-selection--single,
body.text-size-small.app-shell .select2-container--default .select2-selection--multiple {
  font-size: .8rem !important;
}

html.text-size-large body.app-shell .form-control,
html.text-size-large body.app-shell .custom-select,
html.text-size-large body.app-shell .select2-container--default .select2-selection--single,
html.text-size-large body.app-shell .select2-container--default .select2-selection--multiple,
body.text-size-large.app-shell .form-control,
body.text-size-large.app-shell .custom-select,
body.text-size-large.app-shell .select2-container--default .select2-selection--single,
body.text-size-large.app-shell .select2-container--default .select2-selection--multiple {
  font-size: .98rem !important;
}

html.text-size-small body.app-shell .module-header h1,
html.text-size-small body.app-shell .admin-hero h1,
body.text-size-small.app-shell .module-header h1,
body.text-size-small.app-shell .admin-hero h1 {
  font-size: 1.35rem !important;
}

html.text-size-large body.app-shell .module-header h1,
html.text-size-large body.app-shell .admin-hero h1,
body.text-size-large.app-shell .module-header h1,
body.text-size-large.app-shell .admin-hero h1 {
  font-size: 1.9rem !important;
}

html.density-compact.text-size-small body.app-shell .module-header h1,
html.density-compact.text-size-small body.app-shell .admin-hero h1,
body.density-compact.text-size-small.app-shell .module-header h1,
body.density-compact.text-size-small.app-shell .admin-hero h1 {
  font-size: 1.25rem !important;
}

html.density-compact.text-size-large body.app-shell .module-header h1,
html.density-compact.text-size-large body.app-shell .admin-hero h1,
body.density-compact.text-size-large.app-shell .module-header h1,
body.density-compact.text-size-large.app-shell .admin-hero h1 {
  font-size: 1.65rem !important;
}

body.app-shell .footer-brand-link {
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  flex-wrap: wrap;
  text-decoration: none;
}

body.app-shell .footer-brand-link:hover {
  color: inherit;
  text-decoration: none;
  opacity: .86;
}

body.app-shell .list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  clear: both;
  padding-top: .85rem;
}

body.app-shell .list-filter-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: .85rem;
  align-items: end;
}

body.app-shell .filter-field {
  grid-column: span 2;
  min-width: 0;
}

body.app-shell .filter-search {
  grid-column: span 3;
}

body.app-shell .filter-field label {
  display: block;
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
  margin-bottom: .28rem;
  text-transform: uppercase;
}

body.app-shell .filter-actions,
body.app-shell .export-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  align-items: center;
}

body.app-shell .filter-actions {
  grid-column: span 3;
}

body.app-shell .export-actions {
  justify-content: flex-end;
}

@media (max-width: 1199.98px) {
  body.app-shell .list-toolbar {
    grid-template-columns: 1fr;
  }

  body.app-shell .export-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  body.app-shell .module-footer,
  body.app-shell.sidebar-toggled .module-footer {
    margin-left: 0 !important;
    width: 100% !important;
  }

  body.app-shell .sidebar {
    flex-basis: min(218px, 82vw) !important;
    left: 0 !important;
    width: min(218px, 82vw) !important;
    min-width: min(218px, 82vw) !important;
    padding-left: .35rem !important;
    padding-right: .35rem !important;
  }

  body.app-shell .sidebar .nav-item {
    margin-left: .22rem !important;
    margin-right: .22rem !important;
  }

  body.app-shell .sidebar .nav-item .nav-link {
    padding: .72rem .78rem !important;
    font-size: .86rem !important;
  }

  body.app-shell .sidebar .nav-item .nav-link i {
    width: 18px !important;
    margin-right: .35rem !important;
  }

  body.app-shell .sidebar.toggled {
    flex-basis: 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    transform: translateX(-100%) !important;
    visibility: hidden !important;
  }

  body.app-shell .sidebar.toggled .nav-item,
  body.app-shell .sidebar.toggled .nav-link,
  body.app-shell .sidebar.toggled span,
  body.app-shell .sidebar.toggled i {
    display: none !important;
  }

  body.app-shell.sidebar-toggled #wrapper {
    display: block !important;
  }

  body.app-shell #content-wrapper {
    padding: 1rem .9rem 5rem !important;
  }

  body.app-shell .smart-table {
    border: 0 !important;
    background: transparent !important;
    overflow-x: visible !important;
  }

  body.app-shell .smart-table tr {
    border-radius: 14px !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .08) !important;
  }

  body.app-shell .list-filter-form {
    grid-template-columns: 1fr;
  }

  body.app-shell .filter-field,
  body.app-shell .filter-search,
  body.app-shell .filter-actions {
    grid-column: 1;
  }

body.app-shell .filter-actions .btn,
  body.app-shell .export-actions .btn {
    flex: 1 1 140px;
  }
}

.manual-wrapper {
  width: 100%;
}

.manual-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 1.25rem;
  width: 100%;
}

.manual-toc,
.manual-reader {
  background: rgba(255, 255, 255, .92);
  border: 1px solid #dfe7f1;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}

.manual-toc {
  align-self: start;
  max-height: calc(100vh - 105px);
  overflow-y: auto;
  padding: 1rem;
  position: sticky;
  top: 82px;
}

.manual-toc-header {
  border-bottom: 1px solid #edf2f7;
  margin-bottom: .85rem;
  padding-bottom: .85rem;
}

.manual-toc-toggle {
  align-items: center;
  background: #172033;
  border: 0;
  border-radius: 12px;
  color: #fff;
  display: none;
  font-weight: 900;
  gap: .75rem;
  justify-content: space-between;
  line-height: 1.2;
  padding: .8rem .9rem;
  text-align: left;
  width: 100%;
}

.manual-toc-toggle small {
  color: rgba(255, 255, 255, .72);
  flex: 1;
  font-size: .78rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-toc-header h2,
.manual-toolbar h1 {
  font-size: 1.15rem;
  font-weight: 900;
  margin: 0;
}

.manual-toc-link {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: #475467;
  display: flex;
  font-weight: 800;
  gap: .65rem;
  line-height: 1.25;
  padding: .68rem .72rem;
  text-align: left;
  width: 100%;
}

.manual-toc-link span {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: .75rem;
  height: 32px;
  justify-content: center;
}

.manual-toc-link.active,
.manual-toc-link:hover {
  background: #eff6ff;
  color: #172033;
}

.manual-reader {
  min-height: calc(100vh - 96px);
  overflow: hidden;
  padding: .85rem;
}

.manual-toolbar,
.manual-controls {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.manual-toolbar {
  border-bottom: 1px solid #edf2f7;
  margin-bottom: .7rem;
  padding-bottom: .7rem;
}

.manual-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  justify-content: flex-end;
}

.manual-book {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, .08), transparent 8%, transparent 92%, rgba(15, 23, 42, .08)),
    #f8fafc;
  border-radius: 18px;
  min-height: calc(100vh - 245px);
  overflow: hidden;
  perspective: 1800px;
  position: relative;
}

.manual-page {
  backface-visibility: hidden;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, .06), transparent 9%),
    linear-gradient(180deg, #ffffff, #fbfdff);
  border: 1px solid #e6edf6;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
  inset: .65rem;
  opacity: 0;
  overflow-y: auto;
  position: absolute;
  transform: rotateY(18deg) translateX(26px) scale(.985);
  transform-origin: left center;
  transition: transform .46s ease, opacity .28s ease;
  visibility: hidden;
}

.manual-page.active {
  opacity: 1;
  transform: rotateY(0) translateX(0) scale(1);
  visibility: visible;
  z-index: 3;
}

.manual-page.leaving-forward {
  opacity: 0;
  transform: rotateY(-55deg) translateX(-20px) scale(.985);
  visibility: visible;
  z-index: 2;
}

.manual-page.leaving-backward {
  opacity: 0;
  transform: rotateY(55deg) translateX(20px) scale(.985);
  visibility: visible;
  z-index: 2;
}

.manual-page-inner {
  padding: 1.65rem 1.9rem;
}

.manual-cover,
.manual-back-cover {
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 116, 144, .18), transparent 24rem),
    linear-gradient(135deg, #0f172a, #1e3a8a 52%, #0f766e);
  color: #fff;
}

.manual-cover .manual-page-inner,
.manual-back-cover .manual-page-inner {
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.manual-kicker,
.eyebrow {
  color: #2563eb;
  display: inline-block;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: .55rem;
  text-transform: uppercase;
}

.manual-cover .manual-kicker,
.manual-back-cover .manual-kicker {
  color: #bfdbfe;
}

.manual-page h2 {
  color: #172033;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: .85rem;
}

.manual-cover h2,
.manual-back-cover h2 {
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: .96;
  max-width: 760px;
}

.manual-cover p,
.manual-back-cover p {
  color: rgba(255, 255, 255, .86);
  font-size: 1.05rem;
  max-width: 720px;
}

.manual-cover-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 2rem;
  max-width: 680px;
}

.manual-cover-grid span {
  align-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  display: flex;
  gap: .7rem;
  padding: .95rem 1rem;
}

.manual-cover-footer {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1.25rem;
}

.manual-lead {
  color: #475467;
  font-size: 1rem;
  line-height: 1.75;
  max-width: 940px;
}

.manual-audience {
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  border-radius: 10px;
  color: #475467;
  padding: .9rem 1rem;
}

.manual-section {
  margin-top: 1.25rem;
}

.manual-section h3,
.manual-note strong,
.manual-routes strong {
  color: #172033;
  display: block;
  font-size: .95rem;
  font-weight: 900;
  margin-bottom: .65rem;
}

.manual-section ul,
.manual-section ol {
  color: #334155;
  line-height: 1.72;
  padding-left: 1.25rem;
}

.manual-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  color: #7c2d12;
  margin-top: 1.25rem;
  padding: 1rem;
}

.manual-note p {
  margin-bottom: .35rem;
}

.manual-routes {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-top: 1.25rem;
  padding: 1rem;
}

.manual-routes div {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.manual-routes code {
  background: #e0f2fe;
  border-radius: 999px;
  color: #075985;
  padding: .35rem .65rem;
}

.manual-shot-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.manual-shot-window {
  background: #0f172a;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
  overflow: hidden;
}

.manual-shot-bar {
  background: #1e293b;
  display: flex;
  gap: .35rem;
  padding: .65rem;
}

.manual-shot-bar span {
  background: #94a3b8;
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.manual-shot-body {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .18), transparent 36%),
    #f8fafc;
  color: #172033;
  min-height: 155px;
  padding: 1rem;
}

.manual-real-shot {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.manual-shot-body strong,
.manual-shot-body small {
  display: block;
}

.manual-shot-body small {
  color: #2563eb;
  font-weight: 800;
  margin: .35rem 0 .65rem;
}

.manual-controls {
  margin-top: .65rem;
}

.manual-progress {
  color: #64748b;
  flex: 1;
  font-weight: 800;
  max-width: 520px;
  text-align: center;
}

.manual-progress > div {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  margin-top: .45rem;
  overflow: hidden;
}

.manual-progress span span,
#manualProgressBar {
  background: linear-gradient(90deg, #2563eb, #0f766e);
  display: block;
  height: 100%;
}

@media (max-width: 991.98px) {
  .manual-shell {
    grid-template-columns: 1fr;
  }

  .manual-toc {
    max-height: none;
    position: static;
  }

  .manual-reader {
    min-height: calc(100vh - 96px);
  }
}

@media (max-width: 767.98px) {
  .manual-wrapper,
  body.app-shell #content-wrapper.manual-wrapper,
  body.manual-public-page #content-wrapper.manual-wrapper {
    padding: .75rem .75rem 5rem !important;
  }

  .manual-shell {
    gap: .75rem;
  }

  .manual-reader,
  .manual-toc {
    border-radius: 14px;
  }

  .manual-toc {
    max-height: none;
    overflow: visible;
    padding: .6rem;
    position: sticky;
    top: 72px;
    z-index: 20;
  }

  .manual-toc-header {
    display: none;
  }

  .manual-toc-toggle {
    display: flex;
  }

  .manual-toc-toggle .fa-chevron-down {
    transition: transform .18s ease;
  }

  .manual-toc.toc-open .manual-toc-toggle .fa-chevron-down {
    transform: rotate(180deg);
  }

  .manual-toc-list {
    display: none;
    max-height: min(58vh, 430px);
    overflow-y: auto;
    padding-top: .6rem;
  }

  .manual-toc.toc-open .manual-toc-list {
    display: block;
  }

  .manual-toc-link {
    padding: .62rem .65rem;
  }

  .manual-toolbar,
  .manual-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-toolbar {
    gap: .7rem;
  }

  .manual-toolbar-actions {
    display: none;
  }

  .manual-reader {
    min-height: calc(100vh - 150px);
    padding: .6rem;
  }

  .manual-book {
    min-height: calc(100vh - 270px);
    border-radius: 14px;
  }

  .manual-page {
    inset: .55rem;
    transform: none;
    transition: opacity .22s ease;
  }

  .manual-page-inner {
    padding: 1.2rem;
  }

  .manual-page h2 {
    font-size: 1.45rem;
  }

  .manual-cover h2,
  .manual-back-cover h2 {
    font-size: 2rem;
  }

  .manual-cover .manual-page-inner,
  .manual-back-cover .manual-page-inner {
    min-height: calc(100vh - 310px);
  }

  .manual-cover-grid,
  .manual-shot-grid {
    grid-template-columns: 1fr;
  }

  .manual-controls .btn {
    width: 100%;
  }
}

@media print {
  .manual-toc,
  .manual-toolbar,
  .manual-controls,
  .navbar,
  .sidebar,
  .module-footer {
    display: none !important;
  }

  .manual-shell,
  .manual-reader,
  .manual-book {
    display: block !important;
    box-shadow: none !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .manual-page {
    border: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    page-break-after: always;
    position: static !important;
    transform: none !important;
    visibility: visible !important;
  }
}

/* Modern login experience */
body.login-page {
  align-items: center !important;
  background:
    radial-gradient(circle at 12% 14%, rgba(37, 99, 235, .34), transparent 22rem),
    radial-gradient(circle at 92% 18%, rgba(15, 118, 110, .28), transparent 24rem),
    linear-gradient(135deg, #08111f 0%, #10213d 46%, #0f3b46 100%) !important;
  display: flex !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  overflow-x: hidden !important;
}

body.login-page .login-shell {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 2.5rem) !important;
  width: 100% !important;
}

.login-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 28px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .28);
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(380px, 1fr);
  margin: 0 auto;
  max-width: 1120px;
  height: min(700px, calc(100vh - 1rem));
  min-height: 0;
  overflow: hidden;
}

.login-story {
  background:
    linear-gradient(160deg, rgba(8, 17, 31, .9), rgba(37, 99, 235, .72)),
    url("../images/bg-head-02.jpg") center/cover no-repeat;
  color: #fff;
  min-height: 100%;
  overflow: hidden;
  position: relative;
}

.login-story::after {
  background:
    linear-gradient(transparent 0 0) padding-box,
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 76px);
  content: "";
  inset: 0;
  opacity: .55;
  position: absolute;
}

.login-story-overlay {
  background: radial-gradient(circle at 30% 26%, rgba(255,255,255,.22), transparent 20rem);
  inset: 0;
  position: absolute;
}

.login-story-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  min-height: 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  position: relative;
  z-index: 2;
}

.login-logo {
  align-items: center;
  color: #fff;
  display: inline-flex;
  gap: .85rem;
  text-decoration: none;
}

.login-logo:hover {
  color: #fff;
  text-decoration: none;
}

.login-logo span {
  align-items: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  display: inline-flex;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.login-logo strong {
  font-size: 1.05rem;
  font-weight: 900;
}

.login-copy {
  max-width: 520px;
}

.login-pill {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 900;
  margin-bottom: 1.2rem;
  padding: .55rem .8rem;
}

.login-copy h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: .98;
  margin-bottom: 1rem;
}

.login-copy p {
  color: rgba(255, 255, 255, .82);
  font-size: 1rem;
  line-height: 1.7;
}

.login-feature-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.login-feature-grid div {
  align-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  display: flex;
  gap: .75rem;
  padding: .85rem;
}

.login-feature-grid i {
  color: #bfdbfe;
}

.login-form-panel {
  background:
    radial-gradient(circle at 92% 8%, rgba(37, 99, 235, .08), transparent 18rem),
    #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.25rem, 3vw, 2.6rem);
}

.login-mobile-brand {
  display: none;
}

.login-form-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.login-form-header h2 {
  color: #172033;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: .35rem;
}

.login-form-header p {
  color: #667085;
  margin-bottom: 0;
}

.login-input {
  position: relative;
}

.login-input > i {
  color: #64748b;
  left: 1rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

body.login-page .login-input .form-control {
  background: #f8fafc !important;
  border: 1px solid #d8e1ee !important;
  border-radius: 14px !important;
  min-height: 52px !important;
  padding-left: 2.85rem !important;
}

body.login-page .form-group {
  margin-bottom: .78rem;
}

.login-options {
  align-items: center;
  color: #667085;
  display: flex;
  flex-wrap: wrap;
  font-size: .88rem;
  justify-content: space-between;
  margin: .2rem 0 .95rem;
}

.login-submit {
  min-height: 52px;
}

.btn-login-manual {
  min-height: 46px;
  margin-top: .75rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: var(--condo-primary);
}

.btn-login-manual:hover {
  background: #dbeafe;
  color: var(--condo-primary-dark);
}

.btn-demo {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  margin-top: .75rem;
  min-height: 48px;
}

.btn-demo:hover {
  background: #d1fae5;
  color: #065f46;
}

.btn-demo-resident {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  margin-bottom: .55rem;
  margin-top: .75rem;
  min-height: 48px;
}

.btn-demo-resident:hover {
  background: #e0e7ff;
  color: #312e81;
}

.demo-hint {
  color: #667085;
  font-size: .84rem;
  line-height: 1.3;
  margin-top: .55rem;
  text-align: center;
}

@media (max-height: 760px) {
  .demo-hint {
    display: none;
  }
}

@media (max-width: 991.98px) {
  body.login-page .login-shell {
    padding: 1rem !important;
  }

  .login-card {
    grid-template-columns: 1fr;
    height: calc(100vh - 2rem);
    max-width: 640px;
    min-height: 0;
  }

  .login-story {
    min-height: 0;
  }

  .login-story-content {
    min-height: 0;
    padding: 1.15rem 1.35rem;
  }

  .login-copy {
    display: none;
  }

  .login-feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .login-feature-grid div {
    justify-content: center;
    padding: .65rem;
  }

  .login-feature-grid span {
    display: none;
  }

  .login-form-panel {
    justify-content: flex-start;
    padding: 1.35rem;
  }
}

@media (max-width: 575.98px) {
  body.login-page {
    align-items: stretch !important;
    background:
      radial-gradient(circle at 18% 10%, rgba(96, 165, 250, .34), transparent 13rem),
      radial-gradient(circle at 100% 18%, rgba(45, 212, 191, .22), transparent 14rem),
      linear-gradient(160deg, #07111f 0%, #10213d 54%, #0b3b42 100%) !important;
  }

  body.login-page .login-shell {
    align-items: stretch;
    justify-content: center;
    padding: .85rem !important;
  }

  .login-card {
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
    height: calc(100vh - 1.7rem);
    max-width: none;
    min-height: 0;
    overflow: hidden;
    width: 100%;
  }

  .login-story {
    display: none;
  }

  .login-story-content {
    min-height: 0;
    padding: 1.2rem;
  }

  .login-copy h1 {
    font-size: 2rem;
  }

  .login-feature-grid {
    grid-template-columns: 1fr;
  }

  .login-form-panel {
    background:
      radial-gradient(circle at 90% 4%, rgba(37, 99, 235, .12), transparent 11rem),
      linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .98));
    justify-content: flex-start;
    overflow-y: auto;
    padding: 1rem;
    width: 100%;
  }

  .login-mobile-brand {
    align-items: center;
    background:
      linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(37, 99, 235, .88)),
      url("../images/bg-head-02.jpg") center/cover no-repeat;
    border-radius: 18px;
    color: #fff;
    display: flex;
    gap: .8rem;
    margin-bottom: 1rem;
    min-height: 86px;
    overflow: hidden;
    padding: 1rem;
    position: relative;
  }

  .login-mobile-brand::after {
    background: radial-gradient(circle at 85% 18%, rgba(255, 255, 255, .22), transparent 7rem);
    content: "";
    inset: 0;
    position: absolute;
  }

  .login-mobile-brand > span,
  .login-mobile-brand > div {
    position: relative;
    z-index: 1;
  }

  .login-mobile-brand > span {
    align-items: center;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    width: 48px;
  }

  .login-mobile-brand strong,
  .login-mobile-brand small {
    display: block;
  }

  .login-mobile-brand strong {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.15;
  }

  .login-mobile-brand small {
    color: rgba(255, 255, 255, .76);
    font-size: .76rem;
    font-weight: 800;
    margin-top: .22rem;
  }

  .login-form-header {
    align-items: center;
    flex-direction: row;
    gap: .65rem;
    margin-bottom: .85rem;
  }

  .login-form-header h2 {
    font-size: 1.35rem;
  }

  .login-form-header p {
    display: none;
  }

  body.login-page .login-input .form-control {
    background: #fff !important;
    border-radius: 13px !important;
    min-height: 46px !important;
  }

  body.login-page .form-group {
    margin-bottom: .7rem;
  }

  .login-submit,
  .btn-login-manual,
  .btn-demo,
  .btn-demo-resident {
    border-radius: 13px !important;
    min-height: 44px;
  }

  .login-submit {
    box-shadow: 0 12px 24px rgba(37, 99, 235, .2);
  }

  .btn-login-manual,
  .btn-demo,
  .btn-demo-resident {
    margin-top: .55rem;
  }

  .btn-demo-resident {
    margin-bottom: .7rem;
  }

  .language-switcher {
    align-self: flex-end;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: .75rem;
  }

  .demo-hint {
    display: none;
  }
}
