/*
  UNIQR UX v3
  Isolated polish layer for the 3dQR3 workspace. Keep structural behavior in PHP/JS,
  and use this file to tighten spacing, navigation, onboarding, forms, and help UI.
*/

:root{
  --ux-bg:#f5f8fc;
  --ux-panel:#ffffff;
  --ux-panel-soft:#f8fbff;
  --ux-ink:#061b3a;
  --ux-muted:#5f6f86;
  --ux-line:#d7e1ef;
  --ux-line-strong:#b9c9df;
  --ux-blue:#3867f4;
  --ux-blue-2:#1d8bd8;
  --ux-green:#18a058;
  --ux-yellow:#fff4c7;
  --ux-shadow:0 18px 45px rgba(15,35,70,.10);
  --ux-shadow-soft:0 8px 28px rgba(15,35,70,.08);
  --ux-radius:22px;
}

body{
  background:
    radial-gradient(circle at 14% 0%, rgba(56,103,244,.08), transparent 30rem),
    linear-gradient(180deg,#f9fbff 0%,var(--ux-bg) 48%,#f7f9fd 100%);
  color:var(--ux-ink);
}

.page-shell{
  padding-top:28px;
  padding-bottom:72px;
}

.site-header{
  position:sticky;
  top:0;
  z-index:60;
  border-bottom:1px solid rgba(195,210,231,.82);
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(18px);
}

.site-header .nav{
  min-height:70px;
}

.brand-wrap{
  gap:12px;
}

.brand{
  letter-spacing:-.03em;
}

.nav-links{
  gap:8px;
}

.nav-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:0 13px;
  border-radius:999px;
  color:#183454;
  font-weight:750;
}

.nav-link i{
  color:#7b8ca5;
  font-size:.9rem;
}

.nav-link:hover,
.nav-link.active,
.nav-more[open] > .nav-more-trigger{
  background:#eef4ff;
  color:#2459eb;
  text-decoration:none;
}

.nav-link.active i,
.nav-more[open] > .nav-more-trigger i{
  color:#2459eb;
}

.nav-workspace{
  position:relative;
}

.nav-workspace-menu{
  width:min(760px,calc(100vw - 32px));
  min-width:680px;
  padding:14px;
  border:1px solid var(--ux-line);
  border-radius:24px;
  box-shadow:var(--ux-shadow);
}

