:root {
    --ink: #202833;
    --muted: #6f7782;
    --surface: #f4f5f6;
    --paper: #ffffff;
    --line: #dfe3e7;
    --accent: #536a7d;
    --accent-deep: #405564;
    --accent-soft: #edf1f4;
    --danger: #a8473d;
    --sidebar: #182330;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(20, 30, 42, .08);
}
* { box-sizing: border-box; }
html { background: var(--surface); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 258px; padding: 30px 22px 24px; display: flex; flex-direction: column; z-index: 20; color: #f4f6f8; background: linear-gradient(165deg, #202e3c 0%, #182430 58%, #141e28 100%); border-right: 1px solid rgba(255,255,255,.06); box-shadow: 12px 0 32px rgba(18,28,38,.1), inset -1px 0 rgba(255,255,255,.025); }
.brand { display: flex; gap: 13px; align-items: center; letter-spacing: .08em; }
.brand-mark { width: 42px; height: 42px; border-radius: 50% 50% 46% 54% / 58% 45% 55% 42%; display: inline-grid; place-items: center; flex: none; color: #fff; background: #52697b; box-shadow: 0 6px 16px rgba(7,14,22,.2), inset 0 1px rgba(255,255,255,.13); font: 600 21px/1 Georgia, serif; transform: rotate(-5deg); }
.brand strong { display: block; color: #fff; font-size: 15px; }
.brand small { display: block; margin-top: 4px; color: #9ca7b0; font-size: 11px; letter-spacing: .02em; }
.nav { display: grid; gap: 7px; margin-top: 56px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 1px solid transparent; border-radius: 9px; color: #a8b0b8; font-size: 14px; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease; }
.nav a:hover { color: #f4f6f8; background: rgba(255,255,255,.045); transform: translateX(1px); }
.nav a.is-active { color: #fff; background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.055); box-shadow: none; }
.nav a.is-active::before { content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: #91a4b4; }
.nav-icon { width: 18px; text-align: center; font-size: 19px; }
.sidebar-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.065); color: #818c95; font-size: 12px; }
.sidebar-foot a { display: block; margin-top: 16px; color: #b6bdc3; transition: color .18s ease; }
.sidebar-foot a:hover { color: #fff; }
.online-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #70d5ab; box-shadow: 0 0 0 4px rgba(112,213,171,.12); }
.workspace { min-height: 100vh; margin-left: 258px; padding: 54px clamp(28px, 5vw, 76px) 80px; }
.mobile-header { display: none; }
.page-head, .editor-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.page-head h1, .editor-head h1 { margin: 6px 0 8px; font: 500 clamp(34px, 4vw, 52px)/1.02 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }
.page-head--compact { margin-bottom: 45px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 13px; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-2px); }
.button--primary { color: white; background: var(--accent); box-shadow: 0 6px 16px rgba(52,70,84,.12); }
.button--primary:hover { background: var(--accent-deep); box-shadow: 0 8px 18px rgba(52,70,84,.16); }
.button--wide { width: 100%; }
.button--ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.button--danger-soft { color: var(--danger); background: #f6e9e7; }
.filters { display: flex; gap: 12px; align-items: center; padding: 15px 0 22px; border-top: 1px solid var(--line); }
.filters select, .search-field { height: 46px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.72); }
.filters select { padding: 0 36px 0 13px; color: var(--ink); }
.search-field { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 9px; padding: 0 14px; }
.search-field span { font-size: 22px; color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: 0; background: none; color: var(--ink); }
.clear-filter { color: var(--accent); font-size: 13px; font-weight: 700; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 34px 22px; padding-top: 10px; }
.product-card { min-width: 0; }
.product-image { position: relative; display: grid; place-items: center; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); background: #e5e9ec; color: rgba(74,89,103,.3); box-shadow: 0 8px 22px rgba(28,39,49,.055); font: 500 64px Georgia, serif; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.product-card:hover .product-image img { transform: scale(1.035); }
.status { position: absolute; top: 12px; left: 12px; padding: 6px 9px; border-radius: 20px; color: #21664f; background: rgba(237,250,245,.9); backdrop-filter: blur(7px); font: 750 10px/1 system-ui; letter-spacing: .05em; text-transform: uppercase; }
.status--draft { color: #745b27; background: rgba(255,246,219,.9); }
.status--archived { color: #656965; background: rgba(239,240,237,.9); }
.product-info { padding: 17px 3px 0; }
.product-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.product-info h2 { margin: 8px 0 7px; font: 500 22px/1.2 Georgia, serif; }
.product-info h2 a:hover { color: var(--accent); }
.product-info p { min-height: 40px; margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.text-link { color: var(--accent); font-size: 12px; font-weight: 750; }
.text-link span { display: inline-block; margin-left: 4px; transition: transform .18s ease; }
.text-link:hover span { transform: translateX(4px); }
.empty-state { min-height: 430px; display: grid; place-items: center; align-content: center; text-align: center; border-top: 1px solid var(--line); }
.empty-symbol { width: 88px; height: 88px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 50% 50% 45% 55% / 56% 45% 55% 44%; color: var(--accent); background: var(--accent-soft); font: 500 40px Georgia, serif; transform: rotate(-4deg); }
.empty-state h2 { margin: 0; font: 500 28px Georgia, serif; }
.empty-state p { max-width: 430px; margin: 10px auto 22px; color: var(--muted); line-height: 1.6; }
.back-link { display: block; margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.editor-head { align-items: center; }
.editor { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px, 350px); gap: clamp(30px,5vw,70px); align-items: start; }
.editor-main { display: grid; gap: 52px; }
.editor-aside { position: sticky; top: 30px; display: grid; gap: 18px; }
.form-section, .image-editor, .settings-form { padding-top: 24px; border-top: 1px solid var(--line); }
.section-title { display: flex; gap: 16px; margin-bottom: 25px; }
.section-title > span { width: 29px; height: 29px; display: grid; place-items: center; flex: none; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 800; }
.section-title h2 { margin: 2px 0 4px; font: 500 21px Georgia, serif; }
.section-title p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.section-title--compact { margin-bottom: 18px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.field--wide { grid-column: 1/-1; }
.field { display: grid; gap: 8px; margin-bottom: 18px; color: #4b566b; font-size: 12px; font-weight: 700; }
.field em { color: var(--danger); font-style: normal; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--ink); background: rgba(255,255,255,.82); transition: border .18s ease, box-shadow .18s ease; }
.field input, .field select { height: 46px; padding: 0 13px; }
.field textarea { padding: 13px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #8799a8; box-shadow: 0 0 0 3px rgba(83,106,125,.085); }
.field small { color: var(--muted); font-weight: 400; }
.image-drop { position: relative; display: grid; place-items: center; aspect-ratio: 4/3; overflow: hidden; border: 1px dashed #b8c0c7; border-radius: var(--radius); background: rgba(255,255,255,.58); cursor: pointer; }
.image-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.image-drop img { width: 100%; height: 100%; object-fit: cover; }
.image-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-placeholder { display: grid; gap: 7px; place-items: center; color: var(--ink); font-size: 13px; font-weight: 750; }
.upload-placeholder b { font-size: 25px; color: var(--accent); }
.upload-placeholder small { color: var(--muted); font-weight: 400; }
.editor-actions { display: grid; gap: 8px; }
.settings-form { max-width: 630px; }
.settings-form .button { margin-top: 8px; }
.data-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.38); }
.data-table { width: 100%; min-width: 980px; border-collapse: collapse; text-align: left; }
.data-table th { height: 48px; padding: 0 15px; color: #7a828c; background: rgba(242,244,246,.82); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.data-table td { height: 76px; padding: 13px 15px; border-bottom: 1px solid #e7eaed; color: #38424d; font-size: 13px; vertical-align: middle; }
.data-table tbody tr { cursor: pointer; transition: background .16s ease; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255,255,255,.8); }
.data-table td strong, .data-table td > span { display: block; }
.data-table td strong { color: var(--ink); font-size: 13px; }
.data-table td small { display: block; max-width: 210px; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cell-center { text-align: center !important; }
.element-summary { max-width: 320px; overflow: hidden; color: #46515c; text-overflow: ellipsis; white-space: nowrap; }
.table-muted { color: #989fa6; }
.count-badge { width: 30px; height: 30px; display: inline-grid !important; place-items: center; margin: auto; border-radius: 50%; color: #485c6d; background: #e8edf0; font-size: 12px; font-weight: 800; }
.store-status { display: inline-block !important; padding: 6px 9px; border-radius: 20px; color: #3f6558; background: #e8f0ec; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.store-status--planning { color: #715f3b; background: #f2eee4; }
.store-status--paused { color: #6d6262; background: #efebeb; }
.row-arrow { width: 32px; height: 32px; display: grid; place-items: center; margin-left: auto; border-radius: 8px; color: var(--muted); transition: color .16s ease, background .16s ease, transform .16s ease; }
.data-table tr:hover .row-arrow { color: var(--ink); background: #e9ecef; transform: translateX(2px); }
.store-editor { display: grid; grid-template-columns: minmax(0,1fr) minmax(340px, 420px); gap: clamp(34px,5vw,72px); align-items: start; }
.store-elements { position: sticky; top: 30px; display: grid; gap: 18px; min-width: 0; }
.element-search { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.8); }
.element-search span { color: var(--muted); font-size: 19px; }
.element-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.selection-count { margin: 10px 1px; color: var(--muted); font-size: 11px; }
.selection-count span { color: var(--ink); font-weight: 800; }
.element-picker { max-height: 450px; overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.element-option { position: relative; min-height: 68px; padding: 9px 38px 9px 3px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #e7eaed; cursor: pointer; transition: background .16s ease; }
.element-option:last-child { border-bottom: 0; }
.element-option:hover { background: rgba(255,255,255,.7); }
.element-option input { position: absolute; opacity: 0; pointer-events: none; }
.element-option img, .element-initial { width: 48px; height: 48px; border-radius: 8px; flex: none; object-fit: cover; }
.element-initial { display: grid; place-items: center; color: #63717d; background: #e5e9ec; font: 500 19px Georgia, serif; }
.element-copy { min-width: 0; display: grid; gap: 4px; }
.element-copy strong, .element-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.element-copy strong { color: var(--ink); font-size: 12px; }
.element-copy small { color: var(--muted); font-size: 10px; }
.check-mark { position: absolute; right: 8px; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #c8ced3; border-radius: 6px; color: transparent; background: #fff; font-size: 12px; font-weight: 800; transition: .16s ease; }
.element-option input:checked ~ .check-mark { color: #fff; border-color: var(--accent); background: var(--accent); }
.element-option:has(input:checked) { background: rgba(83,106,125,.055); }
.element-option.is-hidden { display: none; }
.element-empty { padding: 26px; border: 1px dashed #c7cdd2; border-radius: 10px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.6; }
.matrix-page-head { align-items: center; }
.matrix-save-state { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; transition: color .18s ease; }
.matrix-save-state span { width: 7px; height: 7px; border-radius: 50%; background: #6f9b87; }
.matrix-save-state.is-saving { color: #6d614b; }
.matrix-save-state.is-saving span { background: #b49b69; animation: pulse 1s ease infinite; }
.matrix-save-state.is-error { color: var(--danger); }
.matrix-save-state.is-error span { background: var(--danger); }
.matrix-tools { min-height: 58px; display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.matrix-search { width: min(260px, 28vw); height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.7); }
.matrix-search span { color: var(--muted); font-size: 18px; }
.matrix-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.matrix-legend { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.matrix-legend-cell { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 5px; color: #fff; background: var(--accent); font-size: 11px; font-weight: 800; }
.matrix-shell { position: relative; max-height: calc(100vh - 245px); overflow: auto; border: 1px solid #d4d9de; background: #fff; box-shadow: 0 8px 24px rgba(26,35,44,.045); }
.matrix-table { min-width: max-content; width: 100%; border-spacing: 0; table-layout: fixed; color: #35404a; font-size: 12px; }
.matrix-table th, .matrix-table td { height: 48px; min-width: 112px; padding: 0; border-right: 1px solid #e1e5e8; border-bottom: 1px solid #e1e5e8; text-align: center; }
.matrix-table thead th { position: sticky; top: 0; z-index: 5; height: 86px; background: #eef0f2; box-shadow: inset 0 -1px #d7dce0; }
.matrix-corner { left: 0; z-index: 8 !important; width: 260px; min-width: 260px !important; padding: 0 16px !important; text-align: left !important; }
.matrix-corner span, .matrix-corner small { display: block; }
.matrix-corner span { color: var(--ink); font-size: 12px; font-weight: 800; }
.matrix-corner small { margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 500; }
.matrix-product-head { width: 124px; max-width: 124px; padding: 22px 9px 8px !important; vertical-align: bottom; }
.matrix-product-head strong, .matrix-product-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrix-product-head strong { color: #38434d; font-size: 10px; }
.matrix-product-head small { margin-top: 4px; color: #818992; font-size: 9px; font-weight: 500; }
.matrix-column-letter { position: absolute; inset: 0 0 auto; height: 19px; display: grid; place-items: center; color: #808890; background: #e3e6e9; border-bottom: 1px solid #d7dce0; font-size: 9px; font-weight: 800; }
.matrix-total-head { right: 0; z-index: 7 !important; width: 56px; min-width: 56px !important; color: #5d6871; background: #e6e9eb !important; }
.matrix-store-head { position: sticky; left: 0; z-index: 4; width: 260px; min-width: 260px !important; padding: 0 12px 0 48px !important; background: #f7f8f9; text-align: left !important; }
.matrix-row-number { position: absolute; inset: 0 auto 0 0; width: 36px; display: grid; place-items: center; color: #858c93; background: #eceff1; border-right: 1px solid #dfe3e6; font-size: 9px; }
.matrix-store-head a { display: block; min-width: 0; }
.matrix-store-head strong, .matrix-store-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrix-store-head strong { color: var(--ink); font-size: 11px; }
.matrix-store-head small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.matrix-table tbody tr:hover td, .matrix-table tbody tr:hover .matrix-store-head { background-color: #fafbfb; }
.matrix-table tbody td { background: #fff; }
.matrix-cell { width: 100%; height: 47px; display: grid; place-items: center; border: 0; cursor: pointer; color: transparent; background: transparent; transition: background .14s ease, color .14s ease; }
.matrix-cell:hover { background: #eef1f3; }
.matrix-cell:focus-visible { position: relative; z-index: 2; outline: 2px solid #7c8f9e; outline-offset: -2px; }
.matrix-cell.is-selected { color: #fff; background: var(--accent); }
.matrix-cell.is-selected:hover { background: var(--accent-deep); }
.matrix-cell span { font-size: 13px; font-weight: 850; }
.matrix-cell.is-pending { opacity: .55; cursor: wait; }
.matrix-row-total { position: sticky; right: 0; z-index: 3; width: 56px; min-width: 56px !important; color: #4f5c67; background: #f0f2f3 !important; font-weight: 800; }
.matrix-table tfoot th, .matrix-table tfoot td { position: sticky; bottom: 0; z-index: 5; height: 36px; color: #68727b; background: #e9ecee; border-bottom: 0; font-size: 10px; font-weight: 800; }
.matrix-footer-label { left: 0; z-index: 7 !important; width: 260px; min-width: 260px !important; padding-left: 48px !important; text-align: left !important; }
.matrix-table tfoot td:last-child { right: 0; z-index: 7; }
.empty-actions { display: flex; gap: 8px; justify-content: center; }
.sheet-page-head { align-items: center; }
.sheet-page-head--actions { justify-content: flex-end; margin-bottom: 8px; }
.sheet-head-primary, .sheet-head-actions { display: flex; align-items: center; gap: 6px; }
.sheet-head-actions { margin-left: auto; }
.sheet-head-primary[hidden] { display: none; }
.sheet-topbar { position: sticky; top: 0; z-index: 14; min-height: 44px; margin: -42px 0 8px; padding: 4px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(244,245,246,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.sheet-topbar .button { min-height: 34px; padding: 0 12px; border-radius: 8px; font-size: 11px; }
.sheet-topbar [data-edit-table] { margin-left: 8px; }
.sheet-topbar .button.is-active { color: #fff; border-color: var(--accent); background: var(--accent); }
.sheet-topbar .sheet-save-state { margin-right: 2px; font-size: 9px; }
.sheet-compact-search { position: relative; width: 34px; height: 34px; overflow: hidden; flex: none; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.78); transition: width .2s ease, border-color .2s ease, box-shadow .2s ease; }
.sheet-compact-search.is-open { width: min(360px, 32vw); border-color: #9aa9b4; box-shadow: 0 0 0 2px rgba(83,106,125,.06); }
.sheet-compact-search button { position: absolute; left: 0; top: 0; z-index: 2; width: 32px; height: 32px; padding: 0; border: 0; color: #596b79; background: transparent; cursor: pointer; font-size: 18px; }
.sheet-compact-search.has-value button { color: #fff; background: var(--accent); }
.sheet-compact-search input { width: 100%; height: 32px; padding: 0 10px 0 34px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.sheet-compact-search.is-open input { opacity: 1; pointer-events: auto; }
.sheet-save-state { display: flex; align-items: center; gap: 7px; margin-right: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.sheet-save-state[hidden] { display: none; }
.sheet-save-state span { width: 7px; height: 7px; border-radius: 50%; background: #6f9b87; }
.sheet-save-state.is-saving span { background: #b49b69; animation: pulse 1s ease infinite; }
.sheet-save-state.is-error { color: var(--danger); }
.sheet-save-state.is-error span { background: var(--danger); }
.sheet-toolbar { min-height: 54px; display: flex; align-items: center; gap: 20px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.sheet-search { width: min(520px, 58vw); height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.74); }
.sheet-search span { font-size: 18px; }
.sheet-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.sheet-wrap { max-height: calc(100vh - 132px); overflow: auto; border: 1px solid #d5dade; background: #fff; box-shadow: 0 8px 24px rgba(26,35,44,.04); }
.sheet-table { width: 100%; min-width: 1320px; border-spacing: 0; table-layout: fixed; color: #39434c; font-size: 12px; }
.sheet-table .col-number { width: 48px; }
.sheet-table .col-product { width: 195px; }
.sheet-table .col-image { width: 108px; }
.sheet-table .col-address { width: 310px; }
.sheet-table .col-count { width: 105px; }
.sheet-table .col-description { width: 280px; }
.sheet-table .col-notes { width: 270px; }
.sheet-table th { position: sticky; top: 0; z-index: 8; height: 43px; padding: 0 12px; color: #606a73; background: #e9ecee; border-right: 1px solid #d5dade; border-bottom: 1px solid #cfd5d9; text-align: left; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.sheet-table th:first-child { left: 0; z-index: 9; text-align: center; }
.sheet-table td { min-height: 82px; padding: 10px 12px; background: #fff; border-right: 1px solid #e2e6e9; border-bottom: 1px solid #e2e6e9; vertical-align: middle; }
.sheet-table tbody tr:last-child td { border-bottom: 0; }
.sheet-table tbody tr:hover td { background: #fafbfb; }
.sheet-table tbody tr.is-hidden { display: none; }
.sheet-table .sheet-empty-row td { height: 108px; padding: 0 18px; color: #8a939a; background: #fafbfb; text-align: center; font-size: 11px; }
.sheet-table .sheet-empty-row:hover td { background: #fafbfb; }
.sheet-number { position: sticky; left: 0; z-index: 3; padding: 0 !important; color: #7b848c; background: #f0f2f3 !important; text-align: center; font-size: 10px; font-weight: 800; }
.sheet-product a { display: block; }
.sheet-product strong, .sheet-product small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-product strong { color: var(--ink); font-size: 12px; }
.sheet-product small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.sheet-inline-title { width: 100%; height: 31px; padding: 0; border: 1px solid transparent; border-radius: 5px; outline: 0; color: var(--ink); background: transparent; font-size: 12px; font-weight: 750; text-overflow: ellipsis; }
.sheet-product-open { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sheet-image-cell { text-align: center; }
.sheet-image { position: relative; width: 74px; height: 58px; display: inline-grid; place-items: center; overflow: hidden; border-radius: 7px; color: #687681; background: #e6eaed; font: 500 21px Georgia, serif; }
.sheet-image img { width: 100%; height: 100%; object-fit: cover; }
.sheet-image-edit { position: absolute; inset: auto 4px 4px; display: none; padding: 4px; border-radius: 4px; color: #fff; background: rgba(24,35,48,.82); font: 700 8px/1 system-ui; }
.sheet-image-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sheet-address-cell { position: relative; }
.sheet-store-list { display: grid; gap: 7px; }
.sheet-store-line { display: grid; gap: 2px; padding-left: 9px; border-left: 2px solid #a7b4be; }
.sheet-store-line strong { overflow: hidden; color: #3a4650; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sheet-store-line small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sheet-no-store { color: #969da3; font-size: 10px; }
.sheet-store-picker { position: relative; margin-top: 8px; }
.sheet-store-picker[open] { z-index: 20; }
.sheet-store-picker summary { width: max-content; list-style: none; color: var(--accent); cursor: pointer; font-size: 10px; font-weight: 750; }
.sheet-store-picker summary::-webkit-details-marker { display: none; }
.sheet-store-menu { position: absolute; left: 0; top: calc(100% + 7px); width: 300px; max-height: 300px; overflow-y: auto; padding: 6px; border: 1px solid #ccd2d7; border-radius: 9px; background: #fff; box-shadow: 0 16px 36px rgba(23,32,41,.16); }
.sheet-store-menu label { position: relative; min-height: 50px; padding: 8px 34px 8px 9px; display: flex; align-items: center; cursor: pointer; border-radius: 6px; }
.sheet-store-menu label:hover { background: #f2f4f5; }
.sheet-store-menu input { position: absolute; opacity: 0; }
.sheet-store-menu label > span:last-child { min-width: 0; display: grid; gap: 3px; }
.sheet-store-menu strong, .sheet-store-menu small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-store-menu strong { color: var(--ink); font-size: 10px; }
.sheet-store-menu small { color: var(--muted); font-size: 9px; }
.sheet-check { position: absolute; right: 8px; width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #c6cdd2; border-radius: 5px; color: transparent; background: #fff; font-size: 10px; font-weight: 800; }
.sheet-store-menu input:checked + .sheet-check { color: #fff; border-color: var(--accent); background: var(--accent); }
.sheet-store-menu > a { display: block; margin-top: 4px; padding: 10px 9px; border-top: 1px solid var(--line); color: var(--accent); font-size: 10px; font-weight: 750; }
.sheet-add-store { display: inline-block; margin-top: 6px; color: var(--accent); font-size: 10px; font-weight: 750; }
.sheet-count { text-align: center; }
.sheet-count span { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 50%; color: #475b6a; background: #e9edef; font-size: 11px; font-weight: 800; }
.sheet-text { display: -webkit-box; overflow: hidden; color: #4e5962; font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.sheet-text--notes { color: #6c625b; }
.quantity-table .col-store-quantity { width: 150px; }
.quantity-table .col-total { width: 118px; }
.quantity-table .col-size { width: 150px; }
.quantity-table .col-layout { width: 180px; }
.quantity-table .col-work { width: 220px; }
.sheet-table [data-layout-column][hidden] { display: none; }
.sheet-table [data-work-column][hidden] { display: none; }
.quantity-table.is-layout-view .col-store-quantity,
.quantity-table.is-layout-view .store-address-head,
.quantity-table.is-layout-view .quantity-cell,
.quantity-table.is-layout-view .col-total,
.quantity-table.is-layout-view .quantity-total-head,
.quantity-table.is-layout-view .quantity-row-total { display: none; }
.quantity-table.is-work-view .col-store-quantity,
.quantity-table.is-work-view .store-address-head,
.quantity-table.is-work-view .quantity-cell,
.quantity-table.is-work-view .col-total,
.quantity-table.is-work-view .quantity-total-head,
.quantity-table.is-work-view .quantity-row-total { display: none; }
.store-address-head { padding: 7px 10px !important; vertical-align: middle; text-transform: none !important; }
.store-address-head strong, .store-address-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-address-head strong { color: #39444d; font-size: 10px; letter-spacing: 0; }
.store-address-head small { margin-top: 4px; color: #7b848c; font-size: 9px; font-weight: 500; letter-spacing: 0; }
.store-installation-date { display: block; margin-top: 3px; overflow: hidden; color: #647783; font-size: 8px; font-weight: 700; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.quantity-total-head { text-align: center !important; }
.quantity-cell { padding: 0 !important; background: #fbfcfc !important; text-align: center; }
.quantity-cell input { width: 100%; height: 64px; padding: 0 10px; border: 0; outline: 0; color: #34414b; background: transparent; text-align: center; font-size: 13px; font-weight: 700; transition: background .14s ease, box-shadow .14s ease; appearance: textfield; }
.quantity-cell input::-webkit-inner-spin-button, .quantity-cell input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.quantity-cell input:hover { background: #f0f3f4; }
.quantity-cell input:focus { position: relative; z-index: 2; background: #fff; box-shadow: inset 0 0 0 2px #8294a2; }
.quantity-cell input.is-saving { color: #7a6c4f; background: #f5f2eb; }
.quantity-cell input.is-error { color: var(--danger); background: #f8ecea; }
.quantity-cell input.is-available { color: #356653; background: #e8f0ec; font-size: 18px; font-weight: 850; }
.quantity-cell input[readonly] { cursor: default; }
.quantity-cell input[readonly]:hover { background: transparent; }
.quantity-cell input.is-available[readonly], .quantity-cell input.is-available[readonly]:hover { background: #e8f0ec; }
.sheet-inline-textarea { width: 100%; min-height: 64px; padding: 5px 0; overflow: hidden; resize: none; border: 1px solid transparent; border-radius: 6px; outline: 0; color: #4e5962; background: transparent; font-size: 10px; line-height: 1.45; }
.sheet-inline-textarea--notes { color: #6c625b; }
.sheet-inline-size { width: 100%; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 5px; outline: 0; color: #4e5962; background: transparent; font-size: 10px; }
.sheet-inline-title.is-saving, .sheet-inline-size.is-saving, .sheet-inline-textarea.is-saving { color: #7a6c4f; background: #f5f2eb; }
.sheet-inline-title.is-error, .sheet-inline-size.is-error, .sheet-inline-textarea.is-error { color: var(--danger); background: #f8ecea; }
.sheet-wrap.is-editing .sheet-inline-title, .sheet-wrap.is-editing .sheet-inline-size, .sheet-wrap.is-editing .sheet-inline-textarea { cursor: text; }
.sheet-wrap.is-editing .sheet-inline-title:hover:not(:focus), .sheet-wrap.is-editing .sheet-inline-size:hover:not(:focus), .sheet-wrap.is-editing .sheet-inline-textarea:hover:not(:focus) { background: #f3f5f6; }
.sheet-wrap.is-editing .sheet-inline-title:focus, .sheet-wrap.is-editing .sheet-inline-size:focus, .sheet-wrap.is-editing .sheet-inline-textarea:focus { padding-left: 6px; padding-right: 6px; border-color: #8294a2; background: #fff; box-shadow: 0 0 0 2px rgba(83,106,125,.08); }
.sheet-wrap.is-editing .sheet-inline-textarea:focus { resize: vertical; }
.sheet-wrap.is-editing .quantity-cell input { cursor: text; }
.sheet-wrap.is-editing .quantity-cell input:hover { background: #f0f3f4; }
.sheet-wrap.is-editing .sheet-image { cursor: pointer; }
.sheet-wrap.is-editing .sheet-image:hover .sheet-image-edit { display: block; }
.quantity-row-total { background: #edf0f2 !important; text-align: center; }
.quantity-row-total span { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; color: #3f5260; background: #dfe5e8; font-size: 12px; font-weight: 850; }
.workbook-tabs { position: fixed; left: 258px; right: 0; bottom: 0; z-index: 18; height: 40px; display: flex; align-items: stretch; padding: 0 clamp(28px,5vw,76px); color: #4f5b65; background: rgba(238,241,243,.97); border-top: 1px solid #cfd5da; box-shadow: 0 -5px 18px rgba(25,35,44,.045); backdrop-filter: blur(12px); }
.workbook-tab-list { min-width: 0; flex: 1; display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: thin; }
.workbook-tab { position: relative; min-width: 112px; max-width: 210px; display: flex; align-items: stretch; border-right: 1px solid #d5dade; color: #66717a; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: grab; }
.workbook-tab:first-child { border-left: 1px solid #d5dade; }
.workbook-tab-link { min-width: 0; flex: 1; padding: 0 9px 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.workbook-tab span { overflow: hidden; text-overflow: ellipsis; }
.workbook-tab small { color: #8a939a; font-size: 9px; font-weight: 700; }
.workbook-tab:hover { color: #33414c; background: rgba(255,255,255,.5); }
.workbook-tab.is-active { color: #263641; background: #fff; }
.workbook-tab.is-active::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--accent); }
.workbook-tab.is-active small { color: #5b7081; }
.workbook-tab.is-dragging { opacity: .46; cursor: grabbing; }
.workbook-tab-rename { width: 145px; height: 30px; margin: 5px 4px; padding: 0 8px; border: 1px solid #7d909e; border-radius: 4px; outline: 0; background: #fff; font-size: 11px; }
.workbook-tab-rename[hidden] { display: none; }
.workbook-tab-rename.is-error { border-color: var(--danger); }
.workbook-context-menu { position: absolute; bottom: 44px; z-index: 30; width: 164px; padding: 5px; display: grid; gap: 2px; border: 1px solid #cfd5da; border-radius: 7px; background: #fff; box-shadow: 0 12px 28px rgba(22,31,40,.16); }
.workbook-context-menu[hidden] { display: none; }
.workbook-context-menu button { height: 31px; padding: 0 10px; border: 0; border-radius: 4px; color: #35434e; background: transparent; cursor: pointer; text-align: left; font-size: 10px; font-weight: 700; }
.workbook-context-menu button:hover { background: #edf1f3; }
.workbook-context-menu button.is-danger { color: #913f38; }
.workbook-context-menu button.is-danger:hover { background: #f5e9e7; }
.workbook-add { width: 42px; flex: none; margin-left: auto; border: 0; border-right: 1px solid #d5dade; border-left: 1px solid #d5dade; color: #526573; background: transparent; cursor: pointer; font-size: 20px; line-height: 1; }
.workbook-add:hover { color: #283945; background: rgba(255,255,255,.62); }
.workbook-layout-toggle { min-width: 68px; flex: none; padding: 0 10px; border: 0; border-right: 1px solid #d5dade; color: #5d6d78; background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.workbook-layout-toggle:hover { color: #2f414d; background: rgba(255,255,255,.62); }
.workbook-layout-toggle.is-active { color: #fff; background: var(--accent); }
.workbook-new-form { height: 100%; flex: none; margin-left: auto; display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-left: 1px solid #d5dade; }
.workbook-new-form[hidden] { display: none; }
.workbook-new-form input { width: 150px; height: 30px; padding: 0 9px; border: 1px solid #bfc8cf; border-radius: 5px; outline: 0; color: var(--ink); background: #fff; font-size: 11px; }
.workbook-new-form input:focus { border-color: #788d9d; box-shadow: 0 0 0 2px rgba(83,106,125,.08); }
.workbook-new-form.is-error input { border-color: var(--danger); }
.workbook-new-form button { height: 30px; padding: 0 9px; border: 0; border-radius: 5px; color: #fff; background: var(--accent); cursor: pointer; font-size: 10px; font-weight: 750; }
.workbook-new-form [data-cancel-sheet] { padding: 0 7px; color: #59656e; background: transparent; font-size: 17px; }
.flash, .form-error { margin-bottom: 24px; padding: 13px 16px; border-radius: 10px; font-size: 13px; }
.flash--success { color: #245d4b; background: #e3f4ed; }
.form-error { color: #843b34; background: #f7e6e3; }
.login-page { background: #182330; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-visual { position: relative; overflow: hidden; min-height: 100vh; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; color: #f4f6f8; background: radial-gradient(circle at 68% 32%, #405567 0, #273847 34%, #182330 74%); }
.login-brand { display: flex; align-items: center; gap: 12px; z-index: 2; font-size: 14px; font-weight: 800; letter-spacing: .12em; }
.login-visual p { position: relative; z-index: 2; max-width: 500px; margin: 0; font: 400 clamp(28px,4vw,52px)/1.06 Georgia, serif; letter-spacing: -.025em; }
.leaf { position: absolute; border-radius: 100% 0 100% 0; background: rgba(214,222,229,.075); transform-origin: bottom left; animation: breathe 8s ease-in-out infinite; }
.leaf-one { width: 410px; height: 270px; right: -80px; top: 21%; transform: rotate(-22deg); }
.leaf-two { width: 360px; height: 220px; right: 24%; top: 38%; transform: rotate(22deg); animation-delay: -2.5s; }
.leaf-three { width: 260px; height: 180px; right: -20px; bottom: 5%; transform: rotate(-50deg); animation-delay: -5s; }
.login-panel { display: grid; place-items: center; padding: 40px; background: var(--paper); }
.login-form { width: min(380px, 100%); }
.login-form h1 { margin: 10px 0 10px; font: 500 clamp(34px,4vw,48px)/1.05 Georgia, serif; letter-spacing: -.03em; }
.login-form > p { margin: 0 0 34px; color: var(--muted); line-height: 1.55; }
.login-form label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.password-field { position: relative; margin-bottom: 14px; }
.password-field input { width: 100%; height: 50px; padding: 0 90px 0 14px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fff; }
.password-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(83,106,125,.085); }
.password-field button { position: absolute; right: 8px; top: 8px; height: 34px; border: 0; color: var(--accent); background: transparent; cursor: pointer; font-size: 12px; font-weight: 750; }
@keyframes breathe { 0%,100% { opacity: .75; scale: 1; } 50% { opacity: 1; scale: 1.06; } }
@keyframes pulse { 50% { opacity: .42; } }
@media (max-width: 1050px) { .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 800px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); }
    .sidebar.is-open { transform: translateX(0); }
    .workspace { margin-left: 0; padding: 82px 20px 60px; }
    .mobile-header { position: fixed; inset: 0 0 auto; z-index: 15; height: 60px; padding: 0 20px; display: flex; align-items: center; gap: 15px; background: rgba(244,245,246,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); letter-spacing: .1em; font-size: 13px; }
    .icon-button { border: 0; padding: 6px; background: transparent; color: var(--ink); font-size: 22px; }
    .editor, .store-editor { grid-template-columns: 1fr; }
    .editor-aside { position: static; grid-row: 1; }
    .store-elements { position: static; }
    .login-layout { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel { min-height: 100vh; padding: 28px; }
    .sheet-page-head { align-items: stretch; }
    .sheet-head-actions { flex-wrap: wrap; }
    .sheet-save-state { width: 100%; }
    .sheet-topbar { top: 60px; margin-top: -10px; align-items: stretch; flex-wrap: wrap; gap: 6px; }
    .sheet-topbar .sheet-head-primary { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .sheet-topbar .sheet-head-actions { width: 100%; flex-wrap: nowrap; }
    .sheet-topbar .sheet-head-actions .button { flex: 1; }
    .sheet-topbar .sheet-save-state { width: auto; }
    .sheet-compact-search.is-open { width: min(280px, 58vw); }
    .workbook-tabs { left: 0; padding: 0 20px; }
}
@media (max-width: 600px) {
    .page-head, .editor-head { align-items: stretch; flex-direction: column; }
    .page-head .button { width: 100%; }
    .filters { display: grid; grid-template-columns: 1fr 1fr; }
    .search-field { grid-column: 1/-1; min-width: 0; }
    .filters select { width: 100%; }
    .product-grid { grid-template-columns: 1fr; }
    .field-grid { grid-template-columns: 1fr; }
    .field--wide { grid-column: auto; }
    .page-head h1, .editor-head h1 { font-size: 37px; }
    .matrix-page-head { gap: 12px; }
    .matrix-tools { display: grid; grid-template-columns: 1fr 1fr; }
    .matrix-search { width: 100%; }
    .matrix-legend { grid-column: 1/-1; margin-left: 0; }
    .matrix-shell { max-height: calc(100vh - 315px); }
    .sheet-head-actions .button { flex: 1; width: auto; }
    .sheet-toolbar { align-items: stretch; flex-direction: column; gap: 5px; }
    .sheet-search { width: 100%; }
    .sheet-wrap { max-height: calc(100vh - 285px); }
    .workbook-tabs { padding: 0 10px; }
    .workbook-tab { min-width: 104px; padding: 0 10px; }
    .workbook-new-form input { width: 125px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
