/* Project-specific refinements on top of Kaiadmin Lite */

.alert-debug {
  color: #1f2937;
  background-color: #f8fafc;
  border-color: #dbe5f4;
}

.alert-error {
  color: #b42318;
  background-color: #fff1f0;
  border-color: #fecdc9;
}

.app-logo {
  align-items: center;
  border-radius: 14px;
  display: inline-flex;
  justify-content: center;
  min-height: 46px;
  min-width: 0;
  padding: 0.15rem 0.3rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.app-logo:hover,
.app-logo:focus {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.app-logo-picture {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  line-height: 0;
  max-width: 100%;
}

.app-logo-image {
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
  height: 40px;
  max-width: 138px;
  object-fit: contain;
  width: auto;
}

.sidebar_minimize .sidebar .app-logo,
[data-sidebar-minimized="true"] .sidebar .app-logo {
  min-height: 42px;
  padding: 0;
}

.sidebar_minimize .sidebar .app-logo-image,
[data-sidebar-minimized="true"] .sidebar .app-logo-image {
  height: 34px;
  max-width: 38px;
}

@media (max-width: 991.98px) {
  .app-logo {
    min-height: 42px;
  }

  .app-logo-image {
    height: 36px;
    max-width: 118px;
  }
}

.auth-shell {
  background:
    radial-gradient(circle at 18% 18%, rgba(45, 212, 191, 0.2), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(124, 58, 237, 0.2), transparent 24%),
    linear-gradient(135deg, #07111f 0%, #0b1730 48%, #10294b 100%);
  color: #f8fafc;
  overflow: hidden;
  position: relative;
}

.auth-shell::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 82%);
  pointer-events: none;
  position: absolute;
}

.auth-layout {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.72fr);
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.auth-hero,
.auth-form-panel {
  align-items: center;
  display: flex;
}

.auth-hero {
  border-radius: 30px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 2.5rem;
  position: relative;
}

.auth-hero::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 72% 74%, rgba(45, 212, 191, 0.22), transparent 34%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: inherit;
  content: "";
  inset: 0;
  position: absolute;
}

.auth-brand-panel,
.auth-hero-copy,
.auth-feature-grid {
  position: relative;
  width: 100%;
  z-index: 1;
}

.auth-brand-panel {
  align-items: center;
  display: flex;
  justify-content: flex-start;
}

.auth-logo-link {
  align-items: center;
  background: linear-gradient(135deg, rgba(9, 18, 34, 0.88), rgba(17, 36, 70, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: inline-flex;
  justify-content: center;
  min-height: 78px;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
}

.auth-logo-image {
  display: block;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.38));
  height: auto;
  max-height: 62px;
  max-width: 250px;
  object-fit: contain;
  width: 100%;
}

.auth-hero-copy {
  margin: auto 0;
  max-width: 680px;
  padding: 3rem 0;
}

.auth-eyebrow,
.auth-form-kicker {
  color: #2dd4bf;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin-bottom: 0.9rem;
  text-transform: uppercase;
}

.auth-hero-copy h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.8vw, 4.8rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.95;
  margin-bottom: 1.25rem;
  max-width: 760px;
}

.auth-hero-copy p {
  color: rgba(226, 232, 240, 0.86);
  font-size: 1rem;
  line-height: 1.8;
  margin: 0;
  max-width: 560px;
}

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

.auth-feature-card {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 1rem;
}

.auth-feature-icon {
  align-items: center;
  background: rgba(45, 212, 191, 0.16);
  border-radius: 14px;
  color: #5eead4;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  margin-bottom: 0.85rem;
  width: 38px;
}

.auth-feature-card strong,
.auth-feature-card small {
  display: block;
}

.auth-feature-card strong {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.auth-feature-card small {
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.5;
}

.auth-form-panel {
  justify-content: center;
  padding: 2rem;
}

.auth-form-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
  color: #1a2035;
  max-width: 440px;
  padding: 2.25rem;
  width: 100%;
}

.auth-form-heading {
  margin-bottom: 1.75rem;
}

.auth-form-heading h2 {
  color: #111827;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-bottom: 0.55rem;
}

