:root {
  --admin-accent: #d71920;
  --admin-accent-dark: #a90f15;
  --admin-ink: #20242a;
  --admin-muted: #68707b;
  --admin-line: #d9dde2;
  --admin-soft: #f3f4f6;
  --admin-canvas: #e7e9ec;
  --admin-white: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--admin-soft);
  color: var(--admin-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
textarea,
button {
  font: inherit;
  letter-spacing: 0;
}

label {
  display: block;
  margin-bottom: 14px;
  color: #3e454d;
  font-size: 13px;
  font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 11px;
  border: 1px solid #cfd4da;
  border-radius: 4px;
  outline: 0;
  background: var(--admin-white);
  color: var(--admin-ink);
  font-weight: 400;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid #cfd4da;
  border-radius: 4px;
  background: var(--admin-white);
  color: #4d555f;
  font-weight: 400;
}

input:focus,
textarea:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.1);
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--admin-accent);
  border-radius: 4px;
  background: var(--admin-accent);
  color: var(--admin-white);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

button:hover,
.button:hover {
  background: var(--admin-accent-dark);
  border-color: var(--admin-accent-dark);
}

button:focus-visible,
.button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(215, 25, 32, 0.22);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.ghost,
.button.ghost {
  border-color: #c7cdd4;
  background: var(--admin-white);
  color: #343a41;
}

button.ghost:hover,
.button.ghost:hover {
  border-color: #9ca4ad;
  background: #f7f8f9;
}

button.danger,
.button.danger {
  border-color: #a61b1f;
  background: #a61b1f;
}

button.danger.ghost,
.button.danger.ghost {
  border-color: #d9a7a9;
  background: var(--admin-white);
  color: #98191d;
}

button.compact,
.button.compact {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #eceef1;
}

.login-panel {
  width: min(420px, calc(100vw - 32px));
  padding: 32px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: var(--admin-white);
  box-shadow: 0 16px 36px rgba(32, 36, 42, 0.1);
}

.login-panel h1 {
  margin: 0 0 24px;
  font-size: 24px;
}

.login-panel button {
  width: 100%;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 24px;
  border-bottom: 1px solid #cfd4da;
  background: var(--admin-white);
}

.admin-title span,
.section-heading span {
  display: block;
  margin-bottom: 2px;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-title h1,
.section-heading h2 {
  margin: 0;
  color: var(--admin-ink);
  font-size: 19px;
  line-height: 1.3;
}

.admin-topbar nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #4c535c;
  font-size: 13px;
  font-weight: 700;
}

.admin-topbar nav a:hover {
  color: var(--admin-accent);
}

.admin-module-nav {
  position: sticky;
  top: 68px;
  z-index: 19;
  display: flex;
  align-items: stretch;
  min-height: 44px;
  padding: 0 24px;
  overflow-x: auto;
  border-bottom: 1px solid #cfd4da;
  background: var(--admin-white);
}

.admin-module-nav a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 112px;
  padding: 0 18px;
  border-bottom: 3px solid transparent;
  color: #5b626c;
  font-size: 13px;
  font-weight: 700;
}

.admin-module-nav a:hover {
  background: #f7f8f9;
  color: var(--admin-ink);
}

.admin-module-nav a.active {
  border-bottom-color: var(--admin-accent);
  color: var(--admin-ink);
}

.admin-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: calc(100vh - 112px);
}

.sidebar {
  position: sticky;
  top: 112px;
  align-self: start;
  min-height: calc(100vh - 112px);
  padding: 22px 14px;
  border-right: 1px solid var(--admin-line);
  background: #e9ebee;
}

.sidebar h2 {
  margin: 0 8px 12px;
  color: #5d6570;
  font-size: 12px;
}

.sidebar a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 3px;
  padding: 9px 10px;
  border-radius: 4px;
  color: #454c55;
}

.sidebar a span {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(32, 36, 42, 0.08);
  text-align: center;
  font-size: 11px;
}

.sidebar a.active {
  background: #252a30;
  color: var(--admin-white);
  font-weight: 700;
}

.sidebar a.active span {
  background: var(--admin-accent);
}

.content {
  min-width: 0;
  padding: 24px;
}

.alert {
  margin: 0 0 16px;
  padding: 11px 13px;
  border-radius: 4px;
  font-weight: 700;
}

.alert.success {
  border: 1px solid #a9d6b7;
  background: #edf8f0;
  color: #1e6733;
}

