/* Main Board Skin - Basic Board with Unified Design */
/* Inherits Paperlogy font from theme */

.mb-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* Header */
.mb-header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0 0 18px 0;
}

.mb-board-title {
  font-weight: 800;
  font-size: 22px;
}

.mb-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Search */
.mb-search-wrap {
  margin: 0 0 18px 0;
}

.mb-search {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.mb-search-select {
  height: 48px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  padding: 0 16px;
  background: #fff;
  font-size: 13px;
  outline: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  min-width: 120px;
  max-width: 120px;
}

.mb-search-input {
  flex: 1;
  min-width: 200px;
  height: 48px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  padding: 0 16px;
  background: #fff;
  font-size: 13px;
  outline: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}

.mb-search-input:focus {
  border-color: #c7b9ff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .10);
  outline: 0;
}

.mb-search-btn {
  height: 48px;
  padding: 0 16px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  background: #fff;
  color: #303549;
  cursor: pointer;
  font-size: 13px;
}

.mb-search-btn:hover {
  border-color: #d8dcf0;
  background: #fafbff;
}

/* Buttons */
.mb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e8eaf0;
  background: #fff;
  color: #303549;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
}

.mb-btn:hover {
  background: #f6f7ff;
  border-color: #dfe3f5;
}

.mb-btn.primary {
  background: #111827;
  color: #fff;
  border-color: rgba(0, 0, 0, .08);
}

.mb-btn.primary:hover {
  opacity: .92;
}

.mb-btn.danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.mb-btn.small {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

/* List Table */
.mb-list {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
}

.mb-list thead {
  background: #f9fafb;
}

.mb-list th {
  padding: 14px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.mb-list td {
  padding: 14px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  vertical-align: middle;
}

.mb-list tr:last-child td {
  border-bottom: none;
}

.mb-list tbody tr:hover {
  background: #fafbff;
}

/* List columns */
.mb-list .col-num {
  width: 80px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

.mb-list .col-subject {
  min-width: 300px;
}

.mb-list .col-name {
  width: 120px;
  text-align: center;
  color: #374151;
}

.mb-list .col-date {
  width: 120px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

.mb-list .col-hit {
  width: 80px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

/* Subject */
.mb-subject {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mb-subject-link {
  color: #111827;
  font-weight: 500;
  text-decoration: none;
}

.mb-subject-link:hover {
  color: #8B5CF6;
  text-decoration: underline;
}

.mb-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #f3f4f6;
  color: #374151;
}

.mb-badge.new {
  background: #eff6ff;
  color: #1d4ed8;
}

.mb-badge.hot {
  background: #fff1f2;
  color: #9f1239;
}

.mb-badge.file {
  background: #ecfdf5;
  color: #065f46;
}

.mb-badge.link {
  background: #fffbeb;
  color: #92400e;
}

.mb-comment-count {
  color: #8B5CF6;
  font-size: 13px;
  margin-left: 6px;
}

/* Icon */
.mb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 12px;
}

/* Pagination */
.mb-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 24px 0 0 0;
  flex-wrap: wrap;
}

.mb-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.mb-page-link:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.mb-page-link.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.mb-page-link.disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

/* List info */
.mb-list-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 12px 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 10px;
}

.mb-total {
  font-size: 13px;
  color: #6b7280;
}

.mb-total strong {
  color: #111827;
  font-weight: 700;
}

/* View (detail page) */
.mb-view {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.mb-view-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.mb-view-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px 0;
}

.mb-view-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #6b7280;
}

.mb-view-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mb-view-content {
  padding: 32px 24px;
  min-height: 300px;
  line-height: 1.7;
  color: #374151;
  font-size: 15px;
}

.mb-view-content img {
  max-width: 100%;
  height: auto;
}

/* Files & Links */
.mb-file-list {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  background: #fafbff;
}

.mb-file-title {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin: 0 0 10px 0;
}

.mb-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
}

.mb-file-item a {
  color: #2563eb;
  text-decoration: none;
}

.mb-file-item a:hover {
  text-decoration: underline;
}

/* View actions */
.mb-view-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
  background: #fafbff;
  flex-wrap: wrap;
}

.mb-view-actions-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mb-view-actions-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Write form */
.mb-write {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
}

.mb-form-row {
  margin-bottom: 18px;
}

.mb-form-row:last-child {
  margin-bottom: 0;
}

.mb-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 8px;
}

.mb-label.required::after {
  content: '*';
  color: #ef4444;
  margin-left: 4px;
}

.mb-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
}

.mb-input:focus {
  border-color: #c7b9ff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .10);
  outline: 0;
}

.mb-textarea {
  width: 100%;
  min-height: 400px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
}

.mb-textarea:focus {
  border-color: #c7b9ff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .10);
  outline: 0;
}

.mb-file-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.mb-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

/* Write actions */
.mb-write-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.mb-write-btn {
  height: 44px;
  padding: 0 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

/* Notice row */
.mb-list tr.notice {
  background: #fffbeb;
}

.mb-list tr.notice td {
  font-weight: 600;
}

/* Empty */
.mb-empty {
  padding: 80px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

/* Pills for category */
.mb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px 0;
}

.mb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e8eaf0;
  background: #fff;
  color: #303549;
  text-decoration: none;
  font-size: 13px;
}

.mb-pill:hover {
  background: #f6f7ff;
  border-color: #dfe3f5;
}

.mb-pill.is-active {
  background: rgba(124, 58, 237, .10);
  border-color: rgba(124, 58, 237, .35);
  color: #5b21b6;
}

/* Responsive */
@media (max-width:860px) {
  .mb-wrap {
    padding: 20px 16px;
  }

  .mb-list {
    font-size: 13px;
  }

  .mb-list th,
  .mb-list td {
    padding: 10px 8px;
  }

  .mb-list .col-num,
  .mb-list .col-hit {
    display: none;
  }

  .mb-list .col-date {
    width: 90px;
    font-size: 12px;
  }

  .mb-list .col-name {
    width: 80px;
    font-size: 12px;
  }

  .mb-view-content {
    padding: 24px 16px;
  }

  .mb-write {
    padding: 16px;
  }
}