/* Author: Hariyo */
/* Architect: Himself */
/* ==========================================================================
   ANDIKA ENERGINDO — MASTER ENTERPRISE LIGHT DESIGN SYSTEM (2026.1)
   Canonical Stylesheet: /css/andika-enterprise-2026.css
   Chief Architect: Hariyo
   ========================================================================== */

:root {
  color-scheme: light;

  /* 1. Surfaces (Light Theme Only) */
  --ae-bg-canvas: #f8fafc;
  --ae-bg-subtle: #f1f5f9;
  --ae-bg-surface: #ffffff;
  --ae-bg-hover: #f8fafc;

  /* 2. Brand & Sovereign Navy */
  --ae-navy-900: #0d1e33;
  --ae-navy-800: #102a56;
  --ae-brand-primary: #0867c9;
  --ae-brand-hover: #0759ad;
  --ae-brand-active: #064b91;
  --ae-brand-soft: #eff6ff;
  --ae-accent-gold: #ffbf18;

  /* 3. Typography Colors */
  --ae-text-primary: #0f172a;
  --ae-text-body: #334155;
  --ae-text-secondary: #475569;
  --ae-text-muted: #64748b;
  --ae-text-disabled: #94a3b8;

  /* 4. Borders & Focus */
  --ae-border-subtle: #f1f5f9;
  --ae-border-default: #e2e8f0;
  --ae-border-strong: #cbd5e1;
  --ae-focus-ring: rgba(8, 103, 201, 0.14);
  --ae-overlay-scrim: rgba(15, 23, 42, 0.60);

  /* 5. Semantic Status */
  --ae-success: #15803d;
  --ae-success-bg: #dcfce7;
  --ae-success-border: #bbf7d0;
  --ae-warning: #b45309;
  --ae-warning-bg: #fef3c7;
  --ae-warning-border: #fde68a;
  --ae-danger: #dc2626;
  --ae-danger-bg: #fee2e2;
  --ae-danger-border: #fca5a5;
  --ae-info: #0369a1;
  --ae-info-bg: #e0f2fe;
  --ae-info-border: #bae6fd;

  /* 6. Module Identity Accents */
  --ae-mod-dashboard: #0072c3;
  --ae-mod-cakap: #0f62fe;
  --ae-mod-sentra: #198038;
  --ae-mod-rembuk: #ff832b;
  --ae-mod-rhytem: #8a3ffc;
  --ae-mod-k3: #da1e28;
  --ae-mod-nara: #1192e8;

  /* 7. Geometry & Fonts */
  --ae-sidebar-w: 248px;
  --ae-sidebar-rail-w: 64px;
  --ae-topbar-h: 64px;
  --ae-radius-xs: 6px;
  --ae-radius-sm: 8px;
  --ae-radius-md: 12px;
  --ae-radius-lg: 14px;
  --ae-radius-xl: 20px;
  --ae-shadow-card: 0 2px 8px -2px rgba(15, 23, 42, 0.05), 0 1px 3px -1px rgba(15, 23, 42, 0.03);
  --ae-shadow-hover: 0 12px 28px -8px rgba(15, 23, 42, 0.10), 0 4px 10px -3px rgba(15, 23, 42, 0.04);
  --ae-shadow-modal: 0 24px 60px -12px rgba(15, 23, 42, 0.28);
  --ae-font-sans: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ae-font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  /* 8. Backwards-Compatible Legacy Aliases (IAM & Portal Modules) */
  --bg-body: var(--ae-bg-canvas);
  --bg-card: var(--ae-bg-surface);
  --text-primary: var(--ae-text-primary);
  --text-secondary: var(--ae-text-secondary);
  --text-muted: var(--ae-text-muted);
  --brand-blue: var(--ae-brand-primary);
  --brand-blue-hover: var(--ae-brand-hover);
  --border: var(--ae-border-default);
  --radius-card: var(--ae-radius-lg);
  --font-sans: var(--ae-font-sans);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background: var(--ae-bg-canvas);
  color: var(--ae-text-body);
  font-family: var(--ae-font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   1. TYPOGRAPHY, PARAGRAPH, & TABULAR NUMBER UTILITIES
   ========================================================================== */
.font-mono {
  font-family: var(--ae-font-mono) !important;
}
.num-tabular {
  font-variant-numeric: tabular-nums lining-nums !important;
}
.cell-right {
  text-align: right !important;
}
.cell-center {
  text-align: center !important;
}
.prose-lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ae-text-secondary);
  max-width: 68ch;
  margin: 0 0 16px;
}
.prose-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ae-text-body);
  max-width: 68ch;
  margin: 0 0 12px;
}
.prose-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ae-text-muted);
  margin: 0;
}

