

/* ==========================================================================
   EXTRACTED STYLES FOR WORDPRESS PLUGIN
   ========================================================================== */

/* ==========================================================================
   JBRSC Conference Invitation Letter Generator

   Theme
   -----
   The interface inherits the viewer system theme through
   prefers-color-scheme. Every interface colour is a token, redefined once
   for dark. The letter itself is deliberately exempt: it is paper, so it
   stays white with black ink in both themes and in the PDF.
   ========================================================================== */
:root{
  color-scheme:light dark;

  /* --- surfaces --- */
  --app-bg:#e9e5dd;
  --surface:#ffffff;
  --surface-2:#faf9f6;
  --surface-3:#f0eee8;
  --paper-well:#dedad2;
  --bar-bg:rgba(255,255,255,.97);

  /* --- text --- */
  --text:#1a1a1a;
  --text-soft:#5f5b51;
  --text-faint:#807b70;

  /* --- lines --- */
  --border:#d9d3c6;
  --border-strong:#c5bfb1;

  /* --- accent (brand navy) --- */
  --accent:#1f2a52;
  --accent-hover:#141c3a;
  --accent-ink:#ffffff;
  --accent-text:#1f2a52;
  --accent-tint:#f2f4fa;
  --accent-ring:rgba(31,42,82,.13);
  --accent-tap:rgba(31,42,82,.12);

  /* --- status --- */
  --danger:#b5533c;
  --danger-ring:rgba(181,83,60,.14);
  --ok:#2f7a53;

  /* --- chrome --- */
  --overlay:rgba(18,22,38,.55);
  --busy-bg:rgba(233,229,221,.94);
  --toast-bg:#141c3a;
  --toast-ink:#ffffff;
  --shadow-bar:0 1px 3px rgba(0,0,0,.10);
  --shadow-panel:0 1px 2px rgba(0,0,0,.04);
  --shadow-modal:0 24px 64px rgba(0,0,0,.32);
  --shadow-sheet:0 6px 26px rgba(0,0,0,.20);

  /* --- type --- */
  --ui-font:"Figtree",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --doc-font:"Times New Roman",Times,"Liberation Serif","Nimbus Roman",Georgia,serif;

  /* --- metrics --- */
  --appbar-h:56px;
  --bottombar-h:74px;
  --radius:14px;
  --gutter:clamp(12px, 1.6vw, 22px);
}

