/**
 * IPS Portal — Soft white + muted lavender (easy on the eyes)
 */
:root,
html[data-ips-theme="light"] {
  --ips-primary: #3d4058;
  --ips-accent: #7b80c9;
  --ips-purple: #7b80c9;
  --ips-purple-strong: #6e73b8;
  --ips-purple-hover: #63689e;
  --ips-purple-soft: rgba(110, 115, 184, 0.1);
  --ips-purple-muted: rgba(110, 115, 184, 0.45);
  --ips-bg: #f0f1f6;
  --ips-surface: #ffffff;
  --ips-text: #2e3142;
  --ips-text-muted: #6b6f82;
  --ips-border: #e4e6ef;
  --ips-shadow: 0 1px 3px rgba(46, 49, 66, 0.05), 0 6px 20px rgba(46, 49, 66, 0.04);
  --ips-deco-color: #6e73b8;
  --ips-deco-strength: 0.09;
  --ips-radius: 1rem;
  --ips-radius-full: 9999px;
  --ips-font: "Plus Jakarta Sans", "Public Sans", system-ui, sans-serif;
  --ips-safe-bottom: env(safe-area-inset-bottom, 0px);
  --bs-primary: #7b80c9;
  --bs-primary-rgb: 123, 128, 201;
  --bs-body-bg: #f0f1f6;
  --bs-body-color: #2e3142;
}

html[data-ips-theme="dark"] {
  --ips-primary: #eceef8;
  --ips-accent: #a3a8e0;
  --ips-purple: #a3a8e0;
  --ips-purple-strong: #949ad4;
  --ips-purple-hover: #b4b9eb;
  --ips-purple-soft: rgba(163, 168, 224, 0.15);
  --ips-purple-muted: rgba(163, 168, 224, 0.45);
  --ips-bg: #12131a;
  --ips-surface: #1a1b24;
  --ips-text: #eceef4;
  --ips-text-muted: #9ea2b8;
  --ips-border: #2c2e3d;
  --ips-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --ips-deco-color: #949ad4;
  --ips-deco-strength: 0.14;
  --bs-primary: #a3a8e0;
  --bs-primary-rgb: 163, 168, 224;
  --bs-body-bg: #12131a;
  --bs-body-color: #eceef4;
}

/* ─── Ambient decoration (lightweight) ─── */
.ips-deco {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  color: var(--ips-deco-color);
  contain: strict;
}
.ips-deco__layer {
  position: absolute;
  color: inherit;
}
.ips-deco__rings {
  width: min(70vw, 420px);
  height: min(70vw, 420px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: var(--ips-deco-strength);
}
.ips-deco__mesh {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: calc(var(--ips-deco-strength) * 0.8);
}
@media (max-width: 991.98px) {
  .ips-deco--desktop { display: none; }
  .ips-deco__rings {
    width: min(90vw, 320px);
    height: min(90vw, 320px);
    opacity: calc(var(--ips-deco-strength) * 0.6);
  }
}
@media (max-width: 575.98px) {
  .ips-deco { display: none; }
}
body.ips-welcome,
body.ips-portal,
body.ips-portal-auth {
  min-height: 100dvh;
}

/* ─── IPS icon system (classic stroke SVG) ─── */
.ips-svg-logo {
  display: inline-flex;
  border-radius: var(--ips-radius-full);
  overflow: hidden;
  color: var(--ips-purple-strong);
  flex-shrink: 0;
}
.ips-svg-logo svg { display: block; }

.ips-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  color: var(--ips-purple-strong);
}
.ips-icon--sm { width: 1rem; height: 1rem; }
.ips-icon--nav { width: 1.125rem; height: 1.125rem; }
.ips-icon--lg { width: 1.5rem; height: 1.5rem; }
.ips-icon--xl { width: 2rem; height: 2rem; }

.ips-icon-wrap,
.ips-feature-icon,
.ips-plan-card__icon,
.ips-wifi-slide__icon,
.ips-menu-icon-wrap,
.ips-dock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ips-purple-strong);
}
.ips-icon-wrap svg,
.ips-feature-icon svg,
.ips-plan-card__icon svg,
.ips-wifi-slide__icon svg,
.ips-wifi-chip svg,
.ips-plan-feature-icon svg {
  width: 100%;
  height: 100%;
}
.ips-feature-icon { width: 3.5rem; height: 3.5rem; }
.ips-plan-card__icon { width: 2.75rem; height: 2.75rem; }
.ips-plan-feature-icon { width: 1.25rem; height: 1.25rem; display: inline-flex; }
.ips-dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  vertical-align: middle;
  color: var(--ips-purple-strong);
}
.ips-menu-icon-wrap {
  width: 1.75rem;
  height: 1.75rem;
}

.ips-hero-graphic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--ips-purple-strong);
  opacity: 0.85;
  pointer-events: none;
}
html[data-ips-theme="dark"] .ips-hero-graphic { opacity: 0.65; color: var(--ips-purple); }