/* ==========================================================================
   2. APP SHELL, SIDEBAR, TOPBAR, & GRID SYSTEM (.ae-*)
   ========================================================================== */
.ae-shell {
  min-height: 100vh;
  display: flex;
}
.ae-sidebar {
  width: var(--ae-sidebar-w);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 45;
  background: var(--ae-navy-900);
  color: #cbd5e1;
  border-right: 1px solid #1e3a5f;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  transition: width 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.ae-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}
.ae-sidebar__logo { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.ae-sidebar__brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.ae-sidebar__brand-copy strong { color: #ffffff; font-size: 14px; letter-spacing: 0.06em; }
.ae-sidebar__brand-copy small { color: #94a3b8; font-size: 10.5px; }
.ae-sidebar__group-label {
  padding: 10px 12px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}
.ae-sidebar__nav { display: flex; flex-direction: column; gap: 4px; }
.ae-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ae-sidebar__link:hover { background: rgba(255, 255, 255, 0.07); color: #ffffff; }
.ae-sidebar__link.is-active {
  background: rgba(8, 103, 201, 0.24);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #38bdf8;
}
.ae-sidebar__counter {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.ae-sidebar__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ae-sidebar__portal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.ae-sidebar__portal-btn:hover { background: rgba(255, 255, 255, 0.14); }

.ae-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--ae-sidebar-w);
  display: flex;
  flex-direction: column;
}
.ae-topbar {
  height: var(--ae-topbar-h);
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ae-border-default);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ae-eyebrow {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0284c7;
}
.ae-topbar__title {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--ae-text-primary);
  line-height: 1.2;
}
.ae-user-chip { display: flex; align-items: center; gap: 10px; }
.ae-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ae-brand-soft);
  color: var(--ae-brand-primary);
  border: 1px solid #bfdbfe;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.ae-user-chip__meta { display: flex; flex-direction: column; line-height: 1.2; }
.ae-user-chip__meta strong { font-size: 12.5px; color: var(--ae-text-primary); }
.ae-user-chip__meta small { font-size: 11px; color: var(--ae-text-muted); }

/* Sovereign Navy Header Variant (Used by IAM Gateway & Standalone Portals) */
.topbar {
  background: var(--ae-navy-900);
  color: #ffffff;
  padding: 12px clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ae-brand-primary);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-brand { display: flex; align-items: center; gap: 14px; }
.topbar-logo { height: 34px; width: auto; object-fit: contain; }
.topbar-title { font-size: 15px; font-weight: 700; letter-spacing: 0.05em; color: #ffffff; }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.topbar-name { font-weight: 600; color: #e2e8f0; }

/* Containers & Grids */
.ae-container,
.container {
  width: 100%;
  max-width: 1280px;
  margin: 28px auto;
  padding: 0 24px 36px;
  flex: 1;
}
.ae-grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}
.ae-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.ae-app-grid,
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
}

/* ==========================================================================
   3. BUTTON SYSTEM (.ae-btn & Legacy Portal Buttons)
   ========================================================================== */
.ae-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--ae-font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.ae-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ae-focus-ring);
}
.ae-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.ae-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

/* Button Variants */
.ae-btn--primary {
  background: var(--ae-brand-primary);
  border-color: var(--ae-brand-primary);
  color: #ffffff;
}
.ae-btn--primary:hover:not(:disabled) {
  background: var(--ae-brand-hover);
  border-color: var(--ae-brand-hover);
}
.ae-btn--secondary {
  background: var(--ae-bg-surface);
  border-color: var(--ae-border-strong);
  color: var(--ae-text-body);
}
.ae-btn--secondary:hover:not(:disabled) {
  background: var(--ae-bg-subtle);
  border-color: #94a3b8;
}
.ae-btn--tonal {
  background: var(--ae-brand-soft);
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.ae-btn--tonal:hover:not(:disabled) {
  background: #dbeafe;
}
.ae-btn--danger-soft {
  background: var(--ae-danger-bg);
  border-color: var(--ae-danger-border);
  color: var(--ae-danger);
}
.ae-btn--danger-soft:hover:not(:disabled) {
  background: #fecaca;
}
.ae-btn--danger {
  background: var(--ae-danger);
  border-color: var(--ae-danger);
  color: #ffffff;
}
.ae-btn--danger:hover:not(:disabled) {
  background: #b91c1c;
}
.ae-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ae-text-secondary);
}
.ae-btn--ghost:hover:not(:disabled) {
  background: var(--ae-bg-subtle);
}

