.admin-page { max-width: 1320px; min-height: calc(100vh - 130px); padding: 38px 32px 64px; margin: 0 auto; }
.login-page { min-height: calc(100vh - 66px); display: grid; place-items: start center; padding: 64px 20px; }
.login-panel { width: min(100%, 390px); padding: 25px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.login-panel h1 { margin: 0; font-size: 27px; }
.login-panel .section-description { margin-bottom: 22px; }
.login-panel .primary-button { width: 100%; }
.logout-button { color: #e0dcff; cursor: pointer; font: inherit; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.admin-heading h1 { font-size: clamp(26px, 3vw, 34px); }
.admin-total { padding-bottom: 5px; color: var(--muted); font-size: 11px; }
.admin-layout { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.5fr); align-items: start; gap: 18px; }
.editor-panel, .products-panel { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 15px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.panel-heading .eyebrow { margin-bottom: 5px; }
.panel-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; color: #d4d5dc; font-size: 11px; font-weight: 600; }
.field input:not([type="file"]), .field textarea, .field select, .admin-search input {
  width: 100%; border: 1px solid #3a3b43; border-radius: 6px; outline: 0; background: #121318; color: var(--text); font-size: 12px; font-weight: 400;
}
.field input:not([type="file"]), .field textarea, .field select { padding: 11px 12px; }
.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus, .admin-search:focus-within { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: #777983; }
.field small { color: var(--muted); font-size: 10px; font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field input[type="file"] { width: 100%; padding: 8px; border: 1px dashed #484952; border-radius: 6px; background: #121318; color: var(--muted); font-size: 10px; }
.field input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 9px; border: 0; border-radius: 4px; background: #302b4f; color: #e4e0ff; cursor: pointer; font-size: 10px; }
.image-preview { height: 150px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; overflow: hidden; border: 1px dashed #3a3b43; border-radius: 6px; background: #121318; color: #7f818b; font-size: 10px; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.preview-symbol { color: #9690d1; font-size: 26px; }
.form-message { min-height: 15px; margin: 10px 0 0; color: #86d49c; font-size: 10px; }
.form-message.error { color: #ff8f8f; }
.form-actions { display: flex; gap: 8px; }
.primary-button, .secondary-button, .edit-button, .delete-button { min-height: 36px; padding: 0 13px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-size: 10px; font-weight: 650; transition: .18s ease; }
.primary-button { flex: 1; background: var(--accent); color: white; }
.primary-button:hover { background: #7464e5; }
.secondary-button { border-color: var(--border); background: transparent; color: #c2c3ca; }
.secondary-button:hover { background: #292a31; }
.hidden { display: none !important; }
.list-heading { align-items: end; }
.admin-search { width: 180px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #3a3b43; border-radius: 6px; background: #121318; color: var(--muted); }
.admin-search input { height: 32px; border: 0; background: transparent; font-size: 10px; }
.admin-list { display: flex; flex-direction: column; gap: 9px; }
.admin-product { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px; border: 1px solid #2d2e35; border-radius: 7px; background: #15161b; }
.admin-thumb { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border-radius: 5px; background: #30313a; color: #b9b2ee; font-size: 23px; font-weight: 700; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-product-info { min-width: 0; }
.admin-product-info h3 { overflow: hidden; margin: 0 0 5px; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.admin-product-info p { overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-product-actions { display: flex; gap: 6px; }
.edit-button { border-color: #4c4770; background: #282541; color: #d0caff; }
.edit-button:hover { background: #36315a; }
.delete-button { border-color: #58363b; background: #302023; color: #f2aab1; }
.delete-button:hover { background: #47282d; }
.list-empty { padding: 38px 15px; border: 1px dashed var(--border); border-radius: 7px; color: var(--muted); text-align: center; font-size: 11px; }
.storage-note { margin: 16px 2px 0; color: #777983; font-size: 10px; line-height: 1.6; }
.invite-admin { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: #d4d5dc; font-size: 11px; }
.invite-admin summary { cursor: pointer; font-weight: 600; }
.invite-form { max-width: 460px; padding-top: 16px; }
.invite-form .field { margin-bottom: 12px; }
.remove-image-button { width: 100%; margin-top: 8px; }
@media (max-width: 850px) { .admin-layout { grid-template-columns: 1fr; } .admin-list { max-height: 600px; overflow: auto; } }
@media (max-width: 540px) {
  .admin-page { padding: 30px 16px 48px; }
  .topbar { padding: 0 16px; }
  .admin-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .editor-panel, .products-panel { padding: 15px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .list-heading { align-items: stretch; flex-direction: column; }
  .admin-search { width: 100%; }
  .admin-product { grid-template-columns: 48px minmax(0, 1fr); gap: 9px; }
  .admin-thumb { width: 48px; height: 48px; }
  .admin-product-actions { grid-column: 2; }
}