@media (prefers-color-scheme:dark){
  :root{
    --app-bg:#15171d;
    --surface:#1d2027;
    --surface-2:#23262f;
    --surface-3:#2b2f3a;
    --paper-well:#0e1014;
    --bar-bg:rgba(29,32,39,.97);

    --text:#e9e7e2;
    --text-soft:#a5a29a;
    --text-faint:#8b8880;

    --border:#333844;
    --border-strong:#464c5b;

    --accent:#4c66bd;
    --accent-hover:#5e78d2;
    --accent-ink:#ffffff;
    --accent-text:#9fb2ee;
    --accent-tint:#232a3d;
    --accent-ring:rgba(120,146,230,.24);
    --accent-tap:rgba(120,146,230,.2);

    --danger:#e58a6f;
    --danger-ring:rgba(229,138,111,.2);
    --ok:#5fbd8d;

    --overlay:rgba(0,0,0,.66);
    --busy-bg:rgba(21,23,29,.94);
    --toast-bg:#2b3350;
    --shadow-bar:0 1px 3px rgba(0,0,0,.5);
    --shadow-panel:0 1px 2px rgba(0,0,0,.3);
    --shadow-modal:0 24px 64px rgba(0,0,0,.6);
    --shadow-sheet:0 6px 26px rgba(0,0,0,.55);
  }
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*,*::before,*::after{ box-sizing:border-box; }

html{
  -webkit-text-size-adjust:100%;   /* stops mobile browsers inflating the letter text */
  text-size-adjust:100%;
}

body{
  margin:0;
  background:var(--app-bg);
  color:var(--text);
  font-family:var(--ui-font);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

img{ max-width:100%; }
[hidden]{ display:none !important; }
:focus-visible{ outline:2px solid var(--accent-text); outline-offset:2px; border-radius:4px; }
::selection{ background:var(--accent-ring); }

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* ==========================================================================
   Buttons & shared controls
   ========================================================================== */
.btn{
  -webkit-appearance:none; appearance:none;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:44px; padding:0 16px;
  border:1px solid transparent; border-radius:10px;
  font:600 14px/1.2 var(--ui-font);
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:var(--accent-tap);
  transition:background .15s ease, border-color .15s ease, color .15s ease, transform .06s ease;
  white-space:nowrap;
  -webkit-user-select:none; user-select:none;
}
.btn:active{ transform:translateY(1px); }
.btn[disabled]{ opacity:.55; cursor:not-allowed; transform:none; }
.btn-primary{ background:var(--accent); color:var(--accent-ink); }
.btn-primary:hover:not([disabled]){ background:var(--accent-hover); }
.btn-ghost{ background:var(--surface); color:var(--accent-text); border-color:var(--border-strong); }
.btn-ghost:hover:not([disabled]){ background:var(--surface-3); }
.btn-block{ width:100%; }

/* ==========================================================================
   App bar - the heading, and nothing else
   ========================================================================== */
.appbar{
  position:sticky; top:0; z-index:40;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  min-height:var(--appbar-h);
  background:var(--surface);
  color:var(--text);
  border-bottom:1px solid var(--border);
  box-shadow:var(--shadow-bar);
  padding:8px var(--gutter);
  padding-left:max(var(--gutter), env(safe-area-inset-left));
  padding-right:max(var(--gutter), env(safe-area-inset-right));
}
.appbar h1{
  margin:0; min-width:0;
  font-size:clamp(15px, 1.5vw, 17px);
  font-weight:650; line-height:1.25; letter-spacing:-.01em;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.tabs{
  display:none; flex:0 0 auto;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:999px; padding:3px; gap:2px;
}
.tab{
  -webkit-appearance:none; appearance:none;
  border:0; background:transparent; color:var(--text-soft);
  font:600 13px/1 var(--ui-font);
  padding:0 15px; min-height:32px; border-radius:999px;
  cursor:pointer; touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  transition:background .15s ease, color .15s ease;
}
.tab[aria-selected="true"]{ background:var(--accent); color:var(--accent-ink); }

/* ==========================================================================
   Workspace - fluid from 320px to ultrawide
   ========================================================================== */
.workspace{
  display:grid;
  grid-template-columns:minmax(420px, 480px) minmax(460px, 1fr);
  gap:20px; align-items:start;
  max-width:100%; margin:0;
  padding:16px 20px;
  box-sizing:border-box;
}

#viewGenerator {
  background: var(--app-bg, #f1f5f9) !important;
  color: var(--text, #0f172a) !important;
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
}

/* Ensure no awkward horizontal scroll on form inputs */
.form-panel {
  overflow-x: hidden !important;
}

.form-card {
  box-sizing: border-box;
  overflow-x: hidden;
}

/* -------------------------- Form panel -------------------------- */
.form-panel{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-panel);
  padding:18px 18px 0;
  position:sticky; top:calc(var(--appbar-h) + var(--gutter));
  max-height:calc(100vh - var(--appbar-h) - var(--gutter) * 2);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.form-intro{ font-size:12.5px; line-height:1.55; color:var(--text-soft); margin:0 0 16px; }

.section-title{
  font-size:11.5px; font-weight:700; color:var(--danger);
  text-transform:uppercase; letter-spacing:.07em;
  margin:20px 0 11px; padding-top:15px;
  border-top:1px solid var(--border);
}
.section-title:first-of-type{ border-top:none; padding-top:0; margin-top:0; }
.section-title .opt{ color:var(--text-soft); text-transform:none; font-weight:400; letter-spacing:0; }

.field{ margin-bottom:13px; }
.field label{
  display:block; font-size:11px; font-weight:700; color:var(--accent-text);
  text-transform:uppercase; letter-spacing:.05em; margin-bottom:5px;
}
.field label .req{ color:var(--danger); margin-left:3px; letter-spacing:0; text-transform:none; font-size:10.5px; }
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field select,
.field textarea{
  width:100%; display:block;
  font-family:inherit; font-size:15px;
  min-height:44px; padding:10px 12px;
  border:1px solid var(--border-strong); border-radius:9px;
  background:var(--surface); color:var(--text);
  -webkit-appearance:none; appearance:none;
}
.field select{
  background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235f5b51' stroke-width='1.6' d='M1 1.8 6 6.4l5-4.6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 13px center;
  padding-right:34px;
}
.field textarea{ resize:vertical; min-height:74px; line-height:1.5; }
.field input:focus, .field select:focus, .field textarea:focus{
  outline:none; border-color:var(--accent-text); box-shadow:0 0 0 3px var(--accent-ring);
}
.field input.invalid{ border-color:var(--danger); box-shadow:0 0 0 3px var(--danger-ring); }
.field-help{ font-size:11.5px; color:var(--text-soft); margin-top:5px; line-height:1.45; }

@media (prefers-color-scheme:dark){
  .field select{
    background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23a5a29a' stroke-width='1.6' d='M1 1.8 6 6.4l5-4.6'/%3E%3C/svg%3E");
  }
}

.panel-actions{
  position:sticky; bottom:0;
  margin:18px -18px 0; padding:14px 18px;
  background:var(--surface);
  border-top:1px solid var(--border);
  display:grid; gap:9px;
}
.panel-actions .row{ display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.status-line{ font-size:11.5px; color:var(--text-soft); line-height:1.45; text-align:center; min-height:16px; }
.status-line.ok{ color:var(--ok); font-weight:600; }
.status-line.err{ color:var(--danger); font-weight:600; }

/* -------------------------- Preview panel -------------------------- */
.preview-panel{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-panel);
  overflow:hidden;
  display:flex; flex-direction:column;
  position:sticky; top:calc(var(--appbar-h) + var(--gutter));
  height:calc(100vh - var(--appbar-h) - var(--gutter) * 2);
  min-height:340px;
}
.preview-toolbar{
  flex:0 0 auto;
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap;
  padding:9px 12px;
  border-bottom:1px solid var(--border);
  background:var(--surface-2);
}
.tb-group{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tb-label{
  font-size:10.5px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--text-faint);
}
.seg{ display:inline-flex; border:1px solid var(--border-strong); border-radius:9px; overflow:hidden; background:var(--surface); }
.seg button{
  -webkit-appearance:none; appearance:none;
  border:0; background:transparent; color:var(--text-soft);
  font:600 12.5px/1 var(--ui-font);
  min-height:38px; padding:0 14px; cursor:pointer;
  touch-action:manipulation; -webkit-tap-highlight-color:transparent;
  transition:background .15s ease, color .15s ease;
}
.seg button + button{ border-left:1px solid var(--border); }
.seg button[aria-pressed="true"]{ background:var(--accent); color:var(--accent-ink); }
.seg button:not([aria-pressed="true"]):hover{ background:var(--surface-3); color:var(--text); }

.zoom{ display:inline-flex; align-items:stretch; border:1px solid var(--border-strong); border-radius:9px; overflow:hidden; background:var(--surface); }
.zoom button{
  -webkit-appearance:none; appearance:none;
  border:0; background:transparent; color:var(--accent-text);
  width:40px; min-height:38px; cursor:pointer; font-size:17px; line-height:1;
  display:flex; align-items:center; justify-content:center;
  touch-action:manipulation; -webkit-tap-highlight-color:transparent;
}
.zoom button:hover:not([disabled]){ background:var(--surface-3); }
.zoom button[disabled]{ opacity:.35; cursor:not-allowed; }
.zoom .zval{
  min-width:56px; display:flex; align-items:center; justify-content:center;
  font:600 12.5px/1 var(--ui-font); color:var(--text-soft);
  border-left:1px solid var(--border); border-right:1px solid var(--border);
  padding:0 4px;
}
.zoom .zfit{ width:auto; padding:0 12px; font:600 12.5px/1 var(--ui-font); border-left:1px solid var(--border); }

.paper-scroll{
  flex:1 1 auto;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  background:var(--paper-well);
  padding:clamp(10px, 1.4vw, 18px);
  display:block;
}
.paper-scaler{
  transform-origin:top left;
  margin:0 auto;
  will-change:transform;
}

/* ==========================================================================
   THE LETTER

   Fixed physical dimensions, never reflowed, and always light: this is
   paper. Only the wrapper is scaled, so the letterhead and the body text
   keep exactly the proportions they have when printed, and the PDF looks
   the same whichever theme the interface is in.
   ========================================================================== */
.page{
  color-scheme:light;
  --page-w:210mm;
  --page-h:297mm;
  --page-pad:18mm;
  --indent:25mm;

  width:var(--page-w);
  min-height:var(--page-h);
  background:#fff;
  padding:0 var(--page-pad) 16mm;
  font-family:var(--doc-font);
  color:#1a1a1a;
  box-shadow:var(--shadow-sheet);
  overflow-wrap:break-word;
}
.page[data-format="legal"]{
  --page-w:215.9mm;
  --page-h:355.6mm;
  --page-pad:19mm;
}

header.letterhead{ margin:0 calc(-1 * var(--page-pad)); }
header.letterhead .header-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:2mm 6mm 0;
}
header.letterhead img.logo{ display:block; height:24mm; width:auto; flex:0 0 auto; }
header.letterhead img.logo-right{ height:22mm; }
header.letterhead img.center-text{
  display:block; width:auto; height:auto;
  max-width:355px; flex:0 1 auto; min-width:0;
}
header.letterhead .rule {
  display: block !important;
  width: 100% !important;
  height: 0 !important;
  border: none !important;
  border-top: 2.5px solid #000000 !important;
  margin-top: 4px !important;
  box-sizing: border-box !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.to-block{ margin:8mm 0 0; font-size:14px; line-height:1.6; }
.to-block .to-label{ margin-bottom:3mm; }
.to-block .recip{ padding-left:var(--indent); }
.to-block .recip .name{ font-weight:700; }

.subject-row{
  margin:7mm 0 0; font-size:14px;
  display:grid; grid-template-columns:var(--indent) 1fr;
}
.subject-row .lbl{ font-weight:700; white-space:nowrap; }
.subject-row .val{ font-weight:700; text-decoration:underline; }

.body-text{ margin:6mm 0 0; font-size:14.5px; line-height:1.8; text-align:justify; }
.body-text p{ margin:0 0 4mm; text-indent:var(--indent); }
.body-text p.note{ font-style:normal; margin:0 0 4mm; text-indent:var(--indent); font-weight:inherit; color:inherit; }

.sign-block{ margin-top:16mm; font-size:14px; line-height:1.55; }
.sign-block img.sig{ display:block; height:20mm; width:auto; margin-bottom:1mm; }
.sign-block .sig-name{ font-weight:700; font-style:italic; }
.sign-block .sig-title{ font-weight:700; }

.empty-note{ color:#b5533c; font-style:italic; }

/* ==========================================================================
   Mobile action bar
   ========================================================================== */
.mobile-bar{
  display:none;
  position:fixed; left:0; right:0; bottom:0; z-index:38;
  gap:10px; align-items:center;
  padding:12px 14px;
  padding-bottom:calc(12px + env(safe-area-inset-bottom));
  padding-left:max(14px, env(safe-area-inset-left));
  padding-right:max(14px, env(safe-area-inset-right));
  background:var(--bar-bg);
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  border-top:1px solid var(--border);
  box-shadow:0 -3px 14px rgba(0,0,0,.08);
}
.mobile-bar .btn-primary{ flex:1 1 auto; }
.mobile-bar .btn-ghost{ flex:0 0 auto; padding:0 14px; }

/* ==========================================================================
   Modal - paper size chooser
   ========================================================================== */
.modal-backdrop{
  position:fixed; inset:0; z-index:80;
  background:var(--overlay);
  display:flex; align-items:center; justify-content:center;
  padding:16px;
  animation:fade .16s ease;
}
@keyframes fade{ from{opacity:0} to{opacity:1} }
.modal-card{
  width:100%; max-width:440px;
  background:var(--surface); border-radius:16px;
  padding:20px;
  box-shadow:var(--shadow-modal);
  max-height:calc(100vh - 32px);
  overflow-y:auto;
}
.modal-card h2{ margin:0 0 4px; font-size:17px; color:var(--accent-text); }
.modal-sub{ margin:0 0 16px; font-size:13px; color:var(--text-soft); line-height:1.5; }
.size-options{ display:grid; gap:10px; margin-bottom:14px; }
.size-opt{
  display:flex; align-items:flex-start; gap:12px;
  border:1.5px solid var(--border-strong); border-radius:12px;
  padding:13px 14px; cursor:pointer;
  transition:border-color .15s ease, background .15s ease;
  -webkit-tap-highlight-color:transparent;
}
.size-opt:hover{ border-color:var(--text-faint); }
.size-opt.is-checked{ border-color:var(--accent-text); background:var(--accent-tint); box-shadow:inset 0 0 0 1px var(--accent-text); }
.size-opt input{ margin:2px 0 0; accent-color:var(--accent); width:18px; height:18px; flex:0 0 auto; }
.so-name{ display:block; font-weight:700; font-size:14.5px; color:var(--accent-text); }
.so-dim{ display:block; font-size:12.5px; color:var(--text); margin-top:1px; }
.so-note{ display:block; font-size:11.5px; color:var(--text-soft); margin-top:3px; line-height:1.4; }
.chk{
  display:flex; align-items:flex-start; gap:9px;
  font-size:12.5px; color:var(--text-soft); line-height:1.45;
  padding:2px 2px 0; cursor:pointer; margin-bottom:18px;
}
.chk input{ margin:1px 0 0; accent-color:var(--accent); width:16px; height:16px; flex:0 0 auto; }
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; }
.modal-actions .btn{ min-width:110px; }

/* ==========================================================================
   Busy overlay + toast
   ========================================================================== */
.busy{
  position:fixed; inset:0; z-index:90;
  background:var(--busy-bg);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  text-align:center; padding:24px;
}
.spinner{
  width:38px; height:38px; border-radius:50%;
  border:3px solid var(--accent-ring); border-top-color:var(--accent);
  animation:spin .8s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.busy-text{ font-size:14px; font-weight:600; color:var(--accent-text); }
.busy-sub{ font-size:12.5px; color:var(--text-soft); max-width:280px; }

.toast{
  position:fixed; left:50%; transform:translateX(-50%);
  bottom:calc(16px + env(safe-area-inset-bottom));
  z-index:95;
  background:var(--toast-bg); color:var(--toast-ink);
  padding:12px 18px; border-radius:11px;
  font-size:13.5px; font-weight:500; line-height:1.4;
  max-width:calc(100% - 28px); text-align:center;
  box-shadow:var(--shadow-modal);
}
.toast.err{ background:var(--danger); }

/* ==========================================================================
   UI/UX PRO MAX DESIGN SYSTEM EXTENSIONS
   ========================================================================== */

/* Accessibility focus visible rings */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Interactive Card Surfaces */
.form-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-card:hover {
  border-color: var(--border-strong);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-text);
}
.card-title svg {
  color: var(--accent);
  flex-shrink: 0;
}


/* Letter Paragraphs Editor Cards */
.para-card {
  transition: all 0.18s ease;
}
.para-card:hover {
  border-color: var(--border-strong) !important;
}
.para-card:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--accent-ring);
}
.para-textarea:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-ring);
}
.body-text p[contenteditable="true"] {
  border-radius: 3px;
  transition: background 0.15s ease, outline 0.15s ease;
}
.body-text p[contenteditable="true"]:hover {
  outline: 1px dashed rgba(59, 130, 246, 0.35);
  cursor: text;
}
.body-text p[contenteditable="true"]:focus {
  outline: 1.5px solid var(--accent);
  background: rgba(59, 130, 246, 0.04);
}