.alert.error {
  border: 1px solid #e4b2b4;
  background: #fff1f1;
  color: #98191d;
}

.category-editor {
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: var(--admin-white);
}

.category-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e6e8eb;
}

.category-form {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(360px, 1.4fr);
  gap: 16px;
  align-items: start;
}

.category-form label {
  margin: 0;
}

.category-form input[type="text"] {
  height: 42px;
  min-height: 42px;
}

.category-form textarea {
  height: 42px;
  min-height: 42px;
  overflow-y: hidden;
  resize: none;
}

.product-workspace {
  min-width: 0;
}

.workspace-header,
.preview-toolbar,
.editor-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.workspace-header {
  margin-bottom: 12px;
}

.product-list {
  display: flex;
  align-items: stretch;
  min-height: 58px;
  padding: 0 10px;
  overflow-x: auto;
  border: 1px solid var(--admin-line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: var(--admin-white);
}

.product-list a {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  min-width: 150px;
  max-width: 230px;
  padding: 9px 13px 7px;
  border-bottom: 3px solid transparent;
  color: #4b535d;
}

.product-list a:hover {
  background: #f7f8f9;
}

.product-list a.active {
  border-bottom-color: var(--admin-accent);
  color: var(--admin-ink);
}

.product-list strong,
.product-list span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-list strong {
  font-size: 13px;
}

.product-list span,
.muted {
  margin-top: 4px;
  color: #737b85;
  font-size: 11px;
}

.product-list .muted {
  align-self: center;
  margin: 0 10px;
}

.editing-layout {
  display: grid;
  grid-template-columns: minmax(430px, 0.85fr) minmax(560px, 1.15fr);
  min-width: 0;
  border: 1px solid var(--admin-line);
  border-radius: 0 0 6px 6px;
  background: var(--admin-white);
}

.editor-pane {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid var(--admin-line);
}

.editor-section {
  margin: 0 0 24px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e6e8eb;
}

.editor-section:last-of-type {
  border-bottom: 0;
}

.editor-section h3 {
  margin: 0 0 16px;
  color: #2e343b;
  font-size: 15px;
}

.editor-section-header {
  margin-bottom: 12px;
}

.editor-section-header h3 {
  margin: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.title-grid {
  grid-template-columns: minmax(0, 1fr) 110px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 4px 0 14px;
  font-weight: 700;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--admin-accent);
}

.table-card {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #d9dde2;
  border-radius: 5px;
  background: #f7f8f9;
}

.table-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 9px;
}

.table-card-header input,
.row-editor input,
.row-editor textarea {
  margin-top: 0;
}

.row-editor input,
.row-editor textarea {
  height: 42px;
  min-height: 42px;
}

.row-editor textarea {
  overflow-y: hidden;
  resize: none;
}

.row-editor {
  display: grid;
  grid-template-columns: minmax(115px, 0.34fr) minmax(0, 1fr) auto;
  gap: 7px;
  align-items: start;
  margin-bottom: 7px;
}

.icon-button {
  min-height: 40px;
  padding: 0 9px;
  border-color: #6d7580;
  background: #6d7580;
  font-size: 12px;
}

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  margin: 0 -22px;
  padding: 14px 22px;
  border-top: 1px solid var(--admin-line);
  background: var(--admin-white);
}

.form-actions.has-delete {
  justify-content: space-between;
}

.delete-form {
  display: none;
}

.preview-pane {
  position: sticky;
  top: 128px;
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - 148px);
  padding: 20px;
  overflow: auto;
  background: #eef0f2;
}

.preview-toolbar {
  min-height: 44px;
  margin-bottom: 10px;
}

.segmented-control {
  display: inline-flex;
  padding: 2px;
  border: 1px solid #c9ced4;
  border-radius: 5px;
  background: #dfe2e6;
}

.segmented-control button {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #5b636d;
  font-size: 12px;
}

.segmented-control button:hover {
  background: rgba(255, 255, 255, 0.55);
}

.segmented-control button.active {
  background: var(--admin-white);
  color: var(--admin-ink);
  box-shadow: 0 1px 3px rgba(32, 36, 42, 0.16);
}

.preview-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #69717b;
  font-size: 11px;
  font-weight: 700;
}

.preview-meta span:first-child {
  color: var(--admin-accent);
}

.preview-canvas {
  display: flex;
  justify-content: center;
  min-height: 520px;
  padding: 18px;
  overflow: auto;
  border: 1px solid #cfd4da;
  background: var(--admin-canvas);
}

