/* ==========================================================================
   AF STORE MEMBER PORTAL (member.afstore.biz.id)
   Light-Theme SaaS Design System + Modern Web Guidance Standards
   ========================================================================== */

@property --drawer-backdrop {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

:root {
  --bg-canvas: #f4f7fe;
  --bg-hero-top: #eaf2ff;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-tint: #eff6ff;
  --border: #e2e8f0;
  --border-strong: #94a3b8;
  --input-border: #767676;

  --primary: #0b63f6;
  --primary-hover: #084ec7;
  --primary-deep: #1e40af;
  --primary-ring: rgba(11, 99, 246, 0.24);

  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;

  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --purple: #7c3aed;
  --purple-bg: #f3e8ff;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 32px -10px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 48px -12px rgba(11, 99, 246, 0.14);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

section[id] {
  scroll-margin-top: 88px;
}

.ui-ico {
  flex: none;
  display: inline-block;
  vertical-align: middle;
}

.icon-label-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inline-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.92rem;
}

.link-text-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.link-text-btn:hover {
  text-decoration: underline;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  background-color: var(--bg-canvas);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4 {
  color: var(--text-main);
  margin: 0;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

[hidden]:not([hidden="until-found"]) {
  display: none !important;
}

/* ==========================================================================
   NATIVE <dialog> & SCROLL CONTAINMENT (modern-web-guidance: dialog)
   ========================================================================== */

dialog.modal-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-body);
  padding: 0;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100svh - 32px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
}

dialog.modal-dialog.modal-wide {
  width: min(640px, calc(100vw - 24px));
}

/* Scope display to dialog[open] ONLY so closed state is never overridden */
dialog.modal-dialog[open] {
  display: flex;
  flex-direction: column;
}

/* Prevent scroll gestures from chaining to the page behind modal dialogs */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-block-end: 1px solid var(--border);
  background: var(--surface);
}

.dialog-header h1 {
  font-size: 1.15rem;
  font-weight: 800;
}

.dialog-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.dialog-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 40px;
  min-block-size: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-body);
  cursor: pointer;
}

.dialog-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* ==========================================================================
   MOBILE SWIPEABLE NAVIGATION DRAWER (modern-web-guidance: navigation-drawer)
   ========================================================================== */

dialog.Drawer {
  --drawer-width: min(18.5rem, 82dvw, 100dvw - 24px);
  --drawer-backdrop: 0;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  overflow: visible;
}

dialog.Drawer::backdrop {
  background: #0f172a;
  opacity: calc(var(--drawer-backdrop) * 0.55);
  backdrop-filter: blur(2px);
}

.Drawer-scroller {
  position: relative;
  display: grid;
  grid-template-columns: var(--drawer-width) 100%;
  overflow-x: scroll;
  overscroll-behavior: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.Drawer-scroller::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .Drawer-scroller {
    scroll-behavior: smooth;
  }
}

.Drawer-scroller::after {
  content: '';
  scroll-snap-align: end;
  scroll-initial-target: nearest;
}

.Drawer-sheet {
  display: flex;
  flex-direction: column;
  height: 100svh;
  background: var(--surface);
  color: var(--text-body);
  border-inline-end: 1px solid var(--border);
  overflow-y: auto;
  scroll-snap-align: start;
  scrollbar-width: thin;
  padding: 16px;
}

@supports (animation-timeline: scroll()) {
  dialog.Drawer {
    timeline-scope: --drawer-fade;
    animation: fade-drawer-backdrop linear both;
    animation-timeline: --drawer-fade;
  }

  .Drawer-scroller {
    scroll-timeline: --drawer-fade x;
  }

  @keyframes fade-drawer-backdrop {
    0% { --drawer-backdrop: 1; }
    100% { --drawer-backdrop: 0; }
  }
}

/* ==========================================================================
   FORMS & CONTROLS (modern-web-guidance: forms)
   ========================================================================== */

.field-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin-block-end: 1.15rem;
}

.field-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.field-req {
  color: var(--danger);
  margin-inline-start: 2px;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.field-error {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--danger);
}