/* Role Segmented Pills */
.role-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 8px;
}
.role-pill-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 8px 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.16s ease;
  touch-action: manipulation;
}
.role-pill-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-strong);
}
.role-pill-btn.active,
.role-pill-btn.is-active {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 0 0 1px var(--accent);
}
.role-pill-btn svg {
  width: 16px;
  height: 16px;
}

/* Icon Adorned Inputs */
.input-with-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-icon-adornment {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  width: 18px;
  height: 18px;
}
.input-with-icon-wrap input,
.field .input-with-icon-wrap input[type=text],
.field .input-with-icon-wrap input[type=email],
.field .input-with-icon-wrap input[type=tel],
.field .input-with-icon-wrap select,
.field input.input-with-icon {
  padding-left: 40px !important;
}

/* Quick Action Chips */
.quick-chip {
  background: var(--accent-tint);
  color: var(--accent-text);
  border: 1px solid var(--accent-ring);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s, transform 0.1s;
}
.quick-chip:hover {
  background: var(--accent-tap);
  transform: translateY(-1px);
}

/* Preview Toolbar Live Status Pill */
.preview-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}
.preview-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* Batch Dropzone */
.batch-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 14px;
}
.batch-dropzone:hover, .batch-dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-tint);
}

/* Table Record Row Hover */
.table-record-row {
  transition: background 0.12s ease;
  border-bottom: 1px solid var(--border);
}
.table-record-row:hover {
  background: var(--surface-3);
}