.auth-form-heading p {
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

.auth-form-card .form-control {
  border-color: #d8e3f7;
  border-radius: 14px;
  min-height: 46px;
}

.auth-form-card .btn,
.auth-form-card button[type="submit"] {
  border-radius: 14px;
  min-height: 44px;
}

@media (max-width: 991.98px) {
  .auth-shell {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-layout {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    padding: 1rem;
  }

  .auth-hero {
    border-radius: 26px;
    flex: 0 0 auto;
    min-height: auto;
    padding: 1.25rem;
  }

  .auth-brand-panel {
    justify-content: center;
  }

  .auth-hero-copy {
    padding: 1.75rem 0 1rem;
    text-align: center;
  }

  .auth-hero-copy h1 {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
    line-height: 1.02;
    margin-left: auto;
    margin-right: auto;
    max-width: 560px;
  }

  .auth-hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }

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

  .auth-form-panel {
    align-items: flex-start;
    flex: 1 1 auto;
    padding: 1rem 0.25rem 0;
  }
}

@media (max-width: 575.98px) {
  .auth-shell {
    background:
      radial-gradient(circle at 50% -10%, rgba(45, 212, 191, 0.2), transparent 34%),
      linear-gradient(180deg, #07111f 0%, #0b1730 42%, #f8fafc 42%, #f8fafc 100%);
  }

  .auth-shell::before {
    opacity: 0.45;
  }

  .auth-layout {
    gap: 0;
    min-height: 100svh;
    padding: 0;
  }

  .auth-hero {
    border-radius: 0 0 28px 28px;
    padding: max(1rem, env(safe-area-inset-top)) 1rem 1.1rem;
  }

  .auth-hero::before {
    border-left: 0;
    border-radius: inherit;
    border-right: 0;
    border-top: 0;
  }

  .auth-logo-link {
    border-radius: 18px;
    min-height: 62px;
    padding: 0.55rem 0.9rem;
  }

  .auth-logo-image {
    max-height: 48px;
    max-width: 198px;
  }

  .auth-hero-copy {
    padding: 1rem 0 0;
  }

  .auth-eyebrow {
    font-size: 0.62rem;
    margin-bottom: 0.55rem;
  }

  .auth-hero-copy h1 {
    font-size: 1.42rem;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 0.55rem;
  }

  .auth-hero-copy p,
  .auth-feature-grid {
    display: none;
  }

  .auth-form-panel {
    align-items: stretch;
    background: #f8fafc;
    padding: 0.9rem 0.85rem max(1rem, env(safe-area-inset-bottom));
  }

  .auth-form-card {
    border-color: rgba(216, 227, 247, 0.92);
    border-radius: 22px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.12);
    max-width: none;
    padding: 1.15rem;
  }

  .auth-form-heading {
    margin-bottom: 1rem;
  }

  .auth-form-kicker {
    font-size: 0.62rem;
    margin-bottom: 0.45rem;
  }

  .auth-form-heading h2 {
    font-size: 1.28rem;
    margin-bottom: 0.35rem;
  }

  .auth-form-heading p {
    font-size: 0.82rem;
  }

  .auth-form-card .form-control {
    border-radius: 13px;
    font-size: 1rem;
    min-height: 50px;
  }

  .auth-form-card .btn,
  .auth-form-card button[type="submit"] {
    border-radius: 13px;
    font-size: 1rem;
    font-weight: 800;
    min-height: 50px;
    width: 100%;
  }
}

@media (max-width: 380px) {
  .auth-form-card {
    padding: 1rem;
  }

  .auth-hero-copy h1 {
    font-size: 1.25rem;
  }
}

.main-header .navbar {
  min-height: 50px;
  padding-bottom: 0.25rem;
  padding-top: 0.25rem;
}

.workspace-loading {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dbe5f4;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
  color: #1f2937;
  display: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  position: fixed;
  right: 1.25rem;
  top: 4.5rem;
  z-index: 1100;
}

.workspace-loading.htmx-request,
.htmx-request .workspace-loading {
  display: inline-flex;
}

#workspace:focus {
  outline: none;
}

.main-header .navbar .container-fluid {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  overflow: visible;
}

.dashboard-heading h3 {
  color: #1a2035;
  font-size: 1.05rem;
  margin-bottom: 0;
  white-space: nowrap;
}

.selection-form {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin: 0;
  min-width: max-content;
  white-space: nowrap;
}

.selection-shell {
  align-items: center;
  background: linear-gradient(135deg, #f9fbff 0%, #eef4ff 100%);
  border: 1px solid #d8e3f7;
  border-radius: 16px;
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
}

.selection-shell-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.selection-shell-kicker {
  color: #5f6f88;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selection-shell-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.selection-form label {
  color: #6b778c;
  font-size: 0.72rem;
  font-weight: 600;
}

.selection-form .form-select {
  height: 30px;
  min-width: 8.2rem;
  padding-bottom: 0.2rem;
  padding-top: 0.2rem;
}

.user-chip {
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
}

.shortcut-chip {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
}

.context-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.28rem 0.6rem;
  text-transform: uppercase;
}

.context-badge-role {
  background: #e7f0ff;
  color: #24539d;
}

.context-badge-super {
  background: #fff3d9;
  color: #8a5a00;
}

.context-badge-count {
  background: #edf7ee;
  color: #2f7d45;
}

.context-badge-empty {
  background: #eff2f6;
  color: #617086;
}

.topbar-nav {
  flex-direction: row !important;
  flex-wrap: nowrap;
  gap: 0.45rem;
  margin-left: auto !important;
  min-width: max-content;
  overflow-x: auto;
  overflow-y: visible;
}