.form-control {
  font: inherit;
  font-size: max(1rem, 1em);
  padding: 0.72rem 0.9rem;
  min-height: 48px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--input-border);
  background: var(--surface);
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (pointer: coarse) {
  .form-control {
    min-height: 52px;
  }
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.form-control:user-invalid,
.form-control[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffafa;
}

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

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap .form-control {
  padding-inline-end: 52px;
}

.pw-toggle-btn {
  position: absolute;
  inset-inline-end: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 40px;
  min-block-size: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.pw-toggle-btn:hover {
  background: var(--surface-soft);
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.94rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: #ffffff;
  box-shadow: 0 8px 20px -6px rgba(11, 99, 246, 0.45);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-deep));
  color: #ffffff;
}

.btn-outline {
  background: var(--surface);
  color: var(--text-main);
  border-color: #cbd5e1;
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface-tint);
}

.btn-soft {
  background: var(--surface-tint);
  color: var(--primary);
  border-color: #bfdbfe;
}

.btn-soft:hover:not(:disabled) {
  background: #dbeafe;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fecaca;
}

.btn-sm {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  font-size: 0.84rem;
  border-radius: 10px;
}

/* ==========================================================================
   VIEW 1: PUBLIC LANDING PAGE (#landing-shell)
   ========================================================================== */

.landing-shell {
  background: linear-gradient(180deg, var(--bg-hero-top) 0%, #f8faff 420px, #ffffff 900px, #f4f7fe 100%);
  min-height: 100svh;
}

.container {
  width: min(1220px, calc(100% - 32px));
  margin-inline: auto;
}

.landing-nav {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid rgba(226, 232, 240, 0.85);
}

.landing-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.brand-logo img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0;
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.landing-links a {
  position: relative;
  padding-block: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-body);
  transition: color 0.18s ease;
}

.landing-links a::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: -2px;
  border-block-end: 3px solid var(--primary);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-links a:hover,
.landing-links a.active {
  color: var(--primary);
}

.landing-links a.active::after {
  transform: scaleX(1);
}

.landing-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hero Section */
.hero-section {
  padding-block: 44px 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 36px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: #dbeafe;
  color: var(--primary-deep);
  font-size: 0.82rem;
  font-weight: 700;
  margin-block-end: 16px;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 800;
  line-height: 1.13;
  margin-block-end: 16px;
}

.hero-title .accent {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.06rem;
  color: var(--text-body);
  max-width: 540px;
  margin-block-end: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Hero Studio-Grade 3D Showcase Image */
.hero-devices-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-showcase-img {
  width: 100%;
  max-width: 640px;
  height: auto;
  display: block;
  border-radius: 22px;
  box-shadow: 0 28px 60px -22px rgba(15, 23, 42, 0.18);
  -webkit-mask-image: radial-gradient(ellipse 96% 94% at 50% 50%, #000 84%, transparent 100%);
  mask-image: radial-gradient(ellipse 96% 94% at 50% 50%, #000 84%, transparent 100%);
}

/* Trust Strip Bar */
.trust-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-block: 10px 48px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.trust-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--surface-tint);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.icon-tint-blue { background: #eff6ff; color: #0b63f6; border: 1px solid #dbeafe; }
.icon-tint-purple { background: #f5f3ff; color: #7c3aed; border: 1px solid #ede9fe; }
.icon-tint-green { background: #f0fdf4; color: #16a34a; border: 1px solid #dcfce7; }
.icon-tint-amber { background: #fffbeb; color: #d97706; border: 1px solid #fef3c7; }

.trust-item h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-block-end: 2px;
}

.trust-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Role Pricing Section */
.section-block {
  padding-block: 32px 48px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-block-end: 24px;
}

.section-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-tint);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  margin-block-end: 8px;
}

.section-title {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 800;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 18px;
}

.role-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #93c5fd;
}

.role-card.popular {
  border-color: var(--primary);
  box-shadow: 0 16px 36px -12px rgba(11, 99, 246, 0.22);
}

.role-card-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--surface-tint);
  color: var(--primary);
}