.nav-workspace-card{
  display:grid;
  gap:2px;
  padding:12px 13px;
  margin-bottom:6px;
  border:1px solid #dce7f7;
  border-radius:14px;
  background:linear-gradient(135deg,#f8fbff,#eef5ff);
}

.nav-workspace-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.nav-workspace-column{
  display:grid;
  align-content:start;
  gap:6px;
}

.nav-mega-heading{
  display:block;
  padding:2px 10px 4px;
  color:#5e718c;
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.nav-workspace-card strong{
  font-size:.94rem;
}

.nav-workspace-card small{
  color:var(--ux-muted);
}

.nav-more-link{
  min-height:40px;
  border-radius:12px;
  font-weight:720;
}

.nav-workspace-menu .nav-more-link{
  min-height:42px;
  padding:9px 10px;
}

.nav-more-separator{
  display:block;
  height:1px;
  margin:8px 0;
  background:var(--ux-line);
}

.nav-icon-btn{
  width:40px;
  height:40px;
}

.card,
.stat-card,
.project-card,
.support-ticket-card,
.ops-ticket-card{
  border-color:var(--ux-line);
  box-shadow:var(--ux-shadow-soft);
}

.dashboard-hero{
  display:grid;
  grid-template-columns:minmax(0,720px) minmax(280px,340px);
  justify-content:space-between;
  gap:24px;
  align-items:start;
  padding:22px;
  border-radius:28px;
  background:
    radial-gradient(circle at 92% 0%, rgba(56,103,244,.16), transparent 28rem),
    linear-gradient(135deg,#ffffff,#f3f8ff);
}

.dashboard-hero > div:first-child{
  display:grid;
  gap:10px;
  min-width:0;
}

.dashboard-hero h1{
  margin:10px 0 0;
  letter-spacing:-.04em;
}

.dashboard-hero > div:first-child > p{
  margin:0;
}

.dashboard-hero .hero-actions{
  align-items:center;
}

.dashboard-plan-strip{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  max-width:520px;
  padding:12px 14px;
  border-radius:18px;
  background:rgba(255,255,255,.72);
  border:1px solid #cfe0f5;
  box-shadow:0 12px 28px rgba(16,42,76,.06);
}

.dashboard-plan-strip strong{
  display:block;
  margin:2px 0 4px;
  font-size:.98rem;
}

.dashboard-plan-strip p{
  max-width:48ch;
  margin:0;
  font-size:.78rem;
  line-height:1.38;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.dashboard-plan-actions{
  justify-content:end;
}

.dashboard-quick-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(150px,1fr));
  align-items:stretch;
  width:min(560px,100%);
}

.dashboard-quick-actions .btn{
  width:100%;
  min-height:48px;
  justify-content:center;
}

.recent-qr-panel{
  margin-top:18px;
  margin-bottom:20px;
  padding:14px;
  border:1px solid #cfe0f5;
  overflow:visible;
  background:linear-gradient(180deg,#fbfdff,#eef5ff);
  color:var(--ux-ink);
  box-shadow:0 18px 48px rgba(13,42,96,.12);
}

.recent-qr-form{
  margin:0;
}

.recent-qr-shell{
  overflow:visible;
  padding:18px;
  border-radius:24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(92,132,255,.32), transparent 32%),
    linear-gradient(135deg,#07152d 0%,#132b5f 48%,#3867f4 100%);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}

.recent-qr-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}

.recent-qr-head h2{
  margin:4px 0 3px;
  color:#fff;
  letter-spacing:-.035em;
}

.recent-qr-head .eyebrow,
.recent-qr-head .muted{
  color:rgba(255,255,255,.76);
}

.recent-qr-head .eyebrow{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 16px;
  border:1px solid rgba(255,255,255,.24);
  border-radius:999px;
  background:#ffffff;
  color:#163463;
  box-shadow:0 10px 26px rgba(3,12,28,.18);
}

.recent-qr-head .project-count-chip{
  border-color:rgba(255,255,255,.2);
  background:rgba(255,255,255,.13);
  color:#fff;
  white-space:nowrap;
}

.recent-qr-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}

.recent-qr-toolbar{
  display:grid;
  grid-template-columns:minmax(130px,.8fr) minmax(130px,.75fr) minmax(140px,.8fr) minmax(180px,1fr) auto;
  gap:10px;
  align-items:center;
  margin-bottom:14px;
  padding:10px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:18px;
  background:rgba(255,255,255,.94);
  box-shadow:0 16px 32px rgba(3,12,28,.16);
}

.recent-qr-toolbar label{
  margin:0;
}

.recent-qr-toolbar select,
.recent-qr-toolbar input{
  width:100%;
  min-height:42px;
  border-radius:13px;
  background:#fff;
  font-size:.86rem;
}

.recent-qr-search{
  position:relative;
}

.recent-qr-search i{
  position:absolute;
  left:14px;
  top:50%;
  color:#7c8da8;
  transform:translateY(-50%);
  pointer-events:none;
}

.recent-qr-search input{
  padding-left:38px;
}

.recent-qr-select-toggle{
  min-height:42px;
  white-space:nowrap;
}

.recent-qr-selection-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
  padding:10px 12px;
  border:1px solid #cfe0f5;
  border-radius:16px;
  background:#f4f8ff;
  color:#163463;
}

.recent-qr-selection-bar[hidden]{
  display:none;
}

.recent-qr-selection-bar > div{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
}

.recent-qr-card{
  position:relative;
  display:grid;
  align-content:start;
  gap:9px;
  min-width:0;
  padding:10px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:18px;
  background:rgba(255,255,255,.94);
  color:var(--ux-ink);
  box-shadow:0 16px 34px rgba(3,12,28,.18);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
  overflow:visible;
}

.recent-qr-card:hover{
  transform:translateY(-2px);
  background:#fff;
  box-shadow:0 22px 42px rgba(3,12,28,.25);
}

.recent-qr-card:has(.recent-qr-download-menu[open]),
.recent-qr-card.is-download-open{
  z-index:40;
}

.recent-qr-card.is-hidden{
  display:none;
}

.recent-qr-card.is-filtered-out{
  display:none;
}

.recent-qr-select-check{
  position:absolute;
  z-index:2;
  top:10px;
  left:10px;
  display:none;
  margin:0;
  cursor:pointer;
}

.recent-qr-panel.is-selecting .recent-qr-select-check{
  display:block;
}

.recent-qr-select-check input{
  position:absolute;
  opacity:0;
}

.recent-qr-select-check span{
  display:block;
  width:25px;
  height:25px;
  border:2px solid #cbd8ec;
  border-radius:999px;
  background:#fff;
  box-shadow:0 8px 18px rgba(3,12,28,.14);
}

.recent-qr-select-check input:checked + span{
  border-color:#3867f4;
  background:#3867f4;
  box-shadow:0 0 0 4px rgba(56,103,244,.16),0 8px 18px rgba(3,12,28,.14);
}

.recent-qr-select-check input:checked + span::after{
  content:"";
  display:block;
  width:7px;
  height:12px;
  margin:3px 0 0 8px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}

.recent-qr-thumb{
  position:relative;
  display:grid;
  place-items:center;
  align-self:start;
  aspect-ratio:1;
  min-height:0;
  padding:12px;
  border-radius:14px;
  background:
    linear-gradient(180deg,rgba(236,242,255,.85),rgba(255,255,255,.92)),
    repeating-linear-gradient(135deg,rgba(56,103,244,.08) 0 5px,transparent 5px 10px);
  overflow:hidden;
}

.recent-qr-mini{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  display:grid;
  place-items:center;
}

.recent-qr-mini.template-preview{
  min-width:0 !important;
  min-height:0 !important;
  max-width:100% !important;
  max-height:100% !important;
}

.recent-qr-mini canvas,
.recent-qr-mini svg{
  width:100% !important;
  height:100% !important;
  display:block;
}

.recent-qr-copy{
  display:grid;
  gap:2px;
  min-width:0;
}

.recent-qr-copy strong,
.recent-qr-copy span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.recent-qr-copy strong{
  font-size:.86rem;
  line-height:1.2;
}

.recent-qr-copy span{
  color:var(--ux-muted);
  font-size:.74rem;
}

.recent-qr-meta{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:4px;
}

.recent-qr-meta small{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 7px;
  border-radius:999px;
  background:#eef4ff;
  color:#526984;
  font-size:.68rem;
  font-weight:800;
  line-height:1;
}

.recent-qr-mode-badge{
  position:absolute;
  right:8px;
  bottom:8px;
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  background:#e9f7ef;
  color:#08763d;
  font-size:.68rem;
  font-weight:900;
  box-shadow:0 7px 16px rgba(3,12,28,.13);
}

.recent-qr-mode-badge.static{
  background:#eef4ff;
  color:#1d4ed8;
}

.recent-qr-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
}