.topbar-nav .nav-item {
  display: flex;
  flex: 0 0 auto;
}

.periods-chip {
  align-items: center;
  border: 1px solid #d6deec;
  border-radius: 999px;
  color: #4f5d75;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 700;
  min-height: 32px;
  padding: 0.35rem 0.7rem;
  white-space: nowrap;
}

.periods-chip:hover,
.periods-chip:focus {
  background: #eef3ff;
  color: #2f4369;
}

.shortcut-launcher {
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.shortcut-launcher:hover,
.shortcut-launcher:focus {
  box-shadow: 0 8px 20px rgba(18, 35, 74, 0.08);
}

.periods-section-title {
  color: #53627d;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0;
  text-transform: uppercase;
}

.periods-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.periods-list li {
  align-items: center;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
}

.periods-list li:hover {
  background: #f6f8fc;
}

.period-status {
  align-items: center;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  gap: 0.35rem;
  white-space: nowrap;
}

.period-status i {
  font-size: 0.55rem;
}

.period-status.active {
  color: #1f9d46;
}

.period-status.inactive {
  color: #7a879e;
}

.dashboard-content-card.card {
  border-radius: 18px;
  border: 1px solid #e3eaf4;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.quick-card {
  height: 100%;
}

.account-tree {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.account-tree-group,
.account-tree-subgroup {
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  box-shadow: 0 8px 20px rgba(24, 39, 75, 0.04);
  overflow: hidden;
}

.account-tree-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  list-style: none;
  padding: 0.9rem 1rem;
  user-select: none;
}

.account-tree-summary::-webkit-details-marker {
  display: none;
}

.account-tree-summary::before {
  color: #66758e;
  content: "▸";
  font-size: 0.9rem;
  transition: transform 0.18s ease;
}

.account-tree-group[open] > .account-tree-summary::before,
.account-tree-subgroup[open] > .account-tree-summary::before {
  transform: rotate(90deg);
}

.account-tree-summary-label {
  color: #1a2035;
  font-size: 0.98rem;
  font-weight: 700;
}

.account-tree-summary-sub {
  background: #f6f9ff;
  border-top: 1px solid #eef2f7;
}

.account-tree-group-body,
.account-tree-subgroup-body {
  padding: 0 0.9rem 0.9rem;
}

.account-tree-subgroup {
  margin-left: 0.75rem;
}

.account-tree-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.account-tree-list.level-0 {
  margin-top: 0.75rem;
}

.account-tree-item + .account-tree-item {
  margin-top: 0.6rem;
}

.account-tree-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e6ebf4;
  border-radius: 12px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.8rem 0.95rem;
}

.account-tree-main {
  min-width: 0;
}

.account-tree-name {
  align-items: center;
  color: #1c2438;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-weight: 700;
}

.account-tree-meta {
  align-items: center;
  color: #6d778b;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.account-tree-code {
  background: #edf3ff;
  border-radius: 999px;
  color: #2756a5;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
}

.account-tree-actions .btn {
  white-space: nowrap;
}

.account-tree .badge {
  font-size: 0.72rem;
}

.society-overview-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-color: #dde5f2;
  box-shadow: 0 12px 32px rgba(24, 39, 75, 0.05);
}

