:root {
  color-scheme: dark;
  --bg: #0b0b0a;
  --panel: #14130f;
  --panel-2: #1a1812;
  --line: #3b3421;
  --text: #f3efe4;
  --muted: #aaa28e;
  --gold: #c79a37;
  --gold-2: #8d6a20;
  --danger: #c65e5e;
  --success: #6fb487;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #1d180e 0, var(--bg) 42%); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.author-loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.author-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.author-auth-card { width: min(520px, 100%); background: rgba(20,19,15,.96); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.author-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.author-brand img { width: 50px; height: 50px; }
.author-brand strong { display: block; font-size: 1.15rem; }
.author-brand span { color: var(--muted); font-size: .9rem; }
.author-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.author-sidebar { border-right: 1px solid var(--line); background: rgba(8,8,7,.94); padding: 22px 16px; position: sticky; top: 0; height: 100vh; }
.author-sidebar .author-brand { margin: 0 8px 26px; }
.author-nav { display: grid; gap: 7px; }
.author-nav button, .author-nav a { width: 100%; border: 1px solid transparent; background: transparent; color: var(--muted); padding: 11px 13px; border-radius: 9px; text-align: left; text-decoration: none; cursor: pointer; }
.author-nav button:hover, .author-nav a:hover, .author-nav button.active { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.author-main { min-width: 0; padding: 26px; }
.author-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.author-topbar h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.author-topbar p { margin: 5px 0 0; color: var(--muted); }
.author-card { background: rgba(20,19,15,.95); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.author-grid { display: grid; gap: 16px; }
.author-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.author-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.author-stat strong { display: block; font-size: 1.7rem; margin-top: 7px; }
.author-muted { color: var(--muted); }
.author-status { border-left: 4px solid var(--gold); }
.author-status.success { border-left-color: var(--success); }
.author-status.danger { border-left-color: var(--danger); }
.author-toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.author-btn { border: 1px solid var(--line); color: var(--text); background: var(--panel-2); padding: 9px 13px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.author-btn:hover { border-color: var(--gold-2); }
.author-btn.primary { background: linear-gradient(180deg, #bc8e30, #7d5b18); border-color: #c79a37; color: white; }
.author-btn.danger { border-color: #733; color: #f3b5b5; }
.author-btn:disabled { opacity: .45; cursor: not-allowed; }
.author-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.author-field { display: grid; gap: 6px; color: var(--muted); font-size: .9rem; }
.author-field.full { grid-column: 1 / -1; }
.author-field input, .author-field textarea, .author-field select { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #0d0d0b; color: var(--text); padding: 11px; }
.author-field textarea { min-height: 120px; resize: vertical; }
.author-field textarea.editor { min-height: 420px; line-height: 1.55; }
.author-list { display: grid; gap: 12px; }
.author-item { border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: #11100d; }
.author-item-head { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }
.author-item h3 { margin: 0 0 7px; }
.author-badge { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; color: var(--muted); font-size: .8rem; }
.author-profile-preview { display: flex; gap: 16px; align-items: center; }
.author-avatar { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-2); background: #222; }
.author-checkboxes { display: flex; flex-wrap: wrap; gap: 14px; }
.author-checkboxes label { color: var(--text); }
.author-toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: min(420px, calc(100vw - 40px)); background: #19170f; border: 1px solid var(--gold-2); border-radius: 10px; padding: 12px 16px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; }
.author-toast.show { opacity: 1; transform: translateY(0); }
.author-toast.error { border-color: var(--danger); }
.author-toast.success { border-color: var(--success); }
.author-empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }
@media (max-width: 860px) {
  .author-shell { grid-template-columns: 1fr; }
  .author-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .author-nav { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .author-nav button, .author-nav a { text-align: center; }
  .author-main { padding: 18px; }
  .author-grid.two, .author-grid.three, .author-form { grid-template-columns: 1fr; }
  .author-field.full { grid-column: auto; }
}
@media (max-width: 560px) {
  .author-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .author-item-head, .author-topbar { flex-direction: column; }
}
