/* =========================================
   FLUX UI SYSTEM v1 — DESIGN TOKENS
   ========================================= */

   @font-face {
  font-family: 'Inter';
  src: url('/assets/portal/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/portal/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/portal/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/portal/fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* =========================================
     FLUX UI SYSTEM v1 — CANONICAL TOKENS
     ========================================= */

  /* CORE COLORS */
  --bg-app: #F7F7F5;
  --bg-card: #FFFFFF;

  --text-primary: #111827;
  --text-secondary: #6B7280;

  --border-default: #E5E7EB;

  /* ACCENTS */
  --accent-blue: #E6F0FA;
  --accent-mint: #E8F5EE;
  --accent-sand: #F7EFE5;
  --accent-lavender: #F1ECF9;

  /* STATUS */
  --status-success-bg: #DCFCE7;
  --status-success-text: #166534;
  --status-error-bg: #FEE2E2;
  --status-error-text: #991B1B;

  /* SPACING */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* RADIUS */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  /* COMPATIBILITY TOKENS
     Keep these for older auth / layout blocks still lower in the file. */
  --ink: #111827;
  --muted: #6B7280;

  --border: rgba(17, 24, 39, 0.08);
  --border-strong: rgba(17, 24, 39, 0.12);

  --glass-a: #FFFFFF;
  --glass-b: #F9FAFB;

  --card-a: #FFFFFF;
  --card-b: #F9FAFB;

  --shadow-1: 0 8px 20px rgba(15, 23, 42, 0.06);
  --shadow-2: 0 18px 40px rgba(15, 23, 42, 0.10);

  --accent: #111827;
  --accent2: #374151;

  --focus: 0 0 0 3px rgba(17, 24, 39, 0.12);
  --link-shadow-dark: 0 1px 1px rgba(0,0,0,0.45);
}

/* =========================================
   BASE UI RESET
   ========================================= */

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

html, body {
  height: 100%;
}

.app-page {
  padding: var(--space-6);
}

.portal-body {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

/* Background: optional image layer + overlays + fallback gradient
   Layout injects: style="--portal-bg: url('/assets/backgrounds/xxx.jpg?v=...');"
*/
.portal-bg{
  position: fixed;
  inset: 0;

  background-image:
    var(--portal-bg, none),
    radial-gradient(1200px 700px at 65% 15%, rgba(255,255,255,0.70), rgba(255,255,255,0.10) 55%, rgba(0,0,0,0) 70%),
    radial-gradient(900px 600px at 25% 35%, rgba(140,170,220,0.25), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, #cfd9ea 0%, #b9c6df 40%, #aebcd5 100%);

  background-size: cover, auto, auto, auto;
  background-position: center, center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
}

/* 🔥 KILL IMAGE ON APP */
.portal-body.layout-app .portal-bg{
  background-image: none !important;
  background: #f3f4f6 !important;
}

.portal-wrap{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px 18px;
}

/* Main header (exists for auth + app; app header becomes real later) */
.site-header{
  position: relative;
  z-index: 2;
  padding: 18px 18px 0;
}
.site-header-inner{
  width: min(1100px, 96vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-brand-mark{
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.40);
  border: 1px solid rgba(255,255,255,0.55);
}

.site-brand-logo{
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}

.site-brand-name{
  font-weight: 800;
  letter-spacing: -0.01em;
}

.site-header-right{
  display: inline-flex;
  gap: 14px;
}
.site-header-link{
  color: rgba(11,18,32,0.75);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.30);
}
.site-header-link:hover{ text-decoration: underline; }

/* Hide header-right in auth layout (keeps header minimal like screenshots) */
.layout-auth .site-header-right{ display: none; }

/* Placeholder menu for app layout only */
.site-menu{
  display: none;
}
.layout-app .site-menu{
  display: flex;
  gap: 10px;
  width: min(1100px, 96vw);
  margin: 12px auto 0;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.30);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-menu-item{
  color: rgba(11,18,32,0.78);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 999px;
}
.site-menu-item:hover{
  background: rgba(255,255,255,0.28);
}

.glass-frame{
  width: min(420px, 92vw);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, var(--glass-a), var(--glass-b));
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

.glass-content{
  padding: 22px 26px 26px; /* tighter for huge logo */
  display: grid;
  gap: 20px;
  justify-items: center;   /* centers hero + inner-card properly */
}

.hero{
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.hero-title{
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.02em;
}

.hero-subtitle{
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.inner-card{
  width: 100%;
  max-width: 468px; /* 520 outer - (26*2 padding) = 468 */
  margin: 0;        /* grid centering handles it now */
  border-radius: 28px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card-a), var(--card-b));
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 22px 22px 18px;
}

.card-note{
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 14px;
}

/* =========================================
   CORE COMPONENT SYSTEM
   ========================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: #FFFFFF;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.btn:hover {
  background: #F9FAFB;
  opacity: 1;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn.primary,
.btn-primary {
  background: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
}

.btn.primary:hover,
.btn-primary:hover {
  background: #1F2937;
  border-color: #1F2937;
}

.btn-primary:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: none;
}

.card-title {
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.card-body {
  display: block;
  color: var(--text-primary);
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.label {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.55;
}

.input {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: #FFFFFF;
  padding: 0 12px 0 42px;
  outline: none;
  font-size: 14px;
  color: var(--text-primary);
}

.input:focus {
  box-shadow: var(--focus);
  border-color: #D1D5DB;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

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

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  color: var(--text-secondary);
  font-size: 14px;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--text-primary);
}

.hint {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  justify-content: center;
  margin-top: 6px;
}

.hr {
  height: 1px;
  background: var(--border-default);
  margin: 14px 0;
}

.center {
  text-align: center;
}

.success {
  color: var(--status-success-text);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.subtle {
  color: var(--text-secondary);
  font-size: 13px;
}

.strength {
  display: grid;
  gap: 8px;
  margin: 8px 0 4px;
}

.strength-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.strength-bar {
  height: 8px;
  border-radius: 999px;
  background: #E5E7EB;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 20%;
  background: var(--text-primary);
  border-radius: 999px;
}

.hint{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  justify-content: center;
  margin-top: 6px;
}

.hr{
  height: 1px;
  background: rgba(255,255,255,0.35);
  margin: 14px 0;
}

.center{ text-align: center; }

.success{
  color: #1f7a42;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.subtle{
  color: var(--muted);
  font-size: 13px;
}

.strength{
  display: grid;
  gap: 8px;
  margin: 8px 0 4px;
}
.strength-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.strength-bar{
  height: 8px;
  border-radius: 999px;
  background: rgba(120,130,150,0.25);
  overflow: hidden;
}

/* Landing card sizing */
.layout-marketing .glass-frame.mk-frame{
  width: min(980px, 92vw);
}

/* Login action (icon + text) */
.site-header-actions{
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-login-link{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.25);

  color: rgba(11,18,32,0.88);
  text-decoration: none;
  font-weight: 650;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.site-login-link:hover{
  background: rgba(255,255,255,0.35);
}

.site-login-link svg{
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.9;
}

/* =========================================================
   APP SHELL (layout-app) — make it match marketing look
   ========================================================= */

.layout-app .portal-wrap{
  padding-top: 92px; /* room for fixed header like marketing */
}

/* Full-width top bar (app) — same as marketing */
.site-header.site-header-app{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;

  padding: 14px 18px;
  background: rgba(255,255,255,0.22);
  border-bottom: 1px solid rgba(255,255,255,0.35);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* App main card sizing: same width as marketing landing */
.layout-app .glass-frame.mk-frame{
  width: min(980px, 92vw);
}

/* App content should not center everything (menu + tables need full width) */
.layout-app .glass-content{
  justify-items: stretch;
}

/* Menu is now INSIDE the glass card, so it must be full-width with no auto margins */
.layout-app .site-menu{
  width: 100%;
  margin: 0 0 14px 0;
  border-radius: 18px;
}

/* Marketing content */
.mk{
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

.mk h1{
  margin: 0;
  font-size: 46px;
  letter-spacing: -0.03em;
}

.mk h2{
  margin: 10px 0 0;
  font-size: 20px;
  font-weight: 650;
  color: rgba(11,18,32,0.75);
}

.mk p{
  margin: 14px 0 0;
  color: rgba(11,18,32,0.70);
  line-height: 1.55;
  max-width: 72ch;
}

.mk-cta{
  margin-top: 18px;
}

/* 3 screenshot placeholders */
.mk-grid{
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.mk-shot{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.20);
  box-shadow: 0 18px 34px rgba(0,0,0,0.12);
  overflow: hidden;
  min-height: 180px;
  position: relative;
}

.mk-shot::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.18),
    rgba(255,255,255,0.04));
}

/* =========================================================
   ORANGE LINKS: add thin dark shadow for readability
   (Forgot Password, Sign Up, any .link accents)
   ========================================================= */

/* Your orange accent links */
a.link,
.link{
  text-shadow: var(--link-shadow-dark) !important;
}

/* Keep it on hover/focus/visited too */
a.link:hover,
a.link:focus,
a.link:visited{
  text-shadow: var(--link-shadow-dark) !important;
}

/* =========================================================
   AUTH: make "Remember me" + "Don't have an account?" black
   (keep the orange links orange)
   ========================================================= */

.layout-auth .checkbox,
.layout-auth .subtle{
  color: rgba(11,18,32,0.92) !important; /* basically black */
}

/* =========================================================
   AUTH: footer text (Privacy/Terms + © line) white + shadow
   ========================================================= */

.layout-auth .portal-links,
.layout-auth .portal-link,
.layout-auth .portal-copy,
.layout-auth .portal-sep{
  color: rgba(255,255,255,0.92) !important;
  text-shadow: var(--link-shadow-dark) !important; /* same shadow as orange links */
}

/* Keep links readable on hover too */
.layout-auth .portal-link:hover{
  text-decoration: underline;
}

.hero-logo-link{ display:inline-block; text-decoration:none; }
.hero-logo-link:focus{ outline:none; box-shadow: var(--focus); border-radius: 14px; }

/* =========================================================
   AUTH (verify page): force verify note + countdown text black
   ========================================================= */
.layout-auth .verify-note,
.layout-auth .verify-countdown{
  color: var(--ink) !important;
}

.layout-auth .verify-note strong{
  color: var(--ink) !important;
}

/* =========================================================
   FOOTER: glass bar + credits (matches header vibe)
   ========================================================= */

.portal-footer{
  margin-top: 26px;
}

.portal-footer-inner{
  max-width: var(--page-max, 1180px);
  margin: 0 auto;
  padding: 14px 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  box-shadow: none;
}

.portal-footer-left{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 260px;
}

.portal-links{
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-link{
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

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

.portal-sep{
  color: rgba(255,255,255,0.70);
}

.portal-copy{
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

.portal-footer-right{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;

  color: rgba(255,255,255,0.90);
  font-size: 13px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

.portal-credit-text{
  opacity: 0.95;
}

.portal-credit-sep{
  opacity: 0.75;
}

.portal-credit-logo{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;

  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.portal-credit-logo img{
  height: 18px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.637));
}

/* Responsive: stack nicely on narrow screens */
@media (max-width: 720px){
  .portal-footer-inner{
    flex-direction: column;
    align-items: flex-start;
  }
  .portal-footer-left{
    min-width: 0;
  }
  .portal-footer-right{
    justify-content: flex-start;
  }
}

/* =========================================================
   MARKETING: sticky footer (thin + single-line)
   ========================================================= */
.layout-marketing .portal-wrap{
  /* smaller space now that footer is thinner */
  padding-bottom: 96px !important;
}

/* footer becomes a thin glass bar like the header */
.layout-marketing .portal-footer{
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;

  /* thinner */
  padding: 8px 18px !important;

  background: rgba(255,255,255,0.22) !important;
  border-top: 1px solid rgba(255,255,255,0.35) !important;

  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

/* one line, no wrapping */
.layout-marketing .portal-footer-inner{
  width: min(1200px, 96vw);
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

/* force both sides to stay “inline” */
.layout-marketing .portal-footer-left,
.layout-marketing .portal-footer-right{
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

/* tighten typography a bit */
.layout-marketing .portal-links,
.layout-marketing .portal-copy{
  font-size: 12px !important;
  line-height: 1.1 !important;
  margin: 0 !important;
}

/* keep logos from making it tall */
.layout-marketing .portal-footer-right img{
  height: 18px !important;
  width: auto !important;
  display: block !important;
}

.layout-auth .hero-title,
.layout-auth .hero-subtitle{
  display: block !important;
}

/* ==========================================================================
   OPTION A — APP HEADER BRAND (FINAL OVERRIDE)
   Match the marketing header brand layout (horizontal mark + "FLUX Reports")
   ========================================================================== */

.site-header.site-header-app{
  padding: 8px 16px !important;

  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;

  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.site-header.site-header-app .site-header-inner{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.site-header.site-header-app .site-brand{
  /* force horizontal brand (kills stacked logo) */
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;

  /* kill any “badge” styling */
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.site-header.site-header-app .site-brand-mark{
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.site-header.site-header-app .site-brand-logo{
  width: 26px !important;
  height: auto !important;
  display: block !important;
  opacity: 1 !important;
}

.site-header.site-header-app .site-brand-name{
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;

  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.1 !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;

  white-space: nowrap !important;
  text-shadow: none !important;
  color: #111827 !important;
}

.site-header.site-header-app .site-brand-name .brand-flux{
  text-transform: uppercase !important;
}

/* =========================================================
   APP SHELL v1 (sidebar + main) — appended to win specificity
   ========================================================= */

.layout-app .site-menu{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0;
  margin: 0;
}

.layout-app .site-menu-item{
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 8px 14px;
  border-radius: 6px;

  text-decoration: none;

  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.005em;

  color: #374151;
  background: transparent;

  transition: background 0.12s ease, color 0.12s ease;
}

.layout-app .site-menu-item[aria-current="page"]{
  background: #e5e7eb;
  color: #111827;
  font-weight: 600;
}

.layout-app .site-menu-item[aria-disabled="true"]{
  opacity: 0.55;
}

/* Page scaffolding */
.layout-app .app-page{ display: block; }
.layout-app .app-page-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.layout-app .app-page-kicker{
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(11,18,32,0.55);
}
.layout-app .app-page-title{
  margin: 6px 0 0;
  font-size: 40px;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.layout-app .app-page-subtle{
  margin-top: 6px;
  color: rgba(11,18,32,0.60);
    font-weight: 500;
  font-size: 15px;
}
.layout-app .app-page-actions{ display: inline-flex; gap: 10px; align-items: center; }

.preview-box{
  height: 220px;
  border-radius: 14px;
  background: rgba(255,255,255,0.16);
  border: 1px dashed rgba(255,255,255,0.32);
  display: grid;
  place-items: center;
  color: rgba(11,18,32,0.55);
  font-weight: 800;
}
.list{ margin: 0; padding-left: 18px; color: rgba(11,18,32,0.70); font-weight: 650; }

/* Header top-nav/tools (app only) */

.site-header.site-header-app .top-nav{
  display: inline-flex;
  gap: 18px;
  margin-right: 14px;
}

.site-header.site-header-app .top-nav-link{
  text-decoration: none;
  font-weight: 850;
  color: rgba(11,18,32,0.70);
  padding: 10px 10px;
  border-radius: 999px;
}

.site-header.site-header-app .top-nav-link[aria-current="page"]{
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.30);
}

.site-header.site-header-app .top-tools{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-header.site-header-app .top-search-input{
  width: min(280px, 34vw);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.20);
  outline: none;
}

.site-header.site-header-app .top-icon{
  text-decoration: none;
  font-weight: 900;
  color: rgba(11,18,32,0.70);
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.26);
}

.site-header.site-header-app .top-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
}

.site-header.site-header-app .top-user-email{
  font-weight: 850;
  color: rgba(11,18,32,0.70);
}

/* =========================================================
   APP SHELL (layout-app): real 2-column dashboard frame
   - fixes “floating cards” + narrow centered layout
   - makes 1080p feel like a proper dashboard canvas
   ========================================================= */

.layout-app .portal-wrap{
  /* stop centering the whole app like a login card */
  place-items: start center;
  padding: 28px 18px 42px;
}

.layout-app .site-header-inner{
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.layout-app .glass-frame.mk-frame{
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 16px auto 0;
}

/* Turn the app interior into a grid: sidebar + main */
.layout-app .glass-content.app-shell{
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;

  /* keep the content from kissing the edges */
  padding: 18px;
}

/* Sidebar column */
.layout-app .app-sidebar{
  min-width: 0;
}

/* Ensure menu is a vertical stack and fills the sidebar */
.layout-app .app-sidebar .site-menu{
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Main column */
.layout-app .app-main{
  background: #ffffff;
  border-radius: 0;
}

/* If a page outputs a “card” wrapper, force it to behave */
.layout-app .app-main > *{
  max-width: 100%;
}

/* =========================================================
   PUBLIC AUTH / FORM PAGE
   - fixes public form content being visually lost behind the fixed background
   - adds missing wrapper styling for auth-shell/auth-card/auth-title
   ========================================================= */

.portal-body.layout-auth .portal-bg{
  z-index: 0;
}

.portal-body.layout-auth > :not(.portal-bg){
  position: relative;
  z-index: 1;
}

.layout-auth .auth-shell{
  width: min(920px, calc(100vw - 32px));
  margin: 42px auto;
  padding: 0 16px 32px;
}

.layout-auth .auth-card{
  width: 100%;
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.64));
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ink);
}

.layout-auth .auth-kicker{
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent2);
}

.layout-auth .auth-title{
  margin: 0;
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.layout-auth .auth-subtitle{
  margin: -4px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.layout-auth .auth-card > .card,
.layout-auth .auth-card section.card{
  border: 1px solid rgba(11,18,32,0.10);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.layout-auth .auth-card .card-title{
  padding: 16px 18px 0;
  font-weight: 700;
  color: var(--ink);
}

.layout-auth .auth-card .card-body{
  padding: 16px 18px 18px;
}

@media (max-width: 640px){
  .layout-auth .auth-shell{
    width: min(920px, calc(100vw - 16px));
    margin: 18px auto 24px;
    padding: 0 8px 24px;
  }

  .layout-auth .auth-card{
    padding: 18px;
    border-radius: 16px;
  }
}

/* ============================================================
   APP LAYOUT (layout-app): 1080p+ wide shell + dashboard scroll
   Only affects: body.layout-app (app pages)
   ============================================================ */

.layout-app .site-header{
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Make header width match the app shell width */
.layout-app .site-header .site-header-inner{
  width: 100%;
  max-width: none;
  padding: 0 20px;
}

/* App shell spacing (keeps the dashboard off the edges) */
.layout-app .app-shell{
  position: relative;
  z-index: 2;
  padding: 0;
}

/* Wide 2-col dashboard grid */
.layout-app .app-shell-inner{
  width: min(1500px, 96vw);
  margin: 0 auto;

  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;

  align-items: start;

  /* Dashboard feel: panes sized to viewport */
  min-height: calc(100dvh - 64px);
}

/* Panels must not “leak” scrollbars; scroll lives inside */
.layout-app .app-sidebar,
.layout-app .app-main{
  overflow: hidden;
   min-height: 0; /* critical in CSS grid */
}

/* Scroll inside the glass panels */
.layout-app .app-sidebar .glass-content,
.layout-app .app-main .glass-content{
  height: 100%;
  overflow: auto;
}

.layout-app .app-sidebar.glass-frame{
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  box-shadow: none;
}

.layout-app .app-main.glass-frame{
  background: #ffffff;
  border: none;
  box-shadow: none;
}

.portal-body.layout-app .app-main > .glass-content{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Give main content consistent padding */
.layout-app .app-main-inner{
  padding: 24px 28px;
}

/* Mobile fallback: stack sidebar above main, normal page scroll */
@media (max-width: 980px){
  .layout-app .app-shell-inner{
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .layout-app .app-sidebar .glass-content,
  .layout-app .app-main .glass-content{
    height: auto;
    overflow: visible;
  }
}

.layout-app .portal-bg::after{
  display: none;
}

.portal-body.layout-app{
  min-height: 100dvh;
  display: flex;
  flex-direction: column;

  /* Desktop dashboard model: page itself must NOT scroll */
  overflow: hidden;
}

/* App layout should use a wider desktop max width (1080p friendly) */
.layout-app .site-header-inner,
.layout-app .app-shell-inner{
  width: min(1400px, 96vw);
  margin: 0 auto;
}

/* App area fills remaining viewport height under header/footer */
.layout-app .app-shell{
  flex: 1;
  min-height: 0;           /* critical */
  padding: 18px 18px 22px; /* gives you the “stage” margin */
}

/* Ensure the grid actually stretches and main can grow */
.layout-app .app-shell-inner{
  height: 100%;
  min-height: 0; /* critical in grid */
}

/* Critical: allow main panel contents to expand instead of forcing skinny layouts */
.layout-app .app-main{
  min-width: 0;
}
.layout-app .app-main-inner{
  width: 100%;
  max-width: none;
}

/* ============================================================
   APP SHELL — FORCE 1080p FRIENDLY WIDTH + REAL 2-COLUMN GRID
   (Does NOT depend on body having .layout-app)
   ============================================================ */

.app-shell-inner{
  width: min(1400px, 96vw);
  margin: 0 auto;

  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

/* If .glass-frame has any max-width/width clamps, kill them ONLY inside app shell */
.app-shell-inner > .glass-frame{
  width: auto;
  max-width: none;
}

/* Main must be allowed to expand and not overflow the grid cell */
.app-shell-inner > .app-main{
  min-width: 0;
}

/* If your scroll model is active, keep scroll inside panels (won’t break if unused) */
.portal-body.layout-app{
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.portal-body.layout-app .app-shell{
  flex: 1;
  min-height: 0;
}
.portal-body.layout-app .app-sidebar,
.portal-body.layout-app .app-main{
  min-height: 0;
  overflow: hidden;
}
.portal-body.layout-app .app-sidebar .glass-content,
.portal-body.layout-app .app-main .glass-content{
  height: 100%;
  overflow: auto;
}

/* ============================================================
   APP ONLY: glass-content must NOT behave like auth cards
   (Auth uses centered grid; app needs normal flow + full width)
   ============================================================ */

.portal-body.layout-app .app-sidebar .glass-content,
.portal-body.layout-app .app-main .glass-content{
  display: flex;
  flex-direction: column;
  align-items: stretch;     /* critical: no horizontal centering */
  justify-content: flex-start;
  gap: 14px;
}

/* Make sure app main content can actually use full width */
.portal-body.layout-app .app-main-inner{
  width: 100%;
  max-width: none;
}

/* ============================================================
   APP FINAL OVERRIDES — lock a real app height model
   - app fills viewport between header/footer
   - sidebar + main are full-height
   - scroll lives INSIDE the glass panels
   ============================================================ */

html, body { height: 100%; }

/* App pages: body = header + app + footer */
/* ============================================================
   APP SHELL LOCK (authoritative)
   - Forces true 2-column grid (prevents main bleeding under sidebar)
   - Kills auth-card clamps inside app
   - Scroll stays inside panels
   ============================================================ */

.portal-body.layout-app{
  min-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
}

/* App area fills remaining viewport height under header/footer */
.portal-body.layout-app .app-shell{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Real 2-column grid */
.layout-app .app-shell-inner{
  width: 100%;
  max-width: none;
  margin: 0;

  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 0 !important;
  align-items: stretch !important;

  height: 100% !important;
  min-height: 0 !important;
}

.layout-app .site-header{
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.layout-app .app-main{
  padding-left: 20px;
}

/* FORCE explicit placement (this is what stops the bleed) */
.portal-body.layout-app .app-shell-inner > .app-sidebar{
  grid-column: 1 / 2 !important;
  position: relative !important; /* kills any absolute/sticky nonsense */
  inset: auto !important;
  z-index: 2 !important;
}

.portal-body.layout-app .app-shell-inner > .app-main{
  grid-column: 2 / 3 !important;
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
}

/* Kill auth-card clamps ONLY inside app shell */
.portal-body.layout-app .app-shell-inner > .glass-frame{
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  height: 100% !important;
}

/* Panels never scroll; scroll is inside */
.portal-body.layout-app .app-sidebar,
.portal-body.layout-app .app-main{
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Sidebar content should NOT be auth-centered grid */
.portal-body.layout-app .app-sidebar > .glass-content{
  padding: 14px !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 10px !important;

  height: 100% !important;
  overflow: auto !important;
}

/* Main content should NOT be auth-centered grid */
.portal-body.layout-app .app-main > .glass-content{
  padding: 18px 18px 22px !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 14px !important;

  height: 100% !important;
  overflow: auto !important;
}

/* Keep sidebar non-sticky until everything is perfect */
.portal-body.layout-app .app-sidebar{
  position: relative !important;
  top: auto !important;
}

/* ============================================================
   APP GRID HARD-FIX: main must NOT sit underneath sidebar
   (This kills the “mini dashboard inside sidebar” see-through.)
   ============================================================ */

.portal-body.layout-app .app-shell-inner > .app-sidebar{
  grid-column: 1 / 2 !important;
  grid-row: 1 !important;
}

.portal-body.layout-app .app-shell-inner > .app-main{
  grid-column: 2 / 3 !important;
  grid-row: 1 !important;
}

/* ============================================================
   APP RAIL ALIGNMENT: header must match app grid width
   ============================================================ */

.portal-body.layout-app .site-header-inner{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 20px !important;
}

/* App sidebar readability: slightly stronger glass than main */
.portal-body.layout-app .app-sidebar.glass-frame{
  background: linear-gradient(180deg, rgba(255,255,255,0.38), rgba(255,255,255,0.26)) !important;
  border-color: rgba(255,255,255,0.46) !important;
}

/* ============================================================
   APP GRID FINAL PIN — stops main sitting behind sidebar
   (grid-template-areas overrides the grid-column knife fights)
   ============================================================ */

.portal-body.layout-app .app-shell-inner{
  display: grid !important;
  grid-template-columns: 200px minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
  grid-template-areas: "sidebar main" !important;
}

.portal-body.layout-app .app-shell-inner > .app-sidebar{
  grid-area: sidebar !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

.portal-body.layout-app .app-shell-inner > .app-main{
  grid-area: main !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

/* Safety: if any earlier rules made them overlap via stacking contexts */
.portal-body.layout-app .app-shell-inner > .app-sidebar,
.portal-body.layout-app .app-shell-inner > .app-main{
  position: relative !important;
  z-index: 1 !important;
}

/* ============================================================
   APP LAYOUT (authoritative)
   - Real 2-column grid (sidebar + main)
   - Nothing overlaps: no sticky/fixed/absolute inside the shell
   - Scroll lives INSIDE panels
   ============================================================ */

.portal-body.layout-app{
  min-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Header rail matches the app canvas width */
.portal-body.layout-app .site-header-inner{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 20px !important;
}

/* App area fills remaining viewport height under header/footer */
.portal-body.layout-app .app-shell{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.portal-body.layout-app .app-shell-inner{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;

  display: grid !important;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-areas: "sidebar main" !important;
  gap: 0 !important;

  height: 100% !important;
  min-height: 0 !important;
  align-items: stretch !important;
}

/* Explicit placement */
.portal-body.layout-app .app-shell-inner > .app-sidebar{
  grid-area: sidebar !important;
}
.portal-body.layout-app .app-shell-inner > .app-main{
  grid-area: main !important;
}

/* BRUTE FORCE: nothing in the shell is allowed out of flow */
.portal-body.layout-app .app-shell-inner > .app-sidebar,
.portal-body.layout-app .app-shell-inner > .app-main{
  position: static !important;
  inset: auto !important;
  transform: none !important;

  margin: 0 !important;
  width: auto !important;
  max-width: none !important;

  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Glass frames inside app shell must NOT be auth cards */
.portal-body.layout-app .app-shell-inner > .glass-frame{
  width: auto !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
}

/* Scroll lives inside the glass panels */
.portal-body.layout-app .app-sidebar > .glass-content,
.portal-body.layout-app .app-main > .glass-content{
  height: 100% !important;
  overflow: auto !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
}

.portal-body.layout-app .app-sidebar > .glass-content{
  padding: 14px !important;
  gap: 10px !important;
}

.portal-body.layout-app .app-main > .glass-content{
  padding: 18px 18px 22px !important;
  gap: 14px !important;
}

.portal-body.layout-app .app-sidebar.glass-frame{
  background: #ffffff !important;
  border-right: 1px solid #e5e7eb !important;
}

/* Mobile: stack sidebar above main, use normal page scroll */
@media (max-width: 980px){
  .portal-body.layout-app{
    overflow: auto !important;
  }

  .portal-body.layout-app .app-shell{
    flex: 0 0 auto !important;
  }

  .portal-body.layout-app .app-shell-inner{
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "sidebar"
      "main" !important;
    height: auto !important;
  }

  .portal-body.layout-app .app-sidebar > .glass-content,
  .portal-body.layout-app .app-main > .glass-content{
    height: auto !important;
    overflow: visible !important;
  }
}

.ws-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

/* === CLEAN SIDEBAR CONTAINER === */

.layout-app .app-sidebar{
  background: #ffffff !important;
  border-right: 1px solid #e5e7eb;
  padding: 12px 10px;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* 🔥 REMOVE CARD LOOK COMPLETELY */
.portal-body.layout-app .app-sidebar.glass-frame{
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}

  /* kill glass leftovers */
  .layout-app .app-sidebar,
  .layout-app .app-sidebar .glass-content,
  .layout-app .app-sidebar.glass-frame{
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #ffffff !important;
  }

  .layout-app .app-sidebar{
    border-right: 1px solid #e5e7eb !important;
  }

  .layout-app .app-sidebar .glass-content,
  .layout-app .app-sidebar.glass-frame{
    border: none !important;
  }

.glass-frame{
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* === HARD UI LAYER SEPARATION (CRITICAL) === */

.layout-app .app-sidebar{
  position: relative;
  z-index: 10;
}

.layout-app .app-main{
  position: relative;
  z-index: 1;
  background: #ffffff;
}

/* =========================================================
   WORKSPACE TABLE UX (clickable rows + active state)
   ========================================================= */

.ws-table .ws-row{
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
  position: relative;
}

/* spacing between rows */
.ws-table tbody tr{
  border-bottom: none;
}

.ws-table tbody tr + tr{
  margin-top: 8px;
}

.ws-table .ws-row td{
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-default);
  font-size: 14px;
  color: var(--text-primary);
}

/* rounded row edges */
.ws-table .ws-row td:first-child{
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.ws-table .ws-row td:last-child{
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.ws-table .ws-row:hover td{
  background: #f9fafb;
}

.ws-table .ws-row:hover td:last-child{
  background: transparent;
}

.ws-table .ws-row:hover td:not(:last-child){
  box-shadow: none;
}

.ws-table .ws-row:hover td:first-child strong{
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ws-table .ws-row.active td{
  background: #eef2ff;
}

.ws-table .ws-row.active td:not(:last-child){
  box-shadow: inset 4px 0 0 var(--accent), 0 10px 24px rgba(255,138,0,0.12);
}

.ws-table .ws-row.active td:first-child strong{
  color: #111827;
}

/* stronger name emphasis */
.ws-table .ws-row td strong{
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  display: block;
}

/* non-action cells feel like the main click lane */
.ws-table .ws-row td:not(:last-child){
  cursor: pointer;
}

.ws-table .ws-row td:last-child{
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  cursor: default;
  background: transparent;
}

.ws-table .ws-row td:last-child .btn{
  cursor: pointer;
}

/* keep action buttons visually separate from row-selection lane */
.ws-table .ws-row td:last-child .btn{
  position: relative;
  z-index: 2;
}

.ws-file-list {
  display: grid;
  gap: 10px;
}

.ws-file-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ws-file-row:hover {
  background: rgba(255,255,255,0.22);
}

.ws-file-row.active {
  background: #e0f2fe;
}

.ws-file-title {
  font-weight: 800;
}

.ws-file-meta {
  font-size: 12px;
  color: rgba(11,18,32,0.55);
}

.ws-file-actions {
  display: flex;
  gap: 8px;
}

/* =========================================================
   WORKSPACE LAYOUT FILL
   ========================================================= */

.workspace-grid{
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  gap: 20px;
  align-items: start;
}

.workspace-left,
.workspace-main,
.workspace-right{
  min-height:100%;
  padding-top: 2px;
}

.workspace-left > .card,
.workspace-main > .card,
.workspace-right > .card{
  height:auto;
  padding-top: 2px;
}

@media (max-width: 1280px){
  .workspace-grid{
    grid-template-columns:260px minmax(0,1fr) 300px;
  }
}

@media (max-width: 1024px){
  .workspace-grid{
    grid-template-columns:1fr;
    min-height:auto;
  }
}

/* =========================================================
   WORKSPACE RIGHT PANEL (visual separation)
   ========================================================= */

.workspace-right{
  display:grid;
  gap:12px;
  align-content:start;
  padding-left:18px;
  padding-top:2px;
  border-left: 1px solid rgba(255,255,255,0.22);
}

.workspace-right .card{
  margin:0;
  display:grid;
  gap:8px;
  padding:16px 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.36);
  background: linear-gradient(180deg, rgba(255,255,255,0.44), rgba(255,255,255,0.30));
  box-shadow:
    0 20px 36px rgba(0,0,0,0.14),
    inset 0 1px 0 rgba(255,255,255,0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow:hidden;
}

.workspace-right .card-title{
  margin:0;
  padding:0;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(11,18,32,0.55);
}

.workspace-right .card-body{
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(11,18,32,0.78);
}

.workspace-right [data-detail-panel]{
  min-height: 120px;
  align-content:start;
}

.workspace-right .card + .card{
  margin-top: 0;
}

/* =========================================================
   WORKSPACE TABLE TOOLBAR
   ========================================================= */

.ws-toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.ws-toolbar-search{
  flex: 1;
  min-width: 220px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-default);
}

.ws-toolbar-search::placeholder{
  color: rgba(11,18,32,0.48);
}

.ws-toolbar-select{
  height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.38);
  padding:0 12px;
  background: rgba(255,255,255,0.42);
  color: rgba(11,18,32,0.82);
}

.ws-toolbar + .table-wrap{
  margin-top: 0;
}

/* =========================================================
   WORKSPACE CONTEXT BAR (compact SaaS control strip)
   ========================================================= */

.ws-context-bar{
  margin-bottom:16px;
  padding:14px 14px;
  border-radius:18px;
  border: 1px solid rgba(255,138,0,0.25);
  background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0.20));
  box-shadow: 0 16px 34px rgba(255,138,0,0.10);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: scale(1.01);
}

.ws-context-form{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}

.ws-context-fields{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  flex:1;
}

.ws-context-fields select{
  height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.35);
  padding:0 10px;
  background: rgba(255,255,255,0.42);
  min-width:160px;
}

.ws-context-actions{
  display:flex;
  gap:8px;
}

/* =========================================================
   WORKSPACE GLOBAL TOOLBAR
   ========================================================= */

.app-page-actions .top-tools{
  display:inline-flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding:8px 10px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
  box-shadow: 0 6px 14px rgba(10,20,40,0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: scale(0.96);
  opacity: 0.88;
}

.app-page-actions .top-search-input{
  width:min(320px, 32vw);
  min-width:220px;
  height:40px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.38);
  background: rgba(255,255,255,0.42);
  color: rgba(11,18,32,0.82);
  outline:none;
}

.app-page-actions .top-search-input::placeholder{
  color: rgba(11,18,32,0.48);
}

.app-page-actions .top-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  text-decoration:none;
  font-weight:900;
  color: rgba(11,18,32,0.74);
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.34);
  background: rgba(255,255,255,0.34);
  box-shadow: 0 6px 14px rgba(10,20,40,0.06);
}

.app-page-actions .top-icon:hover{
  background: rgba(255,255,255,0.46);
}

.app-page-actions .top-tools .btn.primary{
  height:40px;
  padding:0 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

/* =========================================================
   WORKSPACE RIGHT PANEL — VISUAL HIERARCHY UPGRADE
   ========================================================= */

.workspace-right .card{
  background: rgba(255,255,255,0.92); /* kill glass effect */
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 18px 40px rgba(10,20,40,0.18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.workspace-right .card-title{
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(17,24,39,0.55);
}

.workspace-right .card-body{
  color: #111827;
}

/* stronger separation between stacked cards */
.workspace-right .card + .card{
  margin-top: 14px;
}


/* =========================================================
   PANEL COMPONENT SYSTEM (CLEAN UI)
   ========================================================= */

.panel{
  display: grid;
  gap: 14px;
}

.panel-title{
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.panel-group{
  display: grid;
  gap: 4px;
}

.panel-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(17,24,39,0.55);
}

.panel-value{
  font-size: 14px;
  color: #111827;
}

.panel-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.panel-primary{
  margin-top: 10px;
}


/* =========================================================
   DETAIL PANEL CONTENT STRUCTURE
   ========================================================= */

.workspace-right [data-detail-panel]{
  gap: 14px !important;
}

.workspace-right [data-detail-panel] > div{
  margin-bottom: 2px;
}

/* meta label tightening */
.workspace-right [data-detail-panel] div[style*="font-size:12px"]{
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(17,24,39,0.55) !important;
}

/* =========================================================
   WORKSPACE LEFT NAV
   ========================================================= */

.ws-nav-stack{
  display:grid;
  gap:10px;
}

.ws-nav-link{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid transparent;
}

.ws-nav-link:hover{
  background: #f9fafb;
}

.ws-nav-link.is-active,
.ws-nav-link[aria-current="page"]{
  background: #111827;
  color: #fff;
}

/* =========================================================
   WORKSPACE EMPTY STATES
   ========================================================= */

.ws-empty{
  display:grid;
  gap:10px;
  padding:18px 18px;
  border-radius:14px;
  border:1px dashed var(--border-default);
  background: #ffffff;
}

.ws-empty-title{
  font-size:16px;
  font-weight:800;
  color:#111827;
}

.ws-empty-copy{
  font-size:14px;
  line-height:1.5;
  color:rgba(17,24,39,0.68);
}

.ws-empty-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:4px;
}

.ws-note{
  margin-bottom:12px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--border-default);
  background:#f9fafb;
  color:#4b5563;
  font-size:13px;
  line-height:1.45;
}

/* =========================================================
   PRIMARY BUTTON — MAKE IT DOMINANT
   ========================================================= */

.btn.btn-primary{
  background: #FF8A00; /* strong orange */
  color: #ffffff;
  border: none;
  box-shadow: 0 10px 20px rgba(255,138,0,0.35);
  font-weight: 700;
}

.btn.btn-primary:hover{
  background: #e67600;
}

/* =========================================================
   SECONDARY BUTTON — SOFTEN
   ========================================================= */

.workspace-right .btn:not(.btn-primary){
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(11,18,32,0.75);
  font-size: 13px;
  padding: 8px 12px;
  box-shadow: none;
}

.workspace-right .btn:not(.btn-primary):hover{
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.35);
}

/* =========================================================
   PANEL FOCUS — MAKE IT VISUALLY IMPORTANT
   ========================================================= */

.workspace-right{
  transform: translateZ(0);
}

.workspace-main{
  opacity: 0.96;
}

.workspace-right [data-detail-panel] a.btn:not(.btn-primary){
  display:inline-block;
  width:auto;

  background:rgba(17,24,39,0.08) !important;
  color:#111827 !important;

  border:1px solid rgba(0,0,0,0.10) !important;
}

.workspace-right .btn.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(255,138,0,0.55);
}

/* =========================================================
   BACKGROUND CONTROL — STOP COMPETING WITH UI
   ========================================================= */

body::before{
  content:"";
  position:fixed;
  inset:0;
  background: rgba(255,255,255,0.35); /* light wash over bg */
  pointer-events:none;
  z-index:0;
}

/* secondary column tone-down */
.ws-table .ws-row td:nth-child(2),
.ws-table .ws-row td:nth-child(4){
  color: rgba(15,23,42,0.55);
  font-size: 13px;
}

/* status stays visible */
.ws-table .ws-row td:nth-child(3){
  font-size: 13px;
}

.ws-table .ws-row{
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

/* =========================================
   TABLE SYSTEM
   ========================================= */

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

.table thead th {
  text-align: left;
  font-size: 13px;
  color: var(--text-secondary);
  padding: var(--space-3);
  border-bottom: 1px solid var(--border-default);
}

.table tbody td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border-default);
}

.table tbody tr:hover {
  background: #fafafa;
}

.panel-muted{
  color: rgba(17,24,39,0.55);
}

/* === USER MENU (Graphisoft-style clean dropdown) === */

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;

  background: transparent;
  border: none;
  border-radius: 0;

  padding: 4px 6px;

  color: #111827;
}

.user-menu-trigger:hover {
  background: #f9fafb;
  border-radius: 6px;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.user-avatar.large {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.user-email {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  line-height: 1.2;
}

.user-company {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.3;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 280px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  display: none;
  z-index: 1000;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.user-dropdown.open {
  display: block;
}

.user-dropdown-header {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #fcfcfd;
}

.user-meta {
  min-width: 0;
}

.user-dropdown .user-email {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

.user-dropdown-links a,
.user-dropdown-footer a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
}

.user-dropdown-links a:hover {
  background: #f9fafb;
}

.user-dropdown-footer {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.logout-btn {
  color: #b91c1c;
}

/* === CLEAN AUTH LAYOUT OVERRIDE === */

.layout-auth .portal-wrap.auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.layout-auth .auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.layout-auth .auth-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 10px;
}

.layout-auth .auth-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 20px;
}

.layout-auth .auth-body {
  display: grid;
  gap: 14px;
}

/* =========================================================
   DASHBOARD SYSTEM (Graphisoft-style structure)
========================================================= */

.dashboard-section{
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
    padding: 28px;
  border-radius: 14px;
}

.dashboard-section + .dashboard-section{
  margin-top: 20px;
}

.dashboard-section h2{
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #111827;
}

.dashboard-section p{
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 16px;
}

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

.stat-card{
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
}

.stat-k{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 8px;
}

.stat-v{
  font-size: 22px;
  font-weight: 750;
  line-height: 1.25;
  color: #111827;
  word-break: break-word;
}

.stat-s{
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.45;
  word-break: break-word;
}

.quick-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.quick-actions a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.quick-actions a:hover{
  background: #f3f4f6;
}

.quick-actions a{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 14px;

  border-radius: 8px;
  border: 1px solid #e5e7eb;

  background: #ffffff;
  color: #111827;
  text-decoration: none;
  font-weight: 600;

  transition: background 0.15s ease;
}

.quick-actions a:hover{
  background: #f3f4f6;
}

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

.layout-app .app-shell-sidebar{
  width: 260px !important;
  min-width: 260px !important;
  padding: 18px 12px !important;
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
}

.site-menu-section{
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;

  padding: 18px 14px 6px;
}

/* =========================================
   LOGIN PAGE — GRAPHISOFT-STYLE AUTH LANE
   This block is intentionally specific so it wins
   over earlier generic auth rules in this file.
========================================= */

body.layout-auth {
  background: #f3f3f1 !important;
}

.portal-body.layout-auth .portal-bg {
  display: none !important;
}

.layout-auth .portal-wrap.auth-shell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;   /* 🔥 KEY FIX */
  align-items: center;
  min-height: 100vh;                /* 🔥 NOT fixed height */
  padding: 40px 16px 20px;
}

.layout-auth {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

.layout-auth main {
  flex: 1 1 auto;
  min-height: 0;
}

.layout-auth .portal-wrap.auth-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 16px 8px;
  transform: translateY(-26px);
}

.layout-auth .auth-container {
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layout-auth .auth-inner {
  width: 100%;
  max-width: 300px;
  padding: 0;
  text-align: center;
}

.layout-auth .hero-logo-link {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  margin: 0 0 22px;
}

.layout-auth .hero-logo-link:focus {
  outline: none;
  box-shadow: none;
}

.layout-auth .hero-logo {
  width: 122px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.layout-auth .auth-card,
.layout-auth .input-icon,
.layout-auth .input-wrap,
.layout-auth .form,
.layout-auth .field,
.layout-auth .row,
.layout-auth .checkbox,
.layout-auth .btn.btn-primary,
.layout-auth .btn-primary {
  all: unset;
}

.layout-auth .auth-title {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

.layout-auth .auth-subtitle {
  margin: 0 0 22px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  text-align: center;
}

.layout-auth .auth-form-wrap {
  width: 100%;
  text-align: left;
}

.layout-auth .login-form {
  display: grid;
  gap: 18px;
  width: 100%;
}

.layout-auth .login-field {
  display: grid;
  gap: 6px;
}

.layout-auth .login-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.layout-auth .login-label {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  color: #3b3b3b;
}

.layout-auth .login-link {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  color: #2f2f2f;
  text-decoration: none;
}

.layout-auth .login-link:hover {
  text-decoration: underline;
}

.layout-auth .login-input {
  width: 100%;
  height: 30px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid #2f2f2f;
  border-radius: 0;
  background: transparent;
  color: #161616;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.layout-auth .login-input::placeholder {
  color: #8a8a8a;
}

.layout-auth .login-input:focus {
  outline: none;
  border-bottom-color: #111111;
  box-shadow: none;
}

.layout-auth .login-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
  color: #4a4a4a;
}

.layout-auth .login-check input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #9b9b9b;
}

.layout-auth .login-submit {
  width: 100%;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #d8d8d8;
  color: #727272;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.55) inset;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.layout-auth .login-submit:hover {
  background: #bfc3c8;
  color: #3f4650;
  transform: translateY(-2px);
  box-shadow:
    0 10px 24px rgba(17, 24, 39, 0.14),
    0 1px 0 rgba(255,255,255,0.45) inset;
  filter: saturate(1.02);
}

.layout-app .site-menu-item:hover{
  background: #f3f4f6;
  color: #111827;
}

.layout-auth .login-submit:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(17, 24, 39, 0.10),
    0 8px 18px rgba(17, 24, 39, 0.10);
}

.layout-auth .login-submit:active {
  transform: translateY(0);
  background: #b6bbc1;
  color: #374151;
  box-shadow: 0 3px 8px rgba(17, 24, 39, 0.10);
}

.layout-auth .login-meta {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: #4a4a4a;
}

.layout-auth .login-meta-text {
  color: #4a4a4a;
}

.layout-auth .login-link-strong {
  font-weight: 700;
}

.layout-auth .notice.notice-error,
.layout-auth .notice.notice-success {
  margin: 0 0 4px 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #c2410c !important;
  font-size: 11px;
  line-height: 1.35;
  box-shadow: none !important;
}

.layout-auth .portal-footer {
  background: transparent !important;
  border-top: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}

.layout-auth .portal-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6px 16px 8px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.layout-auth .portal-footer-left,
.layout-auth .portal-footer-right {
  color: #6b7280 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* =========================================
   AUTH FOOTER — GRAPHISOFT CRISP STYLE
========================================= */

.layout-auth .portal-footer {
  font-family: inherit;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.04em;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.layout-auth .portal-footer * {
  opacity: 1 !important;              /* 🔥 KILL WASHED LOOK */
  text-shadow: none !important;       /* 🔥 REMOVE ANY SHADOW */
}

.layout-auth .portal-links,
.layout-auth .portal-link,
.layout-auth .portal-copy {
  color: #4b5563 !important;          /* 🔥 DARKER + CRISP */
  font-weight: 500;
  text-transform: uppercase;
}

.layout-auth .portal-sep {
  color: #9ca3af !important;
}

.layout-auth .portal-credit-text {
  color: #6b7280 !important;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0.02em;
}

/* tighten spacing */
.layout-auth .portal-footer-inner {
  padding: 6px 16px 6px !important;
}

.layout-auth .portal-links,
.layout-auth .portal-link,
.layout-auth .portal-copy,
.layout-auth .portal-sep{
  color: rgba(255,255,255,0.92) !important;
}

.layout-auth .portal-sep {
  color: #6b7280 !important;
}

.layout-auth .portal-credit-text {
  color: #4b5563 !important;     /* 🔥 darker but still secondary */
}

.layout-auth .portal-link {
  cursor: default;
  text-decoration: none;
}

.layout-auth .portal-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 !important;
  border-radius: 0 !important;
}

.layout-auth .portal-credit-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.layout-auth .portal-credit-logo img {
  height: 16px;
  opacity: 0.9;
}

/* Synergetix — FULL COLOR */
.layout-auth .logo-synergetix img {
  filter: none !important;
  opacity: 1;
}

/* VanRick — slightly larger */
.layout-auth .logo-vanrick img {
  height: 18px;                      /* 🔥 increased */
  filter: invert(1) brightness(0);
  opacity: 0.8;
}

.layout-auth .portal-credit-sep {
  color: #c4c7cf !important;
}

@media (max-width: 640px) {
  .layout-auth .portal-wrap.auth-shell {
    padding-top: 72px;
  }

  .layout-auth .auth-inner {
    max-width: 250px;
  }
}

/* =========================================
   GRAPHISOFT LOGIN — SIZE + ALIGN FIX
========================================= */

/* move slightly UP (not dead center) */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;       /* 🔥 was center */
  justify-content: center;
  padding-top: 120px;            /* 🔥 critical */
}

/* tighter column */
.auth-inner {
  width: 100%;
  max-width: 300px;              /* 🔥 was 380px */
  padding: 0;                    /* 🔥 remove fat padding */
  text-align: center;
}

/* smaller logo */
.hero-logo {
  width: 110px;                  /* 🔥 was 140px */
  margin-bottom: 18px;           /* tighter */
}

/* tighter form spacing */
.field {
  margin-bottom: 14px;           /* was ~18 */
}

/* inputs tighter */
.input {
  padding: 8px 0 !important;     /* was 10px */
}

/* button — neutral like Graphisoft */
.btn-primary {
  width: 100%;
  margin-top: 16px;
  border-radius: 999px;

  background: #e5e5e5;           /* flat */
  color: #9ca3af;                /* 🔥 lighter text */

  height: 38px;                  /* 🔥 controlled height */
  font-size: 13px;
  font-weight: 500;

  box-shadow: none;              /* 🔥 remove glow */
}

/* reduce label size slightly */
.label {
  font-size: 12px;
}

/* tighten footer spacing visually */
.portal-footer {
  margin-top: 40px;
}

/* === APP SIDEBAR MENU: ICON + LABEL REBUILD === */
.layout-app .site-menu{
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.layout-app .site-menu-section{
  margin: 20px 0 8px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.layout-app .site-menu-item{
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 18px;
  padding: 2px 12px;
  border-radius: 10px;
  color: #374151;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 0.5;
  background: transparent;
}

.layout-app .site-menu-item:hover{
  background: #eef0f3;
  color: #111827;
}

.layout-app .site-menu-item[aria-current="page"]{
  background: #dfe3e8;
  color: #111827;
}

.layout-app .site-menu-icon{
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  color: currentColor;
}

.layout-app .site-menu-icon svg{
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.layout-app .site-menu-label{
  display: inline-block;
  flex: 1 1 auto;
}

/* === APP HEADER BRAND SCALE UP === */
.site-header.site-header-app .site-brand{
  gap: 18px !important;
  padding: 0 !important;
}

.site-header.site-header-app .site-brand-mark{
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  border-radius: 16px !important;
  padding: 0 !important;
}

.site-header.site-header-app .site-brand-logo{
  width: 65px !important;
  height: 65px !important;
  max-width: none !important;
}

.site-header.site-header-app .site-brand-name{
  font-size: 32px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

.site-header.site-header-app .site-brand-name .brand-flux{
  opacity: 0.9 !important;
}

.site-header.site-header-app .site-brand-name .brand-reports{
  display: inline-block !important;
  font-size: 22px !important;
  line-height: 1 !important;
  opacity: 1 !important;
  position: relative !important;
  top: 4px !important;
  color: #E07900 !important;
  text-decoration: none !important;
}

/* === FORCE APP FOOTER TO MATCH AUTH FOOTER === */

.layout-app .portal-footer{
  margin-top: 0 !important;
  padding: 24px 0 !important;
  background: transparent !important;
}

.layout-app .portal-footer-inner{
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 16px !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

.layout-app .portal-footer-left,
.layout-app .portal-footer-right{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.layout-app .portal-copy{
  font-size: 13px !important;
  opacity: 0.7 !important;
}

.layout-app .portal-credit-text{
  font-size: 13px !important;
  opacity: 0.7 !important;
}

.layout-app .portal-credit-logo img{
  height: 20px !important;
  width: auto !important;
  opacity: 0.85 !important;
}

/* =========================================================
   OUTPUT DESIGNER — CLEAN REBUILD
   ========================================================= */

.od-grid {
  display: grid;
  grid-template-columns: 300px 10px minmax(0,1fr) 10px 320px 10px 420px;
  gap: 0;
  align-items: stretch;
}

/* === SPLITTERS === */
.od-splitter {
  width: 10px;
  min-width: 10px;
  align-self: stretch;
  min-height: 100%;
  cursor: col-resize;
  position: relative;
  user-select: none;
}

.od-splitter::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  background: #e5e7eb;
}

.od-splitter:hover::before {
  background: #6b7280;
}

body.od-resizing,
body.od-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

/* columns */
.od-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* =========================
   TOOLBOX
   ========================= */
/* =========================
   TOOLBOX
   ========================= */
.od-toolbox .card-body{
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
}

.od-tool-section{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f3f4f6;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.od-tool-section-title{
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.od-tool-item{
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  cursor: grab;
}

.od-tool-item:hover{
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.od-tool-item:active{
  cursor: grabbing;
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.od-tool-item[data-type]::after{
  content: attr(data-type);
  margin-left: auto;
  padding-left: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.od-toolbox .od-placeholder{
  min-height: 72px;
  height: auto;
  justify-content: flex-start;
  text-align: left;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

/* =========================
   WORKSPACE (REAL A4)
   ========================= */
.od-canvas-area {
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 24px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 12px;

  /* 🔥 CRITICAL FIX */
  height: 100%;
  min-height: 600px;
  overflow: hidden;
}

.od-a4 {
  width: 100%;
  max-width: 794px;

  aspect-ratio: 794 / 1123;

  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);

  position: relative;
  overflow: hidden;
}

.od-scale-wrapper {
  transform-origin: top left;
}

/* =========================
   CANVAS ITEMS
   ========================= */
.od-canvas-inner{
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.od-node{
  position: absolute;
  box-sizing: border-box;

  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;

  font-size: 14px;
  color: #0f172a;

  box-shadow: 0 1px 3px rgba(0,0,0,0.06);

  min-width: 120px;
  min-height: 40px;

  cursor: move;
}

.od-node-content{
  display: block;
  width: 100%;
  height: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  cursor: text;
  user-select: text;
}

.od-node-heading{
  font-size: 18px;
  font-weight: 700;
}

.od-node-variable{
  background: #eef2ff;
  border-color: #c7d2fe;
}

.od-node.selected{
  outline: 2px solid #6366f1;
  outline-offset: 1px;
  border-color: #6366f1;
  box-shadow:
    0 0 0 4px rgba(99,102,241,0.14),
    0 10px 24px rgba(99,102,241,0.18);
}

.od-node:hover{
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(15,23,42,0.10);
}

.od-node.selected:hover{
  border-color: #6366f1;
  box-shadow:
    0 0 0 4px rgba(99,102,241,0.14),
    0 10px 24px rgba(99,102,241,0.18);
}

/* =========================
   PREVIEW (FIT-TO-COLUMN A4)
   ========================= */
.od-preview-area {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: auto;
}

.od-preview-viewport {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
}

/* P23.5 uniformly scaled read-only A4 using real submission data. */
.od-preview-inner {
  width: 100%;
  max-width: none;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

.od-preview-scale {
  position: relative;
  flex: 0 0 auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
  overflow: hidden;
}

.od-preview-scale > .od-render-page {
  transform-origin: top left;
}

/* =========================
   PLACEHOLDER
   ========================= */
.od-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-weight: 600;
}

/* =========================
   PROPERTIES PANEL
   ========================= */
.od-prop-placeholder{
  font-size: 13px;
  color: #64748b;
  padding: 10px;
}

.od-prop-panel{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.od-prop-group{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.od-prop-label{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

#odPropContent{
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

.od-btn-danger{
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
  cursor: pointer;
}

.od-btn-danger:hover{
  background: #fecaca;
}

/* =========================
   RESIZE HANDLE
   ========================= */
.od-resize-handle{
  position: absolute;
  width: 10px;
  height: 10px;
  right: -5px;
  bottom: -5px;
  background: #6366f1;
  border-radius: 2px;
  cursor: se-resize;
  display: none;
}

.od-node.selected .od-resize-handle{
  display: block;
}

/* =========================
   DELETE X (TOP RIGHT)
   ========================= */
.od-delete-x{
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  background: #ef4444;
  color: #ffffff;
  font-size: 12px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
}

.od-node.selected .od-delete-x{
  display: flex;
}

/* === FINAL FOOTER TEXT OVERRIDE: KEEP COPYRIGHT + CREDIT TEXT BLACK === */
.layout-auth .portal-copy,
.layout-auth .portal-credit-text,
.layout-app .portal-copy,
.layout-app .portal-credit-text,
.layout-marketing .portal-copy,
.layout-marketing .portal-credit-text {
  color: #000000 !important;
  text-shadow: none !important;
}

/* =========================================================
   P20.3 Workspace selected row polish
   Softer selected row: remove heavy boxed-in vertical bars.
   ========================================================= */

.ws-table .ws-row.active td{
  background: #fff7ed;
  box-shadow: none !important;
}

.ws-table .ws-row.active td:not(:last-child){
  box-shadow: none !important;
}

.ws-table .ws-row.active td:first-child{
  box-shadow: inset 3px 0 0 #ff8a00 !important;
}

.ws-table .ws-row.active td:first-child strong{
  color: #0f172a;
  text-decoration: none;
}


/* P26.2 S2 page masters metadata foundation */
.od-page-master-summary{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(15, 23, 42, 0.10);
  border-radius:12px;
  background:rgba(255,255,255,0.76);
}

.od-page-master-summary__title{
  font-size:12px;
  font-weight:700;
  margin-bottom:6px;
  color:#334155;
}

.od-page-master-summary__grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:4px 14px;
  font-size:12px;
  color:#64748b;
}

.od-page-master-panel{
  margin-bottom:14px;
  padding:12px;
  border:1px solid rgba(15, 23, 42, 0.10);
  border-radius:14px;
  background:#f8fafc;
}

.od-page-master-panel__title{
  font-size:13px;
  font-weight:800;
  color:#0f172a;
  margin-bottom:4px;
}

.od-page-master-panel__hint{
  font-size:12px;
  line-height:1.4;
  color:#64748b;
  margin-bottom:10px;
}

.od-page-master-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.od-page-master-grid label{
  display:flex;
  flex-direction:column;
  gap:5px;
  font-size:12px;
  color:#475569;
}

.od-page-master-grid input{
  width:100%;
  border:1px solid rgba(15, 23, 42, 0.16);
  border-radius:10px;
  padding:8px 9px;
  font-size:13px;
  background:#fff;
}


/* P26.5B S2 page master visual protected-region guides */
.od-page-master-guide{
  position:absolute;
  left:0;
  right:0;
  box-sizing:border-box;
  pointer-events:none;
  z-index:0;
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  padding:4px 6px;
  overflow:hidden;
  border-style:dashed;
  border-width:1px;
}

.od-page-master-guide__label{
  font-size:10px;
  line-height:1.2;
  padding:2px 6px;
  border-radius:999px;
  background:rgba(255,255,255,0.86);
  color:#334155;
  border:1px solid rgba(15,23,42,0.10);
  max-width:70%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.od-page-master-guide--first{
  background:rgba(59,130,246,0.08);
  border-color:rgba(37,99,235,0.42);
}

.od-page-master-guide--subsequent{
  left:8px;
  right:8px;
  background:rgba(14,165,233,0.06);
  border-color:rgba(2,132,199,0.36);
}

.od-page-master-guide--footer{
  align-items:flex-end;
}


/* P27.2C S3 smart roles metadata foundation */
.od-smart-layout-panel{
  border-top:1px solid rgba(15,23,42,0.08);
  padding-top:12px;
}

.od-smart-layout-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.od-smart-layout-grid label{
  display:flex;
  flex-direction:column;
  gap:5px;
  font-size:12px;
  color:#475569;
}

.od-smart-layout-grid input,
.od-smart-layout-grid select{
  width:100%;
  border:1px solid rgba(15,23,42,0.16);
  border-radius:10px;
  padding:8px 9px;
  font-size:13px;
  background:#fff;
}


/* P28.2 page setup UX */
.od-page-setup-panel{
  background:#ffffff;
  border-color:rgba(15,23,42,0.12);
}

.od-page-setup-heading{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.od-guide-view-toggle{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  padding:4px;
  border:1px solid rgba(15,23,42,0.10);
  border-radius:12px;
  background:#f8fafc;
}

.od-guide-view-btn{
  border:0;
  border-radius:9px;
  padding:7px 8px;
  background:transparent;
  color:#475569;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}

.od-guide-view-btn.is-active{
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 1px 4px rgba(15,23,42,0.14);
}

.od-page-master-groups{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}

.od-page-master-group{
  padding:10px;
  border:1px solid rgba(15,23,42,0.08);
  border-radius:12px;
  background:#f8fafc;
}

.od-page-master-group__title{
  font-size:12px;
  font-weight:800;
  color:#334155;
  margin-bottom:8px;
}

.od-page-setup-note{
  margin-top:10px;
  font-size:11px;
  line-height:1.35;
  color:#64748b;
}

.od-page-master-guide{
  justify-content:flex-start;
  padding:5px 8px;
}

.od-page-master-guide__label{
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
  max-width:none;
}

.od-page-master-guide--first,
.od-page-master-guide--subsequent{
  left:0;
  right:0;
  background:rgba(59,130,246,0.07);
  border-color:rgba(37,99,235,0.38);
}


/* P30.3 document toolbar page setup styling */
.od-document-toolbar{
  margin: 18px 0 18px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.od-document-toolbar--page-setup{
  max-width: 980px;
}

.od-document-toolbar__label{
  padding: 12px 16px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}

.od-document-toolbar__body{
  padding: 10px 16px 14px;
}

.od-document-toolbar .od-page-master-panel{
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.od-document-toolbar .od-page-setup-heading{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.od-document-toolbar .od-page-master-panel__title{
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.od-document-toolbar .od-page-master-panel__hint{
  max-width: 560px;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}

.od-document-toolbar .od-guide-view-toggle{
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fafc;
  flex-shrink: 0;
}

.od-document-toolbar .od-guide-view-btn{
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.od-document-toolbar .od-guide-view-btn.is-active{
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
}

.od-document-toolbar .od-page-master-groups{
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.od-document-toolbar .od-page-master-group{
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.od-document-toolbar .od-page-master-group__title{
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.od-document-toolbar .od-page-master-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 8px;
}

.od-document-toolbar .od-page-master-grid label{
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.od-document-toolbar .od-page-master-grid input{
  width: 100%;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 6px 9px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
}

.od-document-toolbar .od-page-setup-note{
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}

@media (max-width: 1100px){
  .od-document-toolbar .od-page-setup-heading{
    display: grid;
  }

  .od-document-toolbar .od-page-master-groups{
    grid-template-columns: 1fr;
  }
}


/* P30.4 compact document setup ribbon */
.od-document-toolbar--page-setup{
  max-width: none;
  margin: 14px 0 16px;
  border-radius: 12px;
}

.od-document-toolbar--page-setup .od-document-toolbar__label{
  padding: 9px 14px 0;
  font-size: 10px;
}

.od-document-toolbar--page-setup .od-document-toolbar__body{
  padding: 8px 14px 10px;
}

.od-document-toolbar--page-setup .od-page-setup-heading{
  margin-bottom: 8px;
}

.od-document-toolbar--page-setup .od-page-master-panel__hint{
  max-width: 760px;
}

.od-document-toolbar--page-setup .od-page-master-groups{
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 10px;
}

.od-document-toolbar--page-setup .od-page-master-group{
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}

.od-document-toolbar--page-setup .od-page-master-group__title{
  margin: 0;
  font-size: 11px;
}

.od-document-toolbar--page-setup .od-page-master-grid{
  grid-template-columns: repeat(2, minmax(95px, 1fr));
}

.od-document-toolbar--page-setup .od-page-master-grid input{
  min-height: 30px;
  padding: 4px 8px;
}

.od-document-toolbar--page-setup .od-page-setup-note{
  margin-top: 7px;
  font-size: 11px;
}

@media (min-width: 1300px){
  .od-document-toolbar--page-setup .od-page-master-panel{
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(520px, 1.25fr);
    gap: 16px;
    align-items: start;
  }

  .od-document-toolbar--page-setup .od-page-setup-heading{
    margin-bottom: 0;
  }

  .od-document-toolbar--page-setup .od-page-master-groups{
    align-self: start;
  }

  .od-document-toolbar--page-setup .od-page-setup-note{
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px){
  .od-document-toolbar--page-setup .od-page-master-group{
    grid-template-columns: 1fr;
  }
}


/* P31.2 properties panel visual cleanup */
.od-properties .card-body{
  padding: 14px;
}

.od-prop-placeholder{
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  padding: 18px 14px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.od-prop-placeholder::before{
  content: "No item selected";
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.od-prop-panel{
  display: grid;
  gap: 12px;
}

.od-prop-group{
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
}

.od-prop-label{
  margin-bottom: 7px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

#odPropType{
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fafc;
  padding: 5px 10px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  word-break: break-word;
}

#odPropContent,
#odPropFieldSelect,
#odPropFlowMode,
#odSmartRole,
#odSectionKey,
#odLaneKey,
#odRowKey{
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  padding: 7px 10px;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.25;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

#odPropContent:focus,
#odPropFieldSelect:focus,
#odPropFlowMode:focus,
#odSmartRole:focus,
#odSectionKey:focus,
#odLaneKey:focus,
#odRowKey:focus{
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

#odPropContent{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#odPropFieldSelect,
#odPropFlowMode,
#odSmartRole{
  cursor: pointer;
}

.od-prop-group .app-page-subtle{
  margin-top: 8px !important;
  border-left: 3px solid #e2e8f0;
  padding-left: 9px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.od-smart-layout-panel{
  background: #fbfdff;
}

.od-smart-layout-grid{
  display: grid;
  gap: 10px;
}

.od-smart-layout-grid label{
  display: grid;
  gap: 5px;
}

.od-smart-layout-grid label span{
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Keep selected-element controls usable in narrow property columns. */
.od-properties select,
.od-properties input{
  max-width: 100%;
}

.od-properties .btn{
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}


/* P31.4C page master switch styling */
.od-page-master-switches{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.od-pill-switch{
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  cursor: pointer;
  user-select: none;
}

.od-pill-switch input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.od-pill-switch span{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  padding: 5px 11px 5px 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.od-pill-switch span::before{
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 0 0 7px #ffffff;
  transition: background .16s ease, box-shadow .16s ease;
}

.od-pill-switch input:checked + span{
  border-color: #22c55e;
  background: #ecfdf5;
  color: #166534;
}

.od-pill-switch input:checked + span::before{
  background: #22c55e;
  box-shadow: inset 0 0 0 5px #ffffff;
}

.od-pill-switch input:focus + span{
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}


/* P31.12B output designer scoped scale containment */
.app-page-header{
  min-width:0;
}

.app-page-actions{
  min-width:0;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:flex-end;
}

.od-document-toolbar--page-setup{
  width:100%;
  max-width:min(980px, 100%);
  overflow:hidden;
}

.od-document-toolbar--page-setup,
.od-document-toolbar--page-setup *{
  box-sizing:border-box;
}

.od-document-toolbar--page-setup .od-page-master-panel{
  min-width:0;
}

@media (min-width:1300px){
  .od-document-toolbar--page-setup .od-page-master-panel{
    grid-template-columns:minmax(240px, .8fr) minmax(0, 1.4fr);
  }
}

.od-document-toolbar--page-setup .od-page-setup-heading{
  min-width:0;
}

.od-document-toolbar--page-setup .od-page-master-panel__hint{
  max-width:100%;
}

.od-document-toolbar--page-setup .od-page-master-switches,
.od-document-toolbar--page-setup .od-guide-view-toggle,
.od-document-toolbar--page-setup .od-page-master-groups,
.od-document-toolbar--page-setup .od-page-master-group,
.od-document-toolbar--page-setup .od-page-master-grid{
  min-width:0;
}

.od-document-toolbar--page-setup .od-page-master-groups{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.od-document-toolbar--page-setup .od-page-master-group{
  grid-template-columns:86px minmax(0, 1fr);
}

.od-document-toolbar--page-setup .od-page-master-grid{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.od-document-toolbar--page-setup input{
  min-width:0;
  max-width:100%;
}

.od-canvas-inner{
  max-width:100%;
  overflow:hidden;
}

.od-page-master-guide{
  right:auto;
  max-width:none;
  transform:none !important;
}

@media (max-width:1500px){
  .app-page:has(.od-grid){
    overflow-x:visible;
  }

  .od-grid{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:visible;
  }

  .od-grid > .od-splitter{
    display:none !important;
  }

  .od-grid > .od-col{
    width:auto !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .od-grid > .od-col.od-preview{
    order:50;
  }

  .od-preview-area,
  .od-preview-viewport,
  .od-preview-inner{
    max-width:100%;
    min-width:0;
  }

  .od-preview-area{
    overflow:auto;
  }

  .od-preview-scale{
    max-width:100%;
  }
}


/* P31.14A output designer real horizontal scroll fix */
html:has(body #odGrid),
body:has(#odGrid){
  width:100% !important;
  max-width:100% !important;
  overflow-x:hidden !important;
}

body:has(#odGrid) main,
body:has(#odGrid) [role="main"],
body:has(#odGrid) .app-page,
body:has(#odGrid) .app-main,
body:has(#odGrid) .app-content,
body:has(#odGrid) .app-body,
body:has(#odGrid) .portal-main,
body:has(#odGrid) .portal-content,
body:has(#odGrid) .page-content{
  width:auto !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow-x:hidden !important;
}

body:has(#odGrid) #odGrid.od-grid{
  display:grid !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow:hidden !important;
  gap:0 !important;
  column-gap:0 !important;
}

/* Desktop: keep panels side-by-side, but remove splitters and fixed overflow widths. */
@media (min-width:1200px){
  body:has(#odGrid) #odGrid.od-grid{
    grid-template-columns:
      minmax(190px, 0.72fr)
      minmax(300px, 1.05fr)
      minmax(170px, 0.55fr)
      minmax(300px, 1.05fr);
  }

  body:has(#odGrid) #odGrid.od-grid > .od-splitter{
    display:none !important;
  }
}

/* Narrow screens: stack cleanly. */
@media (max-width:1199px){
  body:has(#odGrid) #odGrid.od-grid{
    grid-template-columns:minmax(0, 1fr);
  }

  body:has(#odGrid) #odGrid.od-grid > .od-splitter{
    display:none !important;
  }

  body:has(#odGrid) #odGrid.od-grid > .od-col.od-preview{
    order:50;
  }
}

body:has(#odGrid) #odGrid.od-grid > .od-col{
  width:auto !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow:hidden !important;
}

body:has(#odGrid) #odGrid.od-grid .card,
body:has(#odGrid) #odGrid.od-grid .card-title,
body:has(#odGrid) #odGrid.od-grid .card-body{
  max-width:100% !important;
  min-width:0 !important;
  overflow:hidden !important;
}

/* Final Preview: scale the A4 to the card instead of creating scrollbars. */
body:has(#odGrid) .od-preview-area{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  height:clamp(300px, calc(100vh - 535px), 620px) !important;
  overflow:hidden !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

body:has(#odGrid) .od-preview-viewport,
body:has(#odGrid) .od-preview-inner{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  height:100% !important;
  min-height:0 !important;
  overflow:hidden !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

body:has(#odGrid) .od-preview-scale{
  max-width:100% !important;
  max-height:100% !important;
  overflow:hidden !important;
}


/* P31.15A restore Output Designer column resize handles after P31.14A */
@media (min-width:1200px){
  body:has(#odGrid) #odGrid.od-grid{
    grid-template-columns:
      minmax(180px, 0.70fr) 10px
      minmax(300px, 1.05fr) 10px
      minmax(180px, 0.60fr) 10px
      minmax(300px, 1.05fr);
  }

  body:has(#odGrid) #odGrid.od-grid > .od-splitter{
    display:block !important;
    width:10px !important;
    min-width:10px !important;
    max-width:10px !important;
    flex:0 0 10px !important;
    cursor:col-resize !important;
    overflow:visible !important;
  }
}

/* Keep splitters hidden only when the editor is genuinely stacked. */
@media (max-width:1199px){
  body:has(#odGrid) #odGrid.od-grid > .od-splitter{
    display:none !important;
  }
}


/* P31.17B final preview grows by width and guide labels scale */
body:has(#odGrid) .od-preview-area{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  overflow:hidden !important;
  align-items:flex-start !important;
  justify-content:center !important;
}

body:has(#odGrid) .od-preview-viewport,
body:has(#odGrid) .od-preview-inner{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:hidden !important;
  align-items:flex-start !important;
  justify-content:center !important;
}

body:has(#odGrid) .od-preview-scale{
  max-width:100% !important;
  max-height:none !important;
  overflow:hidden !important;
}

body:has(#odGrid) .od-page-master-guide{
  right:auto !important;
  max-width:none !important;
}

body:has(#odGrid) .od-page-master-guide__label{
  line-height:1.1;
}


/* P31.19B compact output designer heading and ribbon */
.od-output-designer-page .od-output-header{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:14px 22px;
  align-items:start;
  margin-bottom:16px;
}

.od-output-designer-page .od-output-header__intro{
  min-width:0;
}

.od-output-designer-page .app-page-title{
  max-width:760px;
  line-height:1.04;
}

.od-output-designer-page .od-output-header__actions{
  grid-column:2;
  grid-row:1;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:stretch;
  justify-content:flex-start;
  min-width:132px;
}

.od-output-designer-page .od-output-header__actions .btn{
  justify-content:center;
  min-height:36px;
  padding:8px 14px;
  white-space:nowrap;
}

.od-output-designer-page .od-document-toolbar--ribbon{
  grid-column:1 / -1;
  width:100%;
  max-width:none !important;
  margin:4px 0 0;
  padding:0;
  border:1px solid #dbe5f1;
  border-radius:10px;
  background:#ffffff;
  box-shadow:0 12px 28px rgba(15, 23, 42, 0.05);
  overflow:hidden;
}

.od-ribbon-summary{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:34px;
  padding:0 12px;
  border-bottom:1px solid #e5edf7;
  background:#fbfdff;
}

.od-ribbon-summary__button{
  border:0;
  border-right:1px solid #e2e8f0;
  background:transparent;
  color:#0f172a;
  font-size:12px;
  font-weight:800;
  padding:8px 14px 8px 0;
  cursor:default;
}

.od-ribbon-summary__meta{
  display:flex;
  align-items:center;
  gap:0;
  flex-wrap:wrap;
  color:#475569;
  font-size:12px;
  font-weight:650;
}

.od-ribbon-summary__meta span{
  display:inline-flex;
  align-items:center;
}

.od-ribbon-summary__meta span + span::before{
  content:"·";
  margin:0 9px;
  color:#94a3b8;
}

.od-ribbon-tabs{
  display:flex;
  align-items:center;
  gap:22px;
  min-height:33px;
  padding:0 14px;
  border-bottom:1px solid #e5edf7;
}

.od-ribbon-tab{
  appearance:none;
  border:0;
  background:transparent;
  color:#334155;
  font-size:12px;
  font-weight:750;
  padding:9px 0 8px;
  border-bottom:2px solid transparent;
}

.od-ribbon-tab.is-active{
  color:#0b6bff;
  border-bottom-color:#0b6bff;
}

.od-ribbon-controls{
  display:flex;
  align-items:end;
  gap:0;
  min-height:52px;
  padding:8px 12px 10px;
  overflow-x:auto;
}

.od-ribbon-field{
  display:grid;
  gap:4px;
  min-width:112px;
  padding:0 14px;
  border-right:1px solid #e2e8f0;
}

.od-ribbon-field:first-child{
  padding-left:0;
}

.od-ribbon-field__label{
  color:#64748b;
  font-size:10px;
  line-height:1;
  font-weight:800;
}

.od-ribbon-static-control,
.od-ribbon-field input{
  min-height:30px;
  border:1px solid #cfdbe9;
  border-radius:6px;
  background:#ffffff;
  color:#0f172a;
  font-size:12px;
  font-weight:650;
  padding:6px 9px;
}

.od-ribbon-static-control{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  white-space:nowrap;
}

.od-ribbon-field--layout{
  min-width:170px;
}

.od-ribbon-field--number{
  min-width:92px;
}

.od-ribbon-field--number input{
  width:74px;
}

.od-ribbon-icon-toggle{
  display:flex;
  gap:6px;
}

.od-ribbon-icon-toggle button{
  width:34px;
  min-height:30px;
  border:1px solid #cfdbe9;
  border-radius:6px;
  background:#ffffff;
  color:#334155;
  font-size:16px;
  line-height:1;
}

.od-ribbon-icon-toggle button.is-active{
  border-color:#60a5fa;
  color:#0b6bff;
  background:#eff6ff;
}

.od-ribbon-switch{
  display:inline-flex;
  align-items:center;
  min-height:30px;
}

.od-ribbon-switch input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.od-ribbon-switch span{
  width:38px;
  height:20px;
  border-radius:999px;
  background:#cbd5e1;
  position:relative;
  transition:background .14s ease;
}

.od-ribbon-switch span::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:14px;
  height:14px;
  border-radius:999px;
  background:#ffffff;
  box-shadow:0 1px 3px rgba(15, 23, 42, .25);
  transition:transform .14s ease;
}

.od-ribbon-switch input:checked + span{
  background:#2563eb;
}

.od-ribbon-switch input:checked + span::after{
  transform:translateX(18px);
}

.od-ribbon-field--page{
  min-width:210px;
}

.od-guide-view-toggle--ribbon{
  display:flex;
  gap:6px;
  padding:0;
  background:transparent;
  border:0;
}

.od-guide-view-toggle--ribbon .od-guide-view-btn{
  min-height:30px;
  padding:5px 10px;
  border-radius:6px;
  font-size:12px;
}

.od-ribbon-info{
  flex:0 0 auto;
  align-self:end;
  width:24px;
  height:24px;
  margin-left:10px;
  border:1px solid #cbd5e1;
  border-radius:999px;
  background:#ffffff;
  color:#64748b;
  font-size:12px;
  font-weight:900;
}

@media (max-width:1100px){
  .od-output-designer-page .od-output-header{
    grid-template-columns:1fr;
  }

  .od-output-designer-page .od-output-header__actions{
    grid-column:1;
    grid-row:auto;
    flex-direction:row;
    flex-wrap:wrap;
  }

  .od-ribbon-controls{
    align-items:start;
  }
}


/* P31.21B collapsible output designer ribbon */
.od-ribbon-summary__button{
  cursor:pointer;
  border-radius:6px;
}

.od-ribbon-summary__button:hover{
  color:#0b6bff;
}

.od-ribbon-summary__button:focus-visible{
  outline:2px solid rgba(37, 99, 235, .35);
  outline-offset:2px;
}

.od-ribbon-summary__chevron{
  display:inline-block;
  min-width:12px;
  margin-left:4px;
  color:#64748b;
  font-weight:900;
}

.od-document-toolbar--ribbon.is-collapsed .od-ribbon-summary{
  border-bottom:0;
}

.od-document-toolbar--ribbon.is-collapsed .od-ribbon-tabs,
.od-document-toolbar--ribbon.is-collapsed .od-ribbon-controls{
  display:none;
}

.od-document-toolbar--ribbon.is-collapsed{
  box-shadow:0 8px 18px rgba(15, 23, 42, 0.04);
}

.od-document-toolbar--ribbon.is-collapsed .od-ribbon-summary{
  min-height:36px;
}


/* P31.22B-R2 functional output designer ribbon tabs */
.od-ribbon-controls{
  display:block;
  align-items:stretch;
  overflow:hidden;
}

.od-ribbon-panel{
  display:none;
  align-items:end;
  gap:0;
  min-height:52px;
  width:100%;
  overflow-x:auto;
}

.od-ribbon-panel.is-active{
  display:flex;
}

.od-ribbon-panel[hidden]{
  display:none !important;
}

.od-ribbon-tab{
  cursor:pointer;
}

.od-ribbon-tab:focus-visible{
  outline:2px solid rgba(37, 99, 235, .35);
  outline-offset:2px;
  border-radius:4px;
}

.od-ribbon-placeholder{
  align-self:center;
  color:#64748b;
  font-size:12px;
  font-weight:650;
  line-height:1.35;
  padding:0 14px 0 0;
  white-space:nowrap;
}

.od-ribbon-placeholder--strong{
  color:#334155;
  font-weight:750;
  min-width:280px;
}

.od-ribbon-mini-btn{
  min-height:30px;
  margin-right:8px;
  border:1px solid #cfdbe9;
  border-radius:6px;
  background:#ffffff;
  color:#334155;
  font-size:12px;
  font-weight:750;
  padding:6px 10px;
}

.od-ribbon-mini-btn:disabled{
  opacity:.48;
  cursor:not-allowed;
  background:#f8fafc;
}

@media (max-width:1100px){
  .od-ribbon-panel{
    align-items:start;
  }

  .od-ribbon-placeholder{
    white-space:normal;
  }
}


/* P31.23B safe output designer View tab controls */
.od-ribbon-mini-btn.is-active{
  border-color:#60a5fa;
  background:#eff6ff;
  color:#0b6bff;
}

.od-ribbon-mini-btn:not(:disabled){
  cursor:pointer;
}

.od-ribbon-mini-btn:not(:disabled):hover{
  border-color:#93c5fd;
  background:#f8fbff;
}

.od-output-designer-page.od-view-guides-hidden .od-page-master-guide{
  display:none !important;
}

.od-output-designer-page.od-view-outlines-hidden .od-item,
.od-output-designer-page.od-view-outlines-hidden .od-element,
.od-output-designer-page.od-view-outlines-hidden [data-od-element],
.od-output-designer-page.od-view-outlines-hidden .od-canvas-item{
  outline-color:transparent !important;
  box-shadow:none !important;
}


/* P31.23D fix View tab outline selector for canvas nodes */
.od-output-designer-page.od-view-outlines-hidden .od-node{
  border-color: transparent !important;
  box-shadow: none !important;
}

.od-output-designer-page.od-view-outlines-hidden .od-node.is-selected,
.od-output-designer-page.od-view-outlines-hidden .od-node.od-selected{
  border-color: transparent !important;
  outline-color: transparent !important;
  box-shadow: none !important;
}


/* P31.24B workspace fit and zoom View controls */
.od-ribbon-zoom-label{
  align-self:center;
  min-width:70px;
  padding:6px 10px;
  border:1px solid #cfdbe9;
  border-radius:6px;
  background:#f8fafc;
  color:#334155;
  font-size:12px;
  font-weight:800;
  text-align:center;
  white-space:nowrap;
}

.od-canvas-area.od-view-workspace-scroll{
  justify-content:flex-start;
  align-items:flex-start;
  overflow:auto;
}

.od-canvas-area.od-view-workspace-scroll .od-a4{
  flex:0 0 auto;
}


/* P31.24C polished View tab ribbon grouping */
.od-ribbon-panel--view{
  align-items:stretch;
  gap:0;
  padding:0;
}

.od-view-ribbon-group{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:5px;
  padding:0 14px;
  border-right:1px solid #e2e8f0;
  min-width:max-content;
}

.od-view-ribbon-group:first-child{
  padding-left:0;
}

.od-view-ribbon-group:last-child{
  border-right:0;
}

.od-view-ribbon-group__label{
  color:#64748b;
  font-size:10px;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
}

.od-view-ribbon-group__controls{
  display:flex;
  align-items:center;
  gap:6px;
  min-height:32px;
}

.od-view-ribbon-group__controls--zoom{
  gap:4px;
}

.od-ribbon-panel--view .od-ribbon-mini-btn{
  min-height:30px;
  margin-right:0;
  padding:6px 10px;
  white-space:nowrap;
}

.od-ribbon-mini-btn--icon{
  width:30px;
  min-width:30px;
  padding:6px 0 !important;
  font-size:15px;
  line-height:1;
}

.od-ribbon-panel--view .od-ribbon-zoom-label{
  min-width:76px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
}

.od-view-ribbon-group--muted{
  opacity:.72;
}

@media (max-width:1300px){
  .od-ribbon-panel--view{
    flex-wrap:wrap;
    row-gap:8px;
  }

  .od-view-ribbon-group{
    padding-top:2px;
    padding-bottom:2px;
  }
}


/* P31.25B polished Arrange tab controls */
.od-ribbon-panel--arrange{
  align-items:stretch;
  gap:0;
  padding:0;
}

.od-arrange-ribbon-group{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:5px;
  padding:0 14px;
  border-right:1px solid #e2e8f0;
  min-width:max-content;
}

.od-arrange-ribbon-group:first-child{
  padding-left:0;
}

.od-arrange-ribbon-group:last-child{
  border-right:0;
}

.od-arrange-ribbon-group__label{
  color:#64748b;
  font-size:10px;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
}

.od-arrange-ribbon-group__controls{
  display:flex;
  align-items:center;
  gap:6px;
  min-height:32px;
}

.od-ribbon-panel--arrange .od-ribbon-mini-btn{
  min-height:30px;
  margin-right:0;
  padding:6px 10px;
  white-space:nowrap;
}

.od-ribbon-mini-btn--danger:not(:disabled){
  border-color:#fecaca;
  color:#991b1b;
  background:#fff7f7;
}

.od-ribbon-mini-btn--danger:not(:disabled):hover{
  border-color:#fca5a5;
  background:#fee2e2;
}

.od-arrange-ribbon-group--muted{
  opacity:.72;
}

@media (max-width:1300px){
  .od-ribbon-panel--arrange{
    flex-wrap:wrap;
    row-gap:8px;
  }

  .od-arrange-ribbon-group{
    padding-top:2px;
    padding-bottom:2px;
  }
}


/* P31.26B-R3 selected-node lock button visual state */
.od-node.od-node-locked{
  border-style:dashed;
  border-color:#f59e0b;
  background:#fffbeb;
}

.od-node.od-node-locked.selected{
  outline:2px solid #f59e0b;
  outline-offset:1px;
  box-shadow:
    0 0 0 4px rgba(245, 158, 11, .16),
    0 10px 24px rgba(245, 158, 11, .18);
}

.od-node.od-node-locked::after{
  content:"Locked";
  position:absolute;
  top:-16px;
  left:8px;
  z-index:4;
  padding:2px 6px;
  border-radius:999px;
  background:#f59e0b;
  color:#ffffff;
  font-size:10px;
  font-weight:800;
  line-height:1;
  pointer-events:none;
}

.od-ribbon-mini-btn[data-arrange-action="toggle-lock"].is-active{
  border-color:#f59e0b;
  background:#fffbeb;
  color:#92400e;
}


/* P31.26C-R1 block locked node edit controls */
.od-node.od-node-locked{
  cursor:not-allowed;
}

.od-node.od-node-locked .od-resize-handle,
.od-node.od-node-locked .od-delete-x{
  display:none !important;
}


/* P31.27B polished Data tab controls */
.od-ribbon-panel--data{
  align-items:stretch;
  gap:0;
  padding:0;
  position:relative;
  flex-wrap:wrap;
}

.od-data-ribbon-group{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:5px;
  padding:0 14px;
  border-right:1px solid #e2e8f0;
  min-width:max-content;
}

.od-data-ribbon-group:first-child{
  padding-left:0;
}

.od-data-ribbon-group__label{
  color:#64748b;
  font-size:10px;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
}

.od-data-ribbon-group__controls{
  display:flex;
  align-items:center;
  gap:6px;
  min-height:32px;
}

.od-data-ribbon-group--field{
  min-width:330px;
}

.od-data-ribbon-group--status{
  border-right:0;
}

.od-data-field-select{
  min-width:190px;
  max-width:230px;
  min-height:30px;
  border:1px solid #cfdbe9;
  border-radius:6px;
  background:#ffffff;
  color:#334155;
  font-size:12px;
  font-weight:700;
  padding:5px 8px;
}

.od-data-status{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border:1px solid #dbeafe;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.od-data-token-tray{
  flex:1 1 100%;
  margin-top:8px;
  padding:10px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
  max-height:180px;
  overflow:auto;
}

.od-data-token-row{
  display:grid;
  grid-template-columns:minmax(160px, 260px) 1fr;
  gap:10px;
  align-items:center;
  padding:5px 0;
  border-bottom:1px solid #e2e8f0;
}

.od-data-token-row:last-child{
  border-bottom:0;
}

.od-data-token-row__label{
  color:#475569;
  font-size:12px;
  font-weight:800;
}

.od-data-token-row__value{
  display:block;
  padding:4px 7px;
  border-radius:6px;
  background:#ffffff;
  border:1px solid #e2e8f0;
  color:#0f172a;
  font-size:12px;
  white-space:nowrap;
  overflow:auto;
}

@media (max-width:1300px){
  .od-data-ribbon-group{
    padding-top:2px;
    padding-bottom:2px;
  }

  .od-data-ribbon-group--field{
    min-width:280px;
  }
}\n

/* P31.27G hide top Data ribbon without removing layout containers */
.od-ribbon-tab[data-ribbon-tab="data"],
#odRibbonPanelData{
  display:none !important;
}
\n


/* P31.31B drag ghost only - no drop creation */
.od-tool-drag-ghost{
  position:fixed;
  z-index:99999;
  left:0;
  top:0;
  max-width:220px;
  padding:10px 13px;
  border:1px solid #bfdbfe;
  border-radius:12px;
  background:#eff6ff;
  color:#1e3a8a;
  font-size:12px;
  line-height:1.2;
  font-weight:800;
  box-shadow:0 16px 40px rgba(15,23,42,.22);
  pointer-events:none;
  transform:translate(14px, 14px);
  opacity:.94;
  white-space:nowrap;
}

.od-tool-drag-ghost.is-over-canvas{
  border-color:#2563eb;
  background:#dbeafe;
  color:#1d4ed8;
  box-shadow:0 18px 44px rgba(37,99,235,.28);
}

.od-tool-item.od-tool-drag-source{
  opacity:.72;
  transform:translateY(-1px);
}

#odCanvasInner.od-tool-drop-hover{
  outline:2px dashed #2563eb;
  outline-offset:-8px;
  box-shadow:inset 0 0 0 9999px rgba(37,99,235,.035);
}

body.od-tool-drag-active{
  cursor:grabbing;
  user-select:none;
}


/* P31.31B-R1 drag ghost visibility and anti-selection */
.od-toolbox,
.od-tool-item{
  -webkit-user-select:none;
  user-select:none;
  -webkit-user-drag:none;
}

.od-tool-item{
  cursor:grab;
}

.od-tool-item:active,
body.od-tool-drag-active .od-tool-item.od-tool-drag-source{
  cursor:grabbing;
}

.od-tool-drag-ghost{
  left:0 !important;
  top:0 !important;
  display:block !important;
  visibility:visible !important;
  opacity:.98 !important;
  border:2px solid #2563eb !important;
  background:#ffffff !important;
  color:#1d4ed8 !important;
  transform:translate3d(0,0,0);
}

body.od-tool-drag-pending,
body.od-tool-drag-pending *,
body.od-tool-drag-active,
body.od-tool-drag-active *{
  -webkit-user-select:none !important;
  user-select:none !important;
}


/* P31.31B-R2 inline ghost safety net */
.od-tool-drag-ghost{
  position:fixed !important;
  z-index:2147483647 !important;
  pointer-events:none !important;
}


/* P31.31C-R3H canvas node text selection fix
   Stop browser text highlighting while dragging/moving Output Designer canvas elements.
   Keep form controls and property inputs selectable/editable. */
#odCanvas,
#odCanvas *,
.od-node,
.od-node *,
.od-page,
.od-page *,
.od-canvas,
.od-canvas *,
.od-workspace,
.od-workspace * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

#odCanvas input,
#odCanvas textarea,
#odCanvas select,
#odCanvas button,
.od-workspace input,
.od-workspace textarea,
.od-workspace select,
.od-workspace button,
.od-properties input,
.od-properties textarea,
.od-properties select,
.od-properties button,
.od-prop-group input,
.od-prop-group textarea,
.od-prop-group select,
.od-prop-group button {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

#odCanvas img,
.od-node img {
  -webkit-user-drag: none;
  user-drag: none;
}

body.od-tool-drag-pending,
body.od-tool-drag-active {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}


/* P31.32B properties field clarity */
.od-prop-content-hint {
  font-size: 12px;
  line-height: 1.35;
}


/* P31.32D-R3 geometry controls visible manual */
.od-prop-geometry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.od-prop-geometry-grid label {
  display: grid;
  gap: 4px;
}

.od-prop-geometry-grid span {
  font-size: 11px;
  font-weight: 700;
}

.od-prop-geometry-grid input {
  width: 100%;
}

.od-prop-geometry-hint {
  font-size: 12px;
  line-height: 1.35;
}


/* P31.36B visual grid toggle only */
.od-canvas-inner.od-visual-grid-on {
  background-image:
    linear-gradient(to right, rgba(37, 99, 235, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 99, 235, 0.16) 1px, transparent 1px);
  background-size: var(--od-visual-grid-size, 20px) var(--od-visual-grid-size, 20px);
  background-position: 0 0;
}


/* P31.36D grid size and snap safe controls */
.od-ribbon-mini-select-compact {
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 7px;
}


/* P31.37A visual rulers toggle only */
.od-canvas-inner.od-rulers-on::before,
.od-canvas-inner.od-rulers-on::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 30;
}

.od-canvas-inner.od-rulers-on::before {
  top: 0;
  left: 0;
  right: 0;
  height: 18px;
  background:
    linear-gradient(to bottom, rgba(248, 250, 252, 0.94), rgba(226, 232, 240, 0.9)),
    repeating-linear-gradient(to right, rgba(15, 23, 42, 0.55) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(to right, rgba(15, 23, 42, 0.8) 0 1px, transparent 1px 100px);
  border-bottom: 1px solid rgba(100, 116, 139, 0.45);
}

.od-canvas-inner.od-rulers-on::after {
  top: 0;
  left: 0;
  bottom: 0;
  width: 18px;
  background:
    linear-gradient(to right, rgba(248, 250, 252, 0.94), rgba(226, 232, 240, 0.9)),
    repeating-linear-gradient(to bottom, rgba(15, 23, 42, 0.55) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(to bottom, rgba(15, 23, 42, 0.8) 0 1px, transparent 1px 100px);
  border-right: 1px solid rgba(100, 116, 139, 0.45);
}


/* P31.37B useful labelled rulers */
.od-canvas-inner.od-rulers-on::before,
.od-canvas-inner.od-rulers-on::after {
  display: none;
}

.od-ruler {
  display: none;
  position: absolute;
  pointer-events: none;
  z-index: 1200;
  color: #334155;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.od-canvas-inner.od-rulers-on .od-ruler {
  display: block;
}

.od-ruler-top {
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: rgba(248, 250, 252, 0.96);
  border-bottom: 1px solid rgba(100, 116, 139, 0.45);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.18);
}

.od-ruler-left {
  top: 0;
  left: 0;
  bottom: 0;
  width: 24px;
  background: rgba(248, 250, 252, 0.96);
  border-right: 1px solid rgba(100, 116, 139, 0.45);
  box-shadow: 1px 0 0 rgba(148, 163, 184, 0.18);
}

.od-ruler-top .od-ruler-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  background: rgba(15, 23, 42, 0.5);
  transform: translateX(-0.5px);
}

.od-ruler-left .od-ruler-tick {
  position: absolute;
  right: 0;
  height: 1px;
  background: rgba(15, 23, 42, 0.5);
  transform: translateY(-0.5px);
}

.od-ruler-top .od-ruler-tick.is-minor {
  height: 7px;
}

.od-ruler-top .od-ruler-tick.is-major {
  height: 14px;
  background: rgba(15, 23, 42, 0.78);
}

.od-ruler-left .od-ruler-tick.is-minor {
  width: 7px;
}

.od-ruler-left .od-ruler-tick.is-major {
  width: 14px;
  background: rgba(15, 23, 42, 0.78);
}

.od-ruler-top .od-ruler-label {
  position: absolute;
  top: 3px;
  transform: translateX(3px);
  white-space: nowrap;
}

.od-ruler-left .od-ruler-label {
  position: absolute;
  left: 3px;
  transform: translateY(3px) rotate(-90deg);
  transform-origin: left top;
  white-space: nowrap;
}


/* P31.37C millimeter accurate A4 rulers */
.od-ruler .od-ruler-tick.is-edge {
  background: rgba(15, 23, 42, 0.9);
}

.od-ruler-top .od-ruler-tick.is-edge {
  height: 16px;
}

.od-ruler-left .od-ruler-tick.is-edge {
  width: 16px;
}

.od-ruler-label[data-mm="0"] {
  color: #0f172a;
}

.od-ruler-top .od-ruler-label[data-mm="210"],
.od-ruler-left .od-ruler-label[data-mm="297"] {
  color: #0f172a;
  font-weight: 800;
}


/* ==========================================================================
   FLUX-LANDING-LP1-PREMIUM-INDUSTRIAL
   Public marketing landing page only.
   Scoped deliberately to .layout-marketing so authenticated/app layouts
   remain outside this visual patch.
   ========================================================================== */

.layout-marketing .portal-bg::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(5, 12, 22, 0.90) 0%,
      rgba(5, 12, 22, 0.78) 32%,
      rgba(5, 12, 22, 0.42) 58%,
      rgba(5, 12, 22, 0.12) 82%,
      rgba(5, 12, 22, 0.08) 100%
    ),
    linear-gradient(
      180deg,
      rgba(5, 12, 22, 0.18) 0%,
      rgba(5, 12, 22, 0.04) 58%,
      rgba(5, 12, 22, 0.42) 100%
    );
}

.layout-marketing .site-header{
  background: linear-gradient(
    180deg,
    rgba(5, 12, 22, 0.54),
    rgba(5, 12, 22, 0.16)
  ) !important;
  border-bottom: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.layout-marketing .site-header-inner{
  width: min(1440px, calc(100% - 40px));
  margin-inline: auto;
}

.layout-marketing .site-brand,
.layout-marketing .site-brand:link,
.layout-marketing .site-brand:visited{
  text-decoration: none !important;
}

.layout-marketing .site-brand-name,
.layout-marketing .site-brand-name *,
.layout-marketing .brand-flux,
.layout-marketing .brand-reports{
  color: #ffffff !important;
  text-decoration: none !important;
  text-shadow: 0 2px 16px rgba(0,0,0,0.30);
}

.layout-marketing .site-brand-mark{
  border-color: rgba(255,255,255,0.22) !important;
  background: rgba(255,255,255,0.08) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.layout-marketing .site-login-link{
  color: #ffffff !important;
  text-decoration: none !important;
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.28) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.layout-marketing .site-login-link:hover{
  background: rgba(255,255,255,0.20) !important;
  border-color: rgba(255,255,255,0.44) !important;
  transform: translateY(-1px);
}

.layout-marketing .portal-wrap{
  width: min(1440px, 100%);
  min-height: calc(100vh - 132px);
  margin: 0 auto;
  padding: clamp(54px, 8vh, 104px) clamp(28px, 6vw, 92px) 118px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.layout-marketing .glass-frame.mk-frame{
  width: min(720px, 100%);
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.layout-marketing .glass-frame.mk-frame::before,
.layout-marketing .glass-frame.mk-frame::after{
  display: none !important;
}

.layout-marketing .glass-frame.mk-frame .glass-content{
  width: 100%;
  padding: 0 !important;
  display: block;
  background: transparent !important;
}

.layout-marketing .mk-home{
  width: 100%;
  max-width: 690px;
  margin: 0;
  color: #ffffff;
  text-align: left;
}

.layout-marketing .mk-eyebrow{
  margin: 0 0 16px !important;
  color: rgba(255,255,255,0.72) !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.layout-marketing .mk-home h1{
  max-width: 680px;
  margin: 0 !important;
  color: #ffffff !important;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 760;
  line-height: 0.99;
  letter-spacing: -0.045em;
  text-wrap: balance;
  text-shadow: 0 4px 26px rgba(0,0,0,0.34);
}

.layout-marketing .mk-home .mk-lead{
  max-width: 610px;
  margin: 24px 0 0 !important;
  color: rgba(255,255,255,0.86) !important;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.58;
  text-shadow: 0 2px 16px rgba(0,0,0,0.30);
}

.layout-marketing .mk-home .mk-cta{
  margin-top: 30px;
}

.layout-marketing .mk-login-primary{
  min-height: 50px;
  padding: 13px 22px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px !important;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 16px 38px rgba(0,0,0,0.22);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.layout-marketing .mk-login-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(0,0,0,0.28);
}

.layout-marketing .mk-value-grid{
  width: 100%;
  margin-top: clamp(34px, 5vh, 54px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.layout-marketing .mk-value-item{
  min-width: 0;
  padding: 16px 16px 17px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  background: rgba(5,12,22,0.20);
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.layout-marketing .mk-value-number{
  display: block;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.44);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.layout-marketing .mk-value-item h2{
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.layout-marketing .mk-value-item p{
  margin: 7px 0 0 !important;
  color: rgba(255,255,255,0.70) !important;
  font-size: 13px;
  line-height: 1.45;
}

.layout-marketing .portal-footer{
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 0 !important;
  background: linear-gradient(
    180deg,
    rgba(5,12,22,0.16),
    rgba(5,12,22,0.58)
  ) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

.layout-marketing .portal-footer-inner{
  width: min(1440px, calc(100% - 40px)) !important;
  min-height: 58px !important;
  margin: 0 auto !important;
  padding: 9px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  flex-wrap: wrap !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  white-space: normal !important;
}

.layout-marketing .portal-footer-left,
.layout-marketing .portal-footer-right{
  min-width: 0 !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  white-space: normal !important;
}

.layout-marketing .portal-links,
.layout-marketing .portal-copy,
.layout-marketing .portal-credit-text,
.layout-marketing .portal-footer a{
  color: rgba(255,255,255,0.74) !important;
  text-shadow: 0 1px 10px rgba(0,0,0,0.30) !important;
}

.layout-marketing .portal-footer-right img{
  max-height: 24px !important;
  width: auto !important;
  opacity: 0.86;
}

@media (max-width: 900px){

  .layout-marketing .portal-wrap{
    min-height: calc(100vh - 122px);
    padding:
      clamp(48px, 8vh, 76px)
      24px
      108px;
  }

  .layout-marketing .glass-frame.mk-frame{
    width: min(680px, 100%);
  }

  .layout-marketing .mk-home h1{
    font-size: clamp(40px, 8vw, 60px);
  }

  .layout-marketing .mk-value-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 680px){

  .layout-marketing .portal-bg::after{
    background:
      linear-gradient(
        180deg,
        rgba(5,12,22,0.76) 0%,
        rgba(5,12,22,0.56) 58%,
        rgba(5,12,22,0.76) 100%
      );
  }

  .layout-marketing .site-header-inner{
    width: calc(100% - 28px);
  }

  .layout-marketing .portal-wrap{
    min-height: auto;
    padding: 54px 18px 36px;
    align-items: flex-start;
  }

  .layout-marketing .mk-home h1{
    font-size: clamp(38px, 11vw, 52px);
    line-height: 1.02;
  }

  .layout-marketing .mk-home .mk-lead{
    margin-top: 20px !important;
    font-size: 17px;
  }

  .layout-marketing .mk-home .mk-cta{
    margin-top: 24px;
  }

  .layout-marketing .mk-login-primary{
    width: 100%;
  }

  .layout-marketing .mk-value-grid{
    margin-top: 34px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .layout-marketing .mk-value-item{
    padding: 14px 15px;
  }

  .layout-marketing .portal-footer{
    position: relative !important;
    margin-top: 20px !important;
  }

  .layout-marketing .portal-footer-inner{
    width: calc(100% - 28px) !important;
    min-height: 0 !important;
    padding: 14px 0 !important;
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .layout-marketing .portal-footer-left,
  .layout-marketing .portal-footer-right{
    width: 100% !important;
    justify-content: flex-start !important;
  }

}



/* ==========================================================================
   FLUX-LANDING-LP2-HERO-COMPOSITION
   Public landing page only.
   Restores the intended hero hierarchy in the visible desktop viewport:
   headline -> supporting copy -> primary login CTA -> value cards.
   ========================================================================== */

.layout-marketing .portal-wrap{
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 126px) !important;
  padding-top: clamp(56px, 7vh, 82px) !important;
  padding-bottom: 92px !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.layout-marketing .glass-frame.mk-frame{
  position: relative !important;
  z-index: 3 !important;
  width: min(760px, 100%) !important;
  overflow: visible !important;
}

.layout-marketing .glass-frame.mk-frame .glass-content{
  position: relative !important;
  z-index: 3 !important;
  display: block !important;
  overflow: visible !important;
}

.layout-marketing .mk-home{
  position: relative !important;
  z-index: 4 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  max-width: 720px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  text-align: left !important;
  overflow: visible !important;
}

.layout-marketing .mk-home .mk-eyebrow,
.layout-marketing .mk-home h1,
.layout-marketing .mk-home .mk-lead,
.layout-marketing .mk-home .mk-cta,
.layout-marketing .mk-home .mk-value-grid{
  position: relative !important;
  z-index: 5 !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
}

.layout-marketing .mk-home .mk-eyebrow{
  display: block !important;
  margin: 0 0 14px !important;
  color: rgba(255,255,255,0.72) !important;
}

.layout-marketing .mk-home h1{
  display: block !important;
  max-width: 720px !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-size: clamp(44px, 4.7vw, 70px) !important;
  font-weight: 780 !important;
  line-height: 1.00 !important;
  letter-spacing: -0.045em !important;
  text-shadow:
    0 2px 8px rgba(0,0,0,0.28),
    0 12px 34px rgba(0,0,0,0.24) !important;
}

.layout-marketing .mk-home .mk-lead{
  display: block !important;
  max-width: 610px !important;
  margin: 22px 0 0 !important;
  color: rgba(255,255,255,0.86) !important;
  font-size: clamp(17px, 1.4vw, 20px) !important;
  line-height: 1.55 !important;
}

.layout-marketing .mk-home .mk-cta{
  display: block !important;
  margin: 26px 0 0 !important;
}

.layout-marketing .mk-home .mk-login-primary{
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 6 !important;
}

.layout-marketing .mk-home .mk-value-grid{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  width: min(760px, 100%) !important;
  margin: 34px 0 0 !important;
}

@media (max-width: 900px) and (min-width: 681px){
  .layout-marketing .mk-home .mk-value-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.layout-marketing .mk-home .mk-value-item{
  min-height: 108px !important;
  padding: 14px 15px 15px !important;
  border-color: rgba(255,255,255,0.15) !important;
  background: rgba(5,12,22,0.32) !important;
}

.layout-marketing .mk-home .mk-value-number{
  margin-bottom: 8px !important;
}

.layout-marketing .mk-home .mk-value-item h2{
  font-size: 15px !important;
}

.layout-marketing .mk-home .mk-value-item p{
  font-size: 12.5px !important;
  line-height: 1.4 !important;
}

/*
 * LP2 local readability zone.
 * Backgrounds rotate, so this cannot depend on subject position.
 */
.layout-marketing .portal-bg::after{
  background:
    linear-gradient(
      90deg,
      rgba(4,10,18,0.88) 0%,
      rgba(4,10,18,0.78) 28%,
      rgba(4,10,18,0.50) 48%,
      rgba(4,10,18,0.22) 68%,
      rgba(4,10,18,0.08) 86%,
      rgba(4,10,18,0.05) 100%
    ),
    linear-gradient(
      180deg,
      rgba(4,10,18,0.16) 0%,
      rgba(4,10,18,0.02) 55%,
      rgba(4,10,18,0.36) 100%
    ) !important;
}

@media (max-width: 1100px){

  .layout-marketing .portal-wrap{
    padding-top: 54px !important;
  }

  .layout-marketing .glass-frame.mk-frame{
    width: min(700px, 100%) !important;
  }

  .layout-marketing .mk-home h1{
    font-size: clamp(42px, 6vw, 62px) !important;
  }

}

@media (max-height: 760px) and (min-width: 681px){

  .layout-marketing .portal-wrap{
    padding-top: 34px !important;
    padding-bottom: 76px !important;
  }

  .layout-marketing .mk-home .mk-eyebrow{
    margin-bottom: 10px !important;
  }

  .layout-marketing .mk-home h1{
    font-size: clamp(38px, 4.2vw, 56px) !important;
  }

  .layout-marketing .mk-home .mk-lead{
    margin-top: 15px !important;
    font-size: 16px !important;
    line-height: 1.45 !important;
  }

  .layout-marketing .mk-home .mk-cta{
    margin-top: 18px !important;
  }

  .layout-marketing .mk-home .mk-value-grid{
    margin-top: 22px !important;
  }

  .layout-marketing .mk-home .mk-value-item{
    min-height: 94px !important;
    padding-top: 11px !important;
    padding-bottom: 12px !important;
  }

}

@media (max-width: 680px){

  .layout-marketing .portal-wrap{
    min-height: auto !important;
    padding:
      48px
      18px
      34px !important;
    align-items: flex-start !important;
  }

  .layout-marketing .glass-frame.mk-frame{
    width: 100% !important;
  }

  .layout-marketing .mk-home{
    max-width: none !important;
  }

  .layout-marketing .mk-home h1{
    font-size: clamp(38px, 11vw, 50px) !important;
    line-height: 1.02 !important;
  }

  .layout-marketing .mk-home .mk-lead{
    margin-top: 18px !important;
    font-size: 16px !important;
  }

  .layout-marketing .mk-home .mk-cta{
    margin-top: 22px !important;
  }

  .layout-marketing .mk-home .mk-login-primary{
    width: 100% !important;
  }

  .layout-marketing .mk-home .mk-value-grid{
    width: 100% !important;
    margin-top: 28px !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  .layout-marketing .mk-home .mk-value-item{
    min-height: 0 !important;
  }

}



/* ==========================================================================
   FLUX-LANDING-LP3-DESKTOP-POLISH
   Public landing page desktop polish only.
   ========================================================================== */

@media (min-width: 681px){

  .layout-marketing .portal-wrap{
    padding-top: clamp(38px, 5.5vh, 64px) !important;
  }

  .layout-marketing .glass-frame.mk-frame{
    width: min(800px, 100%) !important;
  }

  .layout-marketing .mk-home{
    max-width: 760px !important;
  }

  .layout-marketing .mk-home h1{
    max-width: 760px !important;
    font-size: clamp(44px, 4.45vw, 68px) !important;
    line-height: 0.99 !important;
  }

  .layout-marketing .mk-home .mk-lead{
    max-width: 640px !important;
  }

  .layout-marketing .mk-home .mk-login-primary{
    width: auto !important;
    min-width: 244px !important;
    max-width: 280px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .layout-marketing .mk-home .mk-value-grid{
    width: min(760px, 100%) !important;
    gap: 13px !important;
    margin-top: 30px !important;
  }

  .layout-marketing .mk-home .mk-value-item{
    min-height: 104px !important;
    padding: 15px 16px 16px !important;
    border-color: rgba(255,255,255,0.13) !important;
    background: rgba(5,12,22,0.28) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.10) !important;
    transition:
      transform 160ms ease,
      border-color 160ms ease,
      background 160ms ease;
  }

  .layout-marketing .mk-home .mk-value-item:hover{
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.24) !important;
    background: rgba(5,12,22,0.38) !important;
  }

  .layout-marketing .mk-home .mk-value-number{
    font-size: 10px !important;
    letter-spacing: 0.14em !important;
    color: rgba(255,255,255,0.50) !important;
  }

  .layout-marketing .mk-home .mk-value-item h2{
    font-size: 15.5px !important;
  }

  .layout-marketing .mk-home .mk-value-item p{
    font-size: 12.5px !important;
    color: rgba(255,255,255,0.72) !important;
  }

  .layout-marketing .site-header-inner{
    min-height: 60px !important;
  }

  .layout-marketing .site-brand-mark{
    transform: scale(1.03);
  }

  .layout-marketing .site-login-link{
    padding-left: 15px !important;
    padding-right: 15px !important;
    background: rgba(255,255,255,0.10) !important;
  }

  .layout-marketing .site-login-link:hover{
    background: rgba(255,255,255,0.18) !important;
  }

  .layout-marketing .portal-footer-inner{
    min-height: 54px !important;
    gap: 22px !important;
  }

  .layout-marketing .portal-footer-right img{
    max-height: 22px !important;
    opacity: 0.82 !important;
  }

}



/* ==========================================================================
   FLUX-LANDING-LP5-CTA-FOCUS
   Public landing page only.
   Visible keyboard focus for the primary hero Login CTA.
   ========================================================================== */

.layout-marketing .mk-home .mk-login-primary:focus-visible{
  outline: 3px solid #ffffff !important;
  outline-offset: 3px !important;
  box-shadow:
    0 0 0 2px rgba(4,10,18,0.92),
    0 16px 38px rgba(0,0,0,0.22) !important;
}



/* ==========================================================================
   FLUX-LANDING-H1-PLAIN-LOGO-ONLY
   Public marketing header only.
   Large FLUX logo with no pill, card, border, shadow or Reports text.
   ========================================================================== */

.layout-marketing .site-brand,
.layout-marketing .site-brand:link,
.layout-marketing .site-brand:visited{
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-decoration: none !important;
}

.layout-marketing .site-brand-mark{
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.layout-marketing .site-brand-logo{
  width: 84px !important;
  height: auto !important;
  max-width: none !important;
  display: block !important;
  object-fit: contain !important;
  opacity: 1 !important;
  filter: none !important;
}

.layout-marketing .site-brand-name{
  display: none !important;
}

@media (max-width: 680px){
  .layout-marketing .site-brand-logo{
    width: 72px !important;
  }
}



/* ==========================================================================
   FLUX-LANDING-H1-OPTION-A-GLOW
   Public marketing header only.
   Bigger plain FLUX logo with restrained image-level glow.
   No pill, card, border, background or Reports text.
   ========================================================================== */

.layout-marketing .site-brand-logo{
  width: 112px !important;
  height: auto !important;
  filter:
    drop-shadow(0 0 2px rgba(255,255,255,0.34))
    drop-shadow(0 0 7px rgba(224,121,0,0.30))
    drop-shadow(0 0 15px rgba(224,121,0,0.14)) !important;
}

@media (max-width: 680px){
  .layout-marketing .site-brand-logo{
    width: 88px !important;
  }
}



/* ==========================================================================
   FLUX-LANDING-H1-WHITE-GLOW
   Public marketing header logo only.
   Brighter, lighter, whiter glow refinement.
   Size and layout intentionally unchanged.
   ========================================================================== */

.layout-marketing .site-brand-logo{
  filter:
    drop-shadow(0 0 2px rgba(255,255,255,0.95))
    drop-shadow(0 0 7px rgba(255,255,255,0.70))
    drop-shadow(0 0 16px rgba(255,250,240,0.42))
    drop-shadow(0 0 24px rgba(255,255,255,0.18)) !important;
}

/* ==========================================================================
   FLUX-LANDING-CARD-IMAGES-V1
   Approved top-banner illustrations for the four-step landing journey.
   ========================================================================== */

.layout-marketing .mk-home .mk-value-item{
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.layout-marketing .mk-home .mk-value-image{
  position: relative;
  width: 100%;
  height: 88px;
  flex: 0 0 88px;
  overflow: hidden;
  background: rgba(5,12,22,0.48);
}

.layout-marketing .mk-home .mk-value-image img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.layout-marketing .mk-home .mk-value-content{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 15px 15px;
}

.layout-marketing .mk-home .mk-value-content .mk-value-number{
  margin-bottom: 8px !important;
}

@media (max-width: 900px) and (min-width: 681px){
  .layout-marketing .mk-home .mk-value-image{
    height: 132px;
    flex-basis: 132px;
  }

  .layout-marketing .mk-home .mk-value-content{
    padding: 15px 17px 17px;
  }
}

@media (max-width: 680px){
  .layout-marketing .mk-home .mk-value-image{
    height: 168px;
    flex-basis: 168px;
  }

  .layout-marketing .mk-home .mk-value-content{
    padding: 16px 16px 18px;
  }
}

/* ==========================================================================
   FLUX-LANDING-DESKTOP-CARDS-V2
   Desktop-only wide four-card feature strip.
   MOBILE <=680px and TABLET 681-900px intentionally untouched.
   ========================================================================== */

@media (min-width: 901px){

  .layout-marketing .mk-home .mk-value-grid{
    width: min(1080px, calc(100vw - 80px)) !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .layout-marketing .mk-home .mk-value-image{
    height: 136px !important;
    flex-basis: 136px !important;
  }

  .layout-marketing .mk-home .mk-value-content{
    padding: 14px 17px 17px !important;
  }

}

