:root {
  --purple: #2E266D;
  --blue: #6C85BD;
  --red: #BB1038;
  --yellow: #FDF59C;
  --orange: #F89851;
  --ink: #1E1A45;
  --muted: #5B5876;
  --line: #E3E1EF;
  --ground: #F6F5FA;
  --tint: #E4E9F4;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Manrope, system-ui, sans-serif; color: var(--ink); background: var(--ground); font-size: 14px; }
a { color: var(--purple); }
h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 17px; font-weight: 800; }
h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* the frame, like ActiveCampaign's: dark top bar + slim icon menu, white working area with a section menu */
.shell { --ac-dark: #00001F; --ac-blue: #004CFF; --ac-ink: #00002D; min-height: 100vh; background: var(--ac-dark); display: grid;
  grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); grid-template-areas: "top top" "rail frame"; }
.topbar { grid-area: top; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 14px; color: #fff; }
.topbar .brand { color: #fff; text-decoration: none; padding: 0; font-size: 15px; font-weight: 600; gap: 12px; }
.topbar .brand-mark { width: 28px; height: 28px; border-radius: 7px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.top-icon { color: #fff; display: inline-flex; padding: 6px; border-radius: 8px; }
.top-icon:hover, .rail-link:hover { background: rgba(255,255,255,0.12); }
.top-user { position: relative; }
.top-user summary { list-style: none; width: 32px; height: 32px; border-radius: 50%; background: #F2C9A8; color: #3A2A1C; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.top-user summary::-webkit-details-marker { display: none; }
.top-user-menu { position: absolute; right: 0; top: 40px; z-index: 50; background: #fff; color: var(--ac-ink); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); padding: 10px; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.top-user-menu a, .top-user-menu button { display: block; text-align: left; padding: 8px 10px; border-radius: 6px; border: 0; background: none; color: var(--ac-ink); text-decoration: none; cursor: pointer; font: inherit; }
.top-user-menu a:hover, .top-user-menu button:hover { background: #F1F2F4; }
.rail { grid-area: rail; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 16px; }
.rail-link { position: relative; width: 36px; height: 36px; border-radius: 8px; color: #fff; display: flex; align-items: center; justify-content: center; }
.rail-link[aria-current="page"] { background: var(--ac-blue); }
.rail-icon { display: inline-flex; }
.rail-label { position: absolute; left: 46px; top: 50%; transform: translateY(-50%); background: #fff; color: var(--ac-ink); font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 6px;
  white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,0.25); opacity: 0; pointer-events: none; transition: opacity 0.12s; z-index: 60; }
.rail-link:hover .rail-label, .rail-link:focus-visible .rail-label { opacity: 1; }
.frame { grid-area: frame; background: #fff; border-radius: 12px 0 0 0; margin-right: 0; display: flex; min-width: 0; min-height: calc(100vh - 56px); overflow: hidden; }
.section-menu { flex: 0 0 230px; border-right: 1px solid #E2E3E5; padding: 22px 12px; display: flex; flex-direction: column; gap: 2px; }
.section-title { font-size: 20px; font-weight: 500; color: var(--ac-ink); padding: 0 8px 14px; }
.section-menu a { display: flex; align-items: center; min-height: 28px; padding: 4px 12px; border-radius: 8px; color: var(--ac-ink); text-decoration: none; font-size: 12px; font-weight: 500; }
.section-menu a:hover { background: #F1F2F4; }
.section-menu a[aria-current="page"] { background: #E2E3E5; }
.section-menu h3 { color: #1F2129; font-size: 12px; font-weight: 600; letter-spacing: 0; margin: 18px 12px 4px; }
.main { flex: 1 1 auto; min-width: 0; padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 24px; background: #fff; }
body.admin { font-family: "IBM Plex Sans", system-ui, sans-serif; }
body.admin .main h1 { font-size: 24px; font-weight: 600; letter-spacing: 0; color: #00002D; }
body.admin .btn { border-radius: 4px; border-color: #C9CBD1; color: #1F2129; font-weight: 500; min-height: 40px; }
body.admin .btn.primary { background: #004CFF; border-color: #004CFF; color: #fff; }
body.admin .btn.dark { background: #00002D; border-color: #00002D; color: #fff; }
body.admin .main a:not(.btn):not(.tc-btn):not(.int-btn) { color: #004CFF; }
body.admin .card { border-radius: 8px; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 56px auto minmax(0, 1fr); grid-template-areas: "top" "rail" "frame"; }
  .rail { flex-direction: row; overflow-x: auto; padding: 4px 12px 10px; justify-content: flex-start; }
  .rail-link { flex: 0 0 36px; }
  .rail-label { display: none; }
  .frame { flex-direction: column; border-radius: 12px 12px 0 0; }
  .section-menu { flex: none; border-right: 0; border-bottom: 1px solid #E2E3E5; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .section-title, .section-menu h3 { display: none; }
  .main { padding: 20px 16px 32px; }
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-weight: 800; font-size: 17px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--red); }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }

.btn { min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--purple); background: #fff; color: var(--purple); font-weight: 700; cursor: pointer; }
.btn.primary { border-color: var(--red); background: var(--red); color: #fff; }
.btn.dark { background: var(--purple); color: #fff; }
.btn.link { border: none; background: transparent; color: #fff; padding: 0; min-height: 32px; text-align: left; text-decoration: underline; }
.btn:disabled { opacity: 0.6; cursor: default; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea, .search { min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid #C9C6DD; background: #fff; width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.row > .btn { flex: 0 0 auto; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.tile .num { margin-top: 8px; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.split > .wide { flex: 999 1 420px; min-width: 0; }
.split > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
td { padding: 12px 8px; border-bottom: 1px solid #EFEEF6; vertical-align: middle; }
tr.pick { cursor: pointer; }
tr.pick:hover td, tr.on td { background: var(--ground); }
.rowbtn { border: none; background: none; padding: 0; font-weight: 700; cursor: pointer; text-align: left; color: var(--ink); min-height: 32px; }

.chip { display: inline-block; padding: 3px 9px; border-radius: 8px; background: var(--ground); border: 1px solid var(--line); font-size: 12px; font-weight: 700; margin: 0 4px 4px 0; }
.chip.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--purple); }
.chip.blue { background: var(--tint); border-color: var(--tint); color: var(--purple); }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; min-width: 760px; align-items: start; }
.stage { background: #ECEAF4; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.stage-head { display: flex; justify-content: space-between; align-items: center; padding: 4px; font-weight: 800; }
.deal { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.deal select { min-height: 36px; border-radius: 8px; border: 1px solid #C9C6DD; background: #fff; padding: 0 8px; width: 100%; }

.steps { display: flex; flex-direction: column; align-items: flex-start; }
.step { width: 100%; max-width: 420px; background: #fff; border: 1px solid #DCD9EA; border-radius: 12px; padding: 12px 16px; }
.step .kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.step.send .kind { color: var(--red); }
.step.start { background: var(--purple); color: #fff; border-color: var(--purple); }
.step.start .kind { color: var(--yellow); }
.step .what { margin-top: 2px; font-weight: 700; }
.joint { width: 2px; height: 20px; background: #A9A5C8; margin-left: 28px; }

.notice { padding: 12px 14px; border-radius: 10px; background: var(--yellow); color: var(--purple); font-weight: 600; }
.error { padding: 12px 14px; border-radius: 10px; background: #FBE4EA; color: #8A0C29; font-weight: 600; }
.preview { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login .card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }

/* campaign designer */
.designer { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.designer-side { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.designer-main { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.palette-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 68px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); cursor: grab; }
.palette-item:hover { border-color: var(--purple); }
.designer-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; position: sticky; top: 8px; z-index: 2; }
.fmt { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink); }
.fmt.on { background: var(--purple); color: #fff; border-color: var(--purple); }
.paper-bg { border-radius: 14px; padding: 24px 12px; }
.paper { margin: 0 auto; border-radius: 4px; transition: max-width 0.2s; }
.paper .block { position: relative; outline: 2px solid transparent; outline-offset: -2px; cursor: pointer; }
.paper .block:hover { outline-color: #C9C6DD; }
.paper .block.selected { outline-color: var(--red); }
.paper .block.drop-before { box-shadow: inset 0 3px 0 var(--blue); }
.paper .block.drop-after { box-shadow: inset 0 -3px 0 var(--blue); }
.block-tools { position: absolute; top: -14px; right: 8px; display: none; gap: 4px; z-index: 1; }
.paper .block.selected .block-tools, .paper .block:hover .block-tools { display: flex; }
.block-tool { min-height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: var(--purple); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.block-tool:disabled { opacity: 0.4; }
.block-tool[draggable] { cursor: grab; }
.paper .pad { padding: 10px 32px; }
.paper .editable { outline: none; min-height: 1em; cursor: text; }
.paper .editable p { margin: 0 0 12px; }
.paper .placeholder { border: 2px dashed #C9C6DD; border-radius: 8px; padding: 32px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.spacer-preview { background: repeating-linear-gradient(45deg, transparent, transparent 6px, #F6F5FA 6px, #F6F5FA 12px); }
.drop-end { margin: 8px 32px; padding: 16px; border: 2px dashed #DCD9EA; border-radius: 8px; text-align: center; color: var(--muted); font-size: 13px; }
.drop-end.on { border-color: var(--blue); color: var(--purple); }
.paper-footer { padding: 16px 32px 24px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--muted); }
.choice { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.choice.on { border-color: var(--purple); background: var(--ground); }
.preview-dialog { width: min(1000px, 94vw); border: 0; border-radius: 14px; padding: 20px; }
.preview-dialog::backdrop { background: rgba(30, 26, 69, 0.5); }

/* Email area: menu, list, calendar, settings page */
.submenu { flex: 1 1 200px !important; max-width: 260px; gap: 2px !important; padding: 18px; align-self: flex-start; }
.submenu h3 { margin: 14px 0 4px; }
.submenu-link { display: flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.submenu-link:hover { background: var(--ground); }
.submenu-link[aria-current="page"] { background: var(--tint); color: var(--purple); font-weight: 800; }
.toolbar-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--ground); }
.toolbar-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 1px solid #C9C6DD; border-radius: 10px; background: #fff; font-weight: 700; }
.filter select { max-width: 220px; border: 0; background: transparent; font: inherit; font-weight: 500; min-height: 40px; }
.view-toggles { display: inline-flex; border: 1px solid #C9C6DD; border-radius: 10px; overflow: hidden; background: #fff; }
.view-toggle { width: 44px; height: 44px; border: 0; background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.view-toggle.on { background: var(--purple); color: #fff; }
.campaign-table td { vertical-align: middle; }
.thumb { width: 96px; height: 72px; flex: none; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; position: relative; background: #fff; display: flex; align-items: center; justify-content: center; }
.thumb iframe { position: absolute; top: 0; left: 0; width: 600px; height: 450px; border: 0; transform: scale(0.16); transform-origin: 0 0; pointer-events: none; }
.thumb.large { width: 240px; height: 320px; }
.thumb.large iframe { width: 600px; height: 800px; transform: scale(0.4); }
.plus { width: 32px; height: 32px; border: 1px solid #C9C6DD; border-radius: 6px; background: #fff; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; color: var(--ink); }
.edit-group { display: inline-flex; align-items: stretch; }
.edit-group > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; cursor: pointer; min-height: 44px; min-width: 40px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--purple); border-radius: 10px; background: #fff; color: var(--purple); font-weight: 700; font-size: 13px; }
.menu > summary::-webkit-details-marker { display: none; }
.edit-group .menu > summary { border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.edit-group .menu > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); }
.menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(30, 26, 69, 0.15); padding: 6px; display: flex; flex-direction: column; }
.menu-item { min-height: 40px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; text-align: left; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.menu-item:hover { background: var(--ground); }
.emoji-grid { display: grid; grid-template-columns: repeat(4, 44px); min-width: 0; }
.emoji-grid .menu-item { text-align: center; font-size: 20px; padding: 0; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: 4px; min-width: 780px; }
.cal-head { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 4px 6px; }
.cal-day { min-height: 96px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.cal-day.other { background: var(--ground); color: var(--muted); }
.cal-day.today { border-color: var(--red); }
.cal-num { font-size: 12px; font-weight: 700; }
.cal-item { display: block; padding: 3px 6px; border-radius: 6px; font-size: 12px; font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item.sent { background: var(--tint); color: var(--purple); }
.cal-item.planned { background: var(--yellow); color: var(--purple); }
.action-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; position: sticky; top: 8px; z-index: 5; background: rgba(246, 245, 250, 0.95); padding: 8px 0; }
/* on wide screens the table fits, so its Edit menus may drop below the table instead of being cut off */
@media (min-width: 1100px) { .scroll:has(> .campaign-table) { overflow: visible; } }

/* full-screen designer, laid out like ActiveCampaign's */
.designer-screen { height: 100vh; display: flex; flex-direction: column; background: #fff; }
.designer-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.designer-sub { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 20px; border-bottom: 1px solid var(--line); }
.designer-name { font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; min-width: 0; flex: 1 1 200px; max-width: 420px; background: transparent; }
.designer-name:hover, .designer-name:focus { border-color: #C9C6DD; }
.tools { display: flex; align-items: center; gap: 2px; }
.tool { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tool:hover { background: var(--ground); }
.tool:disabled { opacity: 0.35; cursor: default; }
.tool-gap { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.designer-body { flex: 1; display: flex; min-height: 0; }
.designer-center { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--ground); }
.format-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.designer-canvas { flex: 1; overflow: auto; }
.canvas-page { min-height: 100%; padding: 24px 12px 60px; box-sizing: border-box; }
.sec { position: relative; outline: 2px solid transparent; outline-offset: -2px; padding: 0 12px; cursor: pointer; }
.sec:hover { outline-color: #9FD9CF; }
.sec.selected { outline-color: #2BB5A0; }
.sec-label { position: absolute; top: 0; right: 0; z-index: 2; display: none; background: #E6F6F3; color: #24534C; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 0 0 0 6px; }
.sec:hover .sec-label, .sec.selected .sec-label, .sec.has-hide .sec-label { display: block; }
.sec-inner { margin: 0 auto; box-sizing: border-box; }
.sec-cols { display: flex; gap: 16px; }
.sec-cols.stacked { flex-direction: column; }
.sec-col { min-width: 0; display: flex; flex-direction: column; }
.blk { position: relative; outline: 2px solid transparent; outline-offset: -2px; }
.blk:hover { outline-color: #C9C6DD; }
.blk.selected { outline-color: var(--red); }
.blk.has-hide { opacity: 0.6; }
.blk.drop-before, .sec.drop-before { box-shadow: inset 0 3px 0 var(--blue); }
.blk.drop-after, .sec.drop-after { box-shadow: inset 0 -3px 0 var(--blue); }
.el-tools { position: absolute; top: -16px; right: 8px; z-index: 3; display: flex; gap: 4px; }
.sec > .el-tools { top: 26px; }
.el-tool { min-height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: var(--purple); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.el-tool[draggable] { cursor: grab; }
.col-empty { min-height: 72px; border: 2px dashed #C9C6DD; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; margin: 6px 0; }
.col-end { min-height: 10px; }
.col-empty.drop-on, .col-end.drop-on, .page-end.drop-on { border-color: var(--blue); background: rgba(108, 133, 189, 0.08); }
.col-end.drop-on { min-height: 40px; border: 2px dashed var(--blue); border-radius: 8px; }
.page-end { max-width: 600px; margin: 16px auto 0; padding: 16px; border: 2px dashed #DCD9EA; border-radius: 8px; text-align: center; color: var(--muted); font-size: 13px; }
.canvas-footer { margin: 12px auto 0; text-align: center; font-size: 12px; color: var(--muted); }
.placeholder { border: 2px dashed #C9C6DD; border-radius: 8px; padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.editable { outline: none; min-height: 1em; cursor: text; }
.editable p { margin: 0 0 12px; }
.designer-panel { width: 380px; max-width: 45vw; flex: none; border-left: 1px solid var(--line); display: flex; flex-direction: column; background: #fff; }
.panel-tabs { display: flex; border-bottom: 1px solid var(--line); }
.panel-tabs button { flex: 1; min-height: 48px; border: 0; border-bottom: 3px solid transparent; background: #fff; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.panel-tabs button.on { color: var(--ink); border-bottom-color: var(--purple); }
.panel-body { flex: 1; overflow: auto; padding: 0 0 24px; display: flex; flex-direction: column; }
.panel-body > h2 { padding: 12px 16px 4px; }
.panel-body > .setting, .panel-body > p, .panel-body > .btn { margin-left: 16px; margin-right: 16px; }
.back-link { align-self: flex-start; margin: 12px 16px 0; border: 0; background: none; color: var(--purple); font: inherit; font-weight: 700; cursor: pointer; padding: 6px 0; }
.back-link::before { content: "\2190  "; }
.acc { border-bottom: 1px solid var(--line); }
.acc-head { width: 100%; min-height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 10px; border: 0; background: var(--ground); font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; text-align: left; }
.chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; }
.acc.open .chev { transform: rotate(45deg); }
.acc-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.structure-list { display: flex; flex-direction: column; gap: 8px; }
.structure-list.compact { flex-direction: row; flex-wrap: wrap; }
.structure { display: flex; gap: 6px; min-height: 40px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: grab; width: 100%; }
.structure-list.compact .structure { width: 30%; min-height: 32px; cursor: pointer; }
.structure.on { border-color: var(--purple); box-shadow: 0 0 0 2px var(--purple); }
.structure span { display: block; min-height: 22px; border: 1px dashed var(--blue); border-radius: 3px; background: var(--tint); }
.block-list { display: flex; flex-direction: column; gap: 6px; }
.block-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: grab; text-align: left; }
.block-item:hover { border-color: var(--purple); }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.setting.column { flex-direction: column; align-items: stretch; }
.setting > span:first-child { font-weight: 600; }
.setting input[type=text], .setting input[type=url], .setting input[type=email], .setting textarea, .setting select { min-height: 40px; padding: 6px 10px; border-radius: 8px; border: 1px solid #C9C6DD; background: #fff; font: inherit; box-sizing: border-box; }
.setting > select { max-width: 190px; }
.setting textarea { font-family: monospace; font-size: 12px; }
.stepper { display: inline-flex; border: 1px solid #C9C6DD; border-radius: 8px; overflow: hidden; }
.stepper button { width: 36px; border: 0; background: #fff; font: inherit; font-size: 18px; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--ground); }
.stepper-value { width: 56px; min-height: 36px; border: 0; border-left: 1px solid #C9C6DD; border-right: 1px solid #C9C6DD; text-align: center; font: inherit; }
.color-pair { display: flex; align-items: center; gap: 6px; }
.color-pair input[type=color] { width: 36px; height: 36px; padding: 0; border: 1px solid #C9C6DD; border-radius: 8px; background: #fff; }
.color-text { width: 120px; }
.seg { display: inline-flex; border: 1px solid #C9C6DD; border-radius: 8px; overflow: hidden; }
.seg button { min-height: 36px; padding: 0 10px; border: 0; background: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.seg button + button { border-left: 1px solid #C9C6DD; }
.seg button.on { background: var(--tint); color: var(--purple); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 50; background: var(--purple); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 700; box-shadow: 0 8px 24px rgba(30, 26, 69, 0.25); }
@media (max-width: 900px) {
  .designer-body { flex-direction: column; overflow: auto; }
  .designer-panel { width: 100%; max-width: none; border-left: 0; border-top: 1px solid var(--line); }
  .designer-canvas { overflow: visible; }
  .designer-screen { height: auto; min-height: 100vh; }
}

/* WhatsApp */
.wa-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.wa-tabs a { padding: 12px 16px; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; }
.wa-tabs a.on { color: var(--ink); border-bottom-color: var(--purple); }
.wa-steps { margin: 0; padding-left: 20px; line-height: 1.7; display: flex; flex-direction: column; gap: 6px; }
.wa-list { gap: 6px !important; max-height: 720px; overflow-y: auto; }
.wa-conv { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.wa-conv:hover { background: var(--ground); }
.wa-conv.on { background: var(--tint); border-color: var(--line); }
.wa-snippet { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-thread { display: flex; flex-direction: column; gap: 8px; max-height: 480px; overflow-y: auto; padding: 12px; background: #EFEAE2; border-radius: 12px; }
.wa-msg { max-width: 75%; padding: 8px 12px; border-radius: 10px; background: #fff; align-self: flex-start; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); font-size: 14px; }
.wa-msg.out { background: #D9FDD3; align-self: flex-end; }
.wa-meta { margin-top: 4px; font-size: 11px; color: var(--muted); }

/* ---------- courses ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.course-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); background: #fff; }
.course-card:hover { border-color: var(--purple); }
.course-card img, .course-card-blank { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--tint); }
.course-card-blank { display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; color: var(--purple); }
.course-card-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.lesson-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.piece-card { display: flex; flex-direction: column; gap: 8px; }
.lesson-preview h3 { margin: 0 0 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.lesson-title { font-size: 26px; margin: 0 0 16px; }
.lesson-body { display: flex; flex-direction: column; gap: 16px; line-height: 1.6; }
.lesson-heading { margin: 8px 0 0; font-size: 21px; }
.lesson-rich p { margin: 0 0 10px; }
.lesson-rich a { color: var(--purple); }
.lesson-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.lesson-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-button-row { display: flex; }
.lesson-button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 10px; background: var(--purple); color: #fff; font-weight: 700; text-decoration: none; }
.lesson-download { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.lesson-download img { width: 120px; border-radius: 8px; }
.lesson-download-text { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; flex: 1; min-width: 180px; }
.lesson-image { max-width: 100%; border-radius: 10px; }
.lesson-divider { border: 0; border-top: 1px solid var(--line); width: 100%; }
.lesson-html { width: 100%; border: 0; min-height: 120px; }
.lesson-missing { padding: 14px; border-radius: 10px; background: var(--ground); color: var(--muted); }

/* ---------- student page (learn.html) ---------- */
.learn { min-height: 100vh; }
.learn-top { background: var(--purple); color: #fff; padding: 14px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.learn-main { max-width: 1240px; margin: 0 auto; padding: 28px 16px; display: flex; flex-direction: column; gap: 20px; }
.learn-split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.learn-side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
.learn-lesson-body { flex: 999 1 520px; min-width: 0; }
.learn-module { display: flex; flex-direction: column; gap: 2px; }
.learn-lesson { display: flex; gap: 10px; align-items: center; min-height: 40px; padding: 4px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.learn-lesson.on { background: var(--tint); font-weight: 700; }
.learn-lesson .tick { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; }
.learn-lesson .tick.done { background: var(--purple); border-color: var(--purple); }
.learn-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.learn-nav .btn { display: inline-flex; align-items: center; text-decoration: none; }
.progress { width: 100%; height: 6px; border-radius: 6px; background: var(--ground); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--red); }

/* ---------- integrations (like ThriveCart's Settings > Integrations) ---------- */
.int-wrap { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.int-cats { flex: 0 1 210px; display: flex; flex-direction: column; gap: 2px; }
.int-cat { min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; }
.int-cat:hover { color: var(--ink); }
.int-cat.on { background: #E9E8F0; color: var(--ink); font-weight: 700; }
.int-main { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.int-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.int-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.int-logo { width: 56px; height: 56px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 18px; flex: none; }
.int-logo.big { width: 64px; height: 64px; font-size: 20px; }
.int-ok { padding: 4px 10px; border-radius: 8px; background: #DDF5E3; color: #17642E; font-weight: 700; font-size: 13px; }
.int-off { padding: 4px 10px; border-radius: 8px; background: var(--ground); color: var(--muted); font-weight: 700; font-size: 13px; }
.int-name { font-size: 19px; }
.int-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; }
.int-btn:hover { border-color: var(--purple); }

/* ---------- ThriveCart sub-menu and account pages ---------- */
.nav-sub { display: flex; flex-direction: column; margin: 2px 0 6px 22px; padding-left: 12px; border-left: 2px solid rgba(255,255,255,0.25); }
.nav-sub a, .nav-sub-out { display: flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 8px; color: #C9C5E6; text-decoration: none; font-weight: 600; font-size: 13px; }
.nav-sub a[aria-current="page"] { color: #fff; font-weight: 800; background: rgba(255,255,255,0.10); }
.nav-sub-out { border: 0; background: transparent; cursor: pointer; text-align: left; font: inherit; font-weight: 600; font-size: 13px; }
.nav-sub a:hover, .nav-sub-out:hover { color: #fff; }
.profile-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.user-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }
.user-row:first-child { border-top: 0; }
.user-face { width: 52px; height: 52px; border-radius: 10px; background: var(--tint); color: var(--purple); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; flex: none; }
.statement-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.settings-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.settings-tile:hover { background: var(--ground); }
.settings-icon { font-size: 34px; line-height: 1; color: var(--purple); height: 44px; display: flex; align-items: center; }
.settings-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 8px; background: var(--purple); color: #fff; font-weight: 700; font-size: 13px; }
.support-faq { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; }
.support-faq summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.support-faq p { margin: 0 0 14px; line-height: 1.6; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.support-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.support-card:hover { border-color: var(--purple); }

/* ---------- products (like ThriveCart's Products page) ---------- */
.tc-panel { display: flex; flex-direction: column; }
.tc-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.tc-tabs a { padding: 14px 22px; color: var(--muted); text-decoration: none; font-size: 16px; font-weight: 600; border: 1px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; }
.tc-tabs a.on { background: #fff; border-color: var(--line); color: var(--ink); }
.tc-body { background: #fff; border: 1px solid var(--line); border-radius: 0 14px 14px 14px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.tc-banner { display: flex; gap: 18px; align-items: center; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 8px rgba(30,26,69,0.05); }
.tc-banner-icon { font-size: 30px; font-weight: 800; color: var(--purple); padding-right: 18px; border-right: 1px solid var(--line); }
.tc-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tc-toolbar .search { flex: 1 1 280px; width: auto; }
.tc-toggles { margin-left: auto; display: flex; gap: 4px; }
.tc-toggle { min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.tc-toggle.on { background: #4A5468; color: #fff; }
.tc-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tc-select { min-height: 48px; padding: 0 12px; border-radius: 8px; border: 1px solid #C9C6DD; background: #fff; font-size: 15px; }
.tc-select.small { min-height: 38px; font-size: 13px; font-weight: 600; }
.tc-range { grid-column: span 2; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: 1px solid #C9C6DD; border-radius: 8px; }
.tc-range-bars { flex: 1; display: flex; flex-direction: column; min-width: 120px; }
.tc-range input { width: 100%; accent-color: var(--purple); }
@media (max-width: 560px) { .tc-range { grid-column: auto; flex-wrap: wrap; padding: 8px 14px; } }
.tc-list { display: flex; flex-direction: column; gap: 14px; }
.tc-card { display: flex; gap: 22px; flex-wrap: wrap; padding: 20px; border: 1px solid var(--line); border-radius: 14px; }
.tc-thumb { position: relative; width: 90px; height: 120px; border-radius: 6px; overflow: hidden; background: linear-gradient(180deg, #F6F5FA 0 55%, var(--purple) 55%); border: 1px solid var(--line); flex: none; display: flex; align-items: center; justify-content: center; }
.tc-thumb-letter { font-size: 34px; font-weight: 800; color: var(--purple); background: #fff; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(30,26,69,0.15); }
.tc-ribbon { position: absolute; top: 10px; left: -24px; transform: rotate(-45deg); background: #2BC4B4; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 28px; }
.tc-card-main { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tc-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 19px; }
.tc-price { font-size: 20px; font-weight: 700; margin: 4px 0; }
.tc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tc-btn { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 0; border-radius: 6px; background: #2E7D8C; color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer; }
.tc-btn.blue { background: #3A9AD9; }
.tc-btn.big { min-height: 48px; padding: 0 28px; font-size: 15px; }
.tc-stats { display: flex; flex-wrap: wrap; gap: 24px; padding: 12px 14px; margin-top: 6px; border-radius: 10px; background: var(--ground); }
.tc-stats[hidden] { display: none; }
.tc-stats div { display: flex; flex-direction: column; }
.tc-coupons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tc-coupon { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.tc-coupon.off { opacity: 0.7; }
.tc-coupon-amount { font-size: 26px; font-weight: 800; color: var(--purple); }
.tc-coupon code { padding: 2px 8px; border-radius: 6px; background: var(--ground); font-weight: 700; }
.tc-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 4px; }

/* ---------- Vimeo library ---------- */
.vm-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.vm-side { flex: 0 1 230px; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.vm-side h3 { margin: 14px 8px 4px; }
.vm-side a { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 38px; padding: 0 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.vm-side a span { color: var(--muted); font-size: 12px; }
.vm-side a.on { background: var(--tint); font-weight: 800; }
.vm-main { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.vm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.vm-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.vm-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #1E1A45; display: flex; align-items: center; justify-content: center; }
.vm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vm-card:hover .vm-thumb { outline: 3px solid var(--blue); }
.vm-time { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,0.75); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.vm-lock { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,0.6); font-size: 12px; padding: 2px 6px; border-radius: 4px; }
.vm-name { font-size: 14px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vm-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.vm-toggles { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.vm-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 600; }
.vm-code { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid #C9C6DD; font: 12px/1.5 ui-monospace, Menlo, monospace; background: var(--ground); }
.vm-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(30,26,69,0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.vm-dialog { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.vm-dialog select, .vm-picker select { min-height: 44px; }
.vm-shade { position: fixed; inset: 0; z-index: 60; background: rgba(30,26,69,0.35); }
.vm-picker { position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(440px, 100vw); background: #fff; box-shadow: -8px 0 30px rgba(30,26,69,0.2); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.vm-pick-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.vm-pick { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.vm-pick:hover, .vm-pick:focus-visible { border-color: var(--purple); background: var(--ground); }
.vm-pick-thumb { position: relative; flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #1E1A45; }
.vm-pick-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vm-pick-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vm-pick-text b { font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------- Zoom ---------- */
.zm-list { display: flex; flex-direction: column; }
.zm-day { margin: 14px 0 2px; }
.zm-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.zm-time { flex: 0 0 170px; font-weight: 700; color: var(--muted); }
.zm-main { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zm-topic { font-weight: 800; font-size: 16px; color: #0B5CFF; text-decoration: none; }
.zm-topic:hover { text-decoration: underline; }
.zm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.zm-invite { white-space: pre-wrap; font: 13px/1.6 ui-monospace, Menlo, monospace; background: var(--ground); padding: 14px; border-radius: 10px; margin: 0; max-height: 360px; overflow: auto; }
.zm-repeat { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 10px; background: var(--ground); }
.zm-repeat select, .zm-repeat input[type=date] { min-height: 40px; }

/* ---------- automations (like ActiveCampaign) ---------- */
.auto-table td { vertical-align: middle; }
.auto-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 700; }
.auto-name a { color: #1F5CFF; text-decoration: none; font-size: 15px; }
.auto-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--ground); color: var(--muted); }
.auto-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9CA3AF; }
.auto-status.active::before { background: #16A34A; }
.auto-status.paused::before { background: #F59E0B; }
.edit-group { display: inline-flex; }
.auto-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; }
.auto-crumb { font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.auto-crumb a { color: var(--ink); font-weight: 800; text-decoration: none; }
.auto-title { border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.auto-title:hover { background: var(--ground); }
.auto-top-right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.auto-states { display: inline-flex; background: var(--ground); border-radius: 10px; padding: 3px; }
.auto-state { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.auto-state .dot { width: 9px; height: 9px; border-radius: 50%; background: #9CA3AF; }
.auto-state.active .dot { background: #16A34A; }
.auto-state.paused .dot { background: #F59E0B; }
.auto-state.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(30,26,69,0.15); }
.auto-shell { position: relative; }
.auto-canvas { min-height: 70vh; overflow: auto; border-radius: 14px; border: 1px solid var(--line); background-color: #F5F7FB; background-image: radial-gradient(#D5D9E6 1px, transparent 1px); background-size: 18px 18px; padding: 40px 24px 80px; }
.auto-stage { display: flex; flex-direction: column; align-items: center; min-width: max-content; margin: 0 auto; }
.auto-trigger-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.auto-triggers { display: flex; flex-direction: column; gap: 10px; }
.auto-trigger-side { display: flex; flex-direction: column; gap: 10px; }
.auto-dashed { min-height: 40px; padding: 0 18px; border: 2px dashed #C5CAD9; border-radius: 6px; background: rgba(255,255,255,0.6); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.auto-dashed:hover { border-color: #1F5CFF; color: #1F5CFF; }
.auto-flow { display: flex; flex-direction: column; align-items: center; }
.auto-node-wrap { display: flex; flex-direction: column; align-items: stretch; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(30,26,69,0.12), 0 4px 14px rgba(30,26,69,0.06); width: 380px; max-width: 86vw; }
.auto-node { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px 16px; border: 0; background: #fff; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; width: 100%; }
.auto-node:hover { outline: 2px solid #1F5CFF; }
.auto-trigger { width: 380px; max-width: 86vw; box-shadow: 0 1px 3px rgba(30,26,69,0.12), 0 4px 14px rgba(30,26,69,0.06); }
.auto-trigger.empty { cursor: default; }
.auto-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 17px; }
.auto-node-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.45; }
.auto-chip { display: inline-block; padding: 1px 8px; margin: 2px 4px 2px 0; border-radius: 4px; background: #E4E9F4; color: #1E3A8A; font-size: 12px; font-weight: 700; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.auto-stats { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; color: #1F5CFF; }
.auto-here { padding: 6px 16px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; color: #B45309; background: #FFFBEB; border-radius: 0 0 8px 8px; }
.auto-joint { display: flex; flex-direction: column; align-items: center; }
.auto-joint::before, .auto-joint::after { content: ""; width: 2px; height: 22px; background: #C5CAD9; }
.auto-plus { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #C5CAD9; background: #fff; color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.auto-plus:hover { border-color: #1F5CFF; color: #1F5CFF; }
.auto-branches { display: flex; gap: 28px; align-items: flex-start; padding-top: 22px; border-top: 2px solid #C5CAD9; margin-top: 22px; position: relative; }
.auto-branch { display: flex; flex-direction: column; align-items: center; }
.auto-branch-label { padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #E5E7EB; color: var(--ink); }
.auto-branch-label.yes { background: #DCFCE7; color: #166534; }
.auto-branch-label.no { background: #FEE2E2; color: #991B1B; }
.auto-end { margin-top: 4px; padding: 8px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; color: var(--muted); }
.auto-zoom { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.auto-zoom button { width: 34px; height: 34px; border: 0; background: transparent; font-size: 18px; cursor: pointer; border-radius: 6px; }
.auto-zoom button:hover { background: var(--ground); }
.auto-zoom span { min-width: 48px; text-align: center; font-weight: 700; }
.auto-drawer { width: min(520px, 100vw); overflow: auto; }
.auto-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.auto-tabs button { padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.auto-tabs button.on { color: #1F5CFF; border-bottom-color: #1F5CFF; }
.auto-action-list { display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.auto-action { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.auto-action:hover { border-color: #1F5CFF; }
.auto-action b { display: block; }
.auto-form { display: flex; flex-direction: column; gap: 12px; }
.auto-form select, .auto-form input[type=text], .auto-form input[type=url], .auto-form input[type=number], .auto-form input[type=datetime-local] { min-height: 40px; }
.auto-area { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid #C9C6DD; font: inherit; }
.auto-multi { width: 100%; border-radius: 10px; border: 1px solid #C9C6DD; padding: 6px; font: inherit; }
.auto-cond { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 10px; background: var(--ground); }
.auto-rule { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.auto-rule select, .auto-rule input, .auto-cond select { min-height: 38px; border-radius: 8px; border: 1px solid #C9C6DD; background: #fff; padding: 0 8px; font: inherit; max-width: 100%; }
.auto-andor { font-size: 11px; font-weight: 800; color: var(--muted); }
.auto-trig-dialog { width: 100%; max-width: 900px; max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.auto-trig-body { display: flex; gap: 20px; flex-wrap: wrap; }
.auto-trig-cats { flex: 0 1 200px; display: flex; flex-direction: column; gap: 2px; }
.auto-trig-cats button { text-align: left; min-height: 36px; padding: 0 10px; border: 0; border-left: 3px solid transparent; background: none; font: inherit; color: var(--muted); cursor: pointer; }
.auto-trig-cats button.on { border-left-color: #1F5CFF; color: var(--ink); font-weight: 700; }
.auto-trig-grid { flex: 1 1 400px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.auto-trig { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border: 1px solid transparent; border-radius: 10px; background: none; font: inherit; color: var(--ink); text-align: center; cursor: pointer; }
.auto-trig:hover:not(:disabled) { border-color: #1F5CFF; background: #F5F7FB; }
.auto-trig.off { opacity: 0.45; cursor: not-allowed; }
.auto-trig-icon { width: 56px; height: 56px; border-radius: 50%; background: #E4E9F4; display: flex; align-items: center; justify-content: center; font-size: 22px; }

/* ---------- campaign designer, closer to ActiveCampaign ---------- */
.designer-screen .btn.primary { background: #1F5CFF; border-color: #1F5CFF; color: #fff; }
.designer-screen .btn.primary:hover { background: #1749D6; }
.designer-panel .tabs button.on, .designer-panel [role=tab][aria-selected="true"] { color: #1F5CFF; border-bottom-color: #1F5CFF; }
.sec:hover { outline-color: #A9C1FF; }
.sec.selected { outline-color: #1F5CFF; }
.sec-label { background: #E8EEFF; color: #1F3D99; }
.blk:hover { outline-color: #A9C1FF; }
.blk.selected { outline-color: #1F5CFF; }
.small-tool { width: 30px; height: 30px; color: var(--muted); }
.device-switch { display: inline-flex; background: var(--ground); border-radius: 8px; padding: 2px; }
.device-switch button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.device-switch button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(30,26,69,0.15); }
.format-bar.tb { align-items: center; gap: 2px; padding: 6px 12px; position: sticky; top: 0; z-index: 5; box-shadow: 0 2px 6px rgba(30,26,69,0.06); }
.format-bar.tb[hidden] { display: none; }
.format-bar.tb .fmt { min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.format-bar.tb .fmt:hover { background: var(--ground); }
.tb-select { height: 32px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-size: 13px; color: var(--ink); padding: 0 4px; cursor: pointer; }
.tb-select:hover { background: var(--ground); }
.tb-gap { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.tb-color { position: relative; overflow: hidden; }
.tb-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tb-menu > summary { list-style: none; border: 0 !important; min-height: 32px !important; font-size: 13px !important; color: var(--ink) !important; background: transparent !important; }
.tb-menu .menu-list { left: 0; right: auto; }
.tb-menu .emoji-grid { display: grid; grid-template-columns: repeat(5, 40px); }
.back-row { display: flex; justify-content: space-between; gap: 8px; }
.back-row .back-link { color: #1F5CFF; font-weight: 700; }
.designer-screen .panel-tabs button.on { color: #1F5CFF; border-bottom-color: #1F5CFF; }
.designer-sub .designer-name { flex: 0 1 auto; width: auto; }
.back-row .back-link { margin: 12px 0 0; }
.back-row { padding: 0 16px; }
.back-row .back-link + .back-link::before { content: "\2191  "; }
.code-details summary { cursor: pointer; font-weight: 700; min-height: 36px; display: flex; align-items: center; }
.designer-center { position: relative; }
.format-bar.tb { position: absolute; top: 0; left: 0; right: 0; }
.code-details { padding: 0 16px; }
.contact-fields { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 10px; background: var(--ground); }

/* ---------- form builder (like ActiveCampaign's) ---------- */
.form-name { font: inherit; font-weight: 700; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; width: min(340px, 100%); }
.form-canvas { display: flex; align-items: center; justify-content: center; }
.form-stage { width: 100%; min-height: 100%; padding: 48px 24px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.form-stage > form { width: 100%; }
.form-panel .panel-body { display: flex; flex-direction: column; }
.form-group { border-bottom: 1px solid var(--line); }
.form-group > summary { min-height: 44px; display: flex; align-items: center; padding: 0 16px; font-weight: 800; cursor: pointer; background: var(--ground); }
.form-group-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; }
.form-sub { font-size: 13px; font-weight: 800; color: var(--muted); margin-top: 6px; }
.form-add { text-align: left; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(30,26,69,0.06); }
.form-add:hover { border-color: #1F5CFF; color: #1F5CFF; }
.form-action { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.form-action select, .form-action input, .form-group-body select { min-height: 38px; border-radius: 8px; border: 1px solid #C9C6DD; padding: 0 8px; font: inherit; background: #fff; }
.picture-tools { padding: 12px; border: 2px solid #1F5CFF; border-radius: 10px; background: #F5F7FF; }
.pic-dialog { max-width: 980px; }
.pic-body { display: flex; flex-wrap: wrap; gap: 18px; }
.pic-view { flex: 1 1 420px; min-width: 0; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#EEE 0 25%, #FFF 0 50%) 0 / 20px 20px; border-radius: 10px; padding: 12px; max-height: 62vh; overflow: auto; }
.pic-canvas { max-width: 100%; max-height: 58vh; height: auto; }
.pic-tools { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; }
.pic-slider { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 13px; }
.pic-slider input { width: 100%; accent-color: #1F5CFF; }

/* ---------- public booking pages (like Calendly) ---------- */
.book-body { background: #F6F5FA; }
.book-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; box-sizing: border-box; }
.book-card { width: 100%; max-width: 1000px; display: flex; flex-direction: column; gap: 14px; }
.book-split { flex-direction: row; flex-wrap: wrap; gap: 0; padding: 0; overflow: hidden; }
.book-split > * { padding: 24px; box-sizing: border-box; }
.book-info { flex: 1 1 280px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.book-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); }
.book-brand img { max-height: 40px; max-width: 120px; object-fit: contain; }
.book-meta { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--muted); }
.book-desc-full { white-space: pre-wrap; line-height: 1.6; margin: 0; }
.book-cal { flex: 2 1 320px; display: flex; flex-direction: column; gap: 12px; }
.book-cal-head { display: flex; justify-content: center; align-items: center; gap: 18px; }
.book-cal-head .rowbtn { font-size: 22px; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.book-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.book-wd { font-size: 12px; font-weight: 700; color: var(--muted); }
.book-day { aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; font: inherit; color: #9CA3AF; }
.book-day.has { background: #EEF2FF; color: #1F5CFF; font-weight: 800; cursor: pointer; }
.book-day.has:hover { background: #DCE4FF; }
.book-day.on { background: #1F5CFF; color: #fff; }
.book-tz-row { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 13px; }
.book-tz { min-height: 40px; border-radius: 8px; border: 1px solid #C9C6DD; padding: 0 8px; font: inherit; }
.book-times { flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow: auto; border-left: 1px solid var(--line); }
.book-time { min-height: 48px; border: 1px solid #1F5CFF; border-radius: 8px; background: #fff; color: #1F5CFF; font: inherit; font-weight: 800; cursor: pointer; }
.book-time:hover { background: #1F5CFF; color: #fff; }
.book-form { flex: 2 1 320px; display: flex; flex-direction: column; gap: 12px; }
.book-form textarea { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid #C9C6DD; font: inherit; box-sizing: border-box; }
.book-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.book-type { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-top: 6px solid #8247F5; border-radius: 10px; text-decoration: none; color: var(--ink); }
.book-type:hover { box-shadow: 0 4px 14px rgba(30,26,69,0.12); }
.book-desc { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.book-done { width: 56px; height: 56px; border-radius: 50%; background: #16A34A; color: #fff; font-size: 28px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 700px) { .book-info, .book-times { border: 0; } }

/* ---------- scheduling (like Calendly) ---------- */
.sched-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.sched-type { background: #fff; border: 1px solid var(--line); border-left: 6px solid #8247F5; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.sched-type.off { opacity: 0.6; }
.sched-name { font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; }
.sched-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.small-btn { min-height: 34px; padding: 0 10px; font-size: 13px; }
.sched-color { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sched-color input { accent-color: #fff; margin: 0; }
.sched-q { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.sched-q input[type=text], .sched-q select { min-height: 38px; border-radius: 8px; border: 1px solid #C9C6DD; padding: 0 8px; font: inherit; }
.sched-week { display: flex; flex-direction: column; gap: 10px; }
.sched-day { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.sched-dayname { width: 44px; padding-top: 8px; }
.sched-ranges { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sched-ranges input[type=time], .card input[type=time], .card input[type=date] { min-height: 38px; border-radius: 8px; border: 1px solid #C9C6DD; padding: 0 8px; font: inherit; }
.sched-booking { border-left: 5px solid #8247F5; border-radius: 8px; background: var(--ground); margin: 6px 0; }
.sched-booking summary { display: flex; gap: 14px; align-items: center; padding: 12px; cursor: pointer; flex-wrap: wrap; }
.sched-booking-body { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }

/* image library (like ActiveCampaign's) */
.placeholder.clickable { cursor: pointer; background: #F7F9FF; }
.placeholder.over, .imglib-drop.over { border-color: #356AE6; background: #EEF3FF; }
.imglib { width: min(820px, 94vw); }
.imglib-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 16px; }
.imglib-tabs button { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.imglib-tabs button.on { color: #356AE6; border-bottom-color: #356AE6; }
.imglib-body { min-height: 320px; }
.imglib-drop { border: 2px dashed #C9C6DD; border-radius: 10px; padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; cursor: pointer; }
.imglib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; max-height: 60vh; overflow: auto; }
.imglib-item { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font: inherit; font-size: 12px; text-align: left; }
.imglib-item:hover { border-color: #356AE6; box-shadow: 0 0 0 2px #CFDCFB; }
.imglib-item img { width: 100%; height: 100px; object-fit: contain; background: #F4F4F8; border-radius: 4px; }
.imglib-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.imgset { display: flex; flex-direction: column; gap: 8px; }
.imgset img { max-width: 100%; max-height: 140px; align-self: flex-start; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.imgset-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.link-danger { color: #C8102E; }

/* forms: "Create New Form" window and list header, like ActiveCampaign */
.form-hero { border-radius: 14px; padding: 28px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: linear-gradient(120deg, #EDE9FF 0%, #F6F1FF 45%, #FFE9F1 100%); }
.form-hero h2 { margin: 0; font-size: 26px; color: #10124A; }
.link-btn { border: 0; background: none; color: #356AE6; font: inherit; font-weight: 700; cursor: pointer; padding: 4px 0; align-self: flex-start; }
.new-form-dialog { max-width: 560px; }
.new-form-dialog input[type=text] { min-height: 40px; border: 1px solid #C9C6DD; border-radius: 6px; padding: 0 10px; font: inherit; }
.new-form-foot { display: flex; justify-content: flex-end; gap: 8px; background: #F4F5F9; margin: 4px -20px -20px; padding: 14px 20px; border-radius: 0 0 14px 14px; }
.form-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.form-kind { border: 0; background: none; font: inherit; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--ink, #1E1A45); }
.form-kind-pic { position: relative; width: 64px; height: 50px; border: 2px solid #C9C6DD; border-radius: 6px; background: #F4F5F9; display: block; overflow: hidden; }
.form-kind.on .form-kind-pic { border-color: #356AE6; box-shadow: 0 0 0 2px #CFDCFB; }
.form-kind-pic i { position: absolute; display: block; background: #8E8BA8; border-radius: 2px; }
.kind-inline i:nth-child(1) { left: 10px; right: 10px; top: 10px; height: 6px; background: #356AE6; }
.kind-inline i:nth-child(2) { left: 10px; right: 10px; top: 20px; height: 6px; }
.kind-inline i:nth-child(3) { left: 10px; right: 26px; top: 30px; height: 6px; }
.kind-modal { background: #6E6B87; }
.kind-modal i:nth-child(1) { left: 14px; right: 14px; top: 10px; bottom: 10px; background: #fff; }
.kind-modal i:nth-child(2) { left: 20px; right: 20px; top: 18px; height: 5px; background: #356AE6; }
.kind-floating_bar i:nth-child(1) { left: 0; right: 0; top: 0; height: 10px; background: #356AE6; }
.kind-floating_bar i:nth-child(2) { left: 8px; right: 8px; top: 18px; height: 5px; }
.kind-floating_bar i:nth-child(3) { left: 8px; right: 20px; top: 28px; height: 5px; }
.kind-floating_box i:nth-child(1) { left: 8px; right: 8px; top: 8px; height: 5px; }
.kind-floating_box i:nth-child(2) { right: 4px; bottom: 4px; width: 26px; height: 22px; background: #356AE6; }
@media (max-width: 520px) { .form-kinds { grid-template-columns: repeat(2, 1fr); } }

/* own checkout: product editor */
.chip.green { background: #E3F6EC; border-color: #BFE6D0; color: #146C43; }
.product-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.product-editor textarea, .product-editor input[type=text], .product-editor input[type=url], .product-editor input[type=number], .product-editor select { width: 100%; }
@media (max-width: 900px) { .product-editor { grid-template-columns: 1fr; } }

/* product editor, like ThriveCart's: Product / Checkout / Fulfillment / Automation, with Options / Pricing / Bump / Payments */
.pe-body { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.pe-sections { display: flex; background: #fff; border-bottom: 1px solid #E2E3E5; gap: 4px; flex-wrap: wrap; }
.pe-sections button { border: 0; background: none; padding: 14px 22px; font: inherit; font-weight: 600; color: #5B5E6B; border-bottom: 3px solid transparent; cursor: pointer; }
.pe-sections button.on { color: #0B7A75; border-bottom-color: #0B7A75; }
.pe-subs { display: flex; gap: 0; border: 1px solid #E2E3E5; border-radius: 8px; overflow: hidden; background: #F6F7F9; flex-wrap: wrap; }
.pe-subs button { flex: 1 1 120px; border: 0; background: none; padding: 12px; font: inherit; font-weight: 600; color: #5B5E6B; cursor: pointer; border-bottom: 3px solid transparent; }
.pe-subs button.on { background: #fff; color: #0B7A75; border-bottom-color: #0B7A75; }
.pe-card { display: flex; flex-direction: column; gap: 14px; }
.pe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pe-card input[type=text], .pe-card input[type=url], .pe-card input[type=email], .pe-card input[type=number], .pe-card select, .pe-card textarea { width: 100%; min-height: 40px; border: 1px solid #C9CBD1; border-radius: 4px; padding: 6px 10px; font: inherit; background: #fff; }
.pe-list { display: flex; flex-direction: column; gap: 12px; }
.pe-item { border: 1px solid #E2E3E5; border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: #FAFBFC; }
.pe-item-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pe-item-head select { width: auto !important; min-height: 32px !important; }
.pe-item-tools { margin-left: auto; display: flex; gap: 6px; }
.pe-row { flex-direction: row; align-items: center; flex-wrap: wrap; }
.pe-row select { width: auto !important; flex: 1 1 200px; }
.pe-rich { min-height: 70px; border: 1px solid #C9CBD1; border-radius: 4px; padding: 10px 12px; background: #fff; line-height: 1.5; }
.pe-rich:focus { outline: 2px solid #004CFF; outline-offset: 0; }
.pe-thumb { max-width: 180px; max-height: 120px; border-radius: 6px; border: 1px solid #E2E3E5; background: #fff; }
.pe-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 14px; }
.pe-own { border: 1px solid #BFE6D0; background: #F1FAF5; border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.pe-proc { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border: 1px solid #E2E3E5; border-radius: 8px; padding: 12px 14px; }
.pe-proc > div { flex: 1 1 200px; }
@media (max-width: 760px) { .pe-grid { grid-template-columns: 1fr; } }

/* ---------- Studio (your own Canva) ---------- */
.studio-hero { border-radius: 14px; padding: 24px; background: linear-gradient(120deg, #2E266D 0%, #6C85BD 55%, #BB1038 100%); color: #fff; display: flex; flex-direction: column; gap: 16px; }
.studio-hero h2 { margin: 0; font-size: 24px; color: #fff; }
.studio-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.studio-size { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); color: #fff; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font: inherit; text-align: center; }
.studio-size:hover { background: rgba(255,255,255,0.22); }
.studio-size .muted { color: rgba(255,255,255,0.75); }
.studio-shape { width: 46px; max-height: 64px; background: #fff; border-radius: 3px; display: block; }
.studio-custom { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.studio-custom input { min-height: 38px; border-radius: 6px; border: 0; padding: 0 8px; font: inherit; color: #00002D; background: #fff; }
.studio-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.studio-templates.small { grid-template-columns: 1fr; gap: 8px; }
.studio-template { border: 1px solid #E2E3E5; background: #fff; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; font: inherit; text-align: left; }
.studio-template:hover, .studio-card:hover { border-color: #004CFF; box-shadow: 0 0 0 2px #CFDCFB; }
.studio-tthumb { background: #F1F2F4; border-radius: 6px; overflow: hidden; max-height: 220px; display: flex; align-items: center; justify-content: center; }
.studio-tthumb img { width: 100%; height: 100%; object-fit: contain; }
.studio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.studio-card { border: 1px solid #E2E3E5; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.studio-cthumb { height: 150px; background: #F1F2F4; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.studio-cthumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.studio-cname { font-weight: 600; color: #00002D !important; text-decoration: none; }
.studio-cactions { display: flex; gap: 6px; }
.studio-loading { min-height: 100vh; display: flex; align-items: center; justify-content: center; font: 16px "IBM Plex Sans", sans-serif; color: #5B5E6B; }
.studio-screen { height: 100vh; display: flex; flex-direction: column; background: #EEF0F4; font-family: "IBM Plex Sans", system-ui, sans-serif; }
.studio-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: linear-gradient(90deg, #2E266D, #6C85BD); color: #fff; flex-wrap: wrap; }
.studio-top .btn { background: #fff; color: #00002D; border-color: #fff; min-height: 36px; text-decoration: none; display: inline-flex; align-items: center; }
.studio-top .btn.primary { background: #004CFF; color: #fff; border-color: #004CFF; }
.studio-top .studio-tbtn { color: #fff; border-color: rgba(255,255,255,0.4); background: transparent; }
.studio-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; justify-content: center; }
.studio-title .muted { color: rgba(255,255,255,0.8); }
.studio-name { background: transparent; border: 1px solid transparent; color: #fff; font: 600 15px inherit; padding: 6px 8px; border-radius: 6px; max-width: 280px; }
.studio-name:hover, .studio-name:focus { border-color: rgba(255,255,255,0.5); outline: none; }
.studio-dl { position: relative; } .studio-dl summary { list-style: none; } .studio-dl .menu-list { right: 0; left: auto; min-width: 220px; }
.studio-tools { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: #fff; border-bottom: 1px solid #E2E3E5; min-height: 52px; flex-wrap: wrap; }
.studio-tools select, .studio-tools input[type=number] { min-height: 34px; border: 1px solid #C9CBD1; border-radius: 6px; padding: 0 6px; font: inherit; }
.studio-tools input[type=color] { width: 36px; height: 34px; border: 1px solid #C9CBD1; border-radius: 6px; padding: 2px; background: #fff; }
.studio-tbtn { min-height: 34px; padding: 0 10px; border: 1px solid #C9CBD1; border-radius: 6px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: #1F2129; }
.studio-tbtn.on { background: #E6EEFF; border-color: #004CFF; color: #004CFF; }
.studio-tbtn.danger { color: #C8102E; }
.studio-sep { width: 1px; height: 26px; background: #E2E3E5; margin: 0 4px; }
.studio-body { flex: 1; display: flex; min-height: 0; }
.studio-left { width: 320px; flex: none; display: flex; background: #fff; border-right: 1px solid #E2E3E5; min-height: 0; }
.studio-tabs { width: 84px; flex: none; display: flex; flex-direction: column; background: #18191B; padding: 6px 0; overflow-y: auto; }
.studio-tabs button { border: 0; background: none; color: #C9CBD1; font: 600 11px inherit; padding: 14px 4px; cursor: pointer; }
.studio-tabs button.on { background: #2A2B2E; color: #fff; }
.studio-left-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.studio-left-body h4 { margin: 8px 0 0; font-size: 13px; }
.studio-addtext, .studio-combo { width: 100%; text-align: left; border: 1px solid #E2E3E5; background: #F6F7F9; border-radius: 8px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: #00002D; }
.studio-addtext:hover, .studio-combo:hover, .studio-el:hover, .studio-upload:hover { border-color: #004CFF; }
.studio-els { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.studio-el { border: 1px solid #E2E3E5; background: #fff; border-radius: 8px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font: 12px inherit; }
.studio-el-pic { width: 40px; height: 40px; display: block; background: #6C85BD; }
.studio-el-rect-round { border-radius: 8px; background: #BB1038; height: 26px; margin: 7px 0; }
.studio-el-circle { border-radius: 50%; background: #F89851; }
.studio-el-triangle { background: #2E266D; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.studio-el-star { background: #F2C200; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.studio-el-line { height: 4px; margin: 18px 0; background: #2E266D; }
.studio-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.studio-upload { border: 1px solid #E2E3E5; border-radius: 6px; padding: 0; background: #F6F7F9; cursor: pointer; height: 110px; overflow: hidden; }
.studio-upload img { width: 100%; height: 100%; object-fit: cover; }
.studio-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.studio-swatch { aspect-ratio: 1; border-radius: 50%; border: 1px solid #C9CBD1; cursor: pointer; }
.studio-layer { display: flex; align-items: center; gap: 6px; border: 1px solid #E2E3E5; border-radius: 6px; padding: 4px 6px; }
.studio-layer.on { border-color: #004CFF; background: #E6EEFF; }
.studio-layer-name { flex: 1; text-align: left; border: 0; background: none; cursor: pointer; font: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-center { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.studio-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 30px; }
.studio-paper { box-shadow: 0 4px 24px rgba(0,0,0,0.15); background: #fff; line-height: 0; }
.studio-zoom { position: absolute; right: 16px; bottom: 14px; display: flex; gap: 6px; align-items: center; background: #fff; border-radius: 8px; padding: 4px 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
@media (max-width: 860px) { .studio-body { flex-direction: column-reverse; } .studio-left { width: 100%; height: 300px; } .studio-screen { height: auto; min-height: 100vh; } .studio-stage { min-height: 60vh; } }
.lesson-row .rowbtn { display: inline-flex; align-items: center; text-decoration: none; }

/* ---------- AI Assistant (your own ChatGPT) ---------- */
.ai-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; min-height: calc(100vh - 200px); }
.ai-chats { display: flex; flex-direction: column; gap: 4px; border-right: 1px solid #E2E3E5; padding-right: 12px; overflow-y: auto; max-height: calc(100vh - 180px); }
.ai-new { text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; color: #fff !important; }
.ai-chat-link { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.ai-chat-link a { flex: 1; min-width: 0; padding: 8px 10px; font-size: 13px; color: #00002D !important; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-chat-link:hover, .ai-chat-link.on { background: #F1F2F4; }
.ai-chat-link .rowbtn { opacity: 0.4; } .ai-chat-link:hover .rowbtn { opacity: 1; }
.ai-settings-link { margin-top: auto; padding: 10px; font-size: 13px; }
.ai-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ai-thread { flex: 1; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; max-height: calc(100vh - 330px); padding: 4px 4px 12px; }
.ai-msg { max-width: 820px; border-radius: 12px; padding: 12px 16px; line-height: 1.6; }
.ai-msg.user { align-self: flex-end; background: #E6EEFF; }
.ai-msg.assistant { align-self: flex-start; background: #fff; border: 1px solid #E2E3E5; }
.ai-who { font-size: 12px; font-weight: 600; color: #5B5E6B; margin-bottom: 4px; }
.ai-user-text { white-space: pre-wrap; }
.ai-md p { margin: 0 0 10px; } .ai-md ul, .ai-md ol { margin: 0 0 10px; padding-left: 22px; } .ai-md h3, .ai-md h4 { margin: 12px 0 6px; }
.ai-md pre { background: #F6F7F9; padding: 10px; border-radius: 6px; overflow-x: auto; } .ai-md code { background: #F1F2F4; padding: 1px 4px; border-radius: 4px; }
.ai-tools { margin-top: 6px; display: flex; gap: 6px; }
.ai-typing { color: #5B5E6B; font-style: italic; }
.ai-empty { margin: auto; text-align: center; max-width: 640px; display: flex; flex-direction: column; gap: 10px; padding: 40px 0; }
.ai-empty h2 { font-size: 26px; }
.ai-starters { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.ai-starter { border: 1px solid #E2E3E5; background: #fff; border-radius: 10px; padding: 14px; cursor: pointer; font: inherit; font-weight: 600; color: #00002D; }
.ai-starter:hover { border-color: #004CFF; box-shadow: 0 0 0 2px #CFDCFB; }
.ai-compose { display: flex; gap: 10px; align-items: flex-end; border: 1px solid #C9CBD1; border-radius: 12px; padding: 10px; background: #fff; }
.ai-input { flex: 1; border: 0; resize: vertical; font: inherit; line-height: 1.5; outline: none; min-height: 48px; }
@media (max-width: 760px) { .ai-wrap { grid-template-columns: 1fr; } .ai-chats { border-right: 0; border-bottom: 1px solid #E2E3E5; max-height: 160px; padding: 0 0 8px; } .ai-thread { max-height: none; } }

/* ---------- Courses, like ThriveCart Learn ---------- */
.tcl-tabs { display: flex; gap: 8px; }
.tcl-tabs button, .tcl-editor-tabs button { border: 1px solid #E2E3E5; background: #fff; border-radius: 6px; padding: 10px 18px; font: inherit; font-weight: 600; color: #5B5E6B; cursor: pointer; }
.tcl-tabs button.on, .tcl-editor-tabs button.on { border-color: #0B7A75; color: #0B7A75; box-shadow: 0 0 0 1px #0B7A75; }
.tcl-editor-tabs { display: flex; gap: 8px; justify-content: center; }
.tcl-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.tcl-project { background: #F3F4F6; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.tcl-project-head { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 8px; padding: 10px 14px; }
.tcl-project-head img { width: 64px; height: 44px; object-fit: cover; border-radius: 4px; }
.tcl-list { display: flex; flex-direction: column; gap: 10px; }
.tcl-course { display: flex; gap: 18px; align-items: center; background: #fff; border-radius: 10px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); flex-wrap: wrap; }
.tcl-course.dragging { opacity: 0.4; } .tcl-course.drop-here, .tcl-row.drop-here { box-shadow: 0 -3px 0 #004CFF inset, 0 1px 3px rgba(0,0,0,0.06); }
.tcl-thumb { width: 150px; height: 100px; object-fit: cover; border-radius: 8px; flex: none; }
.tcl-blank { background: #E6EEFF; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 700; color: #004CFF; }
.tcl-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tcl-name { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 16px; }
.tcl-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.tcl-stat { background: #F3F4F6; border-radius: 6px; padding: 8px 16px; display: flex; flex-direction: column; align-items: center; min-width: 90px; }
.tcl-stat span { font-size: 12px; color: #5B5E6B; } .tcl-stat b { font-size: 20px; }
.tcl-actions { display: flex; gap: 8px; align-items: center; }
.tcl-actions .menu-list, .tcl-row .menu-list { right: 0; left: auto; min-width: 190px; }
.tcl-handle { cursor: grab; font-size: 18px; color: #8A8DA0; padding: 6px; user-select: none; }
.tcl-editor { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; border: 1px solid #E2E3E5; border-radius: 10px; overflow: hidden; background: #F7F8FA; }
.tcl-left { background: #F3F6F9; border-right: 1px solid #E2E3E5; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tcl-left-title { text-align: center; letter-spacing: 0.18em; font-size: 12px; color: #5C8DB0; padding: 8px 0; border-bottom: 1px solid #E2E3E5; margin-bottom: 4px; }
.tcl-element { background: #fff; border: 2px solid #A9B8C8; border-radius: 4px; padding: 14px; text-align: left; font: inherit; font-size: 15px; cursor: pointer; color: #1F2129; }
.tcl-element.small { border-width: 1px; padding: 8px; text-align: center; font-size: 13px; }
.tcl-element:hover { border-color: #0B7A75; }
.tcl-info-pic { width: 100%; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.tcl-info-name { font-size: 18px !important; font-weight: 700; }
.tcl-left input, .tcl-left textarea, .tcl-left select { width: 100%; border: 1px solid #D4D8DE; border-radius: 4px; padding: 8px; font: inherit; background: #fff; }
.tcl-right { padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tcl-seq { display: flex; gap: 0; align-self: flex-end; align-items: center; }
.tcl-seq .muted { margin-right: 10px; }
.tcl-seq button { border: 1px solid #D4D8DE; background: #fff; padding: 12px 22px; font: inherit; font-size: 15px; cursor: pointer; }
.tcl-seq button:first-of-type { border-radius: 6px 0 0 6px; } .tcl-seq button:last-of-type { border-radius: 0 6px 6px 0; }
.tcl-seq button.on { border: 2px solid #5C6B7A; font-weight: 600; }
.tcl-sequence { display: flex; flex-direction: column; gap: 12px; }
.tcl-module { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow: hidden; }
.tcl-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid #EEF0F3; flex-wrap: wrap; }
.tcl-row.module { background: #EEF2F6; border-top: 0; }
.tcl-row.lesson.dragging { opacity: 0.4; }
.tcl-row.empty { padding: 14px; }
.tcl-rowthumb { width: 52px; height: 52px; object-fit: cover; border-radius: 4px; flex: none; }
.tcl-rowthumb.blank { background: #F3F4F6; display: inline-flex; align-items: center; justify-content: center; color: #8A8DA0; }
.tcl-rowname { flex: 1 1 220px; min-width: 0; color: #3A3F4B !important; text-decoration: none; }
.tcl-access { color: #5B5E6B; font-size: 13px; width: 120px; }
.tcl-status { border: 0; background: none; font: inherit; font-size: 13px; color: #9A6B00; cursor: pointer; width: 100px; text-align: left; }
.tcl-status.on { color: #5B5E6B; }
.tcl-drip { display: flex; gap: 6px; align-items: center; font-size: 12px; color: #5B5E6B; flex-wrap: wrap; }
.tcl-drip input { min-height: 30px; border: 1px solid #D4D8DE; border-radius: 4px; padding: 0 6px; font: inherit; }
@media (max-width: 900px) { .tcl-editor { grid-template-columns: 1fr; } .tcl-left { border-right: 0; border-bottom: 1px solid #E2E3E5; } .tcl-access, .tcl-status { width: auto; } }

/* new lesson elements */
.lesson-bullets { margin: 0 0 14px; padding-left: 22px; line-height: 1.7; }
.lesson-faqs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.lesson-faq { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.lesson-faq summary { font-weight: 700; cursor: pointer; }
.lesson-faq[open] summary { margin-bottom: 8px; }
.lesson-box { border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.lesson-box h3 { margin: 0 0 8px; text-transform: none; letter-spacing: 0; font-size: 18px; color: var(--ink); }
.lesson-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 14px; }
.piece-item { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.piece-item .field { flex: 1 1 220px; }
.piece-col { display: flex; flex-direction: column; gap: 6px; border: 1px dashed var(--line); border-radius: 8px; padding: 8px; }
.rowbtn.on { background: #E6EEFF; border-radius: 6px; }

/* student page additions */
.learn-side-pic { width: 100%; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.learn-progress { display: flex; flex-direction: column; gap: 6px; }
.learn-progress-label { display: flex; justify-content: space-between; font-size: 14px; }
.learn-progress .progress span { background: var(--accent, #3FA9A0); }
.learn-lesson-pic { width: 46px; height: 46px; object-fit: cover; border-radius: 4px; flex: none; }
.learn-lesson-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.learn-lesson-name small { color: var(--muted); font-weight: 400; }
.learn-lesson.locked { opacity: 0.6; cursor: default; }
.learn-support { margin-top: 8px; color: var(--muted); }
.course-card.locked { opacity: 0.85; }

/* product card and editor details, like ThriveCart */
.tc-thumb { position: relative; overflow: hidden; }
.tc-thumb-img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.tc-ribbon { z-index: 2; }
.tc-ribbon.test { background: #F2C200; color: #3A2E00; }
.tc-btn.light { background: #9EC5CE; border-color: #9EC5CE; color: #fff; }
.pe-seg { display: flex; background: #F3F4F6; border-radius: 4px; overflow: hidden; }
.pe-seg button { flex: 1; border: 0; background: none; padding: 12px; font: inherit; color: #5B5E6B; cursor: pointer; border-bottom: 3px solid transparent; }
.pe-seg button.on { background: #CFF1F0; color: #0B5F5B; border-bottom-color: #18B5AE; }
.pe-prefix { display: flex; border: 1px solid #C9CBD1; border-radius: 4px; overflow: hidden; }
.pe-prefix span { background: #F3F4F6; padding: 0 12px; display: flex; align-items: center; border-right: 1px solid #C9CBD1; color: #5B5E6B; }
.pe-prefix input { border: 0 !important; flex: 1; }
.pe-with-count { position: relative; }
.pe-with-count input { padding-right: 40px !important; }
.pe-count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #18B5AE; font-size: 13px; }
.pe-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.pe-next { background: #18B5AE !important; border-color: #18B5AE !important; color: #fff !important; }

/* contacts, ActiveCampaign style */
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--blue); cursor: pointer; text-decoration: none; }
.ct-avatar { width: 40px; height: 40px; border-radius: 50%; background: #C9D3EA; color: var(--purple); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.ct-avatar.big { width: 72px; height: 72px; font-size: 24px; }
.ct-hero { background: linear-gradient(135deg, #EEF1FA, #F8F2F7); border-radius: 14px; padding: 28px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ct-hero h2 { margin: 0; font-size: 22px; }
.ct-searchbox { width: 100%; max-width: 760px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.ct-search { width: 100%; border: 0 !important; font-size: 16px; outline: none; min-height: 40px; }
.ct-searchrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.ct-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-chip, .ct-adv-btn { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--ground); font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.ct-adv-btn { border-radius: 8px; background: #fff; border-color: var(--blue); color: var(--purple); font-weight: 600; }
.ct-chip.on, .ct-adv-btn.on { background: var(--purple); border-color: var(--purple); color: #fff; }
.ct-adv { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; }
.ct-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ct-filter { min-height: 40px; border-radius: 8px; }
.ct-table td { vertical-align: middle; }
.ct-name { color: var(--blue); font-weight: 600; text-decoration: none; }
.ct-name:hover { text-decoration: underline; }
.ct-sort { border: 0; background: none; font: inherit; font-weight: 700; color: inherit; cursor: pointer; padding: 0; }
.ct-emailbtn, .ct-send { display: inline-flex; }
.ct-emailbtn > .btn, .ct-send > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ct-emailbtn .menu > summary, .ct-send .menu > summary { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; }
.ct-send .menu > summary { background: var(--red); border-color: var(--red); color: #fff; }
.ct-tabbar { border-bottom: 1px solid var(--line); display: flex; gap: 20px; }
.ct-tabbar span { padding: 8px 0; font-weight: 700; color: var(--blue); border-bottom: 3px solid var(--blue); }
.ct-page { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.ct-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ct-header { display: flex; gap: 16px; align-items: center; }
.ct-header h2 { margin: 0 0 4px; font-size: 24px; }
.ct-header a { color: var(--blue); }
.ct-card { display: flex; flex-direction: column; gap: 8px; }
.ct-card-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.ct-sub { font-weight: 700; color: var(--purple); margin-top: 4px; }
.ct-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 38px; border-bottom: 1px solid var(--ground); }
.ct-label { color: var(--muted); font-size: 14px; }
.ct-value { cursor: text; padding: 6px 8px; border-radius: 6px; word-break: break-word; }
.ct-value:hover { background: var(--ground); }
.ct-value.empty { color: #A9A6BD; }
.ct-value input, .ct-value select, .ct-value textarea { width: 100%; }
.ct-tagrow { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ct-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: 1; }
.ct-tags input { min-width: 140px; flex: 1; }
.ct-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--tint); color: var(--purple); border-radius: 6px; padding: 4px 8px; font-size: 13px; font-weight: 600; }
.ct-tag button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 2px; min-height: 24px; }
.ct-lists { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.ct-lists-head, .ct-lists-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 100px; gap: 10px; align-items: center; }
.ct-lists-head span { color: var(--muted); font-size: 13px; }
.ct-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ct-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ct-tabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 10px 12px; min-height: 44px; cursor: pointer; border-bottom: 3px solid transparent; }
.ct-tabs button.on { color: var(--purple); border-bottom-color: var(--blue); }
.ct-empty { padding: 28px 10px; text-align: center; color: var(--muted); }
.ct-note { background: #FFFBE6; border: 1px solid #F3E7A6; border-radius: 8px; padding: 10px 12px; }
.ct-activity { background: var(--ground); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 140px); overflow: auto; position: sticky; top: 12px; }
.ct-activity-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ct-act { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: start; }
.ct-act-icon { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.ct-act-card { padding: 10px 12px !important; display: flex; flex-direction: column; gap: 3px; }
.ct-act-text { font-size: 14px; word-break: break-word; }
@media (max-width: 1000px) { .ct-page { grid-template-columns: 1fr; } .ct-activity { position: static; max-height: none; } }
@media (max-width: 600px) { .ct-row { grid-template-columns: 1fr; gap: 0; } .ct-lists-head, .ct-lists-row { grid-template-columns: minmax(0,1fr) 120px; } .ct-lists-head span:last-child, .ct-lists-row span:last-child { display: none; } }

/* Courses > My students, ThriveCart style */
.st-page { display: flex; flex-direction: column; gap: 16px; }
.st-search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.st-search input { flex: 2 1 260px; min-height: 46px; }
.st-search select { flex: 1 1 180px; min-height: 46px; }
.st-clear { background: #3C8DAD; border-color: #3C8DAD; color: #fff; }
.st-go { background: #37A6E8; border-color: #37A6E8; color: #fff; }
.st-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.st-stat { display: flex; align-items: center; justify-content: center; gap: 14px; background: #fff; border: 1px solid #E2E3E5; border-radius: 6px; padding: 22px 12px; font: inherit; cursor: pointer; color: #5B5E6B; }
.st-stat.on { border: 2px solid #8F9399; }
.st-stat > span:last-child { display: flex; flex-direction: column; align-items: center; font-weight: 600; }
.st-stat b { font-size: 22px; }
.st-stat.active b { color: #0B9A93; } .st-stat.paused b { color: #C2410C; } .st-stat.disabled b { color: #9CA3AF; }
.st-icon { font-size: 28px; }
.st-table thead th { background: #F7F7F8; }
.st-customer { display: flex; gap: 12px; align-items: center; }
.st-customer a { color: #2F80C3; text-decoration: none; }
.st-status { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.st-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.st-status.active { color: #0B9A93; } .st-status.paused { color: #C2410C; } .st-status.disabled { color: #9CA3AF; }
.st-view { min-height: 36px; font-size: 13px; color: #6B7280; border-color: #E2E3E5; display: inline-flex; align-items: center; text-decoration: none; }
.st-more { min-height: 36px !important; border-color: #E2E3E5 !important; color: #6B7280 !important; }
.st-courses { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.st-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.st-pages { display: flex; gap: 4px; }
.st-pages button { min-width: 40px; min-height: 40px; border: 1px solid #E2E3E5; background: #fff; border-radius: 6px; font: inherit; cursor: pointer; }
.st-pages button.on { background: #0B7A75; border-color: #0B7A75; color: #fff; }

/* contacts: manage pages and reports */
.cm-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--ground); border-radius: 10px; padding: 10px; }
.cm-toolbar select, .cm-toolbar input { min-height: 40px; }
.cm-small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.cm-editor { display: flex; flex-direction: column; gap: 12px; }
.cm-title-input { font-size: 20px; font-weight: 700; border: 0 !important; border-bottom: 1px dashed var(--line) !important; border-radius: 0 !important; padding-left: 0 !important; }
.cm-rules { display: flex; flex-direction: column; gap: 8px; }
.cm-rule { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--ground); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.cm-rule select, .cm-rule input { min-height: 38px; }
.cm-rule-value { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cm-points { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--purple); }
.cm-count { font-size: 18px; }
.cm-count b { font-size: 28px; color: var(--purple); }
.cm-preview { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cm-person { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--ink); background: var(--ground); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 13px; }
.cm-person .ct-avatar { width: 26px; height: 26px; font-size: 11px; }
.cm-types { display: flex; gap: 16px; justify-content: center; }
.cm-type { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 150px; padding: 20px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.cm-type:hover { border-color: var(--blue); }
.cm-type-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--tint); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.cm-seg { display: inline-flex; border: 1px solid var(--blue); border-radius: 8px; overflow: hidden; }
.cm-seg button { border: 0; background: #fff; font: inherit; font-weight: 600; padding: 8px 14px; min-height: 40px; cursor: pointer; color: var(--purple); }
.cm-seg button.on { background: #1F5EFF; color: #fff; }
.cm-score-top { display: flex; gap: 12px; flex-wrap: wrap; }
.cm-switches { display: flex; flex-direction: column; gap: 12px; }
.cm-switch { display: flex; gap: 10px; align-items: flex-start; }
.cm-switch input { margin-top: 4px; width: 18px; height: 18px; }
.cm-switch > span { display: flex; flex-direction: column; }
.cm-ticks { margin: 0; padding-left: 20px; text-align: left; }
.cm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cm-tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.cm-tile b { font-size: 30px; }
.cm-tile.blue { background: #F2F5FD; } .cm-tile.blue b { color: #2F6BDE; }
.cm-tile.orange { background: #FFF7F0; } .cm-tile.orange b { color: #E07A2E; }
.cm-up { color: #16A34A; } .cm-down { color: var(--red); }
.cm-chart { overflow-x: auto; color: var(--muted); }
.cm-bar { height: 14px; border-radius: 4px; background: var(--blue); min-width: 2px; }
.cm-range { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.cm-range input { min-height: 40px; }

/* lesson builder, ThriveCart Learn style */
.lb-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fff; border: 1px solid #E2E3E5; border-radius: 10px; padding: 10px 12px; }
.lb-tabs { display: flex; gap: 6px; }
.lb-tabs button { border: 1px solid transparent; background: #F3F4F6; border-radius: 6px; padding: 9px 16px; font: inherit; font-weight: 600; color: #5B5E6B; cursor: pointer; min-height: 40px; }
.lb-tabs button.on { border-color: #8B5CF6; color: #6D28D9; background: #fff; }
.lb-dirty { box-shadow: 0 0 0 3px rgba(55, 166, 232, .35); }
.lb-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; border: 1px solid #E2E3E5; border-radius: 10px; overflow: hidden; background: #F7F7F8; min-height: 70vh; }
.lb-side { background: #fff; border-right: 1px solid #E2E3E5; padding: 14px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; max-height: 90vh; overflow: auto; }
.lb-side-title { text-align: center; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: #6B9FB8; background: #F3F8FA; margin: -14px -14px 4px; padding: 14px; border-bottom: 1px solid #E2E3E5; }
.lb-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lb-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: 1px solid #D5D8DD; border-radius: 6px; background: #fff; font: inherit; font-size: 13px; color: #4B5563; cursor: grab; min-height: 78px; }
.lb-tile:hover { border-color: #37A6E8; color: #1E6FA8; box-shadow: 0 2px 8px rgba(30, 111, 168, .12); }
.lb-tile-icon { font-size: 20px; font-weight: 700; color: #6B7280; }
.lb-back { align-self: flex-start; border: 0; background: none; color: #2F80C3; font: inherit; font-weight: 600; cursor: pointer; padding: 4px 0; min-height: 36px; }
.lb-settings { display: flex; flex-direction: column; gap: 10px; }
.lb-side-actions { display: flex; gap: 8px; border-top: 1px solid #E2E3E5; padding-top: 10px; }
.lb-main { padding: 24px; min-width: 0; }
.lb-page { max-width: 820px; margin: 0 auto; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 28px 32px; display: flex; flex-direction: column; gap: 6px; }
.lb-cover { width: 100%; max-height: 240px; object-fit: cover; border-radius: 6px; }
.lb-block { position: relative; border: 2px solid transparent; border-radius: 6px; padding: 8px; cursor: pointer; }
.lb-block:hover { border-color: #BFDDF3; }
.lb-block.on { border-color: #37A6E8; }
.lb-block.lifting { opacity: .4; }
.lb-tools { position: absolute; top: -16px; right: 8px; display: none; gap: 2px; align-items: center; background: #1F2937; border-radius: 6px; padding: 2px 4px; z-index: 2; }
.lb-block:hover .lb-tools, .lb-block.on .lb-tools, .lb-block:focus-within .lb-tools { display: flex; }
.lb-tools button { border: 0; background: none; color: #fff; font-size: 14px; min-width: 30px; min-height: 30px; cursor: pointer; border-radius: 4px; }
.lb-tools button:hover:not(:disabled) { background: #374151; }
.lb-tools button:disabled { opacity: .35; cursor: default; }
.lb-handle { color: #fff; cursor: grab; padding: 0 6px; font-size: 16px; }
.lb-tag { color: #D1D5DB; font-size: 12px; padding: 0 6px; }
.lb-content { pointer-events: none; }
.lb-content iframe { pointer-events: none; }
.lb-block.drop-before { box-shadow: 0 -4px 0 #37A6E8; }
.lb-block.drop-after { box-shadow: 0 4px 0 #37A6E8; }
.lb-dropend { border: 2px dashed #D5D8DD; border-radius: 6px; padding: 18px; text-align: center; color: #9CA3AF; margin-top: 8px; }
.lb-canvas.dragging .lb-dropend { border-color: #37A6E8; color: #1E6FA8; }
.lb-dropend.drop-before { background: #EAF5FD; }
.lb-options { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 860px) { .lb-wrap { grid-template-columns: 1fr; } .lb-side { position: static; max-height: none; border-right: 0; border-bottom: 1px solid #E2E3E5; } .lb-tiles { grid-template-columns: repeat(3, 1fr); } .lb-main { padding: 10px; } .lb-page { padding: 16px; } .lb-tools { display: flex; position: static; margin-bottom: 6px; width: max-content; } }
.login-switch { text-align: center; font-weight: 600; color: var(--blue); }

/* "Update module image" window, ThriveCart style */
.pd-dialog { width: 100%; max-width: 640px; background: #fff; border-radius: 4px; box-shadow: 0 20px 50px rgba(0,0,0,.25); overflow: hidden; }
.pd-body { padding: 28px 32px 24px; display: flex; flex-direction: column; gap: 14px; }
.pd-body h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: #2D3142; }
.pd-size { color: #5B5E6B; }
.pd-box { border: 1px solid #C9CDD3; border-radius: 4px; min-height: 180px; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pd-box.over { border-color: #20C5C5; background: #F0FBFB; }
.pd-pic { position: relative; max-width: 100%; }
.pd-pic img { display: block; max-width: 100%; max-height: 260px; }
.pd-tools { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 24px; opacity: 0; transition: opacity .15s; }
.pd-pic:hover .pd-tools, .pd-pic:focus-within .pd-tools { opacity: 1; }
.pd-tools button { width: 72px; height: 64px; border: 0; border-radius: 6px; background: rgba(255,255,255,.88); font-size: 22px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.pd-tools button:hover { background: #fff; }
.pd-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; font: inherit; color: #6B7280; cursor: pointer; padding: 30px; min-height: 44px; }
.pd-empty-icon { font-size: 28px; color: #20C5C5; }
.pd-foot { background: #EEF2F4; padding: 20px 32px; display: flex; justify-content: flex-end; gap: 16px; }
.pd-cancel, .pd-save { min-height: 48px; padding: 0 28px; border: 0; border-radius: 3px; font: inherit; font-weight: 700; font-size: 16px; color: #fff; cursor: pointer; }
.pd-cancel { background: #343E4C; }
.pd-save { background: #20C5C5; }
.pd-save:disabled { opacity: .6; }
.tcl-thumbbtn { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 6px; flex: none; line-height: 0; }
.tcl-thumbpen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(30, 26, 69, .45); color: #fff; font-size: 16px; border-radius: 6px; opacity: 0; transition: opacity .15s; line-height: 1; }
.tcl-thumbbtn:hover .tcl-thumbpen, .tcl-thumbbtn:focus-visible .tcl-thumbpen { opacity: 1; }
.tcl-thumbbtn.big { width: 100%; }
.tcl-thumbbtn.big .tcl-info-pic { width: 100%; }
@media (max-width: 600px) { .pd-body, .pd-foot { padding-left: 16px; padding-right: 16px; } }

/* ---------- phone and tablet: app friendly ---------- */
.top-menu-btn { display: none; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; background: none; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.top-menu-btn span[aria-hidden] { font-size: 18px; line-height: 1; }
.keep-signed-in { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.keep-signed-in input { width: 18px; height: 18px; }
.install-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(30,26,69,.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.install-card { background: #fff; border-radius: 14px; padding: 24px; max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.install-card h2 { margin: 0; }
.install-card ol { margin: 0; padding-left: 20px; line-height: 1.6; }
.install-icon { border-radius: 14px; }
/* the installed app: room for the phone's clock and notch */
.topbar { padding-top: env(safe-area-inset-top); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.learn-top { padding-top: max(14px, env(safe-area-inset-top)); }
@media (display-mode: standalone) { .shell { grid-template-rows: calc(56px + env(safe-area-inset-top)) minmax(0, 1fr); } }
@media (max-width: 760px) {
  .top-menu-btn { display: inline-flex; }
  .topbar .brand-name { display: none; }
  .shell { grid-template-rows: auto auto minmax(0, 1fr); }
  .topbar { min-height: 56px; }
  .rail { display: none; }
  .shell.nav-open .rail { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 12px 14px; max-height: 75vh; overflow-y: auto; }
  .shell.nav-open .rail-link { width: auto; height: auto; min-height: 46px; justify-content: flex-start; gap: 12px; padding: 0 12px; flex: none; }
  .shell.nav-open .rail-label { display: inline; position: static; transform: none; opacity: 1; background: none; color: #fff; box-shadow: none; padding: 0; font-size: 15px; pointer-events: auto; }
  /* the section menu becomes one row you can swipe sideways */
  .section-menu { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 10px 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .section-menu::-webkit-scrollbar { display: none; }
  .section-menu a { flex: none; white-space: nowrap; min-height: 38px; border: 1px solid #E2E3E5; border-radius: 999px; font-size: 13px; }
  .main { gap: 16px; padding-bottom: max(32px, env(safe-area-inset-bottom)); }
  body.admin .main h1 { font-size: 21px; }
  .head > div:last-child { width: 100%; }
  .head .btn, .head a.btn { flex: 1 1 auto; justify-content: center; }
  /* phones zoom into small text boxes; 16px stops that */
  input, select, textarea { font-size: 16px !important; }
  .card { padding: 14px; }
  table { font-size: 14px; }
  .vm-overlay { padding: 8px; align-items: flex-end; }
  .vm-dialog, .pd-dialog { max-height: 92vh; overflow: auto; border-radius: 14px 14px 0 0; }
  .menu-list { max-width: calc(100vw - 24px); }
  .learn-top { padding-left: 16px; padding-right: 16px; }
  .learn-top .small { display: none; }
  .learn-main { padding: 18px 12px; }
}
@media (hover: none) { .btn, .rowbtn, .menu-item { min-height: 44px; } }
.rail-link { text-decoration: none; }

/* ---------- my AI team ---------- */
.ai-agent-badge { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; flex: none; }
.ai-agent-badge.big { width: 52px; height: 52px; font-size: 26px; }
.ai-empty .ai-agent-badge { width: 64px; height: 64px; font-size: 32px; margin-bottom: 8px; }
.ai-home-hero { background: linear-gradient(135deg, #F3F0FA, #FBF3EE); border-radius: 16px; padding: 32px 20px; text-align: center; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.ai-home-hero h2 { margin: 0; font-size: 28px; font-weight: 600; line-height: 1.25; color: #2E266D; }
.ai-home-askrow { display: flex; gap: 8px; width: 100%; max-width: 720px; flex-wrap: wrap; background: #fff; border: 1px solid #E2E3E5; border-radius: 12px; padding: 8px; box-shadow: 0 4px 16px rgba(46,38,109,.08); }
.ai-home-ask { flex: 1 1 260px; border: 0 !important; min-height: 44px; font-size: 16px; outline: none; }
.ai-home-askrow select { min-height: 44px; }
.ai-progress { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; text-decoration: none; color: inherit !important; }
.ai-progress:hover { border-color: var(--blue); }
.ai-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ai-member { display: flex; flex-direction: column; gap: 10px; }
.ai-member-head { display: flex; gap: 12px; align-items: center; }
.ai-does { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.ai-steps { display: flex; flex-direction: column; gap: 10px; }
.ai-step { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ai-step.locked { opacity: .55; }
.ai-step.done { border-color: #BBE5C8; background: #F6FCF8; }
.ai-step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--tint); color: var(--purple); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ai-step.done .ai-step-num { background: #16A34A; color: #fff; }
.ai-step-body { flex: 1 1 280px; display: flex; flex-direction: column; gap: 3px; }
.ai-import { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit !important; border-style: dashed; }
.ai-guide { display: flex; flex-direction: column; gap: 10px; }
.ai-guide-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.ai-guide-text { width: 100%; font-family: inherit; line-height: 1.55; }
.ai-work-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ai-work-title { font-weight: 700; color: var(--ink) !important; text-align: left; }
.ai-work-body { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.ai-team-edit { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ai-team-edit summary { cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 36px; }
.ai-team-edit[open] { display: flex; flex-direction: column; gap: 10px; }
.ai-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) { .ai-home-hero h2 { font-size: 22px; } }
