/* Pastegram v71.14 — welcome theme sync, tighter sidebar layouts, compact default text, modern light background */
:root{
  --pg714-bgA:#f6f8fe;
  --pg714-bgB:#eef3ff;
  --pg714-bgC:#ffffff;
  --pg714-line:#dbe3f4;
  --pg714-ink:#1a2947;
  --pg714-muted:#657694;
  --pg714-accent:#5664f6;
}
html[data-theme="light"] body{
  background:
    radial-gradient(circle at top left, #ffffff 0, #f7f9ff 36%, transparent 60%),
    linear-gradient(180deg, #f7f9ff 0%, #eef3fb 100%) !important;
}
html[data-theme="light"] header{
  background:linear-gradient(180deg,#ffffff,#f8faff) !important;
}
html[data-theme="light"] #workspace{
  background:linear-gradient(180deg,#f7faff,#eef3fb 100%) !important;
  border:1px solid #e2e8f4 !important;
  box-shadow:0 12px 34px rgba(37,65,122,.08) !important;
}
html[data-theme="light"] #stage{
  background:
    radial-gradient(circle at top, rgba(86,100,246,.08), transparent 36%),
    linear-gradient(180deg,#fbfcff 0%, #f2f6fd 100%) !important;
}
html[data-theme="light"] .canvas-container{
  background:repeating-conic-gradient(#f8f9fd 0% 25%,#edf1f8 0% 50%) 50%/20px 20px !important;
}

/* Welcome / start creating popup should adapt to theme */
html[data-theme="light"] dialog.pg7111-welcome{
  background:linear-gradient(160deg,#ffffff 0%, #f3f6ff 100%) !important;
  color:var(--pg714-ink) !important;
  border:1px solid #e1e8f5 !important;
  box-shadow:0 30px 90px rgba(27,42,78,.20) !important;
}
html[data-theme="light"] dialog.pg7111-welcome .pg7111-eyebrow{color:#5d71e8 !important;}
html[data-theme="light"] dialog.pg7111-welcome h2{color:#18284a !important;}
html[data-theme="light"] dialog.pg7111-welcome p,
html[data-theme="light"] dialog.pg7111-welcome .pg7111-footer{color:#6a7b97 !important;}
html[data-theme="light"] dialog.pg7111-welcome .pg7111-blank{
  background:#ffffff !important;
  border:1px solid #dbe4f4 !important;
  color:#233554 !important;
}
html[data-theme="light"] dialog.pg7111-welcome .pg7111-project{color:#4e62e3 !important;}
html[data-theme="dark"] dialog.pg7111-welcome{
  background:linear-gradient(160deg,#13233d 0%, #0d172b 100%) !important;
  color:#eef4ff !important;
}
html[data-theme="dark"] dialog.pg7111-welcome h2{color:#f7f9ff !important;}
html[data-theme="dark"] dialog.pg7111-welcome p,
html[data-theme="dark"] dialog.pg7111-welcome .pg7111-footer{color:#b9c7e1 !important;}
html[data-theme="dark"] dialog.pg7111-welcome .pg7111-blank{
  background:#22344f !important;
  border-color:#445978 !important;
  color:#f6f9ff !important;
}

/* Desktop column balance: give the tool panel a fuller useful width to remove empty gap */
@media (min-width: 901px){
  main{
    grid-template-columns:76px minmax(270px,330px) minmax(0,1fr) minmax(272px,315px) !important;
    gap:12px !important;
  }
  #quick-sidebar{
    width:auto !important;
    padding:0 !important;
    overflow:hidden !important;
  }
  #quick-sidebar #panel{
    padding:14px 14px 22px !important;
    width:100% !important;
  }
}
#quick-sidebar .side-title{padding:14px 14px 12px !important;}
#quick-sidebar #panel > *{width:100% !important;max-width:100% !important;min-width:0 !important;}
#quick-sidebar #panel .catalog,
#quick-sidebar #panel .quick-grid,
#quick-sidebar #panel .fields,
#quick-sidebar #panel .button-grid,
#quick-sidebar #panel .pg65-action-grid,
#quick-sidebar #panel .pg65-preset-grid,
#quick-sidebar #panel .pg67-template-grid,
#quick-sidebar #panel .pg67-grid,
#quick-sidebar #panel .pg66-grid,
#quick-sidebar #panel .pg70-actions{width:100% !important;}
#quick-sidebar #panel .catalog{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
#quick-sidebar #panel .catalog button{width:100% !important;min-width:0 !important;}
#quick-sidebar #panel .pg70-page,
#quick-sidebar #panel .pg67-card,
#quick-sidebar #panel .pg68-card,
#quick-sidebar #panel .pg65-card{width:100% !important;}

/* Modern, easier-to-read cards in the narrow sidebar */
#quick-sidebar #panel :is(.pg67-card,.pg68-card,.pg65-card,.pg70-group,.pg67-panel-card,.pg65-tool-card){
  border-radius:20px !important;
  background:linear-gradient(180deg,#ffffff,#f9fbff) !important;
}
html[data-theme="dark"] #quick-sidebar #panel :is(.pg67-card,.pg68-card,.pg65-card,.pg70-group,.pg67-panel-card,.pg65-tool-card){
  background:linear-gradient(180deg,#223450,#1d2c45) !important;
}

/* Modern tabbed panel look */
#quick-sidebar #panel :is(.tabs,.pg67-tabs,.section-tabs),
#quick-sidebar #panel > .segmented{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:8px !important;
}
#quick-sidebar #panel :is(.tabs,.pg67-tabs,.section-tabs) > button,
#quick-sidebar #panel > .segmented > button{
  min-height:46px !important;
  border-radius:16px !important;
}

/* Make floating canvas controls more modern */
#workspace .floating-tools{
  gap:10px !important;
  padding:10px 12px !important;
  border-radius:22px !important;
  background:rgba(255,255,255,.92) !important;
}
#workspace .floating-tools button{
  min-width:58px !important;
  min-height:56px !important;
  border-radius:16px !important;
}
html[data-theme="dark"] #workspace .floating-tools{background:rgba(24,40,64,.92) !important;}