/* ==========================================================================
   Responsive

   Above 900px the fluid grid does the work - the sidebar tracks the
   viewport with clamp(), so there is no step between a small laptop and
   an ultrawide monitor. Below 900px the two columns become tabs and the
   actions move to a fixed bar within thumb reach.
   ========================================================================== */
@media (max-width:900px){
  .tabs{ display:flex; }

  .workspace{ display:block; padding:0; max-width:none; }
  body{ padding-bottom:var(--bottombar-h); }

  .form-panel{
    position:static; max-height:none; overflow:visible;
    border:0; border-radius:0; box-shadow:none;
    padding:16px 15px 4px;
    padding-left:max(15px, env(safe-area-inset-left));
    padding-right:max(15px, env(safe-area-inset-right));
  }
  .panel-actions{ display:none; }

  .preview-panel{
    position:static; border:0; border-radius:0; box-shadow:none;
    height:calc(100vh - var(--appbar-h) - var(--bottombar-h));
    height:calc(100dvh - var(--appbar-h) - var(--bottombar-h));
  }
  .preview-toolbar{ padding:8px 12px; gap:8px; }
  .preview-toolbar .tb-label{ display:none; }

  .mobile-bar{ display:flex; }

  body[data-tab="edit"] .preview-panel{ display:none; }
  body[data-tab="preview"] .form-panel{ display:none; }
}

/* Phones */
@media (max-width:520px){
  .seg button{ padding:0 12px; font-size:12px; }
  .zoom button{ width:38px; }
  .zoom .zval{ min-width:50px; }

  .modal-backdrop{ align-items:flex-end; padding:0; }
  .modal-card{
    max-width:none; border-radius:18px 18px 0 0;
    padding:20px 18px calc(18px + env(safe-area-inset-bottom));
    max-height:88vh;
  }
  .modal-actions{ flex-direction:column-reverse; }
  .modal-actions .btn{ width:100%; }
}

/* Narrow phones - keep the toolbar on one line */
@media (max-width:380px){
  .preview-toolbar{ padding:8px 10px; gap:6px; }
  .seg button{ padding:0 10px; }
  .zoom button{ width:34px; }
  .zoom .zval{ min-width:44px; font-size:12px; }
  .zoom .zfit{ padding:0 9px; }
  .mobile-bar{ gap:8px; padding-left:10px; padding-right:10px; }
  .mobile-bar .btn-ghost{ padding:0 11px; font-size:13px; }
}

/* Landscape phones and other short viewports: let the page scroll rather
   than squeezing the preview into a few dozen pixels. */
@media (max-width:900px) and (max-height:560px){
  .preview-panel{ height:auto; min-height:0; }
  .paper-scroll{ overflow:visible; }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
  .spinner{ animation-duration:1.2s !important; animation-iteration-count:infinite !important; }
}

/* ==========================================================================
   Off-screen render stage used to build the PDF at true paper size,
   independent of the device - and of the theme - the app runs in.
   ========================================================================== */
.pdf-stage{
  color-scheme:light;
  position:fixed; left:-15000px; top:0;
  width:0; height:0; overflow:visible;
  z-index:-1; background:#fff;
}
.pdf-stage .page{ box-shadow:none !important; margin:0 !important; }

/* ==================== EZ PORTAL WELCOME SCREEN STYLES ==================== */
#welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: #1f2022;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#welcome-screen.hidden-welcome {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 520px;
  width: 90%;
  text-align: center;
  transition: transform 0.25s ease;
}

.welcome-logo-wrap:hover {
  transform: scale(1.02);
}

.welcome-logo-img {
  max-width: 460px;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.45));
}

