:root{font-family:Inter,Arial,sans-serif;color:#17243a;background:#f5f7fb;font-synthesis:none;text-rendering:optimizeLegibility;--navy:#17243a;--blue:#315ee8;--muted:#758198;--line:#e8ecf3;--surface:#fff;--shadow:0 8px 28px rgba(26,42,70,.055)}*{box-sizing:border-box}body{margin:0;min-width:320px;background:#f5f7fb}button,input,select{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:258px;background:#fff;border-right:1px solid var(--line);padding:27px 19px 20px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--navy);padding:0 7px 35px}.brand-mark{width:39px;height:39px;border-radius:12px;background:var(--navy);display:grid;place-items:center}.brand-mark svg{width:23px;fill:none;stroke:#fff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.brand strong{display:block;font-size:14px;font-weight:800;letter-spacing:-.35px}.brand small{display:block;color:#8993a5;font-size:10px;margin-top:4px}.sidebar-label{font-size:9px;font-weight:800;letter-spacing:1.25px;color:#a0a9b8;padding:0 10px 12px}.main-nav{display:grid;gap:6px}.nav-item{border:0;background:transparent;color:#647087;border-radius:9px;text-align:left;padding:12px 12px;font-size:12px;font-weight:600;display:flex;align-items:center;gap:12px}.nav-item:hover,.nav-item.active{background:#eef2ff;color:#315ee8}.nav-icon{font-size:18px;width:18px;text-align:center}.sidebar-bottom{margin-top:auto}.privacy-card{display:flex;gap:10px;background:#f6f8fc;border:1px solid #edf0f5;padding:13px 11px;border-radius:10px}.privacy-icon{font-size:19px;color:#3d67df}.privacy-card strong{font-size:10px}.privacy-card p{font-size:9px;line-height:1.5;color:#7e899c;margin:4px 0 0}.sidebar-version{font-size:9px;color:#9aa3b1;padding:19px 5px 0}.sidebar-version span{float:right}.main-area{margin-left:258px;min-height:100vh}.topbar{height:69px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 43px;position:sticky;top:0;z-index:10}.breadcrumb{display:flex;align-items:center;gap:11px;font-size:11px;color:#9aa3b1}.breadcrumb b{font-weight:400;color:#c5cbd5}.breadcrumb strong{font-weight:650;color:#344159}.topbar-right{display:flex;align-items:center;gap:15px}.local-badge{font-size:10px;color:#65748b;background:#f6f8fb;border:1px solid #edf0f5;border-radius:20px;padding:7px 10px}.local-badge i,.save-status i{display:inline-block;width:6px;height:6px;border-radius:50%;background:#25b879;margin-right:6px;vertical-align:1px}.avatar{width:31px;height:31px;border-radius:50%;background:#e9edfb;color:#315ee8;display:grid;place-items:center;font-size:10px;font-weight:800}.view{display:none}.view.active{display:block}.page-content{max-width:1220px;margin:0 auto;padding:38px 43px 24px}.mobile-menu{display:none}.btn{border:1px solid transparent;border-radius:8px;padding:11px 16px;font-size:11px;font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.18s}.btn-primary{background:#315ee8;color:#fff;box-shadow:0 4px 10px rgba(49,94,232,.16)}.btn-primary:hover{background:#244ed0;transform:translateY(-1px)}.btn-outline{background:#fff;color:#536078;border-color:#e2e7ef}.btn-outline:hover{border-color:#b9c6e2;background:#f9faff}.btn-light{background:#fff;color:#20314e}.btn-light:hover{background:#eef2ff}.btn-sm{padding:9px 12px;font-size:10px}.btn-danger{background:#d94343;color:white}.toast-region{position:fixed;right:22px;bottom:22px;z-index:50;display:grid;gap:8px}.toast{background:#17243a;color:white;padding:12px 16px;border-radius:9px;box-shadow:var(--shadow);font-size:11px;animation:toastIn .2s ease}@keyframes toastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.confirm-dialog{border:0;border-radius:16px;padding:25px;width:min(390px,calc(100% - 32px));box-shadow:0 20px 70px #15223b33}.confirm-dialog::backdrop{background:#17243a66;backdrop-filter:blur(3px)}.confirm-dialog form{text-align:center}.dialog-icon{width:39px;height:39px;border-radius:50%;background:#fff4e5;color:#d18b23;display:grid;place-items:center;margin:0 auto 12px;font-weight:800}.confirm-dialog h3{font-size:16px;margin:0 0 7px}.confirm-dialog p{font-size:11px;color:#778297;line-height:1.6;margin:0 0 20px}.dialog-actions{display:flex;justify-content:center;gap:8px}

/* Stage 6 — import and data management */
.import-dialog{width:min(760px,calc(100vw - 28px));max-height:90vh;border:0;border-radius:18px;padding:24px;color:#17243a;box-shadow:0 24px 80px #0f172a40;}
.import-dialog::backdrop{background:#0f172a99;backdrop-filter:blur(3px)}
.import-dialog-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}
.import-dialog-head h2{margin:5px 0;font-size:24px}.import-dialog-head p{margin:0;color:#718096;font-size:13px;line-height:1.6}
.import-drop-zone{width:100%;border:1.5px dashed #9aacc5;background:#f7faff;border-radius:13px;padding:26px 16px;display:flex;flex-direction:column;gap:7px;align-items:center;color:#24364f;cursor:pointer}
.import-drop-zone span,.import-file-status{font-size:12px;color:#718096}.import-drop-zone.dragover{background:#eaf2ff;border-color:#2563eb}
.import-mapping-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 18px}
.import-map-row{background:#f5f7fb;border:1px solid #e6ebf2;border-radius:9px;padding:9px 11px;min-width:0}.import-map-row span{display:block;color:#718096;font-size:11px;margin-bottom:4px}.import-map-row strong{display:block;color:#24364f;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:72px;overflow:auto}
.import-raw-label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:650}.import-raw-label textarea{width:100%;resize:vertical;border:1px solid #dce3ed;border-radius:10px;padding:11px;font:12px/1.55 inherit;color:#26364e}
.import-warning{font-size:11px;line-height:1.55;color:#94651c;background:#fff8e8;padding:10px 12px;border-radius:9px;margin:10px 0 16px}.import-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}
@media(max-width:640px){.import-dialog{padding:17px}.import-mapping-preview{grid-template-columns:1fr}.list-actions{flex-wrap:wrap}}


/* v1.5 responsive application shell — desktop, tablet and phone */
@media (max-width: 1100px) {
  .sidebar { width: 220px; padding-left: 14px; padding-right: 14px; }
  .main-area { margin-left: 220px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  .page-content { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 760px) {
  .sidebar {
    width: min(290px, 86vw);
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 16px 0 40px #14213a1c;
  }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; width: 100%; }
  .topbar { height: 58px; padding: 0 13px; gap: 10px; }
  .mobile-menu { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--navy); font-size: 18px; }
  .breadcrumb { min-width: 0; flex: 1; gap: 6px; font-size: 10px; white-space: nowrap; overflow: hidden; }
  .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { gap: 7px; }
  .local-badge { font-size: 9px; padding: 6px 8px; white-space: nowrap; }
  .avatar { width: 28px; height: 28px; flex: 0 0 28px; }
  .page-content { padding: 21px 13px 28px; }
  .welcome-row, .editor-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .welcome-row h1, .editor-heading h1 { font-size: 23px; }
  .welcome-row > button, .editor-heading-actions { width: 100%; }
  .editor-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .editor-heading-actions .btn { flex: 1 1 auto; min-width: 125px; }
  .editor-page .form-workspace { display: block; }
  .editor-page .form-section-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 8px; margin-bottom: 10px; scrollbar-width: thin; }
  .editor-page .form-nav-label { display: none; }
  .editor-page .form-nav-item { width: auto; flex: 0 0 auto; white-space: nowrap; padding: 9px 10px; }
  .editor-page .form-nav-check { display: none; }
  .editor-page .form-main-panel { padding: 17px 13px; min-height: 0; }
  .editor-page .preview-side { display: none; position: static; margin-top: 10px; }
  .editor-page.mobile-preview-active .form-section-nav,
  .editor-page.mobile-preview-active .form-main-panel { display: none; }
  .editor-page.mobile-preview-active .preview-side { display: block; }
  .editor-mobile-tabs { display: flex; position: sticky; top: 58px; z-index: 8; background: #f5f7fb; padding: 8px 0; }
  .editor-mobile-tabs button { min-height: 42px; }
  .preview-scroll { max-height: 68vh; min-height: 260px; padding: 12px 5px; overflow: auto; }
  .preview-toolbar { flex-wrap: wrap; padding: 10px; }
  .preview-toolbar-actions button { width: 32px; height: 32px; }
  .design-fields { grid-template-columns: 1fr 1fr; gap: 9px; }
  .section-order-item { min-height: 42px; gap: 6px; padding: 6px; }
  .order-actions button { width: 32px; height: 32px; font-size: 15px; }
  .drag-handle { display: none; }
  .editor-page .selected-template-strip { flex-wrap: wrap; gap: 8px; }
  .editor-page .selected-template-strip .btn { width: 100%; }
}
@media (max-width: 480px) {
  .topbar-right .local-badge { max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
  .page-content { padding-left: 10px; padding-right: 10px; }
  .editor-heading h1 { font-size: 21px; }
  .editor-heading-actions .btn { min-width: 100%; }
  .editor-mobile-tabs { gap: 6px; }
  .editor-mobile-tabs button { font-size: 10px; padding: 9px 5px; }
  .design-fields { grid-template-columns: 1fr; }
  .form-panel-footer { gap: 8px; }
  .form-panel-footer .btn { flex: 1 1 auto; }
  .toast-region { left: 10px; right: 10px; bottom: 10px; }
}


/* v1.6 — discreet but visible ownership / usage notice */
.site-legal-notice {
  display:flex;
  align-items:flex-start;
  gap:11px;
  max-width:1220px;
  margin:12px auto 22px;
  padding:12px 16px;
  border:1px solid #e6eaf1;
  border-left:3px solid #d69a35;
  border-radius:9px;
  background:#fff;
  color:#68758a;
}
.legal-notice-icon {
  display:grid;
  place-items:center;
  flex:0 0 25px;
  width:25px;
  height:25px;
  border-radius:50%;
  background:#fff5e5;
  color:#a96c12;
  font-size:15px;
  font-weight:800;
}
.site-legal-notice p { margin:0; font-size:10px; line-height:1.65; }
.site-legal-notice strong { color:#34445d; font-size:10px; }
.site-legal-notice a { color:#315ee8; font-weight:700; text-decoration:none; margin-left:4px; }
.site-legal-notice a:hover { text-decoration:underline; }
@media(max-width:760px) {
  .site-legal-notice { margin:10px 13px 18px; padding:11px 12px; gap:9px; }
  .site-legal-notice p { font-size:10px; }
  .site-legal-notice a { display:inline-block; margin:3px 0 0; }
}
@media(max-width:480px) {
  .site-legal-notice { margin-left:10px; margin-right:10px; }
}
