:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #1d2b45;
  background: #f3f6fb;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #244eac; }
button, input, select, textarea { font: inherit; }

.ses-admin-layout { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.ses-admin-sidebar { padding: 26px 16px; background: #10244c; color: #fff; }
.ses-admin-brand { display: block; color: #fff; font-size: 19px; font-weight: 800; line-height: 1.25; text-decoration: none; }
.ses-admin-brand span { display: block; color: #ccd8f2; font-size: 12px; font-weight: 500; }
.ses-admin-sidebar .ses-admin-eyebrow { margin: 36px 12px 10px; color: #97afd9; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ses-admin-nav { display: grid; gap: 5px; }
.ses-admin-nav a { padding: 11px 12px; border-radius: 7px; color: #e8eefb; font-size: 14px; text-decoration: none; }
.ses-admin-nav a:hover, .ses-admin-nav a.is-active { background: #244eac; color: #fff; }
.ses-admin-sidebar-footer { margin-top: 40px; padding: 0 12px; color: #ccd8f2; font-size: 12px; line-height: 1.7; }
.ses-admin-sidebar-footer a { color: #fff; }

.ses-admin-main { min-width: 0; }
.ses-admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px clamp(18px, 4vw, 52px); background: #fff; border-bottom: 1px solid #e3e8f1; }
.ses-admin-topbar strong { font-size: 14px; }
.ses-admin-topbar form { margin: 0; }
.ses-admin-content { max-width: 1440px; margin: 0 auto; padding: 30px clamp(18px, 4vw, 52px) 56px; }
.ses-admin-page-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.ses-admin-page-heading h1 { margin: 0; color: #17366f; font-size: clamp(26px, 3vw, 34px); }
.ses-admin-page-heading p { max-width: 720px; margin: 7px 0 0; color: #657187; line-height: 1.55; }
.ses-admin-page-heading > .ses-admin-button { gap: 8px; text-decoration: none; }
.ses-admin-page-heading > .ses-admin-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }

.ses-admin-notice, .ses-admin-error { margin: 0 0 20px; padding: 13px 15px; border-radius: 8px; line-height: 1.5; }
.ses-admin-notice { color: #145b3e; background: #e9f8f0; border: 1px solid #bce7d0; }
.ses-admin-error { color: #8d2434; background: #fff0f2; border: 1px solid #f1c1c8; }
.ses-admin-card { min-width: 0; padding: 22px; background: #fff; border: 1px solid #e3e8f1; border-radius: 12px; box-shadow: 0 8px 26px rgba(17, 31, 64, .04); }
.ses-admin-card h2 { margin: 0 0 18px; color: #17366f; font-size: 19px; }
.ses-admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 15px; margin-bottom: 22px; }
.ses-admin-stat { padding: 20px; background: #fff; border: 1px solid #e3e8f1; border-radius: 10px; }
.ses-admin-stat strong { display: block; color: #244eac; font-size: 28px; }
.ses-admin-stat span { display: block; margin-top: 6px; color: #657187; font-size: 13px; }
.ses-admin-columns { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.45fr); gap: 20px; align-items: start; }
.ses-admin-form { display: grid; gap: 15px; }
.ses-admin-form label { display: grid; gap: 7px; color: #263754; font-size: 13px; font-weight: 700; }
.ses-admin-form input, .ses-admin-form select, .ses-admin-form textarea { width: 100%; min-width: 0; padding: 10px 11px; color: #1d2b45; background: #fff; border: 1px solid #cbd4e2; border-radius: 7px; font-size: 14px; font-weight: 400; }
.ses-admin-form textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
.ses-admin-form textarea.ses-admin-code { min-height: 220px; font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.ses-admin-form input:focus, .ses-admin-form select:focus, .ses-admin-form textarea:focus { border-color: #244eac; box-shadow: 0 0 0 3px rgba(36, 78, 172, .12); outline: none; }
.ses-admin-help { margin: -5px 0 0; color: #69758a; font-size: 12px; font-weight: 400; line-height: 1.5; }
.ses-admin-inline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ses-admin-checkbox { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 9px !important; font-weight: 600 !important; }
.ses-admin-checkbox input { width: 17px; height: 17px; }
.ses-html-editor { display: grid; gap: 9px; }
.ses-html-editor-label { color: #263754; font-size: 13px; font-weight: 700; }
.ses-html-editor-modes,
.ses-html-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ses-html-editor-modes { padding-bottom: 8px; border-bottom: 1px solid #e3e8f1; }
.ses-html-editor-modes button,
.ses-html-editor-toolbar button,
.ses-html-editor-toolbar select {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #cbd4e2;
  border-radius: 6px;
  color: #263754;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}
.ses-html-editor-modes button.is-active { color: #fff; background: #244eac; border-color: #244eac; }
.ses-html-editor-toolbar button:hover,
.ses-html-editor-toolbar select:hover { border-color: #244eac; background: #f3f6fb; }
.ses-html-editor-canvas {
  display: none;
  width: 100%;
  height: 620px;
  min-height: 420px;
  overflow: auto;
  border: 1px solid #cbd4e2;
  border-radius: 7px;
  background: #fff;
}
.ses-html-editor-preview { display: block; width: 100%; min-height: 360px; border: 1px solid #cbd4e2; border-radius: 7px; background: #fff; }
.ses-html-editor.is-enhanced .ses-html-editor-canvas { display: block; }
.ses-html-editor [hidden] { display: none !important; }
.ses-admin-button, .ses-admin-button-secondary, .ses-admin-danger { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; border: 0; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 700; text-decoration: none; }
.ses-admin-button { color: #fff; background: #244eac; }
.ses-admin-button:hover { background: #17366f; }
.ses-admin-button-secondary { color: #244eac; background: #edf2fb; }
.ses-admin-danger { color: #a82138; background: #fff0f2; }
.ses-admin-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.ses-admin-table-wrap { overflow-x: auto; }
.ses-admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ses-admin-table th, .ses-admin-table td { padding: 12px 10px; border-bottom: 1px solid #e8edf4; text-align: left; vertical-align: middle; }
.ses-admin-table th { color: #657187; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.ses-admin-table td strong { color: #203251; }
.ses-admin-table small { display: block; margin-top: 4px; color: #758198; line-height: 1.4; }
.ses-admin-table form { display: inline; }
.ses-admin-row-actions { white-space: nowrap; }
.ses-admin-row-actions a { margin-right: 9px; font-weight: 700; text-decoration: none; }
.ses-admin-pill { display: inline-block; padding: 4px 8px; border-radius: 999px; color: #245c43; background: #e9f8f0; font-size: 11px; font-weight: 700; }
.ses-admin-pill.is-draft { color: #785214; background: #fff5d8; }
.ses-admin-thumb { width: 48px; height: 48px; object-fit: contain; border: 1px solid #e3e8f1; border-radius: 6px; background: #fff; }
.ses-admin-item-image-preview { display: grid; gap: 7px; color: #69758a; font-size: 12px; }
.ses-admin-item-image-preview img { width: min(100%, 360px); max-height: 220px; border: 1px solid #e3e8f1; border-radius: 8px; object-fit: cover; }
.ses-admin-item-thumb { width: 72px; height: 48px; border: 1px solid #e3e8f1; border-radius: 6px; object-fit: cover; }
.ses-admin-no-image { color: #758198; font-size: 12px; }
.ses-admin-empty { padding: 24px; color: #657187; text-align: center; }
.has-product-editor { overflow: hidden; }
.ses-product-editor { position: fixed; z-index: 1000; inset: 0; overflow: hidden; background: #f3f6fb; }
.ses-product-editor__form { display: grid; width: 100%; height: 100dvh; grid-template-rows: auto minmax(0, 1fr); gap: 0; }
.ses-product-editor__header { position: relative; z-index: 2; display: flex; min-height: 74px; align-items: center; gap: 16px; padding: 12px clamp(16px, 3vw, 42px); background: #fff; border-bottom: 1px solid #e3e8f1; box-shadow: 0 4px 16px rgba(17, 31, 64, .06); }
.ses-product-editor__close { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 1px solid #d5ddeb; border-radius: 10px; color: #263754; background: #fff; text-decoration: none; }
.ses-product-editor__close:hover { color: #a82138; background: #fff0f2; border-color: #efc7ce; }
.ses-product-editor__close svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.ses-product-editor__heading { min-width: 0; flex: 1; }
.ses-product-editor__heading h2 { margin: 0; color: #17366f; font-size: 19px; }
.ses-product-editor__heading p { overflow: hidden; margin: 4px 0 0; color: #657187; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ses-product-editor__save { display: inline-flex; min-width: 94px; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 8px; color: #fff; background: #244eac; cursor: pointer; font-size: 14px; font-weight: 700; }
.ses-product-editor__save:hover { background: #17366f; }
.ses-product-editor__save svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.ses-product-editor__body { width: min(100%, 1500px); min-height: 0; overflow: auto; margin: 0 auto; padding: clamp(16px, 3vw, 40px); overscroll-behavior: contain; }
.ses-product-editor__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; align-items: start; padding: clamp(18px, 3vw, 34px); background: #fff; border: 1px solid #e3e8f1; border-radius: 14px; box-shadow: 0 8px 26px rgba(17, 31, 64, .05); }
.ses-product-editor__fields > .ses-html-editor { grid-column: 1 / -1; }
.ses-product-editor__error { margin: 12px 24px 0; }
.ses-product-editor [hidden] { display: none !important; }
.ses-product-editor__close:focus-visible, .ses-product-editor__save:focus-visible { outline: 3px solid rgba(36, 78, 172, .3); outline-offset: 2px; }
.ses-admin-login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 5%, #e8eefb, transparent 34%), #f3f6fb; }
.ses-auth-card { width: min(100%, 460px); padding: 32px; background: #fff; border: 1px solid #e3e8f1; border-radius: 14px; box-shadow: 0 24px 70px rgba(17, 31, 64, .12); }
.ses-auth-card .ses-admin-brand { margin-bottom: 32px; color: #17366f; }
.ses-auth-card .ses-admin-brand span { color: #657187; }
.ses-admin-eyebrow { margin: 0 0 7px; color: #b91f3b; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ses-auth-card h1 { margin: 0 0 9px; color: #17366f; font-size: 27px; }
.ses-auth-card > p:not(.ses-admin-eyebrow):not(.ses-admin-error) { margin: 0 0 22px; color: #657187; line-height: 1.55; }
.ses-auth-card .ses-admin-form { margin-top: 20px; }
.ses-admin-back-link { display: inline-block; margin-top: 22px; font-size: 13px; }

@media (max-width: 980px) {
  .ses-admin-layout { grid-template-columns: 1fr; }
  .ses-admin-sidebar { padding: 14px 18px; }
  .ses-admin-sidebar .ses-admin-eyebrow, .ses-admin-sidebar-footer { display: none; }
  .ses-admin-nav { display: flex; overflow-x: auto; gap: 4px; margin-top: 14px; padding-bottom: 2px; }
  .ses-admin-nav a { flex: 0 0 auto; padding: 9px 11px; }
  .ses-admin-columns { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .ses-admin-content { padding: 22px 14px 40px; }
  .ses-admin-card { padding: 17px; }
  .ses-admin-inline { grid-template-columns: 1fr; }
  .ses-html-editor-canvas { min-height: 320px; }
  .ses-auth-card { padding: 25px 20px; }
  .ses-product-editor__header { min-height: 64px; gap: 10px; padding: 9px 12px; }
  .ses-product-editor__close { width: 40px; height: 40px; flex-basis: 40px; }
  .ses-product-editor__heading h2 { font-size: 16px; }
  .ses-product-editor__heading p { display: none; }
  .ses-product-editor__save { min-width: 44px; min-height: 40px; padding: 8px 10px; }
  .ses-product-editor__body { padding: 12px; }
  .ses-product-editor__fields { grid-template-columns: 1fr; gap: 15px; padding: 16px; }
  .ses-product-editor__fields > .ses-html-editor { grid-column: auto; }
}