.society-overview-top {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.society-overview-kicker {
  color: #72819a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.society-overview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.society-overview-grid {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.society-overview-label,
.governance-label {
  color: #72819a;
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  text-transform: uppercase;
}

.society-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.governance-card {
  background: linear-gradient(135deg, #fdfefe 0%, #f4f8ff 100%);
}

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

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

.governance-metric {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e2e9f4;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}

.role-stack {
  display: grid;
  gap: 0.75rem;
}

.role-stack-item {
  border: 1px solid #e3e9f4;
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
}

.role-stack-badge-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.page-inner .table-responsive {
  border: 1px solid #e3e9f2;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.page-inner .table {
  margin-bottom: 0;
}

.page-inner .table > :not(caption) > * > * {
  padding: 0.85rem 0.95rem;
}

.page-inner .table thead th {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f6fb 100%);
  border-bottom: 1px solid #dde5f0;
  color: #526079;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-inner .form-control,
.page-inner .form-select {
  border-color: #d8dfeb;
}

.page-inner .form-control:focus,
.page-inner .form-select:focus {
  border-color: #8ab7ff;
  box-shadow: 0 0 0 0.16rem rgba(23, 125, 255, 0.15);
}

.page-inner .btn {
  font-weight: 600;
}

.page-inner {
  padding-top: 0.75rem;
  padding-bottom: 1.25rem;
}

body.ka-body {
  background:
    radial-gradient(circle at top left, rgba(23, 125, 255, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.05), transparent 25%),
    #f5f8fd;
}

.main-panel {
  background: transparent;
}

.content-card__body .list-group-item {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  border-color: #e9eef5;
}

.report-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.report-card:hover {
  transform: translateY(-2px);
  border-color: #d6e1f0;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.report-card__icon {
  align-items: center;
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
  border-radius: 16px;
  color: #ffffff;
  flex: 0 0 auto;
  font-size: 1.15rem;
}

.report-card__icon--core {
  background: linear-gradient(135deg, #177dff 0%, #4e9dff 100%);
}

.report-card__icon--aging {
  background: linear-gradient(135deg, #0ea5e9 0%, #57c7f7 100%);
}

.report-card__icon--audit {
  background: linear-gradient(135deg, #b42318 0%, #dc4e43 100%);
}

.report-card__icon--assets {
  background: linear-gradient(135deg, #1f9d46 0%, #34b85f 100%);
}

.report-card__icon--reconciliation {
  background: linear-gradient(135deg, #617086 0%, #8a96a7 100%);
}

.report-card__icon--compliance {
  background: linear-gradient(135deg, #f9b115 0%, #f3c44e 100%);
}

.report-card__icon--operations {
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
}

.report-card__icon--insights {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.report-card__icon--membership {
  background: linear-gradient(135deg, #334155 0%, #64748b 100%);
}

.page-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.page-action-group .btn {
  font-weight: 600;
}

.page-action-group .btn-main {
  background: #ffffff;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.page-action-group .btn-main:hover,
.page-action-group .btn-main:focus {
  background: #ffffff;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.page-action-group .btn-plus {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  min-width: 34px;
  padding-left: 10px;
  padding-right: 10px;
}

.financial-statement-sheet {
  background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
  border: 1px solid #dce3ef;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(24, 39, 75, 0.06);
  padding: 1.5rem;
}

.statement-header {
  border-bottom: 2px solid #dbe4f0;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  text-align: center;
}

.statement-kicker {
  color: #6b7a90;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.statement-entity {
  color: #172033;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.statement-title {
  color: #2e405f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.statement-period,
.statement-period-detail {
  color: #55657f;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.statement-print-date {
  color: #6b7a90;
  font-size: 0.82rem;
  margin-bottom: 0;
}

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

.statement-panel {
  background: #fff;
  border: 1px solid #dde5f1;
  border-radius: 12px;
  overflow: hidden;
}

.statement-panel-header {
  background: #eaf0f8;
  color: #32425f;
  display: flex;
  font-size: 0.76rem;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.08em;
  padding: 0.8rem 1rem;
  text-transform: uppercase;
}

.statement-table {
  border-collapse: collapse;
  width: 100%;
}

.statement-table-head th {
  background: #eef3f9;
  border-bottom: 1px solid #dde5f1;
  color: #4d5f7c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.8rem 1rem;
  text-transform: uppercase;
}

.statement-table td {
  border-bottom: 1px solid #edf1f7;
  color: #23314d;
  padding: 0.78rem 1rem;
  vertical-align: top;
}

.statement-table tbody tr:last-child td {
  border-bottom: 1px solid #edf1f7;
}

.statement-subsection td {
  background: #f7f9fc;
  color: #50617e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.statement-subtotal td,
.statement-table tfoot td {
  background: #f3f6fb;
  color: #172033;
  font-weight: 700;
}

.statement-summary {
  align-items: center;
  background: #f3f6fb;
  border: 1px solid #dde5f1;
  border-radius: 12px;
  color: #172033;
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 0.95rem 1rem;
}

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

  .selection-shell {
    align-items: stretch;
    flex-direction: column;
  }

  .selection-form {
    flex-wrap: wrap;
    min-width: 0;
  }

  .selection-form .form-select {
    min-width: 0;
    width: 100%;
  }

  .society-overview-grid,
  .governance-metrics {
    grid-template-columns: 1fr;
  }
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    background: #ffffff !important;
  }

  .main-header,
  .sidebar,
  .nav-toggle,
  .navbar-header,
  .page-actions,
  .footer,
  .custom-template,
  .page-inner .btn,
  .page-inner .form-control,
  .page-inner .form-select,
  .alert,
  .breadcrumb,
  .sidebar-wrapper,
  .logo-header {
    display: none !important;
  }

  .wrapper,
  .main-panel,
  .content,
  .page-inner {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .dashboard-heading,
  .dashboard-title,
  .dashboard-subtitle {
    display: none !important;
  }

  .financial-statement-sheet,
  .statement-panel {
    border: 0 !important;
    box-shadow: none !important;
  }

  .financial-statement-sheet {
    background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%) !important;
    padding: 0 !important;
  }

  .statement-panel-header,
  .statement-subsection td,
  .statement-subtotal td,
  .statement-table tfoot td,
  .statement-table-head th {
    background: inherit;
  }

  .statement-header {
    border-bottom: 1px solid #cfd8e3 !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  .statement-table td,
  .statement-table-head th {
    padding: 0.45rem 0.55rem !important;
  }
}

.page-action-group .btn-plus:hover,
.page-action-group .btn-plus:focus {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #ffffff;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.form-shell {
  padding: 1.1rem;
}

.form-shell .form-label {
  color: #5e6d86;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.32rem;
  text-transform: uppercase;
}

.form-shell .form-text {
  color: #7a879e;
}

.form-shell .form-check-label {
  color: #4f5d75;
  font-weight: 600;
}

.form-actions-inline {
  margin-top: 0.4rem;
}

.member-filter-bar {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.member-filter-item {
  flex: 1 1 170px;
  min-width: 170px;
}

.member-filter-search {
  flex: 2 1 280px;
  min-width: 240px;
}

.member-filter-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.structure-filter-bar {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.structure-filter-item {
  flex: 1 1 170px;
  min-width: 170px;
}

.structure-filter-search {
  flex: 2 1 320px;
  min-width: 260px;
}

.structure-filter-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.list-group-item {
  border-color: #eff1f6;
}

.parking-dashboard .content-card .list-group-flush > .list-group-item {
  border-bottom: 1px solid #e7ecf3;
}

.parking-dashboard .content-card .list-group-flush > .list-group-item:last-child {
  border-bottom: 0;
}

.structure-tree,
.structure-children {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.structure-node {
  border-left: 2px solid #dde4f1;
  margin-top: 0.75rem;
  padding-left: 0.9rem;
}

.structure-accordion {
  background: #fff;
  border: 1px solid #eff1f6;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
}

.structure-children {
  margin-left: 0.9rem;
}

.structure-toggle {
  align-items: flex-start;
  border: 0;
  color: inherit;
  display: inline-flex;
  gap: 0.7rem;
  padding: 0;
  text-align: left;
}

.structure-toggle:hover,
.structure-toggle:focus {
  color: inherit;
}

.structure-toggle-copy {
  display: grid;
  gap: 0.3rem;
}

.structure-toggle-meta {
  line-height: 1.35;
}

.structure-toggle-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.structure-toggle-badges .badge {
  font-weight: 600;
}

.structure-toggle-icon {
  align-items: center;
  color: #5f6b85;
  display: inline-flex;
  justify-content: center;
  min-width: 18px;
  padding-top: 0.2rem;
  transition: transform 0.2s ease;
}

.structure-toggle[aria-expanded="false"] .structure-toggle-icon {
  transform: rotate(-90deg);
}

.structure-collapse-body {
  padding-top: 0.75rem;
}

.structure-unit-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  list-style: none;
  margin-bottom: 0;
  padding-left: 0;
}

.structure-unit-card {
  background: #fff;
  border: 1px solid #eff1f6;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
  padding: 0.9rem 1rem;
}

.sidebar .nav.nav-secondary > .nav-section {
  margin-top: 0.65rem;
}

.sidebar .nav.nav-secondary > .nav-item > a {
  border-radius: 14px;
  margin: 0.12rem 0.6rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.sidebar .nav.nav-secondary > .nav-item > a:hover,
.sidebar .nav.nav-secondary > .nav-item > a:focus {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 3px 0 0 #2dd4bf, 0 10px 22px rgba(0, 0, 0, 0.16);
  transform: translateX(2px);
}

.sidebar .nav.nav-secondary > .nav-item.active > a {
  background: linear-gradient(135deg, rgba(23, 125, 255, 0.22), rgba(45, 212, 191, 0.14));
  box-shadow: inset 3px 0 0 #2dd4bf;
}

@media (max-width: 991.98px) {
  .selection-form {
    gap: 0.25rem;
    padding: 0;
  }

  .selection-form .form-select {
    min-width: 7rem;
  }

  .logo-label {
    font-size: 0.88rem;
  }

  .structure-unit-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .structure-toggle-badges {
    gap: 0.3rem;
  }

  .main-header .navbar .container-fluid {
    align-items: stretch;
    flex-wrap: wrap;
    padding-top: 0.25rem;
  }

  .dashboard-heading {
    flex: 1 1 100%;
    min-width: 0;
  }

  .dashboard-heading h3 {
    white-space: normal;
  }

  .topbar-nav {
    display: none;
    flex: 1 1 100%;
    flex-direction: column !important;
    gap: 0.6rem;
    margin-left: 0 !important;
    min-width: 0;
    overflow: visible;
    padding-top: 0.35rem;
    width: 100%;
  }

  html.topbar_open .topbar-nav {
    display: flex;
  }

  .topbar-nav .nav-item {
    width: 100%;
  }

  .selection-shell {
    align-items: stretch;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .selection-form {
    flex-wrap: wrap;
    justify-content: stretch;
    width: 100%;
  }

  .selection-form label {
    width: 100%;
  }

  .selection-form .form-select {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }

  .user-chip,
  .periods-chip,
  .shortcut-chip {
    justify-content: center;
    width: 100%;
  }

  .topbar-nav .nav-item.ms-2 {
    margin-left: 0 !important;
  }

  .topbar-nav .nav-item .d-flex {
    flex-direction: column;
    width: 100%;
  }

  .topbar-nav .nav-item .d-flex .user-chip,
  .topbar-nav .nav-item .d-flex .btn {
    width: 100%;
  }

  .topbar-nav .nav-item .d-flex.gap-2 {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.45rem !important;
  }

  .topbar-nav .nav-item .d-flex.gap-2 .user-chip,
  .topbar-nav .nav-item .d-flex.gap-2 .btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }

  .topbar-nav .nav-item .d-flex.gap-2 .user-chip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-header .navbar-header {
    align-items: flex-start;
  }
}

@media (max-width: 767.98px) {
  .main-header .navbar {
    min-height: 46px;
    padding-bottom: 0.2rem;
    padding-top: 0.2rem;
  }

  .main-header .navbar .container-fluid {
    gap: 0.35rem;
  }

  .selection-shell {
    padding: 0.45rem 0.55rem;
  }

  .user-chip,
  .periods-chip,
  .shortcut-chip {
    font-size: 0.7rem;
    min-height: 34px;
    padding: 0.42rem 0.6rem;
  }

  .topbar-nav {
    gap: 0.5rem;
    padding-top: 0.5rem;
  }

  .selection-shell-meta {
    gap: 0.15rem;
  }

  .selection-shell-badges {
    gap: 0.25rem;
  }

  .selection-form {
    gap: 0.45rem;
  }

  .page-inner {
    padding-top: 0.35rem;
  }

  .table > :not(caption) > * > * {
    padding: 0.65rem 0.7rem;
  }

  .member-filter-item,
  .member-filter-search,
  .structure-filter-item,
  .structure-filter-search {
    min-width: 100%;
  }

  .member-filter-actions,
  .structure-filter-actions {
    margin-left: 0;
    width: 100%;
  }

  .member-filter-actions .btn,
  .structure-filter-actions .btn {
    flex: 1 1 auto;
  }
}

/* ========== Account Tree Browser ========== */

.tree-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.tree-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.tree-hero-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--color-text-primary);
}

.tree-hero-subtitle {
  margin: 0.5rem 0 0;
  max-width: 60rem;
  color: var(--color-text-secondary);
}

.tree-hero-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tree-stat {
  min-width: 6.5rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border-subtle);
}

.tree-stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.tree-stat-label {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.tree-page-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.tree-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--color-border-subtle);
  background: #fff;
}

.tree-link:hover {
  color: var(--color-primary);
  border-color: rgba(26, 86, 219, 0.18);
  background: #fff;
}

.tree-legend {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tree-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--color-border-subtle);
  background: #fff;
}

.tree-legend-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 3px;
}

.tree-legend-swatch--root {
  background: #2563eb;
}

.tree-legend-swatch--branch {
  background: #0f766e;
}

.tree-legend-swatch--leaf {
  background: #64748b;
}

.tree-group {
  margin-bottom: 1.5rem;
  padding: 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.tree-group-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  background: #fff;
}

.tree-group-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tree-group-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.tree-group-count {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tree-container {
  padding: 0.9rem 1rem 1rem;
}

.tree-node {
  position: relative;
  --tree-line: rgba(26, 86, 219, 0.18);
}

.tree-node::before {
  content: "";
  position: absolute;
  left: calc(var(--tree-depth, 0) * 1.25rem + 0.45rem);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--tree-line);
}

.tree-node:last-child::before {
  bottom: 50%;
}

.tree-node-content {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.92rem;
  padding: 0.22rem 0;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.tree-node:hover > .tree-node-content {
  background: rgba(26, 86, 219, 0.04);
}

.tree-details {
  width: 100%;
}

.tree-details > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.tree-details > summary::-webkit-details-marker {
  display: none;
}

.tree-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tree-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.tree-details[open] > .tree-summary .tree-toggle {
  transform: rotate(90deg);
}

.tree-node-name {
  font-weight: 600;
  color: var(--color-text-primary);
  min-width: 0;
}

.tree-node-title {
  display: flex;
  flex: 1;
  min-width: 12rem;
  flex-direction: column;
  gap: 0.25rem;
}

.tree-node-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tree-node.leaf .tree-node-name {
  font-weight: 500;
}

.tree-node.level-0 > .tree-node-content .tree-node-name {
  font-size: 1rem;
}

.tree-node-code {
  font-size: 0.76rem;
  color: #1d4ed8;
  font-family: monospace;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 0.12rem 0.38rem;
  white-space: nowrap;
}

.tree-node-type {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tree-node-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.45rem;
  min-width: 4.25rem;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tree-node-badge--root {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}

.tree-node-badge--branch {
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
}

.tree-node-badge--leaf {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.tree-node-actions {
  margin-left: auto;
  opacity: 1;
  transition: opacity 0.15s ease;
}

.tree-action-link {
  font-size: 0.75rem;
  padding: 0.24rem 0.55rem;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(26, 86, 219, 0.18);
  border-radius: 5px;
  background: #fff;
}

.tree-action-link:hover {
  text-decoration: none;
  background: #edf3ff;
}

.tree-children {
  padding-left: 1.25rem;
  margin-left: 0.95rem;
  border-left: 2px solid rgba(37, 99, 235, 0.16);
}

.tree-leaf-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.tree-leaf-icon {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.tree-empty {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 0;
  padding: 0.85rem 0 0.35rem;
}

@media (max-width: 767.98px) {
  .tree-hero {
    flex-direction: column;
    align-items: start;
  }

  .tree-group-header {
    flex-direction: column;
  }

  .tree-node::before {
    left: calc(var(--tree-depth, 0) * 1rem + 0.35rem);
  }

  .tree-children {
    padding-left: 0.9rem;
    margin-left: 0.55rem;
  }

  .tree-summary,
  .tree-leaf-content {
    flex-wrap: wrap;
  }

  .tree-node-title {
    min-width: 100%;
  }

  .tree-node-actions {
    margin-left: 0;
    width: 100%;
  }
}



/* Enhanced navbar toggle buttons - easier to press */
.nav-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn.btn-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #6b778c;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}

.btn.btn-toggle:hover {
  background: rgba(23, 125, 255, 0.08);
  color: #177dff;
}

.btn.btn-toggle:active,
.btn.btn-toggle.toggled {
  background: rgba(23, 125, 255, 0.12);
  color: #177dff;
}

.btn.btn-toggle i {
  font-size: 1.25rem;
}

/* Hide mobile toggle on desktop */
.btn.btn-toggle.sidenav-toggler {
  display: none;
}

/* Show mobile toggle on mobile screens */
@media (max-width: 991px) {
  .btn.btn-toggle.toggle-sidebar {
    display: none;
  }

  .btn.btn-toggle.sidenav-toggler {
    display: inline-flex;
  }
}

/* Topbar toggle button */
.topbar-toggler {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #6b778c;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}

.topbar-toggler:hover {
  background: rgba(23, 125, 255, 0.08);
  color: #177dff;
}

.topbar-toggler:active,
.topbar-toggler.toggled {
  background: rgba(23, 125, 255, 0.12);
  color: #177dff;
}

.topbar-toggler i {
  font-size: 1.25rem;
}

/* Submenu hover effects */
.submenu-link {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.submenu-link:hover {
  background: rgba(23, 125, 255, 0.05);
  color: #177dff;
}

.submenu-link .submenu-caret {
  transition: all 0.2s ease-in-out;
}

.submenu-link:hover .submenu-caret {
  color: #177dff;
  transform: scale(1.15);
}

.submenu-link[aria-expanded="true"] .submenu-caret {
  color: #177dff;
}

.shares-dashboard .page-inner {
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.08), transparent 30rem),
    linear-gradient(180deg, #fbf8ff 0%, #ffffff 42%);
}

.shares-command-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 20%, rgba(124, 58, 237, 0.12), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(252, 248, 255, 0.96));
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.shares-command-panel__intro {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #3b1d66 0%, #7c3aed 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.shares-command-panel__eyebrow {
  margin-bottom: 0.45rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shares-command-panel__intro h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.shares-command-panel__intro p {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.45;
}

.shares-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.shares-command {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem;
  border: 1px solid #e6dcf8;
  border-radius: 18px;
  color: #1f2937;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.shares-command:hover,
.shares-command:focus-visible {
  border-color: rgba(124, 58, 237, 0.36);
  color: #4c1d95;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 16px 32px rgba(124, 58, 237, 0.12);
  transform: translateY(-2px);
}

.shares-command:focus-visible,
.shares-card-link:focus-visible,
.shares-card-header-link:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.22);
  outline-offset: 3px;
}

.shares-command--primary {
  border-color: rgba(124, 58, 237, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #f6f0ff 100%);
}

.shares-command--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #fff8eb 100%);
}

.shares-command__icon {
  display: inline-grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #7c3aed;
  background: #f1e8ff;
}

.shares-command--warning .shares-command__icon {
  color: #b45309;
  background: #fff2d8;
}

.shares-command strong,
.shares-command small {
  display: block;
}

.shares-command strong {
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.15;
}

.shares-command small {
  margin-top: 0.18rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 650;
}

.shares-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.shares-card-link:hover,
.shares-card-link:focus {
  color: inherit;
  text-decoration: none;
}

.shares-card-link .stat-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(252, 248, 255, 0.98)),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.12), transparent 55%);
}

.shares-card-link .stat-card::after {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  color: #a78bfa;
  font-family: "Font Awesome 5 Free";
  font-size: 0.78rem;
  font-weight: 900;
  content: "\f061";
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.shares-card-link:hover .stat-card::after,
.shares-card-link:focus .stat-card::after {
  opacity: 1;
  transform: translateX(0);
}

.shares-overview-card {
  height: 100%;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.shares-card-header-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}

.shares-card-header-link span {
  color: #7c3aed;
  font-size: 0.8rem;
  font-weight: 800;
}

.shares-card-header-link:hover,
.shares-card-header-link:focus {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, #f8f3ff 0%, #fff 100%);
}

.shares-table-row,
.shares-list-row {
  transition: background 0.18s ease;
}

.shares-table-row:hover,
.shares-list-row:hover {
  background: #fbf8ff;
}

@media (max-width: 1199.98px) {
  .shares-command-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767.98px) {
  .shares-command-panel {
    padding: 0.75rem;
    border-radius: 20px;
  }

  .shares-command-panel__intro {
    padding: 0.9rem;
  }

  .shares-command-grid {
    grid-template-columns: 1fr;
  }

  .shares-command {
    min-height: 64px;
  }
}

.structure-units-dashboard .page-inner {
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.08), transparent 30rem),
    linear-gradient(180deg, #f7fffd 0%, #ffffff 42%);
}

.structure-command-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 20%, rgba(20, 184, 166, 0.12), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 255, 253, 0.96));
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.structure-command-panel__intro {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #134e4a 0%, #0f766e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.structure-command-panel__eyebrow {
  margin-bottom: 0.45rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.structure-command-panel__intro h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.structure-command-panel__intro p {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.45;
}

.structure-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.structure-command {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem;
  border: 1px solid #d7eee9;
  border-radius: 18px;
  color: #1f2937;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.structure-command:hover,
.structure-command:focus-visible {
  border-color: rgba(20, 184, 166, 0.38);
  color: #0f766e;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 16px 32px rgba(20, 184, 166, 0.12);
  transform: translateY(-2px);
}

.structure-command:focus-visible,
.structure-card-link:focus-visible,
.structure-card-header-link:focus-visible {
  outline: 3px solid rgba(20, 184, 166, 0.22);
  outline-offset: 3px;
}

.structure-command--primary {
  border-color: rgba(20, 184, 166, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #effdfa 100%);
}

.structure-command__icon {
  display: inline-grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #0f766e;
  background: #dff9f4;
}

.structure-command strong,
.structure-command small {
  display: block;
}

.structure-command strong {
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.15;
}

.structure-command small {
  margin-top: 0.18rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 650;
}

.structure-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.structure-card-link:hover,
.structure-card-link:focus {
  color: inherit;
  text-decoration: none;
}

.structure-card-link .stat-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 255, 253, 0.98)),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 55%);
}

.structure-card-link .stat-card::after {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  color: #5eead4;
  font-family: "Font Awesome 5 Free";
  font-size: 0.78rem;
  font-weight: 900;
  content: "\f061";
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.structure-card-link:hover .stat-card::after,
.structure-card-link:focus .stat-card::after {
  opacity: 1;
  transform: translateX(0);
}

.structure-overview-card {
  height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfffe 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.structure-card-header-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -1rem -1rem 1rem;
  padding: 1rem;
  border-bottom: 1px solid #e8f2f0;
  border-radius: 22px 22px 0 0;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, #f6fffd 0%, #fff 100%);
  transition: color 0.18s ease, background 0.18s ease;
}

.structure-card-header-link span {
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 800;
}

.structure-card-header-link:hover,
.structure-card-header-link:focus {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, #eafffb 0%, #fff 100%);
}

.structure-card-header-link--static:hover,
.structure-card-header-link--static:focus {
  background: linear-gradient(180deg, #f6fffd 0%, #fff 100%);
}

.structure-filter-panel {
  padding: 1rem;
  border: 1px solid #dcefeb;
  border-radius: 18px;
  background: linear-gradient(135deg, #fbfffe 0%, #f5fffc 100%);
}

.structure-filter-panel .form-control,
.structure-filter-panel .form-select {
  min-height: 42px;
  border-color: #d5e7e3;
  border-radius: 12px;
  box-shadow: none;
}

.structure-filter-panel .form-control:focus,
.structure-filter-panel .form-select:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 0.22rem rgba(20, 184, 166, 0.12);
}

.structure-list-row,
.structure-table-row {
  transition: background 0.18s ease;
}

.structure-list-row:hover,
.structure-table-row:hover {
  background: #f6fffd;
}

.structure-unit-card .table-responsive {
  border: 1px solid #e8f2f0;
  border-radius: 16px;
}

@media (max-width: 1199.98px) {
  .structure-command-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767.98px) {
  .structure-command-panel {
    padding: 0.75rem;
    border-radius: 20px;
  }

  .structure-command-panel__intro {
    padding: 0.9rem;
  }

  .structure-command-grid {
    grid-template-columns: 1fr;
  }

  .structure-command {
    min-height: 64px;
  }

  .structure-card-header-link {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Smooth collapse/expand animation */
.collapse {
  transition: all 0.3s ease-in-out;
}

.nav-collapse {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