/* Button Sizes */
.ae-btn--xs { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 6px; }
.ae-btn--sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 7px; }
.ae-btn--md { height: 40px; padding: 0 16px; font-size: 13px; border-radius: 8px; }
.ae-btn--lg { height: 48px; padding: 0 22px; font-size: 14.5px; border-radius: 10px; }
.ae-btn--mobile-cta { height: 52px; width: 100%; padding: 0 18px; font-size: 15px; border-radius: 12px; }

/* Legacy Topbar & Action Button Classes */
.btn-nav-action {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.btn-nav-action:hover { background: rgba(255, 255, 255, 0.24); }
.btn-logout {
  background: #ef4444;
  border: 1px solid #dc2626;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-logout:hover { background: #dc2626; }
.btn-edit-profile {
  background: #ffffff;
  border: 1px solid var(--ae-border-strong);
  color: var(--ae-text-body);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-edit-profile:hover {
  background: var(--ae-bg-subtle);
  border-color: #94a3b8;
}
.btn-add-user {
  height: 38px;
  padding: 0 16px;
  background: var(--ae-brand-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.btn-add-user:hover { background: var(--ae-brand-hover); }

/* ==========================================================================
   4. BADGE & BADGE COLUMN SYSTEM (.ae-badge & Legacy Role/Status Badges)
   ========================================================================== */
.ae-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.ae-badge--pill { border-radius: 9999px; }
.ae-badge--tag  { border-radius: 6px; }

.ae-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.ae-badge--success { background: var(--ae-success-bg); color: var(--ae-success); border-color: var(--ae-success-border); }
.ae-badge--warning { background: var(--ae-warning-bg); color: var(--ae-warning); border-color: var(--ae-warning-border); }
.ae-badge--danger  { background: var(--ae-danger-bg);  color: var(--ae-danger);  border-color: var(--ae-danger-border); }
.ae-badge--info    { background: var(--ae-info-bg);    color: var(--ae-info);    border-color: var(--ae-info-border); }
.ae-badge--neutral { background: var(--ae-bg-subtle);  color: var(--ae-text-secondary); border-color: var(--ae-border-default); }
.ae-badge--purple  { background: #f3e8ff; color: #7e22ce; border-color: #d8b4fe; }

/* Legacy Role & Status Badges */
.tag-role {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
}
.tag-role-superadmin { background: #f3e8ff; color: #7e22ce; border: 1px solid #d8b4fe; }
.tag-role-nara { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tag-role-user { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.badge-unit-uid {
  background: var(--ae-info-bg);
  color: var(--ae-info);
  border: 1px solid var(--ae-info-border);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.badge-unit-up3 { font-weight: 600; color: var(--ae-text-primary); font-size: 12.5px; }

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.status-active { background: var(--ae-success-bg); color: var(--ae-success); border: 1px solid var(--ae-success-border); }
.status-inactive { background: var(--ae-danger-bg); color: var(--ae-danger); border: 1px solid var(--ae-danger-border); }

/* ==========================================================================
   5. CARDS: BASE CARD, KPI STAT CARD, & PROFILE CARD
   ========================================================================== */
.ae-card {
  position: relative;
  background: var(--ae-bg-surface);
  border: 1px solid var(--ae-border-default);
  border-radius: var(--ae-radius-lg);
  padding: 22px 24px;
  box-shadow: var(--ae-shadow-card);
  min-width: 0;
}
.ae-kpi-card {
  padding: 18px 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ae-kpi-card__accent { position: absolute; inset: 0 0 auto 0; height: 3px; }
.ae-kpi-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ae-kpi-card__label { font-size: 12.5px; font-weight: 600; color: var(--ae-text-secondary); }
.ae-kpi-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ae-brand-soft);
  color: var(--ae-brand-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ae-kpi-card__value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ae-text-primary);
  line-height: 1.15;
}
.ae-kpi-card__value small { font-size: 12px; font-weight: 500; color: var(--ae-text-muted); letter-spacing: 0; }
.ae-kpi-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ae-text-muted);
}

/* Profile Card (/iam) */
.profile-card {
  background: var(--ae-bg-surface);
  border: 1px solid var(--ae-border-default);
  border-radius: var(--ae-radius-lg);
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  box-shadow: var(--ae-shadow-card);
}
.profile-left { display: flex; align-items: center; gap: 20px; }
.profile-avatar-wrap {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(135deg, #102a56 0%, #0867c9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(8, 103, 201, 0.24);
  flex-shrink: 0;
}
.profile-avatar-wrap svg { width: 34px; height: 34px; stroke: currentColor; fill: none; }
.profile-name { font-size: 20px; font-weight: 750; color: var(--ae-text-primary); margin-bottom: 4px; letter-spacing: -0.015em; }
.profile-sub { font-size: 13.5px; color: var(--ae-text-secondary); line-height: 1.5; }
.profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.profile-right { display: flex; align-items: center; gap: 24px; }

.security-card {
  background: var(--ae-bg-canvas);
  border: 1px solid var(--ae-border-default);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.security-title { font-size: 12.5px; font-weight: 700; color: var(--ae-text-primary); margin-bottom: 3px; }
.security-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; display: inline-block; }
.sec-active { background: var(--ae-success-bg); color: var(--ae-success); border: 1px solid var(--ae-success-border); }
.sec-inactive { background: var(--ae-bg-subtle); color: var(--ae-text-muted); border: 1px solid var(--ae-border-default); }

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: var(--ae-border-strong); transition: .2s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .2s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
input:checked + .slider { background-color: var(--ae-brand-primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* ==========================================================================
   6. FORM INPUTS, SELECTS, TABLE PANEL, & PAGINATION (.ae-* & Admin Panel)
   ========================================================================== */
.ae-input, .ae-select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ae-border-strong);
  border-radius: var(--ae-radius-sm);
  background: var(--ae-bg-surface);
  color: var(--ae-text-primary);
  font-family: var(--ae-font-sans);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ae-input:focus, .ae-select:focus {
  border-color: var(--ae-brand-primary);
  box-shadow: 0 0 0 3px var(--ae-focus-ring);
}
.ae-select--sm { height: 32px; font-size: 12.5px; padding: 0 8px; }

/* Enterprise Data Table & Superadmin Control Plane */
.ae-table-panel,
.admin-panel {
  background: var(--ae-bg-surface);
  color: var(--ae-text-body);
  border: 1px solid var(--ae-border-default);
  border-radius: var(--ae-radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--ae-shadow-card);
}
.ae-table-panel__header,
.admin-panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ae-border-subtle);
}
.ae-table-panel__title,
.admin-panel-title h3 {
  font-size: 17px;
  font-weight: 750;
  color: var(--ae-text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
}
.admin-panel-title h3 svg { color: var(--ae-brand-primary); fill: none; stroke: currentColor; stroke-width: 2; }
.ae-table-panel__subtitle,
.admin-panel-title p { font-size: 13px; color: var(--ae-text-muted); margin: 0; }

.ae-table-toolbar,
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ae-search-field,
.search-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ae-search-field__icon,
.search-box-wrap svg {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.ae-search-field__input,
.admin-search-input {
  width: 320px;
  max-width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--ae-border-strong);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ae-text-primary);
  background: var(--ae-bg-canvas);
  transition: all 0.15s ease;
}
.ae-search-field__input:focus,
.admin-search-input:focus {
  outline: none;
  background: var(--ae-bg-surface);
  border-color: var(--ae-brand-primary);
  box-shadow: 0 0 0 3px var(--ae-focus-ring);
}
.page-size-select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--ae-border-strong);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ae-text-body);
  background: var(--ae-bg-surface);
  cursor: pointer;
}

.ae-table-wrap,
.admin-table-container {
  width: 100%;
  border: 1px solid var(--ae-border-default);
  border-radius: 10px;
  overflow-x: auto;
  background: var(--ae-bg-surface);
}
.ae-table,
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}
.ae-table th,
.admin-table th {
  background: var(--ae-bg-canvas);
  color: var(--ae-text-secondary);
  font-weight: 700;
  font-size: 11.5px;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--ae-border-default);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ae-table td,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--ae-border-subtle);
  color: var(--ae-text-body);
  vertical-align: middle;
}
.ae-table tbody tr:last-child td,
.admin-table tbody tr:last-child td { border-bottom: none; }
.ae-table tbody tr:hover,
.admin-table tbody tr:hover {
  background: var(--ae-bg-hover);
}
.admin-table tbody tr.is-hidden { display: none !important; }
.admin-table tbody tr.is-inactive { opacity: 0.62; background: #fafafa; }

.ae-cell-primary { font-weight: 650; color: var(--ae-text-primary); line-height: 1.35; }
.ae-cell-secondary { font-size: 11.5px; color: var(--ae-text-muted); margin-top: 2px; }

.role-select {
  background: var(--ae-bg-surface);
  color: var(--ae-text-primary);
  border: 1px solid var(--ae-border-strong);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.role-select:focus {
  outline: none;
  border-color: var(--ae-brand-primary);
  box-shadow: 0 0 0 3px var(--ae-focus-ring);
}
.app-chk,
.admin-table input[type="checkbox"] {
  cursor: pointer;
  width: 17px;
  height: 17px;
  accent-color: var(--ae-brand-primary);
}

.ae-row-actions,
.row-actions,
.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.btn-table-action {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.btn-save-row { background: var(--ae-brand-primary); color: #fff; }
.btn-save-row:hover { background: var(--ae-brand-hover); }
.btn-edit-row { background: var(--ae-bg-surface); color: var(--ae-text-body); border-color: var(--ae-border-strong); }
.btn-edit-row:hover { background: var(--ae-bg-subtle); border-color: #94a3b8; }
.btn-toggle-row { background: var(--ae-bg-canvas); color: var(--ae-text-secondary); border-color: var(--ae-border-strong); }
.btn-toggle-row:hover { background: var(--ae-bg-subtle); }
.btn-delete-row { background: var(--ae-danger-bg); color: var(--ae-danger); border-color: var(--ae-danger-border); }
.btn-delete-row:hover { background: #fecaca; }

/* Pagination Bar (.ae-pagination & .pagination-bar) */
.ae-pagination,
.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  margin-top: 14px;
  border-top: 1px solid var(--ae-border-subtle);
  font-size: 12.5px;
  color: var(--ae-text-muted);
}
.ae-pagination__summary strong { color: var(--ae-text-primary); font-weight: 700; }
.ae-pagination__controls,
.pagination-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ae-pagination__size { display: flex; align-items: center; gap: 6px; }
.ae-pagination__pages { display: flex; align-items: center; gap: 5px; }
.ae-page-btn,
.ae-page-num,
.btn-page {
  min-width: 32px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--ae-border-strong);
  background: var(--ae-bg-surface);
  color: var(--ae-text-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.ae-page-num { padding: 0 6px; }
.ae-page-btn:hover:not(:disabled),
.ae-page-num:hover:not(.is-active),
.btn-page:hover:not(:disabled) {
  background: var(--ae-bg-subtle);
  border-color: #94a3b8;
}
.ae-page-num.is-active {
  background: var(--ae-brand-primary);
  border-color: var(--ae-brand-primary);
  color: #ffffff;
  font-weight: 700;
}
.ae-page-btn:disabled,
.btn-page:disabled { opacity: 0.48; cursor: not-allowed; }
.page-info-badge { font-weight: 700; color: var(--ae-text-primary); padding: 0 6px; }

/* ==========================================================================
   7. APPLICATION LAUNCHER CARDS & EXECUTIVE DETAIL MODAL (/iam)
   ========================================================================== */
.section-title { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; color: var(--ae-text-primary); }
.section-desc { font-size: 14px; color: var(--ae-text-secondary); margin-bottom: 24px; }

.app-card {
  background: var(--ae-bg-surface);
  border: 1px solid var(--ae-border-default);
  border-radius: 16px;
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--ae-shadow-card);
}
.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ae-shadow-hover);
  border-color: #93c5fd;
}
.app-accent { position: absolute; top: 0; left: 0; right: 0; height: 4px; }

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.app-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.app-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid var(--ae-border-default);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s;
}
.app-card:hover .app-icon-wrap { transform: scale(1.04); }
.app-svg-icon { width: 100%; height: 100%; object-fit: contain; }
.app-title-group { display: flex; flex-direction: column; min-width: 0; }
.app-name {
  font-size: 16.5px;
  font-weight: 750;
  color: var(--ae-text-primary);
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 3px 0;
}
.app-category {
  font-size: 11.5px;
  color: var(--ae-info);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.btn-app-info {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--ae-border-default);
  background: #ffffff;
  color: var(--ae-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  padding: 0;
  touch-action: manipulation;
}
.btn-app-info:hover {
  background: var(--ae-brand-soft);
  border-color: #93c5fd;
  color: #0284c7;
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.16);
}
.btn-app-info:active { transform: scale(0.95); }
.info-icon-svg { pointer-events: none; }

.app-desc {
  font-size: 13.5px;
  color: var(--ae-text-secondary);
  line-height: 1.6;
  margin: 0 0 20px;
  flex: 1;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--ae-border-subtle);
  padding-top: 16px;
}
.app-status-allowed {
  font-size: 12px;
  color: var(--ae-success);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.app-status-allowed::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #16a34a;
  border-radius: 50%;
  display: inline-block;
}
.btn-launch {
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.btn-launch:hover { opacity: 0.92; transform: translateY(-1px); }

/* Modals & Executive App Detail v2.1 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--ae-overlay-scrim);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.is-open { display: flex; }
.modal-box {
  background: var(--ae-bg-surface);
  border-radius: 16px;
  padding: 28px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--ae-shadow-modal);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title { font-size: 18px; font-weight: 750; color: var(--ae-text-primary); margin-bottom: 6px; }
.modal-subtitle { font-size: 13px; color: var(--ae-text-muted); margin-bottom: 20px; }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-field-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-field { display: flex; flex-direction: column; gap: 6px; }
.modal-field label { font-size: 12.5px; font-weight: 600; color: var(--ae-text-body); }
.modal-field input, .modal-field select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ae-border-strong);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ae-text-primary);
  background: var(--ae-bg-surface);
}
.modal-field input:focus, .modal-field select:focus {
  outline: none;
  border-color: var(--ae-brand-primary);
  box-shadow: 0 0 0 3px var(--ae-focus-ring);
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.btn-modal-cancel {
  background: var(--ae-bg-subtle);
  border: 1px solid var(--ae-border-strong);
  color: var(--ae-text-body);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-modal-save {
  background: var(--ae-brand-primary);
  border: none;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-modal-save:hover { background: var(--ae-brand-hover); }

.modal-app-detail-box {
  max-width: 640px;
  width: 95%;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--ae-border-default);
  box-shadow: var(--ae-shadow-modal);
  padding: 26px 28px 24px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
}
.mobile-drag-handle {
  display: none;
  width: 44px;
  height: 5px;
  background: var(--ae-border-strong);
  border-radius: 999px;
  margin: 0 auto 12px;
  flex-shrink: 0;
}
.modal-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.detail-badge-pill {
  font-size: 11px;
  font-weight: 750;
  color: #1d4ed8;
  background: var(--ae-brand-soft);
  border: 1px solid #dbeafe;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mobile-sheet-title {
  display: none;
  font-size: 16px;
  font-weight: 750;
  color: var(--ae-text-primary);
}
.btn-modal-close-round {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--ae-border-default);
  background: var(--ae-bg-canvas);
  color: var(--ae-text-muted);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}
.btn-modal-close-round:hover {
  background: var(--ae-danger-bg);
  border-color: var(--ae-danger-border);
  color: var(--ae-danger);
}
.modal-detail-scrollable {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  flex: 1;
}
.modal-brand-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ae-border-subtle);
}
.modal-hero-icon-wrap {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--ae-border-default);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  flex-shrink: 0;
}
.modal-hero-icon-wrap img { width: 100%; height: 100%; object-fit: contain; }
.modal-hero-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.modal-hero-name { font-size: 21px; font-weight: 800; color: var(--ae-text-primary); letter-spacing: -0.015em; line-height: 1.25; margin: 0; }
.modal-hero-cat { font-size: 11px; font-weight: 700; color: #0284c7; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.status-pill-green {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ae-success-bg);
  color: var(--ae-success);
  border: 1px solid var(--ae-success-border);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
}
.status-pill-green::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #16a34a;
  border-radius: 50%;
  display: inline-block;
}
.detail-section { margin-bottom: 22px; }
.detail-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.detail-section-heading svg { stroke: #0284c7; flex-shrink: 0; }
.detail-desc-paragraph { font-size: 13.5px; line-height: 1.65; color: var(--ae-text-body); margin: 0; }

.features-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.feature-item-card {
  background: #ffffff;
  border: 1px solid var(--ae-border-default);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s, background-color 0.15s;
}
.feature-item-card:hover { border-color: #93c5fd; background: var(--ae-bg-canvas); }
.feature-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ae-brand-soft);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feature-item-title { font-size: 13px; font-weight: 750; color: var(--ae-text-primary); line-height: 1.3; }
.feature-item-desc { font-size: 11.5px; color: var(--ae-text-muted); line-height: 1.4; }

.info-table-box {
  background: var(--ae-bg-canvas);
  border: 1px solid var(--ae-border-default);
  border-radius: 12px;
  overflow: hidden;
}
.info-table-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--ae-border-default);
}
.info-table-row:last-child { border-bottom: none; }
.info-cell {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--ae-border-default);
}
.info-cell:last-child { border-right: none; }
.info-cell-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ae-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.info-cell-value {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ae-text-primary);
  word-break: break-word;
}
.info-cell-value a {
  color: #0284c7;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.info-cell-value a:hover { text-decoration: underline; }

.modal-detail-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--ae-border-subtle);
  flex-shrink: 0;
}
.heading-text-desktop {
  display: inline;
  font-size: 12.5px;
  font-weight: 800;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.heading-text-mobile { display: none; }
.btn-launch-large {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  color: #ffffff;
  background: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14.5px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  transition: opacity 0.15s, transform 0.1s;
  touch-action: manipulation;
}
.btn-launch-large:hover { opacity: 0.94; transform: translateY(-1px); }
.btn-launch-large:active { transform: translateY(1px); }
.btn-launch-content { display: inline-flex; align-items: center; gap: 8px; }
.btn-label-desktop { display: inline; }
.btn-label-mobile { display: none; }
.launch-subtext-url { display: none; font-size: 11px; font-weight: 500; opacity: 0.85; }
.modal-section-meta { display: block; }

.portal-footer {
  margin-top: 40px;
  text-align: center;
  padding: 24px 20px;
  font-size: 12px;
  color: #94a3b8;
  border-top: 1px solid var(--ae-border-default);
}

/* ==========================================================================
   8. MOBILE BOTTOM NAVIGATION BAR (USER MOBILE GADGET <= 900px)
   ========================================================================== */
.ae-bottom-nav {
  display: none;
}

@media (max-width: 900px) {
  .ae-sidebar {
    display: none !important;
  }
  .ae-main {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .ae-container,
  .container {
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  }
  .portal-footer {
    margin-bottom: calc(68px + env(safe-area-inset-bottom));
  }
  .ae-bottom-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--ae-border-default);
    padding: 6px 6px max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
  }
  .ae-bottom-nav__item {
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--ae-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .ae-bottom-nav__icon {
    position: relative;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, color 0.18s ease;
  }
  .ae-bottom-nav__label {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.01em;
  }
  .ae-bottom-nav__item.is-active {
    color: var(--ae-brand-primary);
  }
  .ae-bottom-nav__item.is-active .ae-bottom-nav__icon {
    background: var(--ae-brand-soft);
    color: var(--ae-brand-primary);
  }
  .ae-bottom-nav__badge {
    position: absolute;
    top: -2px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--ae-danger);
    color: #ffffff;
    font-style: normal;
    font-size: 9.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
  }
}

/* ==========================================================================
   9. MOBILE GADGET & BOTTOM SHEET TRANSFORMATION (<= 640px)
   ========================================================================== */
@media (max-width: 640px) {
  .topbar {
    padding: 10px 14px !important;
    gap: 8px !important;
  }
  .topbar-title,
  .topbar-name,
  .hide-mobile {
    display: none !important;
  }
  .topbar-user { gap: 8px !important; }
  .btn-nav-action { padding: 5px 9px !important; font-size: 11.5px !important; }
  .btn-logout { padding: 5px 12px !important; font-size: 12px !important; }
  .container, .ae-container { padding: 0 14px calc(92px + env(safe-area-inset-bottom)) !important; margin-top: 18px !important; }
  .profile-card { padding: 18px !important; }
  .modal-field-group { grid-template-columns: 1fr !important; }
  .modal-field input, .modal-field select, .ae-input, .ae-select, .admin-search-input {
    min-height: 44px !important;
    font-size: 16px !important;
  }
  .app-grid, .ae-app-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .app-card {
    padding: 18px 18px 16px !important;
    border-radius: 14px !important;
  }
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal-box {
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom)) !important;
  }
  .modal-app-detail-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88vh !important;
    border-radius: 24px 24px 0 0 !important;
    border-bottom: none !important;
    padding: 12px 18px calc(20px + env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
    animation: slideUpMobile 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes slideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .mobile-drag-handle {
    display: block !important;
    width: 44px !important;
    height: 5px !important;
    background: #cbd5e1 !important;
    border-radius: 999px !important;
    margin: 0 auto 12px !important;
    flex-shrink: 0 !important;
  }
  .detail-badge-pill { display: none !important; }
  .mobile-sheet-title {
    display: block !important;
    font-size: 16px !important;
    font-weight: 750 !important;
    color: #0f172a !important;
  }
  .modal-brand-hero {
    gap: 12px !important;
    margin-bottom: 16px !important;
    padding-bottom: 14px !important;
  }
  .modal-hero-icon-wrap {
    width: 52px !important;
    height: 52px !important;
    border-radius: 12px !important;
  }
  .modal-hero-name { font-size: 18px !important; }
  .heading-text-desktop { display: none !important; }
  .heading-text-mobile {
    display: inline !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    color: #0f172a !important;
    text-transform: none !important;
  }
  .detail-section-heading { margin-bottom: 8px !important; }
  .detail-section-heading svg { stroke: #0284c7 !important; }
  .features-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .feature-item-card { padding: 10px 12px !important; border-radius: 12px !important; }
  .feature-item-icon { width: 38px !important; height: 38px !important; border-radius: 10px !important; }
  .feature-item-title { font-size: 13px !important; }
  .feature-item-desc { font-size: 11.5px !important; }
  .modal-section-meta { display: none !important; }
  .modal-detail-footer { margin-top: 14px !important; padding-top: 10px !important; }
  .btn-launch-large {
    height: 52px !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 1px !important;
    padding: 6px 14px !important;
    border-radius: 12px !important;
  }
  .btn-launch-content { font-size: 14.5px !important; font-weight: 750 !important; }
  .btn-label-desktop { display: none !important; }
  .btn-label-mobile { display: inline !important; }
  .launch-subtext-url {
    display: block !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    opacity: 0.88 !important;
    letter-spacing: 0.01em !important;
  }
  .ae-pagination, .pagination-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .ae-pagination__controls, .pagination-controls {
    justify-content: center;
  }
}

/* ==========================================================================
   PORTAL LAUNCHER TOOLBAR & FILTER PILLS (2026 ENTERPRISE TIER-1)
   ========================================================================== */
.portal-launcher-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  margin-bottom: 22px;
}

.launcher-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.launcher-search-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.launcher-search-input {
  width: 100%;
  height: 44px;
  padding: 0 95px 0 42px;
  background: var(--ae-bg-surface);
  border: 1px solid var(--ae-border-strong);
  border-radius: var(--ae-radius-md);
  font-size: 14px;
  color: var(--ae-text-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.launcher-search-input:focus {
  outline: none;
  border-color: var(--ae-brand-primary);
  box-shadow: 0 0 0 3.5px var(--ae-focus-ring);
}

.launcher-shortcut-hint {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.launcher-shortcut-hint kbd {
  background: var(--ae-bg-subtle);
  border: 1px solid var(--ae-border-strong);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ae-text-muted);
  font-family: var(--ae-font-mono);
}

.launcher-search-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--ae-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
}

.launcher-search-clear:hover {
  color: var(--ae-text-primary);
  background: var(--ae-bg-subtle);
}

.launcher-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.launcher-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 9999px;
  border: 1px solid var(--ae-border-default);
  background: var(--ae-bg-surface);
  color: var(--ae-text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.launcher-cat-pill:hover {
  background: var(--ae-bg-subtle);
  border-color: var(--ae-border-strong);
  color: var(--ae-text-primary);
}

.launcher-cat-pill.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--ae-brand-primary);
  box-shadow: 0 1px 2px rgba(8, 103, 201, 0.08);
}

.launcher-cat-pill .cat-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.2);
  color: var(--ae-text-secondary);
}

.launcher-cat-pill.active .cat-count {
  background: rgba(8, 103, 201, 0.16);
  color: var(--ae-brand-primary);
}

.btn-pin-fav {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-pin-fav:hover {
  color: #ffbf18;
  background: rgba(255, 191, 24, 0.1);
}

.btn-pin-fav.is-pinned {
  color: #f59e0b;
}

.btn-pin-fav.is-pinned svg {
  fill: #f59e0b;
}

.app-card.is-favorite {
  border-color: #fde68a !important;
  box-shadow: 0 4px 14px -2px rgba(245, 158, 11, 0.12) !important;
}

.app-badge-fav {
  display: none;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 9999px;
  padding: 1px 7px;
}

.app-card.is-favorite .app-badge-fav {
  display: inline-flex;
}

.launcher-empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--ae-bg-surface);
  border: 1px dashed var(--ae-border-strong);
  border-radius: var(--ae-radius-lg);
  margin-top: 12px;
}

.launcher-empty-state p {
  color: var(--ae-text-muted);
  font-size: 14px;
  margin-top: 8px;
}


