/* ==========================================================================
   Davo CMS Studio — Multi-Tenant Dashboard, WYSIWYG Editor & Media Manager
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --s-bg: #f1f5f9;
  --s-surface: #ffffff;
  --s-sidebar: #0f172a;
  --s-sidebar-hover: #1e293b;
  --s-border: #e2e8f0;
  --s-border-strong: #cbd5e1;
  --s-text: #0f172a;
  --s-muted: #64748b;
  --s-primary: #4f46e5;
  --s-primary-hover: #4338ca;
  --s-primary-soft: #eef2ff;
  --s-success: #10b981;
  --s-warning: #f59e0b;
  --s-danger: #ef4444;
  --radius: 10px;
}

body.studio-body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--s-bg);
  color: var(--s-text);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.sb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
  z-index: 88;
}
.sb-backdrop.open {
  display: block;
}

.mob-menu-btn,
.sb-close-btn,
.ed-insp-toggle {
  display: none;
}

.sb-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mob-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--s-border-strong);
  background: #fff;
  color: var(--s-text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

/* Left Sidebar */
.studio-sidebar {
  width: 256px;
  background: var(--s-sidebar);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #1e293b;
  user-select: none;
}

.sb-brand {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sb-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 16.5px;
  letter-spacing: -0.02em;
}

.sb-logo-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Workspace Switcher */
.ws-switcher-wrap {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ws-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ws-select-row {
  display: flex;
  gap: 6px;
}

.ws-select {
  flex: 1;
  background: #1e293b;
  color: #fff;
  border: 1px solid #334155;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.ws-add-btn {
  background: #334155;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 34px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ws-add-btn:hover { background: var(--s-primary); }

/* Sidebar Navigation */
.sb-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

.sb-section-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
  padding: 12px 10px 6px;
}

.sb-item {
  width: 100%;
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 9px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  margin-bottom: 2px;
  font-family: inherit;
  transition: background 0.14s, color 0.14s;
}

.sb-item:hover {
  background: var(--s-sidebar-hover);
  color: #fff;
}

.sb-item.active {
  background: var(--s-primary);
  color: #fff;
  font-weight: 600;
}

.sb-item .sb-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(255,255,255,0.14);
}

/* Sidebar Storage Quota & User Footer */
.sb-quota {
  margin: 8px 12px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 12px;
}

.quota-bar {
  height: 6px;
  background: #1e293b;
  border-radius: 99px;
  overflow: hidden;
  margin: 7px 0;
}

.quota-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #38bdf8);
  width: 8%;
  transition: width 0.3s ease;
}