.role-card.popular .role-card-badge {
  background: var(--primary);
  color: #ffffff;
}

.role-card h3 {
  font-size: 1.16rem;
  font-weight: 800;
  margin-block-top: 6px;
}

.role-card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-block-top: 4px;
}

.role-price-wrap {
  padding-block: 10px;
  border-block: 1px solid #f1f5f9;
}

.role-price-strike {
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: line-through;
  display: block;
}

.role-price {
  font-size: 1.48rem;
  font-weight: 800;
  color: var(--text-main);
}

.role-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-body);
}

.role-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.role-features svg {
  color: var(--success);
  flex: none;
  margin-block-start: 2px;
}

/* Upgrade Banner CTA */
.upgrade-cta-banner {
  background: linear-gradient(125deg, #0b63f6 0%, #1d4ed8 55%, #1e3a8a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 20px 44px -12px rgba(11, 99, 246, 0.42);
  margin-block: 12px 48px;
}

.upgrade-cta-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.upgrade-rocket {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 24px rgba(15, 23, 42, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.upgrade-cta-banner h2 {
  color: #ffffff;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  margin-block-end: 4px;
}

.upgrade-cta-banner p {
  color: #dbeafe;
  font-size: 0.92rem;
}

.btn-white {
  background: #ffffff;
  color: var(--primary-deep);
  font-weight: 800;
}

.btn-white:hover {
  background: #eff6ff;
  color: var(--primary);
}

/* Benefit & FAQ */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.benefit-card h3 {
  font-size: 1.04rem;
  margin-block: 12px 6px;
}

.benefit-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
}

.faq-item summary {
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin-block-start: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.landing-footer {
  background: var(--surface);
  border-block-start: 1px solid var(--border);
  padding-block: 32px;
  margin-block-start: 36px;
}

.footer-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* ==========================================================================
   VIEW 2: AUTHENTICATED MEMBER DASHBOARD (#dashboard-shell)
   Matches ChatGPT Mockup 2 (Light Bento + Lawliet Welcome Header)
   ========================================================================== */

.dashboard-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100svh;
  background: var(--bg-canvas);
}

.sidebar {
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  inset-block-start: 0;
  height: 100svh;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 12px 12px 6px;
}

.side-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.side-nav-btn:hover {
  background: var(--surface-soft);
  color: var(--text-main);
}

.side-nav-btn[aria-current="page"] {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 18px -6px rgba(11, 99, 246, 0.45);
}

.nav-unread-badge {
  margin-inline-start: auto;
  min-width: 20px;
  height: 20px;
  padding-inline: 6px;
  border-radius: 99px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.side-nav-btn[aria-current="page"] .nav-unread-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.side-support-card {
  background: linear-gradient(145deg, #eef4ff, #dbeafe);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.side-support-card h4 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-block-end: 4px;
}

.side-support-card p {
  font-size: 0.76rem;
  color: var(--text-body);
  margin-block-end: 12px;
}

/* Dashboard Main Area */
.dash-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  background: rgba(244, 247, 254, 0.9);
  backdrop-filter: blur(10px);
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-block-end: 1px solid rgba(226, 232, 240, 0.8);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-inline-size: 44px;
  min-block-size: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  cursor: pointer;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 42px;
  min-block-size: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-body);
  cursor: pointer;
}

.notif-dot {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  min-width: 17px;
  height: 17px;
  padding-inline: 4px;
  border-radius: 99px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 14px 5px 6px;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #0f172a;
}

.profile-meta strong {
  display: block;
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.2;
}

.online-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success);
}

.online-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.dash-content {
  padding: 20px 26px 40px;
  max-width: 1260px;
  width: 100%;
  margin-inline: auto;
}

/* Lawliet Welcome Banner (Matches Mockup 2) */
.welcome-banner {
  background: linear-gradient(125deg, #dcebff 0%, #eff6ff 48%, #ffffff 100%);
  border: 1px solid #cfe0ff;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  box-shadow: var(--shadow-sm);
  margin-block-end: 18px;
  position: relative;
  overflow: hidden;
}

.lawliet-art {
  width: 108px;
  height: 108px;
  border-radius: 18px;
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border: 2px solid #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  flex: none;
}

.welcome-copy h1 {
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  font-weight: 800;
  margin-block-end: 5px;
}

.welcome-copy p {
  font-size: 0.92rem;
  color: var(--text-body);
}

.active-role-float {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  min-width: 220px;
  box-shadow: var(--shadow-md);
}

.role-float-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-end: 4px;
}

.badge-active {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 800;
}

/* Role Membership Strip */
.membership-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  margin-block-end: 18px;
}