/* ─── Buttons (solid, no gradients) ─── */
.ips-btn-primary,
body.ips-portal .btn-primary,
body.ips-portal-auth .btn-primary {
  background: var(--ips-purple-strong) !important;
  border: none !important;
  color: #fff !important;
  border-radius: var(--ips-radius-full) !important;
  font-weight: 600 !important;
  min-height: 48px;
  box-shadow: none !important;
}
.ips-btn-primary:hover,
body.ips-portal .btn-primary:hover { background: var(--ips-purple-hover) !important; color: #fff !important; }
.ips-btn-primary .ips-icon,
.ips-btn-accent .ips-icon { color: #fff !important; }

.ips-btn-accent,
body.ips-portal .btn-contact,
body.ips-portal .ips-btn-accent {
  background: var(--ips-purple-strong) !important;
  border: none !important;
  color: #fff !important;
  border-radius: var(--ips-radius-full) !important;
  font-weight: 600 !important;
  min-height: 48px;
}
.ips-btn-accent:hover,
body.ips-portal .btn-contact:hover { background: var(--ips-purple-hover) !important; color: #fff !important; }

.ips-btn-outline {
  background: var(--ips-surface) !important;
  border: 1.5px solid var(--ips-purple-muted) !important;
  color: var(--ips-purple-strong) !important;
  border-radius: var(--ips-radius-full) !important;
  font-weight: 600;
  min-height: 48px;
}
.ips-btn-outline:hover {
  background: var(--ips-purple-soft) !important;
  border-color: var(--ips-purple) !important;
  color: var(--ips-purple-strong) !important;
}

.ips-btn-ghost {
  background: transparent !important;
  border: 1px solid var(--ips-border) !important;
  color: var(--ips-text) !important;
  border-radius: var(--ips-radius-full) !important;
  min-height: 48px;
}
.ips-btn-sm { min-height: 40px; padding: 0.4rem 1.1rem; font-size: 0.875rem; }

/* ─── Theme toggle ─── */
.ips-theme-toggle { border: none; background: transparent; padding: 0.25rem; cursor: pointer; }
.ips-theme-toggle__track {
  width: 3.25rem; height: 1.75rem; border-radius: var(--ips-radius-full);
  background: var(--ips-surface); border: 1px solid var(--ips-border);
  padding: 2px; display: flex; align-items: center;
}
.ips-theme-toggle__thumb {
  width: 1.35rem; height: 1.35rem; border-radius: var(--ips-radius-full);
  background: var(--ips-purple-strong); display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease; position: relative;
}
.ips-theme-toggle .ips-theme-icon-light,
.ips-theme-toggle .ips-theme-icon-dark { position: absolute; width: 0.8rem; height: 0.8rem; color: #fff !important; transition: opacity 0.2s; }
.ips-theme-toggle .ips-icon { color: #fff !important; }
html[data-ips-theme="light"] .ips-theme-toggle .ips-theme-icon-dark { opacity: 0; }
html[data-ips-theme="dark"] .ips-theme-toggle .ips-theme-icon-light { opacity: 0; }
html[data-ips-theme="dark"] .ips-theme-toggle__thumb { transform: translateX(1.45rem); }
.ips-auth-theme-float { position: fixed; top: 1rem; right: 1rem; z-index: 1050; }

/* ─── Welcome page ─── */
body.ips-welcome {
  font-family: var(--ips-font);
  background: var(--ips-bg);
  color: var(--ips-text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.ips-welcome > .ips-welcome-header,
body.ips-welcome > main {
  flex-shrink: 0;
}
body.ips-welcome > main {
  flex: 1 0 auto;
}
body.ips-welcome > .ips-welcome-footer {
  flex-shrink: 0;
  width: 100%;
}
.ips-welcome-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ips-surface); border-bottom: 1px solid var(--ips-border);
  padding: 0.85rem 0;
}
.ips-welcome-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ips-welcome-brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ips-primary); font-weight: 800; font-size: 1.25rem; }
.ips-welcome-nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.ips-welcome-nav a:not(.ips-btn-accent) { color: var(--ips-text-muted); text-decoration: none; font-weight: 500; font-size: 0.9rem; }
.ips-welcome-nav a:not(.ips-btn-accent):hover { color: var(--ips-accent); }

.ips-welcome-hero {
  padding: 2.5rem 0 3rem;
  position: relative;
}
@media (min-width: 992px) {
  .ips-welcome-hero { padding: 3.5rem 0 4rem; }
}
.ips-welcome-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--ips-purple-soft) 0%, transparent 55%);
  pointer-events: none;
}
.ips-welcome-hero .container { position: relative; z-index: 1; }
.ips-welcome-eyebrow {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ips-purple-strong); margin-bottom: 0.75rem;
}
.ips-welcome-headline { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 800; line-height: 1.15; color: var(--ips-text); margin-bottom: 1rem; }
.ips-welcome-lead { font-size: 1.05rem; color: var(--ips-text-muted); line-height: 1.65; max-width: 32rem; margin-bottom: 1.75rem; }
.ips-welcome-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.ips-welcome-quicklinks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.875rem; }
.ips-welcome-quicklinks a { color: var(--ips-purple-strong); text-decoration: none; font-weight: 500; }
.ips-welcome-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  min-height: 200px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
@media (min-width: 992px) {
  .ips-welcome-hero-visual {
    min-height: 260px;
    max-width: 360px;
    padding: 1rem;
  }
}
.ips-welcome-hero-ring {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  border-radius: var(--ips-radius-full);
  border: 2px solid var(--ips-border);
  background: var(--ips-surface);
  box-shadow: var(--ips-shadow);
}
@media (min-width: 992px) {
  .ips-welcome-hero-ring { width: 200px; height: 200px; }
}

.ips-welcome-features { padding: 2rem 0 3rem; background: var(--ips-surface); border-top: 1px solid var(--ips-border); border-bottom: 1px solid var(--ips-border); }
.ips-feature-card {
  text-align: center; padding: 1.75rem 1.25rem; height: 100%;
  background: var(--ips-bg); border: 1px solid var(--ips-border); border-radius: var(--ips-radius);
}
.ips-feature-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--ips-text); margin: 0.75rem 0 0.5rem; }
.ips-feature-card p { font-size: 0.9rem; color: var(--ips-text-muted); margin: 0; line-height: 1.55; }
.ips-feature-icon {
  width: 3.5rem; height: 3.5rem; margin: 0 auto; border-radius: var(--ips-radius-full);
  background: var(--ips-purple-soft); border: 1px solid var(--ips-border);
  display: flex; align-items: center; justify-content: center;
}
.ips-feature-icon svg { width: 1.5rem; height: 1.5rem; color: var(--ips-purple-strong); }

.ips-welcome-plans { padding: 3.5rem 0; }
.ips-welcome-plans .container {
  max-width: 1320px;
}
.ips-welcome-plans-intro { margin-bottom: 2.5rem; }
.ips-welcome-plans-intro h2 { font-weight: 800; color: var(--ips-text); margin-bottom: 0.5rem; }
.ips-welcome-plans-intro p { color: var(--ips-text-muted); margin: 0; }

