.auth-wrap {
  min-height: calc(100vh - 130px);
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 380px; background: var(--panel); border: 0.5px solid var(--border);
  border-radius: 16px; padding: 32px 30px;
}
.auth-card h1 { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.auth-card .sub { color: var(--text-3); font-size: 13px; margin: 0 0 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-1); border: 0.5px solid var(--border-strong); border-radius: 8px;
  padding: 9px 11px; color: var(--text-1); font-size: 14px; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--shell-accent); }
.field-hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0.5px solid var(--border-strong); border-radius: 8px; background: var(--bg-1);
  color: var(--text-1); font-size: 13.5px; font-weight: 500; padding: 9px 18px; cursor: pointer;
  text-decoration: none;
}
.btn:hover { border-color: var(--shell-accent); }
.btn-primary { background: var(--text-1); color: var(--bg-0); border-color: var(--text-1); }
.btn-primary:hover { opacity: 0.88; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-block { width: 100%; }
.error-box { background: rgba(255, 84, 112, 0.1); border: 0.5px solid rgba(255, 84, 112, 0.4); color: #ff8fa3; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }

.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 32px 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-head h1 { font-size: 22px; font-weight: 600; margin: 0; }
.admin-head .who { font-size: 12.5px; color: var(--text-3); }

.admin-cat { margin-bottom: 32px; }
.admin-cat h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--text-2); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 0.5px solid var(--border); border-radius: 12px; overflow: hidden; }
.admin-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); padding: 10px 14px; border-bottom: 0.5px solid var(--border); }
.admin-table td { padding: 11px 14px; font-size: 13.5px; border-bottom: 0.5px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.status-pill { font-size: 11px; padding: 3px 9px; border-radius: 99px; border: 0.5px solid var(--border-strong); }
.status-pill.live { color: #39ff8a; border-color: rgba(57,255,138,0.4); }
.status-pill.hidden { color: var(--text-3); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.row-actions form { display: inline; }

.edit-grid { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.edit-panel { background: var(--panel); border: 0.5px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.edit-panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin: 0 0 16px; }
.swatch-row { display: flex; align-items: center; gap: 10px; }
.swatch-row input[type=color] { width: 34px; height: 34px; padding: 0; border: 0.5px solid var(--border-strong); border-radius: 6px; background: none; }
.palette-preview { border-radius: 10px; padding: 16px; margin-top: 12px; border: 0.5px solid var(--border); }

.section-block { margin-bottom: 26px; }
.section-block label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.ql-editor-host { background: #f4f5f7; border-radius: 8px; }
.ql-toolbar.ql-snow { border-color: var(--border-strong) !important; background: #e7e9ed; border-radius: 8px 8px 0 0; }
.ql-container.ql-snow { border-color: var(--border-strong) !important; border-radius: 0 0 8px 8px; min-height: 140px; font-size: 14px; background: #f4f5f7; }
.ql-editor { color: #1a1e27; }
.ql-editor.ql-blank::before { color: #7a7f8a; font-style: normal; }

.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-row-admin { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg-1); border: 0.5px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.doc-row-admin .dname { font-size: 13px; font-weight: 500; }
.doc-row-admin .dmeta { font-size: 11.5px; color: var(--text-3); }
.doc-row-admin .dactions { display: flex; align-items: center; gap: 8px; }
.doc-row-admin input[type=file] { font-size: 12px; max-width: 170px; }

.link-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-1); border: 0.5px solid var(--border); border-radius: 10px; padding: 9px 13px; font-size: 13px; }
.link-add { display: flex; gap: 8px; }
.link-add select { flex: 1; }

.back-link { color: var(--text-3); text-decoration: none; font-size: 13px; }
.back-link:hover { color: var(--text-1); }