.membership-strip-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.crown-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-tint);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 4 Quick Action Cards */
.quick-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-block-end: 20px;
}

.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: start;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.quick-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-tint);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.quick-card strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-main);
}

.quick-card span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Bento 2x2 Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 18px;
}

.card-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.card-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 16px;
}

.card-panel-head h2 {
  font-size: 1.04rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.summary-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.sum-tile {
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
  border: 1px solid var(--border);
}

.sum-tile.blue { background: #f0f7ff; border-color: #dbeafe; }
.sum-tile.purple { background: #faf5ff; border-color: #e9d5ff; }
.sum-tile.green { background: #f0fdf4; border-color: #bbf7d0; }
.sum-tile.amber { background: #fffbeb; border-color: #fde68a; }

.sum-tile-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin-inline: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sum-tile-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-block-start: 6px;
}

.sum-tile-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-block: 4px 2px;
}

.sum-tile-sub {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-block-end: 6px;
}

.progress-track {
  height: 6px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
}

/* Announcement Preview Card */
.ann-preview-box {
  display: grid;
  grid-template-columns: 1fr 145px;
  gap: 14px;
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.ann-banner-thumb {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #334155;
}

/* Activity Timeline */
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-block-end: 10px;
  border-block-end: 1px solid #f1f5f9;
}

.activity-item:last-child {
  border-block-end: none;
  padding-block-end: 0;
}

.act-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 0.78rem;
  font-weight: 800;
}

.menu-cepat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.menu-cepat-btn {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.menu-cepat-btn:hover {
  background: var(--surface-tint);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   ACCESSIBLE TABS (modern-web-guidance: tabs)
   ========================================================================== */

.tabs-scroller {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  border-block-end: 1px solid var(--border);
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
  margin-block-end: 18px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 22px), transparent 100%);
  padding-inline-end: 20px;
}

.tabs-scroller::-webkit-scrollbar {
  display: none;
}

.tabs-scroller [role="tab"] {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.tabs-scroller [role="tab"]:hover {
  color: var(--text-main);
}

/* Selected indicator drawn with border on pseudo-element for forced-colors safety */
.tabs-scroller [role="tab"][aria-selected="true"] {
  color: var(--primary);
}

.tabs-scroller [role="tab"][aria-selected="true"]::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--primary);
}

/* Keep padding/borders on inner wrapper so hidden="until-found" renders zero empty strip */
.tabpanel-inner {
  padding-block-start: 4px;
}

/* ==========================================================================
   RESPONSIVE DATA TABLES (modern-web-guidance: responsive-table)
   ========================================================================== */

.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(520px, 78vh);
  container-type: inline-size;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

.data-table caption {
  text-align: start;
  padding: 12px 16px;
  font-weight: 800;
  color: var(--text-main);
  background: var(--surface-soft);
  border-block-end: 1px solid var(--border);
}

.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: #f8fafc;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: start;
  border-block-end: 1px solid #f1f5f9;
  white-space: nowrap;
}

.data-table thead th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 800;
}

.data-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: var(--surface);
  font-weight: 700;
  color: var(--text-main);
}