/* Five plans in one row (welcome + student/guest dashboards) */
.ips-plans-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
}
.ips-plans-grid__item {
  min-width: 0;
}
.ips-plans-grid .ips-plan-card__head {
  padding: 1rem 0.85rem 0.65rem;
  gap: 0.5rem;
}
.ips-plans-grid .ips-plan-card__icon {
  width: 2.35rem;
  height: 2.35rem;
}
.ips-plans-grid .ips-plan-card__title {
  font-size: 0.95rem;
  line-height: 1.25;
}
.ips-plans-grid .ips-plan-card__body {
  padding: 0.75rem 0.85rem;
}
.ips-plans-grid .ips-plan-card__desc {
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ips-plans-grid .ips-plan-card__price {
  margin-bottom: 0.65rem;
}
.ips-plans-grid .ips-plan-card__amount {
  font-size: 1.15rem;
}
.ips-plans-grid .ips-plan-card__period {
  font-size: 0.75rem;
  display: block;
}
.ips-plans-grid .ips-plan-card__features li {
  font-size: 0.78rem;
  padding: 0.3rem 0;
  gap: 0.45rem;
}
.ips-plans-grid .ips-plan-feature-icon {
  width: 1.65rem;
  height: 1.65rem;
}
.ips-plans-grid .ips-plan-card__foot {
  padding: 0 0.85rem 0.85rem;
}
.ips-plans-grid .ips-plan-card__foot .btn {
  font-size: 0.8rem;
  padding: 0.45rem 0.65rem;
  min-height: 40px;
}

.ips-welcome-start { padding: 3rem 0 4rem; background: var(--ips-surface); border-top: 1px solid var(--ips-border); }
.ips-welcome-start h2 { font-weight: 800; color: var(--ips-text); }
.ips-welcome-start p { color: var(--ips-text-muted); }

.ips-welcome-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--ips-border);
  font-size: 0.85rem;
  color: var(--ips-text-muted);
  margin-top: auto;
}
.ips-welcome-footer-brand {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.45rem;
  max-width: 100%;
}
.ips-welcome-footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.ips-welcome-footer-links a { color: var(--ips-text-muted); text-decoration: none; }
.ips-welcome-footer-links a:hover { color: var(--ips-accent); }

