.theme-editor-nav{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 16px}
.theme-editor-nav a{padding:8px 12px;background:#fff;border-radius:12px;text-decoration:underline}
.theme-editor fieldset{border:0;padding:0;margin:0;min-width:0}
.theme-editor select{display:block;width:100%;max-width:520px;padding:9px 11px;border:1px solid #a9b8b3;border-radius:8px;color:var(--ink);background:#fff;font:inherit}
.theme-page-label{margin:15px 0}
.theme-slot,.theme-document-row{display:grid;align-items:start;gap:14px;padding:12px 0;border-bottom:1px solid #e3e8e3}
.theme-slot{grid-template-columns:96px minmax(0,1fr)}
.theme-slot img{width:96px;height:76px;object-fit:contain;margin:auto;background:#edf2ed;border-radius:8px}
.theme-slot-main{display:grid;justify-items:start;gap:8px;min-width:0}
.theme-slot-main strong{overflow-wrap:anywhere}
.theme-slot-main input,.theme-slot-main select{max-width:100%}
.theme-pdf-link{background:#f2f6f1;padding:10px;border-radius:8px;text-decoration:underline}
.theme-slots-group h3,#theme-documents h3,.theme-library h3{font-size:1.25rem;margin:16px 0 5px}
#theme-documents>select,#theme-documents>input,.theme-library input{margin:8px 0}
.theme-document-row{grid-template-columns:minmax(0,1fr) auto auto;align-items:center}
.theme-table-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) 82px;gap:6px;margin-bottom:8px}
.theme-table-row label,.theme-table-row button{font-size:.73rem}
#theme-comparison>.cta{margin-top:6px}
#theme-media-status{color:var(--deep);min-height:22px}
#theme-library{display:flex;gap:9px 14px;flex-wrap:wrap}
.theme-documents{width:100%;padding-inline:clamp(18px,5vw,65px)}
.theme-documents .docs-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:15px}
.theme-documents .docs-grid>a{padding:14px;border-radius:12px;background:var(--paper);display:flex;justify-content:space-between;gap:10px}
@media(max-width:550px){.theme-slot{grid-template-columns:64px minmax(0,1fr)}.theme-slot img{width:64px;height:64px}.theme-document-row{grid-template-columns:minmax(0,1fr) auto}.theme-table-row{grid-template-columns:repeat(4,minmax(0,1fr))}.theme-table-row button{grid-column:1/-1}.theme-documents .docs-grid{grid-template-columns:1fr}}

.theme-login {
  display: grid;
  gap: 1rem;
  max-width: 26rem;
}
.theme-login label {
  display: grid;
  gap: .4rem;
}
.theme-login input {
  width: 100%;
  padding: .7rem;
  border: 1px solid currentColor;
  border-radius: .35rem;
  background: #fff;
  color: #192522;
}
.theme-login .cta {
  justify-self: start;
}

.operations h2 { margin: 12px 0 }
.operations-card { background: white; border: 1px solid #dde4df; border-radius: 16px; padding: clamp(14px, 3vw, 24px); margin: 12px 0; overflow-wrap: anywhere }
.operations-card h2 small { font-size: .85rem; font-weight: 500; color: #375649 }
.operations-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px }
.operations-details dt { font-weight: 600 }
.operations-details dd { margin: 2px 0 0 }
.operations-form { display: grid; gap: 10px }
.operations-form input:not([type="hidden"]), .operations-form textarea { display: block; width: 100%; max-width: 34rem; margin-top: 4px; padding: 10px; font: inherit; color: inherit; border: 1px solid #a9b8b3; border-radius: 8px }
.operations-form textarea { min-height: 5rem; resize: vertical }
.operations-form > .cta { justify-self: start }
.operations .operations-alert { padding: 12px; background: #fff1dc; border-radius: 8px }
.operations-actions, .operations-pages { display: flex; flex-wrap: wrap; gap: 10px }
.operations-list { list-style: none; padding: 0 }
.operations-list li :is(a,div) { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 8px 18px; background: white; padding: 12px; border-radius: 12px; margin: 6px 0; overflow-wrap: anywhere }
.operations a[aria-current="page"] { background: #d9efcc; font-weight: 700 }

/* Shared investor and content workspace */
.crm-shell { --crm-ink:#14261e; --crm-panel:#f2f3f4; --crm-selected:#ecf8e8; --crm-line:#e5e9e6; --crm-green:#073b2c; --crm-lime:#a9ee68; display:grid; grid-template-columns:204px minmax(0,1fr); align-items:start; min-height:100vh; padding:0; background:#fff; color:var(--crm-ink) }
.crm-shell *, .crm-shell *::before, .crm-shell *::after { box-sizing:border-box }
.crm-shell :focus-visible { outline:2px solid #284e3b; outline-offset:3px }
.crm-rail { position:sticky; top:0; display:flex; flex-direction:column; min-height:100dvh; padding:20px 12px; border-right:1px solid var(--crm-line); background:#fff }
.crm-wordmark { display:flex; align-items:center; min-height:54px; padding:0 10px; margin-bottom:16px }
.crm-wordmark img { object-fit:contain; object-position:left center }
.crm-rail nav { display:grid; gap:6px }
.crm-rail nav a { display:flex; align-items:center; gap:12px; min-height:46px; padding:10px 13px; border-radius:12px; font-size:.96rem }
.crm-rail nav a[aria-current="page"], .crm-rail nav a:hover { background:var(--crm-selected) }
.crm-rail nav svg { width:21px; height:21px; flex:none }
.crm-rail form { margin-top:auto; padding:18px 12px 2px }
.crm-mobile-signout { display:none }
.crm-workspace { min-width:0 }
.crm-shell main { max-width:none; margin:0; padding:24px clamp(16px,3vw,42px) 36px }
.crm-shell .crm-topbar { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px clamp(16px,3vw,42px); border-bottom:1px solid var(--crm-line) }
.crm-topbar [role="search"] { display:flex; gap:8px; width:min(100%,680px) }
.crm-shell .crm-topbar input[type="search"] { min-width:0; width:100%; min-height:44px; padding:8px 14px; border:1px solid transparent; border-radius:12px; background:var(--crm-panel); color:inherit; font:inherit }
.crm-topbar [role="search"] button { min-height:44px; border:0; border-radius:12px; background:var(--crm-selected); color:inherit; padding:8px 12px; font:inherit }
.crm-directory { display:grid; grid-template-columns:minmax(225px, .85fr) minmax(0, 1.9fr); min-height:520px }
.crm-directory-list { border-right:1px solid var(--crm-line); padding:4px 18px 12px 0 }
.crm-shell :is(h1,h2,h3) { letter-spacing:-.035em }
.crm-directory-list h1, .crm-shell .operations > h2 { margin:0 0 15px; font-size:clamp(1.35rem,2.2vw,1.75rem); font-weight:600; line-height:1.15 }
.crm-directory-list ol, .crm-records { list-style:none; padding:0; margin:0 }
.crm-directory-list li a { display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:59px; padding:9px; border-radius:12px; overflow-wrap:anywhere }
.crm-directory-list li + li { border-top:1px solid var(--crm-line) }
.crm-directory-list li a[aria-current="true"], .crm-directory-list li a:hover { background:var(--crm-selected) }
.crm-directory-list li small, .crm-records li small { display:block; margin-top:3px; color:#505955; font-size:.8rem }
.crm-avatar { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:#e8eaeb; color:#18392a; font-weight:600; font-size:.82rem }
.crm-profile { padding:0 0 12px 22px; min-width:0 }
.crm-profile-placeholder { display:grid; place-content:center; text-align:center; color:#505955 }
.crm-profile-placeholder h2, .crm-shell .crm-record-title, .crm-shell .operations-card h2 { font-size:1.25rem; margin:0 0 10px; font-weight:600; line-height:1.15 }
.crm-profile-back { display:none }
.crm-identity { color:#fff; background:#073b2c radial-gradient(ellipse at 100% 125%,#12634d 0%,#12634d 29%,transparent 30%); border-radius:16px; padding:24px; display:flex; align-items:center; gap:14px; min-height:122px }
.crm-identity > div { min-width:0; overflow-wrap:anywhere }
.crm-identity h1 { font-size:clamp(1.5rem,3vw,2.1rem); line-height:1.15; margin:0 0 4px; font-weight:600 }
.crm-identity p { margin:0; color:#ecf6ee }
.crm-profile-avatar { width:46px; height:46px; flex:none }
.crm-badge { display:inline-flex; align-items:center; justify-content:center; border-radius:99px; padding:4px 10px; font-size:.76rem; font-weight:600; white-space:nowrap }
.crm-approved { color:#214e33; background:#e1f5dd }
.crm-identity .crm-approved { background:var(--crm-lime) }
.crm-pending { color:#65490b; background:#fff0c9 }
.crm-rejected { color:#822d34; background:#fae8ea }
.crm-segmented { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; padding:4px; background:var(--crm-panel); border-radius:12px; margin:15px 0 }
.crm-segmented a { display:grid; place-items:center; min-height:42px; text-align:center; border-radius:9px; padding:5px; font-size:.88rem }
.crm-segmented a[aria-current="page"] { color:#102519; background:white; box-shadow:0 1px 4px #17352a12; font-weight:600 }
.crm-records li { display:grid; grid-template-columns:36px minmax(0,1fr) auto auto; align-items:center; gap:10px; padding:12px; margin-bottom:8px; border-radius:12px; background:var(--crm-panel) }
.crm-asset { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:#deece5; font-weight:700; font-size:.57rem }
.crm-shell .cta { min-height:44px; padding:8px 14px; font-size:.86rem; text-transform:none; border-radius:11px }
.crm-shell .cta.green { background:var(--crm-lime); color:#172b16 }
.crm-shell .cta.pale { background:#fff; color:#172b16 }
.crm-empty { padding:12px; color:#505955; font-size:.9rem }
.crm-empty a { text-decoration:underline }
.crm-shell .operations-card { background:var(--crm-panel); border-color:transparent }
.crm-shell .operations-form input, .crm-shell .operations-form textarea { background:#fff }
@media (max-width:900px) {
  .crm-shell { grid-template-columns:156px minmax(0,1fr) }
  .crm-directory { grid-template-columns:minmax(180px,.8fr) minmax(0,1.6fr) }
  .crm-profile { padding-left:14px }
  .crm-records li { grid-template-columns:36px minmax(0,1fr) auto }
  .crm-records li .cta { grid-column:1 / -1 }
}
@media (max-width:700px) {
  .crm-shell { display:block; padding-bottom:calc(70px + env(safe-area-inset-bottom,0px)) }
  .crm-shell main { padding:16px 14px 26px }
  .crm-rail { position:fixed; z-index:20; inset:auto 0 0; min-height:0; padding:5px 8px calc(5px + env(safe-area-inset-bottom,0px)); border:0; border-top:1px solid var(--crm-line) }
  .crm-rail nav { grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px }
  .crm-rail nav a { display:grid; justify-items:center; gap:3px; padding:5px; min-height:50px; font-size:.74rem }
  .crm-rail nav svg { width:20px; height:20px }
  .crm-rail :is(.crm-wordmark,form) { display:none }
  .crm-shell .crm-mobile-signout { display:flex; min-height:44px; align-items:center }
  .crm-topbar .crm-mobile-signout button { white-space:nowrap; font-size:.78rem }
  .crm-shell .crm-topbar { padding:10px 14px; gap:8px }
  .crm-shell.crm-account-selected .crm-topbar { display:none }
  .crm-directory { display:block; min-height:0 }
  .crm-directory-list { border:0; padding:0 }
  .crm-profile { padding:0 }
  .crm-profile-placeholder, .crm-profile-open .crm-directory-list { display:none }
  .crm-profile-back { display:inline-flex; min-height:44px; align-items:center; font-size:.9rem; margin-bottom:6px }
  .crm-identity { padding:16px; flex-wrap:wrap; min-height:104px }
  .crm-identity > div { flex:1; min-width:120px }
  .crm-identity .crm-badge { margin-left:60px }
  .crm-records li .cta { width:100% }
}


/* Page-based site editor */
.studio { --studio-ink:#15291f; --studio-green:#073b2c; --studio-line:#e1e8e3; --studio-panel:#f1f3f2; --studio-selected:#e6f4df; color:var(--studio-ink) }
.studio [hidden] { display:none !important }
.studio :is(h1,h2,h3,h4) { margin:0; line-height:1.15; letter-spacing:-.035em }
.studio h1 { font-size:clamp(1.65rem,3vw,2.2rem) }
.studio h2 { font-size:1.15rem }
.studio h3 { font-size:1.08rem }
.studio h4 { font-size:.96rem; margin-top:12px }
.studio :is(input,select,textarea) { min-width:0; max-width:100% }
.studio select { max-width:none }
.studio p { margin:0 }
.studio button:disabled { opacity:.5; cursor:default }
.studio-header { position:sticky; z-index:4; top:0; background:#fff; display:flex; align-items:center; justify-content:space-between; gap:12px 20px; padding:0 0 16px; min-height:62px }
.studio-header p { margin:4px 0 0; font-size:.83rem; color:#4b5c52 }
.studio-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px }
.studio-live { font-size:.85rem; text-decoration:underline }
.studio .studio-actions .cta { min-height:44px; white-space:nowrap }
.studio-page-card { background:#073b2c radial-gradient(ellipse at 100% 150%,#116450 0%,#116450 36%,transparent 37%); color:#fff; border-radius:15px; display:grid; grid-template-columns:max-content minmax(0,400px); gap:10px 14px; align-items:center; padding:15px 18px; margin-bottom:16px }
.studio-page-card > label { font-size:.9rem; font-weight:500 }
.studio-page-card select { min-height:43px; border:0; border-radius:10px; color:#153327; background:#fff }
.studio-preview-entry, .studio-mobile { display:none !important }
.studio-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(295px,.58fr); gap:14px; align-items:start }
.studio-canvas,.studio-inspector { min-width:0; border:1px solid var(--studio-line); border-radius:16px; overflow:clip; background:#fff }
.studio-canvas { position:sticky; top:76px; background:var(--studio-panel) }
.studio-canvas-top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 14px; padding:12px 14px; background:#fff; border-bottom:1px solid var(--studio-line) }
.studio-canvas-top p { color:#4b5c52; font-size:.78rem; min-height:1.15em; margin:3px 0 0 }
.studio-canvas-controls { display:flex; align-items:center; gap:6px }
.studio-device { display:flex; padding:3px; gap:3px; background:var(--studio-panel); border-radius:10px }
.studio-device button,.studio-refresh,.studio-back { border:0; background:transparent; color:inherit; font:inherit; font-size:.8rem; min-height:39px; border-radius:8px; padding:5px 9px }
.studio-device button[aria-pressed="true"] { background:white; font-weight:650 }
.studio-refresh { background:var(--studio-selected) }
.studio-frame-window { position:relative; height:clamp(440px,72vh,760px); overflow:hidden; background:#e6ebe7 }
#preview-frame { display:block; position:absolute; left:var(--preview-edge,0px); top:0; border:0; background:#fff; transform-origin:top left; width:100%; height:100% }
.studio-inspector-top { display:flex; align-items:center; gap:10px; padding:14px }
.studio-section-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:0 12px 10px }
.studio-section-list button { display:grid; justify-items:center; align-content:center; gap:4px; min-height:55px; color:inherit; background:var(--studio-panel); border:0; border-radius:10px; padding:6px 3px; font:inherit; font-size:.76rem }
.studio-section-list button span:first-child { font:600 .98rem/1.1 system-ui,sans-serif; color:var(--studio-green) }
.studio-section-list button[aria-pressed="true"] { background:var(--studio-selected); font-weight:650 }
.studio-panels { padding:14px; border-top:1px solid var(--studio-line); overflow-wrap:anywhere }
.studio-panels h3 { margin:0 0 12px }
.studio-panels .editor-grid { grid-template-columns:minmax(0,1fr); gap:8px }
.studio-panels .editor-grid label { font-size:.85rem; line-height:1.3 }
.studio-panels :is(input:not([type="file"]),select,textarea) { width:100%; border-radius:9px }
.studio-panels [type="search"] { margin-bottom:10px }
.studio-panels .theme-slot { grid-template-columns:56px minmax(0,1fr); gap:9px; padding:10px 0 }
.studio-panels .theme-slot img { width:56px; height:56px }
.studio-panels .theme-slot-main { grid-template-columns:minmax(0,1fr); width:100%; font-size:.85rem }
.studio-panels :is(.theme-slot-main,.theme-document-row,#theme-documents) input { width:100% }
.studio-panels .theme-document-row { grid-template-columns:minmax(0,1fr) auto; gap:6px }
.studio-panels .theme-table-row { grid-template-columns:repeat(2,minmax(0,1fr)) }
.studio-panels .theme-table-row button { grid-column:1 / -1 }
.studio-panels details, .studio-logo { background:var(--studio-panel); padding:12px; border-radius:12px; margin:12px 0 }
.studio-panels details details { background:#fff; margin-bottom:0 }
.studio-logo { display:grid; gap:6px; justify-items:start }
.studio-logo img { display:block; max-width:min(180px,100%); height:auto; max-height:88px; object-fit:contain }
.studio-logo p { font-size:.8rem; color:#4b5c52 }
.studio + .crm-mobile-signout { margin:0 14px 12px }
@media (max-width:1060px) {
  .studio-layout { grid-template-columns:minmax(0,1fr) minmax(245px,.75fr) }
}
@media (max-width:760px) {
  .studio-preview-entry, .studio-mobile { display:inline-flex !important; align-items:center }
  .studio-header { align-items:flex-start; padding:8px 0 12px }
  .studio-actions { flex-direction:column-reverse; align-items:flex-end; gap:6px }
  .studio-live { font-size:.72rem }
  .studio-page-card { grid-template-columns:minmax(0,1fr); padding:14px }
  .studio-page-card .studio-preview-entry { justify-self:start }
  .studio-layout { display:block }
  .studio-canvas { position:static }
  .studio-device { display:none }
  .studio-frame-window { height:clamp(390px,67dvh,780px) }
  .studio-inspector { margin-bottom:12px }
  .studio-section-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px }
  .studio[data-view="page"] .studio-section-list button[aria-pressed="true"] { background:var(--studio-panel); font-weight:400 }
  .studio-section-list button { display:flex; justify-content:flex-start; align-items:center; gap:8px; padding:10px; min-height:48px; font-size:.86rem }
  .studio[data-view="page"] :is(.studio-canvas,.studio-panels,.studio-inspector-top .studio-back),
  .studio[data-view="preview"] :is(.studio-inspector,.studio-page-card),
  .studio:not([data-view="page"]):not([data-view="preview"]) :is(.studio-canvas,.studio-page-card,.studio-section-list,.studio-inspector-top h2) { display:none !important }
}
