.website-manager { display:flex; flex-direction:column; gap:16px; min-height:0; flex:1; height:100%; }
.website-manager>p { font-size:.875rem; margin:0; }
.website-manager nav { display:flex; gap:10px; flex-wrap:wrap; }
.website-list { overflow:auto; min-height:0; flex:1; }
.website-row { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:18px 6px; border-bottom:1px solid var(--bs-border-color); }
.website-row>div:first-child { min-width:0; flex:1; }
.website-row strong,.website-row small { display:block; overflow-wrap:anywhere; }
.website-row small { margin-top:5px; opacity:.7; }
.website-row>div:last-child { display:flex; gap:8px; flex:none; }

/* Một body cuộn, header/footer nằm ngoài; giới hạn editor riêng thay vì kéo
   mọi form theo chiều ngang workspace toàn màn hình của catalog. */
.modal-root[data-size="workspace"]:has(.website-editor) .modal-card { width:min(1120px,calc(100vw - 32px)); height:min(850px,calc(100dvh - 32px)); }
.modal-root[data-size="workspace"] .modal-body:has(>.website-editor) { overflow-y:auto; overflow-x:hidden; scrollbar-width:auto; scrollbar-gutter:stable; overscroll-behavior:contain; background:var(--admin-hover); padding:20px; }
.website-editor { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:18px; align-items:start; }
.website-editor-main,.website-editor-aside { display:grid; gap:16px; min-width:0; }
.website-editor-group { display:grid; gap:12px; min-width:0; margin:0; padding:16px; border:1px solid var(--dashboard-border); border-radius:12px; background:var(--dashboard-surface); }
.website-editor-group>h3 { margin:0 0 2px; padding-bottom:12px; border-bottom:1px solid var(--dashboard-border); color:var(--text); font-size:1rem; font-weight:700; }
.website-group-hint { margin:0; color:var(--muted); font-size:.8rem; line-height:1.5; }
.website-editor .field { min-width:0; gap:6px; margin:0; }
.website-editor .field>label { font-size:.8125rem; font-weight:700; color:var(--muted); }
.website-editor .form-control,.website-editor .form-select { width:100%; min-width:0; min-height:40px; padding:9px 11px; border-radius:7px; font-size:.875rem; }
.website-editor textarea { resize:vertical; min-height:64px; max-height:400px; line-height:1.65; }
.website-editor textarea[name="body"] { min-height:200px; }
.website-editor .website-check-field { display:flex; flex-direction:row; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--dashboard-border); border-radius:7px; }
.website-editor .website-check-field label { cursor:pointer; color:var(--text); }
.website-editor .form-check-input { width:20px; height:20px; margin:0; flex:none; }
.website-editor-group:has(input[name="label"]) { grid-template-columns:minmax(0,.8fr) minmax(0,1fr); }
.website-editor-group:has(input[name="label"])>h3 { grid-column:1/-1; }
.website-editor input[name="siteName"],.website-editor select[name="icon"] { max-width:320px; }
.website-editor-aside .website-editor-group:has(.website-check-field) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.website-editor-aside .website-editor-group:has(.website-check-field)>:not(.website-check-field) { grid-column:1/-1; }
.website-editor details.website-editor-group { display:block; padding:14px 20px; }
.website-editor details>summary { color:var(--muted); font-size:.8125rem; font-weight:700; cursor:pointer; }
.website-editor details[open]>.field,.website-editor details[open]>.website-group-hint { margin-top:14px; }
.website-editor details input[name="id"] { max-width:290px; }
.website-editor-message { grid-column:1/-1; margin:0; font-size:.875rem; }
.website-editor-message:empty { display:none; }
.website-editor[data-section="features"] { grid-template-columns:1fr; }
.website-editor[data-section="features"] .website-editor-aside { display:none; }
.modal-root[data-size="workspace"]:has(.website-editor[data-section="features"]) .modal-card { width:min(660px,calc(100vw - 32px)); height:min(610px,calc(100dvh - 32px)); }

.website-image-group { gap:8px; }
.website-image-field { display:grid; gap:10px; min-width:0; }
.website-image-controls { display:flex; gap:8px; align-items:center; }
.website-image-controls button { flex:1; padding:8px; font-size:.8125rem; white-space:nowrap; min-height:38px; }
.website-image-field small { color:var(--muted); font-size:.75rem; font-weight:400; }
.website-image-empty,.website-image-field canvas { width:100%; height:110px; border:1px dashed var(--dashboard-border); border-radius:8px; background:var(--admin-hover); }
.website-image-empty { display:grid; place-items:center; color:var(--muted); font-size:.8125rem; }
.website-image-field canvas { object-fit:contain; border-style:solid; }
.website-image-field [hidden] { display:none; }
.website-image-status { margin:0; overflow-wrap:anywhere; font-size:.75rem; font-weight:400; color:var(--muted); }
.website-image-status:empty { display:none; }
.website-image-url>summary { font-size:.75rem; color:var(--muted); cursor:pointer; }
.website-image-url>label { display:none; }
.website-editor .website-image-url>.form-control { font-size:.75rem; min-height:36px; margin-top:8px; }
@media(max-width:850px) {
  .website-editor { grid-template-columns:minmax(0,1fr) 290px; gap:12px; }
  .website-editor-group { padding:16px; }
  .modal-root[data-size="workspace"] .modal-body:has(>.website-editor) { padding:12px; }
}
@media(max-width:680px) {
  .website-editor { grid-template-columns:1fr; }
  .website-editor-group:has(input[name="label"]) { grid-template-columns:1fr; }
  .website-row { flex-direction:column; align-items:stretch; }
  .modal-root[data-size="workspace"]:has(.website-editor) .modal-card { width:calc(100vw - 16px); height:calc(100dvh - 16px); }
  .website-image-empty,.website-image-field canvas { height:130px; }
}
