.cms-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:28px; }
.cms-heading p { color:var(--muted); margin:0; }
.cms-actions { display:flex; gap:10px; }
.cms-toolbar { display:flex; align-items:end; justify-content:space-between; gap:20px; position:sticky; top:80px; z-index:8; padding:14px 18px; backdrop-filter:blur(14px); background:rgba(255,255,255,.92); }
.cms-toolbar label { width:min(560px,100%); font-size:13px; font-weight:700; }
.cms-toolbar input { margin-top:5px; }
.cms-toolbar span { color:var(--muted); }
.cms-sections { display:grid; gap:14px; }
.cms-section { padding:0; margin:0; overflow:hidden; scroll-margin-top:150px; transition:box-shadow .18s,border-color .18s; }
.cms-section summary { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 20px; color:var(--ink); }
.cms-section summary b { color:var(--accent); margin-right:10px; }
.cms-section summary small { color:var(--muted); font-weight:500; }
.cms-section[open] { border-color:#cfdbde; box-shadow:0 14px 34px rgba(35,52,59,.08); }
.cms-section[open] summary { background:linear-gradient(90deg,var(--accent-soft),#f7f9f9); border-bottom:1px solid var(--line); }
.cms-section .table-scroll { border:0; border-radius:0; max-height:620px; }
.cms-table th { top:0; }
.cms-savebar { position:sticky; bottom:12px; display:flex; justify-content:space-between; align-items:center; gap:20px; padding:14px 18px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 8px 30px rgba(25,45,55,.15); color:var(--muted); }
.excel-sheet-wrap { overflow:auto; background:#f1f4f4; padding:20px; }
.excel-sheet { width:auto; min-width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0; background:#fff; box-shadow:0 5px 20px rgba(35,52,59,.08); border-radius:8px; overflow:hidden; }
.excel-sheet td { min-width:0; padding:5px 7px; line-height:1.25; overflow:hidden; }
.excel-sheet td span { white-space:inherit; overflow-wrap:anywhere; }
.excel-input { display:block; width:100%; min-height:30px; padding:7px 9px; resize:vertical; border:1px solid #b8c9cd; border-radius:6px; background:#fffdf5; color:inherit; font:inherit; text-align:inherit; box-shadow:0 1px 2px rgba(35,52,59,.04); }
.excel-input:hover { border-color:#8eabb2; background:#fff; }
.excel-input:focus { outline:0; border-color:#668b94; box-shadow:0 0 0 3px rgba(84,121,131,.14); background:#fff; }
.excel-select { min-height:34px; height:34px; resize:none; padding-right:28px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; cursor:pointer; }
.excel-field-small { min-height:32px; }
textarea.excel-field-medium { min-height:48px; }
textarea.excel-field-large { min-height:92px; line-height:1.45; }
.cms-workspace { display:grid; grid-template-columns:250px minmax(0,1fr); gap:18px; align-items:start; }
.cms-workspace.sidebar-hidden { grid-template-columns:minmax(0,1fr); }
.cms-workspace.sidebar-hidden .cms-sidebar { display:none; }
.cms-sidebar { position:sticky; top:150px; max-height:calc(100vh - 175px); overflow:auto; padding:14px; }
.cms-sidebar .side-link { align-items:flex-start; }
.cms-main { min-width:0; }
@media(max-width:900px){.cms-heading,.cms-toolbar,.cms-savebar{align-items:stretch;flex-direction:column}.cms-actions{flex-wrap:wrap}.cms-toolbar{position:static}}
@media(max-width:900px){.cms-workspace{grid-template-columns:1fr}.cms-sidebar{position:static;max-height:none}}

/* Excel-like editor: flat, compact, and grid-first */
.cms-heading{margin-bottom:18px}.cms-toolbar{top:62px;padding:10px 12px;background:#fff;backdrop-filter:none}.cms-sections{gap:8px}.cms-section{border-radius:3px;scroll-margin-top:125px}.cms-section summary{padding:10px 12px}.cms-section[open]{border-color:#bfc9c3;box-shadow:var(--shadow)}.cms-section[open] summary{background:#eef3f0;border-bottom:1px solid #cfd8d3}.excel-sheet-wrap{background:#e7eaec;padding:10px}.excel-sheet{border-collapse:collapse;border-radius:0;box-shadow:none}.excel-sheet td{padding:2px 3px;line-height:1.2;border-color:#cfd5d8!important}.excel-input{min-height:28px;padding:4px 6px;border:1px solid transparent;border-radius:0;background:#fff;box-shadow:none}.excel-input:hover{border-color:#9bb3a4;background:#fbfdfc}.excel-input:focus{outline:2px solid var(--accent);outline-offset:-1px;border-color:var(--accent);box-shadow:none;background:#fff}.excel-select{min-height:28px;height:28px}.excel-field-small{min-height:28px}textarea.excel-field-medium{min-height:42px}textarea.excel-field-large{min-height:78px;line-height:1.35}.cms-workspace{grid-template-columns:235px minmax(0,1fr);gap:10px}.cms-sidebar{top:126px;max-height:calc(100vh - 142px);padding:9px;border-radius:3px}.cms-savebar{border-radius:4px;box-shadow:0 2px 8px rgba(35,45,50,.12)}

/* Keep controls at the imported Excel row height. Text scrolls until expanded. */
.excel-sheet textarea.excel-input,.excel-sheet select.excel-input{min-height:0!important;max-height:none;margin:0;box-sizing:border-box}
.excel-sheet textarea.excel-input{resize:none;overflow:auto;white-space:pre-wrap;line-height:1.25}
.excel-sheet textarea.excel-input.is-expanded{min-height:48px!important;overflow:visible;position:relative;z-index:3;box-shadow:0 2px 8px rgba(30,50,40,.16)}
.sheet-link{display:inline-flex;align-items:center;min-height:24px;color:#0563c1;text-decoration:underline;text-underline-offset:2px;font-weight:600}.sheet-link:hover{color:#003e7e}