.sb-user {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

/* Main Workspace Area */
.studio-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

.studio-topbar {
  height: 60px;
  background: var(--s-surface);
  border-bottom: 1px solid var(--s-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-chip {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--s-primary-soft);
  color: var(--s-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.studio-content.no-pad {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Studio Buttons & Inputs */
.s-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--s-border-strong);
  background: #fff;
  color: var(--s-text);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.14s ease;
  white-space: nowrap;
}
.s-btn:hover { background: #f8fafc; border-color: #94a3b8; }

.s-btn-primary {
  background: var(--s-primary);
  border-color: var(--s-primary);
  color: #fff;
}
.s-btn-primary:hover { background: var(--s-primary-hover); border-color: var(--s-primary-hover); }

.s-btn-danger {
  color: var(--s-danger);
  border-color: #fecaca;
  background: #fef2f2;
}
.s-btn-danger:hover { background: #fee2e2; }

.s-btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

.s-input, .s-select, .s-textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--s-border-strong);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  color: var(--s-text);
}
.s-input:focus, .s-select:focus, .s-textarea:focus {
  outline: none;
  border-color: var(--s-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.s-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}

/* Cards & Stats */
.s-card {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: 12px;
  padding: 20px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--s-border);
  border-radius: 12px;
  padding: 18px;
}

.stat-label { font-size: 12px; color: var(--s-muted); font-weight: 600; }
.stat-val { font-size: 26px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -0.02em; }
.stat-sub { font-size: 12px; color: var(--s-muted); }

/* Pages Table */
.s-table {
  width: 100%;
  border-collapse: collapse;
}
.s-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--s-muted);
  padding: 11px 14px;
  border-bottom: 1px solid var(--s-border);
  background: #f8fafc;
}
.s-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--s-border);
  vertical-align: middle;
}
.s-table tr:hover td { background: #f8fafc; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
}
.pill-pub { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.pill-draft { background: #fefce8; color: #b45309; border: 1px solid #fde68a; }
.pill-home { background: #eef2ff; color: #4f46e5; border: 1px solid #c7d2fe; }
.pill-sub { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }

/* ==========================================================================
   FULL WYSIWYG VISUAL EDITOR LAYOUT
   ========================================================================== */
.editor-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #e2e8f0;
}

.editor-header-bar {
  background: #fff;
  border-bottom: 1px solid var(--s-border);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.editor-title-input {
  border: 1px solid transparent;
  font-size: 18px;
  font-weight: 750;
  padding: 5px 8px;
  border-radius: 7px;
  min-width: 0;
  width: 100%;
  flex: 1;
  max-width: 520px;
  color: var(--s-text);
}
.editor-title-input:hover { border-color: var(--s-border); }
.editor-title-input:focus { outline: none; border-color: var(--s-primary); background: #f8fafc; }

/* Rich Formatting Toolbar */
.wysiwyg-toolbar {
  background: #f8fafc;
  border-bottom: 1px solid var(--s-border);
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.tb-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-right: 7px;
  margin-right: 4px;
  border-right: 1px solid var(--s-border-strong);
}
.tb-group:last-child { border-right: none; }

.tb-btn {
  height: 31px;
  min-width: 31px;
  padding: 0 7px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: inherit;
}
.tb-btn:hover { background: #e2e8f0; color: #0f172a; }
.tb-btn.active { background: var(--s-primary-soft); color: var(--s-primary); border-color: #c7d2fe; }

.tb-select {
  height: 31px;
  border: 1px solid var(--s-border-strong);
  border-radius: 6px;
  background: #fff;
  padding: 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.mode-tabs {
  margin-left: auto;
  display: inline-flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}

.mode-tab {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}
.mode-tab.active {
  background: #fff;
  color: var(--s-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Editor Body (Canvas + Split Preview + Right Inspector) */
.editor-workspace {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.editor-stage {
  flex: 1;
  display: flex;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.wysiwyg-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  background: #eef2f6;
}

.wysiwyg-paper {
  max-width: 820px;
  margin: 0 auto;
  min-height: 620px;
  background: #ffffff;
  border: 1px solid var(--s-border);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  padding: 42px 48px;
  outline: none;
  position: relative;
}

.wysiwyg-paper:focus {
  border-color: #a5b4fc;
}

.wysiwyg-paper img.wysiwyg-selected-img {
  outline: 3px solid var(--s-primary);
  outline-offset: 2px;
}

/* Floating Image Quick-Controls inside WYSIWYG */
.img-float-bar {
  position: fixed;
  z-index: 80;
  background: #0f172a;
  color: #fff;
  padding: 6px 8px;
  border-radius: 9px;
  display: none;
  align-items: center;
  gap: 4px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  font-size: 12px;
}
.img-float-bar button {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.img-float-bar button:hover { background: var(--s-primary); }

/* Raw HTML Source Editor */
.html-source-pane {
  flex: 1;
  display: none;
  flex-direction: column;
  background: #0f172a;
  color: #e2e8f0;
}
.html-source-textarea {
  flex: 1;
  width: 100%;
  background: #0f172a;
  color: #e2e8f0;
  border: none;
  padding: 22px 26px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  resize: none;
  outline: none;
}

/* Split Live Theme Preview Pane */
.split-preview-pane {
  flex: 1;
  border-left: 2px solid #cbd5e1;
  background: #fff;
  display: none;
  flex-direction: column;
}
.split-preview-frame {
  flex: 1;
  border: none;
  width: 100%;
  background: #fff;
}

/* Right Component, Header Slideshow & SEO Inspector */
.editor-inspector {
  width: 344px;
  background: #fff;
  border-left: 1px solid var(--s-border);
  overflow-y: auto;
  padding: 14px 16px 24px;
  flex-shrink: 0;
}

.insp-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 9px;
  margin-bottom: 12px;
}
.insp-mode-tab {
  border: none;
  background: transparent;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}
.insp-mode-tab.active {
  background: #ffffff;
  color: var(--s-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.insp-jump-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}
.insp-jump-btn {
  border: 1px solid var(--s-border);
  background: #f8fafc;
  color: #334155;
  border-radius: 7px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s;
}
.insp-jump-btn:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: var(--s-primary);
}
.insp-jump-btn.active {
  background: var(--s-primary);
  border-color: var(--s-primary);
  color: #ffffff;
}

.hdr-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 12px;
}
.hdr-mode-card {
  border: 1.5px solid var(--s-border);
  border-radius: 10px;
  padding: 9px 10px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s;
}
.hdr-mode-card strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
  margin-bottom: 2px;
}
.hdr-mode-card span {
  display: block;
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.3;
}
.hdr-mode-card.active {
  border-color: var(--s-primary);
  background: #eef2ff;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}
.hdr-mode-card.active strong {
  color: var(--s-primary);
}

.hs-slide-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.hs-slide-tab {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.hs-slide-tab.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}
.hs-slide-tab.add {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--s-primary);
}

.comp-badge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  border: 1px solid #e0e7ff;
  border-radius: 9px;
  margin-bottom: 12px;
}
.comp-badge-head strong {
  font-size: 12.5px;
  color: #1e1b4b;
}
.comp-badge-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #4f46e5;
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
}

.comp-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.insp-thumb-box {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #0f172a;
  aspect-ratio: 16 / 8.5;
  margin-bottom: 8px;
}
.insp-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.insp-section {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--s-border);
}
.insp-section:last-child { border-bottom: none; }
.insp-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--s-muted);
  margin: 0 0 12px;
}

.editor-statusbar {
  height: 32px;
  background: #fff;
  border-top: 1px solid var(--s-border);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--s-muted);
}

/* ==========================================================================
   MEDIA LIBRARY & CANVAS IMAGE STUDIO
   ========================================================================== */
.media-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px;
  align-items: start;
}

.dropzone {
  border: 2px dashed #94a3b8;
  background: #f8fafc;
  border-radius: 14px;
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s ease;
  margin-bottom: 18px;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--s-primary);
  background: var(--s-primary-soft);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
}

