:root {
  --navy: #0f172a;
  --ink: #101828;
  --muted: #667085;
  --line: #e3e8f1;
  --canvas: #f6f8ff;
  --field: #eef3ff;
  --blue: #38bdf8;
  --blue-dark: #036b99;
  --green: #0c8a5b;
  --red: #c21d2c;
  --sidebar: 280px;
  --topbar: 64px;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; font-family: "IBM Plex Sans Arabic", sans-serif; color: var(--ink); background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
.material-symbols-outlined { font-size: 22px; line-height: 1; vertical-align: middle; }

/* Admin shell */
.app-sidebar { position: fixed; inset: 0 0 0 auto; width: var(--sidebar); height: 100vh; z-index: 1040; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.sidebar-brand { height: var(--topbar); padding: 0 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; font-size: 23px; }
.brand-icon, .catalog-logo { width: 42px; height: 42px; border-radius: 10px; display: inline-grid; place-items: center; background: #050505; color: #fff; }
.sidebar-nav { flex: 1; overflow: auto; padding: 22px 16px; }
.sidebar-nav > a, .nav-branch a { min-height: 48px; padding: 11px 14px; border-radius: 9px; display: flex; align-items: center; gap: 12px; color: #3b4455; font-weight: 500; margin-bottom: 4px; }
.sidebar-nav a:hover { background: #f1f5fb; }
.sidebar-nav a.active { background: var(--blue); color: #052337; font-weight: 600; }
.nav-caption { display: block; margin: 18px 14px 8px; color: #9099aa; font-size: 12px; }
.nav-branch { margin: 0 20px 14px 0; padding-right: 12px; border-right: 2px solid #e9edf4; }
.nav-branch a { min-height: 42px; font-size: 14px; }
.sidebar-foot { margin: 16px; padding: 13px; border-radius: 10px; background: #f3f7ff; display: flex; align-items: center; gap: 10px; }
.sidebar-foot div { flex: 1; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 13px; }
.sidebar-foot small { color: var(--muted); font-size: 11px; }
.sidebar-foot i { width: 9px; height: 9px; border-radius: 50%; background: #2bd790; }
.app-shell { margin-right: var(--sidebar); min-height: 100vh; }
.topbar { position: fixed; inset: 0 var(--sidebar) auto 0; height: var(--topbar); z-index: 1030; padding: 0 24px; background: rgba(255,255,255,.93); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.top-search { flex: 0 1 620px; position: relative; margin: auto; }
.top-search span { position: absolute; right: 15px; top: 11px; color: #263344; }
.top-search input { width: 100%; height: 42px; padding: 0 48px 0 18px; border: 0; outline: 0; border-radius: 14px; background: #e4edff; }
.top-account { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.icon-button { width: 40px; height: 40px; border: 0; background: transparent; border-radius: 9px; position: relative; display: grid; place-items: center; }
.icon-button:hover { background: #edf2f9; }
.icon-button i { position: absolute; top: 8px; left: 8px; width: 6px; height: 6px; background: #e51d35; border-radius: 50%; }
.top-divider { width: 1px; height: 34px; background: var(--line); }
.account-copy strong, .account-copy small { display: block; }
.account-copy strong { font-size: 13px; }
.account-copy small { color: var(--muted); font-size: 10px; }
.account-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #050505; }
.menu-toggle { display: none; }
.app-content { padding: calc(var(--topbar) + 30px) 30px 40px; min-height: 100vh; }
.sidebar-backdrop { display: none; }

/* Shared components */
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.compact-heading h1 { margin: 4px 0 3px; font-size: clamp(27px, 3vw, 38px); line-height: 1.25; font-weight: 700; }
.compact-heading p { margin: 0; color: var(--muted); }
.breadcrumb-line { color: #0875a9; font-size: 12px; font-weight: 600; }
.heading-actions { display: flex; align-items: center; gap: 12px; }
.btn { border-radius: 8px; font-weight: 600; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn-primary-action { padding-inline: 18px; color: #fff; background: #067aa9; border-color: #067aa9; }
.btn-primary-action:hover { background: #05658d; color: #fff; }
.btn-black { color: #fff; background: #050505; border: 1px solid #050505; padding-inline: 18px; box-shadow: 0 5px 14px rgba(0,0,0,.12); }
.btn-black:hover { color: #fff; background: #232323; }
.btn-text { background: transparent; border: 0; color: #5a6372; }
.btn-soft { background: #edf2f9; color: var(--ink); border: 1px solid #e4e8ef; }
.surface-card, .panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.03); }
.panel { padding: 24px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.card-heading h2 { font-size: 19px; margin: 0 0 3px; font-weight: 700; }
.card-heading p { color: var(--muted); font-size: 13px; margin: 0; }
.card-heading > a { color: #0875a9; font-size: 13px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; margin-bottom: 28px; }
.metric-card { min-height: 122px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: center; gap: 16px; }
.metric-icon { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; }
.metric-icon.blue { background: #dff4fe; color: #0373a4; }
.metric-icon.green { background: #dff8ee; color: #078258; }
.metric-icon.violet { background: #e8e9ff; color: #5155aa; }
.metric-icon.orange { background: #fff0df; color: #b65f00; }
.metric-card small, .metric-card strong { display: block; }
.metric-card small { color: var(--muted); font-size: 13px; }
.metric-card strong { margin-top: 4px; font-size: 28px; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(260px,.75fr); gap: 22px; }
.recent-products { padding: 22px; }
.quick-panel { padding: 22px; }
.quick-panel h2 { margin: 0 0 15px; font-size: 19px; }
.quick-panel a { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.quick-panel a > span { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--field); color: #126e97; }
.quick-panel strong, .quick-panel small { display: block; }
.quick-panel small { color: var(--muted); font-size: 11px; }
.enterprise-table { width: 100%; border-collapse: collapse; }
.enterprise-table th { padding: 13px 15px; color: #737d90; background: #eef3ff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.enterprise-table td { padding: 14px 15px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
.enterprise-table td > strong, .enterprise-table td > small { display: block; }
.enterprise-table td > small { color: var(--muted); }
.enterprise-table tr:hover td { background: #fafcff; }
.code-pill { display: inline-flex; padding: 5px 8px; border-radius: 6px; direction: ltr; background: #edf2ff; color: #2d3a54; font: 500 12px ui-monospace, monospace; }
.price-value { color: var(--green); font-variant-numeric: tabular-nums; }
.brand-badge { display: inline-flex; padding: 5px 13px; border-radius: 999px; background: #dae7ff; font-weight: 600; font-size: 12px; direction: ltr; }
.empty-state { min-height: 220px; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); text-align: center; }
.empty-state > .material-symbols-outlined { font-size: 42px; }
.empty-state strong { color: var(--ink); font-size: 17px; }

/* Products */
.product-metrics { margin-bottom: 36px; }
.products-layout { display: grid; grid-template-columns: 330px minmax(0,1fr); gap: 28px; align-items: start; }
.filter-panel { padding: 24px; position: sticky; top: 88px; }
.filter-title { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.filter-title h2 { font-size: 20px; margin: 0; }
.filter-title a { color: #0875a9; font-size: 13px; }
.filter-checks { display: grid; gap: 10px; max-height: 210px; overflow: auto; }
.filter-checks label { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.filter-checks input { width: 17px; height: 17px; accent-color: #0875a9; }
.products-table-card { overflow: hidden; }
.table-toolbar { min-height: 80px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.table-search { flex: 0 1 520px; position: relative; }
.table-search span { position: absolute; right: 14px; top: 11px; }
.table-search input { width: 100%; height: 43px; padding: 0 45px 0 15px; border: 0; border-radius: 10px; outline: 0; background: var(--field); }
.view-tabs { display: flex; padding: 4px; border-radius: 10px; background: var(--field); }
.view-tabs a { padding: 8px 20px; border-radius: 8px; }
.view-tabs a.active { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.product-cell { min-width: 270px; display: flex; align-items: center; gap: 12px; }
.product-cell img, .image-placeholder { width: 58px; height: 58px; border-radius: 8px; border: 1px solid var(--line); object-fit: contain; background: #f2f5f9; }
.image-placeholder { display: grid; place-items: center; color: #98a1b0; }
.product-cell strong, .product-cell small { display: block; }
.product-cell small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.row-actions { display: flex; gap: 6px; }
.row-actions a, .row-actions button, .icon-delete { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 7px; background: #edf2fa; color: #344054; }
.row-actions button:hover, .icon-delete:hover { color: var(--red); }
.table-pagination { min-height: 64px; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; background: #fbfcff; }
.table-pagination nav { direction: ltr; display: flex; gap: 5px; }
.table-pagination nav a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; }
.table-pagination nav a.active { background: #050505; color: #fff; border-color: #050505; }

/* Forms */
.product-editor-layout { display: grid; grid-template-columns: minmax(0,1fr) 305px; gap: 20px; align-items: start; }
.product-form-side { position: sticky; top: 88px; }
.section-title { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.section-title > span { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: #0479a8; background: #e1f4fc; font-weight: 700; }
.section-title h2 { margin: 0 0 3px; font-size: 22px; }
.section-title p { margin: 0; color: var(--muted); font-size: 13px; }
.form-label { color: #344054; font-size: 13px; font-weight: 600; }
.form-control, .form-select, .input-group-text { min-height: 48px; border: 1px solid transparent; border-radius: 8px; background-color: var(--field); }
.form-control:focus, .form-select:focus { border-color: #59b8df; background-color: #fff; box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
.system-code-card { min-height: 235px; padding: 28px 20px; border-radius: 14px; color: #fff; background: linear-gradient(145deg,#171717,#000); display: flex; flex-direction: column; justify-content: center; text-align: center; margin-bottom: 20px; }
.system-code-card small { color: #d0d0d0; }
.system-code-card strong { margin: 20px 0; direction: ltr; font: 400 28px ui-monospace, monospace; letter-spacing: .08em; word-break: break-all; }
.system-code-card p { margin: 0; padding: 10px; border-radius: 7px; background: #222; font-size: 11px; color: #eee; }
.system-code-card p span { font-size: 16px; margin-left: 5px; }
.upload-zone { min-height: 190px; border: 2px dashed #b8c0ce; border-radius: 11px; display: grid; place-content: center; text-align: center; padding: 20px; cursor: pointer; background: #fbfcff; }
.upload-zone strong, .upload-zone span { display: block; }
.upload-zone span { margin-top: 6px; color: var(--muted); font-size: 11px; }
.upload-zone input { display: none; }
.image-preview-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.image-preview-grid > img, .saved-image img { width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #f2f5fb; }
.saved-image { position: relative; }
.saved-image button { position: absolute; bottom: 4px; left: 4px; }
.form-tip { display: flex; gap: 10px; padding: 16px; border-radius: 10px; color: #42526a; background: #eaf2ff; margin-bottom: 18px; }
.form-tip strong { font-size: 13px; }
.form-tip p { font-size: 11px; margin: 3px 0 0; }

/* Catalog builder */
.catalog-builder-layout { display: grid; grid-template-columns: 365px minmax(0,1fr); gap: 24px; align-items: start; }
.catalog-settings { padding: 24px; }
.catalog-settings hr { margin: 24px 0; border-color: var(--line); opacity: 1; }
.catalog-settings h3 { font-size: 17px; margin: 0 0 16px; }
.multi-select { min-height: 120px; }
.catalog-preview-area { min-width: 0; }
.preview-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.document-preview { min-height: 440px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.preview-bar { height: 50px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; background: #dce9ff; }
.excel-preview .preview-bar { color: #08713b; }
.paper-sheet { width: 78%; min-height: 325px; margin: 24px auto; padding: 25px 20px; border: 1px solid #e0e4eb; background: #fff; box-shadow: 0 4px 18px rgba(16,24,40,.08); text-align: center; }
.paper-sheet h3 { margin: 0; font-size: 17px; }
.paper-sheet small { color: var(--muted); }
.paper-sheet p { color: var(--muted); font-size: 10px; }
.mini-table, .excel-sheet { margin-top: 22px; border: 1px solid #d7dce5; }
.mini-table b, .mini-table i, .excel-sheet b, .excel-sheet i { display: block; height: 35px; border-bottom: 1px solid #d7dce5; background: repeating-linear-gradient(90deg,transparent 0,transparent 19%,#d7dce5 20%); }
.mini-table b, .excel-sheet b { height: 26px; background-color: #17233c; }
.excel-sheet { margin: 28px 16px; }
.excel-sheet b { background-color: #19784c; }
.layout-choice { margin-top: 18px; padding: 16px 20px; display: flex; align-items: center; gap: 15px; }
.layout-choice > div { flex: 1; }
.layout-choice strong, .layout-choice small { display: block; }
.layout-choice small { color: var(--muted); font-size: 11px; }
.layout-choice label { cursor: pointer; }
.layout-choice input { position: absolute; opacity: 0; }
.layout-choice label span { display: block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.layout-choice input:checked + span { border-color: #0875a9; background: #e8f5ff; color: #066990; }
.export-actions-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 18px; }
.export-action { padding: 18px; border-radius: 12px; display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; border: 1px solid; }
.export-action > .material-symbols-outlined { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; }
.export-action strong, .export-action small { display: block; }
.export-action small { font-size: 11px; color: var(--muted); }
.export-action .btn { grid-column: 1 / -1; width: 100%; }
.export-action.pdf { border-color: #f0cdd1; background: #fff7f8; }
.export-action.pdf > span { color: #bb1727; background: #fee3e6; }
.export-action.pdf .btn { color: #fff; background: #bd1727; }
.export-action.excel { border-color: #bfe5ce; background: #f3fff7; }
.export-action.excel > span { color: #08713b; background: #d9f5e4; }
.export-action.excel .btn { color: #fff; background: #147a45; }
.export-action.web { border-color: #bddff2; background: #f2fbff; }
.export-action.web > span { color: #056f9e; background: #dff3fc; }
.export-action.web .btn { color: #fff; background: #0875a9; }
.web-catalog-options, .share-list { margin-top: 24px; padding: 24px; }
.share-success { margin-bottom: 22px; padding: 16px 20px; border: 1px solid #a9dfc7; border-radius: 12px; background: #effbf5; display: flex; align-items: center; gap: 13px; }
.share-success > span { color: var(--green); font-size: 30px; }
.share-success > div:nth-child(2) { flex: 1; }
.share-success strong, .share-success p { display: block; margin: 0; }
.share-success p { color: var(--muted); font-size: 12px; }
.share-link-box { display: flex; direction: ltr; }
.share-link-box input { width: 310px; height: 40px; border: 1px solid #bad7c9; padding: 0 10px; }
.share-link-box button, .share-link-box a { border: 0; padding: 0 12px; display: flex; align-items: center; gap: 4px; background: #0875a9; color: #fff; }
.share-link-box a { background: #050505; }
.status-badge { display: inline-flex; padding: 4px 9px; border-radius: 999px; font-size: 11px; }
.status-badge.protected { color: #8b5a00; background: #fff0ca; }
.status-badge.public { color: #08754e; background: #dff7ed; }
.share-list td a { color: #0875a9; }

/* Settings compatibility */
.settings-list { max-height: 320px; overflow: auto; margin-top: 16px; border-top: 1px solid var(--line); }
.settings-list > div { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.settings-list small { display: block; color: var(--muted); }
.link-danger { border: 0; background: transparent; color: var(--red); font-size: 12px; }
.error-page { min-height: 60vh; display: grid; place-content: center; text-align: center; }
.error-code { font-size: 70px; font-weight: 700; color: #0875a9; }

/* Public catalog */
.catalog-login-body { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 80% 20%,#1c3853 0,transparent 35%),linear-gradient(135deg,#071525,#13283b); }
.catalog-login-card { width: min(540px,100%); padding: 42px; border-radius: 26px; background: #fff; box-shadow: 0 28px 70px rgba(0,0,0,.35); text-align: center; }
.catalog-login-card h1 { font-size: 34px; margin: 18px 0 2px; }
.catalog-login-card > p { color: var(--muted); margin-bottom: 30px; }
.catalog-login-card form { text-align: right; }
.catalog-login-card label { display: block; margin: 14px 0 7px; font-size: 13px; font-weight: 600; }
.login-input { position: relative; }
.login-input span { position: absolute; right: 14px; top: 14px; }
.login-input input { width: 100%; height: 52px; padding: 0 48px 0 15px; border: 1px solid #dbe1eb; border-radius: 9px; background: #eef3ff; outline: 0; }
.catalog-login-card form button { width: 100%; height: 54px; margin-top: 26px; border: 0; border-radius: 9px; background: #050505; color: #fff; font-size: 18px; font-weight: 700; display: flex; justify-content: center; align-items: center; gap: 10px; }
.catalog-login-card > small { display: block; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); }
.catalog-login-error { padding: 10px; color: #9f1220; background: #ffe9eb; border-radius: 7px; }
.unavailable-card { padding-block: 70px; }
.public-catalog-body { background: #f7f9fd; }
.public-header { min-height: 78px; padding: 12px max(5vw,20px); border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.public-header > a { display: flex; align-items: center; gap: 12px; }
.public-header strong, .public-header small { display: block; }
.public-header strong { font-size: 20px; }
.public-header small { color: var(--muted); }
.public-header p { display: flex; align-items: center; gap: 7px; color: var(--muted); margin: 0; }
.public-header-actions { display: flex; align-items: center; gap: 16px; }
.public-header-actions form { margin: 0; }
.catalog-logout { padding: 9px 14px; border: 1px solid #d8dee8; border-radius: 8px; background: #fff; color: #263244; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.catalog-logout:hover { background: #f1f4f8; }
.catalog-logout .material-symbols-outlined { font-size: 19px; }
.catalog-hero { padding: 58px max(5vw,20px); color: #fff; background: linear-gradient(120deg,#0f172a,#183b59); text-align: center; }
.catalog-hero > span { color: #74d4ff; }
.catalog-hero h1 { font-size: clamp(30px,5vw,48px); margin: 8px 0; }
.catalog-hero p { color: #c7d2e0; margin: 0; }
.department-tabs { padding: 18px max(5vw,20px); display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; background: #fff; border-bottom: 1px solid var(--line); }
.department-tabs a { padding: 9px 18px; border-radius: 999px; background: #eff3f9; }
.department-tabs a.active { color: #fff; background: #0875a9; }
.public-products { max-width: 1380px; margin: auto; padding: 38px max(4vw,20px); }
.public-section-title h2 { margin: 0; font-size: 26px; }
.public-section-title p { color: var(--muted); margin: 3px 0 22px; }
.catalog-product-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.catalog-product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; transition: transform .2s,box-shadow .2s; }
.catalog-product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(16,24,40,.1); }
.catalog-product-image { aspect-ratio: 1; display: grid; place-items: center; background: #f0f4f9; }
.catalog-product-image img { width: 100%; height: 100%; object-fit: contain; }
.catalog-product-image > span { color: #a4adba; font-size: 60px; }
.catalog-product-copy { padding: 16px; }
.catalog-product-copy h3 { margin: 12px 0 4px; font-size: 17px; }
.catalog-product-copy p { color: var(--muted); font-size: 12px; margin: 0 0 16px; }
.catalog-product-copy > div { padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.catalog-product-copy > div small { direction: ltr; color: var(--muted); }
.catalog-product-copy > div strong { color: var(--green); font-size: 18px; }
.public-pagination { margin-top: 30px; display: flex; justify-content: center; gap: 6px; }
.public-pagination a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.public-pagination a.active { color: #fff; background: #050505; }
.public-footer { min-height: 90px; padding: 20px max(5vw,20px); color: #c9d3e1; background: #0f172a; display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 1200px) {
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .catalog-product-grid { grid-template-columns: repeat(3,1fr); }
  .catalog-builder-layout { grid-template-columns: 320px minmax(0,1fr); }
  .preview-grid { grid-template-columns: 1fr; }
  .excel-preview { min-height: 280px; }
}
@media (max-width: 991px) {
  .app-sidebar { transform: translateX(100%); transition: transform .2s; }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  .app-shell { margin-right: 0; }
  .topbar { right: 0; }
  .menu-toggle { display: grid; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1035; background: rgba(15,23,42,.45); }
  .top-account .account-copy, .top-divider { display: none; }
  .top-account { min-width: auto; }
  .products-layout, .product-editor-layout, .catalog-builder-layout { grid-template-columns: 1fr; }
  .filter-panel, .product-form-side { position: static; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .export-actions-grid { grid-template-columns: 1fr; }
  .catalog-product-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .app-content { padding-inline: 15px; }
  .topbar { padding-inline: 12px; }
  .top-search { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .btn { flex: 1; }
  .metrics-grid { grid-template-columns: 1fr; gap: 12px; }
  .metric-card { min-height: 95px; }
  .table-toolbar, .table-pagination, .layout-choice, .share-success, .public-header, .public-footer { align-items: stretch; flex-direction: column; }
  .view-tabs { display: none; }
  .preview-grid { grid-template-columns: 1fr; }
  .document-preview { min-height: 300px; }
  .share-link-box { width: 100%; }
  .share-link-box input { min-width: 0; width: 100%; }
  .catalog-product-grid { grid-template-columns: 1fr; }
  .catalog-login-card { padding: 28px 20px; }
}