.recent-qr-action{
  display:grid;
  place-items:center;
  min-height:32px;
  border:1px solid #d4e0f2;
  border-radius:11px;
  background:#f6f9ff;
  color:#163463;
  text-decoration:none;
  cursor:pointer;
}

.recent-qr-action:hover{
  border-color:#3867f4;
  background:#eaf0ff;
  color:#1f56e5;
}

.recent-qr-action.danger{
  color:#ba2f37;
}

.recent-qr-action.danger:hover{
  border-color:#ffc6ca;
  background:#fff1f2;
}

.recent-qr-action.is-locked{
  color:#8a6a08;
}

.recent-qr-download-menu{
  position:relative;
  z-index:10;
}

.recent-qr-download-menu[open]{
  z-index:60;
}

.recent-qr-download-menu summary{
  list-style:none;
}

.recent-qr-download-menu summary::-webkit-details-marker{
  display:none;
}

.recent-qr-download-popover{
  position:absolute;
  z-index:999;
  left:0;
  top:calc(100% + 8px);
  min-width:154px;
  padding:7px;
  border:1px solid #d4e0f2;
  border-radius:13px;
  background:#fff;
  box-shadow:0 18px 38px rgba(3,12,28,.2);
}

.recent-qr-download-popover button,
.recent-qr-download-popover a{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  padding:9px 10px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#163463;
  text-align:left;
  text-decoration:none;
  font-weight:800;
  font-size:.82rem;
  cursor:pointer;
}

.recent-qr-download-popover button:hover,
.recent-qr-download-popover a:hover{
  background:#eef4ff;
}

.recent-qr-page-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-top:16px;
  color:rgba(255,255,255,.82);
}

.recent-qr-page-row .btn{
  border-color:rgba(255,255,255,.44);
  background:rgba(255,255,255,.12);
  color:#fff;
}

.recent-qr-page-row .btn:hover:not(:disabled){
  background:#fff;
  color:#1d3f85;
}

.recent-qr-page-row .btn:disabled{
  opacity:.46;
  cursor:not-allowed;
}

.recent-qr-empty{
  margin:14px 0 0;
  padding:14px;
  border:1px solid rgba(255,255,255,.25);
  border-radius:16px;
  background:rgba(255,255,255,.1);
  color:#fff;
  text-align:center;
}

@media (max-width:1280px){
  .recent-qr-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

.dashboard-filters{
  display:grid;
  grid-template-columns:minmax(240px,1fr) minmax(180px,240px) minmax(110px,140px) auto;
  gap:12px;
  align-items:end;
  width:100%;
}

.dashboard-user-filter{
  grid-template-columns:minmax(220px,.9fr) minmax(280px,1.1fr) auto;
}

.dashboard-filters label{
  min-width:0;
}

.dashboard-filters .filter-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(92px,auto));
  gap:10px;
  align-items:end;
}

.dashboard-filters .filter-actions .btn{
  min-height:50px;
  justify-content:center;
}

.dashboard-user-filter .filter-actions{
  grid-template-columns:repeat(2,minmax(88px,1fr));
}

.dashboard-stats{
  gap:14px;
}