/* ─── Plan cards ─── */
.ips-plan-card {
  width: 100%;
  background: var(--ips-surface);
  border: 1px solid var(--ips-border);
  border-radius: var(--ips-radius);
  box-shadow: var(--ips-shadow);
  color: var(--ips-text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}
.ips-plan-card:hover {
  border-color: var(--ips-purple-muted);
  box-shadow: var(--ips-shadow), 0 0 0 1px var(--ips-purple-soft);
  transform: translateY(-4px);
}
.ips-plan-card__head {
  padding: 1.25rem 1.25rem 0.75rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem;
  border-bottom: 1px solid var(--ips-border);
}
.ips-plan-card__icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--ips-radius-full);
  background: var(--ips-purple-soft); border: 1px solid var(--ips-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ips-plan-card__icon svg { width: 1.35rem; height: 1.35rem; color: var(--ips-purple-strong); }
.ips-plan-card__title { font-size: 1.1rem; font-weight: 700; margin: 0; flex: 1; color: var(--ips-text); }
.ips-plan-card__badge {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem; border-radius: var(--ips-radius-full);
  background: var(--ips-purple-strong); color: #fff;
}
.ips-plan-card__body { padding: 1rem 1.25rem; }
.ips-plan-card__desc { font-size: 0.875rem; color: var(--ips-text-muted); margin-bottom: 0.75rem; line-height: 1.5; }
.ips-plan-card__price { margin-bottom: 1rem; }
.ips-plan-card__amount { font-size: 1.5rem; font-weight: 800; color: var(--ips-purple-strong); }
.ips-plan-card__period { font-size: 0.875rem; color: var(--ips-text-muted); }
.ips-plan-card__features { list-style: none; padding: 0; margin: 0; }
.ips-plan-card__features li {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.875rem; padding: 0.4rem 0; color: var(--ips-text-muted);
}
.ips-plan-feature-icon {
  width: 2rem; height: 2rem; border-radius: var(--ips-radius-full);
  background: var(--ips-bg); border: 1px solid var(--ips-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ips-plan-feature-icon svg { width: 1rem; height: 1rem; color: var(--ips-accent); }
.ips-plan-card__foot { padding: 0 1.25rem 1.25rem; }

/* ─── Portal app shell ─── */
body.ips-portal, body.ips-portal-auth { font-family: var(--ips-font) !important; -webkit-font-smoothing: antialiased; }
body.ips-portal .layout-wrapper { background: var(--ips-bg); min-height: 100dvh; }
body.ips-portal .content-wrapper { background: var(--ips-bg); }
body.ips-portal .modal {
  z-index: 1090 !important;
}
body.ips-portal .modal-backdrop {
  z-index: 1085 !important;
}
body.ips-portal-auth .modal {
  z-index: 1090 !important;
}
body.ips-portal-auth .modal-backdrop {
  z-index: 1085 !important;
}
@media (max-width: 1199.98px) {
  body.ips-portal .content-wrapper { padding-bottom: calc(5.5rem + var(--ips-safe-bottom)) !important; }
}

body.ips-portal .bg-menu-theme,
body.ips-portal .layout-menu {
  background: var(--ips-surface) !important;
  border-right: 1px solid var(--ips-border) !important;
}
body.ips-portal .app-brand-text,
body.ips-portal .menu-text {
  font-weight: 800 !important;
  color: var(--ips-purple-strong) !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}
html[data-ips-theme="dark"] body.ips-portal .app-brand-text { color: var(--ips-purple) !important; }
body.ips-portal .ips-brand-mark { display: inline-flex; align-items: center; gap: 0.5rem; }
body.ips-portal .ips-brand-mark .ips-svg-logo { color: var(--ips-purple-strong); }
body.ips-portal .menu-item.active > .menu-link {
  background: var(--ips-purple-soft) !important;
  color: var(--ips-purple-strong) !important;
  border-radius: var(--ips-radius);
}
body.ips-portal .menu-inner .menu-item.active::before {
  background: var(--ips-purple-strong) !important;
}
body.ips-portal .menu-link { border-radius: var(--ips-radius); color: var(--ips-text-muted) !important; }
body.ips-portal .menu-link:hover {
  background: var(--ips-purple-soft) !important;
  color: var(--ips-purple-strong) !important;
}
html[data-ips-theme="dark"] body.ips-portal .menu-header-text {
  color: var(--ips-text-muted) !important;
}
html[data-ips-theme="dark"] body.ips-portal .dropdown-menu {
  background: var(--ips-surface) !important;
  border-color: var(--ips-border) !important;
}
html[data-ips-theme="dark"] body.ips-portal .dropdown-item {
  color: var(--ips-text) !important;
}
html[data-ips-theme="dark"] body.ips-portal .dropdown-item:hover {
  background: var(--ips-purple-soft) !important;
}
html[data-ips-theme="dark"] body.ips-portal .layout-navbar .navbar-nav .nav-link,
html[data-ips-theme="dark"] body.ips-portal .layout-navbar .dropdown-toggle {
  color: var(--ips-text) !important;
}
html[data-ips-theme="dark"] body.ips-portal .footer,
html[data-ips-theme="dark"] body.ips-portal .content-footer {
  background: var(--ips-surface) !important;
  border-color: var(--ips-border) !important;
  color: var(--ips-text-muted) !important;
}
html[data-ips-theme="dark"] body.ips-welcome .ips-welcome-header,
html[data-ips-theme="dark"] body.ips-welcome .ips-welcome-features,
html[data-ips-theme="dark"] body.ips-welcome .ips-welcome-start {
  background: var(--ips-surface) !important;
}

.ips-menu-icon-wrap {
  width: 2rem; height: 2rem; border-radius: var(--ips-radius-full);
  border: 1px solid var(--ips-border); background: var(--ips-bg);
  display: inline-flex; align-items: center; justify-content: center; margin-right: 0.5rem;
}
.menu-item.active .ips-menu-icon-wrap { border-color: var(--ips-purple-muted); background: var(--ips-purple-strong); }
.menu-item.active .ips-menu-icon-wrap .ips-icon { color: #fff; }
.menu-link:hover .ips-menu-icon-wrap { border-color: var(--ips-purple-muted); background: var(--ips-purple-soft); }
.menu-link:hover .ips-menu-icon-wrap .ips-icon { color: var(--ips-purple-strong); }

body.ips-portal .layout-navbar,
body.ips-portal .bg-navbar-theme {
  background: var(--ips-surface) !important;
  border-bottom: 1px solid var(--ips-border) !important;
  box-shadow: var(--ips-shadow);
}
@media (max-width: 575.98px) {
  body.ips-portal .navbar-search-wrapper,
  body.ips-portal .dropdown-language { display: none !important; }
}

body.ips-portal .card {
  background: var(--ips-surface) !important;
  border: 1px solid var(--ips-border) !important;
  border-radius: var(--ips-radius) !important;
  box-shadow: var(--ips-shadow);
  color: var(--ips-text);
}
body.ips-portal .text-muted { color: var(--ips-text-muted) !important; }
body.ips-portal .text-primary { color: var(--ips-accent) !important; }
body.ips-portal h1, body.ips-portal h2, body.ips-portal h3,
body.ips-portal h4, body.ips-portal h5, body.ips-portal h6,
body.ips-portal .fw-bold, body.ips-portal .fw-semibold { color: var(--ips-text); }

body.ips-portal .ips-hero-card {
  background: var(--ips-surface) !important;
  border: 1px solid var(--ips-border) !important;
  border-left: 4px solid var(--ips-purple) !important;
}
body.ips-portal .ips-hero-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.75rem; border-radius: var(--ips-radius-full);
  font-size: 0.75rem; font-weight: 600;
  background: var(--ips-purple-soft); color: var(--ips-purple-strong);
  border: 1px solid var(--ips-border); margin-bottom: 0.75rem;
}

body.ips-portal .form-control,
body.ips-portal .form-select,
body.ips-portal .input-group-text,
body.ips-portal-auth .form-control,
body.ips-portal-auth .form-select,
body.ips-portal-auth .input-group-text {
  background: var(--ips-surface) !important;
  border: 1px solid var(--ips-border) !important;
  color: var(--ips-text) !important;
  border-radius: var(--ips-radius) !important;
  min-height: 48px;
}
body.ips-portal .form-control:focus,
body.ips-portal .form-select:focus,
body.ips-portal-auth .form-control:focus,
body.ips-portal-auth .form-select:focus {
  border-color: var(--ips-purple-strong) !important;
  box-shadow: 0 0 0 3px var(--ips-purple-soft) !important;
}
body.ips-portal .form-control::placeholder,
body.ips-portal-auth .form-control::placeholder {
  color: var(--ips-text-muted) !important;
}
body.ips-portal .form-label { color: var(--ips-text-muted); }

body.ips-portal .modal-content,
body.ips-portal-auth .modal-content,
body.ips-portal-auth .card {
  background: var(--ips-surface) !important;
  border: 1px solid var(--ips-border) !important;
  border-radius: var(--ips-radius) !important;
  color: var(--ips-text);
}
body.ips-portal .modal-header,
body.ips-portal .modal-footer,
body.ips-portal-auth .modal-header,
body.ips-portal-auth .modal-footer {
  border-color: var(--ips-border) !important;
}
body.ips-portal .modal .btn-close,
body.ips-portal-auth .modal .btn-close {
  filter: none;
}
html[data-ips-theme="dark"] body.ips-portal .modal .btn-close,
html[data-ips-theme="dark"] body.ips-portal-auth .modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
body.ips-pwa-screen-open .modal {
  z-index: 1120 !important;
}
body.ips-pwa-screen-open .modal-backdrop {
  z-index: 1115 !important;
}
body.ips-portal .subscription-loader-overlay { background: rgba(255, 255, 255, 0.92) !important; }
html[data-ips-theme="dark"] body.ips-portal .subscription-loader-overlay { background: rgba(18, 19, 26, 0.94) !important; }

body.ips-portal .table { color: var(--ips-text); }
body.ips-portal .progress { background: var(--ips-border); border-radius: var(--ips-radius-full); height: 0.5rem !important; }
body.ips-portal .progress-bar { background: var(--ips-accent) !important; border-radius: var(--ips-radius-full); }
body.ips-portal .ips-datatable-enhanced .dataTables_filter,
.ips-datatable-enhanced .dataTables_filter {
  display: none !important;
}

.ips-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--ips-border, rgba(123, 128, 201, 0.16));
  border-radius: 1rem;
  background: var(--ips-surface, #fff);
  box-shadow: var(--ips-shadow);
}

.ips-table-toolbar__primary {
  flex: 1 1 14rem;
}

.ips-table-toolbar__meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 12rem;
}

.ips-table-toolbar__title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ips-text, #2e3142);
  line-height: 1.2;
}

.ips-table-toolbar__summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.ips-table-toolbar__count {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--ips-border);
  border-radius: 999px;
  background: var(--ips-purple-soft);
  color: var(--ips-text, #2e3142);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ips-table-toolbar__hint {
  font-size: 0.78rem;
  color: var(--ips-text-muted, #6b6f82);
}

.ips-table-toolbar__controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.85rem 1rem;
  flex-wrap: wrap;
  flex: 999 1 42rem;
}

.ips-table-toolbar__inputs {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1 1 28rem;
}