.preview-frame {
  width: 100%;
  max-width: 780px;
  min-width: 0;
  background: var(--admin-white);
  box-shadow: 0 2px 10px rgba(32, 36, 42, 0.12);
  transition: width 0.2s;
}

.preview-frame.mobile {
  width: 390px;
  max-width: 100%;
}

.admin-product-preview {
  width: 100%;
  max-width: none;
  padding: 0 24px;
}

.admin-product-preview > header {
  padding: 42px 0 30px;
}

.admin-product-preview > header h4 {
  font-size: 30px;
}

.admin-product-preview > header .summary {
  margin-top: 14px;
  font-size: 14px;
  line-height: 24px;
}

.admin-product-preview .product-item {
  margin-bottom: 28px;
}

.admin-product-preview .product-item-body {
  padding: 24px;
}

.admin-product-preview .product-item-body .product-row {
  gap: 24px;
}

.admin-product-preview .product-image {
  width: min(38%, 280px);
}

.admin-product-preview .product-image img {
  max-height: 250px;
}

.preview-frame.mobile .admin-product-preview {
  padding: 0 14px;
}

.preview-frame.mobile .admin-product-preview > header {
  padding: 28px 0 22px;
}

.preview-frame.mobile .admin-product-preview > header h4 {
  font-size: 25px;
}

.preview-frame.mobile .admin-product-preview > header .summary {
  margin-top: 12px;
  font-size: 13px;
  line-height: 22px;
}

.preview-frame.mobile .admin-product-preview .product-item {
  margin-bottom: 20px;
}

.preview-frame.mobile .admin-product-preview .product-item-header {
  padding: 14px 16px;
}

.preview-frame.mobile .admin-product-preview .product-item-body {
  padding: 16px;
}

.preview-frame.mobile .admin-product-preview .product-row {
  flex-direction: column;
  gap: 0;
}

.preview-frame.mobile .admin-product-preview .product-image {
  width: 100%;
  margin-bottom: 18px;
}

.preview-frame.mobile .admin-product-preview .product-specs th {
  width: 105px;
  padding: 7px 8px;
  white-space: normal;
}

.preview-frame.mobile .admin-product-preview .product-specs td {
  padding: 7px 8px;
}

.performance-admin-main {
  min-height: calc(100vh - 112px);
  padding: 24px;
}

.performance-content {
  width: min(1680px, 100%);
  min-width: 0;
  margin: 0 auto;
}

.performance-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--admin-line);
}

.performance-toolbar .section-heading h2 {
  font-size: 23px;
}

.performance-toolbar .section-heading strong {
  margin-left: 5px;
  color: var(--admin-accent);
  font-size: 14px;
}

.performance-toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.performance-year-delete-form {
  margin: 0;
}

.performance-year-control {
  margin: 0;
}

.performance-year-control span {
  display: block;
  margin-bottom: 5px;
  color: var(--admin-muted);
  font-size: 11px;
}

.performance-year-control select {
  width: 160px;
  height: 38px;
  padding: 0 34px 0 11px;
  border: 1px solid #c7cdd4;
  border-radius: 4px;
  outline: 0;
  background: var(--admin-white);
  color: var(--admin-ink);
  font: inherit;
}

.performance-year-control select:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.1);
}

.performance-year-dialog {
  width: min(400px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: var(--admin-white);
  color: var(--admin-ink);
  box-shadow: 0 20px 50px rgba(32, 36, 42, 0.22);
}

.performance-year-dialog::backdrop {
  background: rgba(32, 36, 42, 0.45);
}

.performance-year-dialog header,
.performance-year-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.performance-year-dialog header {
  border-bottom: 1px solid #e6e8eb;
}

.performance-year-dialog footer {
  justify-content: flex-end;
  border-top: 1px solid #e6e8eb;
  background: #fafbfc;
}

.performance-year-dialog-body {
  padding: 18px;
}

.performance-year-dialog-body label {
  margin: 0;
}

.performance-dialog-close {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: #555d67;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.performance-dialog-close:hover {
  border-color: #d6dade;
  background: #f1f3f5;
  color: var(--admin-ink);
}

.performance-table-section {
  min-width: 0;
}

.performance-table-header {
  min-height: 48px;
  margin-bottom: 10px;
}

.performance-table-wrap {
  max-height: calc(100vh - 250px);
  overflow: auto;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: var(--admin-white);
}

.performance-admin-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  table-layout: fixed;
}