@container (width < 600px) {
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    white-space: normal;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    margin: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
  }

  .data-table tbody th {
    position: sticky;
    inset-block-start: 0;
    background: var(--surface-soft);
    border-block-end: 1px solid var(--border);
  }

  .data-table td:nth-child(2)::before { content: var(--label-2, "") ": "; font-weight: 700; color: var(--text-muted); }
  .data-table td:nth-child(3)::before { content: var(--label-3, "") ": "; font-weight: 700; color: var(--text-muted); }
  .data-table td:nth-child(4)::before { content: var(--label-4, "") ": "; font-weight: 700; color: var(--text-muted); }
  .data-table td:nth-child(5)::before { content: var(--label-5, "") ": "; font-weight: 700; color: var(--text-muted); }
}

/* ==========================================================================
   DARK CONTRAST REALTIME TERMINAL CONSOLE & CHAT STREAM
   ========================================================================== */

.console-box {
  background: #0b1120;
  color: #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  min-height: 230px;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid #1e293b;
  line-height: 1.6;
}

.console-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.console-cmd-bar {
  display: flex;
  gap: 8px;
  margin-block-start: 10px;
}

.console-cmd-bar input {
  font-family: var(--font-mono);
  background: #0f172a;
  color: #f8fafc;
  border-color: #334155;
}

.rt-telemetry-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  margin-block-end: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rt-telemetry-bar strong {
  color: var(--text-main);
  font-family: var(--font-mono);
}

.ansi-red { color: #f87171; }
.ansi-green { color: #4ade80; }
.ansi-yellow { color: #fbbf24; }
.ansi-blue { color: #60a5fa; }
.ansi-cyan { color: #22d3ee; }
.ansi-magenta { color: #e879f9; }
.ansi-bold { font-weight: 700; }
.ansi-dim { opacity: 0.72; }

.chat-pinned-bar {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 10px 14px;
  margin-block-end: 10px;
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.chat-reply-bar {
  background: var(--surface-tint);
  border-inline-start: 3px solid var(--primary);
  border-radius: 10px;
  padding: 8px 12px;
  margin-block-start: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.chat-reply-quote {
  background: rgba(15, 23, 42, 0.04);
  border-inline-start: 3px solid var(--primary);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-block-end: 6px;
}

.chat-actions-row {
  display: flex;
  gap: 8px;
  margin-block-start: 6px;
  font-size: 0.72rem;
}

.chat-action-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
}

.chat-action-link:hover {
  color: var(--primary);
}

.chat-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  height: min(440px, 60svh);
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  max-width: 84%;
  align-self: flex-start;
}

.chat-bubble.mine {
  background: #eff6ff;
  border-color: #bfdbfe;
  align-self: flex-end;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  margin-block-end: 4px;
}

.chat-role-pill {
  padding: 2px 8px;
  border-radius: 99px;
  background: #dbeafe;
  color: var(--primary-deep);
  font-size: 0.68rem;
  font-weight: 800;
}

/* QRIS Box */
.qris-frame {
  background: var(--surface-soft);
  border: 1.5px dashed #93c5fd;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.qris-frame img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  border: 1px solid var(--border);
}

/* Toast Notification */
.portal-toast {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 90;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.28);
  max-width: min(380px, calc(100vw - 32px));
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1024px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-grid,
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .trust-strip,
  .quick-actions-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .welcome-banner {
    grid-template-columns: 1fr;
  }
  .landing-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .landing-nav-inner {
    gap: 8px;
    min-height: 64px;
  }
  .brand-logo {
    gap: 8px;
    font-size: 1rem;
  }
  .brand-logo img {
    width: 34px;
    height: 34px;
  }
  .brand-sub {
    display: none;
  }
  .landing-cta-group {
    gap: 6px;
  }
  .landing-cta-group .btn-sm {
    min-height: 38px;
    padding: 0.35rem 0.68rem;
    font-size: 0.78rem;
  }
  .landing-cta-group .btn-sm .ui-ico {
    display: none;
  }
  .trust-strip,
  .quick-actions-row,
  .summary-tiles,
  .menu-cepat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ann-preview-box {
    grid-template-columns: 1fr;
  }
  .upgrade-cta-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }
  .dash-content {
    padding: 16px;
  }
  .dash-topbar {
    padding: 12px 16px;
  }
}
