.wiki-shell { width: min(100% - 40px, 1320px); margin-inline: auto; padding: 48px 0 90px; font-family: var(--atlas-sans); }
.wiki-shell h1, .wiki-shell h2, .wiki-shell h3 { font-family: var(--atlas-serif); }
.wiki-login { max-width: 540px; margin: 30px auto; padding: clamp(28px, 6vw, 52px); border: 1px solid var(--atlas-line); border-radius: 20px; background: var(--atlas-canvas); box-shadow: var(--atlas-shadow); }
.wiki-login h1 { margin: 0; font-size: 2.2rem; line-height: 1.15; }
.wiki-login form { margin-top: 28px; }
.wiki-login label { display: block; margin: 16px 0 5px; font-weight: 700; }
.wiki-login input[type="text"], .wiki-login input[type="password"] { width: 100%; min-height: 48px; padding: 9px 12px; border: 1px solid #aaa99f; border-radius: 3px; background: #fff; }
.wiki-login .login-remember label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.wiki-login .login-submit input { border: 0; border-radius: 3px; padding: 11px 20px; color: #fff; background: var(--atlas-accent); font-weight: 700; cursor: pointer; }
.wiki-header, .wiki-editor-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.wiki-header h1, .wiki-editor-header h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.1; }
.wiki-header p:last-child { margin: 8px 0 0; color: var(--atlas-muted); }
.wiki-header-actions { display: flex; align-items: center; gap: 20px; }
.wiki-panel, .wiki-edit-card { border: 1px solid var(--atlas-line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.wiki-panel-heading { display: flex; align-items: center; gap: 10px; padding: 20px 24px; border-bottom: 1px solid var(--atlas-line); }
.wiki-panel-heading h2 { margin: 0; font-size: 1.35rem; }
.wiki-panel-heading span { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 20px; color: var(--atlas-accent-dark); background: var(--atlas-highlight); font-size: .8rem; font-weight: 700; }
.wiki-table-wrap { overflow-x: auto; }
.wiki-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.wiki-table th, .wiki-table td { padding: 16px 20px; border-bottom: 1px solid var(--atlas-line); text-align: left; white-space: nowrap; }
.wiki-table th { color: var(--atlas-muted); background: #faf9f4; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.wiki-table td:first-child { width: 100%; white-space: normal; }
.wiki-row-actions { display: flex; gap: 14px; }
.wiki-status { display: inline-flex; padding: 4px 9px; border-radius: 20px; color: #564619; background: #f3e8b9; font-size: .77rem; font-weight: 700; }
.wiki-status-publish { color: #175343; background: #dceee7; }
.wiki-status-draft { color: #4f5653; background: #e9eae8; }
.wiki-status-private { color: #603661; background: #eedff0; }
.wiki-empty { padding: 50px 24px; text-align: center; }
.wiki-empty h3 { margin: 0; }
.wiki-notice { margin: 0 0 24px; padding: 14px 18px; border-left: 4px solid var(--atlas-accent); background: var(--atlas-highlight); }
.wiki-notice-error { border-left-color: #a93d35; background: #f8e7e5; }
.wiki-back { display: inline-block; margin-bottom: 12px; font-size: .88rem; }
.wiki-current-status { padding: 6px 12px; border-radius: 20px; color: var(--atlas-muted); background: var(--atlas-canvas); font-size: .82rem; font-weight: 700; }
.wiki-editor-form { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 26px; }
.wiki-editor-main { display: grid; gap: 26px; min-width: 0; }
.wiki-editor-sidebar { position: sticky; top: 20px; display: grid; gap: 18px; }
.wiki-edit-card { padding: 26px; }
.wiki-edit-card h2 { margin: 0 0 20px; font-size: 1.25rem; }
.wiki-field { display: block; margin-bottom: 22px; }
.wiki-field:last-child { margin-bottom: 0; }
.wiki-field > span, .wiki-field-heading > span { display: block; margin-bottom: 7px; color: var(--atlas-ink); font-weight: 700; }
.wiki-field b { color: #b33b31; }
.wiki-field input[type="text"], .wiki-field input[type="url"], .wiki-field textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 10px; padding: 10px 12px; color: var(--atlas-ink); background: #fff; }
.wiki-field input[type="text"], .wiki-field input[type="url"] { min-height: 46px; }
.wiki-field textarea { resize: vertical; }
.wiki-field small, .wiki-help { display: block; margin: 5px 0; color: var(--atlas-muted); font-size: .8rem; line-height: 1.4; }
.wiki-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 8px; }
.wiki-field-heading > span { margin: 0; }
.wiki-small-button, .wiki-secondary-button { border: 1px solid #bfdbfe; border-radius: 9px; padding: 8px 11px; color: var(--atlas-accent); background: #fff; font-size: .8rem; }
.wiki-small-button:hover, .wiki-secondary-button:hover { color: #fff; background: var(--atlas-accent); }
.wiki-text-button { padding: 6px; color: var(--atlas-accent); background: transparent; font-size: .82rem; }
.wiki-text-button:hover { color: var(--atlas-accent-dark); background: transparent; text-decoration: underline; }
.wiki-actions { display: grid; gap: 10px; }
.wiki-actions button { width: 100%; }
.wiki-key-data { display: grid; gap: 9px; }
.wiki-key-row { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(160px, 1fr) 36px; gap: 8px; }
.wiki-key-row input { width: 100%; min-width: 0; min-height: 42px; border: 1px solid #d1d5db; border-radius: 9px; padding: 8px 10px; }
.wiki-remove-row { width: 36px; height: 42px; padding: 0; color: #94352e; background: #f7e8e6; font-size: 1.3rem; }
.wiki-remove-row:hover { background: #94352e; }
.wiki-term-list { max-height: 260px; overflow: auto; padding: 5px; border: 1px solid var(--atlas-line); border-radius: 10px; }
.wiki-term-option { display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px calc(4px + (var(--term-depth) * 16px)); font-size: .88rem; }
.wiki-term-option:hover { background: var(--atlas-canvas); }
.wiki-media-preview { min-height: 120px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #cbd5e1; border-radius: 12px; color: var(--atlas-muted); background: var(--atlas-canvas); }
.wiki-media-preview img { width: 100%; max-height: 210px; object-fit: cover; }
.wiki-media-actions { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.wiki-edit-card .wp-editor-wrap { font-family: var(--atlas-sans); }
.wiki-preview-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; padding: 14px 18px; border: 1px solid #d2bb67; background: #fff5c9; font: .9rem/1.3 var(--atlas-sans); }
.wiki-preview-bar span { margin-right: auto; color: #655a32; }

@media (max-width: 900px) {
  .wiki-editor-form { grid-template-columns: 1fr; }
  .wiki-editor-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wiki-editor-sidebar .wiki-edit-card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .wiki-shell { width: min(100% - 28px, 1320px); padding-top: 32px; }
  .wiki-header, .wiki-editor-header { align-items: flex-start; flex-direction: column; }
  .wiki-header-actions { width: 100%; justify-content: space-between; }
  .wiki-editor-sidebar { grid-template-columns: 1fr; }
  .wiki-editor-sidebar .wiki-edit-card:first-child { grid-column: auto; }
  .wiki-edit-card { padding: 19px; }
  .wiki-key-row { grid-template-columns: 1fr 36px; }
  .wiki-key-row input:nth-child(2) { grid-column: 1; }
  .wiki-remove-row { grid-column: 2; grid-row: 1 / 3; height: 100%; }
  .wiki-preview-bar { align-items: flex-start; flex-direction: column; }
}