.performance-admin-table .performance-date-col {
  width: 115px;
}

.performance-admin-table .performance-client-col {
  width: 26%;
}

.performance-admin-table .performance-order-col {
  width: 82px;
}

.performance-admin-table .performance-action-col {
  width: 142px;
}

.performance-admin-table th,
.performance-admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e5e8;
  text-align: left;
  vertical-align: middle;
  line-height: 1.5;
}

.performance-admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef0f2;
  color: #4c535c;
  font-size: 12px;
}

.performance-admin-table td {
  color: #3f464f;
  font-size: 13px;
}

.performance-admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.performance-admin-table tbody tr:hover td,
.performance-admin-table tbody tr.active td {
  background: #fff6f6;
}

.performance-admin-table td:last-child {
  text-align: center;
}

.performance-admin-table .performance-empty {
  padding: 48px 16px;
  color: var(--admin-muted);
  text-align: center;
}

.performance-inline-table-section .performance-table-header {
  display: flex;
  align-items: flex-end;
}

.performance-edit-table {
  min-width: 980px;
}

.performance-edit-table td {
  padding: 7px 8px;
}

.performance-edit-table th {
  padding-right: 9px;
  padding-left: 9px;
}

.performance-inline-input {
  height: 38px;
  margin: 0 !important;
  padding: 8px 9px !important;
  border-color: #d6dade !important;
  background: #fff !important;
  font-size: 13px;
}

.performance-inline-input:hover {
  border-color: #aeb5bd !important;
}

.performance-inline-input:focus {
  border-color: var(--admin-accent) !important;
}

.performance-new-row td {
  background: #fff8f8;
}

.performance-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.performance-row-actions form {
  display: none;
}

@media (max-width: 1280px) {
  .editing-layout {
    grid-template-columns: 1fr;
  }

  .editor-pane {
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
  }

  .preview-pane {
    position: static;
    max-height: none;
  }

}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 68px;
    z-index: 15;
    display: flex;
    align-items: center;
    min-height: 0;
    padding: 8px 12px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
  }

  .sidebar h2 {
    flex: 0 0 auto;
    margin: 0 10px 0 0;
  }

  .sidebar a {
    flex: 0 0 auto;
    min-height: 36px;
    margin: 0 3px 0 0;
    padding: 7px 9px;
  }

  .content {
    padding: 16px;
  }

  .category-editor {
    padding: 15px;
  }

  .category-form {
    grid-template-columns: 1fr;
  }

  .performance-admin-main {
    padding: 16px;
  }

}

@media (max-width: 640px) {
  .admin-topbar {
    min-height: 62px;
    padding: 9px 14px;
  }

  .admin-title span {
    display: none;
  }

  .admin-title h1 {
    font-size: 17px;
  }

  .admin-topbar nav {
    gap: 12px;
    font-size: 12px;
  }

  .admin-module-nav {
    top: 62px;
    min-height: 44px;
    padding: 0 10px;
  }

  .admin-module-nav a {
    min-width: 74px;
    padding: 0 8px;
    font-size: 12px;
  }

  .sidebar {
    top: 106px;
  }

  .content {
    padding: 12px;
  }

  .performance-admin-main {
    padding: 12px;
  }

  .performance-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .performance-toolbar .section-heading h2 {
    font-size: 20px;
  }

  .performance-toolbar-actions {
    width: 100%;
    align-items: flex-end;
    flex-wrap: wrap;
  }

  .performance-toolbar-actions .button,
  .performance-toolbar-actions button {
    padding: 0 12px;
  }

  .performance-year-control {
    flex: 1 1 100%;
  }

  .performance-year-control span {
    display: none;
  }

  .performance-year-control select {
    width: 100%;
  }

  .performance-toolbar-actions > .button,
  .performance-toolbar-actions > button,
  .performance-year-delete-form {
    flex: 1 1 0;
  }

  .performance-year-delete-form button {
    width: 100%;
  }

  .category-editor {
    padding: 15px;
  }

  .workspace-header {
    align-items: flex-end;
  }

  .grid-2,
  .title-grid,
  .row-editor {
    grid-template-columns: 1fr;
  }

  .editor-pane,
  .preview-pane {
    padding: 15px;
  }

  .form-actions {
    margin: 0 -15px;
    padding: 12px 15px;
  }

  .preview-toolbar {
    align-items: flex-end;
  }

  .preview-canvas {
    min-height: 420px;
    padding: 8px;
  }

  .preview-meta span:last-child {
    display: none;
  }

  .product-list a {
    min-width: 135px;
    max-width: 180px;
  }

  .table-card-header {
    grid-template-columns: 1fr;
  }

  .table-card-header .button {
    justify-self: end;
  }

  .performance-table-header {
    min-height: 0;
  }

  .performance-table-wrap {
    max-height: none;
  }

  .performance-admin-table th {
    position: static;
  }
}