.ips-table-toolbar__secondary {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ips-table-search {
  position: relative;
  flex: 1 1 18rem;
  max-width: 22rem;
  min-width: min(100%, 18rem);
  margin: 0;
}

.ips-table-search i {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  color: var(--ips-text-muted, #6b6f82);
  font-size: 1rem;
  pointer-events: none;
}

.ips-table-search .form-control {
  min-width: 100%;
  min-height: 2.75rem;
  padding-left: 2.45rem !important;
  border-radius: 0.85rem !important;
}

.ips-table-toolbar__filters {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1 1 24rem;
}

.ips-table-filter {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 0 1 12rem;
  min-width: 10rem;
  margin: 0;
}

.ips-table-filter__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ips-text-muted, #6b6f82);
}

.ips-table-filter .form-select {
  min-width: 10rem;
  min-height: 2.75rem;
  border-radius: 0.85rem !important;
}

.ips-table-toolbar__length,
.ips-table-toolbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ips-table-toolbar__length[hidden],
.ips-table-toolbar__actions[hidden] {
  display: none !important;
}

.ips-table-length-control {
  margin: 0;
}

.ips-table-length-control label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--ips-text-muted, #6b6f82);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.ips-table-length-control select {
  min-width: 5.5rem;
  min-height: 2.75rem;
  border-radius: 0.85rem !important;
}

.ips-table-toolbar__actions-label {
  color: var(--ips-text-muted, #6b6f82);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ips-table-toolbar__actions .btn {
  box-shadow: none !important;
}

.ips-table-toolbar__actions .btn-outline-success {
  border-color: rgba(40, 199, 111, 0.28);
  color: #28c76f;
  background: rgba(40, 199, 111, 0.08);
}

.ips-table-toolbar__actions .btn-outline-success:hover,
.ips-table-toolbar__actions .btn-outline-success:focus,
.ips-table-toolbar__actions .btn-outline-success:active {
  border-color: #28c76f;
  color: #fff;
  background: #28c76f;
}

.ips-table-toolbar__actions .btn-outline-danger {
  border-color: rgba(234, 84, 85, 0.28);
  color: #ea5455;
  background: rgba(234, 84, 85, 0.08);
}

.ips-table-toolbar__actions .btn-outline-danger:hover,
.ips-table-toolbar__actions .btn-outline-danger:focus,
.ips-table-toolbar__actions .btn-outline-danger:active {
  border-color: #ea5455;
  color: #fff;
  background: #ea5455;
}

.ips-table-toolbar__actions .btn,
.ips-table-toolbar__clear {
  min-height: 2.75rem;
  border-radius: 0.85rem !important;
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.ips-table-toolbar__clear {
  border-color: var(--ips-border) !important;
  background: var(--ips-surface) !important;
  color: var(--ips-text-muted) !important;
}

.ips-table-toolbar__clear:hover,
.ips-table-toolbar__clear:focus,
.ips-table-toolbar__clear:active {
  border-color: var(--ips-purple-strong) !important;
  background: var(--ips-purple-soft) !important;
  color: var(--ips-text) !important;
}

.ips-datatable-topbar-hidden {
  display: none !important;
}

.ips-table-empty-state td {
  background: transparent !important;
}

@media (max-width: 767.98px) {
  .ips-table-toolbar {
    padding: 0.85rem;
  }

  .ips-table-toolbar__primary,
  .ips-table-toolbar__meta,
  .ips-table-toolbar__controls,
  .ips-table-toolbar__inputs,
  .ips-table-toolbar__secondary,
  .ips-table-search,
  .ips-table-toolbar__filters,
  .ips-table-filter,
  .ips-table-filter .form-select,
  .ips-table-toolbar__length,
  .ips-table-toolbar__actions {
    width: 100%;
    min-width: 100%;
  }

  .ips-table-search {
    max-width: none;
  }

  .ips-table-length-control,
  .ips-table-length-control label {
    width: 100%;
  }

  .ips-table-length-control label {
    justify-content: space-between;
  }

  .ips-table-toolbar__clear {
    width: 100%;
    justify-content: center;
  }
}

body.ips-portal .alert-warning {
  background: var(--ips-bg) !important;
  border: 1px solid var(--ips-border) !important;
  color: var(--ips-text) !important;
}
body.ips-portal .btn-label-secondary { border-radius: var(--ips-radius-full) !important; }

/* Auth */
body.ips-portal-auth { min-height: 100dvh; background: var(--ips-bg) !important; }
body.ips-portal-auth .authentication-wrapper,
body.ips-portal-auth .authentication-cover { min-height: 100dvh; position: relative; z-index: 1; }
body.ips-portal-auth .authentication-basic {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 1.25rem;
}
body.ips-portal-auth .app-brand-text,
body.ips-portal-auth h2.app-brand-text {
  font-weight: 800 !important;
  color: var(--ips-purple) !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}
body.ips-portal-auth .ips-auth-logo { text-align: center; margin-bottom: 1.5rem; }
body.ips-portal-auth .ips-auth-tagline { font-size: 0.875rem; color: var(--ips-text-muted); line-height: 1.55; }
body.ips-portal-auth .ips-auth-shield {
  width: 4.5rem; height: 4.5rem; margin: 0 auto; border-radius: var(--ips-radius-full);
  background: var(--ips-purple); display: flex; align-items: center; justify-content: center;
}
body.ips-portal-auth .ips-auth-shield .ips-icon { width: 2rem; height: 2rem; color: #fff; }
body.ips-portal-auth .btn-outline-danger {
  border-radius: var(--ips-radius-full) !important;
  border-color: #dc3545 !important;
}

/* Mobile dock */
@media (max-width: 1199.98px) {
  .ips-mobile-dock {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1080;
    padding: 0.5rem 0.75rem calc(0.5rem + var(--ips-safe-bottom));
    background: var(--ips-surface); border-top: 1px solid var(--ips-border);
    justify-content: space-around; align-items: center; box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  }
  .ips-mobile-dock a, .ips-mobile-dock button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    border: none; background: transparent; color: var(--ips-text-muted);
    text-decoration: none; font-size: 0.65rem; font-weight: 600; min-height: 52px;
  }
  .ips-dock-icon {
    width: 2.5rem; height: 2.5rem; border-radius: var(--ips-radius-full);
    border: 1px solid var(--ips-border); background: var(--ips-bg);
    display: flex; align-items: center; justify-content: center;
  }
  .ips-dock-icon .ips-icon { color: var(--ips-text-muted); }
  .ips-mobile-dock a.active .ips-dock-icon,
  .ips-mobile-dock a:hover .ips-dock-icon { background: var(--ips-purple-strong); border-color: transparent; }
  .ips-mobile-dock a.active .ips-icon,
  .ips-mobile-dock a:hover .ips-icon { color: #fff; }
  .ips-mobile-dock a.active { color: var(--ips-purple-strong); }
}
.ips-mobile-dock { display: none; }

body.ips-portal .layout-menu-toggle .ips-icon,
body.ips-portal .layout-menu-toggle { color: var(--ips-purple-strong) !important; }

/* ─── Partner logo marquee (public/frontend/logos) ─── */
.ips-logo-marquee-section {
  margin-bottom: 1.75rem;
}
.ips-logo-marquee-section__label {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ips-text-muted);
  margin: 0 0 0.75rem;
}
.ips-logo-marquee-section__lipapay {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  margin: 0 auto 1rem;
  padding: 0.5rem 0;
  text-align: center;
  width: fit-content;
  max-width: 100%;
}
.ips-logo-marquee-section__lipapay-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 7.5rem;
  height: 2.75rem;
  line-height: 0;
}
.ips-logo-marquee-section__lipapay-brand .ips-partner-logo-img {
  display: block;
  width: auto;
  height: 2.5rem;
  max-width: 7rem;
  max-height: 2.75rem;
  object-fit: contain;
}
.ips-logo-marquee-section__lipapay-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ips-text-muted);
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
}
.ips-welcome-footer-lipapay {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  vertical-align: middle;
}
.ips-welcome-footer-lipapay-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 4.5rem;
  height: 1.35rem;
  line-height: 0;
  overflow: hidden;
}
.ips-welcome-footer-lipapay-brand .ips-partner-logo-img {
  width: auto;
  height: 1.25rem;
  max-width: 4.25rem;
  max-height: 1.25rem;
  opacity: 0.9;
}
.ips-welcome-footer-lipapay-text {
  font-weight: 600;
  white-space: nowrap;
}
.ips-logo-marquee {
  position: relative;
  overflow: hidden;
  background: var(--ips-surface);
  border: 1px solid var(--ips-border);
  border-radius: var(--ips-radius);
  padding: 1.1rem 0;
  box-shadow: var(--ips-shadow);
}
.ips-logo-marquee__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3.5rem;
  z-index: 2;
  pointer-events: none;
}
.ips-logo-marquee__fade--left {
  left: 0;
  background: linear-gradient(90deg, var(--ips-surface) 30%, transparent);
}
.ips-logo-marquee__fade--right {
  right: 0;
  background: linear-gradient(270deg, var(--ips-surface) 30%, transparent);
}
.ips-logo-marquee__track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: max-content;
  animation: ips-logo-scroll 36s linear infinite;
  padding: 0 1rem;
}
.ips-logo-marquee:hover .ips-logo-marquee__track {
  animation-play-state: paused;
}
@keyframes ips-logo-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ips-logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.1rem 0.55rem 0.55rem;
  background: var(--ips-bg);
  border: 1px solid var(--ips-border);
  border-radius: var(--ips-radius-full);
  flex-shrink: 0;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.ips-logo-pill:hover {
  border-color: var(--ips-purple-muted);
  box-shadow: 0 4px 14px var(--ips-purple-soft);
}
.ips-logo-pill__img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 2.5rem;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--ips-border);
}
.ips-logo-pill__img img {
  max-width: 100%;
  max-height: 2rem;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(15%);
  opacity: 0.92;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.ips-logo-pill:hover .ips-logo-pill__img img {
  filter: grayscale(0%);
  opacity: 1;
}
.ips-logo-pill__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ips-text-muted);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.ips-logo-pill:hover .ips-logo-pill__name {
  color: var(--ips-purple-strong);
}

