:root{
  --app-bg: #f6f7fb;
  --app-card: #ffffff;
  --app-border: rgba(0,0,0,.08);
  --app-text: #111827;
  --app-muted: #6b7280;
  --app-primary: var(--brand-primary, #2F5BEA);
}

.app-body{
  background: var(--app-bg);
  color: var(--app-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.app-topbar{
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
}

.app-shell{
  display: flex;
  min-height: calc(100vh - 58px);
}

.app-sidebar{
  width: 280px;
  background: #fff;
  display: none;
}
@media (min-width: 992px){
  .app-sidebar{ display: block; }
}

.app-main{
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-container{
  max-width: 1200px;
}

.app-footer{
  padding: 14px 0;
  border-top: 1px solid var(--app-border);
  background: rgba(255,255,255,.7);
  margin-top: auto;
}

.app-brand{
  color: var(--app-text);
}
.app-logo{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(47,91,234,.12);
  color: var(--app-primary);
}

.btn-ghost{
  background: transparent;
  border: 1px solid transparent;
  color: var(--app-text);
}
.btn-ghost:hover{
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.06);
}

.app-card{
  border: 1px solid var(--app-border);
  border-radius: 16px;
}

.app-kpi-icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(47,91,234,.10);
  color: var(--app-primary);
  font-size: 20px;
}

.app-hero{
  background: linear-gradient(180deg, rgba(47,91,234,.08), rgba(255,255,255,1));
}

.app-hero-icon{
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(47,91,234,.14);
  color: var(--app-primary);
  font-size: 26px;
}

.table thead th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--app-muted);
}

.app-gallery-thumb{
  height: 160px;
  background-size: cover;
  background-position: center;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.app-content-text{
  white-space: pre-wrap;
}


/* Branding helpers */
.app-brand-badge{font-size:11px; letter-spacing:.08em}


/* Topbar brand spacing fixes */
.navbar .navbar-brand{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  min-width:0;
}
.app-logo.app-logo-initials{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:32px;
  border-radius:999px;
  background: rgba(47,91,234,.10);
  color: var(--app-primary);
  line-height:1;
  flex: 0 0 auto;
}
.navbar .navbar-brand .brand-title{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