.board-admin-main {
  width: min(1540px, 100%);
  min-height: calc(100vh - 112px);
  margin: 0 auto;
  padding: 24px;
}

.board-admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--admin-line);
}

.board-admin-heading strong {
  margin-left: 5px;
  color: var(--admin-accent);
  font-size: 13px;
}

.board-admin-workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: start;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: var(--admin-white);
}

.board-post-list-panel {
  min-width: 0;
  align-self: stretch;
  border-right: 1px solid var(--admin-line);
}

.board-post-list-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 55px;
  padding: 0 16px;
  border-bottom: 1px solid var(--admin-line);
  background: #f1f3f5;
}

.board-post-list-panel > header span {
  color: var(--admin-muted);
  font-size: 12px;
}

.board-post-list-panel nav {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
}

.board-post-list-panel nav > a {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e8eb;
}

.board-post-list-panel nav > a:hover {
  background: #f8f9fa;
}

.board-post-list-panel nav > a.active {
  box-shadow: inset 3px 0 var(--admin-accent);
  background: #fff5f5;
}

.board-post-list-panel nav > a strong,
.board-post-list-panel nav > a span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-post-list-panel nav > a strong {
  margin-bottom: 6px;
  color: #343a41;
  font-size: 13px;
}

.board-post-list-panel nav > a span {
  color: var(--admin-muted);
  font-size: 11px;
}

.board-admin-empty {
  margin: 0;
  padding: 70px 20px;
  color: var(--admin-muted);
  text-align: center;
}

.board-editor-panel {
  min-width: 0;
}

.board-editor-header {
  min-height: 72px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--admin-line);
}

.board-editor-header h2 {
  max-width: 760px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-editor-form {
  padding: 20px;
}

.board-editor-form input[type="datetime-local"] {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid #cfd4da;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.board-editor-form input[type="datetime-local"]:focus {
  border-color: var(--admin-accent);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.1);
}

.board-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.board-editor-form textarea[name="content"] {
  min-height: 260px;
}

.board-editor-options {
  display: flex;
  gap: 22px;
  margin-bottom: 18px;
}

.board-editor-options label {
  margin: 0;
}

.board-attachment-editor {
  padding: 16px;
  border: 1px solid var(--admin-line);
  border-radius: 5px;
  background: #f8f9fa;
}

.board-attachment-editor h3 {
  margin: 0 0 14px;
  font-size: 14px;
}

.board-existing-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid #e0e3e6;
  font-weight: 400;
}

.board-existing-attachment > span:first-child {
  min-width: 0;
}

.board-existing-attachment strong,
.board-existing-attachment small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-existing-attachment small {
  margin-top: 3px;
  color: var(--admin-muted);
}

.board-existing-attachment > span:last-child {
  flex: 0 0 auto;
  color: #98191d;
  font-size: 12px;
  font-weight: 700;
}

.board-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--admin-line);
  background: #fafbfc;
}

.board-editor-actions.has-delete {
  justify-content: space-between;
}

.board-editor-actions form {
  display: none;
}

@media (max-width: 900px) {
  .board-admin-main {
    padding: 16px;
  }

  .board-admin-workspace {
    grid-template-columns: 1fr;
  }

  .board-post-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
  }

  .board-post-list-panel nav {
    display: flex;
    max-height: none;
    overflow-x: auto;
  }

  .board-post-list-panel nav > a {
    flex: 0 0 220px;
    border-right: 1px solid #e5e8eb;
  }
}

@media (max-width: 640px) {
  .board-admin-main {
    padding: 12px;
  }

  .board-admin-heading {
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .board-post-list-panel nav > a {
    flex-basis: 190px;
  }

  .board-editor-header {
    min-height: 64px;
    padding: 13px 15px;
  }

  .board-editor-form {
    padding: 15px;
  }

  .board-editor-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .board-editor-form textarea[name="content"] {
    min-height: 220px;
  }

  .board-editor-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .board-editor-actions {
    padding: 12px 15px;
  }
}