/* ─── WiFi insights ─── */
.ips-wifi-insights {
  margin-top: 2.5rem;
  padding: 0 0 1rem;
  border-top: 1px solid var(--ips-border);
  padding-top: 2rem;
}
.ips-wifi-insights__header { margin-bottom: 1.25rem; }
.ips-wifi-insights__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ips-text);
  margin: 0 0 0.25rem;
}
.ips-wifi-insights__subtitle { margin: 0; font-size: 0.9rem; color: var(--ips-text-muted); }

.ips-wifi-carousel {
  background: var(--ips-surface);
  border: 1px solid var(--ips-border);
  border-radius: var(--ips-radius);
  box-shadow: var(--ips-shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  min-height: 140px;
}
.ips-wifi-carousel__slides { position: relative; min-height: 100px; }
.ips-wifi-slide {
  display: none;
  align-items: flex-start;
  gap: 1.25rem;
  animation: ips-fade-in 0.4s ease;
}
.ips-wifi-slide.is-active { display: flex; }
@keyframes ips-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.ips-wifi-slide__icon {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--ips-radius-full);
  background: var(--ips-purple-soft);
  border: 1px solid var(--ips-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ips-wifi-slide__icon svg { width: 1.5rem; height: 1.5rem; color: var(--ips-purple-strong); }
.ips-wifi-slide__content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ips-text);
  margin: 0 0 0.4rem;
}
.ips-wifi-slide__content p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ips-text-muted);
}
.ips-wifi-slide__content a { color: var(--ips-purple-strong); font-weight: 600; }
.ips-wifi-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.ips-wifi-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--ips-radius-full);
  border: none;
  padding: 0;
  background: var(--ips-border);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.ips-wifi-dot.is-active {
  background: var(--ips-purple-strong);
  transform: scale(1.15);
}

.ips-wifi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 576px) {
  .ips-wifi-grid { grid-template-columns: repeat(4, 1fr); }
}
.ips-wifi-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--ips-surface);
  border: 1px solid var(--ips-border);
  border-radius: var(--ips-radius);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ips-text-muted);
}
.ips-wifi-chip svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ips-purple-strong);
  flex-shrink: 0;
}