.media-card {
  background: #fff;
  border: 2px solid var(--s-border);
  border-radius: 11px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.14s ease;
}
.media-card:hover { border-color: #94a3b8; transform: translateY(-1px); }
.media-card.selected { border-color: var(--s-primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.16); }

.media-thumb {
  height: 118px;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%) 50% / 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.media-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.media-meta {
  padding: 9px 10px;
  border-top: 1px solid var(--s-border);
}
.media-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-sub {
  font-size: 11px;
  color: var(--s-muted);
  margin-top: 2px;
}

/* Modals & Toasts */
.s-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.s-modal-backdrop.open { display: flex; }

.s-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}
.s-modal.lg { max-width: 940px; }

.s-modal-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--s-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
}

.s-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.s-modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--s-border);
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.ok { border-left: 4px solid var(--s-success); }
.toast.err { border-left: 4px solid var(--s-danger); }

/* Canvas Cropper Stage */
.canvas-stage {
  background: #0f172a;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  overflow: auto;
}
.canvas-stage canvas {
  max-width: 100%;
  max-height: 380px;
  background: repeating-conic-gradient(#1e293b 0% 25%, #0f172a 0% 50%) 50% / 16px 16px;
  border-radius: 6px;
}

/* Responsive Layout Helpers for Studio Views */
.s-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.s-overview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}

.s-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.s-nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.s-nav-group {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: #ffffff;
}

.s-subnav-wrap {
  margin-top: 10px;
  margin-left: 18px;
  padding-left: 14px;
  border-left: 2px solid #c7d2fe;
}

.s-subnav-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.s-subnav-addbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

@media (max-width: 980px) {
  .studio-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 95;
    width: 272px;
    max-width: 84vw;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.35);
  }
  .studio-sidebar.open {
    transform: translateX(0);
  }
  .mob-menu-btn,
  .sb-close-btn,
  .ed-insp-toggle {
    display: inline-flex;
  }
  .s-overview-grid,
  .media-layout,
  .s-grid-3 {
    grid-template-columns: 1fr;
  }
  .editor-inspector {
    display: none;
  }
  .editor-inspector.mobile-open {
    display: block;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(330px, 88vw);
    z-index: 92;
    box-shadow: -12px 0 36px rgba(15, 23, 42, 0.25);
  }
  .editor-stage {
    flex-direction: column;
  }
  .split-preview-pane {
    border-left: none;
    border-top: 2px solid #cbd5e1;
  }
}

