:root{--bg:#f8fafc;--panel:#ffffff;--text:#0f172a;--muted:#64748b;--border:#e2e8f0;--orange:#f97316;--amber:#fbbf24;--violet:#7c3aed;--pink:#d946ef}*{box-sizing:border-box}html,body{margin:0;min-height:100%}body{font-family:Arial,Helvetica,sans-serif;background:linear-gradient(to bottom,#f8fafc,#eef2f7);color:var(--text)}.shell{min-height:100vh;display:grid;grid-template-columns:280px 1fr}.sidebar{background:#0f172a;color:#fff;padding:24px;display:flex;flex-direction:column;justify-content:space-between}.brand-block{display:flex;gap:14px;align-items:center}.brand-logo{width:52px;height:52px;border-radius:18px;background:linear-gradient(135deg,var(--orange),var(--amber));display:flex;align-items:center;justify-content:center;color:#111827;font-weight:900}.brand-title{font-size:22px;font-weight:900}.brand-sub{font-size:13px;color:#cbd5e1}.nav{display:flex;flex-direction:column;gap:10px;margin-top:24px}.nav a{text-decoration:none;color:#e2e8f0;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.04)}.nav a:hover{background:rgba(255,255,255,.08)}.sidebar-user{padding:16px;border-radius:18px;background:rgba(255,255,255,.05)}.sidebar-user-name{font-weight:800}.sidebar-user-email{font-size:13px;color:#cbd5e1;margin-top:4px}.main{padding:28px}.hero-admin{background:linear-gradient(135deg,#020617,#111827);color:#fff;border-radius:32px;padding:26px;display:flex;justify-content:space-between;gap:18px;align-items:flex-start;box-shadow:0 20px 45px rgba(15,23,42,.15)}.hero-mini,.login-kicker{font-size:12px;letter-spacing:.22em;text-transform:uppercase;color:#cbd5e1;font-weight:800}.hero-admin h1,.page-head h1{margin:8px 0 8px;font-size:42px}.hero-admin p{max-width:760px;line-height:1.7;color:#cbd5e1}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:20px 0}.stat-card,.card{background:#fff;border:1px solid var(--border);border-radius:28px;padding:22px;box-shadow:0 8px 24px rgba(15,23,42,.05)}.stat-card.dark{background:linear-gradient(135deg,var(--orange),var(--amber));color:#111827;border:none}.stat-label{font-size:14px;color:#64748b}.stat-card.dark .stat-label{color:#111827}.stat-value{font-size:48px;font-weight:900;margin-top:10px}.section-title{font-size:24px;font-weight:900;margin-bottom:16px}.table-card{padding:20px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:14px 12px;border-bottom:1px solid #e5e7eb;vertical-align:top}th{font-size:13px;color:#64748b;text-transform:uppercase;letter-spacing:.08em}.pill{display:inline-flex;padding:7px 12px;border-radius:999px;background:#e2e8f0;font-size:12px;font-weight:800}.pill.success{background:#dcfce7;color:#166534}.pill.muted{background:#f1f5f9;color:#475569}.btn,button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:none;border-radius:16px;padding:12px 16px;font-weight:800;text-decoration:none;cursor:pointer;background:#0f172a;color:#fff}.btn-light{background:#fff;color:#0f172a}.btn-primary{background:#0f172a;color:#fff}.btn-danger{background:#b91c1c;color:#fff}.btn-sm{padding:9px 12px;border-radius:12px;font-size:13px}label{display:block;font-weight:800;margin:10px 0 8px}input[type=text],input[type=email],input[type=password],input[type=number],input[type=file],input[type=datetime-local],select,textarea{width:100%;padding:13px 14px;border:1px solid #cbd5e1;border-radius:16px;background:#fff;font-size:14px}.checkbox-row{display:flex;gap:10px;align-items:center}.checkbox-row input{width:auto}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:20px}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.link-block{padding:14px 0;border-bottom:1px solid #e5e7eb}.link-title{font-weight:800;margin-bottom:6px}.muted-text{color:#64748b}.panel-list{display:flex;flex-direction:column;gap:12px;margin-top:14px}.panel-item{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px;border:1px solid #e5e7eb;border-radius:18px;background:#fafafa}.panel-item-title{font-weight:800;font-size:18px}.panel-item-sub{font-size:13px;color:#64748b;margin-top:4px}.panel-item-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.login-body{display:flex;align-items:center;justify-content:center;min-height:100vh;background:linear-gradient(to bottom,#f1f5f9,#e2e8f0)}.login-wrap{width:min(1100px,94vw);display:grid;grid-template-columns:420px 1fr;gap:24px;align-items:stretch}.login-card{background:#fff;border:1px solid var(--border);border-radius:32px;padding:28px;box-shadow:0 20px 45px rgba(15,23,42,.09)}.login-card h1{font-size:44px;margin:10px 0}.login-card p{color:#475569}.alert.error{background:#fee2e2;color:#991b1b;padding:12px 14px;border-radius:14px;margin:14px 0}.login-form button{margin-top:14px}.login-note{margin-top:16px;color:#64748b}.login-side{display:flex;align-items:center}.promo-card{width:100%;min-height:280px;border-radius:32px;background:linear-gradient(135deg,var(--violet),var(--pink));padding:28px;color:#fff;display:flex;flex-direction:column;justify-content:flex-end;box-shadow:0 20px 45px rgba(124,58,237,.22)}.promo-badge{align-self:flex-start;background:rgba(255,255,255,.18);padding:8px 12px;border-radius:999px;font-weight:800}.promo-title{margin-top:18px;font-size:38px;font-weight:900;max-width:620px}.promo-text{margin-top:10px;max-width:600px;line-height:1.7}.hint-box{margin-top:16px;padding:14px;border-radius:18px;background:#f8fafc;border:1px solid #e5e7eb;color:#475569;line-height:1.6}.banner-style-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:10px 0 18px}.banner-choice{display:block;cursor:pointer}.banner-choice input{display:none}.banner-preview{display:flex;align-items:center;justify-content:center;height:64px;border-radius:16px;font-weight:900;color:#fff}.banner-preview.flash{background:linear-gradient(90deg,#ff3d3d,#ff9d00)}.banner-preview.warning{background:linear-gradient(90deg,#ffd500,#ff7b00);color:#111827}.banner-preview.brand{background:linear-gradient(90deg,#f97316,#fbbf24);color:#111827}.template-buttons{display:flex;flex-wrap:wrap;gap:12px}@media (max-width:1100px){.shell{grid-template-columns:1fr}.sidebar{display:none}.stats-grid,.form-grid,.login-wrap,.banner-style-grid{grid-template-columns:1fr}}
.alert.success{background:#dcfce7;color:#166534;padding:12px 14px;border-radius:14px;margin:14px 0}.pill.warning{background:#fef3c7;color:#92400e}.pill.draft{background:#e0e7ff;color:#4338ca}.actions-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.widget-grid-admin{align-items:start}.panel-edit-grid{align-items:start}.panel-item-main{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;width:100%}.media-preview-box,.empty-preview{border:1px dashed #cbd5e1;border-radius:20px;background:#f8fafc;min-height:260px;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:12px}.media-preview-box img,.media-preview-box video{max-width:100%;max-height:420px;border-radius:14px;display:block}.mini-media-preview{width:110px;height:78px;border-radius:12px;overflow:hidden;background:#e5e7eb;flex:0 0 auto}.mini-media-preview img,.mini-media-preview video{width:100%;height:100%;object-fit:cover;display:block}.empty-preview{color:#64748b;text-align:center}.compact-list .panel-item{padding:12px 14px}

.vertical-1080x1920{aspect-ratio:1080/1920;min-height:auto;max-height:560px}.vertical-1080x1920 img,.vertical-1080x1920 video{width:100%;height:100%;object-fit:cover}.aspect-note{margin-bottom:12px}.full-media-guideline{font-size:13px;color:#475569;margin-top:10px}
.alert.info{background:#e0f2fe;color:#075985;padding:12px 14px;border-radius:14px;margin:14px 0}.iframe-shell{width:100%;border:1px solid #cbd5e1;border-radius:24px;overflow:hidden;background:#0f1115}.iframe-shell iframe{width:100%;height:100%;border:0;display:block}.preview-card-large .section-title{margin-bottom:12px}.preview-card-large .iframe-shell{max-width:420px}
.focus-editor{margin-top:16px}.focus-editor-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.focus-stage{position:relative;overflow:hidden;border:1px solid #cbd5e1;border-radius:24px;background:#0f172a;cursor:crosshair}.focus-stage img,.focus-stage video,.mini-media-preview .mini-media-object,.mini-media-preview img,.mini-media-preview video{width:100%;height:100%;object-fit:cover;display:block}.focus-stage .focus-stage-media{width:100%;height:100%;object-fit:cover;display:block}.focus-hotspot{position:absolute;width:22px;height:22px;border:3px solid #fff;border-radius:999px;background:rgba(249,115,22,.9);box-shadow:0 0 0 4px rgba(255,255,255,.18);transform:translate(-50%,-50%);z-index:3;pointer-events:none}.focus-grid-overlay{position:absolute;inset:0;background-image:linear-gradient(to right,rgba(255,255,255,.18) 1px,transparent 1px),linear-gradient(to bottom,rgba(255,255,255,.18) 1px,transparent 1px);background-size:33.333% 33.333%;pointer-events:none}.focus-placeholder{display:flex;align-items:center;justify-content:center;height:100%;padding:18px;color:#cbd5e1;text-align:center}.mini-media-preview{width:110px;height:160px;border-radius:12px;overflow:hidden;background:#e5e7eb;flex:0 0 auto}.mini-media-preview video{display:none}

.preset-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}.preset-card{appearance:none;width:100%;text-align:left;padding:14px 16px;border:1px solid #cbd5e1;border-radius:18px;background:#fff;color:#0f172a;display:flex;flex-direction:column;gap:6px}.preset-card span{font-size:12px;color:#64748b;font-weight:600;line-height:1.45}.preset-card.active{border-color:#f97316;box-shadow:0 0 0 2px rgba(249,115,22,.12);background:#fff7ed}.upload-warning{display:none;margin-top:12px;padding:12px 14px;border-radius:14px;background:#fff7ed;color:#9a3412;border:1px solid #fdba74;font-weight:700}.upload-warning.show{display:block}.safe-zone-overlay{position:absolute;inset:0;pointer-events:none;display:none;z-index:2}.safe-zone-overlay.show{display:block}.safe-zone{position:absolute;left:8%;right:8%;border:1px dashed rgba(255,255,255,.9);border-radius:16px;color:#fff;font-weight:700;font-size:12px;text-align:center;backdrop-filter:blur(2px);background:rgba(15,23,42,.16)}.safe-zone.top{top:4%;height:13%;padding-top:10px}.safe-zone.center{top:18%;bottom:16%;display:flex;align-items:center;justify-content:center}.safe-zone.bottom{bottom:4%;height:10%;padding-top:8px}@media (max-width:1100px){.preset-grid{grid-template-columns:1fr}}

.upload-meta-note{margin-top:8px;font-size:12px;line-height:1.45;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;padding:10px 12px;border-radius:10px}.upload-meta-note strong{color:#0f172a}


.field-help{margin-top:-6px;margin-bottom:12px;color:#6b7280;font-size:12px}
.form-subsection{margin:18px 0 8px;font-weight:800;color:#0f172a}
.inline-grid.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.inline-grid.three{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.hint-box.compact{margin:10px 0 14px}
@media (max-width:720px){.inline-grid.two,.inline-grid.three{grid-template-columns:1fr}}

.qr-target-preview{margin-top:10px;padding:10px 12px;border-radius:12px;background:#eff6ff;color:#1e3a8a;font-size:13px;word-break:break-word}.form-subsection{font-weight:800;margin:18px 0 8px}.hint-box.compact{margin-top:10px}.focus-stage .widget-qr{z-index:4}.mini-media-preview .widget-qr{display:none}

/* v4.5.6 stability */
.widget-grid-admin{grid-template-columns:minmax(680px,1fr) minmax(340px,420px)}
.widget-toolbar-sticky{position:sticky;top:12px;z-index:20;display:flex;gap:12px;flex-wrap:wrap;padding:12px 14px;margin:-4px 0 16px;border:1px solid #e5e7eb;border-radius:18px;background:rgba(255,255,255,.95);backdrop-filter:blur(6px)}
.widget-preview-pane{position:sticky;top:18px;align-self:start}
.widget-preview-pane .iframe-shell{margin-inline:auto}
@media (max-width: 1200px){
  .widget-grid-admin{grid-template-columns:1fr}
  .widget-preview-pane{position:static}
}


/* v4.7.0 modular editor */
.modular-toolbar{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin-top:16px}
.modular-add-form{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.modular-add-form select,.modular-add-form input{min-width:220px}
.modular-editor-shell{margin-top:16px;border:1px solid rgba(15,23,42,.08);border-radius:24px;padding:16px;background:linear-gradient(180deg,#f8fafc,#eef2ff)}
.modular-editor-grid{position:relative;display:grid;grid-template-columns:repeat(12,1fr);grid-auto-rows:72px;gap:10px;min-height:420px;background-image:linear-gradient(to right,rgba(15,23,42,.06) 1px,transparent 1px),linear-gradient(to bottom,rgba(15,23,42,.06) 1px,transparent 1px);background-size:calc(100%/12) 100%,100% 72px;border-radius:18px;padding:8px}
.modular-editor-item{position:relative;background:#0f172a;color:#fff;border-radius:18px;overflow:hidden;box-shadow:0 10px 24px rgba(15,23,42,.18);user-select:none}
.modular-item-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:rgba(255,255,255,.08);cursor:move;font-size:13px;font-weight:800}
.modular-item-body{padding:12px;height:calc(100% - 46px);display:flex;align-items:center;justify-content:center;text-align:center}
.modular-placeholder-text{font-size:14px;line-height:1.35}
.modular-thumb{width:100%;height:100%;object-fit:cover;border-radius:12px}
.modular-badge-preview{display:inline-flex;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.14);font-size:11px;font-weight:800;margin-bottom:8px}
.modular-resize-handle{position:absolute;width:16px;height:16px;border-radius:999px;background:#fff;border:2px solid rgba(15,23,42,.16);box-shadow:0 4px 10px rgba(15,23,42,.18);z-index:6}
.modular-resize-handle.handle-se{right:8px;bottom:8px;cursor:nwse-resize}
.modular-resize-handle.handle-sw{left:8px;bottom:8px;cursor:nesw-resize}
.modular-resize-handle.handle-ne{right:8px;top:54px;cursor:nesw-resize}
.modular-resize-handle.handle-nw{left:8px;top:54px;cursor:nwse-resize}
.modular-resize-handle.handle-e{right:8px;top:50%;transform:translateY(-50%);cursor:ew-resize}
.modular-resize-handle.handle-w{left:8px;top:50%;transform:translateY(-50%);cursor:ew-resize}
.modular-resize-handle.handle-s{left:50%;bottom:8px;transform:translateX(-50%);cursor:ns-resize}
.modular-resize-handle.handle-n{left:50%;top:54px;transform:translateX(-50%);cursor:ns-resize}

.modular-editor-shell.is-resizing,.modular-editor-shell.is-resizing *{cursor:grabbing !important}
.modular-size-badge{position:absolute;right:12px;top:58px;padding:4px 8px;border-radius:999px;background:rgba(15,23,42,.78);color:#fff;font-size:11px;font-weight:800;z-index:7;pointer-events:none}
.modular-item-head-actions{display:flex;align-items:center;gap:8px}
.modular-resize-handle:hover{transform:scale(1.08)}
.modular-resize-handle.handle-e:hover,.modular-resize-handle.handle-w:hover{transform:translateY(-50%) scale(1.08)}
.modular-resize-handle.handle-s:hover,.modular-resize-handle.handle-n:hover{transform:translateX(-50%) scale(1.08)}
.modular-empty{grid-column:1 / -1;display:flex;align-items:center;justify-content:center;min-height:240px;border:2px dashed rgba(15,23,42,.18);border-radius:18px;color:#475569;font-weight:700;background:rgba(255,255,255,.55)}
.mini-pill{padding:4px 8px;border-radius:999px;background:rgba(255,255,255,.14);font-size:11px;font-weight:700}
.module-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:14px;margin-top:16px}
.module-config-card{padding:18px}
.module-delete-inline{margin-top:-4px;margin-bottom:10px}
.module-qr-preview .widget-qr{position:static;right:auto;bottom:auto;width:auto;min-height:auto;padding:8px;background:#fff}
.module-qr-preview .widget-qr-box{width:auto}
.modular-dragging{cursor:grabbing !important}

/* v4.7.3 hotfix editor modular */
.module-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:14px;margin-top:16px;align-items:start}
.module-config-card{padding:16px;display:flex;flex-direction:column;gap:10px;position:relative}
.module-config-card .section-title{margin-bottom:2px}
.module-config-card .muted-text{margin-bottom:8px}
.module-config-card .actions-row{margin-top:6px}
.module-delete-inline{margin-top:-6px;margin-bottom:0;display:flex;justify-content:flex-end}
.module-delete-inline .btn{padding:8px 12px;font-size:12px;border-radius:10px}


/* v4.7.6 modular pro */
.modular-workspace{display:grid;grid-template-columns:minmax(0,1.2fr) 360px;gap:18px;align-items:start;margin-top:18px}
.modular-sidebar{position:sticky;top:18px}
.module-sidebar-card{display:none}
.module-sidebar-card.is-active{display:block}
.modular-sidebar-empty{border:1px dashed rgba(15,23,42,.18);border-radius:18px;padding:18px;color:#475569;background:rgba(255,255,255,.55);font-weight:700}
.modular-sidebar-empty.is-hidden{display:none}
.modular-editor-item{transition:box-shadow .16s ease,border-color .16s ease,transform .16s ease;border:2px solid transparent}
.modular-editor-item.is-selected{border-color:#f97316;box-shadow:0 0 0 4px rgba(249,115,22,.18),0 14px 28px rgba(15,23,42,.24)}
.module-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}
.module-quick-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.module-config-form .actions-row{margin-top:14px}
@media (max-width: 1180px){.modular-workspace{grid-template-columns:1fr}.modular-sidebar{position:static}}

.modular-pro-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.inline-form{display:inline-flex;margin:0}
.modular-editor-grid{overflow:hidden}
.modular-editor-item{z-index:1}
.modular-editor-item.is-locked{opacity:.78;filter:saturate(.7)}
.modular-editor-item.is-locked .modular-item-head{cursor:not-allowed;background:rgba(248,113,113,.18)}
.mini-pill-lock{background:#7f1d1d;color:#fff}
.modular-guide{position:absolute;pointer-events:none;z-index:80;display:none}
.modular-guide.show{display:block}
.modular-guide-v{top:8px;bottom:8px;width:2px;background:rgba(249,115,22,.9)}
.modular-guide-h{left:8px;right:8px;height:2px;background:rgba(249,115,22,.9)}