/* ─── PWA install (full-screen, one tap) ─── */
.ips-pwa-screen[hidden] {
  display: none !important;
}
.ips-pwa-screen {
  position: fixed;
  inset: 0;
  z-index: 1110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  padding-bottom: calc(1.25rem + var(--ips-safe-bottom));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.ips-pwa-screen.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
.ips-pwa-screen__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 29, 40, 0.55);
  backdrop-filter: blur(8px);
}
.ips-pwa-screen__dialog {
  position: relative;
  width: 100%;
  max-width: 22rem;
  background: var(--ips-surface);
  border-radius: 1.35rem;
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(28, 29, 40, 0.2);
  border: 1px solid var(--ips-border);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.ips-pwa-screen.is-open .ips-pwa-screen__dialog {
  transform: scale(1) translateY(0);
}
.ips-pwa-screen__icon-wrap img {
  width: 5rem;
  height: 5rem;
  border-radius: 1.1rem;
  box-shadow: 0 8px 24px var(--ips-purple-soft);
  margin-bottom: 0.75rem;
}
.ips-pwa-screen__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ips-purple-strong);
  background: var(--ips-purple-soft);
  padding: 0.25rem 0.65rem;
  border-radius: var(--ips-radius-full);
  margin: 0 0 0.5rem;
}
.ips-pwa-screen__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ips-text);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.ips-pwa-screen__status {
  font-size: 0.88rem;
  color: var(--ips-text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}
.ips-pwa-screen__install {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: var(--ips-radius-full);
  background: var(--ips-purple-strong);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(110, 115, 184, 0.35);
  transition: background 0.2s, transform 0.15s;
}
.ips-pwa-screen__install:hover:not(:disabled) {
  background: var(--ips-purple-hover);
}
.ips-pwa-screen__install:active:not(:disabled) {
  transform: scale(0.98);
}
.ips-pwa-screen__install:disabled,
.ips-pwa-screen__install.is-loading {
  opacity: 0.85;
  cursor: wait;
}
.ips-pwa-screen__later {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--ips-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.ips-pwa-screen__later:hover { color: var(--ips-text); }
.ips-pwa-screen__panel[hidden] { display: none !important; }
.ips-pwa-screen__hint {
  font-size: 0.8rem;
  color: var(--ips-text-muted);
  margin: 0 0 1rem;
}
.ips-pwa-screen__steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  text-align: left;
}
.ips-pwa-screen__steps li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.4;
}
.ips-pwa-screen__step-n {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--ips-purple-strong);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ips-pwa-screen__steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ips-pwa-screen__steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.86rem;
  color: var(--ips-text);
  line-height: 1.4;
}
.ips-pwa-screen__step-n {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--ips-radius-full);
  background: var(--ips-purple-strong);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ips-pwa-screen__ios-share {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: middle;
  background: var(--ips-purple-soft);
  border-radius: 0.2rem;
  position: relative;
}
.ips-pwa-screen__ios-share::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 20%;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid var(--ips-purple-strong);
  transform: translateX(-50%);
}

body.ips-pwa-screen-open .ips-mobile-dock {
  visibility: hidden;
  pointer-events: none;
}

.ips-install-page-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.ips-install-page-card {
  max-width: 22rem;
  width: 100%;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--ips-surface);
  border: 1px solid var(--ips-border);
  border-radius: 1.25rem;
  box-shadow: var(--ips-shadow);
}
.ips-install-page-card__icon {
  border-radius: 1.1rem;
  box-shadow: 0 8px 24px var(--ips-purple-soft);
  margin-bottom: 1rem;
}
.ips-install-page-card h1 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}
.ips-install-page-card__lead {
  color: var(--ips-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.ips-install-check {
  text-align: left;
  font-size: 0.75rem;
  color: var(--ips-text-muted);
  background: var(--ips-bg);
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.ips-install-check__line { margin: 0.2rem 0; }

@media (prefers-reduced-motion: reduce) {
  .ips-plan-card, .ips-theme-toggle__thumb,
  .ips-logo-marquee__track,
  .ips-pwa-screen, .ips-pwa-screen__dialog {
    transition: none !important;
    animation: none !important;
  }
}

/* ─── Admin dashboard (classic SaaS / product-grade) ─── */
body.ips-portal .ips-dash {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.ips-portal .ips-dash-hero {
  position: relative;
  overflow: hidden;
  padding: 1.75rem 1.75rem 1.5rem;
  border-radius: calc(var(--ips-radius) + 4px);
  background: linear-gradient(135deg, var(--ips-surface) 0%, var(--ips-bg) 55%, var(--ips-surface) 100%);
  border: 1px solid var(--ips-border);
  box-shadow: var(--ips-shadow);
}
body.ips-portal .ips-dash-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -8%;
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  border-radius: 50%;
  background: radial-gradient(circle, var(--ips-purple-soft) 0%, transparent 68%);
  pointer-events: none;
}
body.ips-portal .ips-dash-hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 128, 201, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
body.ips-portal .ips-dash-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}
body.ips-portal .ips-dash-hero__title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  color: var(--ips-text);
}
body.ips-portal .ips-dash-hero__sub {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ips-text-muted);
  max-width: 36rem;
  line-height: 1.55;
}
body.ips-portal .ips-dash-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  color: var(--ips-text-muted);
}
body.ips-portal .ips-dash-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
body.ips-portal .ips-dash-hero__actions .btn {
  border-radius: var(--ips-radius-full);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.5rem 1.1rem;
}
body.ips-portal .ips-dash-hero__actions .ips-btn-accent {
  box-shadow: 0 4px 14px var(--ips-purple-soft);
}

body.ips-portal .ips-dash-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1199.98px) {
  body.ips-portal .ips-dash-kpi { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  body.ips-portal .ips-dash-kpi { grid-template-columns: 1fr; }
}

body.ips-portal .ips-dash-kpi-card {
  position: relative;
  padding: 1.25rem 1.35rem;
  background: var(--ips-surface);
  border: 1px solid var(--ips-border);
  border-radius: var(--ips-radius);
  box-shadow: var(--ips-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}
body.ips-portal .ips-dash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(46, 49, 66, 0.08);
  border-color: rgba(110, 115, 184, 0.35);
}
body.ips-portal .ips-dash-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ips-purple-strong), var(--ips-accent));
  opacity: 0.85;
}
body.ips-portal .ips-dash-kpi-card--users::before {
  background: linear-gradient(90deg, #5b9bd5, #7eb8e8);
}
body.ips-portal .ips-dash-kpi-card--plans::before {
  background: linear-gradient(90deg, #6bc9a8, #8edfc4);
}
body.ips-portal .ips-dash-kpi-card--pending::before {
  background: linear-gradient(90deg, #e8a54b, #f0c078);
}
body.ips-portal .ips-dash-kpi-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
body.ips-portal .ips-dash-kpi-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ips-text-muted);
}
body.ips-portal .ips-dash-kpi-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--ips-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ips-purple-soft);
  color: var(--ips-purple-strong);
  flex-shrink: 0;
}
body.ips-portal .ips-dash-kpi-card--users .ips-dash-kpi-card__icon {
  background: rgba(91, 155, 213, 0.12);
  color: #5b9bd5;
}
body.ips-portal .ips-dash-kpi-card--plans .ips-dash-kpi-card__icon {
  background: rgba(107, 201, 168, 0.12);
  color: #4db896;
}
body.ips-portal .ips-dash-kpi-card--pending .ips-dash-kpi-card__icon {
  background: rgba(232, 165, 75, 0.14);
  color: #d4922e;
}
body.ips-portal .ips-dash-kpi-card__value {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  color: var(--ips-text);
}
body.ips-portal .ips-dash-kpi-card__hint {
  font-size: 0.8125rem;
  color: var(--ips-text-muted);
  margin: 0.35rem 0 0;
}