.dashboard-stats .stat-card{
  min-height:112px;
  border-radius:20px;
  background:linear-gradient(180deg,#fff,#f8fbff);
}

.dashboard-stats .stat-num{
  letter-spacing:-.05em;
}

.analytics-panel,
.projects-panel{
  border-radius:24px;
  overflow:hidden;
}

.projects-accordion-summary{
  padding:20px;
  border-radius:20px;
}

.projects-accordion[open] > .projects-accordion-summary,
.analytics-accordion[open] > .projects-accordion-summary{
  background:#f5f8ff;
}

.project-count-chip,
.status-pill,
.ops-pill{
  border-radius:999px;
}

.project-create-polished,
.project-create-inline{
  border-radius:20px;
  background:var(--ux-panel-soft);
}

.project-card-modern{
  border-radius:20px;
}

.qr-builder-card{
  max-width:1280px;
  margin-inline:auto;
  border-radius:30px;
  background:linear-gradient(135deg,#ffffff,#f7fbff);
}

.qr-builder-header{
  align-items:flex-start;
  gap:16px;
}

.qr-builder-layout{
  gap:20px;
}

.preview-rail{
  position:sticky;
  top:92px;
  align-self:start;
}

.preview-card{
  border-radius:26px;
}

.preview-actions{
  gap:10px;
}

.builder-progress-card,
.builder-section,
.design-box,
.control-card,
.hint-card{
  border-color:var(--ux-line);
  border-radius:20px;
}

.builder-progress-steps{
  gap:8px;
}

.builder-progress-step{
  border-radius:14px;
}

.builder-section-summary{
  padding:20px;
}

.builder-section-body{
  padding:0 20px 22px;
}

.tab-row{
  gap:8px;
  flex-wrap:wrap;
}

.tab-btn{
  border-radius:999px;
  min-height:40px;
  padding:0 14px;
}

.short-link-card{
  background:linear-gradient(135deg,#f8fbff,#eef5ff);
}

.qr-advanced-panel{
  background:#fbfdff;
}

.support-page-card,
.support-ticket-section{
  max-width:1120px;
  border-radius:28px;
}

.support-layout-modern{
  gap:18px;
}

.support-compose-card,
.support-side-card-modern{
  border-radius:22px;
}

.ux-help-widget{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:80;
  display:grid;
  justify-items:end;
  gap:12px;
  pointer-events:none;
}

.ux-help-widget > *{
  pointer-events:auto;
}

.ux-help-toggle{
  display:grid;
  place-items:center;
  width:60px;
  height:60px;
  border:0;
  border-radius:22px;
  background:linear-gradient(135deg,#4b74f7,#2563eb);
  color:#fff;
  box-shadow:0 18px 35px rgba(37,99,235,.32);
  cursor:pointer;
  font-size:1.25rem;
}

.ux-help-toggle:hover,
.ux-help-toggle:focus{
  transform:translateY(-1px);
  outline:none;
  box-shadow:0 20px 40px rgba(37,99,235,.38);
}

.ux-help-panel{
  width:min(370px,calc(100vw - 32px));
  padding:14px;
  border:1px solid var(--ux-line);
  border-radius:24px;
  background:#fff;
  box-shadow:0 24px 70px rgba(9,26,58,.20);
}

.ux-help-head{
  margin:-14px -14px 12px;
  padding:22px;
  border-radius:24px 24px 12px 12px;
  background:linear-gradient(135deg,#3867f4,#6f91ff);
  color:#fff;
}

.ux-help-head strong,
.ux-help-head span{
  display:block;
}

.ux-help-head span{
  margin-top:4px;
  opacity:.86;
}

.ux-help-option{
  display:grid;
  grid-template-columns:48px 1fr;
  gap:12px;
  align-items:center;
  padding:14px;
  border:1px solid #e2e9f5;
  border-radius:16px;
  color:var(--ux-ink);
  text-decoration:none;
}

.ux-help-option + .ux-help-option{
  margin-top:10px;
}

.ux-help-option:hover,
.ux-help-option:focus{
  border-color:#b8cbff;
  background:#f7faff;
  text-decoration:none;
}

.ux-help-icon{
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border-radius:17px;
  background:#eef4ff;
  color:#3867f4;
  font-size:1.1rem;
}

.ux-help-option strong,
.ux-help-option small{
  display:block;
}

.ux-help-option small{
  margin-top:3px;
  color:var(--ux-muted);
}

.ux-page-head{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  margin-bottom:22px;
}

.ux-page-head h1{
  margin:0;
  letter-spacing:-.04em;
}

.ux-page-head p{
  margin:6px 0 0;
  color:var(--ux-muted);
}

.ux-tabs{
  display:flex;
  justify-content:center;
  gap:18px;
  margin:0 auto 28px;
  flex-wrap:wrap;
}

.ux-tab{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:46px;
  padding:0 18px;
  border:1px solid transparent;
  border-radius:999px;
  color:#203a5d;
  font-weight:800;
  text-decoration:none;
}

.ux-tab:hover,
.ux-tab.active{
  border-color:#d8deea;
  background:#fff;
  box-shadow:0 2px 0 #e2e7f0;
  text-decoration:none;
}

.ux-shortlink-shell{
  max-width:1120px;
  margin-inline:auto;
}

.ux-shortlink-card{
  border-radius:28px;
  background:linear-gradient(135deg,#f2f6ff,#ffffff 44%,#eef4ff);
}

.ux-shortlink-card .tab-row{
  border-bottom:1px solid var(--ux-line);
  padding-bottom:8px;
  margin-bottom:16px;
}

.ux-domain-row{
  display:grid;
  grid-template-columns:minmax(160px,220px) auto minmax(160px,1fr);
  gap:10px;
  align-items:end;
}

.ux-warning{
  display:grid;
  grid-template-columns:34px 1fr;
  gap:12px;
  margin-top:16px;
  padding:16px;
  border:1px solid #f0b83c;
  border-radius:16px;
  background:#fff9e8;
  color:#743b00;
}

.ux-warning i{
  color:#e69a00;
  font-size:1.2rem;
}

.ux-shortlink-create{
  display:grid;
  gap:16px;
}

.ux-shortlink-list-card{
  margin-top:22px;
  border-radius:28px;
}

.ux-list-head{
  align-items:flex-start;
  gap:16px;
  margin-bottom:16px;
}

.ux-list-head h2{
  margin:0;
}

.ux-list-head p{
  margin:4px 0 0;
}

.ux-shortlink-filters{
  margin-bottom:18px;
}

.ux-shortlink-table-wrap{
  border:1px solid var(--ux-line);
  border-radius:18px;
  overflow:auto;
  background:#fff;
}

.ux-shortlink-table{
  min-width:880px;
}

.ux-short-url{
  display:block;
  margin-top:4px;
  color:#2459eb;
  font-size:.9rem;
  font-weight:750;
  overflow-wrap:anywhere;
}

.ux-row-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.ux-row-actions form{
  margin:0;
}

.ux-pagination{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
  margin-top:16px;
}

.ux-slash{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  color:var(--ux-muted);
  font-weight:900;
}

.ux-form-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
  gap:18px;
}

.ux-form-card{
  overflow:hidden;
  border:1px solid var(--ux-line);
  border-radius:20px;
  background:#fff;
  box-shadow:var(--ux-shadow-soft);
}

.ux-form-card-art{
  position:relative;
  display:grid;
  place-items:center;
  min-height:190px;
  background:linear-gradient(135deg,#eef4ff,#ecfdf5);
}

.ux-form-paper{
  width:92px;
  height:132px;
  padding:18px 14px;
  border-radius:12px;
  background:#fff;
  box-shadow:0 12px 28px rgba(10,32,60,.12);
}

.ux-form-paper span{
  display:block;
  height:10px;
  margin-bottom:10px;
  border-radius:999px;
  background:#dbe4f0;
}

.ux-form-paper span:first-child{
  width:64%;
  margin-inline:auto;
}

.ux-form-paper span:last-child{
  width:42%;
  background:#202020;
}

.ux-draft-chip,
.ux-beta-chip{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 11px;
  border-radius:999px;
  background:#fff2b8;
  color:#7c5400;
  font-size:.8rem;
  font-weight:850;
}

.ux-beta-chip{
  background:#dffbea;
  color:#08763d;
}

.ux-form-card .ux-draft-chip{
  position:absolute;
  top:12px;
  right:12px;
}

.ux-form-card-body{
  display:grid;
  gap:12px;
  padding:16px;
}

.ux-form-card-body strong{
  font-size:1.05rem;
}

.ux-form-builder{
  max-width:1180px;
  margin-inline:auto;
}

.ux-builder-topbar{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  margin-bottom:24px;
}

.ux-builder-title{
  display:flex;
  gap:14px;
  align-items:center;
}

.ux-back-link{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:999px;
  color:#6f7d92;
  text-decoration:none;
}

.ux-back-link:hover{
  background:#eef4ff;
  color:#2459eb;
}

.ux-builder-tabs{
  display:flex;
  gap:4px;
  border-bottom:1px solid var(--ux-line);
  margin-bottom:28px;
}

.ux-builder-tabs a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:14px 18px;
  border-bottom:2px solid transparent;
  color:#3b4f6d;
  font-weight:800;
  text-decoration:none;
}

.ux-builder-tabs a.active{
  color:#2459eb;
  border-color:#2459eb;
}

.ux-builder-canvas{
  max-width:760px;
  margin-inline:auto;
}

.ux-form-preview-card,
.ux-empty-fields,
.ux-form-settings-card{
  border:1px solid var(--ux-line);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--ux-shadow-soft);
}

.ux-form-preview-card{
  padding:24px;
  margin-bottom:20px;
}

.ux-form-preview-card h2{
  margin:0;
}

.ux-form-preview-card p{
  margin:8px 0 0;
  color:var(--ux-muted);
}

.ux-empty-fields{
  display:grid;
  place-items:center;
  min-height:280px;
  border-style:dashed;
  text-align:center;
}

.ux-empty-fields i{
  display:grid;
  place-items:center;
  width:56px;
  height:56px;
  margin:0 auto 14px;
  border-radius:16px;
  background:#eef2f7;
  color:#7c8da3;
}

.ux-form-build-toolbar{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
  margin-bottom:14px;
  padding:14px;
  border:1px solid #dce7f7;
  border-radius:18px;
  background:linear-gradient(135deg,#f8fbff,#eef5ff);
  box-shadow:var(--ux-shadow-soft);
}

.ux-form-build-toolbar p{
  margin:4px 0 0;
}

.ux-field-list{
  display:grid;
  gap:12px;
}

.ux-field-list.is-drag-over{
  outline:2px dashed rgba(56,103,244,.32);
  outline-offset:8px;
  border-radius:20px;
}

.ux-field-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px;
  border:1px solid var(--ux-line);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--ux-shadow-soft);
}

.ux-field-row small{
  display:block;
  color:var(--ux-muted);
}

.ux-form-link-card{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
  max-width:960px;
  margin:0 auto 22px;
  border-radius:20px;
  background:linear-gradient(135deg,#f8fbff,#eef5ff);
}

.ux-form-link-card p{
  margin:6px 0 0;
}

.ux-field-editor{
  border:1px solid var(--ux-line);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--ux-shadow-soft);
  overflow:hidden;
  transition:transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.ux-field-editor.is-dragging{
  opacity:.58;
  transform:scale(.985);
  box-shadow:0 18px 48px rgba(16,42,76,.18);
}

.ux-field-editor-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  padding:13px 14px;
  background:#fbfdff;
}

.ux-field-drag-handle{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border:1px solid #d7e3f4;
  border-radius:13px;
  background:#fff;
  color:#7c8da3;
  cursor:grab;
  flex:0 0 auto;
}

.ux-field-drag-handle:active{
  cursor:grabbing;
}

.ux-field-drag-handle:hover{
  border-color:#9db8ff;
  color:#2459eb;
  background:#eef4ff;
}

.ux-field-editor-head small,
.ux-field-editor summary{
  color:var(--ux-muted);
}

.ux-field-editor-head form{
  margin:0;
}

.ux-field-editor details{
  border-top:1px solid var(--ux-line);
}

.ux-field-settings-panel:not([open]){
  border-top:0;
}

.ux-field-settings-panel:not([open]) summary{
  border-top:1px solid var(--ux-line);
  background:#fbfdff;
}

.ux-field-editor summary{
  padding:11px 14px;
  cursor:pointer;
  font-weight:850;
}

.ux-field-editor summary:hover{
  color:#2459eb;
  background:#f3f7ff;
}

.ux-field-settings-form{
  display:grid;
  gap:14px;
  padding:0 14px 14px;
}

.ux-field-settings-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.ux-field-settings-grid .span-2{
  grid-column:1 / -1;
}

.ux-condition-box{
  border:1px solid #dce7f7 !important;
  border-radius:16px;
  background:#f8fbff;
  overflow:hidden;
}

.ux-condition-box summary{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:12px 14px !important;
  color:#102a4c !important;
}

.ux-condition-box summary span{
  color:var(--ux-muted);
  font-size:.82rem;
  font-weight:700;
}

.ux-condition-box > .checkbox-row,
.ux-condition-box > .ux-field-settings-grid{
  margin:0 14px 12px;
}

.ux-response-line + .ux-response-line{
  margin-top:6px;
}

.ux-form-visual-builder{
  display:grid;
  grid-template-columns:minmax(240px,.8fr) minmax(280px,1fr);
  gap:16px;
  align-items:stretch;
}

.ux-form-mini-preview{
  padding:16px;
  border:1px solid #dce7f7;
  border-radius:20px;
  background:
    radial-gradient(circle at 20% 0%, rgba(56,103,244,.10), transparent 14rem),
    #f7fbff;
}

.ux-form-mini-card{
  display:grid;
  gap:10px;
  min-height:100%;
  padding:18px;
  border:1px solid #dce7f7;
  border-radius:18px;
  background:var(--form-bg,#fff);
  color:var(--form-text,#222);
  box-shadow:0 14px 34px rgba(16,42,76,.08);
}

.ux-form-mini-logo{
  width:82px;
  max-height:52px;
  object-fit:contain;
  margin:0 auto 4px;
}

.ux-form-mini-card > strong{
  font-size:1.2rem;
  letter-spacing:-.04em;
}

.ux-form-mini-card > span{
  color:color-mix(in srgb,var(--form-text,#222) 66%,#6b7a90);
  font-size:.88rem;
}

.ux-form-mini-card label{
  display:grid;
  gap:6px;
  font-weight:800;
}

.ux-form-mini-card input{
  min-height:42px;
  border:1px solid #bfd0e6;
  border-radius:14px;
  padding:0 12px;
  background:#fff;
}

.ux-form-mini-card button{
  min-height:44px;
  border:0;
  border-radius:14px;
  background:var(--form-button,#222);
  color:var(--form-button-text,#fff);
  font-weight:900;
}

.ux-form-css-editor{
  display:grid;
  gap:8px;
  margin:0;
}

.ux-form-css-editor textarea{
  min-height:238px;
  font-family:"SFMono-Regular",Consolas,monospace;
  font-size:.88rem;
  line-height:1.5;
  resize:vertical;
}

.range-with-value{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
}

.range-with-value strong{
  min-width:64px;
  padding:8px 10px;
  border-radius:999px;
  background:#eef4ff;
  color:#2459eb;
  text-align:center;
  font-size:.9rem;
}

.public-form-shell{
  max-width:820px;
  margin:30px auto;
  padding:0 18px;
  color:var(--form-text,#222);
}

.public-form-body{
  min-height:100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(56,103,244,.10), transparent 26rem),
    linear-gradient(180deg,#f7fbff,#edf4fb);
}

.public-form-card{
  padding:clamp(22px,4vw,42px);
  border:1px solid var(--ux-line);
  border-radius:28px;
  background:var(--form-bg,#fff);
  box-shadow:var(--ux-shadow);
}

.public-form-logo{
  display:block;
  width:min(140px,44vw);
  max-height:84px;
  object-fit:contain;
  margin:0 auto 18px;
}

.public-form-head h1,
.public-form-thanks h1{
  margin-top:0;
  letter-spacing:-.04em;
}

.public-form-head p{
  color:color-mix(in srgb,var(--form-text,#222) 72%,#6b7a90);
}

.public-form-head.has-header-image{
  position:relative;
  margin:calc(clamp(22px,4vw,42px) * -1) calc(clamp(22px,4vw,42px) * -1) 26px;
  min-height:var(--form-header-height,280px);
  padding:28px clamp(22px,4vw,42px);
  border-radius:28px 28px 18px 18px;
  overflow:hidden;
  background-image:linear-gradient(120deg,rgba(4,16,35,.70),rgba(4,16,35,.24)),var(--form-header-image);
  background-size:cover;
  background-position:center top;
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}

.public-form-head.has-header-image .public-form-logo,
.public-form-head.has-header-image h1,
.public-form-head.has-header-image p{
  position:relative;
  z-index:1;
}

.public-form-head.has-header-image p{
  color:rgba(255,255,255,.88);
}

.public-form-head.has-header-image .public-form-logo{
  width:min(150px,42vw);
  max-height:76px;
  margin:0 auto auto;
  filter:drop-shadow(0 10px 22px rgba(0,0,0,.28));
}

.public-form-head.has-header-image h1{
  margin-bottom:6px;
  text-shadow:0 2px 18px rgba(0,0,0,.34);
}

.public-form{
  display:grid;
  gap:18px;
}

.public-form-progress{
  height:8px;
  border-radius:999px;
  background:#e5edf8;
  overflow:hidden;
}

.public-form-progress span{
  display:block;
  height:100%;
  border-radius:inherit;
  background:var(--form-button,#222);
}

.public-form-field{
  display:grid;
  gap:7px;
}

.captcha-field{
  display:grid;
  gap:8px;
}

.captcha-label{
  font-weight:850;
}

.public-form-field label{
  font-weight:850;
}

.public-form-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.public-form-field textarea,
.public-form-field select{
  width:100%;
  border:1px solid var(--ux-line-strong);
  border-radius:14px;
  padding:12px 14px;
  background:#fff;
  color:#061b3a;
}

.public-choice-list{
  display:grid;
  gap:9px;
}

.public-choice-list label{
  display:flex;
  align-items:flex-start;
  gap:9px;
  padding:12px;
  border:1px solid var(--ux-line);
  border-radius:14px;
  background:rgba(255,255,255,.72);
}

.public-form-page-break{
  margin:8px 0;
  padding:18px 0 0;
  border-top:1px solid var(--ux-line);
}

.field-error{
  color:#dc2626;
  font-size:.9rem;
}

.public-form-submit{
  min-height:48px;
  border:0;
  border-radius:14px;
  background:var(--form-button,#222);
  color:var(--form-button-text,#fff);
  font-weight:900;
  cursor:pointer;
}

.public-form-branding{
  margin:18px 0 0;
  text-align:center;
  color:var(--ux-muted);
  font-size:.85rem;
}

.ux-form-settings-card{
  max-width:720px;
  margin-inline:auto;
  overflow:hidden;
}

.ux-form-settings-section{
  padding:24px;
  border-top:1px solid var(--ux-line);
}

.ux-form-settings-section:first-child{
  border-top:0;
}

.ux-form-logo-current{
  display:grid;
  grid-template-columns:86px 1fr;
  gap:14px;
  align-items:center;
  margin-bottom:14px;
  padding:14px;
  border:1px solid var(--ux-line);
  border-radius:16px;
  background:#fbfdff;
}

.ux-form-header-image-current{
  min-height:150px;
  display:flex;
  align-items:flex-end;
  margin-bottom:14px;
  padding:18px;
  border:1px solid var(--ux-line);
  border-radius:20px;
  background-size:cover;
  background-position:center;
  overflow:hidden;
  box-shadow:inset 0 -70px 90px rgba(2,12,28,.45);
}

.ux-form-header-image-current span{
  color:#fff;
  font-weight:900;
  text-shadow:0 2px 14px rgba(0,0,0,.35);
}

.ux-condition-box{
  border:1px dashed var(--ux-line-strong);
  border-radius:16px;
  padding:14px;
  background:#f8fbff;
}

.ux-embed-code-label{
  display:grid;
  gap:8px;
  margin-top:12px;
  font-size:.9rem;
  font-weight:850;
}

.ux-embed-code-label textarea{
  width:100%;
  border:1px solid var(--ux-line);
  border-radius:14px;
  padding:12px;
  resize:vertical;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.82rem;
  color:#193252;
  background:#f8fbff;
}

.ux-form-logo-current img{
  width:76px;
  height:76px;
  object-fit:contain;
  border:1px solid var(--ux-line);
  border-radius:18px;
  background:#fff;
  padding:8px;
}

.ux-brand-color-tools{
  margin-top:18px;
  padding:14px;
  border:1px solid var(--ux-line);
  border-radius:16px;
  background:#fbfdff;
}

.ux-brand-color-tools p{
  margin:4px 0 12px;
}

.ux-brand-color-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(156px,1fr));
  gap:10px;
}

.ux-brand-color-swatch{
  display:grid;
  grid-template-columns:repeat(3,30px) 1fr;
  gap:6px;
  align-items:center;
  padding:8px;
  border:1px solid var(--ux-line);
  border-radius:14px;
  background:#fff;
}

.ux-brand-color-swatch button{
  width:30px;
  height:30px;
  border:2px solid #fff;
  border-radius:999px;
  background:var(--swatch);
  box-shadow:0 0 0 1px var(--ux-line-strong);
  cursor:pointer;
}

.ux-brand-color-swatch small{
  min-width:0;
  overflow:hidden;
  color:var(--ux-muted);
  font-weight:800;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ux-color-pair{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.ux-save-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:18px;
  padding:14px 16px;
  border:1px solid #bbefcf;
  border-radius:16px;
  background:#eefff4;
  color:#08763d;
}

.ux-modal{
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(10,20,35,.42);
}

.ux-modal[hidden]{
  display:none;
}

.ux-modal-card{
  width:min(620px,100%);
  max-height:min(720px,calc(100vh - 48px));
  overflow:auto;
  border-radius:22px;
  background:#fff;
  box-shadow:0 30px 90px rgba(0,0,0,.24);
}

.ux-modal-head{
  position:sticky;
  top:0;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 22px;
  border-bottom:1px solid var(--ux-line);
  background:#fff;
}

.ux-modal-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  padding:22px;
}

.ux-field-type{
  display:grid;
  gap:5px;
  min-height:78px;
  padding:14px;
  border:1px solid var(--ux-line);
  border-radius:14px;
  background:#fff;
  text-align:left;
  cursor:pointer;
}

.ux-field-type:hover,
.ux-field-type:focus{
  border-color:#a9bfff;
  background:#f8fbff;
  outline:none;
}

.ux-field-type strong{
  color:var(--ux-ink);
}

.ux-field-type small{
  color:var(--ux-muted);
}

.ux-onboarding-shell{
  max-width:980px;
  margin:26px auto 0;
  padding:28px;
}

.ux-onboarding-shell h1{
  font-size:clamp(2rem,4vw,3.2rem);
  letter-spacing:-.055em;
}

.ux-onboarding-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:28px 0;
}

.ux-onboarding-option{
  position:relative;
  display:block;
}

.ux-onboarding-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.ux-onboarding-option span{
  display:flex;
  align-items:center;
  min-height:64px;
  padding:0 18px;
  border:1px solid var(--ux-line-strong);
  border-radius:14px;
  background:#fff;
  font-weight:850;
  box-shadow:0 1px 0 rgba(20,40,70,.04);
  cursor:pointer;
}

.ux-onboarding-option input:checked + span,
.ux-onboarding-option span:hover{
  border-color:#3867f4;
  background:#f3f7ff;
  box-shadow:0 0 0 4px rgba(56,103,244,.12);
}

.ux-onboarding-progress{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:22px;
}

.ux-onboarding-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#b9c5d8;
}

.ux-onboarding-dot.active{
  background:#3867f4;
}

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

@media (max-width:980px){
  .dashboard-hero,
  .ux-page-head,
  .ux-builder-topbar{
    grid-template-columns:1fr;
    flex-direction:column;
    align-items:stretch;
  }

  .preview-rail{
    position:relative;
    top:auto;
  }

  .ux-domain-row,
  .ux-color-pair,
  .ux-onboarding-options{
    grid-template-columns:1fr;
  }

  .ux-modal-grid{
    grid-template-columns:1fr;
  }

  .nav-workspace-menu{
    min-width:0;
    width:calc(100vw - 32px);
  }

  .nav-workspace-grid{
    grid-template-columns:1fr;
  }

  .dashboard-filters{
    grid-template-columns:1fr 1fr;
  }

  .recent-qr-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }

  .recent-qr-toolbar{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .recent-qr-search,
  .recent-qr-select-toggle{
    grid-column:auto;
  }

  .dashboard-user-filter,
  .ux-form-visual-builder{
    grid-template-columns:1fr;
  }

  .ux-form-build-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .dashboard-filters .filter-actions{
    grid-column:1 / -1;
  }
}

@media (max-width:720px){
  .page-shell{
    padding-top:18px;
  }

  .nav-link{
    justify-content:flex-start;
    width:100%;
  }

  .dashboard-plan-strip,
  .dashboard-quick-actions,
  .dashboard-filters{
    grid-template-columns:1fr;
  }

  .dashboard-filters .filter-actions{
    grid-template-columns:1fr;
  }

  .recent-qr-head{
    flex-direction:column;
  }

  .recent-qr-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .recent-qr-shell{
    padding:14px;
  }

  .recent-qr-toolbar{
    grid-template-columns:1fr;
  }

  .recent-qr-selection-bar,
  .recent-qr-page-row{
    align-items:stretch;
    flex-direction:column;
  }

  .recent-qr-selection-bar > div{
    width:100%;
  }

  .ux-field-settings-grid{
    grid-template-columns:1fr;
  }

  .ux-condition-box summary{
    align-items:flex-start;
    flex-direction:column;
  }

  .ux-help-widget{
    right:16px;
    bottom:16px;
  }

  .ux-help-toggle{
    width:54px;
    height:54px;
    border-radius:19px;
  }
}
