.admin-body { min-height: 100vh; background: #f5f4ef; }
.admin-header { height: 72px; padding: 0 max(5%, calc((100% - 1280px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--paper); }
.admin-back-link { color: var(--ink-soft); font-size: 11px; }
.admin-main { max-width: 1320px; min-height: calc(100vh - 72px); margin: 0 auto; padding: 45px 28px 80px; }
.login-panel { width: min(100%, 420px); margin: 35px auto; padding: 37px; background: var(--white); border: 1px solid var(--line); }
.login-panel h1, .workspace-heading h1 { margin: 15px 0 8px; font-family: var(--display); font-size: 31px; letter-spacing: -.06em; }
.login-intro, .workspace-heading > div:first-child > p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.login-panel form { display: grid; gap: 17px; margin-top: 27px; }
.login-panel label, .product-editor label { display: grid; gap: 7px; color: #4f5d57; font-size: 10px; font-weight: 600; }
.login-panel input, .product-editor input, .product-editor select, .product-editor textarea, .admin-search input { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid #dedfd7; border-radius: 0; outline: none; background: #fffefa; color: var(--ink); font-size: 11px; }
.login-panel input:focus, .product-editor input:focus, .product-editor select:focus, .product-editor textarea:focus, .admin-search input:focus { border-color: #66827a; box-shadow: 0 0 0 2px rgba(68,111,99,.12); }
.login-panel .button { width: 100%; justify-content: space-between; cursor: pointer; }
.login-help { margin: 19px 0 0; color: #858d85; font-size: 9px; line-height: 1.7; }
.form-message { min-height: 15px; margin: 0; color: #a34c3a; font-size: 10px; line-height: 1.6; }
.form-message.success { color: #396d54; }
.workspace-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.workspace-heading h1 { margin-top: 11px; }
.workspace-actions { display: flex; align-items: center; gap: 15px; color: #748079; font-size: 10px; }
.local-storage-notice { margin-bottom: 24px; padding: 13px 16px; display: flex; gap: 10px; align-items: baseline; border: 1px solid #dedfd3; background: #f0f0e7; color: #67736a; font-size: 10px; line-height: 1.7; }
.local-storage-notice strong { flex: 0 0 auto; color: var(--ink); }
.admin-button { min-height: 34px; padding: 0 12px; border: 1px solid #d6d9d0; background: transparent; color: var(--ink); font-size: 10px; cursor: pointer; }
.admin-button:hover { border-color: var(--ink); }
.admin-button-primary { border-color: var(--ink); background: var(--ink); color: white; }
.admin-button-primary:hover { background: #285351; color: white; }
.admin-button-danger { border-color: #e2cbc3; color: #a54d3c; }
.admin-button-danger:hover { border-color: #a54d3c; }
.admin-layout { display: grid; grid-template-columns: 265px minmax(0, 1fr); align-items: start; gap: 20px; }
.workspace-mode-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.workspace-mode-tab { padding: 10px 15px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #778179; font-size: 11px; cursor: pointer; }
.workspace-mode-tab.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 700; }
.product-sidebar, .product-editor { border: 1px solid var(--line); background: var(--white); }
.product-sidebar { padding: 17px; }
.sidebar-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sidebar-heading h2 { margin: 0; font-family: var(--display); font-size: 15px; }
.admin-search { display: block; margin-top: 15px; }
.admin-search input { min-height: 34px; background: #faf9f5; font-size: 10px; }
.admin-product-list { display: grid; gap: 5px; margin-top: 12px; }
.admin-product-item { width: 100%; padding: 9px; display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; border: 1px solid transparent; background: transparent; text-align: left; cursor: pointer; }
.admin-product-item:hover { background: #f7f6f1; }
.admin-product-item.active { border-color: #d9dfd7; background: #f0f2ec; }
.admin-product-item img, .product-item-placeholder { width: 42px; height: 46px; object-fit: cover; background: #e8e6df; }
.product-item-placeholder { display: grid; place-items: center; color: #99a099; font-size: 15px; }
.admin-product-item strong, .admin-product-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-product-item strong { color: var(--ink); font-size: 10px; font-weight: 600; }
.admin-product-item small { margin-top: 4px; color: #89928b; font-size: 9px; }
.sidebar-count { margin: 13px 0 0; color: #8b938c; font-size: 9px; }
.product-editor { min-height: 430px; padding: 24px; }
.editor-empty { min-height: 380px; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #7b877f; text-align: center; }
.editor-empty > span { color: var(--orange); font-size: 27px; }
.editor-empty h2 { margin: 12px 0 7px; color: var(--ink); font-family: var(--display); font-size: 18px; }
.editor-empty p { margin: 0; font-size: 10px; }
.editor-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.editor-heading h2 { margin: 9px 0 0; font-family: var(--display); font-size: 20px; letter-spacing: -.04em; }
.product-base-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.product-editor small { color: #879088; font-size: 8px; font-weight: 400; line-height: 1.5; }
.product-editor input, .product-editor select, .product-editor textarea { min-height: 35px; padding: 7px 9px; font-size: 10px; }
.product-editor textarea { min-height: 82px; resize: vertical; font: 10px/1.6 var(--sans); }
.image-editor { display: grid; grid-template-columns: 108px 1fr; gap: 17px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.image-preview { width: 108px; height: 110px; position: relative; display: grid; place-items: center; overflow: hidden; background: #f0eee7; color: #8d968d; font-size: 9px; text-align: center; }
.image-preview img { width: 100%; height: 100%; display: none; position: absolute; inset: 0; object-fit: cover; }
.image-preview img.visible { display: block; }
.image-preview > span { max-width: 75px; }
.image-preview.has-image > span { display: none; }
.image-controls h3 { margin: 0 0 5px; font-family: var(--display); font-size: 12px; }
.image-controls p { margin: 0 0 11px; color: #7f8981; font-size: 9px; }
.upload-button { width: max-content; min-height: 31px; padding: 9px 11px; display: inline-flex; align-items: center; background: #e9ede6; color: var(--ink); cursor: pointer; font-size: 9px; }
.upload-button:hover { background: #dce4da; }
.image-controls > span { display: block; min-height: 14px; margin-top: 6px; color: #65746b; font-size: 9px; }
.translation-hint { margin: 16px 0 0; color: #748178; font-size: 10px; line-height: 1.6; }
.language-editors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding-top: 18px; }
.language-editor { min-width: 0; margin: 0; padding: 12px; display: grid; align-content: start; gap: 10px; border: 1px solid var(--line); }
.language-editor legend { padding: 0 5px; color: var(--ink); font-family: var(--display); font-size: 11px; font-weight: 700; }
.language-editor legend span { margin-left: 4px; color: #929990; font: 8px var(--sans); }
.language-editor label { font-size: 9px; }
.language-editor input { min-height: 32px; font-size: 9px; }
.editor-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--line); }
.editor-footer .button { min-width: 145px; justify-content: space-between; cursor: pointer; }
.editor-footer .form-message { flex: 1; }
.page-content-panel { padding: 23px; border: 1px solid var(--line); background: var(--white); }
.content-panel-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.content-panel-heading h2, .site-settings h3 { margin: 0; font-family: var(--display); font-size: 18px; }
.content-panel-heading p, .site-settings p { margin: 6px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.7; }
.content-language-select { width: min(220px, 100%); display: grid; gap: 7px; color: #4f5d57; font-size: 10px; font-weight: 600; }
.content-language-select select { min-height: 35px; padding: 7px 9px; border: 1px solid #dedfd7; background: #fffefa; color: var(--ink); font-size: 10px; }
.page-content-fields { display: grid; gap: 14px; margin-top: 14px; }
.content-section { margin: 0; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; border: 1px solid var(--line); }
.content-section legend { padding: 0 6px; color: var(--ink); font-family: var(--display); font-size: 12px; font-weight: 700; }
.content-section label, .site-settings-fields label { display: grid; gap: 6px; color: #4f5d57; font-size: 9px; font-weight: 600; }
.content-section input, .content-section textarea, .site-settings-fields input { width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid #dedfd7; border-radius: 0; outline: none; background: #fffefa; color: var(--ink); font: 10px/1.6 var(--sans); }
.content-section textarea { min-height: 66px; resize: vertical; }
.content-section input:focus, .content-section textarea:focus, .site-settings-fields input:focus, .content-language-select select:focus { border-color: #66827a; box-shadow: 0 0 0 2px rgba(68,111,99,.12); }
.content-section small { color: #879088; font-size: 8px; font-weight: 400; line-height: 1.5; }
.site-settings { display: grid; grid-template-columns: minmax(150px, .7fr) 2fr; gap: 18px; margin-top: 20px; padding: 16px; border: 1px solid var(--line); background: #faf9f5; }
.site-settings h3 { font-size: 13px; }
.site-settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.site-settings-fields input { min-height: 34px; }
.admin-empty-list { padding: 20px 5px; color: #818b83; font-size: 10px; line-height: 1.7; text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 850px) {
  .admin-layout { grid-template-columns: 220px minmax(0,1fr); gap: 12px; }
  .product-sidebar { padding: 12px; }
  .product-editor { padding: 18px; }
}
@media (max-width: 650px) {
  .admin-header { height: 62px; padding: 0 16px; }
  .admin-main { padding: 25px 13px 55px; }
  .login-panel { margin: 13px auto; padding: 25px 20px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; }
  .workspace-actions { width: 100%; justify-content: space-between; }
  .admin-layout { grid-template-columns: 1fr; }
  .page-content-panel { padding: 16px 13px; }
  .content-panel-heading { align-items: flex-start; flex-direction: column; }
  .content-language-select { width: 100%; }
  .content-section, .site-settings-fields { grid-template-columns: 1fr; }
  .site-settings { grid-template-columns: 1fr; }
  .admin-product-list { grid-template-columns: repeat(2, minmax(0,1fr)); max-height: 235px; overflow: auto; }
  .product-editor { padding: 16px 13px; }
  .product-base-fields { grid-template-columns: 1fr; }
  .image-editor { grid-template-columns: 86px 1fr; gap: 12px; }
  .image-preview { width: 86px; height: 92px; }
  .language-editors { grid-template-columns: 1fr; }
  .editor-heading h2 { font-size: 17px; }
  .editor-footer { align-items: flex-start; flex-direction: column; }
  .editor-footer .button { width: 100%; }
}