body.ips-portal .ips-dash-analytics {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 1rem;
  align-items: stretch;
}
@media (max-width: 991.98px) {
  body.ips-portal .ips-dash-analytics { grid-template-columns: 1fr; }
}

body.ips-portal .ips-dash-panel {
  background: var(--ips-surface);
  border: 1px solid var(--ips-border);
  border-radius: calc(var(--ips-radius) + 2px);
  box-shadow: var(--ips-shadow);
  overflow: hidden;
}
body.ips-portal .ips-dash-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--ips-border);
}
body.ips-portal .ips-dash-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ips-text);
}
body.ips-portal .ips-dash-panel__desc {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: var(--ips-text-muted);
}
body.ips-portal .ips-dash-panel__body {
  padding: 1rem 1.25rem 1.35rem;
}
body.ips-portal .ips-dash-panel__body--chart {
  padding: 0.5rem 0.75rem 1rem;
}
body.ips-portal .ips-dash-panel__body--compact {
  padding: 1.25rem;
}

body.ips-portal .ips-dash-growth {
  display: flex;
  flex-direction: column;
  height: 100%;
}
body.ips-portal .ips-dash-growth__chart {
  flex: 1;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.ips-portal .ips-dash-growth__label {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ips-text);
  margin: 0 0 1rem;
}
body.ips-portal .ips-dash-growth__label span {
  color: var(--ips-purple-strong);
}
body.ips-portal .ips-dash-year-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: auto;
}
body.ips-portal .ips-dash-year-pill {
  padding: 0.85rem 1rem;
  border-radius: var(--ips-radius);
  background: var(--ips-bg);
  border: 1px solid var(--ips-border);
}
body.ips-portal .ips-dash-year-pill__year {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ips-text-muted);
  margin-bottom: 0.25rem;
}
body.ips-portal .ips-dash-year-pill__amount {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ips-text);
  margin: 0;
}

body.ips-portal .ips-dash-feed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 991.98px) {
  body.ips-portal .ips-dash-feed-grid { grid-template-columns: 1fr; }
}

body.ips-portal .ips-dash-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
body.ips-portal .ips-dash-feed-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--ips-border);
  transition: background 0.15s ease;
}
body.ips-portal .ips-dash-feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
body.ips-portal .ips-dash-feed-item:first-child {
  padding-top: 0;
}
body.ips-portal .ips-dash-feed-item__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--ips-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.75rem;
  background: var(--ips-purple-soft);
  color: var(--ips-purple-strong);
}
body.ips-portal .ips-dash-feed-item__avatar--success {
  background: rgba(40, 167, 69, 0.12);
  color: #28a745;
}
body.ips-portal .ips-dash-feed-item__avatar--warning {
  background: rgba(255, 193, 7, 0.15);
  color: #c9a227;
}
body.ips-portal .ips-dash-feed-item__avatar--danger {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}
body.ips-portal .ips-dash-feed-item__avatar--info {
  background: rgba(3, 195, 236, 0.1);
  color: #03a3c4;
}
body.ips-portal .ips-dash-feed-item__main {
  flex: 1;
  min-width: 0;
}
body.ips-portal .ips-dash-feed-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
body.ips-portal .ips-dash-feed-item__name {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  color: var(--ips-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ips-portal .ips-dash-feed-item__amount {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ips-text);
  white-space: nowrap;
}
body.ips-portal .ips-dash-feed-item__amount--danger {
  color: #dc3545;
}
body.ips-portal .ips-dash-feed-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--ips-text-muted);
}
body.ips-portal .ips-dash-status {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--ips-radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: capitalize;
}
body.ips-portal .ips-dash-status--approved {
  background: rgba(40, 167, 69, 0.12);
  color: #28a745;
}
body.ips-portal .ips-dash-status--pending {
  background: rgba(255, 193, 7, 0.15);
  color: #b8860b;
}
body.ips-portal .ips-dash-status--rejected {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}
body.ips-portal .ips-dash-status--default {
  background: var(--ips-bg);
  color: var(--ips-text-muted);
}

body.ips-portal .ips-dash-activity {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
body.ips-portal .ips-dash-activity::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--ips-purple-strong), var(--ips-border));
  border-radius: 2px;
  opacity: 0.5;
}
body.ips-portal .ips-dash-activity-item {
  position: relative;
  padding: 0 0 1.15rem 2.75rem;
}
body.ips-portal .ips-dash-activity-item:last-child {
  padding-bottom: 0;
}
body.ips-portal .ips-dash-activity-item__dot {
  position: absolute;
  left: 0.65rem;
  top: 0.35rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 2px solid var(--ips-surface);
  box-shadow: 0 0 0 2px var(--ips-purple-soft);
  background: var(--ips-purple-strong);
}
body.ips-portal .ips-dash-activity-item__dot--success { background: #28a745; box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2); }
body.ips-portal .ips-dash-activity-item__dot--warning { background: #e8a54b; box-shadow: 0 0 0 2px rgba(232, 165, 75, 0.25); }
body.ips-portal .ips-dash-activity-item__dot--danger { background: #dc3545; box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2); }
body.ips-portal .ips-dash-activity-item__dot--info { background: #03c3ec; box-shadow: 0 0 0 2px rgba(3, 195, 236, 0.2); }
body.ips-portal .ips-dash-activity-item__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
body.ips-portal .ips-dash-activity-item__title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  color: var(--ips-text);
}
body.ips-portal .ips-dash-activity-item__time {
  font-size: 0.6875rem;
  color: var(--ips-text-muted);
  white-space: nowrap;
}
body.ips-portal .ips-dash-activity-item__desc {
  font-size: 0.8125rem;
  color: var(--ips-text-muted);
  margin: 0 0 0.25rem;
  line-height: 1.45;
}
body.ips-portal .ips-dash-activity-item__tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ips-purple-strong);
}

body.ips-portal .ips-dash-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ips-text-muted);
  font-size: 0.875rem;
}
body.ips-portal .ips-dash-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ips-purple-strong);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: var(--ips-radius-full);
  padding: 0.35rem 0.75rem;
  transition: background 0.15s ease;
}
body.ips-portal .ips-dash-link:hover {
  background: var(--ips-purple-soft);
  color: var(--ips-purple-hover);
}
body.ips-portal .ips-dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--ips-radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--ips-purple-soft);
  color: var(--ips-purple-strong);
  border: 1px solid var(--ips-border);
}