@media (max-width: 680px) {
  .studio-topbar {
    height: auto;
    min-height: 56px;
    padding: 8px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .studio-content {
    padding: 14px;
  }
  .s-card {
    padding: 16px;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-val {
    font-size: 21px;
  }
  .s-grid-2,
  .s-nav-row {
    grid-template-columns: 1fr;
  }
  .s-subnav-wrap {
    margin-left: 6px;
    padding-left: 10px;
  }
  .s-subnav-row {
    grid-template-columns: 1fr;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
  }
  .hide-xs {
    display: none;
  }
  .editor-header-bar {
    padding: 8px 12px;
    gap: 8px;
  }
  .wysiwyg-toolbar {
    padding: 6px 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .tb-group {
    flex-shrink: 0;
  }
  .mode-tabs {
    flex-shrink: 0;
  }
  .wysiwyg-scroll {
    padding: 10px;
  }
  .wysiwyg-paper {
    padding: 20px 16px;
    min-height: 400px;
    border-radius: 10px;
  }
  .s-modal-backdrop {
    padding: 10px;
  }
  .s-modal-head,
  .s-modal-body,
  .s-modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  .s-modal-head,
  .s-modal-foot {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
  .plan-chip {
    display: none;
  }
}

/* Calm, editorial workspace — inspired by modern publishing dashboards. */
:root { --s-primary:#302e33; --s-primary-hover:#171619; --s-primary-soft:#f0f0f1; --s-bg:#f6f6f5; --s-border:#e9e9e7; --s-border-strong:#dededc; --s-muted:#777b80; }
.studio-sidebar { width:230px; background:#111214; color:#c6c7ca; border-right:1px solid #252529; }
.sb-brand { padding:21px 17px 17px; border-color:#242529; }
.sb-logo { font-size:15px; font-weight:700; color:#f2f3f3; gap:10px; letter-spacing:-.02em; }
.sb-logo-box { background:transparent; border:1.5px solid #b5b5bc; border-radius:50%; width:29px; height:29px; }
.sb-logo-box svg { width:14px; height:14px; }
.ws-switcher-wrap { padding:17px 14px; border-color:#242529; }
.ws-label { color:#85858d; letter-spacing:.08em; font-size:10px; }
.ws-select { min-width:0; background:#191a1d; color:#e8e8e9; border-color:#2e3034; font-size:12px; font-weight:500; }
.ws-add-btn { background:#1e1f22; color:#d8d8da; border:1px solid #303136; font-weight:400; }
.ws-add-btn:hover { background:#343438; }
.sb-nav { padding:9px 10px; }
.sb-section-title { color:#6f7179; font-size:10px; letter-spacing:.09em; padding:18px 10px 7px; }
.sb-item { color:#a6a7ac; padding:9px 10px; gap:11px; font-weight:500; font-size:12.5px; border-radius:6px; }
.sb-icon { width:16px; height:16px; display:inline-flex; flex:none; align-items:center; justify-content:center; color:#888a91; }
.sb-icon svg { display:block; width:16px; height:16px; }
.sb-item:hover { background:#1e1f22; color:#f7f7f7; }
.sb-item.active { color:#f4f4f5; background:#242529; font-weight:650; }
.sb-item.active .sb-icon { color:#f1f1f2; }
.sb-item .sb-badge { background:#25262a; color:#a7a8ad; font-size:10px; padding:2px 7px; }
#sb-admin-section .sb-section-title { color:#6f7179!important; }
.sb-quota { background:#191a1d; border-color:#27282c; margin:8px 12px; }
.quota-bar { background:#303136; height:4px; }
.quota-fill { background:#bb4f9d; }
.sb-user { border-color:#252529; }
.studio-topbar { border-color:#e9e9e7; }
.plan-chip { color:#69676b; background:#f1f1f1; }
.s-btn { box-shadow:none; font-weight:600; }
.s-btn-primary { background:#29292c; border-color:#29292c; color:#fff; }
.s-btn-primary:hover { background:#161719; border-color:#161719; }

/* The overview is a dark canvas; existing editors remain legible in their own workspace. */
body[data-studio-view="overview"] .studio-main { background:#101113; }
body[data-studio-view="overview"] .studio-topbar { background:#101113; color:#f4f4f4; border-color:#242529; }
body[data-studio-view="overview"] .plan-chip { background:#222326; color:#b7b8be; }
body[data-studio-view="overview"] .topbar-actions .s-btn { background:#1d1e21; border-color:#34353a; color:#dddde0; }
body[data-studio-view="overview"] .topbar-actions .s-btn:hover { background:#2b2c30; }
body[data-studio-view="overview"] .topbar-actions .s-btn-primary { background:#f1f1f1; color:#18181a; border-color:#f1f1f1; }
body[data-studio-view="overview"] .mob-menu-btn { background:#1d1e21; color:#f0f0f0; border-color:#34353a; }
body[data-studio-view="overview"] .studio-content { background:#101113; padding:34px clamp(24px,4vw,64px) 50px; }
.davo-dashboard { max-width:1180px; margin:0 auto; color:#eeeef0; }
.dash-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin:0 0 28px; }
.dash-kicker { color:#85838b; font-size:10px; font-weight:700; letter-spacing:.12em; margin-bottom:10px; }
.dash-kicker span { padding:0 6px; color:#5b5b61; }
.dash-heading h2 { margin:0; color:#f6f6f7; font-size:30px; letter-spacing:-.045em; line-height:1.1; font-weight:700; }
.dash-heading p { color:#888a90; margin:8px 0 0; font-size:13px; }
.dash-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:6px; padding:10px 15px; font:600 12px inherit; font-family:inherit; font-size:12px; cursor:pointer; white-space:nowrap; }
.dash-button-primary { background:#f0f0f1; border:1px solid #f0f0f1; color:#1b1c1e; }
.dash-button-primary:hover { background:#d8d8da; }
.dash-button-primary span { font-size:17px; font-weight:400; line-height:1; }
.dash-stat-strip { background:#191a1d; border:1px solid #232428; display:grid; grid-template-columns:repeat(3,1fr); border-radius:4px; margin-bottom:18px; }
.dash-metric { padding:20px 24px 19px; min-width:0; }
.dash-metric + .dash-metric { border-left:1px solid #2c2d31; }
.dash-metric span,.dash-insights > div > span { display:block; color:#adaeb3; font-size:12px; font-weight:600; }
.dash-metric strong { display:block; font-size:25px; line-height:1.2; letter-spacing:-.035em; margin:9px 0 4px; color:#f6f6f6; }
.dash-metric small,.dash-insights small { display:block; font-size:11px; color:#7f8187; }
.dash-card { background:#141518; border:1px solid #28292d; border-radius:4px; margin-bottom:18px; overflow:hidden; }
.dash-card-head { padding:20px 23px; display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.dash-card-head h3 { margin:0; font-size:13px; font-weight:650; color:#ececef; }
.dash-card-head p { color:#81828a; font-size:11.5px; margin:6px 0 0; }
.dash-date { font-size:11px; color:#86878e; white-space:nowrap; }
.dash-chart { height:190px; margin:4px 23px 0; }
.dash-chart svg { width:100%; height:100%; display:block; overflow:visible; }
.dash-axis { display:flex; justify-content:space-between; color:#777980; font-size:10px; margin:8px 23px 22px; }
.dash-insights { border-top:1px solid #28292d; display:grid; grid-template-columns:repeat(3,1fr); }
.dash-insights > div { min-width:0; padding:20px 23px 21px; }
.dash-insights > div + div { border-left:1px solid #28292d; }
.dash-insights strong { display:block; margin:9px 0 4px; color:#efeff1; font-size:20px; font-weight:650; letter-spacing:-.03em; }
.dash-insights .dash-plan-name { font-size:17px; overflow-wrap:anywhere; }
.dash-insights a { display:inline-block; color:#d194c6; text-decoration:none; font-size:11px; margin-top:4px; }
.dash-insights a:hover { text-decoration:underline; }
.dash-progress { width:100%; height:3px; background:#303036; margin:8px 0; border-radius:3px; overflow:hidden; }
.dash-progress span { display:block; height:100%; background:linear-gradient(90deg,#8a55c8,#d64c9d); }
.dash-text-button { background:none; border:0; padding:0; font:600 11.5px inherit; font-family:inherit; font-size:11.5px; color:#a5a5ad; cursor:pointer; text-decoration:none; }
.dash-text-button:hover { color:#fff; }
.dash-table-wrap { width:100%; overflow-x:auto; }
.dash-table { width:100%; border-collapse:collapse; min-width:490px; }
.dash-table th { color:#777980; text-align:left; font-size:10px; font-weight:600; padding:10px 23px; border-bottom:1px solid #27282c; text-transform:uppercase; letter-spacing:.06em; }
.dash-table td { padding:13px 23px; border-bottom:1px solid #242529; font-size:12px; }
.dash-table tr:last-child td { border-bottom:0; }
.dash-table tbody tr:hover { background:#1a1b1e; }
.dash-table td small { display:block; color:#73757d; font-size:10.5px; margin-top:4px; }
.dash-page-title { color:#e3e4e6; font-weight:600; }
.dash-home { color:#94949b; font-size:10px; padding:2px 5px; border:1px solid #34353a; border-radius:3px; margin-left:6px; font-weight:500; }
.dash-subpage { color:#c77db4; margin-right:5px; }
.dash-status { color:#9c9da3; font-size:11px; white-space:nowrap; }
.dash-status i { display:inline-block; width:6px; height:6px; border-radius:50%; background:#8a8b92; margin-right:6px; vertical-align:middle; }
.dash-status.is-published i { background:#74ba93; }
.dash-status.is-draft i { background:#c5a85f; }
.dash-muted { color:#909198; white-space:nowrap; }
.dash-edit { color:#a9a9b0; background:transparent; border:0; cursor:pointer; font:inherit; white-space:nowrap; }
.dash-edit:hover { color:#f4f4f5; }
.dash-empty { color:#98999f; padding:25px!important; }
.dash-bottom-actions { display:flex; gap:22px; flex-wrap:wrap; margin:23px 2px 0; }
.dash-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:680px) {
 body[data-studio-view="overview"] .studio-content { padding:25px 16px 42px; }
 .dash-heading { align-items:flex-start; flex-wrap:wrap; margin-bottom:22px; }
 .dash-heading h2 { font-size:27px; }
 .dash-stat-strip { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .dash-metric { padding:16px 12px; }
 .dash-metric span { font-size:10px; }
 .dash-metric strong { font-size:21px; }
 .dash-metric small { font-size:10px; line-height:1.4; }
 .dash-chart { height:145px; margin-left:16px; margin-right:16px; }
 .dash-card-head { padding:18px 16px; }
 .dash-axis { margin-left:16px; margin-right:16px; }
 .dash-insights { grid-template-columns:1fr; }
 .dash-insights > div { padding:16px; }
 .dash-insights > div + div { border-left:0; border-top:1px solid #28292d; }
 .dash-table th,.dash-table td { padding-left:16px; padding-right:16px; }
}
@media(max-width:360px) { .dash-stat-strip { grid-template-columns:1fr; } .dash-metric + .dash-metric { border-left:0; border-top:1px solid #2c2d31; } }

/* Apply the same understated shell to content management without altering the site canvas. */
.studio-topbar { background:#101113; color:#f4f4f4; border-color:#242529; }
.studio-topbar .plan-chip { background:#222326; color:#b7b8be; }
.studio-topbar .topbar-actions .s-btn { background:#1d1e21; border-color:#34353a; color:#dddde0; }
.studio-topbar .topbar-actions .s-btn:hover { background:#2b2c30; }
.studio-topbar .topbar-actions .s-btn-primary { background:#f1f1f1; border-color:#f1f1f1; color:#18181a; }
.studio-topbar .mob-menu-btn { background:#1d1e21; color:#f0f0f0; border-color:#34353a; }
body[data-studio-view="pages"] .studio-main, body[data-studio-view="pages"] .studio-content { background:#101113; color:#e8e8ea; }
body[data-studio-view="pages"] .studio-content { padding:32px clamp(18px,4vw,52px); }
body[data-studio-view="pages"] .s-card { background:#141518; border:1px solid #28292d; border-radius:5px; }
body[data-studio-view="pages"] .s-table th { background:#191a1d; color:#92939a; border-color:#28292d; }
body[data-studio-view="pages"] .s-table td { color:#d2d2d6; border-color:#28292d; }
body[data-studio-view="pages"] .s-table tr:hover td { background:#1b1c20; }
body[data-studio-view="pages"] .s-table td div[style*="color:#0f172a"] { color:#ededee!important; }
body[data-studio-view="pages"] .s-table td [style*="color:#64748b"] { color:#92939a!important; }
body[data-studio-view="pages"] .s-table td[style*="color:#64748b"] { color:#92939a!important; }
body[data-studio-view="pages"] .s-btn { background:#202125; border-color:#36373c; color:#dadade; }
body[data-studio-view="pages"] .s-btn:hover { background:#303136; border-color:#484950; }
body[data-studio-view="pages"] .s-btn-primary { background:#eeeeef; border-color:#eeeeef; color:#202125; }
body[data-studio-view="pages"] .s-btn-primary:hover { background:#d9d9dc; }
body[data-studio-view="pages"] .s-btn-danger { background:transparent; border-color:#613c43; color:#f39ea5; }
body[data-studio-view="pages"] .s-btn-danger:hover { background:#3a252a; }
body[data-studio-view="pages"] .s-input { background:#1a1b1e; border-color:#36373c; color:#eeeef0; }
body[data-studio-view="pages"] .pill-pub { background:#1c3026; border-color:#315d44; color:#9bd1ac; }
body[data-studio-view="pages"] .pill-draft { background:#30291b; border-color:#594a2e; color:#dfc286; }
body[data-studio-view="pages"] .pill-home, body[data-studio-view="pages"] .pill-sub { background:#25242b; border-color:#45414f; color:#c7bdde; }
@media(max-width:680px){body[data-studio-view="pages"] .studio-content{padding:20px 14px 36px}}

/* Left widget panel: drag a widget onto the page, or click to add it */
.editor-panel {
  width: 236px;
  background: #fff;
  border-right: 1px solid var(--s-border);
  overflow-y: auto;
  padding: 12px 12px 26px;
  flex-shrink: 0;
}
.editor-panel[hidden] { display: none; }
.pb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pb-group-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #64748b; margin: 14px 0 6px;
}
.pb-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: 1px solid #e2e8f0; background: #fff; border-radius: 9px; padding: 8px 10px;
  margin-bottom: 6px; cursor: grab; color: #0f172a; font-size: 12.5px; font-weight: 600;
}
.pb-item:hover { border-color: #4f46e5; background: #f5f3ff; }
.pb-item:active { cursor: grabbing; }
.pb-item .pb-icon {
  flex: 0 0 22px; width: 22px; height: 22px; display: flex; align-items: center;
  justify-content: center; border-radius: 6px; background: #eef2ff; color: #4338ca; font-size: 12px;
}
.pb-item small { display: block; font-weight: 400; color: #64748b; font-size: 11px; line-height: 1.35; }
@media (max-width: 1180px) { .editor-panel { display: none; } }

.pb-ghost {
  position: fixed;
  z-index: 2147483000;
  pointer-events: none;
  background: #4f46e5;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 7px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

/* --- Pages / Blog tabs ------------------------------------------------- */
.pg-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.pg-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.pg-tab:hover { background: #e2e8f0; color: #0f172a; }
.pg-tab.active { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.pg-tab-count {
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}
.pg-tab.active .pg-tab-count { background: #4f46e5; color: #fff; }

/* davo:header-footer-designer:begin */
/*
   The Header & Footer screen: two panels, one open at a time, each with a
   live preview, a row of layouts and a short strip of style controls. */
.hf-focus{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;font-size:13.5px;color:#475569;cursor:pointer}
.hf-focus input{margin:0}
.hf-panel{background:#fff;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:14px;overflow:hidden}
.hf-phead{display:flex;align-items:center;gap:12px;padding:14px 16px;cursor:pointer;user-select:none}
.hf-phead:hover{background:#f8fafc}
.hf-chev{width:16px;height:16px;flex:0 0 16px;color:#64748b;transition:transform .15s}
.hf-phead.closed .hf-chev,.hf-sechead.closed .hf-chev{transform:rotate(-90deg)}
.hf-ptitle{font-weight:600;white-space:nowrap}
.hf-psum{color:#64748b;font-size:12.5px;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hf-hint{font-size:12px;color:#94a3b8;white-space:nowrap}
.hf-pbody{padding:0 16px 16px;border-top:1px solid #e2e8f0}
.hf-panel.collapsed .hf-pbody{display:none}
.hf-preview{padding:14px 0 6px}
.hf-sec{border-bottom:1px solid #f1f5f9}
.hf-sec:last-child{border-bottom:0}
.hf-sechead{display:flex;align-items:center;gap:8px;padding:12px 0;cursor:pointer;font-size:13px;font-weight:600;color:#334155}
.hf-hint{margin-left:auto;font-weight:400;color:#64748b;font-size:12px}
.hf-sec.collapsed .hf-secbody{display:none}
.hf-gallery{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;padding-bottom:4px}
@media (max-width:760px){.hf-gallery{grid-template-columns:repeat(3,1fr)}}
.hf-pick{border:1.5px solid #e2e8f0;border-radius:10px;background:#fff;padding:8px 6px 7px;cursor:pointer;text-align:center;transition:.12s}
.hf-pick:hover{border-color:#c7d2fe;background:#f8faff}
.hf-pick.on{border-color:#4f46e5;background:#eef2ff}
.hf-cap{display:block;font-size:11.5px;color:#475569;margin-top:5px}
.hf-pick.on .hf-cap{color:#4f46e5;font-weight:600}
.hf-thumb{height:38px;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:0 5px}
.hf-thumb .r{display:flex;align-items:center;gap:3px;justify-content:center}
.hf-thumb .r.wide{justify-content:space-between}
.hf-thumb .r.stack{flex-direction:column;gap:3px}
.hf-thumb .c{display:flex;flex-direction:column;gap:3px}
.hf-thumb i{display:block;height:4px;border-radius:2px;background:#cbd5e1;width:8px}
.hf-thumb i.b{width:12px;height:7px;background:#94a3b8}
.hf-thumb i.t{width:14px}
.hf-thumb i.wide{width:22px}
.hf-thumb i.cta{width:14px;height:6px;background:#a5b4fc;border-radius:3px}
.hf-thumb i.grow{flex:1;max-width:24px}
.hf-thumb .floating{margin:0 auto;width:100%;border:1px solid #e2e8f0;border-radius:999px;padding:3px 5px;display:flex;align-items:center;gap:3px}
.hf-thumb .stackline{height:1px;background:#e2e8f0;margin:2px 0}
.hf-thumb .hf-reset{display:block;text-align:center;font-size:17px;color:#94a3b8;line-height:38px}
.hf-row{display:flex;align-items:center;gap:12px;padding:6px 0;flex-wrap:wrap}
.hf-lab{width:96px;flex:0 0 96px;font-size:12.5px;color:#475569}
.hf-seg{display:inline-flex;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden}
.hf-seg button{border:0;background:#fff;padding:6px 11px;font:500 12.5px/1 inherit;color:#475569;cursor:pointer;border-right:1px solid #e2e8f0}
.hf-seg button:last-child{border-right:0}
.hf-seg button:hover{background:#f8fafc}
.hf-seg button.on{background:#4f46e5;color:#fff}
.hf-linkish{background:none;border:0;color:#4f46e5;font:inherit;font-size:12.5px;cursor:pointer;padding:6px 0 0;text-decoration:underline}
.hf-field{margin:8px 0}
.hf-note{font-size:12px;color:#64748b;margin:8px 0}
.hf-cols{display:grid;gap:12px;margin:10px 0}
.hf-col{border:1px solid #e8edf4;border-radius:10px;padding:10px 12px;background:#fbfcfe}
.hf-col-head{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.hf-col-title{font-weight:600}
.hf-x{border:0;background:#eef2f7;color:#64748b;width:26px;height:26px;border-radius:7px;cursor:pointer;font-size:15px;line-height:1;flex:0 0 26px}
.hf-x:hover{background:#e2e8f0;color:#0f172a}
.hf-linkrow{display:grid;grid-template-columns:1fr 1.3fr auto;gap:8px;margin-bottom:8px}
.hf-actions{display:flex;gap:10px;align-items:center;margin-top:16px;flex-wrap:wrap}

/* The social palette: a tile for every network, then one row per link. */
.hf-palette{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px;margin:4px 0 14px}
.hf-tile{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 6px;border:1px solid #dbe1ea;
  border-radius:10px;background:#fff;cursor:pointer;font:inherit;color:#334155;transition:border-color .15s,background .15s,transform .1s}
.hf-tile:hover:not(:disabled){border-color:#94a3b8;background:#f8fafc}
.hf-tile:active:not(:disabled){transform:translateY(1px)}
.hf-tile:disabled{opacity:.42;cursor:default}
.hf-tile-icon{display:inline-flex;width:22px;height:22px}
.hf-tile-icon svg{width:22px;height:22px}
.hf-tile-name{font-size:11.5px;font-weight:600;letter-spacing:.01em}
.hf-socrows{display:grid;gap:8px}
.hf-socrow{display:grid;grid-template-columns:22px 104px 1fr auto auto auto;gap:8px;align-items:center}
.hf-socrow-icon{display:inline-flex;width:20px;height:20px;color:#475569}
.hf-socrow-icon svg{width:20px;height:20px}
.hf-socrow-name{font-size:12px;color:#475569;font-weight:600}
.hf-socrow .s-input{padding:6px 9px;font-size:12.5px}
.hf-color{width:46px;height:30px;padding:2px;border:1px solid #dbe1ea;border-radius:8px;background:#fff;cursor:pointer}
/* Width lives with its column, not in another screen. */
.hf-column-width{display:flex;align-items:center;gap:8px;margin:2px 0 10px;color:#64748b;font-size:12px}
.hf-column-width select{width:auto;min-width:130px;max-width:100%}
@media(max-width:600px){.hf-linkrow{grid-template-columns:1fr auto}.hf-linkrow input[data-hf-link-url]{grid-column:1}.hf-linkrow .hf-x{grid-column:2;grid-row:1 / span 2}}

/* Keep the column controls in view as soon as the footer panel opens. */
.hf-column-quick{border:1px solid #c7d2fe;background:#f8faff;border-radius:10px;padding:12px;margin:12px 0 6px}
.hf-column-quick>strong{display:block;font-size:14px;color:#26346c}
.hf-column-choices{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 2px}
.hf-column-choice{border:1px solid #a5b4fc;background:white;border-radius:7px;padding:7px 10px;color:#3730a3;cursor:pointer;font:inherit;font-size:12px}
.hf-column-choice:hover{background:#eef2ff}

/* Interactive footer guides exist only in the studio preview overlay. */
.hf-frame .hf-guide{position:absolute;z-index:10;width:28px;margin:0;padding:0;border:0;background:transparent;transform:translateX(-50%);cursor:col-resize;touch-action:none}
.hf-frame .hf-guide::before{content:"";position:absolute;left:50%;top:0;bottom:0;border-left:2px dashed #7c3aed;filter:drop-shadow(0 0 1px white)}
.hf-frame .hf-guide-knob{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#6d28d9;color:white;border:2px solid white;font:700 15px/1 system-ui;box-shadow:0 1px 6px #0005;pointer-events:none}
.hf-frame .hf-guide:hover .hf-guide-knob,.hf-frame .hf-guide:focus-visible .hf-guide-knob,.hf-frame .hf-guide.dragging .hf-guide-knob{background:#4c1d95;box-shadow:0 0 0 3px #c4b5fd}
.hf-frame .hf-guide:focus-visible{outline:none}

/* davo:header-footer-designer:end */