.welcome-hint {
  margin-top: 28px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.welcome-logo-wrap:hover .welcome-hint {
  color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Print (fallback path / Ctrl-P)
   ========================================================================== */
@media print{
  html,body{
    background:#fff;
    color:#1a1a1a;
    padding:0 !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }
  #welcome-screen, .appbar, .form-panel, .preview-toolbar, .mobile-bar,
  .modal-backdrop, .busy, .toast, .pdf-stage{ display:none !important; }
  .workspace{ display:block !important; padding:0 !important; margin:0 !important; max-width:none !important; }
  .preview-panel{
    display:block !important; position:static !important;
    height:auto !important; min-height:0 !important;
    border:0 !important; border-radius:0 !important; overflow:visible !important;
    background:#fff !important; box-shadow:none !important;
  }
  .paper-scroll{ overflow:visible !important; padding:0 !important; background:#fff !important; }
  .paper-scaler{ transform:none !important; width:auto !important; height:auto !important; margin:0 !important; }
  .page{ box-shadow:none !important; min-height:0 !important; }
  header.letterhead .rule {
    display: block !important;
    width: 100% !important;
    height: 0 !important;
    border: none !important;
    border-top: 2.5px solid #000000 !important;
    margin-top: 4px !important;
    visibility: visible !important;
    opacity: 1 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ==================== MOBILE FRIENDLY & OPTION PICKER STYLES ==================== */

/* Prevent iOS Safari auto-zoom on input focus */
@media (max-width: 680px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Stepper Pill Badges */
.step-num-pill {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-text);
  border: 1px solid var(--accent-ring);
  white-space: nowrap;
}

/* Card Header Accordion / Collapse Toggle */
.card-header {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.card-header:hover {
  opacity: 0.92;
}
.card-collapse-icon {
  margin-left: auto;
  color: var(--text-faint);
  transition: transform 0.22s ease;
  display: flex;
  align-items: center;
}
.form-card.is-collapsed .card-collapse-icon {
  transform: rotate(-90deg);
}
.form-card.is-collapsed > *:not(.card-header) {
  display: none !important;
}

/* Sticky Step Jump Navigation Bar */
.form-section-nav {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 14px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.form-section-nav::-webkit-scrollbar { display: none; }
.sec-nav-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
  touch-action: manipulation;
}
.sec-nav-btn:hover {
  color: var(--text);
  background: var(--surface-3);
}
.sec-nav-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.sec-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  font-size: 10.5px;
  font-weight: 800;
}
.sec-nav-btn.active .sec-step {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* Visual Conference Quick Selection Grid */
.conf-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
@media (min-width: 620px) {
  .conf-pill-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.conf-pill-btn {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 10px;
  min-height: 52px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  transition: all 0.16s ease;
  touch-action: manipulation;
}
.conf-pill-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.conf-pill-btn.is-active {
  background: var(--accent-tint);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.conf-pill-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.25;
}
.conf-pill-btn.is-active .conf-pill-title {
  color: var(--accent-text);
}
.conf-pill-sub {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.2;
}

/* Visual Signatory Quick Picker Grid */
.signer-pill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
@media (max-width: 640px) {
  .signer-pill-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
.signer-pill-btn {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  min-height: 48px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  transition: all 0.16s ease;
  touch-action: manipulation;
}
.signer-pill-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.signer-pill-btn.is-active {
  background: var(--accent-tint);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.signer-pill-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.signer-pill-btn.is-active .signer-pill-name {
  color: var(--accent-text);
}
.signer-pill-title {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.2;
}

/* Responsive Mobile Navigation and App Bar */
@media (max-width: 900px) {
  .appbar {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
    height: auto;
    min-height: auto;
  }
  .appbar > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }
  .software-nav {
    flex: 0 0 auto;
    gap: 4px !important;
  }
  .software-nav .btn {
    padding: 0 8px !important;
    font-size: 11.5px !important;
    min-height: 32px !important;
  }
  .tabs {
    display: flex !important;
    width: 100%;
    order: 3;
    margin-top: 4px;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
  }
  .tab {
    flex: 1 1 50%;
    text-align: center;
    min-height: 42px;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 9px;
  }
  .role-picker {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .role-pill-btn {
    min-height: 52px;
    padding: 10px 8px;
    font-size: 13px;
  }
  .mobile-bar {
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .mobile-bar .btn {
    min-height: 44px;
    font-size: 13.5px;
  }
}

@media (max-width: 480px) {
  .software-badge {
    display: none !important;
  }
  .software-nav button:first-child {
    display: none !important;
  }
  .role-picker {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .conf-pill-grid {
    grid-template-columns: 1fr !important;
  }
}

body[data-tab="edit"] #mobileSwitchPreviewBtn { display: inline-flex !important; }
body[data-tab="edit"] #mobileSwitchEditBtn { display: none !important; }

body[data-tab="preview"] #mobileSwitchPreviewBtn { display: none !important; }
body[data-tab="preview"] #mobileSwitchEditBtn { display: inline-flex !important; }



/* ==========================================================================
   EXECUTIVE DASHBOARD THEME & LAYOUT (HELIOS / EZ PORTAL PRO SUITE)
   ========================================================================== */
:root {
  --dash-bg: #0f1015;
  --dash-sidebar-bg: #13141a;
  --dash-card-bg: #171820;
  --dash-card-border: rgba(255, 255, 255, 0.07);
  --dash-card-hover: rgba(255, 255, 255, 0.12);
  --dash-glow-pink: #ec4899;
  --dash-glow-purple: #a855f7;
  --dash-glow-cyan: #06b6d4;
  --dash-text-main: #f1f2f6;
  --dash-text-muted: #8b8e9f;
  --dash-pill-bg: #1c1d25;
  --dash-pill-border: rgba(255, 255, 255, 0.1);
}

.dash-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--dash-bg);
  color: var(--dash-text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* SIDEBAR */
.dash-sidebar {
  width: 236px;
  flex-shrink: 0;
  background: var(--dash-sidebar-bg);
  border-right: 1px solid var(--dash-card-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px;
  box-sizing: border-box;
  z-index: 100;
  transition: transform 0.25s ease;
}

.dash-sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.dash-brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.dash-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(236,72,153,0.2), rgba(168,85,247,0.2));
  border: 1px solid rgba(236,72,153,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(236,72,153,0.2);
}

.dash-brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.1;
  color: #fff;
}

.dash-brand-sub {
  font-size: 11px;
  color: var(--dash-text-muted);
  font-weight: 500;
}

.dash-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.dash-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dash-text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.dash-nav-btn.active {
  background: radial-gradient(ellipse at 85% 50%, rgba(236, 72, 153, 0.32) 0%, rgba(168, 85, 247, 0.16) 55%, rgba(27, 28, 36, 0.95) 100%);
  border: 1px solid rgba(236, 72, 153, 0.45);
  box-shadow: 0 4px 20px -3px rgba(236, 72, 153, 0.3);
  color: #ffffff;
  font-weight: 600;
}

.dash-nav-btn.active svg {
  stroke: #f472b6;
  filter: drop-shadow(0 0 6px rgba(244, 114, 182, 0.6));
}

.dash-sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
}

/* MAIN CONTENT CONTAINER */
.dash-main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
}

/* VIEW DASHBOARD */
#viewDashboard {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 36px 40px;
  max-width: 1560px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* HEADER ROW */
.dash-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.dash-welcome-title {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0 0 4px;
  color: #fff;
}

.dash-user-glow {
  background: linear-gradient(135deg, #ffffff 45%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.dash-welcome-sub {
  font-size: 13.5px;
  color: var(--dash-text-muted);
  margin: 0;
}

.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-circle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #171821;
  border: 1px solid var(--dash-card-border);
  color: var(--dash-text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.dash-circle-btn:hover {
  background: #1f202c;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.dash-badge-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 0 8px #ec4899;
}

.dash-profile-capsule {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #171821;
  border: 1px solid var(--dash-card-border);
  border-radius: 999px;
  padding: 4px 14px 4px 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-profile-capsule:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #1e1f2b;
}

.dash-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  border: 2px solid #171821;
  box-shadow: 0 2px 8px rgba(236,72,153,0.3);
}

.dash-profile-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
}

.dash-profile-role {
  font-size: 10.5px;
  color: var(--dash-text-muted);
}

/* FILTER & SEARCH ROW */
.dash-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-pill-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: #15161d;
  color: var(--dash-text-muted);
  border: 1px solid var(--dash-card-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-pill-btn:hover {
  color: #fff;
  background: #1b1c24;
}

.dash-pill-btn.active {
  background: #222330;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.dash-search-capsule {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #15161e;
  border: 1px solid var(--dash-card-border);
  border-radius: 999px;
  padding: 8px 16px;
  min-width: 290px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.dash-search-capsule input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  width: 100%;
}

.dash-search-capsule input::placeholder {
  color: #6c6f82;
}

/* TOP 3-COLUMN CARDS GRID */
.dash-grid-top {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 1.15fr;
  gap: 18px;
}

@media (max-width: 1200px) {
  .dash-grid-top {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  background: var(--dash-card-bg);
  border: 1px solid var(--dash-card-border);
  border-radius: 20px;
  padding: 22px;
  box-sizing: border-box;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* COLUMN 1 SUB-CARDS */
.dash-col-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-card-holding {
  background: var(--dash-card-bg);
  border: 1px solid var(--dash-card-border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.45);
}

.dash-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dash-stat-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dash-text-muted);
}

.dash-badge-edition {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #1f202a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  color: var(--dash-text-main);
  cursor: pointer;
}

.dash-stat-number {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #fff;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.dash-stat-subtext {
  font-size: 12px;
  color: #10b981;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
}

/* CTA GENERATOR CARD */
.dash-card-cta {
  background: linear-gradient(180deg, #181922 0%, #1a1727 60%, #24192d 100%);
  border: 1px solid rgba(236,72,153,0.25);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 12px 35px -8px rgba(236,72,153,0.18);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.dash-card-cta::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 20%;
  right: 20%;
  height: 80px;
  background: radial-gradient(ellipse, rgba(236,72,153,0.45) 0%, transparent 70%);
  filter: blur(25px);
  pointer-events: none;
}

.dash-cta-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.dash-cta-desc {
  font-size: 12.5px;
  color: var(--dash-text-muted);
  line-height: 1.45;
  margin: 0;
  max-width: 310px;
}

.dash-btn-glowing {
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.dash-btn-glowing:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(236, 72, 153, 0.65);
}

/* RECENT RECIPIENTS (WATCHLIST STYLE) */
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dash-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.dash-subtabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #121319;
  border: 1px solid var(--dash-card-border);
  border-radius: 999px;
  padding: 3px 4px;
}

.dash-subtab-btn {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--dash-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.dash-subtab-btn.active {
  background: #252634;
  color: #fff;
  font-weight: 600;
}

.dash-recip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-recip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-recip-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.dash-recip-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dash-recip-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.dash-recip-texts {
  min-width: 0;
}

.dash-recip-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-recip-desc {
  font-size: 11px;
  color: var(--dash-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-recip-right {
  text-align: right;
  flex-shrink: 0;
}

.dash-recip-cat {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.dash-recip-status {
  font-size: 10.5px;
  color: #10b981;
  font-weight: 600;
}

/* CATEGORY ROSTER (PORTFOLIO STYLE) */
.dash-roster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dash-roster-box {
  background: #14151c;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.dash-roster-box:hover {
  background: #191a24;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.dash-roster-box-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.dash-roster-count {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.dash-roster-gain {
  font-size: 10.5px;
  font-weight: 600;
  color: #10b981;
}

.dash-roster-box-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.dash-roster-label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dash-roster-units {
  font-size: 10.5px;
  color: var(--dash-text-muted);
}

/* BOTTOM FULL-WIDTH PERFORMANCE CHART CARD */
.dash-perf-card {
  background: var(--dash-card-bg);
  border: 1px solid var(--dash-card-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  display: flex;
}

.dash-chart-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 24px;
  font-size: 11px;
  color: #606375;
  width: 44px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 10px;
  box-sizing: border-box;
}

.dash-chart-svg-container {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

.dash-chart-svg {
  width: 100%;
  height: 200px;
  overflow: visible;
}

.dash-chart-xaxis {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  font-size: 11.5px;
  color: #606375;
}

/* TOOLTIP ON CHART PEAK */
.dash-chart-tooltip {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e1f2b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  z-index: 10;
}

.dash-chart-tooltip-date {
  font-size: 10.5px;
  color: var(--dash-text-muted);
}

.dash-chart-tooltip-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-chart-tooltip-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
}

/* RESPONSIVE HAMBURGER & MOBILE TOGGLE */
.dash-mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
}

@media (max-width: 900px) {
  .dash-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0,0,0,0.7);
  }
  .dash-sidebar.open {
    transform: translateX(0);
  }
  .dash-mobile-nav-toggle {
    display: inline-flex;
  }
  #viewDashboard {
    padding: 18px 16px;
  }
  .dash-search-capsule {
    min-width: 100%;
  }
}



/* ==========================================================================
   ENHANCED RESPONSIVE & MOBILE-FRIENDLY MODALS (BATCH, HISTORY, PDF)
   ========================================================================== */
.modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(4px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: 100% !important;
  background: var(--surface, #ffffff) !important;
  color: var(--text, #0f172a) !important;
  border-radius: 18px !important;
  padding: 24px !important;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5) !important;
  max-height: calc(100vh - 40px) !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  position: relative !important;
}

#batchModal .modal-card {
  max-width: 820px !important;
}

#historyModal .modal-card {
  max-width: 880px !important;
}

#dlModal .modal-card {
  max-width: 480px !important;
}

.batch-table-wrap, .history-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: 10px !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  margin-top: 10px !important;
}

/* Mobile specific popup bottom-sheet behavior */
@media (max-width: 640px) {
  .modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 92vh !important;
    padding: 20px 16px calc(24px + env(safe-area-inset-bottom)) !important;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.4) !important;
  }
  .modal-card h2 {
    font-size: 18px !important;
  }
}



/* ==========================================================================
   CLEAN GREEN & WHITE INSTITUTIONAL THEME (NO GRADIENTS)
   ========================================================================== */
body {
  background: var(--app-bg, #f8fafc) !important;
  color: var(--text, #0f172a) !important;
}

/* TOP UNIFIED APPLICATION NAVBAR */
.portal-nav-bar {
  background: #ffffff;
  border-bottom: 2px solid var(--accent, #059669);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
}

.portal-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.portal-nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--border);
}

.portal-nav-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-nav-badge {
  background: var(--accent-tint, #ecfdf5);
  color: var(--accent, #059669);
  border: 1px solid var(--accent-ring, #a7f3d0);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.portal-nav-sub {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 500;
}

.portal-nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2, #f1f5f9);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.portal-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portal-nav-tab:hover {
  color: var(--accent);
  background: #ffffff;
}

.portal-nav-tab.active {
  background: var(--accent, #059669);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.3);
}

.portal-nav-tab.active svg {
  stroke: #ffffff;
}

/* DASHBOARD VIEW STYLING */
#viewDashboard {
  padding: 24px 28px 48px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
}

.dash-hero-green {
  background: var(--accent, #059669);
  color: #ffffff;
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.dash-hero-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}

.dash-hero-sub {
  font-size: 13.5px;
  opacity: 0.92;
  margin: 0;
  max-width: 620px;
  line-height: 1.45;
}

.dash-hero-btn {
  background: #ffffff;
  color: var(--accent, #059669);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: all 0.15s ease;
}

.dash-hero-btn:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

/* STAT TILES (SOLID GREEN & WHITE) */
.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .dash-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dash-stat-tile {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent, #059669);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dash-stat-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.dash-stat-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.dash-stat-sub {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
}

/* CONFERENCE SERIES SECTIONS */
.conf-sections-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.conf-sections-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.conf-sections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1000px) {
  .conf-sections-grid {
    grid-template-columns: 1fr;
  }
}

.conf-section-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
}

.conf-section-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.conf-sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-tint, #ecfdf5);
  color: var(--accent, #059669);
  border: 1px solid var(--accent-ring, #a7f3d0);
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
}

.conf-sec-name {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
  margin: 6px 0 4px;
  line-height: 1.3;
}

.conf-sec-dates {
  font-size: 12.5px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.conf-sec-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

/* STUDIO TOP BAR (REPLACING OLD APPBAR) */
.studio-top-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

.studio-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.studio-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.studio-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ADMIN PANEL STYLING */
#viewAdmin {
  padding: 24px 28px 48px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
}

.admin-header-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}

.admin-sub {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
}

.admin-export-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-table-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-search-input {
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  min-width: 260px;
  outline: none;
}

.admin-search-input:focus {
  border-color: var(--accent);
}

.admin-select-filter {
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.admin-registry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-registry-table th {
  background: #f1f5f9;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.admin-registry-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.admin-registry-table tr:hover {
  background: var(--surface-2, #f8fafc);
}

/* ADD CONFERENCE FORM */
.admin-add-conf-box {
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@page{ size:210mm 297mm; margin:0; }
/* ==================== MOBILE FRIENDLY & OPTION PICKER STYLES ==================== */

/* Prevent iOS Safari auto-zoom on input focus */
@media (max-width: 680px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Stepper Pill Badges */
.step-num-pill {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-text);
  border: 1px solid var(--accent-ring);
  white-space: nowrap;
}

/* Card Header Accordion / Collapse Toggle */
.card-header {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.card-header:hover {
  opacity: 0.92;
}
.card-collapse-icon {
  margin-left: auto;
  color: var(--text-faint);
  transition: transform 0.22s ease;
  display: flex;
  align-items: center;
}
.form-card.is-collapsed .card-collapse-icon {
  transform: rotate(-90deg);
}
.form-card.is-collapsed > *:not(.card-header) {
  display: none !important;
}

/* Sticky Step Jump Navigation Bar */
.form-section-nav {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 14px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.form-section-nav::-webkit-scrollbar { display: none; }
.sec-nav-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
  touch-action: manipulation;
}
.sec-nav-btn:hover {
  color: var(--text);
  background: var(--surface-3);
}
.sec-nav-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.sec-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  font-size: 10.5px;
  font-weight: 800;
}
.sec-nav-btn.active .sec-step {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* Visual Conference Quick Selection Grid */
.conf-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
@media (min-width: 620px) {
  .conf-pill-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.conf-pill-btn {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 10px;
  min-height: 52px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  transition: all 0.16s ease;
  touch-action: manipulation;
}
.conf-pill-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.conf-pill-btn.is-active {
  background: var(--accent-tint);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.conf-pill-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.25;
}
.conf-pill-btn.is-active .conf-pill-title {
  color: var(--accent-text);
}
.conf-pill-sub {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.2;
}

/* Visual Signatory Quick Picker Grid */
.signer-pill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
@media (max-width: 640px) {
  .signer-pill-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
.signer-pill-btn {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  min-height: 48px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  transition: all 0.16s ease;
  touch-action: manipulation;
}
.signer-pill-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.signer-pill-btn.is-active {
  background: var(--accent-tint);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.signer-pill-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.signer-pill-btn.is-active .signer-pill-name {
  color: var(--accent-text);
}
.signer-pill-title {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.2;
}

/* Responsive Mobile Navigation and App Bar */
@media (max-width: 900px) {
  .appbar {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
    height: auto;
    min-height: auto;
  }
  .appbar > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }
  .software-nav {
    flex: 0 0 auto;
    gap: 4px !important;
  }
  .software-nav .btn {
    padding: 0 8px !important;
    font-size: 11.5px !important;
    min-height: 32px !important;
  }
  .tabs {
    display: flex !important;
    width: 100%;
    order: 3;
    margin-top: 4px;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
  }
  .tab {
    flex: 1 1 50%;
    text-align: center;
    min-height: 42px;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 9px;
  }
  .role-picker {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .role-pill-btn {
    min-height: 52px;
    padding: 10px 8px;
    font-size: 13px;
  }
  .mobile-bar {
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .mobile-bar .btn {
    min-height: 44px;
    font-size: 13.5px;
  }
}

@media (max-width: 480px) {
  .software-badge {
    display: none !important;
  }
  .software-nav button:first-child {
    display: none !important;
  }
  .role-picker {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .conf-pill-grid {
    grid-template-columns: 1fr !important;
  }
}

body[data-tab="edit"] #mobileSwitchPreviewBtn { display: inline-flex !important; }
body[data-tab="edit"] #mobileSwitchEditBtn { display: none !important; }

body[data-tab="preview"] #mobileSwitchPreviewBtn { display: none !important; }
body[data-tab="preview"] #mobileSwitchEditBtn { display: inline-flex !important; }

.badge{ display:inline-block; padding:3px 8px; border-radius:6px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.04em; }
.badge-conf{ background:var(--accent-tint); color:var(--accent-text); border:1px solid var(--accent-ring); }
.badge-type{ background:var(--surface-3); color:var(--text); border:1px solid var(--border); }
.btn-sm{ min-height:32px; padding:0 10px; font-size:12px; }
.software-nav{ display:flex; align-items:center; gap:8px; }
.software-badge{ background:var(--accent-tint); color:var(--accent-text); border:1px solid var(--accent-ring); border-radius:999px; padding:3px 10px; font-size:11px; font-weight:600; }

/* ==================== MOBILE FRIENDLY & OPTION PICKER STYLES ==================== */

/* Prevent iOS Safari auto-zoom on input focus */
@media (max-width: 680px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Stepper Pill Badges */
.step-num-pill {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-text);
  border: 1px solid var(--accent-ring);
  white-space: nowrap;
}

/* Card Header Accordion / Collapse Toggle */
.card-header {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.card-header:hover {
  opacity: 0.92;
}
.card-collapse-icon {
  margin-left: auto;
  color: var(--text-faint);
  transition: transform 0.22s ease;
  display: flex;
  align-items: center;
}
.form-card.is-collapsed .card-collapse-icon {
  transform: rotate(-90deg);
}
.form-card.is-collapsed > *:not(.card-header) {
  display: none !important;
}

/* Sticky Step Jump Navigation Bar */
.form-section-nav {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 14px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.form-section-nav::-webkit-scrollbar { display: none; }
.sec-nav-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
  touch-action: manipulation;
}
.sec-nav-btn:hover {
  color: var(--text);
  background: var(--surface-3);
}
.sec-nav-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.sec-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  font-size: 10.5px;
  font-weight: 800;
}
.sec-nav-btn.active .sec-step {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* Visual Conference Quick Selection Grid */
.conf-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
@media (min-width: 620px) {
  .conf-pill-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.conf-pill-btn {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 10px;
  min-height: 52px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  transition: all 0.16s ease;
  touch-action: manipulation;
}
.conf-pill-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.conf-pill-btn.is-active {
  background: var(--accent-tint);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.conf-pill-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.25;
}
.conf-pill-btn.is-active .conf-pill-title {
  color: var(--accent-text);
}
.conf-pill-sub {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.2;
}

/* Visual Signatory Quick Picker Grid */
.signer-pill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
@media (max-width: 640px) {
  .signer-pill-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
.signer-pill-btn {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  min-height: 48px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  transition: all 0.16s ease;
  touch-action: manipulation;
}
.signer-pill-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.signer-pill-btn.is-active {
  background: var(--accent-tint);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.signer-pill-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.signer-pill-btn.is-active .signer-pill-name {
  color: var(--accent-text);
}
.signer-pill-title {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.2;
}

/* Responsive Mobile Navigation and App Bar */
@media (max-width: 900px) {
  .appbar {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
    height: auto;
    min-height: auto;
  }
  .appbar > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }
  .software-nav {
    flex: 0 0 auto;
    gap: 4px !important;
  }
  .software-nav .btn {
    padding: 0 8px !important;
    font-size: 11.5px !important;
    min-height: 32px !important;
  }
  .tabs {
    display: flex !important;
    width: 100%;
    order: 3;
    margin-top: 4px;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
  }
  .tab {
    flex: 1 1 50%;
    text-align: center;
    min-height: 42px;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 9px;
  }
  .role-picker {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .role-pill-btn {
    min-height: 52px;
    padding: 10px 8px;
    font-size: 13px;
  }
  .mobile-bar {
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .mobile-bar .btn {
    min-height: 44px;
    font-size: 13.5px;
  }
}

@media (max-width: 480px) {
  .software-badge {
    display: none !important;
  }
  .software-nav button:first-child {
    display: none !important;
  }
  .role-picker {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .conf-pill-grid {
    grid-template-columns: 1fr !important;
  }
}

body[data-tab="edit"] #mobileSwitchPreviewBtn { display: inline-flex !important; }
body[data-tab="edit"] #mobileSwitchEditBtn { display: none !important; }

body[data-tab="preview"] #mobileSwitchPreviewBtn { display: none !important; }
body[data-tab="preview"] #mobileSwitchEditBtn { display: inline-flex !important; }


/* ==========================================================================
   WORDPRESS ADMIN & FULLSCREEN STUDIO INTEGRATION FIXES
   ========================================================================== */
#wpcontent {
    padding-left: 0 !important;
}
.jbrsc-wp-wrap {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}
.jbrsc-wp-wrap *, .jbrsc-wp-wrap *::before, .jbrsc-wp-wrap *::after {
    box-sizing: border-box;
}
/* When fullscreen mode is active in WP Admin */
body.jbrsc-fullscreen #adminmenumain,
body.jbrsc-fullscreen #wpadminbar,
body.jbrsc-fullscreen #wpfooter {
    display: none !important;
}
body.jbrsc-fullscreen #wpcontent,
body.jbrsc-fullscreen #wpbody-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
}
/* Ensure letter canvas prints crisp inside WordPress */
@media print {
    #adminmenumain, #wpadminbar, #wpfooter, #portalNavBar, .workspace-nav-bar, .studio-action-bar {
        display: none !important;
    }
    #wpcontent, #wpbody-content, .jbrsc-wp-wrap {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }
}
